[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

simon.fraser at apple.com simon.fraser at apple.com
Fri Jan 21 14:37:02 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 6bebe92dfa8a942bc9cf5a60a39a488fad5cf1ac
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 23 05:45:56 2010 +0000

    2010-12-22  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Support unprefixed box-shadow property
            https://bugs.webkit.org/show_bug.cgi?id=51448
    
            Add support for the box-shadow CSS property. We'll currently render this
            similarly to -webkit-box-shadow, but a later fix will adjust the blur radius
            handling to match the spec.
    
            Test: fast/css/box-shadow.html
    
            * css/CSSComputedStyleDeclaration.cpp:
            (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Implement getComputedStyle
            for box-shadow
    
            * css/CSSParser.cpp:
            (WebCore::CSSParser::parseValue):
            (WebCore::ShadowParseContext::ShadowParseContext):
            (WebCore::ShadowParseContext::commitValue):
            (WebCore::ShadowParseContext::commitLength):
            (WebCore::ShadowParseContext::commitColor): Support CSSPropertyBoxShadow
    
            * css/CSSPropertyNames.in: add box-shadow
    
            * css/CSSStyleSelector.cpp:
            (WebCore::CSSStyleSelector::applyProperty): Add CSSPropertyBoxShadow, and
            store in the ShadowData if this is -webkit-box-shadow or not. We'll use this
            to adjust radii later.
    
            * css/SVGCSSStyleSelector.cpp:
            (WebCore::CSSStyleSelector::applySVGProperty): Add CSSPropertyBoxShadow.
    
            * page/animation/AnimationBase.cpp:
            (WebCore::blendFunc):
            (WebCore::PropertyWrapperShadow::blend):
            (WebCore::AnimationBase::ensurePropertyMap): Support animations of box-shadow.
    
            * rendering/style/ShadowData.cpp: Store a flag to say if this is a -webkit-box-shadow.
            (WebCore::ShadowData::ShadowData):
            (WebCore::ShadowData::operator==):
            * rendering/style/ShadowData.h:
            (WebCore::ShadowData::ShadowData):
            (WebCore::ShadowData::isWebkitBoxShadow):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74538 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9fbfc72..53d5221 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-12-22  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Support unprefixed box-shadow property
+        https://bugs.webkit.org/show_bug.cgi?id=51448
+        
+        Add box-shadow to getComputedStyle tests, and add new pixel test
+        for box-shadow. (This test will be updated when the shadow radius is fixed via
+        bug 22102).
+
+        * fast/css/box-shadow.html: Added.
+        * fast/css/getComputedStyle/computed-style-expected.txt:
+        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * platform/mac/fast/css/box-shadow-expected.checksum: Added.
+        * platform/mac/fast/css/box-shadow-expected.png: Added.
+        * platform/mac/fast/css/box-shadow-expected.txt: Added.
+        * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * svg/css/getComputedStyle-basic-expected.txt:
+
 2010-12-22  Michael Saboff  <msaboff at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/fast/css/box-shadow.html b/LayoutTests/fast/css/box-shadow.html
new file mode 100644
index 0000000..50f16cf
--- /dev/null
+++ b/LayoutTests/fast/css/box-shadow.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <style type="text/css" media="screen">
+    .wrapper {
+      outline: 1px solid silver;
+      width: 300px;
+      height: 300px;
+      -webkit-box-sizing: border-box;
+      padding: 100px;
+      margin: 20px;
+      display: inline-block;
+    }
+    
+    .box {
+      position: relative;
+      width: 100px;
+      height: 100px;
+      display: inline-block;
+    }
+        
+    .indicator {
+      position: absolute;
+      outline: 0 solid rgba(0, 255, 0, 0.05);
+    }
+    
+  </style>
+</head>
+<body>
+  
+  <p>The extent of the shadow should approximately match the pale green boxes.</p>
+  <div class="wrapper">
+    <div class="indicator box" style="outline-width: 10px"></div>
+    <div class="box" style="box-shadow: 0 0 10px black"></div>
+  </div>
+
+  <div class="wrapper">
+    <div class="indicator box" style="outline-width: 20px"></div>
+    <div class="box" style="box-shadow: 0 0 20px black"></div>
+  </div>
+
+  <div class="wrapper">
+    <div class="indicator box" style="outline-width: 50px"></div>
+    <div class="box" style="box-shadow: 0 0 50px black"></div>
+  </div>
+
+  <div class="wrapper">
+    <div class="indicator box" style="outline-width: 100px"></div>
+    <div class="box" style="box-shadow: 0 0 100px black"></div>
+  </div>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
index 28dd8a1..abdac4f 100644
--- a/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
@@ -26,6 +26,7 @@ border-top-right-radius: 0px;
 border-top-style: none;
 border-top-width: 0px;
 bottom: auto;
+box-shadow: none;
 box-sizing: content-box;
 caption-side: top;
 clear: none;
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
index 44771c7..caf402d 100644
--- a/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
@@ -25,6 +25,7 @@ Computed style of an element whose parent's 'display' value is 'none':
     border-top-style: solid
     border-top-width: 16px
     bottom: auto
+    box-shadow: none
     box-sizing: content-box
     caption-side: top
     clear: none
diff --git a/LayoutTests/platform/mac/fast/css/box-shadow-expected.checksum b/LayoutTests/platform/mac/fast/css/box-shadow-expected.checksum
new file mode 100644
index 0000000..b07e4b9
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/box-shadow-expected.checksum
@@ -0,0 +1 @@
+63f40b74de385bdc2412ee687bf1464f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/css/box-shadow-expected.png b/LayoutTests/platform/mac/fast/css/box-shadow-expected.png
new file mode 100644
index 0000000..f951cbb
Binary files /dev/null and b/LayoutTests/platform/mac/fast/css/box-shadow-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/css/box-shadow-expected.txt b/LayoutTests/platform/mac/fast/css/box-shadow-expected.txt
new file mode 100644
index 0000000..250b267
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/box-shadow-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 785x738
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x738
+  RenderBlock {HTML} at (0,0) size 785x738
+    RenderBody {BODY} at (8,16) size 769x714
+      RenderBlock {P} at (0,0) size 769x18
+        RenderText {#text} at (0,0) size 479x18
+          text run at (0,0) width 479: "The extent of the shadow should approximately match the pale green boxes."
+      RenderBlock (anonymous) at (0,34) size 769x680
+        RenderBlock {DIV} at (20,20) size 300x300
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (340,206) size 4x18
+          text run at (340,206) width 4: " "
+        RenderBlock {DIV} at (364,20) size 300x300
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+        RenderBlock {DIV} at (20,360) size 300x300
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (340,546) size 4x18
+          text run at (340,546) width 4: " "
+        RenderBlock {DIV} at (364,360) size 300x300
+          RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+layer at (128,170) size 100x100
+  RenderBlock (positioned) {DIV} at (128,170) size 100x100
+layer at (128,170) size 100x100
+  RenderBlock (relative positioned) {DIV} at (100,100) size 100x100
+layer at (472,170) size 100x100
+  RenderBlock (positioned) {DIV} at (472,170) size 100x100
+layer at (472,170) size 100x100
+  RenderBlock (relative positioned) {DIV} at (100,100) size 100x100
+layer at (128,510) size 100x100
+  RenderBlock (positioned) {DIV} at (128,510) size 100x100
+layer at (128,510) size 100x100
+  RenderBlock (relative positioned) {DIV} at (100,100) size 100x100
+layer at (472,510) size 100x100
+  RenderBlock (positioned) {DIV} at (472,510) size 100x100
+layer at (472,510) size 100x100
+  RenderBlock (relative positioned) {DIV} at (100,100) size 100x100
diff --git a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
index 44771c7..caf402d 100644
--- a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
+++ b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
@@ -25,6 +25,7 @@ Computed style of an element whose parent's 'display' value is 'none':
     border-top-style: solid
     border-top-width: 16px
     bottom: auto
+    box-shadow: none
     box-sizing: content-box
     caption-side: top
     clear: none
diff --git a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
index 85f2c8f..e8f862a 100644
--- a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
+++ b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
@@ -50,6 +50,8 @@ rect: style.getPropertyValue(border-top-width) : 0px
 rect: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(bottom) : auto
 rect: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(box-shadow) : none
+rect: style.getPropertyCSSValue(box-shadow) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(box-sizing) : content-box
 rect: style.getPropertyCSSValue(box-sizing) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(caption-side) : top
@@ -474,6 +476,8 @@ g: style.getPropertyValue(border-top-width) : 0px
 g: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(bottom) : auto
 g: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(box-shadow) : none
+g: style.getPropertyCSSValue(box-shadow) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(box-sizing) : content-box
 g: style.getPropertyCSSValue(box-sizing) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(caption-side) : top
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c7cfc4d..4a6e743 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,49 @@
+2010-12-22  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Support unprefixed box-shadow property
+        https://bugs.webkit.org/show_bug.cgi?id=51448
+        
+        Add support for the box-shadow CSS property. We'll currently render this
+        similarly to -webkit-box-shadow, but a later fix will adjust the blur radius
+        handling to match the spec.
+
+        Test: fast/css/box-shadow.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Implement getComputedStyle
+        for box-shadow
+        
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::ShadowParseContext::ShadowParseContext):
+        (WebCore::ShadowParseContext::commitValue):
+        (WebCore::ShadowParseContext::commitLength):
+        (WebCore::ShadowParseContext::commitColor): Support CSSPropertyBoxShadow
+
+        * css/CSSPropertyNames.in: add box-shadow
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty): Add CSSPropertyBoxShadow, and
+        store in the ShadowData if this is -webkit-box-shadow or not. We'll use this
+        to adjust radii later.
+
+        * css/SVGCSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applySVGProperty): Add CSSPropertyBoxShadow.
+        
+        * page/animation/AnimationBase.cpp:
+        (WebCore::blendFunc):
+        (WebCore::PropertyWrapperShadow::blend):
+        (WebCore::AnimationBase::ensurePropertyMap): Support animations of box-shadow.
+        
+        * rendering/style/ShadowData.cpp: Store a flag to say if this is a -webkit-box-shadow.
+        (WebCore::ShadowData::ShadowData):
+        (WebCore::ShadowData::operator==):
+        * rendering/style/ShadowData.h:
+        (WebCore::ShadowData::ShadowData):
+        (WebCore::ShadowData::isWebkitBoxShadow):
+
 2010-12-22  Michael Saboff  <msaboff at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index fe62f62..b9420f5 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -76,6 +76,7 @@ static const int computedProperties[] = {
     CSSPropertyBorderTopStyle,
     CSSPropertyBorderTopWidth,
     CSSPropertyBottom,
+    CSSPropertyBoxShadow,
     CSSPropertyBoxSizing,
     CSSPropertyCaptionSide,
     CSSPropertyClear,
@@ -964,6 +965,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
         }
         case CSSPropertyWebkitBoxReflect:
             return valueForReflection(style->boxReflect(), style.get());
+        case CSSPropertyBoxShadow:
         case CSSPropertyWebkitBoxShadow:
             return valueForShadow(style->boxShadow(), propertyID, style.get());
         case CSSPropertyCaptionSide:
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index d9b133d..a36ad3c 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -1232,6 +1232,7 @@ bool CSSParser::parseValue(int propId, bool important)
         validPrimitive = validUnit(value, FLength | FPercent, m_strict);
         break;
     case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
+    case CSSPropertyBoxShadow:
     case CSSPropertyWebkitBoxShadow:
         if (id == CSSValueNone)
             validPrimitive = true;
@@ -4129,7 +4130,7 @@ struct ShadowParseContext {
         , allowBlur(false)
         , allowSpread(false)
         , allowColor(true)
-        , allowStyle(prop == CSSPropertyWebkitBoxShadow)
+        , allowStyle(prop == CSSPropertyWebkitBoxShadow || prop == CSSPropertyBoxShadow)
         , allowBreak(true)
     {
     }
@@ -4161,7 +4162,7 @@ struct ShadowParseContext {
         allowY = false;
         allowBlur = false;
         allowSpread = false;
-        allowStyle = property == CSSPropertyWebkitBoxShadow;
+        allowStyle = property == CSSPropertyWebkitBoxShadow || property == CSSPropertyBoxShadow;
     }
 
     void commitLength(CSSParserValue* v)
@@ -4180,12 +4181,12 @@ struct ShadowParseContext {
             allowY = false;
             allowBlur = true;
             allowColor = true;
-            allowStyle = property == CSSPropertyWebkitBoxShadow;
+            allowStyle = property == CSSPropertyWebkitBoxShadow || property == CSSPropertyBoxShadow;
             allowBreak = true;
         } else if (allowBlur) {
             blur = val.release();
             allowBlur = false;
-            allowSpread = property == CSSPropertyWebkitBoxShadow;
+            allowSpread = property == CSSPropertyWebkitBoxShadow || property == CSSPropertyBoxShadow;
         } else if (allowSpread) {
             spread = val.release();
             allowSpread = false;
@@ -4202,7 +4203,7 @@ struct ShadowParseContext {
         } else {
             allowBlur = false;
             allowSpread = false;
-            allowStyle = property == CSSPropertyWebkitBoxShadow;
+            allowStyle = property == CSSPropertyWebkitBoxShadow || property == CSSPropertyBoxShadow;
         }
     }
 
@@ -4234,7 +4235,7 @@ struct ShadowParseContext {
     bool allowBlur;
     bool allowSpread;
     bool allowColor;
-    bool allowStyle;
+    bool allowStyle; // inset or not.
     bool allowBreak;
 };
 
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index 8ace6d6..b04c6d6 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -70,6 +70,7 @@ border-top-style
 border-top-width
 border-width
 bottom
+box-shadow
 box-sizing
 caption-side
 clear
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index e90f9f0..e7d207a 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -4791,6 +4791,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         return;
     }
     case CSSPropertyTextShadow:
+    case CSSPropertyBoxShadow:
     case CSSPropertyWebkitBoxShadow: {
         if (isInherit) {
             if (id == CSSPropertyTextShadow)
@@ -4818,7 +4819,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             Color color;
             if (item->color)
                 color = getColorFromPrimitiveValue(item->color.get());
-            ShadowData* shadowData = new ShadowData(x, y, blur, spread, shadowStyle, color.isValid() ? color : Color::transparent);
+            ShadowData* shadowData = new ShadowData(x, y, blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent);
             if (id == CSSPropertyTextShadow)
                 m_style->setTextShadow(shadowData, i != 0);
             else
diff --git a/WebCore/css/SVGCSSStyleSelector.cpp b/WebCore/css/SVGCSSStyleSelector.cpp
index 5f3c46b..64665d4 100644
--- a/WebCore/css/SVGCSSStyleSelector.cpp
+++ b/WebCore/css/SVGCSSStyleSelector.cpp
@@ -569,7 +569,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             ASSERT(!item->spread);
             ASSERT(!item->style);
                 
-            ShadowData* shadowData = new ShadowData(x, y, blur, 0, Normal, color.isValid() ? color : Color::transparent);
+            ShadowData* shadowData = new ShadowData(x, y, blur, 0, Normal, false, color.isValid() ? color : Color::transparent);
             svgstyle->setShadow(shadowData);
             return;
         }
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp
index 1ba39d9..ab551bb 100644
--- a/WebCore/page/animation/AnimationBase.cpp
+++ b/WebCore/page/animation/AnimationBase.cpp
@@ -142,9 +142,13 @@ static inline ShadowStyle blendFunc(const AnimationBase* anim, ShadowStyle from,
 static inline ShadowData* blendFunc(const AnimationBase* anim, const ShadowData* from, const ShadowData* to, double progress)
 {  
     ASSERT(from && to);
-    return new ShadowData(blendFunc(anim, from->x(), to->x(), progress), blendFunc(anim, from->y(), to->y(), progress), 
-                          blendFunc(anim, from->blur(), to->blur(), progress), blendFunc(anim, from->spread(), to->spread(), progress),
-                          blendFunc(anim, from->style(), to->style(), progress), blendFunc(anim, from->color(), to->color(), progress));
+    return new ShadowData(blendFunc(anim, from->x(), to->x(), progress),
+                          blendFunc(anim, from->y(), to->y(), progress), 
+                          blendFunc(anim, from->blur(), to->blur(), progress),
+                          blendFunc(anim, from->spread(), to->spread(), progress),
+                          blendFunc(anim, from->style(), to->style(), progress),
+                          from->isWebkitBoxShadow(),
+                          blendFunc(anim, from->color(), to->color(), progress));
 }
 
 static inline TransformOperations blendFunc(const AnimationBase* anim, const TransformOperations& from, const TransformOperations& to, double progress)
@@ -354,7 +358,7 @@ public:
     {
         const ShadowData* shadowA = (a->*m_getter)();
         const ShadowData* shadowB = (b->*m_getter)();
-        ShadowData defaultShadowData(0, 0, 0, 0, Normal, Color::transparent);
+        ShadowData defaultShadowData(0, 0, 0, 0, Normal, property() == CSSPropertyWebkitBoxShadow, Color::transparent);
 
         ShadowData* newShadowData = 0;
         ShadowData* lastShadow = 0;
@@ -683,6 +687,7 @@ void AnimationBase::ensurePropertyMap()
         gPropertyWrappers->append(new PropertyWrapperMaybeInvalidColor(CSSPropertyBorderBottomColor, &RenderStyle::borderBottomColor, &RenderStyle::setBorderBottomColor));
         gPropertyWrappers->append(new PropertyWrapperMaybeInvalidColor(CSSPropertyOutlineColor, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor));
 
+        gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyBoxShadow, &RenderStyle::boxShadow, &RenderStyle::setBoxShadow));
         gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyWebkitBoxShadow, &RenderStyle::boxShadow, &RenderStyle::setBoxShadow));
         gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyTextShadow, &RenderStyle::textShadow, &RenderStyle::setTextShadow));
 
