Adopt is/toHTMLTableElement for code cleanup
Created attachment 206087 [details] Patch
Attachment 206087 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/accessibility/AccessibilityRenderObject.cpp', u'Source/WebCore/accessibility/AccessibilityTable.cpp', u'Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp', u'Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp', u'Source/WebCore/css/StyleResolver.cpp', u'Source/WebCore/dom/Position.cpp', u'Source/WebCore/editing/DeleteSelectionCommand.cpp', u'Source/WebCore/editing/InsertLineBreakCommand.cpp', u'Source/WebCore/editing/htmlediting.cpp', u'Source/WebCore/editing/markup.cpp', u'Source/WebCore/html/FTPDirectoryDocument.cpp', u'Source/WebCore/html/HTMLFormElement.cpp', u'Source/WebCore/html/HTMLTableElement.h', u'Source/WebCore/html/HTMLTablePartElement.cpp', u'Source/WebCore/html/HTMLTableRowElement.cpp', u'Source/WebCore/html/HTMLTableRowsCollection.cpp', u'Source/WebCore/html/parser/HTMLElementStack.cpp', u'Source/WebCore/html/parser/HTMLTreeBuilder.cpp', u'Source/WebCore/platform/mac/HTMLConverter.mm', u'Source/WebCore/rendering/RenderObject.cpp', u'Source/WebCore/rendering/RenderTable.cpp']" exit_code: 1 Source/WebCore/editing/DeleteSelectionCommand.cpp:449: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Style error is not related to this patch. :)
Comment on attachment 206087 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206087&action=review r=me with some minor changes: > Source/WebCore/html/HTMLTableElement.h:103 > +inline bool isHTMLTableElement(Node* node) The argument should be const Node*, otherwise we can only call isHTMLTableElement on non-const Nodes. > Source/WebCore/html/HTMLTableElement.h:111 > +inline bool isHTMLTableElement(Element* element) > +{ > + return element->hasTagName(HTMLNames::tableTag); > +} This overload shouldn't be necessary.
Created attachment 206217 [details] Patch
(In reply to comment #4) > (From update of attachment 206087 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=206087&action=review > > r=me with some minor changes: > > > Source/WebCore/html/HTMLTableElement.h:103 > > +inline bool isHTMLTableElement(Node* node) > > The argument should be const Node*, otherwise we can only call isHTMLTableElement on non-const Nodes. > > > Source/WebCore/html/HTMLTableElement.h:111 > > +inline bool isHTMLTableElement(Element* element) > > +{ > > + return element->hasTagName(HTMLNames::tableTag); > > +} > > This overload shouldn't be necessary. Done, thx! :) Took kling's comment into consideration.
Comment on attachment 206217 [details] Patch Clearing flags on attachment: 206217 Committed r152440: <http://trac.webkit.org/changeset/152440>
All reviewed patches have been landed. Closing bug.