Commit graph

5482 commits

Author SHA1 Message Date
jenkins-bot bcc5d04aba Merge "Scroll into view support" 2013-09-17 16:19:18 +00:00
jenkins-bot f2dec77d8a Merge "Remove ve.log debugging calls from EventSequencer" 2013-09-17 16:06:02 +00:00
Trevor Parscal 143b086c74 Scroll into view support
Objectives:

* Scroll when needed to show highlighted (with keyboard) or selected (by
  any means) options in select widgets
* Allow clipping and automatic scrolling for certain elements when they
  are otherwise going to be rendered partially out of view

Changes:

*.php
* Add links to new file

ve.ui.Widget.css, ve.ui.Dialog.css
* Removed unneeded x-axis overflow rules

ve.ui.ClippableElement.js, ve.ui.Element.css
* New mixin, adds visible area clipping support to an element

ve.ui.PopupToolGroup.js, ve.ui.MenuWidget.js
* Mixin clippable element

ve.ui.OptionWidget.js, ve.ui.OutlineItemWidget.js
* Add scroll-into-view configuration for option widgets

ve.ui.SearchWidget.js
* Scroll items into view when highlighting with keyboard

ve.Element.js
* Add getBorders, getDimensions, getClosestScrollableContainer and
  scrollIntoView static methods
* Add getClosestScrollableElementContainer and scrollElementIntoView
  methods

Bug: 53610
Change-Id: Ie21faa973a68f517c7cfce8bd879b5317f536365
2013-09-16 16:46:58 -07:00
Translation updater bot 4c12f1841a Localisation updates from http://translatewiki.net.
Change-Id: I8645acb1de1d7184d003cff3cd9a8bac8112a1a7
2013-09-16 19:35:42 +00:00
cmcmahon daa0b10b16 VE support on beta is now reliable, run tests there
Change-Id: I82e42f24a6950680770bf6fc2b11e554d95224b6
2013-09-16 18:50:26 +00:00
Ed Sanders 8fb2f4467d Remove ve.log debugging calls from EventSequencer
Change-Id: I642acf09e7ed52d6dbf4312e054134b264c3428d
2013-09-16 18:44:33 +01:00
Translation updater bot 019a6f8e49 Localisation updates from http://translatewiki.net.
Change-Id: I10466e65b4e06dbdfc09975ee9154bac2d22f6a9
2013-09-15 19:26:06 +00:00
Translation updater bot aaace69830 Localisation updates from http://translatewiki.net.
Change-Id: I6cbb341a79f062e803a29f63fcdc87301ee4f1d9
2013-09-13 20:49:17 +00:00
Translation updater bot d2c1c4b46c Localisation updates from http://translatewiki.net.
Change-Id: I240ad4a4903701ff1d1345082ab5e28777c8b515
2013-09-12 19:36:31 +00:00
Ed Sanders c0650459df Fix merge conflict breaking localised bold/italic icons
Bug introduced by change Ic97a636f9.

Bug: 53094
Change-Id: I4bf0bd4d340dfbad26a0d729de866985f81d14aa
2013-09-12 11:44:20 -07:00
jenkins-bot c65d01fbfe Merge "Transactions: Add trailing retainMetadata when there is trailing metadata." 2013-09-12 04:14:01 +00:00
jenkins-bot bdd9094279 Merge "Move text style tools out of experimental" 2013-09-12 03:06:03 +00:00
David Chan 789d0caf09 Fix pawn on pre-annotation and keypress
modules/ve/ce/ve.ce.SurfaceObserver.js
* pollOnceNoEmit method to update SurfaceObserver's benchmark text

modules/ve/ce/ve.ce.Surface.js
* pollOnceNoEmit from onUnlock

Change-Id: Idb14a6aea723c42109b3825478766799d4abef22
2013-09-11 19:47:39 -07:00
James D. Forrester 1a1ef97336 Move text style tools out of experimental
These were meant to have been de-experimental-ised with the toolbar
commit; oh well. This moves the following text styles from being in
"experimental" mode to being regular annotations:

* Code
* Strikethrough
* Subscript
* Superscript
* Underline

Change-Id: I21be2dc844b47b825d7a1e48a592067166ecd122
2013-09-11 19:41:14 -07:00
C. Scott Ananian 3928ca16fd Transactions: Add trailing retainMetadata when there is trailing metadata.
Ensure that all transactions move the cursor past the trailing
metadata, if present.

Change-Id: I869c75f8cfabe1e14bb66d8e627d0b750bde46af
2013-09-11 16:02:12 -07:00
Translation updater bot 129cf0a42c Localisation updates from http://translatewiki.net.
Change-Id: I4800c86c515d79ba80008305ddcd98c67945f80d
2013-09-11 19:40:26 +00:00
jenkins-bot 71df5562e4 Merge "The Great [...] Rewrite of 2013: Clipboard edition" 2013-09-11 18:15:07 +00:00
jenkins-bot 67be7db1eb Merge "Fix off-by-one error with metadata-mutating transactions." 2013-09-11 17:09:07 +00:00
C. Scott Ananian 1f5b78ab94 Fix off-by-one error with metadata-mutating transactions.
Add some test cases for documents with trailing metadata, and fix an
off-by-one error in the metadata-mutating transactions (since the
document metadata array is one larger than the document data array).

