RESOLVED FIXED 162527
Deeply nested phrasing content is parsed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=162527
Summary Deeply nested phrasing content is parsed incorrectly
Sindre Aarsaether
Reported 2016-09-24 04:38:27 PDT
Example URL: http://codepen.io/somebee/pen/mAWBaq Steps to reproduce the problem: 1. Write 5 levels of nested phrasing content (the nested tags must be of the same type, but it happens for any phrasing type). <b><b><b><b><b>TEXT</b></b></b></b><i>TEXT</i></b> See that this is parsed as expected. 2. Add any attribute to the outermost node: <b title='top'><b><b><b><b>TEXT</b></b></b></b><i>TEXT</i></b> See that any children except the first will be parsed outside of the outermost node. Adding an attribute to a node should not make the html unwrap and restructure the fully valid html. It works in Firefox and IE. Chrome (all versions of Chrome/Chromium tested) has the same issue.
Attachments
Tiny html file showing the problem (367 bytes, text/html)
2016-09-24 04:39 PDT, Sindre Aarsaether
no flags
Safari 15.5 differs from other browsers (529.80 KB, image/png)
2022-07-30 15:40 PDT, Ahmad Saleem
no flags
Sindre Aarsaether
Comment 1 2016-09-24 04:39:23 PDT
Created attachment 289743 [details] Tiny html file showing the problem
Ahmad Saleem
Comment 2 2022-07-30 06:56:54 PDT
I am able to reproduce this issue in Safari 15.6 on macOS 12.5 based on attached test case (in attachments), for "Parsed incorrectly with title", it shows second "RED" in black text rather than in red color similar to other browsers (Chrome Canary 106 and Firefox Nightly 105). Just wanted to share updated test results. Thanks!
Ryosuke Niwa
Comment 3 2022-07-30 13:38:00 PDT
All browsers' behaviors match -> config changed.
Ahmad Saleem
Comment 4 2022-07-30 15:40:02 PDT
Created attachment 461315 [details] Safari 15.5 differs from other browsers rniwa@webkit.org - I think it is reproducible unless if this is inline with web-spec, if you see in attached screenshot, Safari 15.6 differs from other browsers. Please ignore my comment, if I am wrong. Just wanted show the difference in attached test case. Thanks!
Ryosuke Niwa
Comment 5 2022-07-30 17:09:00 PDT
Oops, sorry, I misread what you stated. Reopening.
Ryosuke Niwa
Comment 6 2022-07-31 02:33:57 PDT
This is a bug in the adoption agency algorithm. We need to merge this change: https://github.com/chromium/chromium/commit/69ad2d7d5eecfb79a8b5dc4d01b575926500ef08
Ryosuke Niwa
Comment 7 2022-07-31 03:08:05 PDT
EWS
Comment 8 2022-07-31 11:28:09 PDT
Committed 252979@main (67d7bd2e0aa2): <https://commits.webkit.org/252979@main> Reviewed commits have been landed. Closing PR #2885 and removing active labels.
Radar WebKit Bug Importer
Comment 9 2022-07-31 11:29:15 PDT
Note You need to log in before you can comment on or make changes to this bug.