More convenience
Created attachment 215858 [details] patch
Comment on attachment 215858 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=215858&action=review > Source/WebCore/editing/FrameSelection.cpp:1964 > + if (element.hasTagName(frameTag) || element.hasTagName(iframeTag)) { We should use isHTMLFrameElement() and isHTMLIFrameElement() here. > Source/WebCore/html/HTMLFormElement.cpp:485 > + if (!element.isFormControlElement() && !element.hasTagName(objectTag)) isHTMLObjectElement() > Source/WebCore/html/HTMLFormElement.cpp:740 > + if (!startElement.parentElement()) > + return nullptr; > + return lineageOfType<HTMLFormElement>(*startElement.parentElement()).first(); This would be even simpler with ancestorsOfType.
Created attachment 215861 [details] better patch
Attachment 215861 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/ElementAncestorIterator.h', u'Source/WebCore/dom/ElementDescendantIterator.h', u'Source/WebCore/editing/FrameSelection.cpp', u'Source/WebCore/html/HTMLFormElement.cpp']" exit_code: 1 Source/WebCore/dom/ElementDescendantIterator.h:206: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
https://trac.webkit.org/r158530