RESOLVED FIXED 123703
Add helpers for partial descendant traversal to element iterators
https://bugs.webkit.org/show_bug.cgi?id=123703
Summary Add helpers for partial descendant traversal to element iterators
Antti Koivisto
Reported 2013-11-03 02:21:02 PST
More convenience
Attachments
patch (12.00 KB, patch)
2013-11-03 02:25 PST, Antti Koivisto
no flags
better patch (12.11 KB, patch)
2013-11-03 02:59 PST, Antti Koivisto
kling: review+
Antti Koivisto
Comment 1 2013-11-03 02:25:08 PST
Andreas Kling
Comment 2 2013-11-03 02:39:02 PST
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.
Antti Koivisto
Comment 3 2013-11-03 02:59:09 PST
Created attachment 215861 [details] better patch
WebKit Commit Bot
Comment 4 2013-11-03 03:00:41 PST
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.
Antti Koivisto
Comment 5 2013-11-03 03:12:30 PST
Note You need to log in before you can comment on or make changes to this bug.