Commit graph

4360 commits

Author SHA1 Message Date
jenkins-bot 8dc93b6a71 Merge "Merge undefineds into undefined rather than []" 2013-09-04 22:40:17 +00:00
Moriel Schottlender 6744af7733 Quickfix Language Tool
Correcting the language span tool so the ve.ui.LanguageInspector has
static name changed from 'language' to 'meta/language'

Change-Id: I66fd3d2558663c9f1304365a11fd1276e204a7e7
2013-09-04 18:32:21 -04:00
Trevor Parscal 416537ecb7 Fix context menu position for small inline nodes
The context menu was being positioned incorrectly for small inline
nodes, such as references or small templates. This fix moves the context
to the bottom, as well as placing it on the right or left in LTR and RTL
directions respectively.

Change-Id: I55de2a6464d0544e32118bf95dbb85c33354f025
2013-09-04 22:22:52 +00:00
Roan Kattouw 247368b902 Merge undefineds into undefined rather than []
ve.dm.MetaLinearData.static.merge( [ undefined, undefined, ... ] )
returned [ [] ], make it return [ undefined ] instead. This allows
us to lazily use the merge function to create metadata without having
to worry about denormalizing undefined to [] all over the place.

Change-Id: I41fe6472c2185a6315119a546a73765966d013d3
2013-09-04 13:09:04 -07:00
jenkins-bot 8dfa827a97 Merge "ve.EventSequencer: Post-event listening" 2013-09-04 20:08:42 +00:00
James D. Forrester 4da68b71d1 Reference core bug 53774 in bug 49000 comment
Bug: 49000
Bug: 53774
Change-Id: I1f26c7ac770daca06ae3c87742c1b3e3d2b17e41
2013-09-04 13:07:27 -07:00
David Chan 793172e41e ve.EventSequencer: Post-event listening
modules/ve/ve.EventSequencer.js
* Class to sequence pre-event and post-event listening correctly

demos/ve/eventSequencer.html
* Plain HTML example page for testing EventSequencer and event sequences

Change-Id: I4ddb10a30c2f44015136a7978a185d0b13f0690b
2013-09-04 11:20:46 -07:00
Timo Tijhof 298afbf337 mw.ViewPageTarget.init: Don't add class ve-available when unavailable
In commit e1f8ee7 the return statement was moved into the
userPrefEnabled check, however addClass( 've-available' ) was
still unconditional. This has now been restored.

Change-Id: Ia59bfed93a8849a529cc3b9d1d2e0619d65240d4
2013-09-04 17:58:13 +00:00
jenkins-bot fc5003aa35 Merge "Collapse metadata on any removal." 2013-09-04 02:22:31 +00:00
jenkins-bot ab89d78be2 Merge "Cleanups for ve.dm.Transaction" 2013-09-04 01:42:40 +00:00
C. Scott Ananian 7c1623d915 Cleanups for ve.dm.Transaction
Avoid making a copy of the entire data array by using `doc.data` and
`doc.data.getLength()` instead of `doc.getData()` and
`doc.getData().length`.

Get rid of some unnecessary conditionals in `Transaction.newFromWrap`: the
`tx.pushReplace()` and `tx.pushRetain()` methods will already gracefully
no-op if the replaced/retained region is empty; we don't need to add
extra control flow to handle that case.

Clarify offset math in `Transaction.newFromWrap`.

