diff options
| author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
| commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
| tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebCore/css/WebKitCSSKeyframesRule.cpp | |
| parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
| download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz | |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebCore/css/WebKitCSSKeyframesRule.cpp')
| -rw-r--r-- | Source/WebCore/css/WebKitCSSKeyframesRule.cpp | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/Source/WebCore/css/WebKitCSSKeyframesRule.cpp b/Source/WebCore/css/WebKitCSSKeyframesRule.cpp index 1406fef9d..fd48fcb62 100644 --- a/Source/WebCore/css/WebKitCSSKeyframesRule.cpp +++ b/Source/WebCore/css/WebKitCSSKeyframesRule.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008, 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,7 +32,6 @@ #include "StylePropertySet.h" #include "StyleSheet.h" #include "WebKitCSSKeyframeRule.h" -#include <wtf/MemoryInstrumentationVector.h> #include <wtf/text/StringBuilder.h> namespace WebCore { @@ -74,9 +73,9 @@ int StyleRuleKeyframes::findKeyframeIndex(const String& key) const { String percentageString; if (equalIgnoringCase(key, "from")) - percentageString = "0%"; + percentageString = ASCIILiteral("0%"); else if (equalIgnoringCase(key, "to")) - percentageString = "100%"; + percentageString = ASCIILiteral("100%"); else percentageString = key; @@ -87,13 +86,6 @@ int StyleRuleKeyframes::findKeyframeIndex(const String& key) const return -1; } -void StyleRuleKeyframes::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const -{ - MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); - info.addMember(m_keyframes); - info.addMember(m_name); -} - WebKitCSSKeyframesRule::WebKitCSSKeyframesRule(StyleRuleKeyframes* keyframesRule, CSSStyleSheet* parent) : CSSRule(parent) , m_keyframesRule(keyframesRule) @@ -161,17 +153,17 @@ WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::findRule(const String& s) String WebKitCSSKeyframesRule::cssText() const { StringBuilder result; - result.append("@-webkit-keyframes "); + result.appendLiteral("@-webkit-keyframes "); result.append(name()); - result.append(" { \n"); + result.appendLiteral(" { \n"); unsigned size = length(); for (unsigned i = 0; i < size; ++i) { - result.append(" "); + result.appendLiteral(" "); result.append(m_keyframesRule->keyframes()[i]->cssText()); - result.append("\n"); + result.append('\n'); } - result.append("}"); + result.append('}'); return result.toString(); } @@ -203,17 +195,8 @@ CSSRuleList* WebKitCSSKeyframesRule::cssRules() void WebKitCSSKeyframesRule::reattach(StyleRuleBase* rule) { ASSERT(rule); - ASSERT(rule->isKeyframesRule()); + ASSERT_WITH_SECURITY_IMPLICATION(rule->isKeyframesRule()); m_keyframesRule = static_cast<StyleRuleKeyframes*>(rule); } -void WebKitCSSKeyframesRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const -{ - MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); - CSSRule::reportMemoryUsage(memoryObjectInfo); - info.addMember(m_keyframesRule); - info.addMember(m_childRuleCSSOMWrappers); - info.addMember(m_ruleListCSSOMWrapper); -} - } // namespace WebCore |
