Last modified: 2013-08-28 21:37:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55284, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53284 - Update markTreeBuilderFixups pass to work without relying on metas being unfostered out of tables
Update markTreeBuilderFixups pass to work without relying on metas being unfo...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
DOM (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Arlo Breault
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-23 22:37 UTC by ssastry
Modified: 2013-08-28 21:37 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description ssastry 2013-08-23 22:37:33 UTC
markTreeBuilderFixups analyzes the DOM and tries to find opening and closing tags added automatically by the tree builder (where they didn't exist in the token stream) and unbalanced closing tags that got deleted (where they were present in the token stream).

To do this, it adds shadow meta tags following opening/closing tags in the HTML token stream fed into the HTML tree builder and sees if the shadow meta has a corresponding tag in the DOM or if a tag is missing its shadow for its analysis.  However, this analysis requires the shadows to be around at the same place where they were inserted in the HTML token stream.

Foster-parenting complicates this issue since the shadow metas can be hoisted out of the table which is the reason why we've hacked the HTML tree builder to not foster metas.

But, it might be possible to do the analysis without relying on shadow-meta position.  For example, by assigning ids to tags and associating that id with the shadow-meta might work (or not since tree builder might clone inserted tags).  Or maybe the position can be inferred from the position in the foster box.  Not sure.  This is the problem that needs to be solved.  Once solved satisfactorily, our fostering hack in the HTML5 library can be removed.

A lot of wt2html and wt2wt results crucially rely on this information, so parser tests should accurately tell you what is working or not -- you can test it by turning off the markTreeBuilderFixups pass and see what happens.
Comment 1 Gabriel Wicke 2013-08-23 23:31:52 UTC
In the dsr calculation, we'll also need to skip over all fostered content including fostered meta end markers. Those should still be stripped from fostered content.
Comment 2 Gerrit Notification Bot 2013-08-28 04:52:18 UTC
Change 81455 had a related patch set uploaded by Arlolra:
Remove hack from tree builder to not foster metas.

https://gerrit.wikimedia.org/r/81455
Comment 3 Gerrit Notification Bot 2013-08-28 21:35:59 UTC
Change 81455 merged by jenkins-bot:
Remove hack from tree builder to not foster metas.

https://gerrit.wikimedia.org/r/81455

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links