[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
dglazkov at chromium.org
dglazkov at chromium.org
Wed Dec 22 13:32:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 47921722837045764d4e92cb90941cc994aeab1e
Author: dglazkov at chromium.org <dglazkov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Sep 18 23:48:50 2010 +0000
2010-09-18 Dimitri Glazkov <dglazkov at chromium.org>
Unreviewed, rolling out r67792.
http://trac.webkit.org/changeset/67792
https://bugs.webkit.org/show_bug.cgi?id=45976
Broke over a hundred SVG tests.
* canvas/philip/tests/2d.drawImage.negativeOneDest-expected.txt: Removed.
* canvas/philip/tests/2d.drawImage.negativeOneDest.html: Removed.
* canvas/philip/tests/2d.drawImage.negativeOneSource-expected.txt: Removed.
* canvas/philip/tests/2d.drawImage.negativeOneSource.html: Removed.
2010-09-18 Dimitri Glazkov <dglazkov at chromium.org>
Unreviewed, rolling out r67792.
http://trac.webkit.org/changeset/67792
https://bugs.webkit.org/show_bug.cgi?id=45976
Broke over a hundred SVG tests.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawImageBuffer):
* platform/graphics/GraphicsContext.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e1e2bca..7a8f396 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-18 Dimitri Glazkov <dglazkov at chromium.org>
+
+ Unreviewed, rolling out r67792.
+ http://trac.webkit.org/changeset/67792
+ https://bugs.webkit.org/show_bug.cgi?id=45976
+
+ Broke over a hundred SVG tests.
+
+ * canvas/philip/tests/2d.drawImage.negativeOneDest-expected.txt: Removed.
+ * canvas/philip/tests/2d.drawImage.negativeOneDest.html: Removed.
+ * canvas/philip/tests/2d.drawImage.negativeOneSource-expected.txt: Removed.
+ * canvas/philip/tests/2d.drawImage.negativeOneSource.html: Removed.
+
2010-09-18 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
diff --git a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneDest-expected.txt b/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneDest-expected.txt
deleted file mode 100644
index 42ada98..0000000
--- a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneDest-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-2d.drawImage.negativeOneDest
--1 dest width/height represents the correct rectangle
-References: 2d.drawImage.direction
-Actual output:
-Expected output:
-
-Passed
-
diff --git a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneDest.html b/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneDest.html
deleted file mode 100644
index 93ec9b6..0000000
--- a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneDest.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<title>Canvas test: 2d.drawImage.negativeOneDest</title>
-<script src="../tests.js"></script>
-<link rel="stylesheet" href="../tests.css">
-<body class="show_output">
-<p>
-<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.negativeOneDest</h1>
-<p class="desc">-1 dest width/height represents the correct rectangle</p>
-<div class="refs">References:
-<ul>
-<li><a href="spec.html#testrefs.2d.drawImage.direction">2d.drawImage.direction</a>
-
-</ul>
-</div>
-
-<p class="output">Actual output:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = document.getElementById('ggrr-256x256.png');
-ctx.drawImage(img, 128, 128, 1, 1, 0, 0, -1, -1);
-
-//ctx.drawImage(canvas, 24, 24, 1, 1, 0, 0, 100, 50);
-
-_assertPixelApprox(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
-
-
-});
-</script>
-<img src="../images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
-
diff --git a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneSource-expected.txt b/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneSource-expected.txt
deleted file mode 100644
index cf3517a..0000000
--- a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneSource-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-2d.drawImage.negativeOneSource
--1 source width/height represents the correct rectangle
-References: 2d.drawImage.direction
-Actual output:
-Expected output:
-
-Passed
-
diff --git a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneSource.html b/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneSource.html
deleted file mode 100644
index 2e49594..0000000
--- a/LayoutTests/canvas/philip/tests/2d.drawImage.negativeOneSource.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<title>Canvas test: 2d.drawImage.negativeOneSource</title>
-<script src="../tests.js"></script>
-<link rel="stylesheet" href="../tests.css">
-<body class="show_output">
-<p>
-<h1><a href="index.2d.html">2d</a>.<a href="index.2d.drawImage.html">drawImage</a>.negativeOneSource</h1>
-<p class="desc">-1 source width/height represents the correct rectangle</p>
-<div class="refs">References:
-<ul>
-<li><a href="spec.html#testrefs.2d.drawImage.direction">2d.drawImage.direction</a>
-
-</ul>
-</div>
-
-<p class="output">Actual output:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var img = document.getElementById('ggrr-256x256.png');
-ctx.drawImage(img, 128, 128, -1, -1, 0, 0, 100, 50);
-
-_assertPixelApprox(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
-
-
-});
-</script>
-<img src="../images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
-
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index da7d227..5a1c203 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-18 Dimitri Glazkov <dglazkov at chromium.org>
+
+ Unreviewed, rolling out r67792.
+ http://trac.webkit.org/changeset/67792
+ https://bugs.webkit.org/show_bug.cgi?id=45976
+
+ Broke over a hundred SVG tests.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::drawImage):
+ (WebCore::GraphicsContext::drawImageBuffer):
+ * platform/graphics/GraphicsContext.h:
+
2010-09-18 Mihai Parparita <mihaip at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/platform/graphics/GraphicsContext.cpp b/WebCore/platform/graphics/GraphicsContext.cpp
index 747c9fc..2c94bec 100644
--- a/WebCore/platform/graphics/GraphicsContext.cpp
+++ b/WebCore/platform/graphics/GraphicsContext.cpp
@@ -309,6 +309,26 @@ bool GraphicsContext::paintingDisabled() const
return m_common->state.paintingDisabled;
}
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op)
+{
+ drawImage(image, styleColorSpace, p, IntRect(0, 0, -1, -1), op);
+}
+
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, bool useLowQualityScale)
+{
+ drawImage(image, styleColorSpace, r, IntRect(0, 0, -1, -1), op, useLowQualityScale);
+}
+
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op)
+{
+ drawImage(image, styleColorSpace, IntRect(dest, srcRect.size()), srcRect, op);
+}
+
+void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, bool useLowQualityScale)
+{
+ drawImage(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale);
+}
+
#if !OS(WINCE) || PLATFORM(QT)
void GraphicsContext::drawText(const Font& font, const TextRun& run, const IntPoint& point, int from, int to)
{
@@ -363,30 +383,6 @@ void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run,
fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor, colorSpace);
}
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op)
-{
- if (!image)
- return;
- drawImage(image, styleColorSpace, p, IntRect(0, 0, image->width(), image->height()), op);
-}
-
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, bool useLowQualityScale)
-{
- if (!image)
- return;
- drawImage(image, styleColorSpace, r, IntRect(0, 0, image->width(), image->height()), op, useLowQualityScale);
-}
-
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op)
-{
- drawImage(image, styleColorSpace, IntRect(dest, srcRect.size()), srcRect, op);
-}
-
-void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, bool useLowQualityScale)
-{
- drawImage(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale);
-}
-
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale)
{
if (paintingDisabled() || !image)
@@ -397,6 +393,16 @@ void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const
float tw = dest.width();
float th = dest.height();
+ if (tsw == -1)
+ tsw = image->width();
+ if (tsh == -1)
+ tsh = image->height();
+
+ if (tw == -1)
+ tw = image->width();
+ if (th == -1)
+ th = image->height();
+
if (useLowQualityScale) {
save();
setImageInterpolationQuality(InterpolationNone);
@@ -439,16 +445,12 @@ void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, c
void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op)
{
- if (!image)
- return;
- drawImageBuffer(image, styleColorSpace, p, IntRect(0, 0, image->width(), image->height()), op);
+ drawImageBuffer(image, styleColorSpace, p, IntRect(0, 0, -1, -1), op);
}
void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, bool useLowQualityScale)
{
- if (!image)
- return;
- drawImageBuffer(image, styleColorSpace, r, IntRect(0, 0, image->width(), image->height()), op, useLowQualityScale);
+ drawImageBuffer(image, styleColorSpace, r, IntRect(0, 0, -1, -1), op, useLowQualityScale);
}
void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op)
@@ -466,6 +468,21 @@ void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorS
if (paintingDisabled() || !image)
return;
+ float tsw = src.width();
+ float tsh = src.height();
+ float tw = dest.width();
+ float th = dest.height();
+
+ if (tsw == -1)
+ tsw = image->width();
+ if (tsh == -1)
+ tsh = image->height();
+
+ if (tw == -1)
+ tw = image->width();
+ if (th == -1)
+ th = image->height();
+
if (useLowQualityScale) {
save();
setImageInterpolationQuality(InterpolationNone);
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index e57951f..cb045e1 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -235,8 +235,8 @@ namespace WebCore {
void drawImage(Image*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver);
void drawImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
- void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
-
+ void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1),
+ CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize,
CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect,
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list