Tags: wikimedia/mediawiki-services-parsoid
Tags
Make DOM data attribute loading fully lazy when counters are available * If the input pagebundle provides counters, there is no reason to eagerly walk the DOM to initialize annotation and about id counters. Effectively, prepareAndLoadDoc skips visitAndLoadDataAttributes altogether. * In practice, for OutputTransformPipeline passes in core, if the passes never need to inspect a node's data-mw or data-parsoid attributes, the node's data is left behind in the input pagebundle without being loaded at all. However, this now requires that storeRichAttributes properly transfers the node attributes either to the output pagebundle or to inline attributes (depending on the output DOM format) from the input pagebundle or inline attributes. In practice, for input and output formats relying on inline attributes, this becomes a noop. And, for input and output formats that use pagebundles, this requires a simple copy from the input pagebundle to the output pagebundle which is much cheaper than the full load-parse-serialize-store operation. But for PB -> inline or inline -> PB transfers, the benefits from lazy loading are lesser but still present. * Effectively, this patch eliminates the "load" part of the prepareAndLoadDoc method. This patch removes all unnecessary calls to visitAndLoadDataAttributes (and adjusted couple test files to account for the lazy loadng) At this time, there is one remaining call to this method in ContentUtils which we should revisit and see if it can be handled differently. * Updated existing lazy-loading unit tests to deal with additional laziness from this patch. * Added an additional test to test precedence of inline attributes over pagebundle attributes. * With these changes, all parser tests & unit tests pass. Bug: T409751 Co-Authored-by: C. Scott Ananian <cananian@wikimedia.org> Change-Id: I41e6d4e98e123f68e14ffe7198e5015b36b75a37
Revert "Fix a corner case in table attribute parsing" This reverts commit 582d2b2. Reason for revert: We want to tag a version of Parsoid to deploy as a backport and this patch hasn't been rt-tested but patches on top of it have been. So, temporarily reverting to get us a taggable version of Parsoid for deploy. Change-Id: I71c42a5c38e1cae2a2a310d07e81aa166df62be2
Sync parserTests with TMH and core No actual test changes, just updating hashes prior to the REL1_46 branch point. Change-Id: I7da91bdf076f3ac3b1e1c890fc24545d8392f29d
Sync parserTests with core Some newly-added parser tests related to core's implementation of LanguageConverter were added to the known failures list; these should probably not have had the `wt2wt` mode enabled in the first place. Change-Id: Id36d3ecc2490edc3901bc64597898842a3cf9e64
Update phpunit to 10.5.63 Bug: T423763 Change-Id: If20c736156625e5d57bb034b96cbe2e2d893f582
Skip performance test that crashes pcov so that coverage reports don'… …t fail Bug: T422865 Change-Id: If60713623348288f5cf89592390234e0a189b498
PreviousNext