Bug 54117 - Replace static_cast<HTMLElement*> with toHTMLElement
: Replace static_cast<HTMLElement*> with toHTMLElement
Status: RESOLVED FIXED
: WebKit
HTML DOM
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-02-09 10:20 PST by
Modified: 2011-02-09 15:28 PST (History)


Attachments
Patch. (42.46 KB, patch)
2011-02-09 10:24 PST, Yael
darin: review+
yael: commit‑queue-
Review Patch | Details | Formatted Diff | Diff
Patch. (43.18 KB, patch)
2011-02-09 12:24 PST, Yael
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 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 From 2011-02-09 10:24:35 PST -------
Created an attachment (id=81829) [details]
Patch.
------- Comment #2 From 2011-02-09 10:26:57 PST -------
(From update of attachment 81829 [details])
Did you run all the regression tests? Did any assertions fire?
------- Comment #3 From 2011-02-09 10:33:07 PST -------
(In reply to comment #2)
> (From update of attachment 81829 [details] [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 From 2011-02-09 12:24:12 PST -------
Created an attachment (id=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 From 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 From 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 From 2011-02-09 15:20:23 PST -------
(From update of attachment 81851 [details])
Clearing flags on attachment: 81851

Committed r78150: <http://trac.webkit.org/changeset/78150>
------- Comment #8 From 2011-02-09 15:20:27 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #9 From 2011-02-09 15:28:03 PST -------
http://trac.webkit.org/changeset/78150 might have broken Qt Windows 32-bit Release