New changes:
0ceafd5 Fix V8 deopt for ve.ce.BranchNode#onSplice
01d2d4b [BREAKING CHANGE] Store originalDomElements instead of htmlAttributes
96005a7 Localisation updates from https://translatewiki.net.
42e672e ve.ui.Toolbar: Don't call #updateToolState from #initialize
373562d Localisation updates from https://translatewiki.net.
Local changes:
Update for htmlAttributes going away
Change-Id: I576a1e5d5883b03d1fff6666926f80a5682a280f
<link> and <meta> tags are thrown away by the clipboard so make sure the
data-mw element is converted to a span.
Bug: T86401
Change-Id: Ia2869b9496ea5ce4f474e254bb4125f85152c7cf
Iff in clipboard mode:
* Set data-ve-no-generated-contents on the main element
regardless of whether we are using orignal DOM elements.
* Set data-ve-ignore on siblings, again, regardless or
where they came from.
Bug: T89658
Change-Id: I82ad60f0b90e0c6ce88c42737bd36d1a289bcf34
These are currently in page-specific mw.config. As these are
not related any page, they should be in the global export.
This is needed to have our tests (and code base) run error-free
without a MediaWiki page.
Bug: T89434
Change-Id: Ic42bcd14028772ff0c06e28c76ffaf156f8b985f
If data-mw.body.html is not set, search for the element
whose ID matches data-mw.body.id and use its contents.
.body.html is still used for new content: new references
use .body.html, and if a reference using .body.id is
changed, the changed HTML is output in .body.html.
Bug: T88650
Change-Id: I5d614927256d59a3ab20b0bd6e882b5cb8fcda20
* Set the src attribute only when the image is actually
visible in the search results.
* Display the thumbnail image we have from the search
results and then update with a larger one from the API.
* Request for more media results on a higher threshhold,
when the user views 2 rows above the last available
result.
* Correct the resizeToBoundingBox and simplify it to work
properly for a non-square bounding box regardless of
constraints.
Change-Id: If024b0335ce6a5d2d0eafdbfdfe1030dcaac3a75
To avoid triggering state thrashing in Sizzle
( https://github.com/jquery/sizzle/issues/311 )
Also account for the fact that missing attributes are returned
as undefined by jQuery but null by .getAttribute().
Bug: T87416
Change-Id: Ib3bc7971920c084568abb6ea0bd822d763b276f2
Add an info panel to the MediaDialog to show the user information
about the chosen file from the new extmetadata API.
Also, change the way results are viewed:
* Present the search results with their proper ratio.
* Use masonry fit for the search results.
* Change the resizeToBoundingBox method in ve.dm.MWImageNode to accept
a specific side constraint, either 'width' or 'height'. This is also
going to be useful for adding and calculating 'scale' considerations
that affects the image height.
* Add info panel with details from extmetadata including author, license,
date of upload and creation, etc.
* Get descriptions and data according to wiki language.
Bug: T78161
Bug: T74061
Change-Id: I7b4d019825aa89dd178665bd9492a07af15954ac
Aside from the confusion and differences between substr() and
substring() and IE8 bugs with substr(), substr() was removed from
the spec as of ECMAScript 5. It's been standardised in the
optional Annex B section of ES5.
Change-Id: I221ef6ae6956ce20dd9bb74510500f747d04c3b1
We possibly want to discourage this somehow but our current
functionality achieves this by doing an isolateAndUnwrap
which for a table is catastrophic.
Bug: 72990
Change-Id: I79f1348da20385dfec014afcac0fb5464580cf2f
This doesn't happen in real life (as resource is always set) but
it allows us to contruct these nodes from the factory with no data.
Change-Id: Iea146f5dc128ad9d0f36a79b6fe67d622767d46c
New changes:
a047e72 [BREAKING CHANGE] Create ve.dm.Focusable and store focusable flag there
Local changes:
* Add new ve.dm.FocusableNode mixin where required
Change-Id: Ie9ee2de05acfe3c4c62c4864e65bd20397d6a069
Make sure default dimensions are only set if we have the original
dimensions. Also fix a bug where image default dimensions were
calculated according to current width/height rather than those
of the original dimensions.
Bug: 68000
Change-Id: I8c3acc18b317f82c6b88966950e74b956936dda4
Make sure the image model can switch parameters when the image
source is switched, rather than having to instantiate a new
image model.
Also, when the image is changed, retain aspect ratio but make sure
to preserve the width of the previous image (unless the new image
is smaller)
Added 'resizeToBoundingBox' and 'scaleToThumbnailSize' static methods
in MWImageNode that return scaled dimensions based on the image
dimensions and the bounding box detals.
Depends on core change Idbb8b29db8e
Bug: 69450
Bug: 68000
Change-Id: I4327c86a9127f46da5522dc1197411fda757d5a4
So static methods are actally in the section marked 'Static methods',
before non-static methods, per our coding standards.
Change-Id: I17bea17a1409b02f263375c6434be872e4d239ba
Previously one could select over a link node and linkify the
selection, with tremendously funny results.
Change-Id: Ic5a2132b2d18280099a6024bc4ec2b1333eca98f
The image model should go by image attributes (whether it comes from
an existing node or a new one) and not a node.
Bug: 68242
Bug: 68000
Change-Id: I4cabd678157619331b3c47d3b44bc16a28fd7bd7
New changes:
65042de Fix alien test data
83dccbe Add toolbar menu labels to each group for consistency
2e40ef9 Move 'language' tool from the insert to the styling menu, like in VE-MW
6fb21b2 Add toolbar action section to SA demo with keyboard shortcuts tool
f3eb000 ve.ui.Toolbar: Optimise onSurfaceViewKeyUp performance
eb4e9eb Make sure the document is focused when setting a selection
48584d3 Fixes to getRelativeOffset and getRelativeRange
fcc427f [BREAKING CHANGE] Remove generatedContents argument from afterRender
825e4be Documentation fixes in test utils
dbbbe0b Unit tests for showSelection
1ba9234 Don't handle up/down on focusableNodes even if backwards
a667b87 Remove label from 'insert' menu, and instead use a large plus icon
88885b1 Localisation updates from https://translatewiki.net.
1f3b79f Initialize data first
18369b1 Add 'clone' and make 'getDimensionsFromValue' static in ve.dm.Scalable
92e6b7b Switch to 'custom' when MediaSizeWidget updates
d0cd87e Localisation updates from https://translatewiki.net.
1ee21ff Remove lies from documentation
164f07f Safely ignore requests to open unrecognized windows
Local changes:
Work on a cloned scalable when editing images
Make sure the image model handles a cloned copy of the node's
scalable object, which is then shared with the media size widget.
Bug: 67687
Change-Id: Ie3676b715f5bae3d83da03d667cef3a6a847e212
Depends on I468d4eb4 in core.
Uses various hacks to trick the test runner into thinking
an MW target is in use, when in fact we still use SA targets.
Change-Id: If4611307d5d7aaee4af84f86ef82faf9078043b6
New changes:
a53f101 Update OOjs UI to v0.1.0
1fa518b Update OOjs UI to v0.1.0-pre (15f4156bac)
257af53 Use ContextWidget instead of toolbar inside context menu
5f10e73 Follow-up Ia2076a42: Mark getDescription() as @inheritable for Annotation, Node
Local changes to adjust for the ContextWidget changes.
Change-Id: I47f68f5cf1b9583dab9bd0109fa6504481bdfc67
MWBlockExtensionNodes would duplicate their children in the output DOM:
they would appear once as restored from originalDomElements, and again
because the contents then got converted to linear model data and
that got converted back to DOM as well.
Bug: 66396
Change-Id: I4513ffc1cf3eb8726ac94252fe1526fac6d8bdf3
Previously they were always inline.
MWExtensionNode is now a mixin and classes which inherit it should
now inherit MWBlockExtensionNode or MWInlineExtensionNode.
Change-Id: I0ddcabeb63acdf852e252c41add5233c00723f4c
Update DM node constructors for I81c60d4a in VE core.
New changes:
2587549 [BREAKING CHANGE] Fix Node construction arguments
Change-Id: I8d4f37b631fe85a78c72407937477963ac49f87a
Make sure svg drawings on block images have the default size as
the wiki default, no matter their original set size.
Also took the opportunity to clarify the synchronization method
for scalable and image type in ve.dm.MWImageNode and call it when
the image model is loaded to make sure the details are always
synchronized before edit.
Followup to I682d832e456a501836f33ed1dfc7dbd78a4edf53
Bug: 62893
Change-Id: Ic47016d171634c532092067957cc2c3d431e9746
In getFilename(), decode URL encoding and replace the search
for 'File:' with a more standard ./ stripping regex.
The ./ regex came from generateContents) in the CE class;
made that code use getFilename() instead.
Also apply decodeURIComponent() to the result; but protect against
exceptions because it's a useless piece of garbage.
Bug: 65611
Change-Id: I7e81a8dc26d1c636c6571d96f43a394a53490587
Creating an MWImageModel that handles all image edit operations.
If the new attributes mean a change of image types from inline
to block or vice versa, the model will handle the creation and
insertion of the new node.
Change-Id: Ibe71bc8bd74e4ba5a024ac722432ccf0b8f65e71