Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / canvas / CanvasRenderingContext2D.idl
index 1738af0..4afeef7 100644 (file)
@@ -38,7 +38,7 @@ typedef (HTMLImageElement or
 enum CanvasFillRule { "nonzero", "evenodd" };
 
 [
-    TypeChecking=Interface|Nullable|Unrestricted,
+    TypeChecking=Interface|Unrestricted,
     WillBeGarbageCollected,
 ] interface CanvasRenderingContext2D {
     // back-reference to the canvas
@@ -71,9 +71,9 @@ enum CanvasFillRule { "nonzero", "evenodd" };
     [Custom] attribute object fillStyle; // (default black)
     CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
     [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1);
-    [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, [TreatNullAs=NullString] DOMString repetitionType);
-    [RaisesException] CanvasPattern createPattern(HTMLImageElement image, [TreatNullAs=NullString] DOMString repetitionType);
-    [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, [TreatNullAs=NullString] DOMString repetitionType);
+    [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, DOMString? repetitionType);
+    [RaisesException] CanvasPattern createPattern(HTMLImageElement image, DOMString? repetitionType);
+    [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, DOMString? repetitionType);
 
     // shadows
     attribute unrestricted float shadowOffsetX;
@@ -123,6 +123,13 @@ enum CanvasFillRule { "nonzero", "evenodd" };
     [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap imageBitmap, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
     [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap imageBitmap, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
 
+    // hit regions
+    // FIXME: Blink does not currently support WebIDL dictionary definitions.
+    // See http://crbug.com/321462
+    [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegion(optional Dictionary options);
+    [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString id);
+    [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions();
+
     // pixel manipulation
     ImageData createImageData(ImageData imagedata);
     [RaisesException] ImageData createImageData(float sw, float sh);