Diff
Modified: trunk/LayoutTests/ChangeLog (199775 => 199776)
--- trunk/LayoutTests/ChangeLog 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/LayoutTests/ChangeLog 2016-04-20 17:40:02 UTC (rev 199776)
@@ -1,5 +1,17 @@
2016-04-20 Chris Dumez <cdu...@apple.com>
+ Drop [UsePointersEvenForNonNullableObjectArguments] from several Canvas interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=156781
+
+ Reviewed by Darin Adler.
+
+ Update outdated test which expected a legacy TYPE_MISMATCH_ERR exception
+ to be thrown when passing null instead of the newer TypeError.
+
+ * canvas/philip/tests/2d.drawImage.null.html:
+
+2016-04-20 Chris Dumez <cdu...@apple.com>
+
Drop [UsePointersEvenForNonNullableObjectArguments] from WebAudio
https://bugs.webkit.org/show_bug.cgi?id=156777
Modified: trunk/LayoutTests/canvas/philip/tests/2d.drawImage.null.html (199775 => 199776)
--- trunk/LayoutTests/canvas/philip/tests/2d.drawImage.null.html 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/LayoutTests/canvas/philip/tests/2d.drawImage.null.html 2016-04-20 17:40:02 UTC (rev 199776)
@@ -14,7 +14,7 @@
try { var _thrown = false;
ctx.drawImage(null, 0, 0);
-} catch (e) { if (e.code != DOMException.TYPE_MISMATCH_ERR) _fail("Failed assertion: expected exception of type TYPE_MISMATCH_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TYPE_MISMATCH_ERR: ctx.drawImage(null, 0, 0)"); }
+} catch (e) { if (e.name != "TypeError") _fail("Failed assertion: expected TypeError exception, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw TypeError exception: ctx.drawImage(null, 0, 0)"); }
});
Modified: trunk/Source/WebCore/ChangeLog (199775 => 199776)
--- trunk/Source/WebCore/ChangeLog 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/ChangeLog 2016-04-20 17:40:02 UTC (rev 199776)
@@ -1,5 +1,31 @@
2016-04-20 Chris Dumez <cdu...@apple.com>
+ Drop [UsePointersEvenForNonNullableObjectArguments] from several Canvas interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=156781
+
+ Reviewed by Darin Adler.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::fill):
+ (WebCore::CanvasRenderingContext2D::stroke):
+ (WebCore::CanvasRenderingContext2D::clip):
+ (WebCore::CanvasRenderingContext2D::isPointInPath):
+ (WebCore::CanvasRenderingContext2D::isPointInStroke):
+ (WebCore::size):
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ (WebCore::CanvasRenderingContext2D::drawImageFromRect):
+ (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
+ * html/canvas/CanvasRenderingContext2D.h:
+ * html/canvas/CanvasRenderingContext2D.idl:
+ * html/canvas/DOMPath.h:
+ * html/canvas/DOMPath.idl:
+ * html/canvas/WebGLDebugShaders.cpp:
+ (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
+ * html/canvas/WebGLDebugShaders.h:
+ * html/canvas/WebGLDebugShaders.idl:
+
+2016-04-20 Chris Dumez <cdu...@apple.com>
+
Drop [UsePointersEvenForNonNullableObjectArguments] from WebAudio
https://bugs.webkit.org/show_bug.cgi?id=156777
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp 2016-04-20 17:40:02 UTC (rev 199776)
@@ -984,19 +984,19 @@
#endif
}
-void CanvasRenderingContext2D::fill(DOMPath* path, const String& windingRuleString)
+void CanvasRenderingContext2D::fill(DOMPath& path, const String& windingRuleString)
{
- fillInternal(path->path(), windingRuleString);
+ fillInternal(path.path(), windingRuleString);
}
-void CanvasRenderingContext2D::stroke(DOMPath* path)
+void CanvasRenderingContext2D::stroke(DOMPath& path)
{
- strokeInternal(path->path());
+ strokeInternal(path.path());
}
-void CanvasRenderingContext2D::clip(DOMPath* path, const String& windingRuleString)
+void CanvasRenderingContext2D::clip(DOMPath& path, const String& windingRuleString)
{
- clipInternal(path->path(), windingRuleString);
+ clipInternal(path.path(), windingRuleString);
}
void CanvasRenderingContext2D::fillInternal(const Path& path, const String& windingRuleString)
@@ -1109,14 +1109,14 @@
return isPointInStrokeInternal(m_path, x, y);
}
-bool CanvasRenderingContext2D::isPointInPath(DOMPath* path, const float x, const float y, const String& windingRuleString)
+bool CanvasRenderingContext2D::isPointInPath(DOMPath& path, const float x, const float y, const String& windingRuleString)
{
- return isPointInPathInternal(path->path(), x, y, windingRuleString);
+ return isPointInPathInternal(path.path(), x, y, windingRuleString);
}
-bool CanvasRenderingContext2D::isPointInStroke(DOMPath* path, const float x, const float y)
+bool CanvasRenderingContext2D::isPointInStroke(DOMPath& path, const float x, const float y)
{
- return isPointInStrokeInternal(path->path(), x, y);
+ return isPointInStrokeInternal(path.path(), x, y);
}
bool CanvasRenderingContext2D::isPointInPathInternal(const Path& path, float x, float y, const String& windingRuleString)
@@ -1350,22 +1350,22 @@
ImageSizeBeforeDevicePixelRatio
};
-static LayoutSize size(HTMLImageElement* imageElement, ImageSizeType sizeType)
+static LayoutSize size(HTMLImageElement& imageElement, ImageSizeType sizeType)
{
LayoutSize size;
- if (CachedImage* cachedImage = imageElement->cachedImage()) {
- size = cachedImage->imageSizeForRenderer(imageElement->renderer(), 1.0f); // FIXME: Not sure about this.
+ if (CachedImage* cachedImage = imageElement.cachedImage()) {
+ size = cachedImage->imageSizeForRenderer(imageElement.renderer(), 1.0f); // FIXME: Not sure about this.
- if (sizeType == ImageSizeAfterDevicePixelRatio && is<RenderImage>(imageElement->renderer()) && cachedImage->image() && !cachedImage->image()->hasRelativeWidth())
- size.scale(downcast<RenderImage>(*imageElement->renderer()).imageDevicePixelRatio());
+ if (sizeType == ImageSizeAfterDevicePixelRatio && is<RenderImage>(imageElement.renderer()) && cachedImage->image() && !cachedImage->image()->hasRelativeWidth())
+ size.scale(downcast<RenderImage>(*imageElement.renderer()).imageDevicePixelRatio());
}
return size;
}
#if ENABLE(VIDEO)
-static FloatSize size(HTMLVideoElement* video)
+static FloatSize size(HTMLVideoElement& video)
{
- if (MediaPlayer* player = video->player())
+ if (MediaPlayer* player = video.player())
return player->naturalSize();
return FloatSize();
}
@@ -1379,46 +1379,33 @@
std::max(rect.height(), -rect.height()));
}
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* imageElement, float x, float y, ExceptionCode& ec)
+void CanvasRenderingContext2D::drawImage(HTMLImageElement& imageElement, float x, float y, ExceptionCode& ec)
{
- if (!imageElement) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
LayoutSize destRectSize = size(imageElement, ImageSizeAfterDevicePixelRatio);
drawImage(imageElement, x, y, destRectSize.width(), destRectSize.height(), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* imageElement,
+void CanvasRenderingContext2D::drawImage(HTMLImageElement& imageElement,
float x, float y, float width, float height, ExceptionCode& ec)
{
- if (!imageElement) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
LayoutSize sourceRectSize = size(imageElement, ImageSizeBeforeDevicePixelRatio);
drawImage(imageElement, FloatRect(0, 0, sourceRectSize.width(), sourceRectSize.height()), FloatRect(x, y, width, height), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* imageElement,
+void CanvasRenderingContext2D::drawImage(HTMLImageElement& imageElement,
float sx, float sy, float sw, float sh,
float dx, float dy, float dw, float dh, ExceptionCode& ec)
{
drawImage(imageElement, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* imageElement, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode& ec)
+void CanvasRenderingContext2D::drawImage(HTMLImageElement& imageElement, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode& ec)
{
drawImage(imageElement, srcRect, dstRect, state().globalComposite, state().globalBlend, ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* imageElement, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator& op, const BlendMode& blendMode, ExceptionCode& ec)
+void CanvasRenderingContext2D::drawImage(HTMLImageElement& imageElement, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator& op, const BlendMode& blendMode, ExceptionCode& ec)
{
- if (!imageElement) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
-
ec = 0;
if (!std::isfinite(dstRect.x()) || !std::isfinite(dstRect.y()) || !std::isfinite(dstRect.width()) || !std::isfinite(dstRect.height())
@@ -1428,7 +1415,7 @@
if (!dstRect.width() || !dstRect.height())
return;
- if (!imageElement->complete())
+ if (!imageElement.complete())
return;
FloatRect normalizedSrcRect = normalizeRect(srcRect);
@@ -1448,11 +1435,11 @@
if (!state().hasInvertibleTransform)
return;
- CachedImage* cachedImage = imageElement->cachedImage();
+ CachedImage* cachedImage = imageElement.cachedImage();
if (!cachedImage)
return;
- Image* image = cachedImage->imageForRenderer(imageElement->renderer());
+ Image* image = cachedImage->imageForRenderer(imageElement.renderer());
if (!image)
return;
@@ -1481,37 +1468,32 @@
if (image->isSVGImage())
image->setImageObserver(observer);
- checkOrigin(imageElement);
+ checkOrigin(&imageElement);
}
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, float x, float y, ExceptionCode& ec)
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement& sourceCanvas, float x, float y, ExceptionCode& ec)
{
- drawImage(sourceCanvas, 0, 0, sourceCanvas->width(), sourceCanvas->height(), x, y, sourceCanvas->width(), sourceCanvas->height(), ec);
+ drawImage(sourceCanvas, 0, 0, sourceCanvas.width(), sourceCanvas.height(), x, y, sourceCanvas.width(), sourceCanvas.height(), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas,
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement& sourceCanvas,
float x, float y, float width, float height, ExceptionCode& ec)
{
- drawImage(sourceCanvas, FloatRect(0, 0, sourceCanvas->width(), sourceCanvas->height()), FloatRect(x, y, width, height), ec);
+ drawImage(sourceCanvas, FloatRect(0, 0, sourceCanvas.width(), sourceCanvas.height()), FloatRect(x, y, width, height), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas,
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement& sourceCanvas,
float sx, float sy, float sw, float sh,
float dx, float dy, float dw, float dh, ExceptionCode& ec)
{
drawImage(sourceCanvas, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const FloatRect& srcRect,
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement& sourceCanvas, const FloatRect& srcRect,
const FloatRect& dstRect, ExceptionCode& ec)
{
- if (!sourceCanvas) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
+ FloatRect srcCanvasRect = FloatRect(FloatPoint(), sourceCanvas.size());
- FloatRect srcCanvasRect = FloatRect(FloatPoint(), sourceCanvas->size());
-
if (!srcCanvasRect.width() || !srcCanvasRect.height()) {
ec = INVALID_STATE_ERR;
return;
@@ -1534,21 +1516,21 @@
return;
// FIXME: Do this through platform-independent GraphicsContext API.
- ImageBuffer* buffer = sourceCanvas->buffer();
+ ImageBuffer* buffer = sourceCanvas.buffer();
if (!buffer)
return;
- checkOrigin(sourceCanvas);
+ checkOrigin(&sourceCanvas);
#if ENABLE(ACCELERATED_2D_CANVAS)
- // If we're drawing from one accelerated canvas 2d to another, avoid calling sourceCanvas->makeRenderingResultsAvailable()
+ // If we're drawing from one accelerated canvas 2d to another, avoid calling sourceCanvas.makeRenderingResultsAvailable()
// as that will do a readback to software.
- CanvasRenderingContext* sourceContext = sourceCanvas->renderingContext();
+ CanvasRenderingContext* sourceContext = sourceCanvas.renderingContext();
// FIXME: Implement an accelerated path for drawing from a WebGL canvas to a 2d canvas when possible.
if (!isAccelerated() || !sourceContext || !sourceContext->isAccelerated() || !sourceContext->is2d())
- sourceCanvas->makeRenderingResultsAvailable();
+ sourceCanvas.makeRenderingResultsAvailable();
#else
- sourceCanvas->makeRenderingResultsAvailable();
+ sourceCanvas.makeRenderingResultsAvailable();
#endif
if (rectContainsCanvas(dstRect)) {
@@ -1568,45 +1550,32 @@
}
#if ENABLE(VIDEO)
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, float x, float y, ExceptionCode& ec)
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement& video, float x, float y, ExceptionCode& ec)
{
- if (!video) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
FloatSize videoSize = size(video);
drawImage(video, x, y, videoSize.width(), videoSize.height(), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video,
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement& video,
float x, float y, float width, float height, ExceptionCode& ec)
{
- if (!video) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
FloatSize videoSize = size(video);
drawImage(video, FloatRect(0, 0, videoSize.width(), videoSize.height()), FloatRect(x, y, width, height), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video,
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement& video,
float sx, float sy, float sw, float sh,
float dx, float dy, float dw, float dh, ExceptionCode& ec)
{
drawImage(video, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec);
}
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRect& srcRect, const FloatRect& dstRect,
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement& video, const FloatRect& srcRect, const FloatRect& dstRect,
ExceptionCode& ec)
{
- if (!video) {
- ec = TYPE_MISMATCH_ERR;
- return;
- }
-
ec = 0;
- if (video->readyState() == HTMLMediaElement::HAVE_NOTHING || video->readyState() == HTMLMediaElement::HAVE_METADATA)
+ if (video.readyState() == HTMLMediaElement::HAVE_NOTHING || video.readyState() == HTMLMediaElement::HAVE_METADATA)
return;
FloatRect videoRect = FloatRect(FloatPoint(), size(video));
@@ -1624,11 +1593,11 @@
if (!state().hasInvertibleTransform)
return;
- checkOrigin(video);
+ checkOrigin(&video);
#if USE(CG) || (ENABLE(ACCELERATED_2D_CANVAS) && USE(GSTREAMER_GL) && USE(CAIRO))
- if (NativeImagePtr image = video->nativeImageForCurrentTime()) {
- c->drawNativeImage(image, FloatSize(video->videoWidth(), video->videoHeight()), dstRect, srcRect);
+ if (NativeImagePtr image = video.nativeImageForCurrentTime()) {
+ c->drawNativeImage(image, FloatSize(video.videoWidth(), video.videoHeight()), dstRect, srcRect);
if (rectContainsCanvas(dstRect))
didDrawEntireCanvas();
else
@@ -1643,13 +1612,13 @@
c->translate(dstRect.x(), dstRect.y());
c->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
c->translate(-srcRect.x(), -srcRect.y());
- video->paintCurrentFrameInContext(*c, FloatRect(FloatPoint(), size(video)));
+ video.paintCurrentFrameInContext(*c, FloatRect(FloatPoint(), size(video)));
stateSaver.restore();
didDraw(dstRect);
}
#endif
-void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* imageElement,
+void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement& imageElement,
float sx, float sy, float sw, float sh,
float dx, float dy, float dw, float dh,
const String& compositeOperation)
@@ -2132,9 +2101,9 @@
drawFocusIfNeededInternal(m_path, element);
}
-void CanvasRenderingContext2D::drawFocusIfNeeded(DOMPath* path, Element* element)
+void CanvasRenderingContext2D::drawFocusIfNeeded(DOMPath& path, Element* element)
{
- drawFocusIfNeededInternal(path->path(), element);
+ drawFocusIfNeededInternal(path.path(), element);
}
void CanvasRenderingContext2D::drawFocusIfNeededInternal(const Path& path, Element* element)
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h 2016-04-20 17:40:02 UTC (rev 199776)
@@ -137,15 +137,15 @@
void stroke();
void clip(const String& winding = ASCIILiteral("nonzero"));
- void fill(DOMPath*, const String& winding = ASCIILiteral("nonzero"));
- void stroke(DOMPath*);
- void clip(DOMPath*, const String& winding = ASCIILiteral("nonzero"));
+ void fill(DOMPath&, const String& winding = ASCIILiteral("nonzero"));
+ void stroke(DOMPath&);
+ void clip(DOMPath&, const String& winding = ASCIILiteral("nonzero"));
bool isPointInPath(const float x, const float y, const String& winding = ASCIILiteral("nonzero"));
bool isPointInStroke(const float x, const float y);
- bool isPointInPath(DOMPath*, const float x, const float y, const String& winding = ASCIILiteral("nonzero"));
- bool isPointInStroke(DOMPath*, const float x, const float y);
+ bool isPointInPath(DOMPath&, const float x, const float y, const String& winding = ASCIILiteral("nonzero"));
+ bool isPointInStroke(DOMPath&, const float x, const float y);
void clearRect(float x, float y, float width, float height);
void fillRect(float x, float y, float width, float height);
@@ -161,23 +161,23 @@
void clearShadow();
- void drawImage(HTMLImageElement*, float x, float y, ExceptionCode&);
- void drawImage(HTMLImageElement*, float x, float y, float width, float height, ExceptionCode&);
- void drawImage(HTMLImageElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
- void drawImage(HTMLImageElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
- void drawImage(HTMLCanvasElement*, float x, float y, ExceptionCode&);
- void drawImage(HTMLCanvasElement*, float x, float y, float width, float height, ExceptionCode&);
- void drawImage(HTMLCanvasElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
- void drawImage(HTMLCanvasElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
- void drawImage(HTMLImageElement*, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator&, const BlendMode&, ExceptionCode&);
+ void drawImage(HTMLImageElement&, float x, float y, ExceptionCode&);
+ void drawImage(HTMLImageElement&, float x, float y, float width, float height, ExceptionCode&);
+ void drawImage(HTMLImageElement&, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
+ void drawImage(HTMLImageElement&, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
+ void drawImage(HTMLCanvasElement&, float x, float y, ExceptionCode&);
+ void drawImage(HTMLCanvasElement&, float x, float y, float width, float height, ExceptionCode&);
+ void drawImage(HTMLCanvasElement&, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
+ void drawImage(HTMLCanvasElement&, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
+ void drawImage(HTMLImageElement&, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator&, const BlendMode&, ExceptionCode&);
#if ENABLE(VIDEO)
- void drawImage(HTMLVideoElement*, float x, float y, ExceptionCode&);
- void drawImage(HTMLVideoElement*, float x, float y, float width, float height, ExceptionCode&);
- void drawImage(HTMLVideoElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
- void drawImage(HTMLVideoElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
+ void drawImage(HTMLVideoElement&, float x, float y, ExceptionCode&);
+ void drawImage(HTMLVideoElement&, float x, float y, float width, float height, ExceptionCode&);
+ void drawImage(HTMLVideoElement&, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
+ void drawImage(HTMLVideoElement&, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
#endif
- void drawImageFromRect(HTMLImageElement*, float sx = 0, float sy = 0, float sw = 0, float sh = 0,
+ void drawImageFromRect(HTMLImageElement&, float sx = 0, float sy = 0, float sw = 0, float sh = 0,
float dx = 0, float dy = 0, float dw = 0, float dh = 0, const String& compositeOperation = emptyString());
void setAlpha(float);
@@ -199,7 +199,7 @@
void webkitPutImageDataHD(ImageData*, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionCode&);
void drawFocusIfNeeded(Element*);
- void drawFocusIfNeeded(DOMPath*, Element*);
+ void drawFocusIfNeeded(DOMPath&, Element*);
float webkitBackingStorePixelRatio() const { return 1; }
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl 2016-04-20 17:40:02 UTC (rev 199776)
@@ -26,9 +26,7 @@
enum ImageSmoothingQuality { "low", "medium", "high" };
enum CanvasWindingRule { "nonzero", "evenodd" };
-[
- UsePointersEvenForNonNullableObjectArguments,
-] interface CanvasRenderingContext2D : CanvasRenderingContext {
+interface CanvasRenderingContext2D : CanvasRenderingContext {
void save();
void restore();
@@ -136,23 +134,21 @@
void strokeRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
- [RaisesException] void drawImage(HTMLImageElement? image, unrestricted float x, unrestricted float y);
- [RaisesException] void drawImage(HTMLImageElement? image, unrestricted float x, unrestricted float y,
+ [RaisesException] void drawImage(HTMLImageElement image, unrestricted float x, unrestricted float y);
+ [RaisesException] void drawImage(HTMLImageElement image, unrestricted float x, unrestricted float y,
unrestricted float width, unrestricted float height);
- [RaisesException] void drawImage(HTMLImageElement? image, unrestricted float sx, unrestricted float sy, unrestricted float sw,
+ [RaisesException] void drawImage(HTMLImageElement image, unrestricted float sx, unrestricted float sy, unrestricted float sw,
unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
- [RaisesException] void drawImage(HTMLCanvasElement? canvas, unrestricted float x, unrestricted float y);
- [RaisesException] void drawImage(HTMLCanvasElement? canvas, unrestricted float x, unrestricted float y,
+ [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted float x, unrestricted float y);
+ [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted float x, unrestricted float y,
unrestricted float width, unrestricted float height);
- [RaisesException] void drawImage(HTMLCanvasElement? canvas, unrestricted float sx, unrestricted float sy, unrestricted float sw,
+ [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted float sx, unrestricted float sy, unrestricted float sw,
unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
- [RaisesException] void drawImage(HTMLVideoElement? video, unrestricted float x, unrestricted float y);
- [RaisesException] void drawImage(HTMLVideoElement? video, unrestricted float x, unrestricted float y,
+ [Conditional=VIDEO, RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y);
+ [Conditional=VIDEO, RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y,
unrestricted float width, unrestricted float height);
- [RaisesException] void drawImage(HTMLVideoElement? video, unrestricted float sx, unrestricted float sy, unrestricted float sw,
+ [Conditional=VIDEO, RaisesException] void drawImage(HTMLVideoElement video, unrestricted float sx, unrestricted float sy, unrestricted float sw,
unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
-#endif
void drawImageFromRect(HTMLImageElement image,
optional unrestricted float sx, optional unrestricted float sy, optional unrestricted float sw, optional unrestricted float sh,
@@ -188,8 +184,8 @@
[RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh);
// Focus rings
- void drawFocusIfNeeded(Element element);
- void drawFocusIfNeeded(DOMPath path, Element element);
+ void drawFocusIfNeeded(Element? element); // FIXME: The element parameter should not be nullable.
+ void drawFocusIfNeeded(DOMPath path, Element? element); // FIXME: The element parameter should not be nullable.
readonly attribute float webkitBackingStorePixelRatio;
Modified: trunk/Source/WebCore/html/canvas/DOMPath.h (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/DOMPath.h 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/DOMPath.h 2016-04-20 17:40:02 UTC (rev 199776)
@@ -42,7 +42,7 @@
static Ref<DOMPath> create() { return adoptRef(*new DOMPath); }
static Ref<DOMPath> create(const Path& path) { return adoptRef(*new DOMPath(path)); }
- static Ref<DOMPath> create(const DOMPath* path) { return create(path->path()); }
+ static Ref<DOMPath> create(const DOMPath& path) { return create(path.path()); }
static Ref<DOMPath> create(const String& pathData)
{
Modified: trunk/Source/WebCore/html/canvas/DOMPath.idl (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/DOMPath.idl 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/DOMPath.idl 2016-04-20 17:40:02 UTC (rev 199776)
@@ -30,15 +30,12 @@
Constructor,
Constructor(DOMPath path),
Constructor(DOMString text),
- UsePointersEvenForNonNullableObjectArguments,
- InterfaceName=Path2D,
ExportMacro=WEBCORE_EXPORT,
+ InterfaceName=Path2D,
] interface DOMPath {
+ // FIXME: The parameters should not be nullable.
+ [Conditional=CANVAS_PATH] void addPath(DOMPath? path, optional SVGMatrix? transform);
-#if defined(ENABLE_CANVAS_PATH) && ENABLE_CANVAS_PATH
- void addPath(DOMPath? path, optional SVGMatrix? transform);
-#endif
-
// FIXME: These methods should be shared with CanvasRenderingContext2D in the CanvasPathMethods interface.
void closePath();
void moveTo([Default=Undefined] optional float x,
Modified: trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/WebGLDebugShaders.cpp 2016-04-20 17:40:02 UTC (rev 199776)
@@ -49,9 +49,8 @@
return WebGLDebugShadersName;
}
-String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader* shader, ExceptionCode& ec)
+String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader* shader)
{
- UNUSED_PARAM(ec);
if (m_context->isContextLost())
return String();
if (!m_context->validateWebGLObject("getTranslatedShaderSource", shader))
Modified: trunk/Source/WebCore/html/canvas/WebGLDebugShaders.h (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/WebGLDebugShaders.h 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/WebGLDebugShaders.h 2016-04-20 17:40:02 UTC (rev 199776)
@@ -41,7 +41,7 @@
ExtensionName getName() const override;
- String getTranslatedShaderSource(WebGLShader*, ExceptionCode&);
+ String getTranslatedShaderSource(WebGLShader*);
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl (199775 => 199776)
--- trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl 2016-04-20 17:27:37 UTC (rev 199775)
+++ trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl 2016-04-20 17:40:02 UTC (rev 199776)
@@ -25,9 +25,8 @@
[
Conditional=WEBGL,
- UsePointersEvenForNonNullableObjectArguments,
GenerateIsReachable=ImplWebGLRenderingContext,
NoInterfaceObject,
] interface WebGLDebugShaders {
- [StrictTypeChecking, RaisesException] DOMString? getTranslatedShaderSource(WebGLShader shader);
+ [StrictTypeChecking] DOMString? getTranslatedShaderSource(WebGLShader? shader); // FIXME: The return value and the parameter should not be nullable.
};