diff options
Diffstat (limited to 'WebCore/rendering/style/StyleRareNonInheritedData.cpp')
-rw-r--r-- | WebCore/rendering/style/StyleRareNonInheritedData.cpp | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/WebCore/rendering/style/StyleRareNonInheritedData.cpp index e8ceeeb..401c04f 100644 --- a/WebCore/rendering/style/StyleRareNonInheritedData.cpp +++ b/WebCore/rendering/style/StyleRareNonInheritedData.cpp @@ -23,7 +23,10 @@ #include "StyleRareNonInheritedData.h" #include "CSSStyleSelector.h" +#include "ContentData.h" +#include "RenderCounter.h" #include "RenderStyle.h" +#include "StyleImage.h" namespace WebCore { @@ -39,10 +42,18 @@ StyleRareNonInheritedData::StyleRareNonInheritedData() , matchNearestMailBlockquoteColor(RenderStyle::initialMatchNearestMailBlockquoteColor()) , m_appearance(RenderStyle::initialAppearance()) , m_borderFit(RenderStyle::initialBorderFit()) +#if USE(ACCELERATED_COMPOSITING) + , m_runningAcceleratedAnimation(false) +#endif , m_boxShadow(0) , m_animations(0) , m_transitions(0) , m_mask(FillLayer(MaskFillLayer)) + , m_transformStyle3D(RenderStyle::initialTransformStyle3D()) + , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility()) + , m_perspective(RenderStyle::initialPerspective()) + , m_perspectiveOriginX(RenderStyle::initialPerspectiveOriginX()) + , m_perspectiveOriginY(RenderStyle::initialPerspectiveOriginY()) #if ENABLE(XBL) , bindingURI(0) #endif @@ -66,12 +77,20 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited , matchNearestMailBlockquoteColor(o.matchNearestMailBlockquoteColor) , m_appearance(o.m_appearance) , m_borderFit(o.m_borderFit) +#if USE(ACCELERATED_COMPOSITING) + , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation) +#endif , m_boxShadow(o.m_boxShadow ? new ShadowData(*o.m_boxShadow) : 0) , m_boxReflect(o.m_boxReflect) , m_animations(o.m_animations ? new AnimationList(*o.m_animations) : 0) , m_transitions(o.m_transitions ? new AnimationList(*o.m_transitions) : 0) , m_mask(o.m_mask) , m_maskBoxImage(o.m_maskBoxImage) + , m_transformStyle3D(o.m_transformStyle3D) + , m_backfaceVisibility(o.m_backfaceVisibility) + , m_perspective(o.m_perspective) + , m_perspectiveOriginX(o.m_perspectiveOriginX) + , m_perspectiveOriginY(o.m_perspectiveOriginY) #if ENABLE(XBL) , bindingURI(o.bindingURI ? o.bindingURI->copy() : 0) #endif @@ -105,7 +124,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c && marquee == o.marquee && m_multiCol == o.m_multiCol && m_transform == o.m_transform - && m_content == o.m_content + && contentDataEquivalent(o) && m_counterDirectives == o.m_counterDirectives && userDrag == o.userDrag && textOverflow == o.textOverflow @@ -114,6 +133,9 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c && matchNearestMailBlockquoteColor == o.matchNearestMailBlockquoteColor && m_appearance == o.m_appearance && m_borderFit == o.m_borderFit +#if USE(ACCELERATED_COMPOSITING) + && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation +#endif && shadowDataEquivalent(o) && reflectionDataEquivalent(o) && animationDataEquivalent(o) @@ -123,12 +145,32 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c #if ENABLE(XBL) && bindingsEquivalent(o) #endif + && (m_transformStyle3D == o.m_transformStyle3D) + && (m_backfaceVisibility == o.m_backfaceVisibility) + && (m_perspective == o.m_perspective) + && (m_perspectiveOriginX == o.m_perspectiveOriginX) + && (m_perspectiveOriginY == o.m_perspectiveOriginY) ; } +bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInheritedData& o) const +{ + ContentData* c1 = m_content.get(); + ContentData* c2 = o.m_content.get(); + + while (c1 && c2) { + if (!c1->dataEquivalent(*c2)) + return false; + c1 = c1->next(); + c2 = c2->next(); + } + + return !c1 && !c2; +} + bool StyleRareNonInheritedData::shadowDataEquivalent(const StyleRareNonInheritedData& o) const { - if (!m_boxShadow && o.m_boxShadow || m_boxShadow && !o.m_boxShadow) + if ((!m_boxShadow && o.m_boxShadow) || (m_boxShadow && !o.m_boxShadow)) return false; if (m_boxShadow && o.m_boxShadow && (*m_boxShadow != *o.m_boxShadow)) return false; @@ -148,7 +190,7 @@ bool StyleRareNonInheritedData::reflectionDataEquivalent(const StyleRareNonInher bool StyleRareNonInheritedData::animationDataEquivalent(const StyleRareNonInheritedData& o) const { - if (!m_animations && o.m_animations || m_animations && !o.m_animations) + if ((!m_animations && o.m_animations) || (m_animations && !o.m_animations)) return false; if (m_animations && o.m_animations && (*m_animations != *o.m_animations)) return false; @@ -157,7 +199,7 @@ bool StyleRareNonInheritedData::animationDataEquivalent(const StyleRareNonInheri bool StyleRareNonInheritedData::transitionDataEquivalent(const StyleRareNonInheritedData& o) const { - if (!m_transitions && o.m_transitions || m_transitions && !o.m_transitions) + if ((!m_transitions && o.m_transitions) || (m_transitions && !o.m_transitions)) return false; if (m_transitions && o.m_transitions && (*m_transitions != *o.m_transitions)) return false; |