Change-Id: I8f049466e03ed55010dfcf0a35702536edfa7b0a
2013-09-11 10:07:20 -07:00
jenkins-bot 7159ff73aa Merge "Integrate with BetaPreferences" 2013-09-11 16:54:51 +00:00
jenkins-bot 22d9067095 Merge "Refactor CE Surface to reduce event feedback" 2013-09-11 00:44:57 +00:00
Translation updater bot e2b877faab Localisation updates from http://translatewiki.net.
Change-Id: Ia3310953fd2191dc30dcb30ad415b4f50b15bab2
2013-09-10 20:08:24 +00:00
David Chan 23921df6dc Refactor CE Surface to reduce event feedback
Restructure SurfaceObserver methods so that the method calls are more precise.

modules/ve/ce/ve.ce.SurfaceObserver.js
* Move timing code into startTimerLoop / stopTimerLoop / timerLoop
* Move poll logic into pollOnce

modules/ve/ce/ve.ce.Surface.js
modules/ve/ui/ve.ui.Surface.js
* Change all surfaceObserver calls to use new API

Change-Id: I0085e4a53c5a776733dce6944b867b8d2228ba4b
2013-09-10 11:54:57 -07:00
Ed Sanders 06c86b3881 The Great [...] Rewrite of 2013: Clipboard edition
Firefox:
* Doesn't fire events without a selection, so when all we have is a
  focusable node, create a dummy selection in the paste target so the
  browser triggers an event on command+C.

Clipboard keys:
* Instead of just creating a text hash which may or may not match up
  with the plain text in the clipboard data, just convert the clipboard
  store into an array and use the index as the key. Also prepend a
  random number (clipboardId) so on paste we can verify the copy came
  from the same CE document.
  The text hash is now used for validation if only HTML is written
  to the clipboard.

HTML:
* Instead letting the browser grab CE HTML, always get DM HTML from
  the converter as it is cleaner (no phantoms, linefeed markers, extra
  class names etc.), and will make cross-ve-instance pasting easier
  in the future.

Clipboard overriding:
* Always override the clipboard with the above HTML, either using
  clipboardData.setData if it is available (webkit) or by throwing
  the HTML into the pasteTarget and selecting it during pre-copy.

Bug: 53375
Bug: 49396
Bug: 52096
Change-Id: Id0f39c10818047bb4b8922e97cead153a770757f
2013-09-10 10:38:34 -07:00
Ed Sanders 4f768f3734 Integrate with BetaPreferences
Look at logo Michael.

Bug: 52686
Change-Id: I3cfada2ea264184698de5f322c1fe5041b37b8c8
2013-09-10 10:20:14 -07:00
jenkins-bot cba2935173 Merge "Add alt attribute to core image nodes" 2013-09-10 01:43:40 +00:00
jenkins-bot 272b27a959 Merge "Use EventSequencer for CE Surface events" 2013-09-10 01:29:52 +00:00
Inez Korczyński 988f518ced Define RDFa types in ve.dm.MWInlineImageNode once and reuse whenever possible
Change-Id: I62ec12a6b71b60b15a4200722b8963d4cfd1b582
2013-09-09 13:04:08 -07:00
Translation updater bot c65c06dfd3 Merge "Localisation updates from http://translatewiki.net." 2013-09-09 19:32:13 +00:00
Translation updater bot 70a99c9658 Localisation updates from http://translatewiki.net.
Change-Id: Ice539ebb4112f9df7fe3ea33945d729832c52b33
2013-09-09 19:30:31 +00:00
Roan Kattouw c183d09bcf Delete ve-mw/test/index.php, it's broken and unmaintained
Change-Id: I5153fde7897b5d6c3d6f1222c3c56593d256dac7
2013-09-09 11:32:36 -07:00
jenkins-bot 75fdf0da7d Merge "update tests for latest release- no issues found" 2013-09-09 16:45:57 +00:00
jenkins-bot 6a81acb44a Merge "Always deep copy when writing to and reading from the fake clipboard" 2013-09-08 03:46:03 +00:00
Translation updater bot dd1e602d7e Localisation updates from http://translatewiki.net.
Change-Id: I077144b0792b6e11fb8d866088dd372c4aa374be
2013-09-07 20:05:20 +00:00
Ed Sanders dd73b873a8 Add alt attribute to core image nodes
Also update and refactor tests.