Fix a minor bug in `Transaction.newFromInsertion`: the final retain didn't
account for the length of the removed region, if `doc.fixupInsertion`
creates one.  (This usually doesn't happen.)

Remove an inaccurate TODO in `Transaction.pushReplaceMetadata()` -- it is
no longer a straight copy/paste of `Transaction.pushReplace`, so a refactor
isn't really called for.

Change-Id: I7d86a2449978365d69d4a5ed43116c2e9945475d
2013-09-04 01:41:07 +00:00
jenkins-bot b777ff74e3 Merge "Offer the typed text as a link suggestion if the page is valid" 2013-09-04 00:32:30 +00:00
jenkins-bot 630edd049c Merge "Kill domAttributeWhitelist in favor or renderHtmlAttributes" 2013-09-04 00:28:14 +00:00
Trevor Parscal c457d8afcc Add keyboard shortcuts for formatting tools
Objective:
* Add keyboard shortcuts for paragraph, heading 1-6 and pre-formatted

Testing:
* Using [control+num] triggers appears to work well on Chrome, Safari, Firefox and Opera on Mac

Changes:
ve.init.Target.js, ve.init.mw.ViewPageTarget.js
* Add formatting commands to targets
ve.ui.MWFormatTool.js
* Add mediawiki specific format tools and commands
ve.ui.CommandRegistry.js
* Add commands for all formatting tools
ve.ui.TriggerRegistry.js
* Add triggers for formatting tools

Bug: 33512
Change-Id: I5d6176eff50aa3cea72aed226ca06512629412d4
2013-09-03 17:17:03 -07:00
Trevor Parscal d377f3e495 Insert images after selection, not in place of it
Bug: 52460
Change-Id: I69ce4c2473d57fd585df0c602359c1d0f60a58f7
2013-09-03 13:37:43 -07:00
Trevor Parscal 8dfbc5baa5 Make tools generic and add fancy tool groups
Objectives:

* Got rid of mw prefixing in tools, inspectors and dialogs
* Simplify tool classes so they can be generically used as items in bars, lists and menus
* Add support for a catch-all toolbar group
* Simplify tool registration, leaning on tool classes' static name property
* Move default commands to command registry
* Move default triggers to trigger registry
* Get language tool working in standalone

Change-Id: Ic97a636f9a193374728629931b6702bee1b3416a
2013-09-03 11:27:39 -07:00
C. Scott Ananian 5095e27925 Collapse metadata on any removal.
In ve.dm.Document.getMetadataReplace(), we used to only merge metadata
if the amount removed is larger than the amount inserted.  But this
could end up putting metadata in odd positions, for example if you
have Foo[[Category:Bar]]Baz and you delete 'ooBa' and replace it with
{image}xxx{/image}, then the category ends up inside the image.

We should always merge metadata when a segment is deleted, so that it
appears outside any new structure added.

There's a weird corner case here when a segment is removed but no
insertion is made: the removed metadata then needs to get glommed onto
the next element.  We extend the insert/replace metadata array
when this happens.

Bug: 53444
Bug: 53445
Change-Id: I51d55fb370b473273f9cf152fdd0f356377d4109
2013-09-01 11:00:51 -04:00
jenkins-bot 9ff8080e59 Merge "ce: Use a better transparent pixel image" 2013-08-31 06:38:57 +00:00
Timo Tijhof 8cea089f3b ce: Use a better transparent pixel image
See also http://stackoverflow.com/a/13139830/319266:

> Some are unstable and cause CSS glitches. [If] you have an
> <img> and you use the tiniest transparent GIF possible, it
> works fine[. if] you then want your transparent GIF to have a
> background-image, then this is impossible. For some reason,
> some GIFs such as the following prevent CSS backgrounds (in
> some browsers).
>
> == Shortest (but unstable) ==
> data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
>
> == Stable (but slightly longer) *use this one* ==
>
> data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
>
> Also: don't ommit image/gif. This will break in several browsers.

For the record, this is not limited to rare browsers.
It also affects latest Chrome in some cases as confirmed by
Christian (it'd be white instead of transparent in some cases
when uses as a css background-image without border).

Change-Id: If9ff8a0820c217b6c23e3335944907939a37bef7
2013-08-30 17:51:20 -07:00
jenkins-bot a8879e1c47 Merge "Include param label in search index" 2013-08-31 00:48:35 +00:00
jenkins-bot 6f65dd63dd Merge "Round trip alien extensions correctly when edited" 2013-08-31 00:44:02 +00:00
Ed Sanders 9ab79330c7 Round trip alien extensions correctly when edited
ce.MWExtensionNode
* Build up the wikitext for round-tripping using jQuery, and pass
  through the attributes from data-mw

dm.MWExtensionNode
* Use a static getExtensionName to correctly get the extension
  name from the dataElement (as the getMatchRdfaTypes hack won't
  work for MWAlienExtensionNode's)

dm.MWAlienExtensionNode
* Implement new static getExtensionName function

Bug: 53543
Change-Id: Id4e83c14ec68c3b3970d05317477f19aaf31abe4
2013-08-30 16:43:50 -07:00
Trevor Parscal a365166948 Include param label in search index
Bug: 51670
Change-Id: I7f398bf26bf69d81b19fd258fddd490a6a81176c
2013-08-30 15:20:21 -07:00
Ed Sanders 176320a483 Offer the typed text as a link suggestion if the page is valid
Currently we only offer the normalised page title from the server
so 'iPhone' only suggests 'IPhone'. With this fix we offer the typed
text as the first suggestion if it matches via mw.Title, so 'iPhone'
suggests ['iPhone', 'IPhone', ...]

Bug: 50452
Change-Id: I05cc0cd19537cbfa682d7aac0f9640decea282b5
2013-08-30 15:08:37 -07:00
jenkins-bot 343f989c7a Merge "Allow phantoms and focus areas to be overridden" 2013-08-30 21:42:22 +00:00
Ed Sanders 2d720bd6d9 Allow phantoms and focus areas to be overridden
And actually use this functionality on MWBlockImage to
highlight centred images correctly.

FocusableNode
* Actually use $focusable to render the highlight correctly

ProtectedNode
* Allow a $phantomable element to define which element to
  highlight on mouseenter
* As phatoms are built off shields, make sure a shield is
  given to $phantomable

RelocatableNode
* Allow a $relocatable element to define which element the
  relocatable marker is measured against

ui.Context
* Use $focusable (when available) for positioning the popup

Plus some documentation fixes

Change-Id: I370337239af4fc935cd86757b3ce03011bae5ba8
2013-08-30 14:04:17 -07:00
jenkins-bot 3d2a33855c Merge "Re-build reference search index so they can be used mid-edit" 2013-08-30 19:12:23 +00:00
Trevor Parscal ac77d33c9e Re-build reference search index so they can be used mid-edit
The search index was only being built on initialization, rather than at
the time the list was being shown. By moving it to be built on open
the list will always be fresh. Also, just after building the index, we can
enable/disable the select existing button based on the number of
results.

Bug: 51689
Bug: 51848
Bug: 52000
Change-Id: Ib38b1b227edc3d61dc49fa58999358e7adf11b08
2013-08-30 19:09:47 +00:00
jenkins-bot 651ce4a55b Merge "Expose version information in the client" 2013-08-30 18:53:19 +00:00
jenkins-bot bc9205e0cc Merge "VisualEditor: RTL entries don't receive dir="rtl" in Page settings / Languages" 2013-08-30 18:26:55 +00:00
cmcmahon 88504aa3d9 use regexp anchors to prevent false matches
Change-Id: Ib13b85986e3df431b0f900fea38165197411370e
2013-08-30 17:28:40 +00:00
Pavel Selitskas 1084cdb350 VisualEditor: RTL entries don't receive dir="rtl" in Page settings / Languages
We call isRedirect to get the real language code instead of the site code.
Post-factum, lang attribute is added as well for each entry.

Bug: 53503
Change-Id: Ia6bf63a7cbe3c7b99ed05d0bd0fdd33190550c98
2013-08-30 14:39:45 +03:00
Ed Sanders a72099af66 Expose version information in the client
By passing in the information via a ResourceLoaderModule this
gets around any concerns with performance (version information
is read from the file system).

The version information is appended to the beta toolbar dialog.

Bug: 53050
Change-Id: I7836e1d4003416cbb7e18e3435aa87d82fd5c2e2
2013-08-29 18:19:40 -07:00
Timo Tijhof bdd1a73eaa data: Rename MessagesModule to DataModule
Also..
* removed an incorrrect comment referring to the old module
  name (standalone didn't use the VisualEditorMessagesModule).
* made it use debug mode to determine whether to minify or
  prettify the js code.

Change-Id: I493007649fba27e7faab0cf743eded5f68714c50
2013-08-29 18:07:35 -07:00
Moriel Schottlender 84cca4f472 Cursor fix after link insertion
When a link was inserted, the cursor position was backwards (at the
beginning of the word rather than its end) - this commit fixes that
problem.

Also, thanks for the help Ed!

Bug: 53560
Change-Id: I04fe1ca4c9126898e7bf85cdf519794d66b4f38b
2013-08-29 21:46:28 +00:00
jenkins-bot 4291b2a308 Merge "When pasting, try to use original range" 2013-08-29 18:26:53 +00:00
jenkins-bot 0cdcf2d155 Merge "Always give references names. Ignore if used once." 2013-08-29 18:26:04 +00:00
jenkins-bot 0ae19ffa40 Merge "Set contentEditable using jQuery#prop" 2013-08-29 17:54:56 +00:00
Ed Sanders 98cad0f410 Set contentEditable using jQuery#prop
Also always use strings 'true'/'false' for the value, because
it is a string property (spellcheck, however, is a boolean)
and always use a capital second 'E' in the name.

Change-Id: Ia4e1f9edfd8f236fe81df190e6a68729d7b52243
2013-08-29 09:59:55 -07:00
jenkins-bot 467ddf5ab8 Merge "Followup 41a4b3fb: use .not()" 2013-08-29 01:55:19 +00:00
jenkins-bot 53eda266d9 Merge "Add dual detection for types that Parsoid is about to rename" 2013-08-29 00:55:50 +00:00
jenkins-bot b41d3bee07 Merge "Add ULS to the standalone" 2013-08-29 00:44:02 +00:00
Roan Kattouw c68e550bb3 Add ULS to the standalone
Also rerun makeStaticLoader

Change-Id: If9fae5dc5ea37567c50ab5d462308ff05e053c8c
2013-08-28 17:35:37 -07:00
Moriel Schottlender d4c2374515 Fixing inspector popup position
The inspector popup should appear relative to the position of the related
calling method - either relative to the cursor (like in links and language)
or relative to the focusableNode (like in templates/transclusion).

Bug: 50905
Change-Id: I07f58d0c6561adecbec560fc24bcb6e590f2cd9f
2013-08-28 23:59:36 +00:00
jenkins-bot ae4fee0883 Merge "AnnotationInspector insertion over blank selection" 2013-08-28 23:44:07 +00:00
jenkins-bot 1375c48488 Merge "Move contentEditable=false to protected node" 2013-08-28 23:33:09 +00:00
jenkins-bot 4493ca1f48 Merge "Rename 'DOM Changes' => 'DOM changes'" 2013-08-28 23:32:25 +00:00
Roan Kattouw 4d91e4edbf Add dual detection for types that Parsoid is about to rename
Bug: 53432
Change-Id: If404585f9a118b4155ceb46fbe8e467b41ec6b29
2013-08-28 16:30:20 -07:00
Ed Sanders 458f8d1a82 Move contentEditable=false to protected node
Because that's where it should be.

Bug: 53507
Change-Id: I9afffea238a774b884d4d2434d3523e4c4e445b2
2013-08-28 16:18:55 -07:00
Ed Sanders e0018e8e94 Rename 'DOM Changes' => 'DOM changes'
Because we don't use title case in comments

Change-Id: I5cdd3241aba0727a3cd5d0ded972ae54abf1efd0
2013-08-28 15:55:35 -07:00
Zeljko Filipin 8f7e9c27a7 Moved VisualEditor Selenium tests from browsertests repository
Requested by James Forrester at QA mailing list:

http://lists.wikimedia.org/pipermail/qa/2013-August/000339.html

Bug: 53467
Change-Id: I915b4e41d32c9190ccea73f2b3bce9a53918fe80
2013-08-28 20:14:21 +00:00
Ed Sanders 52de8b76ec Always give references names. Ignore if used once.
This avoids problems when unnamed references were copy-pasted.

Knowing that key is always non-null simplifies a lot of logic
elsewhere.

Bug: 53365
Change-Id: I3a23123ae732d9583814d38dd880a0cdf691fd5d
2013-08-28 12:47:33 -07:00
jenkins-bot c3576a5c29 Merge "Fix typo (was comma instead of semicolon)" 2013-08-28 18:54:58 +00:00
David Chan e0663b5066 Fix typo (was comma instead of semicolon)
modules/unicodejs/test/unicodejs.wordbreak.test.js
* fix typo

Change-Id: Ieef78b4f51054b760217c8e2f12a4510857ee88a
2013-08-28 11:51:52 -07:00
Ed Sanders 182d9bbeea Check clipboardData exists before accessing it
Bug fix for browsers which don't have an event.clipboardData
property. The check is done correctly in onCopy but not onPaste.

Change-Id: I3cdf4c0358aa145dcb70c2c103d08a0002001fd4
2013-08-28 11:47:13 -07:00
Moriel Schottlender ba7e0ff273 AnnotationInspector insertion over blank selection
This commit fixes two issues with insertion of annotations in blank space:
* LanguageInspector issue with inserting an language annotation inside any
  whitespace (selection of space between words or collapsed selection in
  blank line)
* AnnotationInspector issue with collapsed selection inside slugs. If
  the marker was in a slug collapsed selection, activating
  AnnotationInspector would expand the range to the closest word (on the
  next paragraph). This commit makes sure the expansion for the next word
  only happens if the selection is outside a slug.

Change-Id: I144eccefba16131a3d2ec6a3181adf47a15d6cc0
2013-08-27 20:34:57 -04:00
Ed Sanders f50102f521 Disable inserting/changing references when surface widget is empty
This listens to change events on the surface and checks to see if
there is more than just an empty paragraph node.

Bug: 53345
Change-Id: Ic8fa84d7cdcbffd154178939d0ec8c2c4f86c415
2013-08-27 17:18:52 -07:00
Ed Sanders ddb608e6bc When pasting, try to use original range
This functionality was (accidentally?) removed by I8f8a240a. It
stops us from over-zealously balancing data when we can get away
with just pasting the original selected range (e.g. it always wraps
collections of text and content nodes in another paragraph).

Bug: 53364
Change-Id: I93fa56c4e43083993c310e0050087e9d1de1e08b
2013-08-27 15:40:59 -07:00
jenkins-bot 92c7be9b31 Merge "Detect outdated pending post KeyPress handler" 2013-08-27 22:31:07 +00:00
David Chan d867ef8fc0 Detect outdated pending post KeyPress handler
modules/ve/ce/ve.ce.Surface.js
* Schedule the post-keypress async handler in a way that can be cancelled.
* Cancel it and run the handler immediately if another key event happens.

Bug: 53079
Change-Id: If139ff3230c10caa616743f71659c4606d290310
2013-08-27 13:55:02 -07:00
Roan Kattouw 10393b8773 Followup 41a4b3fb: use .not()
I claimed that it didn't preserve text nodes, but it does. It's just
that there's a bug where it doesn't preserve text nodes if the selector
passed to it is too simple, but 'link, meta, style' is complex enough
to avoid triggering this bug.

Change-Id: Id4a60dc87b8d4c613bc7013641b116dd7c331ac1
2013-08-27 13:53:17 -07:00
Roan Kattouw 051867c3ab Actually use GeneratedContentNode in AlienNode
ce.AlienNode was mixing in GeneratedContentNode, but wasn't actually using
it properly. This commit fixes this so that AlienNode can benefit from
the <meta>/<link>/<style> stripping code in GeneratedContentNode.

Also added a getHashObject() function to dm.AlienNode to summarize the
domElements attribute because ve.getHash() chokes on it otherwise.

Change-Id: Ief3be94f9730297abe0e3c57506b81a8ff1d136d
2013-08-27 13:53:17 -07:00
jenkins-bot 0ef918b6f0 Merge "Language Inspector Default Fix" 2013-08-27 20:36:42 +00:00
jenkins-bot 8b773cf9a4 Merge "Give document real focus after cut" 2013-08-27 20:21:42 +00:00
jenkins-bot 80ded50c8b Merge "Copy-paste data fixes" 2013-08-27 20:21:00 +00:00
jenkins-bot 78141a6f33 Merge "Don't render <meta>/<link>/<style> tags in GeneratedContentNode" 2013-08-27 18:28:34 +00:00
Roan Kattouw 41a4b3fb51 Don't render <meta>/<link>/<style> tags in GeneratedContentNode
There is no good reason why we'd render these tags, and their presence
causes Chrome to crash while cutting across them.

Bug: 50043
Change-Id: I611e3907cf20fa27dbef89ea941d0b787a44ba4f
2013-08-27 11:26:37 -07:00
jenkins-bot d7702819e8 Merge "Make ve.dm.Surface.{start,stop}HistoryTracking idempotent." 2013-08-27 16:27:41 +00:00
C. Scott Ananian 4fee78227d Make ve.dm.Surface.{start,stop}HistoryTracking idempotent.
Add a little robustness, guaranteeing that we don't end up with multiple
history tracking tasks running, leaking one, or try to clear a non-running
interval.

Change-Id: I41db2d6fefc7f45f150aa14ecefc648760ad6200
2013-08-27 09:25:54 -07:00
C. Scott Ananian 7fb7665608 Avoid crash after ve.dm.Surface.purgeHistory().
The selection property is never null; it is initialized to Range(0,0).
If it is set to null in purgeHistory(), the next call to
ve.dm.Surface.change() will crash.

Change-Id: Ia45c0ba26291e8ad09c445fdf2323710b5ab409f
2013-08-27 09:37:37 -04:00
Roan Kattouw ce138adbdb Kill domAttributeWhitelist in favor or renderHtmlAttributes
domAttributeWhitelist wasn't actually being observed. Instead, we
already had the code in place to treat renderHtmlAttributes as a
boolean/whitelist/blacklist hybrid, it just wasn't used that way
yet.

This makes the interface nicer and fixes the bug where all attributes
(including data-parsoid and even things like onmouseover) were
rendered by CE.

Change-Id: I02e266c7c7dc197ed845164b7a705d786846a33b
2013-08-26 18:37:50 -07:00
Ed Sanders fd410c03a7 Give document real focus after cut
If only a FocusableNode is selected the document doesn't have
real focus, so we must do it manually.

Bug: 53362
Change-Id: I781f59dda7f2884ff02f6688c2c8c037ac7ed1a6
2013-08-26 23:06:13 +00:00
Ed Sanders 99692230b1 Copy-paste data fixes
* Assign cut/copy/paste events to the document so that
  they are triggered when the CE doesn't have real focus
  e.g. only a FocusableNode is selected
* Use clipboardData.setData when available. The key can
  be stored and retrieved perfectly in text/xcustom but
  this technique doesn't work in FF or IE
* Just use text content for key as this is what is written
  to the clipboard, so this can be used directly without
  having to get the content from the pasteTarget.

Bug: 48604
Bug: 49396
Change-Id: Ib3702f9441f6ee3fa34ec071f00994dd7e591d99
2013-08-26 15:25:15 -07:00
Timo Tijhof d0d0e156b8 doc: Restore and clean up documentation for Platform subclasses
- Added missing @inheritdoc so that generated documentation is
  not empty.
- Fixed type of mw.Platform#getMessage from (implied) @property
  back to @method.
- Removed notes from mw methods. They are prepended instead of
  appended, thus overriding the useful single-line summary
  of the method with this random note. Description should either
  be replaced entirely (e.g. no @inheritdoc) or inherited.
- Rephrased a few description to be consistent with the others
  (e.g. "Get .." and "Add .." instead of "Gets .." or "Adds..").

Follows-up cbe35632f1.

Change-Id: Ie55bb9e18f1524b706f0e195300170e4d552bf73
2013-08-26 12:47:28 -07:00
Moriel Schottlender 47f9c66798 Language Inspector Default Fix
Fixes the situation where there's a language set but not a direction.

Change-Id: If353b36ff0700717f1b8fd917b39c230de5ec272
2013-08-26 03:17:45 -04:00
jenkins-bot 3f7761d242 Merge "Modify regex to allow section links as valid titles" 2013-08-22 21:21:55 +00:00
Amir E. Aharoni b10b5143ff Reverse the progress image for RTL
The reversed image was created by Ebraminio using
convert loading.gif -flop loading2.gif

Bug: 51401
Change-Id: I264d9368cf8fd030ff34540e50e0038aa42ece16
2013-08-22 23:46:59 +03:00
Ed Sanders 227f214610 Modify regex to allow section links as valid titles
Bug: 53219
Change-Id: I552d0128de2c1ca683e30ae6d4b9fb137b827c7d
2013-08-22 19:24:16 +01:00
jenkins-bot 56ff25cb7c Merge "Fix copy and paste of backwards selction" 2013-08-22 18:14:17 +00:00
jenkins-bot 9a7b7e9176 Merge "getAnnotationsFromRange should only ignore non-content data" 2013-08-22 18:12:03 +00:00
Ed Sanders f9b92e8909 Fix copy and paste of backwards selction
Was previously broken as getSlice was using ve.Range#equals to
compare ranges which is direction-sensitive.

Bug: 51538
Change-Id: Ib58d1d8fd11b62388c111a5da66171d13a9db9c2
2013-08-22 18:10:34 +00:00
jenkins-bot 97c03da395 Merge "Don't emit Surface changes back to the Surface" 2013-08-22 09:48:23 +00:00
Trevor Parscal 3886821b9b Use mw specific names for commands
Objective:

* Use the MW link specifically, since the target/command system doesn't
  understand the group/id/extension concept yet

Change-Id: I8b756fa0bb55468312bb30d45ac5b943ff7362b5
2013-08-21 23:53:53 +00:00
Ed Sanders 380b368986 getAnnotationsFromRange should only ignore non-content data
Currently ignores all non-element data, but element content (e.g.
images) can be annotated.

Added test cases and updated the test runner to only compare
store indexes for a more readable output.

Bug: 50127
Change-Id: I234586a28072811c8288aab56f6abaaa0da0c88d
2013-08-21 22:32:34 +01:00
David Chan 24dae99065 Don't emit Surface changes back to the Surface
modules/ve/ce/ve.ce.SurfaceObserver.js
* add emitContentChanges argument to poll (and start and stop)

modules/ve/ce/ve.ce.Surface.js
* Pass emitContentChanges=false to calls to start/stop in certain places
* Explicitly pass emitContentChanges=true elsewhere, to preserve prior
  behaviour

modules/ve/ui/ve.ui.Surface.js
* Explicitly pass emitContentChanges=true to poll

modules/ve/test/ve.test.js
* Escape non-BMP unicode text literals (to prevent potential editor
  problems)

Bug: 50105
Bug: 50346
Bug: 50631
Bug: 51477
Bug: 52716
Change-Id: I19ec7eaa0e3224cbfc7e7188e964183d7393c9a7
2013-08-21 17:26:32 +00:00
jenkins-bot ffdbc92a41 Merge "Toolbar API" 2013-08-20 23:17:42 +00:00
Trevor Parscal 332e31fb00 Toolbar API
Objectives:

* Make it possible to add items to toolbars without having to have all
  toolbars know about the items in advance
* Make it possible to specialize an existing tool and have it be used
  instead of the base implementation

Approach:

* Tools are named using a path-style category/id/ext system, making them
  selectable, the latter component being used to differentiate extended
  tools from their base classes, but is ignored during selection
* Toolbars have ToolGroups, which include or exclude tools by category or
  category/id, and order them by promoting and demoting selections of
  tools by category or category/id

Future:

* Add a way to place available but not yet placed tools in an "overflow"
  group
* Add a mode to ToolGroup to make the tools a multi-column drop-down style
  list with labels so tools with less obvious icons are easier to identify
  - and probably use this as the overflow group

Change-Id: I7625f861435a99ce3d7a2b1ece9731aaab1776f8
2013-08-20 16:08:26 -07:00
jenkins-bot 841a414c31 Merge changes Id2328d6e,I840b689d
* changes:
  Remove language variants from bold/italic now we have fallbacks
  Implement fallback langauges
2013-08-20 21:38:33 +00:00
jenkins-bot cd5ee730ab Merge "Remove duplicate comments from platform code" 2013-08-20 21:25:48 +00:00
jenkins-bot 4f6e42b699 Merge "Subscript is one word (and so is superscript for that matter)" 2013-08-20 20:37:49 +00:00
Trevor Parscal 4e6694c75e Subscript is one word (and so is superscript for that matter)
Objective:

* Unify the capitalization of subscript and superscript

Change-Id: I5a7fbc2d864c896ebb26177cf05c7adddacd8829
2013-08-20 13:34:50 -07:00
Ed Sanders 433f1eebcb Remove language variants from bold/italic now we have fallbacks
Bug: 53094

Change-Id: Id2328d6e7f89cd9deddde67b57cd7e3fc55683e6
2013-08-20 20:18:37 +00:00
Ed Sanders 069b757afc Implement fallback langauges
Return an array of languages instead of a single language. Languages
containing hyphens return themselves along with the root code e.g.
'en-GB' => ['en-GB', 'en']

Change-Id: I840b689d0021d865f93d16d075473a2ed0a9f0d8
2013-08-20 20:12:46 +00:00
Ed Sanders cbe35632f1 Remove duplicate comments from platform code
Inherited methods don't need to repeat documentation.

Change-Id: I05c4efe8e4a394411922add5f11259d47d44e3bb
2013-08-20 21:12:33 +01:00
jenkins-bot b2c65f2f87 Merge "Fix issue in 7673a398" 2013-08-20 19:15:38 +00:00
jenkins-bot 515283d142 Merge "Correct unicode range in legal title regular expression" 2013-08-20 18:28:36 +00:00
jenkins-bot e38bb7714f Merge "Change be-tarask to use Te instead of Te-El for bold" 2013-08-20 18:13:31 +00:00
David Chan f9c41c754b Correct unicode range in legal title regular expression
The old regex was lifted from PHP, which matches on UTF-8 byte sequences.
In PHP, [...\x80-\xFF]+ matches any bytes with the high bit set, which
by the particular properties of UTF-8 will match any sequence which
represents a Unicode character above U+007F.

In Javascript, regex matching is on UTF-16 Unicode code units, so we
don't have to do byte sequence matching (and cannot do so). So the
equivalent Javascript regex should use [...\u0080-\uFFFF]+, to match any
code unit above U+007F directly. (It also matches surrogate pairs, by
the particular properties of UTF-16, so any Unicode codepoint above
U+007F is matched).

Change-Id: I674b89f757b60331dd1cb23fd7ff8b18775012e9
2013-08-20 18:03:38 +00:00
jenkins-bot 34b143eb36 Merge "Increase line height in beta warning" 2013-08-20 17:30:42 +00:00
jenkins-bot 415de687ab Merge "Preserve selection when inserting references" 2013-08-20 17:24:43 +00:00