diff --git a/WebCore/rendering/style/ShadowData.cpp b/WebCore/rendering/style/ShadowData.cpp
index 3a8f81d..e8d381c 100644
--- a/WebCore/rendering/style/ShadowData.cpp
+++ b/WebCore/rendering/style/ShadowData.cpp
@@ -34,19 +34,26 @@ ShadowData::ShadowData(const ShadowData& o)
     , m_y(o.m_y)
     , m_blur(o.m_blur)
     , m_spread(o.m_spread)
-    , m_style(o.m_style)
     , m_color(o.m_color)
+    , m_style(o.m_style)
+    , m_isWebkitBoxShadow(o.m_isWebkitBoxShadow)
 {
     m_next = o.m_next ? new ShadowData(*o.m_next) : 0;
 }
 
 bool ShadowData::operator==(const ShadowData& o) const
 {
-    if ((m_next && !o.m_next) || (!m_next && o.m_next) ||
-        (m_next && o.m_next && *m_next != *o.m_next))
+    if ((m_next && !o.m_next) || (!m_next && o.m_next)
+        || (m_next && o.m_next && *m_next != *o.m_next))
         return false;
     
-    return m_x == o.m_x && m_y == o.m_y && m_blur == o.m_blur && m_spread == o.m_spread && m_style == o.m_style && m_color == o.m_color;
+    return m_x == o.m_x
+        && m_y == o.m_y
+        && m_blur == o.m_blur
+        && m_spread == o.m_spread
+        && m_style == o.m_style
+        && m_color == o.m_color
+        && m_isWebkitBoxShadow == o.m_isWebkitBoxShadow;
 }
 
 static inline void calculateShadowExtent(const ShadowData* shadow, int additionalOutlineSize, int& shadowLeft, int& shadowRight, int& shadowTop, int& shadowBottom)
