Commit 3666feb9 authored by hyatt's avatar hyatt

Fix for <rdar://problem/4545060>, technorati and arstechnica fail...

        Fix for <rdar://problem/4545060>, technorati and arstechnica fail because of getComputedStyle not
        reporting display:none properly when it is set.  This is bugzilla bug 13103.

        Reviewed by mitz

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ebd6d4e5
2007-03-29 David Hyatt <hyatt@apple.com>
Fix for <rdar://problem/4545060>, technorati and arstechnica fail because of getComputedStyle not
reporting display:none properly when it is set. This is bugzilla bug 13103.
Reviewed by mitz
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2007-03-28 Oliver Hunt <oliver@apple.com>
Reviewed by Hyatt.
......@@ -481,10 +481,15 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
if (updateLayout)
node->document()->updateLayout();
// FIXME: This should work even if we do not have a renderer.
// FIXME: This should work even if we do not have a renderer for all properties.
RenderObject* renderer = node->renderer();
if (!renderer)
if (!renderer) {
// Handle display:none at the very least. By definition if we don't have a renderer
// we are considered to have no display.
if (propertyID == CSS_PROP_DISPLAY)
return new CSSPrimitiveValue(CSS_VAL_NONE);
return 0;
}
RenderStyle* style = renderer->style();
if (!style)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment