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

Issue 198453003: Use new is*Element() helper functions more in HTML code (Closed)

Created:
6 years, 9 months ago by Inactive
Modified:
6 years, 9 months ago
Reviewers:
philipj_slow, adamk, eseidel
CC:
blink-reviews, nessy, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, adamk+blink_chromium.org, vcarbune.chromium
Visibility:
Public.

Description

Use new is*Element() helper functions more in HTML code Use new is*Element() helpers more in HTML 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=169192

Patch Set 1 #

Total comments: 4

Patch Set 2 : Remove descendentVideoElement() #

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -59 lines) Patch
M Source/core/html/LabelsNodeList.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/MediaDocument.cpp View 1 3 chunks +2 lines, -14 lines 0 comments Download
M Source/core/html/RadioNodeList.cpp View 1 2 3 6 chunks +14 lines, -14 lines 0 comments Download
M Source/core/html/forms/RadioInputType.cpp View 3 chunks +9 lines, -9 lines 0 comments Download
M Source/core/html/parser/HTMLConstructionSite.cpp View 8 chunks +12 lines, -11 lines 1 comment Download
M Source/core/html/parser/HTMLElementStack.cpp View 3 chunks +4 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLTreeBuilder.cpp View 5 chunks +5 lines, -5 lines 0 comments Download
M Source/core/html/shadow/MediaControlElementTypes.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/shadow/TextControlInnerElements.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
Inactive
6 years, 9 months ago (2014-03-13 02:19:39 UTC) #1
philipj_slow
Non-owner LGTM with enthusiasm, bike shed and request for education :) https://codereview.chromium.org/198453003/diff/1/Source/core/html/MediaDocument.cpp File Source/core/html/MediaDocument.cpp (right): ...
6 years, 9 months ago (2014-03-13 02:49:56 UTC) #2
philipj_slow
Oh, I found the answer: inline bool is{{tag.interface}}(const Node* node) { return node && node->isElementNode() ...
6 years, 9 months ago (2014-03-13 03:19:16 UTC) #3
Inactive
https://codereview.chromium.org/198453003/diff/1/Source/core/html/MediaDocument.cpp File Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/198453003/diff/1/Source/core/html/MediaDocument.cpp#newcode144 Source/core/html/MediaDocument.cpp:144: HTMLVideoElement* video = descendentVideoElement(*targetNode); On 2014/03/13 02:49:56, philipj wrote: ...
6 years, 9 months ago (2014-03-13 04:35:54 UTC) #4
Inactive
https://codereview.chromium.org/198453003/diff/1/Source/core/html/MediaDocument.cpp File Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/198453003/diff/1/Source/core/html/MediaDocument.cpp#newcode144 Source/core/html/MediaDocument.cpp:144: HTMLVideoElement* video = descendentVideoElement(*targetNode); On 2014/03/13 02:49:56, philipj wrote: ...
6 years, 9 months ago (2014-03-13 04:53:55 UTC) #5
philipj_slow
Yep, looks nice :)
6 years, 9 months ago (2014-03-13 09:25:33 UTC) #6
Inactive
Rebased
6 years, 9 months ago (2014-03-13 22:38:16 UTC) #7
adamk
lgtm
6 years, 9 months ago (2014-03-13 23:33:31 UTC) #8
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 9 months ago (2014-03-14 00:29:07 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/198453003/50001
6 years, 9 months ago (2014-03-14 00:29:17 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-14 01:21:24 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_blink_rel
6 years, 9 months ago (2014-03-14 01:21:26 UTC) #12
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 9 months ago (2014-03-14 01:24:00 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/198453003/50001
6 years, 9 months ago (2014-03-14 01:24:11 UTC) #14
commit-bot: I haz the power
Change committed as 169192
6 years, 9 months ago (2014-03-14 02:06:05 UTC) #15
tkent
I feel using isHTMLFoo in HTML parser is semantically incorrect. The purpose of isHTMLFoo is ...
6 years, 9 months ago (2014-03-14 02:19:11 UTC) #16
Inactive
On 2014/03/14 02:19:11, tkent wrote: > I feel using isHTMLFoo in HTML parser is semantically ...
6 years, 9 months ago (2014-03-14 02:48:33 UTC) #17
Inactive
6 years, 9 months ago (2014-03-14 02:50:44 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/198453003/diff/50001/Source/core/html/parser/...
File Source/core/html/parser/HTMLConstructionSite.cpp (right):

https://codereview.chromium.org/198453003/diff/50001/Source/core/html/parser/...
Source/core/html/parser/HTMLConstructionSite.cpp:98: if
(isHTMLTemplateElement(*task.parent))
for example here, I feel it makes sense to use isHTMLTemplateElement() before
calling to HTMLTemplateElement().

However, I have really no issue reverting my changes in parser/ in cases where
toHTML*Element() is not called afterwards.

Powered by Google App Engine
This is Rietveld 408576698