Bug 54117

Summary: Replace static_cast<HTMLElement*> with toHTMLElement
Product: WebKit Reporter: Yael <yael>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, darin, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch.
darin: review+, yael: commit-queue-
Patch. none

Yael
Reported 2011-02-09 10:20:40 PST
r78073 added a new method toHTMLElement. Take it into use in places that currently cast Node* to HTMLElement* .
Attachments
Patch. (42.46 KB, patch)
2011-02-09 10:24 PST, Yael
darin: review+
yael: commit-queue-
Patch. (43.18 KB, patch)
2011-02-09 12:24 PST, Yael
no flags
Yael
Comment 1 2011-02-09 10:24:35 PST
Darin Adler
Comment 2 2011-02-09 10:26:57 PST
Comment on attachment 81829 [details] Patch. Did you run all the regression tests? Did any assertions fire?
Yael
Comment 3 2011-02-09 10:33:07 PST
(In reply to comment #2) > (From update of attachment 81829 [details]) > Did you run all the regression tests? Did any assertions fire? The tests are still running, but I just noticed a crash. I'll stop the commit queue, it will fail anyways.
Yael
Comment 4 2011-02-09 12:24:12 PST
Created attachment 81851 [details] Patch. Only one test hit the ASSERT. It is editing/execCommand/insert-list-nested-with-orphaned.html . This test is really expecting the function enclosingListChild to return a node which is not an HTMLElement. (The test fails if I skip nodes that are not HTMLElements.) Once I modified enclosingListChild to return Node and not HTMLElement, all tests are passing. I updated the patch to return a Node from enclosingListChild.
Darin Adler
Comment 5 2011-02-09 12:28:53 PST
(In reply to comment #4) > This test is really expecting the function enclosingListChild to return a node which is not an HTMLElement. Is it an Element? Element* would be better than Node*.
Yael
Comment 6 2011-02-09 12:44:40 PST
(In reply to comment #5) > (In reply to comment #4) > > This test is really expecting the function enclosingListChild to return a node which is not an HTMLElement. > > Is it an Element? Element* would be better than Node*. This is a text node, not an element. It asserts when I use toElement().
WebKit Commit Bot
Comment 7 2011-02-09 15:20:23 PST
Comment on attachment 81851 [details] Patch. Clearing flags on attachment: 81851 Committed r78150: <http://trac.webkit.org/changeset/78150>
WebKit Commit Bot
Comment 8 2011-02-09 15:20:27 PST
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 9 2011-02-09 15:28:03 PST
http://trac.webkit.org/changeset/78150 might have broken Qt Windows 32-bit Release
Note You need to log in before you can comment on or make changes to this bug.