* The previously failing Parsoid test now passes.
Bug: T311523
Depends-On: Id7d9e82ee4ff20a79ba1a5b2433fa29bc5f76e68
Change-Id: I03115b91fd781b72f0bf2c66cb6c18963a772dab
* Parsoid currently fails this and the failing test has been
added to the known failure list. A follow-up patch will fix it.
Change-Id: Ic788340ec073b401e3e921339250a2678ea038da
Also set @phan-var to handle nullable parentNode
DOMNode::$parentNode is documented as nullable in php8.1
DOMElement::getAttribute is documented to return string in php8.1
Reported by phan running under php8.1
Change-Id: Ia4abd7bf03bc52d7d4ba2c69738bb90c55d01a2b
These will be updated in I84296d802382131b47fda097878df43e2f6f46ff
but we need to break a cyclic dependency.
Change-Id: I1842447492361fd9eb870b2573eaa50c51cf24fc
* This replaces the standalone tests that we ran for the Parsoid
implementation while it lived in the Parsoid repo.
* There is no benefit running html2wt (and hence html2html) tests
at this point since html2wt simply uses data-mw information.
Change-Id: I9435267f654eb07bcb1b5733986667a8617f1fbd
* There have been no changes to the code except for:
- class is now called ParsoidImageMap with a matching file name
- the namespace is changed to MediaWiki\Extension\ImageMap.
- adding phan directives to deal with Parsoid's DOM proxies
which phan doesn't seem to be see here.
* Parsoid's SiteConfig extension registration code simply overwrites
the extConfig array for a tag name. So, keeping the config and
implementation identical ensures that no matter which version of
code is registered (based on load order), we get the same behavior.
* Once this rolls out on the next train, we can remove the code
from Parsoid.
* Future patches might refactor the two implementations to extract
common functionality or merge code into a single file.
Change-Id: I6cffa4420d2daa70174fa926d5c7a4d983792969
The approach taken here is the same as in core for magnify links on
thumbs in Id46d1b2ab1af3baebff13e10f1485f3cfd9a4b37
The gist is that resource attributes are added on the mw-file-element so
that the necessary url is present in the html. A class is also added to
the wrapper element that designates where the link should be positioned.
Finally, a script adds the link which styles in appropriately.
Bug: T329364
Depends-On: Id46d1b2ab1af3baebff13e10f1485f3cfd9a4b37
Change-Id: I20130fd39135dfd5074590ee9c2b6e01693384e4
This was added in Ic0169d3914c5ce442b063f4bbbb6493966dbb302 and it
looks wrong on a few levels: the format isn't captured, and only
mw:File is emitted now.
Change-Id: I5aff7b53348696c485ef5683f6aab7aaafac4973
`composer update --no-interactive` errors out if this flag is not set.
Setting it to true, as that was the status quo before Composer 2.2.
Bug: T298283
Change-Id: Ib087b5e85d6910f17bc622b0b7d7e67cd5327d9f
The insertBefore() and appendChild() methods return their first
argument, but Phan only knows that they return a DOMNode, even though
we passed in a DOMElement. Rearrange slightly to avoid this pattern.
Change-Id: I04c58458e1ba0d728374ead756afb6facf970766