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

Description Yael 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* .
Comment 1 Yael 2011-02-09 10:24:35 PST
Created attachment 81829 [details]
Patch.
Comment 2 Darin Adler 2011-02-09 10:26:57 PST
Comment on attachment 81829 [details]
Patch.

Did you run all the regression tests? Did any assertions fire?
Comment 3 Yael 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.
Comment 4 Yael 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.
Comment 5 Darin Adler 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*.
Comment 6 Yael 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().
Comment 7 WebKit Commit Bot 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>
Comment 8 WebKit Commit Bot 2011-02-09 15:20:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 WebKit Review Bot 2011-02-09 15:28:03 PST
http://trac.webkit.org/changeset/78150 might have broken Qt Windows 32-bit Release