Bug 118021

Summary: Remove many static_casts to Element types from AccessibilityNodeObject
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: AccessibilityAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, benjamin, cfleizach, commit-queue, dmazzoni, esprehn, jdiggs, kling, koivisto, mario
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Cleanup none

Ryosuke Niwa
Reported 2013-06-25 21:00:27 PDT
Merge https://chromium.googlesource.com/chromium/blink/+/ecd837f94996a20fdb8798e24f26cf6edea2a423 Some of these casts were to overly specific types, like casting to HTMLFrameElementBase* just to call getAttribute. In other cases we can cast to a more generic type like HTMLTextFormControlElement to avoid the extra cases the code originally had.
Attachments
Cleanup (2.76 KB, patch)
2013-06-25 21:01 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2013-06-25 21:01:11 PDT
chris fleizach
Comment 2 2013-06-26 00:34:30 PDT
Comment on attachment 205444 [details] Cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=205444&action=review > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1647 > + return toHTMLTextFormControlElement(node)->value(); Isn't this a bad cast for input type=checkbox for instance?
Ryosuke Niwa
Comment 3 2013-06-26 01:47:05 PDT
(In reply to comment #2) > (From update of attachment 205444 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=205444&action=review > > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1647 > > + return toHTMLTextFormControlElement(node)->value(); > > Isn't this a bad cast for input type=checkbox for instance? No. Both HTMLInputElement and HTMLTextAreaElement inherit from HTMLTextFormControlElement.
WebKit Commit Bot
Comment 4 2013-06-26 08:39:28 PDT
Comment on attachment 205444 [details] Cleanup Clearing flags on attachment: 205444 Committed r151990: <http://trac.webkit.org/changeset/151990>
WebKit Commit Bot
Comment 5 2013-06-26 08:39:31 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.