This is a bit of an abuse of the originalDomElementsHash property.
In future we could add a 'uniqueId' attribute, but this would need
to be ignored in a few places in core.
Bug: T299378
Change-Id: I7d1eb362aeb74ba93f5225330226a95535746b92
In Ifb0ba3caf8d we removed this reference equality check and replaced
it with a deep object comparison, however due to the fact that
hashes for MWReferenceNodes were simplified in I8c26686d7b to
improve visual diffs, this resulted in a overly simplified comparison
that couldn't distinguish references with the same "name".
Instead do a deep object comparions of the standard node hash object.
Tests added in Ia0bbd40528 assert that this doesn't result in the
regression that caused T296044.
Bug: T296086
Change-Id: I7b37fb54e14bfe28a07f722a2c45fd4e4a2d44f2
Previously we checked the elements were reference-equal
which is fragile and breaks when linear data freezing is
enabled in debug mode.
Change-Id: Ifb0ba3caf8d3e5a67c9694358cac12cc412fe723
This means that all reference nodes are treated as comparable
in the diff (provided they are in the same group) so will
not show up in the article diff if their index changes.
Changes to the reference list are already handled separately
by the visual diff.
Bug: T170235
Change-Id: I8c26686d7b2fe3bf91af7d4dcab1caf3247dbe47
* Add it to CE HTML, for compatibility with site styles.
* Add it to DM HTML of newly created references only. Existing
references just use whatever classes we got from Parsoid, to avoid
unnecessary DOM changes and dirty diffs.
Bug: T265930
Depends-On: I61a2132f3876e2d9567d985358f51eb51c479813
Change-Id: I9d6856f03071c09617b8ae7db938135a3e30fe8e
If a ref node is highlighted as changed because its index
has changed (e.g. because an earlier reference was inserted
or removed), describe this more elegantly.
Bug: T170235
Bug: T171377
Change-Id: I2513bb82099a92529516e4e217e61a2d0a2dd43b
Recent changes to setRoot in ve core (719f8c667) cause unroot to occur at a
point we weren't expecting, when adding a new reference.
Bug: T163267
Change-Id: If02ea08bb8b6db3be41d51ab44ce2a74cfe07914
This code has been developed over three years now in the repo of MediaWiki's
integration of VisualEditor. It has grown and developed significantly during
that time, but now is pretty stable. A number of hacks inside the MediaWiki-
VisualEditor code base have been used to prevent this code from being loaded
on wikis where the Cite extension is not deployed, but this state of affairs
is and always was meant to be temporary.
This code is under the MIT licence which is a tad messy, but not impossible.
It's clearly labelled as such. The list of authors has been updated to take
into account the influx of new functionality.
Bug: T41621
Bug: T104928
Change-Id: I39936ed83d5a60471a0a75da753f498e80aef234