Bug 119322

Summary: javascript: urls should always be parsed synchronously
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: achristensen, ahmad.saleem792, ap, benjamin, cdumez, eric, karlcow, kling, koivisto, syoichi
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=283747

Ryosuke Niwa
Reported 2013-07-30 22:01:56 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/cfbec542d3a70df79e9238f15740f7f37ef5eda3 Removing the minimumLayoutDelay() threshold as part of: https://codereview.chromium.org/20140002/ revealed that we weren't always parsing javascript: urls synchronously. This change is a preventative fix to allow me to move forward with this change. In order to trigger this in current webkit, we'd need to parse a javascript: url which included a script which took more than .5 seconds to execute and then had a second script tag. We'd (incorrectly) yield between the two script tags while parsing the html result of the javascript: url. I also renamed the isLayoutTimer active method on Document to better reflect what it's actually used for. I also added a FIXME to WebViewImpl.
Attachments
Ahmad Saleem
Comment 1 2022-09-24 02:37:48 PDT
In Webkit -> Renamed isLayoutTimerActive to isLayoutPending: In Document.cpp: Just another renamed to bool: https://github.com/WebKit/WebKit/blob/f1bf39d41c844a64adcee49a7d83afe5d174697b/Source/WebCore/dom/Document.cpp#L3349 In Document.h: Another renamed: https://github.com/WebKit/WebKit/blob/552bfd33df1642d5d889a7d649cb7b91eafb27b7/Source/WebCore/dom/Document.h#L781 In DocumentParser.h: Webkit does not have pinToMainThread to add comment. In HTMLDocumentParser. Add asset based on "pinToMainThread" or equivalent here including FIXME and other bits: https://github.com/WebKit/WebKit/blob/03b5974b58684a094f81c69015126e8bcbfa15e7/Source/WebCore/html/parser/HTMLDocumentParser.cpp#L202 Not able to find XSS related anything here. In HTMLParserScheduler.cpp: Update here with new FIXME and renamed from above: https://github.com/WebKit/WebKit/blob/03b5974b58684a094f81c69015126e8bcbfa15e7/Source/WebCore/html/parser/HTMLParserScheduler.cpp#L94 Not able to find paint related change equivalent. In DocumentLoader.cpp & DocumentWriter.cpp: nothing changed in Blink patch except comments. In WebViewImpl.cpp - just new FIXME comment. ______ Is it something worth pursuing this time considering, it would add more FIXME? Appreciate if someone can add more context and details. Thanks!
Alexey Proskuryakov
Comment 2 2022-09-29 18:18:25 PDT
Merging a Blink fix seems impractical, but if the issue still reproduces, it seems substantial enough to track. But also, testing for this is going to be tricky.
Note You need to log in before you can comment on or make changes to this bug.