WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122713
Get rid of the toHTMLElement helper for casting FormAssociatedElement to HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=122713
Summary
Get rid of the toHTMLElement helper for casting FormAssociatedElement to HTML...
Darin Adler
Reported
2013-10-12 23:03:00 PDT
Get rid of the toHTMLAttribute helper for casting FormAssociatedElement to HTMLElement
Attachments
Patch
(38.63 KB, patch)
2013-10-12 23:15 PDT
,
Darin Adler
sam
: review+
kling
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2013-10-12 23:15:14 PDT
Created
attachment 214083
[details]
Patch
Andreas Kling
Comment 2
2013-10-12 23:37:32 PDT
Comment on
attachment 214083
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=214083&action=review
Setting cq- since there's some build breakage in here.
> Source/WebCore/html/HTMLFormControlElement.h:147 > + virtual HTMLElement& asHTMLElement() OVERRIDE FINAL { return *this; } > + virtual const HTMLElement& asHTMLElement() const OVERRIDE FINAL { return *this; }
Could use a tighter covariant return type for these.
> Source/WebCore/html/HTMLFormElement.cpp:235 > + if (element.isFocusable() && element.inDocument()) {
This check should be reversed so the virtual dispatch goes last.
> Source/WebCore/html/HTMLFormElement.cpp:249 > + if (element.isFocusable() && element.inDocument())
Same here.
> Source/WebCore/html/HTMLImageElement.h:117 > + virtual HTMLElement& asHTMLElement() OVERRIDE FINAL { return *this; } > + virtual const HTMLElement& asHTMLElement() const OVERRIDE FINAL { return *this; }
Could use a tighter covariant return type for these.
> Source/WebCore/html/HTMLObjectElement.h:105 > + virtual HTMLElement& asHTMLElement() OVERRIDE FINAL { return *this; } > + virtual const HTMLElement& asHTMLElement() const OVERRIDE FINAL { return *this; }
Could use a tighter covariant return type for these.
> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:973 > - Element* element = const_cast<HTMLElement*>(toHTMLElement(formElementList[focusElementId])); > + Element* element = formElementList[focusElementId]->asHTMLElement();
Missing & here since you're assignin to an Element*.
> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:986 > - Element* prevElement = const_cast<HTMLElement*>(toHTMLElement(formElementList[previousElementId])); > + Element* prevElement = formElementList[previousElementId]->asHTMLElement();
Ditto.
> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:998 > - Element* nextElement = const_cast<HTMLElement*>(toHTMLElement(formElementList[nextElementId])); > + Element* nextElement = formElementList[nextElementId]->asHTMLElement();
Ditto.
Darin Adler
Comment 3
2013-10-12 23:53:22 PDT
Committed
r157357
: <
http://trac.webkit.org/changeset/157357
>
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