The bug is easiest to reproduce with `[[File:Example.jpg|link=]]`,
but it also affected video embeds.
jQuery appendTo() method returns the set of inserted elements.
Because `this.$element` is undefined at this point, the `<img>`
was not actually being inserted anywhere, and an empty set was
returned, causing MWInlineImageNode to have no CE rendering.
This was not an issue prior to c4f93b14, because `this.$element`
was being defined by the parent constructor (OO.ui.Element)
We don't actually want to insert it anywhere, this appendTo()
call was a remnant of wrapping code removed in a22aeafc.
Bug: T191406
Change-Id: If1dbf9fef0e0ac9debfdb3049ebcccac70948515
Removing `0.8em` VE special base `font-size` for UI as we're unifying
OOUI interfaces to `14px` equals to `0.875em` at user agent default size.
Bug: T97631
Depends-on: I693d168d2ccf2babbcfe8952af3e1c262aa97773
Change-Id: I84edeec38ecfb90f5d53199f3b26fc3f83ab0611
Overriding ve.ce.BranchNode#onSplice seems pretty scary, some bug
could cause two captions to be inserted and it wouldn't even be
visible in the editor.
Instead, allow normal splice handling to happen when the caption is
added/removed, and only override the position where it is inserted
(to account for the image node this.$a).
The caption node is already removed from DM/CE if the image type is
changed to one that doesn't have captions, and even if that failed it
is also hidden in CSS, so we don't need to handle this.
Change-Id: I54f52b288118d692708311512dd674cc85d5d9e3
5f6664e2 in VE core changed the specificity for some of the rules this
expected to override.
Bug: T189267
Change-Id: I510e151cc431c321d1d45fde9030d56f059d84ab
After change 89aecd54ba (2014),
there is no 'border' value for the 'type' attribute, instead
there is a 'borderImage' attribute only present when 'type'
is 'none' or 'frameless'.
Change-Id: Id87ba09b647f5f69b1c9350209e66acdea2c9d69
MWBlockImageNode already can't have any slugs:
* It can't have inline slugs, because it can't directly contain
content (`this.canHaveChildrenNotContent()` is true)
* It can't have block slugs, because it can't contain paragraphs
(`this.isAllowedChildNodeType( 'paragraph' )` is false).
(The only thing it can contain is a mwImageCaption.)
Change-Id: Ice6505da2356f004ef048ed0b1a9e03d08af02d1
For galleries with 0 items, this would previously return an empty
jQuery collection, which caused funny rendering issues later.
Bug: T75230
Change-Id: Ia68e4f1b74b5ec494fa3d86f0b792f69eadb02fb
We emit <span id="..." typeof="mw:FallbackId"></span> inside headings
when necessary to provide backward compatibility with pre-HTML5
section ids. These are mostly harmless inside VE --- they become hidden
alienated nodes, which are then safely ignored by Parsoid during html2wt
even if they manage to migrate outside of a heading --- but it's a
little safer to strip them.
Change-Id: I07d0fcf54427ab02d4930cff183d3e5579a99306
* Look inside first child for autoGenerated (as reflists can be wrapped)
* Unwrap Parsoid sections
* Discard leading and trailing whitespace
Bug: T179618
Change-Id: Ib9ead28173360f0f1d5a4dc66c33a75d70ef34b3
Override ve.ce.FocusableNode#hasRendering with a model-based test to
improve efficiency and avoid some unnecessary DOM measurements.
Change-Id: Ice7aebcc2f30dc73ef049a6ed0d4a0cffe86d8e2
Also:
* Disconnect change event on this.input, which doesn't
get destroyed on teardown
* Add padding between attributes and this.input
* Assume the alien extensions can have a rendering when
their body is empty.
Bug: T177181
Bug: T177183
Change-Id: I2e59f8195b255f33f91901213c92ea14793635b4
The default value of target#pageName is wgRelevantPageName
but other targets my override this, or change it dynamically
(e.g. ContentTranslation).
Also remove duplicate setter of pageName in mw.ArticleTarget,
already set in mw.Target.
Change-Id: Iebd1def1d4142978a673afec584a0b663644d176
Avoid confusion by using `twoway` instead of `bidir`, which could be
confused with the Unicode bidirectional layout algorithm.
Depends-On: Ib59dff22e64f235e30778a5a5b3e525e4fc7fdd3
Change-Id: I7efb35245d48125b167dc0f0ef8f12aa0fff94e5
Implement special node types for language variant markup, so that they
display appropriately based on the currently-selected variant.
(Parsoid uses empty elements to represent this markup, so without this
patch anything in -{ ... }- is alienated and disappears.)
A follow-up patch will implement context items and inspectors to
allow editing these nodes. This patch is basic "read-only" support.
Depends on I4fcdebc2290ec35ba188f4c2e69d578791fbcd67 in Parsoid to
generate the appropriate markup, but this patch is safe to merge
independently.
Bug: T49411
Change-Id: Ie11e9301d2513bfe4a36036481cee9a047f46d37
This icon is now added by Parsoid content CSS.
Bug: T160960
Depends-On: Id66f09c54103854ccbaa54a03e7c62890b67cba9
Change-Id: I8d76d759641b091c1821ff658b1201ca625fd146
Remove config option `multiline` and change to MultilineTextInputWidget as
appropriate.
Bug: T169272
Change-Id: I45565f01de76a88d64d7b0691d1e7279354f375d