Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Issue 1883083002: Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope (Closed)

Created:
4 years, 8 months ago by hayato
Modified:
4 years, 6 months ago
Reviewers:
esprehn, rune
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope The difference between Node::containingTreeScope() and Node::treeScope() is that Node::containingTreeScope() asserts that the node is in a treeScope. Node::treeScope() does not. Replace some of the current usage of Node::treeScope() with Node::containingTreeScope() if containingTreeScope() is better to express their intention. This CL also introduces Element::adjustedFocusedElementInTreeScope() to optimize some code path where we can early exit if the element is not in a tree scope. BUG=602556 Committed: https://crrev.com/97a40b7bad083e7f9382a92e00adf1bd650db4a5 Cr-Commit-Position: refs/heads/master@{#397065}

Patch Set 1 #

Patch Set 2 : wip #

Total comments: 2

Patch Set 3 : rebased #

Total comments: 2

Patch Set 4 : Add Element::adjustedFocusElementinTreeScope #

Patch Set 5 : renamed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -17 lines) Patch
M third_party/WebKit/Source/core/css/ElementRuleCollector.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 4 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/LiveNodeListBase.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/SelectorQuery.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/FocusController.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 65 (29 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883083002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883083002/1
4 years, 8 months ago (2016-04-14 06:51:59 UTC) #2
hayato
wip
4 years, 8 months ago (2016-04-14 07:24:11 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883083002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883083002/20001
4 years, 8 months ago (2016-04-14 07:24:19 UTC) #10
hayato
Elliot, Rune, could you give me early feedback about this CL? It looks there are ...
4 years, 8 months ago (2016-04-14 07:29:58 UTC) #12
rune
I think I would prefer to have the DCHECK in treeScope() instead and add a ...
4 years, 8 months ago (2016-04-14 08:48:01 UTC) #18
esprehn
On 2016/04/14 at 08:48:01, rune wrote: > I think I would prefer to have the ...
4 years, 8 months ago (2016-04-14 10:19:12 UTC) #19
hayato
Thanks. My current plan is: - Introduce Node::rootTreeScope(). - Do not touch Node::treeScope(). Let it ...
4 years, 8 months ago (2016-04-14 10:25:33 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-14 10:26:50 UTC) #22
esprehn
I've been thinking about this from the bug and the reason we have document and ...
4 years, 8 months ago (2016-04-14 10:43:12 UTC) #23
esprehn
I've been thinking about this from the bug and the reason we have document and ...
4 years, 8 months ago (2016-04-14 10:43:13 UTC) #24
hayato
rebased
4 years, 8 months ago (2016-04-15 10:18:03 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883083002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883083002/40001
4 years, 8 months ago (2016-04-15 10:18:16 UTC) #27
hayato
I see. Thanks. Thus, the long time goal would be: 1). Document& Node::globalDocument() { return ...
4 years, 8 months ago (2016-04-15 10:29:00 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-15 11:53:24 UTC) #30
hayato
PTAL
4 years, 8 months ago (2016-04-19 06:20:09 UTC) #31
rune
lgtm, but please wait for esprehn.
4 years, 8 months ago (2016-04-19 07:36:29 UTC) #32
hayato
Elliott, could you take a look?
4 years, 8 months ago (2016-04-22 07:48:46 UTC) #33
esprehn
On 2016/04/22 at 07:48:46, hayato wrote: > Elliott, could you take a look? Yeah I'll ...
4 years, 8 months ago (2016-04-23 02:11:01 UTC) #34
esprehn
https://codereview.chromium.org/1883083002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1883083002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp#newcode2212 third_party/WebKit/Source/core/dom/Element.cpp:2212: if (isInTreeScope() && rootTreeScope().adjustedFocusedElement() == this) { Why do ...
4 years, 7 months ago (2016-04-27 07:52:23 UTC) #35
esprehn
I think this got tackled some other way? Do we still want to do this? ...
4 years, 7 months ago (2016-05-18 00:36:35 UTC) #36
hayato
On 2016/05/18 at 00:36:35, esprehn wrote: > I think this got tackled some other way? ...
4 years, 7 months ago (2016-05-18 02:27:09 UTC) #37
hayato
Add Element::adjustedFocusElementinTreeScope
4 years, 7 months ago (2016-05-23 05:21:25 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883083002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883083002/60001
4 years, 7 months ago (2016-05-23 05:21:33 UTC) #41
hayato
PTAL again. I have rebased this. https://codereview.chromium.org/1883083002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1883083002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp#newcode2212 third_party/WebKit/Source/core/dom/Element.cpp:2212: if (isInTreeScope() && ...
4 years, 7 months ago (2016-05-23 06:22:10 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/233626)
4 years, 7 months ago (2016-05-23 08:21:23 UTC) #48
hayato
Elliott, could you take a look?
4 years, 7 months ago (2016-05-26 04:54:03 UTC) #49
esprehn
Sure I'll look tomorrow, sorry for the delay. -- You received this message because you ...
4 years, 7 months ago (2016-05-26 05:00:31 UTC) #50
esprehn
Sure I'll look tomorrow, sorry for the delay. -- You received this message because you ...
4 years, 7 months ago (2016-05-26 05:00:32 UTC) #51
esprehn
Hmm, the name rootTreeScope is confusing since this isn't root of the tree of scopes, ...
4 years, 6 months ago (2016-05-31 19:40:33 UTC) #52
esprehn
lgtm
4 years, 6 months ago (2016-05-31 19:41:08 UTC) #53
hayato
On 2016/05/31 at 19:40:33, esprehn wrote: > Hmm, the name rootTreeScope is confusing since this ...
4 years, 6 months ago (2016-06-01 00:36:21 UTC) #54
hayato
renamed
4 years, 6 months ago (2016-06-01 01:10:04 UTC) #57
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883083002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883083002/80001
4 years, 6 months ago (2016-06-01 01:10:50 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883083002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883083002/80001
4 years, 6 months ago (2016-06-01 01:16:27 UTC) #62
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-01 05:32:42 UTC) #63
commit-bot: I haz the power
4 years, 6 months ago (2016-06-01 05:34:35 UTC) #65
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/97a40b7bad083e7f9382a92e00adf1bd650db4a5
Cr-Commit-Position: refs/heads/master@{#397065}

Powered by Google App Engine
This is Rietveld 408576698