Change-Id: I96d08faed42118b713af8011c5d6befb760e65c9
2013-09-07 12:56:17 -07:00
jenkins-bot 78cba8cc24 Merge "doc: Fix incorrect syntax" 2013-09-07 02:10:57 +00:00
David Chan 79a1bdd691 Use EventSequencer for CE Surface events
Change-Id: I662b164b7bff16ec957f3e06004e477be27282b0
2013-09-06 18:13:44 -07:00
David Chan 8e77752deb Timoize the EventSequencer into a sleek, purring monster
Change-Id: Ia925d76d9a41b777861621724ced4db8371786b8
2013-09-06 17:30:50 -07:00
jenkins-bot 0c327d4f73 Merge "Replace renderingEnabled toggle with lock counter" 2013-09-06 23:15:49 +00:00
David Chan 495e83cf2b Replace renderingEnabled toggle with lock counter
modules/ve/ce/ve.ce.Surface.js
* remove methods enableRendering/disableRendering/isRenderingEnabled
* add methods incRenderLock/decRenderLock/isRenderingLocked
* Consequential method call changes
* try-finally blocks around incRenderLock/decRenderLock pairs

modules/ve/ce/ve.ce.ContentBranchNode.js
* Consequential method call changes

Change-Id: Icb71bf536c7bad3a6c0c6512a2efb9565b5bd086
2013-09-06 16:02:51 -07:00
Translation updater bot b01ce18231 Localisation updates from http://translatewiki.net.
Change-Id: I67077ef175e1ba8ef7d2e13cdfa73972b95d7a6c
2013-09-06 22:10:34 +00:00
Timo Tijhof 6843f15962 doc: Fix incorrect syntax
These are not considered errors in jsduck 4.x but are in 5.x.

Though we don't specifically want to support 5.x yet, these are
actually genuine errors that were already causing incorrect
documentation to be generated, even under 4.x (it just doesn't
warn for these under 4.x).

Not from 5.x warnings, but fixed while at it:
* Removed more redundant @method
* Added a missing @returns for ve.Range#flip
* Added newline at EOF

Change-Id: Idc22b46b082a813e8e1761403e1ebf908bf690c4
2013-09-06 20:29:18 +00:00
cmcmahon 6a91695c59 update tests for latest release- no issues found
Change-Id: I84830927a72a908fa4b676ccdbbd33afd8835638
2013-09-06 11:23:45 -07:00
C. Scott Ananian 47545a5d6f Remove no-insertion metadata corner case from ve.dm.Transaction.pushReplace().
This version pushes a `replaceMetadata` operation after a `replace` to
fixup trailing metadata if there is no inserted region and the removed
region includes metadata.  This avoids a corner case where the
size of the metadata arrays inserted/removed in `Transaction.pushReplace()`
do not match the size of the data arrays inserted/removed.

We remove the now-unused `Document.getMetadataReplace()` method.

We also adjust `MetaList.onTransact()` so that it continues to work
properly when the number of metadata entries in `replace.insert` is
not the same as the number of metadata entries in `replace.remove`.

Change-Id: I1d600405b855ca1cb569853bb885b0752df47173
2013-09-06 01:07:37 +00:00
C. Scott Ananian 5830bce72c Correctly preserve metadata in Transaction.newFromUnwrap.
The `Transaction.pushReplace` method has a corner case if the removed
region has metadata and the inserted region is empty.  This works fine
unless there are two adjacent `pushReplace` operations, which can occur
in `Transaction.newFromUnwrap`.  Fix this by having `pushReplace` look
at a preceding replace and correctly merge the two operations if
possible (in particular in the tricky case where the previous case has
a zero-length insertion).  Pleasantly, this can be done without a lot of
special-casing code in `pushReplace` or `newFromUnwrap`.

Add test cases verifying the `newFromUnwrap` works correctly (both
in commit and in rollback) when there is metadata present.

Change-Id: I6cfec0d2b1823dad724422f018a3c73dc0c7f186
2013-09-06 01:06:59 +00:00
David Chan 8a2b55321c docs: Minor improvements
CODING.md
* Document the procedure for adding a new javascript class

ve.dm.MWExternalLinkAnnotation.js
ve.dm.MWInternalLinkAnnotation.js
ve.dm.ElementLinearData.js
ve.dm.LinearData.js
* Add whitespace line before preformatted code to fix a
  rendering bug

Change-Id: I54443ea3d4799328655d279f379d4ddc176c50a0
2013-09-05 23:56:59 +00:00
jenkins-bot c0fe8b877c Merge "Apply DOM changes in onProtectedSetup and onProtectedTeardown instead of constructor" 2013-09-05 22:57:53 +00:00
jenkins-bot c5aaf37139 Merge "Define RDFa types in ve.dm.MWBlockImageNode once and reuse whenever possible" 2013-09-05 22:56:22 +00:00
Inez Korczyński 7f9fa4f0e5 Define RDFa types in ve.dm.MWBlockImageNode once and reuse whenever possible
Change-Id: Iebb2081dee4555f459adaa4cb9b802c283cf4827
2013-09-05 15:52:07 -07:00
Ed Sanders 0c52ab64e1 Sort i18n messages
Change-Id: Ic736fd63aa76c324edb67b303aadb269221ab213
2013-09-05 15:35:06 -07:00