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/CSSReflectValue.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/CSSReflectValue.cpp')
-rw-r--r-- | Source/WebCore/css/CSSReflectValue.cpp | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/Source/WebCore/css/CSSReflectValue.cpp b/Source/WebCore/css/CSSReflectValue.cpp index 9439d600e..09b79c717 100644 --- a/Source/WebCore/css/CSSReflectValue.cpp +++ b/Source/WebCore/css/CSSReflectValue.cpp @@ -27,7 +27,6 @@ #include "CSSReflectValue.h" #include "CSSPrimitiveValue.h" -#include "WebCoreMemoryInstrumentation.h" #include <wtf/text/StringBuilder.h> using namespace std; @@ -36,30 +35,19 @@ namespace WebCore { String CSSReflectValue::customCssText() const { - StringBuilder result; - switch (m_direction) { - case ReflectionBelow: - result.appendLiteral("below "); - break; - case ReflectionAbove: - result.appendLiteral("above "); - break; - case ReflectionLeft: - result.appendLiteral("left "); - break; - case ReflectionRight: - result.appendLiteral("right "); - break; - default: - break; - } + if (m_mask) + return m_direction->cssText() + ' ' + m_offset->cssText() + ' ' + m_mask->cssText(); + return m_direction->cssText() + ' ' + m_offset->cssText(); +} - result.append(m_offset->cssText()); - result.append(' '); +#if ENABLE(CSS_VARIABLES) +String CSSReflectValue::customSerializeResolvingVariables(const HashMap<AtomicString, String>& variables) const +{ if (m_mask) - result.append(m_mask->cssText()); - return result.toString(); + return m_direction->customSerializeResolvingVariables(variables) + ' ' + m_offset->customSerializeResolvingVariables(variables) + ' ' + m_mask->serializeResolvingVariables(variables); + return m_direction->customSerializeResolvingVariables(variables) + ' ' + m_offset->customSerializeResolvingVariables(variables); } +#endif void CSSReflectValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const { @@ -67,11 +55,11 @@ void CSSReflectValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const Sty m_mask->addSubresourceStyleURLs(urls, styleSheet); } -void CSSReflectValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const +bool CSSReflectValue::equals(const CSSReflectValue& other) const { - MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); - info.addMember(m_offset); - info.addMember(m_mask); + return m_direction == other.m_direction + && compareCSSValuePtr(m_offset, other.m_offset) + && compareCSSValuePtr(m_mask, other.m_mask); } } // namespace WebCore |