Title: [102191] branches/safari-534.53-branch
Revision
102191
Author
[email protected]
Date
2011-12-06 16:41:42 -0800 (Tue, 06 Dec 2011)

Log Message

Merged r95129.

Modified Paths

Added Paths

Diff

Modified: branches/safari-534.53-branch/LayoutTests/ChangeLog (102190 => 102191)


--- branches/safari-534.53-branch/LayoutTests/ChangeLog	2011-12-07 00:38:35 UTC (rev 102190)
+++ branches/safari-534.53-branch/LayoutTests/ChangeLog	2011-12-07 00:41:42 UTC (rev 102191)
@@ -1,5 +1,31 @@
 2011-12-06  Lucas Forschler  <[email protected]>
 
+    Merge 95129
+
+    2011-09-14  David Hyatt  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=52736
+
+            Tiles were not being properly centered within border image sides for the "repeat"
+            keyword. This patch fixes the buggy math behind the pattern tiling to actually get
+            the initial phases correct.
+
+            Reviewed by Sam Weinig.
+
+            * fast/borders/border-image-massive-scale.html: Added.
+            * fast/borders/border-image-scaled-gradient.html: Added.
+            * platform/mac/fast/borders/border-image-massive-scale-expected.png: Added.
+            * platform/mac/fast/borders/border-image-massive-scale-expected.txt: Added.
+            * platform/mac/fast/borders/border-image-outset-expected.png:
+            * platform/mac/fast/borders/border-image-outset-in-shorthand-expected.png:
+            * platform/mac/fast/borders/border-image-outset-split-inline-expected.png:
+            * platform/mac/fast/borders/border-image-outset-split-inline-vertical-lr-expected.png:
+            * platform/mac/fast/borders/border-image-scaled-gradient-expected.png: Added.
+            * platform/mac/fast/borders/border-image-scaled-gradient-expected.txt: Added.
+            * platform/mac/fast/borders/border-image-side-reduction-expected.png:
+
+2011-12-06  Lucas Forschler  <[email protected]>
+
     Merge 95121
 
     2011-09-14  David Hyatt  <[email protected]>

Copied: branches/safari-534.53-branch/LayoutTests/fast/borders/border-image-massive-scale.html (from rev 95129, trunk/LayoutTests/fast/borders/border-image-massive-scale.html) (0 => 102191)


--- branches/safari-534.53-branch/LayoutTests/fast/borders/border-image-massive-scale.html	                        (rev 0)
+++ branches/safari-534.53-branch/LayoutTests/fast/borders/border-image-massive-scale.html	2011-12-07 00:41:42 UTC (rev 102191)
@@ -0,0 +1,36 @@
+<html>
+<head>
+    <style>
+        div {
+            border-width: 105px 150px 150px 105px;
+            width: 75px;
+            height: 75px;
+            margin: 10px;
+            display: inline-block;
+        }
+
+        div.rr {
+            -webkit-border-image: url("resources/border-image.png") 21 30 30 21 repeat repeat;
+        }
+
+        div.rs {
+            -webkit-border-image: url("resources/border-image.png") 21 30 30 21 repeat stretch;
+        }
+
+        div.sr {
+            -webkit-border-image: url("resources/border-image.png") 21 30 30 21 stretch repeat;
+        }
+
+        div.ss {
+            -webkit-border-image: url("resources/border-image.png") 21 30 30 21 stretch stretch;
+        }
+    </style>
+</head>
+<body>
+    <div class="rr"></div>
+    <div class="rs"></div>
+    <br>
+    <div class="sr"></div>
+    <div class="ss"></div>
+</body>
+</html>

Copied: branches/safari-534.53-branch/LayoutTests/fast/borders/border-image-scaled-gradient.html (from rev 95129, trunk/LayoutTests/fast/borders/border-image-scaled-gradient.html) (0 => 102191)


--- branches/safari-534.53-branch/LayoutTests/fast/borders/border-image-scaled-gradient.html	                        (rev 0)
+++ branches/safari-534.53-branch/LayoutTests/fast/borders/border-image-scaled-gradient.html	2011-12-07 00:41:42 UTC (rev 102191)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+  <style>
+    div {
+      width: 300px;
+      height: 300px;
+      -webkit-border-image: -webkit-linear-gradient(30deg, black, white) 1 repeat;
+      border-image: -webkit-linear-gradient(30deg, black, white) 1 fill repeat;
+      border: 2px solid red;
+    }
+      
+  </style>
+</head>
+<body>
+  <div>
+  </div>
+</body>
+</html>

Copied: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-massive-scale-expected.png (from rev 95129, trunk/LayoutTests/platform/mac/fast/borders/border-image-massive-scale-expected.png)


(Binary files differ)

Copied: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-massive-scale-expected.txt (from rev 95129, trunk/LayoutTests/platform/mac/fast/borders/border-image-massive-scale-expected.txt) (0 => 102191)


--- branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-massive-scale-expected.txt	                        (rev 0)
+++ branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-massive-scale-expected.txt	2011-12-07 00:41:42 UTC (rev 102191)
@@ -0,0 +1,17 @@
+layer at (0,0) size 785x724
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x724
+  RenderBlock {HTML} at (0,0) size 785x724
+    RenderBody {BODY} at (8,8) size 769x708
+      RenderBlock {DIV} at (10,10) size 330x330 [border: (105px none #000000) (150px none #000000) (105px none #000000)]
+      RenderText {#text} at (350,336) size 4x18
+        text run at (350,336) width 4: " "
+      RenderBlock {DIV} at (364,10) size 330x330 [border: (105px none #000000) (150px none #000000) (105px none #000000)]
+      RenderText {#text} at (704,336) size 4x18
+        text run at (704,336) width 4: " "
+      RenderBR {BR} at (0,0) size 0x0
+      RenderBlock {DIV} at (10,364) size 330x330 [border: (105px none #000000) (150px none #000000) (105px none #000000)]
+      RenderText {#text} at (350,690) size 4x18
+        text run at (350,690) width 4: " "
+      RenderBlock {DIV} at (364,364) size 330x330 [border: (105px none #000000) (150px none #000000) (105px none #000000)]
+      RenderText {#text} at (0,0) size 0x0

Modified: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-outset-expected.png


(Binary files differ)

Modified: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-outset-in-shorthand-expected.png


(Binary files differ)

Modified: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-outset-split-inline-expected.png


(Binary files differ)

Modified: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-outset-split-inline-vertical-lr-expected.png


(Binary files differ)

Copied: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-scaled-gradient-expected.png (from rev 95129, trunk/LayoutTests/platform/mac/fast/borders/border-image-scaled-gradient-expected.png)


(Binary files differ)

Copied: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-scaled-gradient-expected.txt (from rev 95129, trunk/LayoutTests/platform/mac/fast/borders/border-image-scaled-gradient-expected.txt) (0 => 102191)


--- branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-scaled-gradient-expected.txt	                        (rev 0)
+++ branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-scaled-gradient-expected.txt	2011-12-07 00:41:42 UTC (rev 102191)
@@ -0,0 +1,6 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x320
+  RenderBlock {HTML} at (0,0) size 800x320
+    RenderBody {BODY} at (8,8) size 784x304
+      RenderBlock {DIV} at (0,0) size 304x304 [border: (2px solid #FF0000)]

Modified: branches/safari-534.53-branch/LayoutTests/platform/mac/fast/borders/border-image-side-reduction-expected.png


(Binary files differ)

Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102190 => 102191)


--- branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-07 00:38:35 UTC (rev 102190)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-07 00:41:42 UTC (rev 102191)
@@ -1,5 +1,24 @@
 2011-12-06  Lucas Forschler  <[email protected]>
 
+    Merge 95129
+
+    2011-09-14  David Hyatt  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=52736
+
+            Tiles were not being properly centered within border image sides for the "repeat"
+            keyword. This patch fixes the buggy math behind the pattern tiling to actually get
+            the initial phases correct.
+
+            Reviewed by Sam Weinig.
+
+            Added new tests in fast/borders and updated broken existing tests.
+
+            * platform/graphics/Image.cpp:
+            (WebCore::Image::drawTiled):
+
+2011-12-06  Lucas Forschler  <[email protected]>
+
     Merge 95121
 
     2011-09-14  David Hyatt  <[email protected]>

Modified: branches/safari-534.53-branch/Source/WebCore/platform/graphics/Image.cpp (102190 => 102191)


--- branches/safari-534.53-branch/Source/WebCore/platform/graphics/Image.cpp	2011-12-07 00:38:35 UTC (rev 102190)
+++ branches/safari-534.53-branch/Source/WebCore/platform/graphics/Image.cpp	2011-12-07 00:41:42 UTC (rev 102191)
@@ -152,10 +152,12 @@
     // set for a particular rule).
     float hPhase = tileScaleFactor.width() * srcRect.x();
     float vPhase = tileScaleFactor.height() * srcRect.y();
+    float scaledTileWidth = tileScaleFactor.width() * srcRect.width();
+    float scaledTileHeight = tileScaleFactor.height() * srcRect.height();
     if (hRule == Image::RepeatTile)
-        hPhase -= fmodf(dstRect.width(), tileScaleFactor.width() * srcRect.width()) / 2.0f;
+        hPhase -= (dstRect.width() - scaledTileWidth) / 2;
     if (vRule == Image::RepeatTile)
-        vPhase -= fmodf(dstRect.height(), tileScaleFactor.height() * srcRect.height()) / 2.0f;
+        vPhase -= (dstRect.height() - scaledTileHeight) / 2; 
     FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase);
     
     drawPattern(ctxt, srcRect, patternTransform, patternPhase, styleColorSpace, op, dstRect);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to