WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
8615
Parser should re-parent nodes when their parents are removed from the DOM during parsing
https://bugs.webkit.org/show_bug.cgi?id=8615
Summary
Parser should re-parent nodes when their parents are removed from the DOM dur...
Geoffrey Garen
Reported
2006-04-26 15:34:34 PDT
Safari fails this test:
http://www.hixie.ch/tests/adhoc/html/parsing/error-handling/034.html
It used to crash. Though we've fixed this particular crash with a local NULL check, Hyatt says that he can imagine many others. We need a robust solution that will: (1) fix all possible crashes like this; (2) actually pass the test.
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2006-04-26 18:41:56 PDT
I believe we've fixed all the crashes like this. I searched for all places in the parser that was using parentNode(). The normal DOM/RenderTrees should be safe, because the subtree is fully detached. A better solution wouuld be to have a function on the parser which coudl be called at specific times (after a <script> tag for instance) which would walk down the node stack, checking of they all still had parents, and if not pop all the way back to one which was still in the tree, setting that one as current. I chose not to make that change after talking with Maciej at some length. We felt that such a change could be very risky for the branch. We could reconsider something similar for TOT. Be aware that one script could modify another documents tree mid/parse, so there might need to be checks in other places as well.
Geoffrey Garen
Comment 2
2006-04-27 09:43:02 PDT
Are you saying that you landed the original change on the branch? If so, we need to make a note somewhere to land the fix for the regression it caused.
Ahmad Saleem
Comment 3
2022-07-19 10:21:40 PDT
I am not able to reproduce this bug based on the attached test case in URL / in Description and it shows "PASS" (Without any whitespaces) on Safari 15.5 using macOS 12.4 and it matches with other browsers (Chrome Canary 105 and Firefox Nightly 104). I think it is fixed along the way and can be marked as "RESOLVED CONFIGURATION CHANGED". If I am testing incorrectly, please retest accordingly. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug