summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSRule.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-25 15:09:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-25 15:09:11 +0200
commita89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch)
treeb7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebCore/css/CSSRule.cpp
parent8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff)
downloadqtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebCore/css/CSSRule.cpp')
-rw-r--r--Source/WebCore/css/CSSRule.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/WebCore/css/CSSRule.cpp b/Source/WebCore/css/CSSRule.cpp
index 09643ea9e..09e356de0 100644
--- a/Source/WebCore/css/CSSRule.cpp
+++ b/Source/WebCore/css/CSSRule.cpp
@@ -35,6 +35,7 @@
#include "WebKitCSSRegionRule.h"
#include "NotImplemented.h"
#include "StyleRule.h"
+#include "StyleSheetContents.h"
namespace WebCore {
@@ -71,8 +72,10 @@ String CSSRule::cssText() const
return static_cast<const WebKitCSSKeyframesRule*>(this)->cssText();
case WEBKIT_KEYFRAME_RULE:
return static_cast<const WebKitCSSKeyframeRule*>(this)->cssText();
+#if ENABLE(CSS_REGIONS)
case WEBKIT_REGION_RULE:
return static_cast<const WebKitCSSRegionRule*>(this)->cssText();
+#endif
}
ASSERT_NOT_REACHED();
return String();
@@ -108,9 +111,11 @@ void CSSRule::destroy()
case WEBKIT_KEYFRAME_RULE:
delete static_cast<WebKitCSSKeyframeRule*>(this);
return;
+#if ENABLE(CSS_REGIONS)
case WEBKIT_REGION_RULE:
delete static_cast<WebKitCSSRegionRule*>(this);
return;
+#endif
}
ASSERT_NOT_REACHED();
}
@@ -146,9 +151,11 @@ void CSSRule::reattach(StyleRuleBase* rule)
// No need to reattach, the underlying data is shareable on mutation.
ASSERT_NOT_REACHED();
return;
+#if ENABLE(CSS_REGIONS)
case WEBKIT_REGION_RULE:
static_cast<WebKitCSSRegionRule*>(this)->reattach(static_cast<StyleRuleRegion*>(rule));
return;
+#endif
}
ASSERT_NOT_REACHED();
}
@@ -156,7 +163,7 @@ void CSSRule::reattach(StyleRuleBase* rule)
const CSSParserContext& CSSRule::parserContext() const
{
CSSStyleSheet* styleSheet = parentStyleSheet();
- return styleSheet ? styleSheet->internal()->parserContext() : strictCSSParserContext();
+ return styleSheet ? styleSheet->contents()->parserContext() : strictCSSParserContext();
}
} // namespace WebCore