mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
2e76271b4e
Prologue: Farewell ve.Editor my good chap… Oh, hey there HTML frames - I didn't see you there! In a world where iframes are outlaws, and symbols like document and window are global, there were more than a few assumptions about which document or window was being used. But fear not - for this commit (probably) tracks them all down, leaving a trail of iframe-compatible awesomeness in its wake. With the great ve.ui.Surface now able to be used inside of iframes, let the reference editing commence. But there, lurking in the darkness is a DM issue so fierce it may take Roan and/or Ed up to 3 whole hours to sort it out. Note to Roan and/or Ed: Editing references seems to work fine, but when saving the page there are "no changes" which is a reasonable indication to the contrary. Objectives: * Make it possible to have multiple surfaces be instantiated, get along nicely, and be embedded inside of iframes if needed. * Make reference content editable within a dialog Approach: * Move what's left of ve.Editor to ve.ui.Surface and essentially obliterate all use of it * Make even more stuff inherit from ve.Element (long live this.$$) * Use the correct document or window anywhere it was being assumed to be the top level one * Resolve stacking order issues by removing the excessive use of z-index and introducing global and local overlay elements for each editor * Add a surface to the reference dialog, load up the reference contents and save them back on apply * Actually destroy what we create in ce and ui surfaces * Add recursive frame offset calculation method to ve.Element * Moved ve.ce.Surface's getSelectionRect method to the prototype Bonus: * Move ve.ce.DocumentNode.css contents to ve.ce.Node.css (not sure why it was separate in the first place, but I'm likely the one to blame) * Fix blatant lies in documentation * Whitespace cleanup here and there * Get rid of ve.ui.Window overlays - not used or needed Change-Id: Iede83e7d24f7cb249b6ba3dc45d770445b862e08
193 lines
3.5 KiB
JSON
193 lines
3.5 KiB
JSON
[
|
|
{
|
|
"name": "ContentEditable",
|
|
"groups": [
|
|
{
|
|
"name": "General",
|
|
"classes": [
|
|
"ve.ce",
|
|
"ve.ce.View",
|
|
"ve.ce.AnnotationFactory",
|
|
"ve.ce.NodeFactory",
|
|
"ve.ce.Surface",
|
|
"ve.ce.SurfaceObserver",
|
|
"ve.ce.DomRange"
|
|
]
|
|
},
|
|
{
|
|
"name": "Annotations",
|
|
"classes": ["ve.ce.*Annotation"]
|
|
},
|
|
{
|
|
"name": "Nodes",
|
|
"classes": ["ve.ce.Document", "ve.ce.*Node"]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "DataModel",
|
|
"groups": [
|
|
{
|
|
"name": "General",
|
|
"classes": [
|
|
"ve.dm",
|
|
"ve.dm.Model",
|
|
"ve.dm.AnnotationFactory",
|
|
"ve.dm.MetaItemFactory",
|
|
"ve.dm.ModelRegistry",
|
|
"ve.dm.Converter",
|
|
"ve.dm.DataString",
|
|
"ve.dm.DocumentSlice",
|
|
"ve.dm.DocumentSynchronizer",
|
|
"ve.dm.IndexValueStore",
|
|
"ve.dm.NodeFactory",
|
|
"ve.dm.Surface",
|
|
"ve.dm.SurfaceFragment",
|
|
"ve.dm.Transaction",
|
|
"ve.dm.TransactionProcessor",
|
|
"ve.dm.TransactionProcessor.processors"
|
|
]
|
|
},
|
|
{
|
|
"name": "Annotations",
|
|
"classes": ["ve.dm.*Annotation", "ve.dm.AnnotationSet"]
|
|
},
|
|
{
|
|
"name": "Meta items",
|
|
"classes": ["ve.dm.*MetaItem", "ve.dm.MetaList"]
|
|
},
|
|
{
|
|
"name": "Internal list",
|
|
"classes": ["ve.dm.InternalList"]
|
|
},
|
|
{
|
|
"name": "Nodes",
|
|
"classes": ["ve.dm.Document", "ve.dm.*Node"]
|
|
},
|
|
{
|
|
"name": "Linear data",
|
|
"classes": ["ve.dm.*LinearData"]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Initialization",
|
|
"groups": [
|
|
{
|
|
"name": "General",
|
|
"classes": ["ve.init", "ve.init.Platform", "ve.init.Target"]
|
|
},
|
|
{
|
|
"name": "MediaWiki integration",
|
|
"classes": ["ve.init.mw*"]
|
|
},
|
|
{
|
|
"name": "Stand-alone",
|
|
"classes": ["ve.init.sa*"]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "User Interface",
|
|
"groups": [
|
|
{
|
|
"name": "General",
|
|
"classes": [
|
|
"ve.ui",
|
|
"ve.ui.Surface",
|
|
"ve.ui.Context",
|
|
"ve.ui.Frame",
|
|
"ve.ui.Toolbar",
|
|
"ve.ui.Window",
|
|
"ve.ui.WindowSet",
|
|
"ve.ui.Action",
|
|
"ve.ui.Trigger"
|
|
]
|
|
},
|
|
{
|
|
"name": "Actions",
|
|
"classes": ["ve.ui.*Action"]
|
|
},
|
|
{
|
|
"name": "Factories",
|
|
"classes": ["ve.ui.*Factory"]
|
|
},
|
|
{
|
|
"name": "Registries",
|
|
"classes": ["ve.ui.*Registry"]
|
|
},
|
|
{
|
|
"name": "Tools",
|
|
"classes": ["ve.ui.*Tool"]
|
|
},
|
|
{
|
|
"name": "Inspectors",
|
|
"classes": ["ve.ui.*Inspector"]
|
|
},
|
|
{
|
|
"name": "Elements",
|
|
"classes": ["ve.ui.*Element"]
|
|
},
|
|
{
|
|
"name": "Widgets",
|
|
"classes": ["ve.ui.*Widget"]
|
|
},
|
|
{
|
|
"name": "Layouts",
|
|
"classes": ["ve.ui.*Layout"]
|
|
},
|
|
{
|
|
"name": "Dialogs",
|
|
"classes": ["ve.ui.*Dialog"]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "General",
|
|
"groups": [
|
|
{
|
|
"name": "Utilities",
|
|
"classes": ["ve", "ve.EventEmitter", "ve.Registry", "ve.Factory", "ve.Range", "ve.Element"]
|
|
},
|
|
{
|
|
"name": "Factories",
|
|
"classes": ["ve.NamedClassFactory"]
|
|
},
|
|
{
|
|
"name": "Nodes",
|
|
"classes": ["ve.Node", "ve.BranchNode", "ve.LeafNode", "ve.Document"]
|
|
},
|
|
{
|
|
"name": "Test",
|
|
"classes": ["ve.QUnit", "ve.QUnit.assert"]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "UnicodeJS",
|
|
"groups": [
|
|
{
|
|
"name": "UnicodeJS",
|
|
"classes": [
|
|
"unicodeJS.TextString", "unicodeJS.wordbreak"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Upstream",
|
|
"groups": [
|
|
{
|
|
"name": "jQuery",
|
|
"classes": ["jQuery", "jQuery.Event", "jQuery.Promise", "jQuery.Deferred", "jQuery.jqXHR", "QUnit"]
|
|
},
|
|
{
|
|
"name": "JavaScript",
|
|
"classes": [
|
|
"Array", "Boolean", "Date", "Function", "Number", "Object", "RegExp", "String"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|