[Webkit-unassigned] [Bug 56642] chrome.dll!WebCore::CSSStyleDeclaration::diff ReadAV at NULL (1933558aaf23e4d9cc2ec3bc22fad247)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 18 07:12:56 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=56642
--- Comment #1 from Berend-Jan Wever <skylined at chromium.org> 2011-03-18 07:12:56 PST ---
The problem is that the selection contains only the HTMLDocument when this code is executed:
\source\webcore\editing\applystylecommand.cpp:
void StyleChange::init(EditingStyle* style, const Position& position)
{
Document* document = position.anchorNode() ? position.anchorNode()->document() : 0;
if (!style || !style->style() || !document || !document->frame())
return;
RefPtr<CSSComputedStyleDeclaration> computedStyle = position.computedStyle();
<snip>
This calls the following code:
\source\webcore\dom\Position.cpp:
PassRefPtr<CSSComputedStyleDeclaration> Position::computedStyle() const
{
Element* elem = element();
if (!elem)
return 0;
return WebCore::computedStyle(elem);
}
Where "element()" is the following code in the same file:
Element* Position::element() const
{
Node* n = anchorNode();
while (n && !n->isElementNode())
n = n->parentNode();
return static_cast<Element*>(n);
}
a HTMLDocument is not an ElementNode, so this returns 0, and "Position::computedStyle" returns 0 as well. "StyleChange::init" does not expect this.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list