Bug 142703

Summary: Use filterRootId in SelectorQuery even if CSS JIT is not enabled
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, benjamin, commit-queue, esprehn+autocc, kangil.han, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 142826    
Attachments:
Description Flags
Patch
none
Patch
none
Patch benjamin: review+

Yusuke Suzuki
Reported 2015-03-14 18:01:49 PDT
Use filterRootId in SelectorQuery even if CSS JIT is not enabled
Attachments
Patch (7.85 KB, patch)
2015-03-14 20:11 PDT, Yusuke Suzuki
no flags
Patch (8.02 KB, patch)
2015-03-14 20:18 PDT, Yusuke Suzuki
no flags
Patch (1.92 KB, patch)
2015-03-18 19:57 PDT, Yusuke Suzuki
benjamin: review+
Yusuke Suzuki
Comment 1 2015-03-14 20:11:54 PDT
Yusuke Suzuki
Comment 2 2015-03-14 20:18:51 PDT
Benjamin Poulain
Comment 3 2015-03-15 14:54:13 PDT
Comment on attachment 248662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248662&action=review I guess that could be useful when the JIT is disabled. > Source/WebCore/ChangeLog:16 > + - fast/selectors/filter-root-node-with-selector-contains-adjacents.html > + - fast/selectors/querySelector-id-filtering.html > + - fast/selectors/querySelector-scope-filtered-root.html If that's not already covered, it would be good to add tests for: -Failures on selectorForIdLookup()'s rootNode.inDocument() (Element.matches() on a detached element). -Failures on selectorForIdLookup()'s rootNode.document().inQuirksMode(). -Tests for CompilableSingleWithRootFilter and CompilableSingle. with cases that compiles with the CSS JIT, and cases that fail to compile. > Source/WebCore/dom/SelectorQuery.cpp:535 > + > + Two blank lines here.
Yusuke Suzuki
Comment 4 2015-03-16 20:43:53 PDT
Comment on attachment 248662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248662&action=review Thank you for your review! >> Source/WebCore/ChangeLog:16 >> + - fast/selectors/querySelector-scope-filtered-root.html > > If that's not already covered, it would be good to add tests for: > -Failures on selectorForIdLookup()'s rootNode.inDocument() (Element.matches() on a detached element). > -Failures on selectorForIdLookup()'s rootNode.document().inQuirksMode(). > -Tests for CompilableSingleWithRootFilter and CompilableSingle. > with cases that compiles with the CSS JIT, and cases that fail to compile. Great! I'll add them. >> Source/WebCore/dom/SelectorQuery.cpp:535 >> + > > Two blank lines here. Oops, thank you!
Yusuke Suzuki
Comment 5 2015-03-18 10:31:09 PDT
http://trac.webkit.org/changeset/181699 Landed with tests. Accidentally webkit-patch crashed, I've closed this issue manually.
Alexey Proskuryakov
Comment 6 2015-03-18 12:10:10 PDT
This broke the build with some compilers, because it doesn't make sense to FALLTHROUGH after an ASSERT. Tim made a temporary fix in http://trac.webkit.org/changeset/181706, please fix this properly.
Yusuke Suzuki
Comment 7 2015-03-18 18:57:30 PDT
(In reply to comment #6) > This broke the build with some compilers, because it doesn't make sense to > FALLTHROUGH after an ASSERT. > > Tim made a temporary fix in http://trac.webkit.org/changeset/181706, please > fix this properly. Thank you! I'll fix it soon.
Yusuke Suzuki
Comment 8 2015-03-18 19:09:59 PDT
OK, I've found that, when !ENABLE(CSS_SELECTOR_JIT) and --debug, both FALLTHROUGH and ASSERT_NOT_REACHED are materialized and raise this compile error. Here, ASSERT_NOT_REACHED is correct because this CompiledSingle and CompiledSingleWithRootFilter is not set when !ENABLE(CSS_SELECTOR_JIT). So I'll fix it by dropping this FALLTHROUGH in !ENABLE(CSS_SELECTOR_JIT) build.
Yusuke Suzuki
Comment 9 2015-03-18 19:57:29 PDT
Yusuke Suzuki
Comment 10 2015-03-18 21:06:32 PDT
Note You need to log in before you can comment on or make changes to this bug.