Since all transclusion nodes can be interacted with (including the
'hidden' ones,) there is no need for MWTransclusionMetaNodes.
Change-Id: I23d37e3d82029b7475ec68ebb04883c7e05370cc
By removing from and re-inserting into the InternalList when the right
attributes change, rather than trying to hack it into the model's
updateInternalItem (which won't get run on undo).
Bug: T71119
Change-Id: Iaf7a3127576b94666e05691902d2782394d24afb
Also, fix @returns comments (should be @return) and remove unnecessary
@method comments from the documentation.
Change-Id: Icd303626ac745c7ab5bff164f9b8cac276de1523
We unconditionally retrieved originalHtml from itemNode,
even if there was no data-mw.body.id, so as long as
the reference itself wasn't edited, we would never overwrite
data-mw. This meant that if the <ref> with the contents
was deleted, the contents wouldn't be transfered to the
first <ref> tag with that name like they're supposed to be.
The solution is to only look at originalHtml from itemNode
if data-mw.body.id is set.
Change-Id: Ib87491b6fa6a77d62384158f8e8f7dcc2a36c23a
For the masonry view, the result widget resizes itself according to
the rows and other images in the row. Up until now the resize was
a bit buggy, occasionally missing height/width values. This is
mostly due to rounding errors, but also due to a small double
calculation that is now fixed with this code.
Change-Id: If18adc5280e4bdbb9174b7c7e6e4eadf3c1ab26d
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