ce.ProtectedNode doesn't like to be torn down when it's detached,
and this was happening to CE nodes created in the MWReferenceList.
Hack around this by attaching the CE nodes generated by the
MWReferenceList to the ce.MWReferenceListNode (so they have a
parent and a way of getting to the surface), and by guarding against
multiple successive setups/teardowns in ce.ProtectedNode.
Change-Id: If00e75b939ccbdbaf681bbb6609fec54805bf9a0
It is easy to exit the list at any given point by using the toolbar
button or pressing enter twice while at the end of the list.
Change-Id: Ie34300fc13a4548e283348ef58c88ce420fbe0c1
ce.GeneratedContentNode had an interesting bug where it called .append()
directly on DOM elements stored in the store. They weren't cloned,
which meant the previous rendering of the same node would just disappear,
and they also weren't adopted into the correct document which would
probably have caused other issues as well.
Properly clone and transplant the nodes from the store before attaching
them to the DOM.
Change-Id: I423db85cb7c3851a9bf68de03c72aa22994d9474
Because scroll events cannot be canceled or prevented from bubbling
up, the only way to prevent the scrolling is to cancel the actual key
and mouse wheel events.
PhantomJs -= 2
Change-Id: I540738459181c37d11caf5db07345703e7000ef9
The messages 'visualeditor-dialogbutton-meta-tooltip' and 'visualeditor
-dialog-meta-title' were left in the experimental block rather than
production, so didn't appear in live. My fault, sorry.
Change-Id: I4d2f8d9ee0900d1d3ee635f348f2cc1491287f3d
This is mainly used for testing blacklisted browsers, so we just need
one parameter ('vewhitelist') which sets whitelist to true and
blacklist to false.
Change-Id: I38771ba7a49657d67c4d94ace1f30b5e41904df6
Objective:
* Make all text inputs have the ability to be "pending", not just ones
with a special mixin
Changes:
* Delete pending input widget
* Move pending input widget implementation to text input widget
* Update all uses of pending input widget
* Make pending image a reusable "texture"
* Update styles of text input widget for pending state
* Get rid of checking for mixin since all text inputs can be pending now
Bonus:
* Get rid of unused images, including .psd and .ai files
* Add transparency texture
* Fix input widget not using documented config value
* Fix documentation in select widget (lies!)
Change-Id: Ib46ab01dc39d706e5c25fd473dee0edce51b7e44
Browser history state:
* Listen for popstate, if veaction is different, act on it
(by calling activate or deactivate).
* When switching to edit mode, push veaction=edit.
When switching to view mode, push non-veaction.
Except if the switch was made by the popstate listener in
which case we don't want to push again.
Clean up:
* Use document.location.href instead of odd location.toString
Don't pass it to mw.Uri from the original one since it
takes the current url by default.
Bug: 43844
Change-Id: I5c345c1526852a84b04436955845bf1b56d94402
Merge methods:
* transformPage: transformSkinTabs + hideSiteNotice
* restorePage: restoreSkinTabs + restoreSiteNotice
Callers now consistently do both (e.g. #tearDownSurface only
called #restoreSkinTabs). This is also in preparation for
bug 43844.
Removed call from #tearDownSurface as that method is only
called from #deactivate which already calls #restorePage.
Clean up support check:
* Rename supportsStrictMode to supportsES5. Though the feature
test asserts strict mode, we use it to check support for
ES5. VisualEditor doesn't particularily care about strict
mode itself.
* Reverse support if-statemement to return early instead of
wrapping everything that follows. This makes it easier to
see that we intent to abort if the current environment is
known to be problematic. Also easier for code later on
by not accidentally falling outside this block
* Follows-up aaa5ad254b.
Change-Id: Ia4b949d9c066a3f7b07217aa3d51de9908734e85
This makes the 'category' section of the meta-data panel less lonely, and
prompts us to actually do this at some point quite soon (or encourage others
so to do).
Bug: 48814
Change-Id: I5b8fdfb78a2117839277a683db47fe97107d87b0
The update() method wiped out the entire contents of the node, including
the shield that makes ce.ProtectedNode work. Fixed by only wiping out and
reconstructing the contents of the <ol>
Change-Id: Ib2978a72939884be67964ce8a3d89a570f70bfa3
The previous fix didn't really work, because the notices are expected to
be an array elsewhere too. Better to just convert it to an array on the
spot. getObjectValues works with any kind of object (including an array)
so it's safe to use with either data type.
Change-Id: I03237b8624a0b980e5f70d54d55c662ffa460373
The easy part is getting the correct numbers from the InternalList
and generating the ordered list HTML. The tricky part is connecting
up the events to make sure the renumberings/list generations are
triggered when required.
InternalList can emit an update event on document transaction, which
triggers the renumbering/relisting if any references have been
added or deleted during that transaction.
ve.ce.MWReferenceListNode also listens to changes on the
InternalListNode (i.e. changes to the contents of the references)
and always triggers a rebuild.
Change-Id: I1b48ef5240e433c3b314259aa68cde13841ea98b