commit | 2d1846bed03be552223791562288aea46c7c0c8a | [log] [tgz] |
---|---|---|
author | arthursonzogni <arthursonzogni@chromium.org> | Mon May 28 12:28:02 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon May 28 12:28:02 2018 |
tree | 5dfa8aabc2e25b0d1f8f17594ed6c357577b15b0 | |
parent | ce436965701017f4a122c9ba209805415dedd3bd [diff] |
Ensure CSS :target is set before calling the load event. I am working on https://crbug.com/831155. It causes the frame to commit a navigation more quickly. As a result, some tests that are relying on how things are scheduled in blink are failling. This CL makes sure at least two WPT tests keep working: * external/wpt/dom/nodes/Element-matches.html * external/wpt/dom/nodes/Element-webkitMatchesSelector.html What happens in theses tests: In the frame.load event, document.querySelector(":target") is used. When an URL has an anchor, like in http://example.com#anchor, it returns the element with the "anchor" ID. The problem is that blink::Document::SetCSSTarget(Element*) may currently be called after the 'load' event is executed. The solution is simply to exchange two lines: 1) The one that will maybe send the 'load' event. frame_->GetDocument()->CheckCompleted(); 2) The one that will call Document::SetCSSTarget() ProcessFragment([...]) This CL is similar to: https://chromium-review.googlesource.com/c/chromium/src/+/1042191 It is the same solutioa to a different problem. This test is disabled because of http://crbug.com/843192 * svg/animations/viewspec-checkaspectparams.html Bug: 831155, 843523, 843192 Change-Id: I8ecedd212d3ce30d252ec9c1b1f22214f7bc012a Reviewed-on: https://chromium-review.googlesource.com/1057507 Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#562235}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .