RESOLVED FIXED 137172
Remove remaining uses of NODE_TYPE_CASTS() from html/
https://bugs.webkit.org/show_bug.cgi?id=137172
Summary Remove remaining uses of NODE_TYPE_CASTS() from html/
Chris Dumez
Reported 2014-09-26 22:17:47 PDT
Remove remaining uses of NODE_TYPE_CASTS() from html/ and use the new SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>() works for those types.
Attachments
Patch (18.35 KB, patch)
2014-09-26 22:26 PDT, Chris Dumez
no flags
Patch (19.14 KB, patch)
2014-09-26 22:29 PDT, Chris Dumez
no flags
Patch (19.21 KB, patch)
2014-09-26 22:50 PDT, Chris Dumez
no flags
Patch (19.16 KB, patch)
2014-09-29 09:33 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2014-09-26 22:26:00 PDT
WebKit Commit Bot
Comment 2 2014-09-26 22:28:33 PDT
Attachment 238759 [details] did not pass style-queue: ERROR: Source/WebCore/html/LabelableElement.h:55: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/shadow/TextControlInnerElements.h:75: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 3 2014-09-26 22:29:16 PDT
WebKit Commit Bot
Comment 4 2014-09-26 22:31:22 PDT
Attachment 238760 [details] did not pass style-queue: ERROR: Source/WebCore/html/LabelableElement.h:55: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/shadow/TextControlInnerElements.h:75: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 5 2014-09-26 22:50:16 PDT
WebKit Commit Bot
Comment 6 2014-09-26 22:52:38 PDT
Attachment 238761 [details] did not pass style-queue: ERROR: Source/WebCore/html/LabelableElement.h:55: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/shadow/TextControlInnerElements.h:75: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 7 2014-09-28 17:13:16 PDT
Comment on attachment 238761 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238761&action=review > Source/WebCore/css/SelectorCheckerTestFunctions.h:137 > + if (is<WebVTTElement>(element)) Should be *element unless we want to add a null check. > Source/WebCore/css/SelectorCheckerTestFunctions.h:314 > + return is<WebVTTElement>(element) && !downcast<WebVTTElement>(*element).isPastNode(); Should be *element unless we want to add a null check. > Source/WebCore/css/SelectorCheckerTestFunctions.h:319 > + return is<WebVTTElement>(element) && downcast<WebVTTElement>(*element).isPastNode(); Should be *element unless we want to add a null check. > Source/WebCore/css/StyleResolver.cpp:653 > + if (is<WebVTTElement>(state.element())) Should be *state.element() unless we want to add a null check. > Source/WebCore/dom/NodeRenderingTraversal.cpp:138 > + if (is<InsertionPoint>(parent)) { Should be *parent unless we want to add a null check. > Source/WebCore/html/HTMLTextAreaElement.cpp:330 > Node* node = userAgentShadowRoot()->firstChild(); > - return toTextControlInnerTextElement(node); > + return downcast<TextControlInnerTextElement>(node); I think this would read better without the local variable. > Source/WebCore/html/shadow/InsertionPoint.h:84 > + return node && is<InsertionPoint>(node) && downcast<InsertionPoint>(*node).isActive(); Should either remove the "node &&" part of use *node inside the call to is. > Source/WebCore/html/shadow/InsertionPoint.h:92 > + if (is<InsertionPoint>(parent) && downcast<InsertionPoint>(*parent).shouldUseFallbackElements()) Should pass *parent to is. > Source/WebCore/html/track/VTTCue.cpp:500 > + if (is<WebVTTElement>(node)) Should pass *node. > Source/WebCore/html/track/VTTCue.cpp:769 > + if (is<WebVTTElement>(child)) { Should pass *child.
Chris Dumez
Comment 8 2014-09-29 09:33:47 PDT
WebKit Commit Bot
Comment 9 2014-09-29 09:35:41 PDT
Attachment 238861 [details] did not pass style-queue: ERROR: Source/WebCore/html/LabelableElement.h:55: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/shadow/TextControlInnerElements.h:75: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 10 2014-09-29 10:16:35 PDT
Comment on attachment 238861 [details] Patch Clearing flags on attachment: 238861 Committed r174067: <http://trac.webkit.org/changeset/174067>
WebKit Commit Bot
Comment 11 2014-09-29 10:16:40 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.