WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 120226
Use ElementTraversal some more
https://bugs.webkit.org/show_bug.cgi?id=120226
Summary
Use ElementTraversal some more
Antti Koivisto
Reported
2013-08-23 13:18:51 PDT
In random places.
Attachments
patch
(16.55 KB, patch)
2013-08-23 13:29 PDT
,
Antti Koivisto
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2013-08-23 13:29:15 PDT
Created
attachment 209505
[details]
patch
Darin Adler
Comment 2
2013-08-23 13:35:23 PDT
Comment on
attachment 209505
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=209505&action=review
> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1126 > + const AtomicString& siblingAriaRole = sibling->getAttribute(roleAttr);
Could be fastGetAttribute.
> Source/WebCore/html/HTMLObjectElement.cpp:464 > - for (Element* child = ElementTraversal::firstWithin(this); child; child = ElementTraversal::nextSibling(child)) { > + for (auto child = ElementTraversal::firstChild(this); child; child = ElementTraversal::nextSibling(child)) {
Looks to me like this is a drive-by bug fix. Was something slightly broken?
Antti Koivisto
Comment 3
2013-08-23 13:42:51 PDT
(In reply to
comment #2
)
> Looks to me like this is a drive-by bug fix. Was something slightly broken?
No. For Elements firstWithin and firstChild are always the same (Element's parent is always Element or the root). However it is semantically better to pair firstChild with nextSibling and firstWithin with next (it obviously matters for more specific element types).
Antti Koivisto
Comment 4
2013-08-23 14:59:12 PDT
http://trac.webkit.org/changeset/154525
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug