Apply 'original size' to images

Trigger the proper event by using 'chooseItem' instead of 'selectItem'
in the MediaSizeWidget when changing size type.

Bug: 66863
Change-Id: I243cff5a2d56db48882c343a8bb91153edd96a43
Merge "Apply 'original size' to images"
Localisation updates from https://translatewiki.net.

Change-Id: Ic1b8c0b5ead9f1ffa86ab4962040a379fe857acd
Fix alien test data

Comments correctly said alienInline, but code had alienBlock.

Change-Id: I9c2220417cef2ce0a98be887ac76c50a9ab34680
Add toolbar menu labels to each group for consistency

As the mobile side of VisualEditor adds more features, we will want to expose an increasing
number of these standard function menus to the user. Additionally, a couple of the existing
groups (history and link) provide no current functionality for their labels to be shown, so
are included only for completeness (new labels for the history, paragraph formatting, block
structure and text styling groups; the 'insert' group retains its use of the existing label
in advance of a better solution being found.

To see these in action, visit the mobile demo (…/demos/ve/mobile.html#!/src/pages/h1.html),
and click on each of the toolbar groups to witness the majesty that is a semi-unstyled dump
which we need to improve. :-)

This also fixes the label for the text styling block in the commands help dialog to show up
as such, and not (confusingly) as "formatting", as a clash with the block immediately below
it is unfortunate and inconsistent.

Change-Id: Iec7b82b3e1382f269bf4c26f96d17c1d2ba1cb00
Move 'language' tool from the insert to the styling menu, like in VE-MW

Change-Id: I26befde69077c4f66b667f95641cedd820d59591
Widgetise demo menu

Also separate out menu functionality from the debug bar.

Change-Id: I04c1929c5279968ca3b0ec475681bd587ae58356
Add toolbar action section to SA demo with keyboard shortcuts tool

Change-Id: Ib1cf7b181c584c0cc147cd9807018f1893d71758
Localisation updates from https://translatewiki.net.

Change-Id: I2119e7cc4c79a97e64f56c7d74cfffe01bc711ab
builderloader: Omit value for boolean "disabled" attribute per HTML5

Follows-up 2d4b5572a.

Change-Id: I8ad51219de520366473a325aa029e35c6dd0299f
Prevent double counting of DM nodes in getNodeAndOffset

About grouped templates, for example, render multiple siblings
in the DOM, but still have a DM width of 2.

Bug: 67985
Change-Id: Id65e858b90bc7ab5a4d6ba715db30574691817b9
ve.ui.Toolbar: Optimise onSurfaceViewKeyUp performance

Follows-up 1b9c077b83.

* Only run expensive height(), offset(), etc. when the toolbar
  is floating.

* Set the property directly instead of using "animate(, 0)".

Change-Id: Ia17f5a3e701a58537df341b7aafd6273b649d4e8
Update OOjs UI to v0.1.0-pre (d2451ac748)

New changes:
0e94342 GridLayout: Hide panels with zero width or zero height
ef77c68 Localisation updates from https://translatewiki.net.
d3f26e6 cleanup: Use local var instead of bind() for inline functions
2c6958f Mobile-friendly styling for demos
a785a70 Add OO.ui.Error
b490fb6 [BREAKING CHANGE] Change how delay works for OO.ui.Process
c34ab93 [BREAKING CHANGE] Split part of OptionWidget into DecoratedOptionWidget
17f297e Add flag event to OO.ui.FlaggableElement
c4d3694 Add AccessKey API to OO.ui.ButtonedElement
f1fd828 Add API for tabIndex to OO.ui.ButtonedElement
bd3a0cf Add support for using arguments with OO.ui.deferMsg
38b8001 Add OO.ui.FormLayout
ac01705 [BREAKING CHANGE] Separate setup from setOutlineItem in OO.ui.PageLayout
1d46771 Make OO.ui.FieldLayout labels display inline-block when aligned top
a7e3798 Change color of text on frameless buttons
49f3438 Add href and target API to OO.ui.ButtonWidget
667d951 OptionWidget: Fix double icons/indicators
a8e7ede Add blur method to OO.ui.InputWidget
3ba36b9 [BREAKING CHANGE] The great and terrible dialog refactor
43f1541 Localisation updates from https://translatewiki.net.
f245c8d Localisation updates from https://translatewiki.net.
aa8a74b demos: Omit value for disabled attribute, use attr() instead of prop()
12d43c1 OptionWidget: Simplify code by using toggleClass instead of if/else
9690115 SelectWidget: Minor coding style clean up
912cbb7 Split dialog demos by theme
d2451ac ProcessDialog: "Other" action buttons should be framed.

Removals:
* ve.ui.WindowSet - using OO.ui.WindowManager instead
* ve.ui.Dialog - using OO.ui.ActionDialog or OO.ui.ProcessDialog instead
* ve.ui.Inspector -using ve.ui.FragmentInspector instead
* ve.ui.ActionDialog - using OO.ui.ProcessDialog instead

Additions:
* ve.ui.DesktopInspectorManager - ve.ui.DesktopContext uses it
* ve.ui.MobileWindowManager - ve.ui.MobileContext and ve.ui.MobileSurface
  use it
* ve.ui.WindowManager - ve.ui.DesktopInspectorManager and
  ve.ui.MobileWindowManager use it
* ve.ui.Overlay - ve.ui.Surface uses it
* ve.ui.FragmentInspector - all inspectors inherit from it
* ve.ui.NodeInspector - used in VisualEditor extension
* ve.ui.InsertionInspector - ve.ui.SpecialCharacterInspector inherits from
  it
* ve.ui.FragmentDialog - dialogs that edit content inherit from it

Modifications:
* ve.ui.ContextMenuWidget - renamed from ve.ui.ContextWidget
* ve.ui.LinkTargetInputWidget - validation and href getting methods added
* ve.ui.LanguageInputWidget - using ve.ui.Overlay and OO.ui.WindowManager
  instead of dummy surface
* ve.ui.ContextItemWidget
** Inheriting from OO.ui.DecoratedOptionWidget
** Made max-width a little wider to match medium inspector width
* ve.ui.Surface
** using ve.ui.Overlay instead of generic DIV elements
** OO.ui.WindowManager instead of ve.ui.WindowSet
** Replaced setupContext with createContext method
** Added overlay getter methods
* ve.ui.MobileSurface
** Using ve.ui.Overlay instead of generic DIV elements
** Replaced setupContext with createContext method
** Replaced hide/show methods with toggle method
* ve.ui.MobileContext - replaced hide/show methods with toggle method
* ve.ui.js - Registering OO.ui.MessageDialog in place of
  OO.ui.ConfirmationDialog which has been removed
* ve.ui.DesktopSurface
** Replaced setupContext with createContext method
** Cleaned up local variable names
* ve.ui.DesktopContext
** Significant rewrite including...
** Updates for changes in ve.ui.ContextMenuWidget
** Updates for changes to OO.ui.PopupWidget
** Replaced hide/show methods with toggle method
* ve.ui.DebugBar - Shortened label of log button to improve fit in dialog
* ve.ui.Context
** Generalized most of the behavior in ve.ui.DesktopContext
* ve.ui.SpecialCharacterInspector
** Using programatic instead of CSS width
** Using OO.ui.FormLayout instead of generic FORM element
** Inhering from ve.ui.InsertionInspector
* ve.ui.LinkInspector
** Added open button
** Using overlay from manager instead of one passed through config

General changes
* Always using .next in setup/ready process getters and .first in
  hold/teardown process getters

Change-Id: I779fe9b0dc3cc94357523ed9f3ad827c02db6c42
Localisation updates from https://translatewiki.net.

Change-Id: I30b974309cc4ae9fb831243b60c6ca7b723e2291
Update reference to ConfirmationDialog to use MessageDialog

Change-Id: I01ecd69c183dec4e87531d77233e1ff272c8ecb1
Merge "Update reference to ConfirmationDialog to use MessageDialog"
Make sure the document is focused when setting a selection

Without explicitly focusing the document (e.g. after coming back
off the paste target from a focusable node) it is possible for the
cursor to appear in the document, but for typing to happen in the
paste target.

Bug: 67432
Change-Id: I87c9c4fb08fa6c95dd26b8ab2da281333e9f3c16
Merge "Add toolbar action section to SA demo with keyboard shortcuts tool"
Merge "Fix alien test data"
Fixes to getRelativeOffset and getRelativeRange

Major refactor of getRelativeOffset/getRelativeRange functions.

* Skip over nested handlesOwnChildren nodes in getRelativeOffset by
  tracking depth instead of a boolean (as we do in ve.dm.Transaction).
* Ensure we never move backwards in getRelativeOffset (bug 67551)
* Fix behaviour around collapsing ranges with arrow keys
* Add many more test cases

Bug: 67551
Bug: 66604
Change-Id: Ic2da78b86e13cd51af058d884048d9549fc55abc