diff --git a/WebCore/rendering/style/ShadowData.h b/WebCore/rendering/style/ShadowData.h
index ca83af0..fb5926d 100644
--- a/WebCore/rendering/style/ShadowData.h
+++ b/WebCore/rendering/style/ShadowData.h
@@ -45,17 +45,19 @@ public:
         , m_blur(0)
         , m_spread(0)
         , m_style(Normal)
+        , m_isWebkitBoxShadow(false)
         , m_next(0)
     {
     }
 
-    ShadowData(int x, int y, int blur, int spread, ShadowStyle style, const Color& color)
+    ShadowData(int x, int y, int blur, int spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
         : m_x(x)
         , m_y(y)
         , m_blur(blur)
         , m_spread(spread)
-        , m_style(style)
         , m_color(color)
+        , m_style(style)
+        , m_isWebkitBoxShadow(isWebkitBoxShadow)
         , m_next(0)
     {
     }
@@ -75,7 +77,8 @@ public:
     int spread() const { return m_spread; }
     ShadowStyle style() const { return m_style; }
     const Color& color() const { return m_color; }
-    
+    bool isWebkitBoxShadow() const { return m_isWebkitBoxShadow; }
+
     const ShadowData* next() const { return m_next; }
     void setNext(ShadowData* shadow) { m_next = shadow; }
 
@@ -87,8 +90,9 @@ private:
     int m_y;
     int m_blur;
     int m_spread;
-    ShadowStyle m_style;
     Color m_color;
+    ShadowStyle m_style;
+    bool m_isWebkitBoxShadow;
     ShadowData* m_next;
 };
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list