[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jamesr at google.com
jamesr at google.com
Wed Dec 22 14:36:37 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 59c04f6579cbb5d48f83da8371ed8f8aea6e669c
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 14 02:13:10 2010 +0000
2010-09-23 James Robinson <jamesr at chromium.org>
Reviewed by Darin Adler.
Canvas: radialGradient with negative radius should throw exception
https://bugs.webkit.org/show_bug.cgi?id=37176
Remove test from skipped lists now that it passes.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
2010-10-13 James Robinson <jamesr at chromium.org>
Reviewed by Darin Adler.
Throw INDEX_SIZE_ERR exception if createRadialGradient is called with a negative radius
Canvas: radialGradient with negative radius should throw exception
https://bugs.webkit.org/show_bug.cgi?id=37176
This matches the canvas 2d specification, Opera, IE9 beta and our behavior for arc()
and arcTo(). Also fixes some PassRefPtr/RefPtr errors in this file.
Test: canvas/philip/tests/2d.gradient.radial.negative.html
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createLinearGradient):
(WebCore::CanvasRenderingContext2D::createRadialGradient):
(WebCore::createEmptyImageData):
(WebCore::CanvasRenderingContext2D::measureText):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 67a983b..96c6c0b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-23 James Robinson <jamesr at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Canvas: radialGradient with negative radius should throw exception
+ https://bugs.webkit.org/show_bug.cgi?id=37176
+
+ Remove test from skipped lists now that it passes.
+
+ * platform/chromium/test_expectations.txt:
+ * platform/gtk/Skipped:
+ * platform/mac/Skipped:
+ * platform/qt/Skipped:
+
2010-10-13 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Nate Chapin.
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index d174099..b9d237a 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -2568,7 +2568,6 @@ BUG45991 : canvas/philip/tests/2d.fillStyle.parse.current.basic.html = TEXT PASS
BUG45991 : canvas/philip/tests/2d.fillStyle.parse.current.changed.html = TEXT PASS
BUG45991 : canvas/philip/tests/2d.fillStyle.parse.current.removed.html = TEXT PASS
BUG45991 : canvas/philip/tests/2d.fillStyle.parse.system.html = TEXT PASS
-BUG45991 : canvas/philip/tests/2d.gradient.radial.negative.html = TEXT PASS
BUG45991 : canvas/philip/tests/2d.imageData.get.source.negative.html = TEXT PASS
BUG45991 : canvas/philip/tests/2d.path.rect.winding.html = TEXT PASS
BUG45991 : canvas/philip/tests/2d.pattern.image.undefined.html = TEXT PASS
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 5f9a2bd..2de0b87 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5571,7 +5571,6 @@ canvas/philip/tests/2d.gradient.radial.cone.front.html
canvas/philip/tests/2d.gradient.radial.cone.top.html
canvas/philip/tests/2d.gradient.radial.inside2.html
canvas/philip/tests/2d.gradient.radial.inside3.html
-canvas/philip/tests/2d.gradient.radial.negative.html
canvas/philip/tests/2d.gradient.radial.outside1.html
canvas/philip/tests/2d.imageData.create1.type.html
canvas/philip/tests/2d.imageData.create2.type.html
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 989eebc..820d3bf 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -177,7 +177,6 @@ canvas/philip/tests/2d.gradient.radial.cone.front.html
canvas/philip/tests/2d.gradient.radial.cone.top.html
canvas/philip/tests/2d.gradient.radial.inside2.html
canvas/philip/tests/2d.gradient.radial.inside3.html
-canvas/philip/tests/2d.gradient.radial.negative.html
canvas/philip/tests/2d.gradient.radial.outside1.html
canvas/philip/tests/2d.imageData.create1.type.html
canvas/philip/tests/2d.imageData.create2.type.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index ed7c357..d94637a 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5188,7 +5188,6 @@ canvas/philip/tests/2d.gradient.radial.cone.bottom.html
canvas/philip/tests/2d.gradient.radial.cone.cylinder.html
canvas/philip/tests/2d.gradient.radial.cone.shape2.html
canvas/philip/tests/2d.gradient.radial.cone.top.html
-canvas/philip/tests/2d.gradient.radial.negative.html
canvas/philip/tests/2d.gradient.radial.touch1.html
canvas/philip/tests/2d.gradient.radial.touch2.html
canvas/philip/tests/2d.gradient.radial.touch3.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0ba76aa..7ecc006 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-13 James Robinson <jamesr at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Throw INDEX_SIZE_ERR exception if createRadialGradient is called with a negative radius
+ Canvas: radialGradient with negative radius should throw exception
+ https://bugs.webkit.org/show_bug.cgi?id=37176
+
+ This matches the canvas 2d specification, Opera, IE9 beta and our behavior for arc()
+ and arcTo(). Also fixes some PassRefPtr/RefPtr errors in this file.
+
+ Test: canvas/philip/tests/2d.gradient.radial.negative.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::createLinearGradient):
+ (WebCore::CanvasRenderingContext2D::createRadialGradient):
+ (WebCore::createEmptyImageData):
+ (WebCore::CanvasRenderingContext2D::measureText):
+
2010-10-13 Fridrich Strba <fridrich.strba at bluewin.ch>
Reviewed by Darin Adler.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 9c60230..be90930 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -1402,9 +1402,9 @@ PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createLinearGradient(float
return 0;
}
- PassRefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0), FloatPoint(x1, y1));
+ RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0), FloatPoint(x1, y1));
prepareGradientForDashboard(gradient.get());
- return gradient;
+ return gradient.release();
}
PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionCode& ec)
@@ -1413,9 +1413,15 @@ PassRefPtr<CanvasGradient> CanvasRenderingContext2D::createRadialGradient(float
ec = NOT_SUPPORTED_ERR;
return 0;
}
- PassRefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1);
+
+ if (r0 < 0 || r1 < 0) {
+ ec = INDEX_SIZE_ERR;
+ return 0;
+ }
+
+ RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1);
prepareGradientForDashboard(gradient.get());
- return gradient;
+ return gradient.release();
}
PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLImageElement* image,
@@ -1513,7 +1519,7 @@ static PassRefPtr<ImageData> createEmptyImageData(const IntSize& size)
{
RefPtr<ImageData> data = ImageData::create(size.width(), size.height());
memset(data->data()->data()->data(), 0, data->data()->data()->length());
- return data.get();
+ return data.release();
}
PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(PassRefPtr<ImageData> imageData, ExceptionCode& ec) const
@@ -1732,7 +1738,7 @@ PassRefPtr<TextMetrics> CanvasRenderingContext2D::measureText(const String& text
Font::setCodePath(oldCodePath);
#endif
- return metrics;
+ return metrics.release();
}
void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, float y, bool fill, float /*maxWidth*/, bool /*useMaxWidth*/)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list