* Looks for heading IDs matching "h-<heading text>-%" that once
existed on the target page.
* For such IDs, finds where those items currently exist,
presumably in an archive.
Pros:
* Doesn't need to know anything about the local wiki's archiving
conventions, so can be deployed universally.
Cons:
* ID conflicts will return matches in unrelated archives, e.g.
MassMessages.
Bug: T349653
Change-Id: Ie94efd0503e9f4689d3421babe445f9f4e2b4fb7
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Iaf161106c323461929abe9b8a021bbb3e34c4ae7
* The :first-child pseudo-selector to suppress top border of the first
div.ext-discussiontools-init-section ends up suppressing top borders
of all these divs since they are the first child of a <section> tag
in Parsoid's HTML.
Add `.mw-parser-output >` to these selectors, so that they don't apply
when <section> wrappers are present in Parsoid's HTML.
* Re-implement the logic for suppressing top border with new selectors
that work correctly with Parsoid's <section> wrappers.
Note that one of the cases requires using the :has() selector, which
is not supported by all browsers yet. This should not be a big deal
in practice, as that case should be rare on Wikimedia projects.
* This can be reverted if T333031 decides to strip <section> tags
from Parsoid's read view HTML.
Bug: T333031
Bug: T341010
Change-Id: If513c90033e9a77c8885b3b1c937e016064cc5ba
(split off from I5ab9d3373a6911c1456c30d844b66576b278a1b5)
Bug: T13555
Depends-On: I44587461582d648b56ef0c9c7ae0c322895c69c2
Change-Id: Ia32d3b3ac0de2f17401fc1a26c1fe451f273c688
This might be a matter of personal preference. Not sure if it's
worth it. Both is well readable. On the other hand, the method
exists. Why not use it?
Change-Id: Id66fc6c888db6ae1cf28e60a51f90d9ae2cdb6ee
This reverts commit 7aaaf51dfd.
Reason for revert: This is not right and doesn't work either.
See T351461#9358034 for why this strategy will not work right now.
We need a different strategy to prevent duplicate transforms if
they continue.
Change-Id: I97efee9197359ecdccdf89a0be850a707a11cc98
* getText() could be called multiple times on a ParserCache object
which would fire the ParserOutputPostCacheTransform handler
multiple times.
But, I could not track down how this could happen right now.
* As a separate issue, while conceptually there are no restrictions
against calling getText() multiple times, there is a semantics and
performance issue if that did actually happen. getText() does a
bunch of transformations and makes no effort to avoid duplicate
work. It will accumulate more transformations over time via the
OutputTranform pipeline and it is preferable for getText() and/or
the OutputTransform pipeline to guarantee semantics where the
pipeline won't be run multiple times on the same content. That will
free both hook handlers (like this) and the transforms themselves
to avoid checks as in this patch.
This patch should be reverted once such a change is made to core.
Bug: T351461
Change-Id: If5dfa0954e3fd2b7dbea1ed29b475be07f0f3986
This was being overridden by a later rule that only affected reply
buttons on mobile.
Bug: T351542
Change-Id: Iad2f6b703827cccf46ad5909d11fe3912d7023d5