Page MenuHomePhabricator

Integrate the DOM library with Zest
Closed, ResolvedPublic

Description

Zest/PHP is a CSS selector engine that Parsoid uses to implement querySelector and related queries to work around bugs / shortcomings in the native PHP-DOM implementation.

Domino/JS also uses zest/JS to implement querySelector.

Zest/PHP should be integrated to Dodo in the same way it is integrated with Domino to implement these DOM methods with adequate performance. Parsoid should then use the Dodo versions of these methods instead of directly calling Zest/PHP.

Again, this may require refactoring Zest to allow it to work with an arbitrary DOM library (see T271728: Migration strategy from DOMDocument to Dodo). Some of the performance hacks in Zest use the PHP xpath library, and might not work without libxml; these need to be benchmarked for performance.

Event Timeline

ssastry triaged this task as Medium priority.Dec 8 2020, 8:58 PM
ssastry created this task.
cscott closed this task as Resolved.EditedJun 11 2021, 9:12 PM
cscott claimed this task.
cscott added a subscriber: cscott.

Implemented in 2621a6a930c813f863ff304142be85c725f7b617 and related patches, although there may be bugs & performance work remaining (which will be opened as separate tasks).