Title: [111205] trunk
Revision
111205
Author
[email protected]
Date
2012-03-19 11:02:37 -0700 (Mon, 19 Mar 2012)

Log Message

CSS3 calc: make mask images work with mixed percent/absolute
https://bugs.webkit.org/show_bug.cgi?id=81477

Reviewed by Ojan Vafai.

Source/WebCore:

Test: css3/calc/simple-composited-mask-expected.html

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):

LayoutTests:

* css3/calc/simple-composited-mask-expected.html: Renamed from LayoutTests/css3/calc/simple-composited-mask-expected-mismatch.html.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (111204 => 111205)


--- trunk/LayoutTests/ChangeLog	2012-03-19 17:52:18 UTC (rev 111204)
+++ trunk/LayoutTests/ChangeLog	2012-03-19 18:02:37 UTC (rev 111205)
@@ -1,3 +1,12 @@
+2012-03-19  Mike Lawther  <[email protected]>
+
+        CSS3 calc: make mask images work with mixed percent/absolute
+        https://bugs.webkit.org/show_bug.cgi?id=81477
+
+        Reviewed by Ojan Vafai.
+
+        * css3/calc/simple-composited-mask-expected.html: Renamed from LayoutTests/css3/calc/simple-composited-mask-expected-mismatch.html.
+
 2012-03-19  Alexey Proskuryakov  <[email protected]>
 
         FAILED: m_loadState == LoadStateProvisional on http/tests/multipart/load-last-non-html-frame.php

Deleted: trunk/LayoutTests/css3/calc/simple-composited-mask-expected-mismatch.html (111204 => 111205)


--- trunk/LayoutTests/css3/calc/simple-composited-mask-expected-mismatch.html	2012-03-19 17:52:18 UTC (rev 111204)
+++ trunk/LayoutTests/css3/calc/simple-composited-mask-expected-mismatch.html	2012-03-19 18:02:37 UTC (rev 111205)
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<style>
-    #container {
-        height: 760px;
-        width: 260px;
-        border: solid black;
-        display: inline-block;
-    }
-    .box {
-        position: relative;
-        width: 200px;
-        height: 200px;
-        margin: 30px;
-        border: 10px solid black;
-        background-color: rgba(100, 100, 255, 0.8);
-        -webkit-box-sizing: border-box;
-        -webkit-box-shadow: black 0 4px 4px;
-    }
-
-    #container .masked {
-        -webkit-mask-image: url(resources/alpha-gradient.png);
-        -webkit-mask-repeat: repeat;
-        -webkit-mask-size: 50px;
-    }
-</style>
-<p>Testing masks on compositing layers.</p>
-<div id="container">
-    <div class="masked box"></div>
-    <div class="masked box"></div>
-    <div class="masked box"></div>
-</div>

Copied: trunk/LayoutTests/css3/calc/simple-composited-mask-expected.html (from rev 111204, trunk/LayoutTests/css3/calc/simple-composited-mask-expected-mismatch.html) (0 => 111205)


--- trunk/LayoutTests/css3/calc/simple-composited-mask-expected.html	                        (rev 0)
+++ trunk/LayoutTests/css3/calc/simple-composited-mask-expected.html	2012-03-19 18:02:37 UTC (rev 111205)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<style>
+    #container {
+        height: 760px;
+        width: 260px;
+        border: solid black;
+        display: inline-block;
+    }
+    .box {
+        position: relative;
+        width: 200px;
+        height: 200px;
+        margin: 30px;
+        border: 10px solid black;
+        background-color: rgba(100, 100, 255, 0.8);
+        -webkit-box-sizing: border-box;
+        -webkit-box-shadow: black 0 4px 4px;
+    }
+
+    #container .masked {
+        -webkit-mask-image: url(resources/alpha-gradient.png);
+        -webkit-mask-repeat: repeat;
+        -webkit-mask-size: 50px;
+    }
+</style>
+<p>Testing masks on compositing layers.</p>
+<div id="container">
+    <div class="masked box"></div>
+    <div class="masked box"></div>
+    <div class="masked box"></div>
+</div>

Modified: trunk/Source/WebCore/ChangeLog (111204 => 111205)


--- trunk/Source/WebCore/ChangeLog	2012-03-19 17:52:18 UTC (rev 111204)
+++ trunk/Source/WebCore/ChangeLog	2012-03-19 18:02:37 UTC (rev 111205)
@@ -1,3 +1,15 @@
+2012-03-19  Mike Lawther  <[email protected]>
+
+        CSS3 calc: make mask images work with mixed percent/absolute
+        https://bugs.webkit.org/show_bug.cgi?id=81477
+
+        Reviewed by Ojan Vafai.
+
+        Test: css3/calc/simple-composited-mask-expected.html
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::collectMatchingRulesForList):
+
 2012-03-19  Mark Pilgrim  <[email protected]>
 
         Style cleanup in Modules/filesystem/

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (111204 => 111205)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-03-19 17:52:18 UTC (rev 111204)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-03-19 18:02:37 UTC (rev 111205)
@@ -4224,6 +4224,8 @@
         firstLength = first->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
     else if (first->isPercentage())
         firstLength = Length(first->getDoubleValue(), Percent);
+    else if (first->isCalculatedPercentageWithLength())
+        firstLength = Length(first->cssCalcValue()->toCalcValue(style(), m_rootElementStyle, zoomFactor));
     else
         return;
 
@@ -4233,6 +4235,8 @@
         secondLength = second->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
     else if (second->isPercentage())
         secondLength = Length(second->getDoubleValue(), Percent);
+    else if (second->isCalculatedPercentageWithLength())
+        secondLength = Length(second->cssCalcValue()->toCalcValue(style(), m_rootElementStyle, zoomFactor));
     else
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to