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

Issue 192293002: Use new is*Element() helper functions in DOM code (Closed)

Created:
6 years, 9 months ago by Inactive
Modified:
6 years, 9 months ago
Reviewers:
adamk, eseidel
CC:
blink-reviews, webcomponents-bugzilla_chromium.org, sof, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, rwlbuis
Visibility:
Public.

Description

Use new is*Element() helper functions in DOM code Use new is*Element() helpers in DOM code. This makes the code clearer and simpler. Also use the new Traversal<*Element> API when suitable. R=eseidel, adamk BUG=346095 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168983

Patch Set 1 #

Total comments: 7

Patch Set 2 : Add is*Element(PassRefPtr) helper #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -116 lines) Patch
M Source/build/scripts/templates/ElementTypeHelpers.h.tmpl View 1 1 chunk +2 lines, -0 lines 2 comments Download
M Source/core/dom/ContainerNode.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 12 chunks +15 lines, -26 lines 0 comments Download
M Source/core/dom/DocumentOrderedMap.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/DocumentOrderedMap.cpp View 4 chunks +11 lines, -11 lines 0 comments Download
M Source/core/dom/Element.cpp View 7 chunks +17 lines, -17 lines 0 comments Download
M Source/core/dom/Node.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M Source/core/dom/NodeRenderStyle.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/Position.cpp View 1 7 chunks +11 lines, -10 lines 0 comments Download
M Source/core/dom/PositionIterator.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/dom/PresentationAttributeStyle.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/RenderTreeBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/ScriptLoader.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/dom/ShadowTreeStyleSheetCollection.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/dom/StyleElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/StyleEngine.cpp View 5 chunks +9 lines, -8 lines 0 comments Download
M Source/core/dom/StyleSheetCandidate.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/dom/Text.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/dom/TreeScopeStyleSheetCollection.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/dom/VisitedLinkState.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/shadow/ComposedTreeWalker.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/shadow/ElementShadow.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/dom/shadow/InsertionPoint.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/dom/shadow/ShadowRootRareData.h View 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Inactive
6 years, 9 months ago (2014-03-09 21:25:22 UTC) #1
eseidel
lgtm https://codereview.chromium.org/192293002/diff/1/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/192293002/diff/1/Source/core/dom/ContainerNode.cpp#newcode271 Source/core/dom/ContainerNode.cpp:271: ASSERT(!isHTMLTemplateElement(this)); This makes so much more sense! Now ...
6 years, 9 months ago (2014-03-10 18:17:00 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/192293002/1
6 years, 9 months ago (2014-03-10 18:17:36 UTC) #3
Inactive
https://codereview.chromium.org/192293002/diff/1/Source/core/dom/ScriptLoader.cpp File Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/192293002/diff/1/Source/core/dom/ScriptLoader.cpp#newcode285 Source/core/dom/ScriptLoader.cpp:285: return isHTMLScriptElement(*element); On 2014/03/10 18:17:01, eseidel wrote: > Won't ...
6 years, 9 months ago (2014-03-10 18:21:54 UTC) #4
adamk
https://codereview.chromium.org/192293002/diff/1/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl File Source/build/scripts/templates/ElementTypeHelpers.h.tmpl (right): https://codereview.chromium.org/192293002/diff/1/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl#newcode30 Source/build/scripts/templates/ElementTypeHelpers.h.tmpl:30: template<typename T> inline bool is{{tag.interface}}(const RefPtr<T>& node) { return ...
6 years, 9 months ago (2014-03-10 18:23:23 UTC) #5
Inactive
The CQ bit was unchecked by ch.dumez@samsung.com
6 years, 9 months ago (2014-03-10 18:26:08 UTC) #6
Inactive
https://codereview.chromium.org/192293002/diff/1/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl File Source/build/scripts/templates/ElementTypeHelpers.h.tmpl (right): https://codereview.chromium.org/192293002/diff/1/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl#newcode30 Source/build/scripts/templates/ElementTypeHelpers.h.tmpl:30: template<typename T> inline bool is{{tag.interface}}(const RefPtr<T>& node) { return ...
6 years, 9 months ago (2014-03-10 18:28:29 UTC) #7
Inactive
Please take another look https://codereview.chromium.org/192293002/diff/20001/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl File Source/build/scripts/templates/ElementTypeHelpers.h.tmpl (right): https://codereview.chromium.org/192293002/diff/20001/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl#newcode30 Source/build/scripts/templates/ElementTypeHelpers.h.tmpl:30: template<typename T> inline bool is{{tag.interface}}(const ...
6 years, 9 months ago (2014-03-10 21:42:16 UTC) #8
Inactive
Adamk, does the latest patch look good to you as well?
6 years, 9 months ago (2014-03-11 21:32:12 UTC) #9
adamk
https://codereview.chromium.org/192293002/diff/1/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/192293002/diff/1/Source/core/dom/Element.cpp#newcode2990 Source/core/dom/Element.cpp:2990: ASSERT(isHTMLLabelElement(this)); On 2014/03/10 18:23:24, adamk wrote: > Why do ...
6 years, 9 months ago (2014-03-11 21:40:26 UTC) #10
Inactive
On 2014/03/11 21:40:26, adamk wrote: > https://codereview.chromium.org/192293002/diff/1/Source/core/dom/Element.cpp > File Source/core/dom/Element.cpp (right): > > https://codereview.chromium.org/192293002/diff/1/Source/core/dom/Element.cpp#newcode2990 > ...
6 years, 9 months ago (2014-03-11 22:08:26 UTC) #11
adamk
On Tue, Mar 11, 2014 at 3:08 PM, <ch.dumez@samsung.com> wrote: > On 2014/03/11 21:40:26, adamk ...
6 years, 9 months ago (2014-03-11 22:40:07 UTC) #12
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 9 months ago (2014-03-11 22:40:42 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/192293002/20001
6 years, 9 months ago (2014-03-11 22:40:49 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-12 02:32:28 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink
6 years, 9 months ago (2014-03-12 02:32:28 UTC) #16
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 9 months ago (2014-03-12 02:34:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/192293002/20001
6 years, 9 months ago (2014-03-12 02:34:49 UTC) #18
commit-bot: I haz the power
6 years, 9 months ago (2014-03-12 06:34:53 UTC) #19
Message was sent while issue was closed.
Change committed as 168983

Powered by Google App Engine
This is Rietveld 408576698