Skip to content
Permalink
Browse files
Fix for bug 17286, crash accessing a null RenderStyle. Add a simple …
…null check.

        Reviewed by aroben

        Added fast/css/empty-generated-content.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::checkOneSelector):



Canonical link: https://commits.webkit.org/23964@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Hyatt committed Feb 11, 2008
1 parent 2752cda commit 2dce6a06668a85ff7c8afea9b82f54d8ed4be778
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>WebKit Bug 17286: :after generated content and :empty RenderStyle crash</title>
<link href="http://chasenlehara.com/" rel="author" title="Chasen Le Hara" />
<style type="text/css">
:after {content: ""}
:empty {}
</style>
</head>
<body>This page intentionally left blank.</body>
</html>
@@ -0,0 +1 @@
dbbfbd04e2be83f275d0c5055dec14f5
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,13 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x34
RenderBlock {HTML} at (0,0) size 800x34
RenderBody {BODY} at (8,8) size 784x18
RenderText {#text} at (0,0) size 211x18
text run at (0,0) width 211: "This page intentionally left blank."
RenderText {#text} at (0,0) size 0x0
RenderInline (generated) at (0,0) size 0x0
RenderText at (0,0) size 0x0
RenderBlock (anonymous) at (0,34) size 800x0
RenderInline (generated) at (0,0) size 0x0
RenderText at (0,0) size 0x0
@@ -1,3 +1,14 @@
2008-02-11 David Hyatt <hyatt@apple.com>

Fix for bug 17286, crash accessing a null RenderStyle. Add a simple null check.

Reviewed by aroben

Added fast/css/empty-generated-content.html

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::checkOneSelector):

2008-02-11 Rob Buis <buis@kde.org>

Reviewed by David Kilzer.
@@ -1660,7 +1660,7 @@ bool CSSStyleSelector::checkOneSelector(CSSSelector* sel, Element* e, bool isAnc
}
}
if (!m_collectRulesOnly) {
if (m_element == e)
if (m_element == e && m_style)
m_style->setEmptyState(result);
else if (e->renderStyle() && (e->document()->usesSiblingRules() || e->renderStyle()->unique()))
e->renderStyle()->setEmptyState(result);

0 comments on commit 2dce6a0

Please sign in to comment.