Diff
Modified: trunk/LayoutTests/ChangeLog (218457 => 218458)
--- trunk/LayoutTests/ChangeLog 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/ChangeLog 2017-06-17 22:34:28 UTC (rev 218458)
@@ -1,3 +1,15 @@
+2017-06-17 Simon Fraser <[email protected]>
+
+ Implement DOMQuad
+ https://bugs.webkit.org/show_bug.cgi?id=163534
+
+ Reviewed by Sam Weinig.
+
+ Implement DOMQuad per https://drafts.fxtf.org/geometry/#DOMQuad.
+
+ * js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
+ * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+
2017-06-17 Antti Koivisto <[email protected]>
Crash due to infinite recursion via FrameSelection::updateAppearanceAfterLayout
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (218457 => 218458)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-06-17 22:34:28 UTC (rev 218458)
@@ -1,3 +1,18 @@
+2017-06-17 Simon Fraser <[email protected]>
+
+ Implement DOMQuad
+ https://bugs.webkit.org/show_bug.cgi?id=163534
+
+ Reviewed by Sam Weinig.
+
+ Implement DOMQuad per https://drafts.fxtf.org/geometry/#DOMQuad.
+
+ * web-platform-tests/css/geometry-1/DOMQuad-001-expected.txt: Tests against an older version
+ of the spec, so some failures.
+ * web-platform-tests/css/geometry-1/DOMQuad-002-expected.txt: All tests pass other than a NaN
+ propagation issue which needs spec clarification.
+ * web-platform-tests/css/geometry-1/structured-serialization-expected.txt:
+
2017-06-17 Ryosuke Niwa <[email protected]>
REGRESSION(r209495): materiauxlaverdure.com fails to load
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMQuad-001-expected.txt (218457 => 218458)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMQuad-001-expected.txt 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMQuad-001-expected.txt 2017-06-17 22:34:28 UTC (rev 218458)
@@ -1,41 +1,41 @@
Test DOMQuad interface
-FAIL testConstructor0: points Can't find variable: DOMQuad
-FAIL testConstructor0: bounds Can't find variable: DOMQuad
-FAIL testConstructor1 assert_throws: function "function () { new DOMQuad(1); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL testConstructor2 assert_throws: function "function () { new DOMQuad(1, 2); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL testConstructor3 assert_throws: function "function () { new DOMQuad(1, 2, 3); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL testConstructor4 assert_throws: function "function () { new DOMQuad(1, 2, 3, 4); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL testConstructor5: points Can't find variable: DOMQuad
-FAIL testConstructor5: bounds Can't find variable: DOMQuad
-FAIL testConstructor6: points Can't find variable: DOMQuad
-FAIL testConstructor6: bounds Can't find variable: DOMQuad
-FAIL testConstructor7: points Can't find variable: DOMQuad
-FAIL testConstructor7: bounds Can't find variable: DOMQuad
-FAIL testConstructor8: points Can't find variable: DOMQuad
-FAIL testConstructor8: bounds Can't find variable: DOMQuad
-FAIL testConstructor9: points Can't find variable: DOMQuad
-FAIL testConstructor9: bounds Can't find variable: DOMQuad
-FAIL testConstructor10: points Can't find variable: DOMQuad
-FAIL testConstructor10: bounds Can't find variable: DOMQuad
-FAIL testConstructor11: points Can't find variable: DOMQuad
-FAIL testConstructor11: bounds Can't find variable: DOMQuad
-FAIL testConstructor12: points Can't find variable: DOMQuad
-FAIL testConstructor12: bounds Can't find variable: DOMQuad
-FAIL testConstructor13: points Can't find variable: DOMQuad
-FAIL testConstructor13: bounds Can't find variable: DOMQuad
-FAIL testConstructor14: points Can't find variable: DOMQuad
-FAIL testConstructor14: bounds Can't find variable: DOMQuad
-FAIL testConstructor15 assert_throws: function "function () { new DOMQuad({}, {}, {}, NaN); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL testConstructor16: points Can't find variable: DOMQuad
-FAIL testConstructor16: bounds Can't find variable: DOMQuad
-FAIL p1Top4Attributes0: points Can't find variable: DOMQuad
-FAIL p1Top4Attributes0: bounds Can't find variable: DOMQuad
-FAIL p1Top4Attributes1: points Can't find variable: DOMQuad
-FAIL p1Top4Attributes1: bounds Can't find variable: DOMQuad
-FAIL boundsAttribute0: points Can't find variable: DOMQuad
-FAIL boundsAttribute0: bounds Can't find variable: DOMQuad
-FAIL boundsAttribute1: points Can't find variable: DOMQuad
-FAIL boundsAttribute1: bounds Can't find variable: DOMQuad
+PASS testConstructor0: points
+FAIL testConstructor0: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor1
+PASS testConstructor2
+PASS testConstructor3
+PASS testConstructor4
+FAIL testConstructor5: points assert_equals: Expected value for p2.x is 110 expected 110 but got 0
+FAIL testConstructor5: bounds undefined is not an object (evaluating 'q.bounds.x')
+FAIL testConstructor6: points assert_equals: Expected value for p2.x is -90 expected -90 but got 0
+FAIL testConstructor6: bounds undefined is not an object (evaluating 'q.bounds.x')
+FAIL testConstructor7: points assert_equals: Expected value for p2.x is NaN expected NaN but got 0
+FAIL testConstructor7: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor8: points
+FAIL testConstructor8: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor9: points
+FAIL testConstructor9: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor10: points
+FAIL testConstructor10: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor11: points
+FAIL testConstructor11: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor12: points
+FAIL testConstructor12: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor13: points
+FAIL testConstructor13: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor14: points
+FAIL testConstructor14: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS testConstructor15
+PASS testConstructor16: points
+FAIL testConstructor16: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS p1Top4Attributes0: points
+FAIL p1Top4Attributes0: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS p1Top4Attributes1: points
+FAIL p1Top4Attributes1: bounds undefined is not an object (evaluating 'q.bounds.x')
+PASS boundsAttribute0: points
+FAIL boundsAttribute0: bounds assert_equals: Expected value for bounds.x is 0 expected 0 but got 10
+FAIL boundsAttribute1: points undefined is not an object (evaluating 'q.bounds.x = 10')
+FAIL boundsAttribute1: bounds undefined is not an object (evaluating 'q.bounds.x = 10')
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMQuad-002-expected.txt (218457 => 218458)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMQuad-002-expected.txt 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMQuad-002-expected.txt 2017-06-17 22:34:28 UTC (rev 218458)
@@ -1,21 +1,21 @@
Test DOMQuad interface
-FAIL test Constructor no args Can't find variable: DOMQuad
-FAIL test Constructor with one init DOMPoint arg Can't find variable: DOMQuad
-FAIL test Constructor with two init DOMPoint args Can't find variable: DOMQuad
-FAIL test Constructor with three init DOMPoint args Can't find variable: DOMQuad
-FAIL test Constructor with four init DOMPoint args Can't find variable: DOMQuad
-FAIL test Constructor with one DOMPoint arg Can't find variable: DOMQuad
-FAIL test Constructor with two DOMPoint args Can't find variable: DOMQuad
-FAIL test Constructor with three DOMPoint args Can't find variable: DOMQuad
-FAIL test Constructor with four DOMPoint args Can't find variable: DOMQuad
-FAIL test Constructor with invaild integer args assert_throws: function "function () { new DOMQuad(1, 2, 3, 4); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL test Constructor with invaild string args assert_throws: function "function () { new DOMQuad("1", "2", "3", "4"); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL test Constructor with NaN assert_throws: function "function () { new DOMQuad({}, {}, {}, NaN); }" threw object "ReferenceError: Can't find variable: DOMQuad" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL test fromRect Can't find variable: DOMQuad
-FAIL test fromRect with Infinity Can't find variable: DOMQuad
-FAIL test fromQuad Can't find variable: DOMQuad
-FAIL test p1, p2, p3, p4 are readonly Can't find variable: DOMQuad
-FAIL test getBounds Can't find variable: DOMQuad
+PASS test Constructor no args
+PASS test Constructor with one init DOMPoint arg
+PASS test Constructor with two init DOMPoint args
+PASS test Constructor with three init DOMPoint args
+PASS test Constructor with four init DOMPoint args
+PASS test Constructor with one DOMPoint arg
+PASS test Constructor with two DOMPoint args
+PASS test Constructor with three DOMPoint args
+PASS test Constructor with four DOMPoint args
+PASS test Constructor with invaild integer args
+PASS test Constructor with invaild string args
+PASS test Constructor with NaN
+PASS test fromRect
+PASS test fromRect with Infinity
+PASS test fromQuad
+PASS test p1, p2, p3, p4 are readonly
+PASS test getBounds
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/structured-serialization-expected.txt (218457 => 218458)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/structured-serialization-expected.txt 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/structured-serialization-expected.txt 2017-06-17 22:34:28 UTC (rev 218458)
@@ -15,10 +15,10 @@
FAIL DOMRect clone: custom property promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
FAIL DOMRect clone: throwing getters promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
FAIL DOMRect clone: non-initial values promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
-FAIL DOMQuad clone: basic undefined is not a constructor (evaluating 'new self[constr]()')
-FAIL DOMQuad clone: custom property undefined is not a constructor (evaluating 'new self[constr]()')
-FAIL DOMQuad clone: throwing getters undefined is not a constructor (evaluating 'new self[constr]()')
-FAIL DOMQuad clone: non-initial values undefined is not a constructor (evaluating 'new self[constr]')
+FAIL DOMQuad clone: basic promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
+FAIL DOMQuad clone: custom property promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
+FAIL DOMQuad clone: throwing getters promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
+FAIL DOMQuad clone: non-initial values promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
FAIL DOMMatrixReadOnly clone: basic promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
FAIL DOMMatrixReadOnly clone: custom property promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
FAIL DOMMatrixReadOnly clone: throwing getters promise_test: Unhandled rejection with value: object "DataCloneError (DOM Exception 25): The object can not be cloned."
Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt (218457 => 218458)
--- trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2017-06-17 22:34:28 UTC (rev 218458)
@@ -59,6 +59,11 @@
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMQuad').value is DOMQuad
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMQuad').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMQuad').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMQuad').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMQuad').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (218457 => 218458)
--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2017-06-17 22:34:28 UTC (rev 218458)
@@ -353,6 +353,11 @@
PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMQuad').value is DOMQuad
+PASS Object.getOwnPropertyDescriptor(global, 'DOMQuad').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMQuad').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMQuad').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMQuad').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
Modified: trunk/Source/WebCore/CMakeLists.txt (218457 => 218458)
--- trunk/Source/WebCore/CMakeLists.txt 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-06-17 22:34:28 UTC (rev 218458)
@@ -424,6 +424,8 @@
dom/DOMPoint.idl
dom/DOMPointInit.idl
dom/DOMPointReadOnly.idl
+ dom/DOMQuad.idl
+ dom/DOMQuadInit.idl
dom/DOMRect.idl
dom/DOMRectInit.idl
dom/DOMRectList.idl
@@ -1160,6 +1162,7 @@
bindings/js/JSDOMBuiltinConstructorBase.cpp
bindings/js/JSDOMConstructorBase.cpp
bindings/js/JSDOMConstructorWithDocument.cpp
+ bindings/js/JSDOMQuadCustom.cpp
bindings/js/JSDOMExceptionHandling.cpp
bindings/js/JSDOMGlobalObject.cpp
bindings/js/JSDOMGlobalObjectTask.cpp
@@ -1455,6 +1458,7 @@
dom/DOMImplementation.cpp
dom/DOMNamedFlowCollection.cpp
dom/DOMPointReadOnly.cpp
+ dom/DOMQuad.cpp
dom/DOMRectList.cpp
dom/DOMStringList.cpp
dom/DataTransfer.cpp
Modified: trunk/Source/WebCore/ChangeLog (218457 => 218458)
--- trunk/Source/WebCore/ChangeLog 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/Source/WebCore/ChangeLog 2017-06-17 22:34:28 UTC (rev 218458)
@@ -1,3 +1,41 @@
+2017-06-17 Simon Fraser <[email protected]>
+
+ Implement DOMQuad
+ https://bugs.webkit.org/show_bug.cgi?id=163534
+
+ Reviewed by Sam Weinig.
+
+ Implement DOMQuad per https://drafts.fxtf.org/geometry/#DOMQuad, other than serialization
+ which requires some bindings changes.
+
+ web-platform-tests/css/geometry-1/DOMRect-001.html tests against an older version of the spec,
+ so has some failures. DOMQuad-002.html passes, other than a NaN propagation issue that requires
+ spec clarification.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMQuadCustom.cpp: Added.
+ (WebCore::JSDOMQuad::getBounds):
+ * bindings/scripts/CodeGenerator.pm:
+ (IsSerializableDOMType):
+ (IsSerializableAttribute):
+ * dom/DOMPoint.h:
+ * dom/DOMQuad.cpp: Added.
+ (WebCore::DOMQuad::DOMQuad):
+ (WebCore::DOMQuad::getBounds):
+ * dom/DOMQuad.h: Added.
+ (WebCore::DOMQuad::create):
+ (WebCore::DOMQuad::fromRect):
+ (WebCore::DOMQuad::fromQuad):
+ (WebCore::DOMQuad::p1):
+ (WebCore::DOMQuad::p2):
+ (WebCore::DOMQuad::p3):
+ (WebCore::DOMQuad::p4):
+ * dom/DOMQuad.idl: Added.
+ * dom/DOMQuadInit.h: Added.
+ * dom/DOMQuadInit.idl: Added.
+
2017-06-17 Chris Dumez <[email protected]>
Use WTF::Function instead of std::function in WebKit2/
Modified: trunk/Source/WebCore/DerivedSources.make (218457 => 218458)
--- trunk/Source/WebCore/DerivedSources.make 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/Source/WebCore/DerivedSources.make 2017-06-17 22:34:28 UTC (rev 218458)
@@ -364,6 +364,8 @@
$(WebCore)/dom/DOMPoint.idl \
$(WebCore)/dom/DOMPointInit.idl \
$(WebCore)/dom/DOMPointReadOnly.idl \
+ $(WebCore)/dom/DOMQuad.idl \
+ $(WebCore)/dom/DOMQuadInit.idl \
$(WebCore)/dom/DOMRect.idl \
$(WebCore)/dom/DOMRectInit.idl \
$(WebCore)/dom/DOMRectList.idl \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (218457 => 218458)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-06-17 22:34:28 UTC (rev 218458)
@@ -492,6 +492,7 @@
0F8B45721DC3FBA300443C3F /* IntersectionObserverCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8B45711DC3FBA300443C3F /* IntersectionObserverCallback.h */; };
0F8B45751DC41DBA00443C3F /* JSIntersectionObserverCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F8B45731DC41DBA00443C3F /* JSIntersectionObserverCallback.cpp */; };
0F8B45761DC41DBA00443C3F /* JSIntersectionObserverCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8B45741DC41DBA00443C3F /* JSIntersectionObserverCallback.h */; };
+ 0F94A3961EF1B10500FBAFFB /* JSDOMQuadCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F94A3951EF1B10500FBAFFB /* JSDOMQuadCustom.cpp */; };
0F97A658155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F97A657155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm */; };
0FA24D79162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */; };
0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -558,11 +559,18 @@
0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEF20CD1BD4A24100128E5D /* LengthSize.cpp */; };
0FEF20D01BD4A64F00128E5D /* RenderStyleConstants.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEF20CF1BD4A64F00128E5D /* RenderStyleConstants.cpp */; };
0FF2E80D1EE0D430009EABD4 /* PerformanceLoggingClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF2E80C1EE0D430009EABD4 /* PerformanceLoggingClient.cpp */; };
+ 0FF3B9281EE3B6DE00B84144 /* JSDOMQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF3B9241EE3B6DE00B84144 /* JSDOMQuad.cpp */; };
+ 0FF3B9291EE3B6DE00B84144 /* JSDOMQuad.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF3B9251EE3B6DE00B84144 /* JSDOMQuad.h */; };
+ 0FF3B92A1EE3B6DE00B84144 /* JSDOMQuadInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF3B9261EE3B6DE00B84144 /* JSDOMQuadInit.cpp */; };
+ 0FF3B92B1EE3B6DE00B84144 /* JSDOMQuadInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF3B9271EE3B6DE00B84144 /* JSDOMQuadInit.h */; };
0FF50269102BA9430066F39A /* JSStyleMedia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF50267102BA9430066F39A /* JSStyleMedia.cpp */; };
0FF5026A102BA9430066F39A /* JSStyleMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF50268102BA9430066F39A /* JSStyleMedia.h */; };
0FF50271102BA96A0066F39A /* StyleMedia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF5026E102BA9660066F39A /* StyleMedia.cpp */; };
0FF50272102BA96A0066F39A /* StyleMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF5026F102BA96A0066F39A /* StyleMedia.h */; };
0FF835B81EE3274F008B4CC7 /* DOMPointReadOnly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF835B71EE3274F008B4CC7 /* DOMPointReadOnly.cpp */; };
+ 0FF835C21EE354DA008B4CC7 /* DOMQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF835BD1EE354DA008B4CC7 /* DOMQuad.cpp */; };
+ 0FF835C31EE354DA008B4CC7 /* DOMQuad.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF835BE1EE354DA008B4CC7 /* DOMQuad.h */; };
+ 0FF835C51EE354DA008B4CC7 /* DOMQuadInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF835C01EE354DA008B4CC7 /* DOMQuadInit.h */; };
0FFD4D6018651FA300512F6E /* AsyncScrollingCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FFD4D5E18651FA300512F6E /* AsyncScrollingCoordinator.cpp */; };
0FFD4D6118651FA300512F6E /* AsyncScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FFD4D5F18651FA300512F6E /* AsyncScrollingCoordinator.h */; settings = {ATTRIBUTES = (Private, ); }; };
10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */; };
@@ -7932,6 +7940,7 @@
0F8B45711DC3FBA300443C3F /* IntersectionObserverCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntersectionObserverCallback.h; sourceTree = "<group>"; };
0F8B45731DC41DBA00443C3F /* JSIntersectionObserverCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIntersectionObserverCallback.cpp; sourceTree = "<group>"; };
0F8B45741DC41DBA00443C3F /* JSIntersectionObserverCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIntersectionObserverCallback.h; sourceTree = "<group>"; };
+ 0F94A3951EF1B10500FBAFFB /* JSDOMQuadCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMQuadCustom.cpp; sourceTree = "<group>"; };
0F97A657155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DisplayRefreshMonitorIOS.mm; sourceTree = "<group>"; };
0FA0852B1E6FB55A00975FDD /* CSSProperties.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = CSSProperties.json; sourceTree = "<group>"; };
0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsLayerUpdater.cpp; sourceTree = "<group>"; };
@@ -8000,6 +8009,10 @@
0FEF20CD1BD4A24100128E5D /* LengthSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthSize.cpp; sourceTree = "<group>"; };
0FEF20CF1BD4A64F00128E5D /* RenderStyleConstants.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderStyleConstants.cpp; sourceTree = "<group>"; };
0FF2E80C1EE0D430009EABD4 /* PerformanceLoggingClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceLoggingClient.cpp; sourceTree = "<group>"; };
+ 0FF3B9241EE3B6DE00B84144 /* JSDOMQuad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMQuad.cpp; sourceTree = "<group>"; };
+ 0FF3B9251EE3B6DE00B84144 /* JSDOMQuad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMQuad.h; sourceTree = "<group>"; };
+ 0FF3B9261EE3B6DE00B84144 /* JSDOMQuadInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMQuadInit.cpp; sourceTree = "<group>"; };
+ 0FF3B9271EE3B6DE00B84144 /* JSDOMQuadInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMQuadInit.h; sourceTree = "<group>"; };
0FF50267102BA9430066F39A /* JSStyleMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleMedia.cpp; sourceTree = "<group>"; };
0FF50268102BA9430066F39A /* JSStyleMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStyleMedia.h; sourceTree = "<group>"; };
0FF5026E102BA9660066F39A /* StyleMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleMedia.cpp; sourceTree = "<group>"; };
@@ -8006,6 +8019,11 @@
0FF5026F102BA96A0066F39A /* StyleMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleMedia.h; sourceTree = "<group>"; };
0FF50270102BA96A0066F39A /* StyleMedia.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = StyleMedia.idl; sourceTree = "<group>"; };
0FF835B71EE3274F008B4CC7 /* DOMPointReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMPointReadOnly.cpp; sourceTree = "<group>"; };
+ 0FF835BD1EE354DA008B4CC7 /* DOMQuad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMQuad.cpp; sourceTree = "<group>"; };
+ 0FF835BE1EE354DA008B4CC7 /* DOMQuad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMQuad.h; sourceTree = "<group>"; };
+ 0FF835BF1EE354DA008B4CC7 /* DOMQuad.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMQuad.idl; sourceTree = "<group>"; };
+ 0FF835C01EE354DA008B4CC7 /* DOMQuadInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMQuadInit.h; sourceTree = "<group>"; };
+ 0FF835C11EE354DA008B4CC7 /* DOMQuadInit.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMQuadInit.idl; sourceTree = "<group>"; };
0FFD4D5E18651FA300512F6E /* AsyncScrollingCoordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncScrollingCoordinator.cpp; sourceTree = "<group>"; };
0FFD4D5F18651FA300512F6E /* AsyncScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncScrollingCoordinator.h; sourceTree = "<group>"; };
10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicURLManager.h; sourceTree = "<group>"; };
@@ -22098,6 +22116,10 @@
0F4966A71DB40C4300A274BB /* JSDOMPointInit.h */,
0F4966A81DB40C4300A274BB /* JSDOMPointReadOnly.cpp */,
0F4966A91DB40C4300A274BB /* JSDOMPointReadOnly.h */,
+ 0FF3B9241EE3B6DE00B84144 /* JSDOMQuad.cpp */,
+ 0FF3B9251EE3B6DE00B84144 /* JSDOMQuad.h */,
+ 0FF3B9261EE3B6DE00B84144 /* JSDOMQuadInit.cpp */,
+ 0FF3B9271EE3B6DE00B84144 /* JSDOMQuadInit.h */,
0F4710B51DB56BE8002DCEC3 /* JSDOMRect.cpp */,
0F4710B61DB56BE8002DCEC3 /* JSDOMRect.h */,
0F4710B71DB56BE8002DCEC3 /* JSDOMRectInit.cpp */,
@@ -23664,6 +23686,7 @@
DEC2975D1B4DEB2A005F5945 /* JSCustomEventCustom.cpp */,
49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */,
ADDA94BF19686F8000453029 /* JSDocumentCustom.h */,
+ 0F94A3951EF1B10500FBAFFB /* JSDOMQuadCustom.cpp */,
BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */,
652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
C28083411C6DC96A001451B6 /* JSFontFaceCustom.cpp */,
@@ -25740,6 +25763,11 @@
0FF835B71EE3274F008B4CC7 /* DOMPointReadOnly.cpp */,
0F49669B1DB408C100A274BB /* DOMPointReadOnly.h */,
0F49669C1DB408C100A274BB /* DOMPointReadOnly.idl */,
+ 0FF835BD1EE354DA008B4CC7 /* DOMQuad.cpp */,
+ 0FF835BE1EE354DA008B4CC7 /* DOMQuad.h */,
+ 0FF835BF1EE354DA008B4CC7 /* DOMQuad.idl */,
+ 0FF835C01EE354DA008B4CC7 /* DOMQuadInit.h */,
+ 0FF835C11EE354DA008B4CC7 /* DOMQuadInit.idl */,
0F4710A91DB56AFC002DCEC3 /* DOMRect.h */,
0F4710AA1DB56AFC002DCEC3 /* DOMRect.idl */,
0F4710AB1DB56AFC002DCEC3 /* DOMRectInit.h */,
@@ -27207,6 +27235,8 @@
0F49669D1DB408C100A274BB /* DOMPoint.h in Headers */,
0F4966A31DB4091000A274BB /* DOMPointInit.h in Headers */,
0F49669F1DB408C100A274BB /* DOMPointReadOnly.h in Headers */,
+ 0FF835C31EE354DA008B4CC7 /* DOMQuad.h in Headers */,
+ 0FF835C51EE354DA008B4CC7 /* DOMQuadInit.h in Headers */,
0F4710AF1DB56AFC002DCEC3 /* DOMRect.h in Headers */,
0F4710B11DB56AFC002DCEC3 /* DOMRectInit.h in Headers */,
468344E01EDDFAAA00B7795B /* DOMRectList.h in Headers */,
@@ -27982,6 +28012,8 @@
0F4966AF1DB40C4300A274BB /* JSDOMPointReadOnly.h in Headers */,
E37C86501EB63E3F0087C6CA /* JSDOMPromise.h in Headers */,
E172AF901811BC3700FBADB9 /* JSDOMPromiseDeferred.h in Headers */,
+ 0FF3B9291EE3B6DE00B84144 /* JSDOMQuad.h in Headers */,
+ 0FF3B92B1EE3B6DE00B84144 /* JSDOMQuadInit.h in Headers */,
0F4710BC1DB56BE8002DCEC3 /* JSDOMRect.h in Headers */,
0F4710BE1DB56BE8002DCEC3 /* JSDOMRectInit.h in Headers */,
466ED8D31EDE0144005E43F6 /* JSDOMRectList.h in Headers */,
@@ -31233,6 +31265,7 @@
A9C6E4EB0D745E2B006442E9 /* DOMPlugin.cpp in Sources */,
A9C6E4EF0D745E38006442E9 /* DOMPluginArray.cpp in Sources */,
0FF835B81EE3274F008B4CC7 /* DOMPointReadOnly.cpp in Sources */,
+ 0FF835C21EE354DA008B4CC7 /* DOMQuad.cpp in Sources */,
468344DF1EDDFAAA00B7795B /* DOMRectList.cpp in Sources */,
BC5A86840C33676000EEA649 /* DOMSelection.cpp in Sources */,
C55610F111A704EB00B82D27 /* DOMStringList.cpp in Sources */,
@@ -31955,6 +31988,9 @@
0F4966AC1DB40C4300A274BB /* JSDOMPointInit.cpp in Sources */,
0F4966AE1DB40C4300A274BB /* JSDOMPointReadOnly.cpp in Sources */,
E172AF8F1811BC3700FBADB9 /* JSDOMPromiseDeferred.cpp in Sources */,
+ 0FF3B9281EE3B6DE00B84144 /* JSDOMQuad.cpp in Sources */,
+ 0F94A3961EF1B10500FBAFFB /* JSDOMQuadCustom.cpp in Sources */,
+ 0FF3B92A1EE3B6DE00B84144 /* JSDOMQuadInit.cpp in Sources */,
0F4710BB1DB56BE8002DCEC3 /* JSDOMRect.cpp in Sources */,
0F4710BD1DB56BE8002DCEC3 /* JSDOMRectInit.cpp in Sources */,
466DC6AC1EDE021D00746224 /* JSDOMRectList.cpp in Sources */,
Added: trunk/Source/WebCore/bindings/js/JSDOMQuadCustom.cpp (0 => 218458)
--- trunk/Source/WebCore/bindings/js/JSDOMQuadCustom.cpp (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMQuadCustom.cpp 2017-06-17 22:34:28 UTC (rev 218458)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSDOMQuad.h"
+
+#include "DOMPoint.h"
+#include "JSDOMBinding.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+void JSDOMQuad::visitAdditionalChildren(SlotVisitor& visitor)
+{
+ visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p1()));
+ visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p2()));
+ visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p3()));
+ visitor.addOpaqueRoot(const_cast<DOMPoint*>(&wrapped().p4()));
+}
+
+}
Modified: trunk/Source/WebCore/dom/DOMPoint.h (218457 => 218458)
--- trunk/Source/WebCore/dom/DOMPoint.h 2017-06-17 20:55:56 UTC (rev 218457)
+++ trunk/Source/WebCore/dom/DOMPoint.h 2017-06-17 22:34:28 UTC (rev 218458)
@@ -37,7 +37,7 @@
class DOMPoint final : public DOMPointReadOnly {
WTF_MAKE_FAST_ALLOCATED;
public:
- static Ref<DOMPoint> create(double x, double y, double z, double w) { return adoptRef(*new DOMPoint(x, y, z, w)); }
+ static Ref<DOMPoint> create(double x, double y, double z = 0, double w = 1) { return adoptRef(*new DOMPoint(x, y, z, w)); }
static Ref<DOMPoint> create(const DOMPointInit& init) { return create(init.x, init.y, init.z, init.w); }
static Ref<DOMPoint> fromPoint(const DOMPointInit& init) { return create(init.x, init.y, init.z, init.w); }
Added: trunk/Source/WebCore/dom/DOMQuad.cpp (0 => 218458)
--- trunk/Source/WebCore/dom/DOMQuad.cpp (rev 0)
+++ trunk/Source/WebCore/dom/DOMQuad.cpp 2017-06-17 22:34:28 UTC (rev 218458)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DOMQuad.h"
+
+#include "DOMPoint.h"
+#include "DOMRect.h"
+#include <wtf/MathExtras.h>
+
+using namespace WTF;
+
+namespace WebCore {
+
+DOMQuad::DOMQuad(const DOMPointInit& p1, const DOMPointInit& p2, const DOMPointInit& p3, const DOMPointInit& p4)
+ : m_p1(DOMPoint::create(p1))
+ , m_p2(DOMPoint::create(p2))
+ , m_p3(DOMPoint::create(p3))
+ , m_p4(DOMPoint::create(p4))
+{
+}
+
+// p1------p2
+// | |
+// | |
+// p4------p3
+DOMQuad::DOMQuad(const DOMRectInit& r)
+ : m_p1(DOMPoint::create(r.x, r.y))
+ , m_p2(DOMPoint::create(r.x + r.width, r.y))
+ , m_p3(DOMPoint::create(r.x + r.width, r.y + r.height))
+ , m_p4(DOMPoint::create(r.x, r.y + r.height))
+{
+}
+
+RefPtr<DOMRect> DOMQuad::getBounds() const
+{
+ double left = nanPropagatingMin(nanPropagatingMin(nanPropagatingMin(m_p1->x(), m_p2->x()), m_p3->x()), m_p4->x());
+ double top = nanPropagatingMin(nanPropagatingMin(nanPropagatingMin(m_p1->y(), m_p2->y()), m_p3->y()), m_p4->y());
+ double right = nanPropagatingMax(nanPropagatingMax(nanPropagatingMax(m_p1->x(), m_p2->x()), m_p3->x()), m_p4->x());
+ double bottom = nanPropagatingMax(nanPropagatingMax(nanPropagatingMax(m_p1->y(), m_p2->y()), m_p3->y()), m_p4->y());
+
+ return DOMRect::create(left, top, right - left, bottom - top);
+}
+
+}
Added: trunk/Source/WebCore/dom/DOMQuad.h (0 => 218458)
--- trunk/Source/WebCore/dom/DOMQuad.h (rev 0)
+++ trunk/Source/WebCore/dom/DOMQuad.h 2017-06-17 22:34:28 UTC (rev 218458)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "DOMQuadInit.h"
+#include "ScriptWrappable.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DOMPoint;
+class DOMRect;
+struct DOMPointInit;
+struct DOMRectInit;
+
+class DOMQuad : public ScriptWrappable, public RefCounted<DOMQuad> {
+public:
+ static Ref<DOMQuad> create(const DOMPointInit& p1, const DOMPointInit& p2, const DOMPointInit& p3, const DOMPointInit& p4) { return adoptRef(*new DOMQuad(p1, p2, p3, p4)); }
+ static Ref<DOMQuad> fromRect(const DOMRectInit& init) { return adoptRef(*new DOMQuad(init)); }
+ static Ref<DOMQuad> fromQuad(const DOMQuadInit& init) { return create(init.p1, init.p2, init.p3, init.p4); }
+
+ const DOMPoint& p1() const { return m_p1; }
+ const DOMPoint& p2() const { return m_p2; }
+ const DOMPoint& p3() const { return m_p3; }
+ const DOMPoint& p4() const { return m_p4; }
+
+ RefPtr<DOMRect> getBounds() const;
+
+private:
+ DOMQuad(const DOMPointInit&, const DOMPointInit&, const DOMPointInit&, const DOMPointInit&);
+ explicit DOMQuad(const DOMRectInit&);
+
+ Ref<DOMPoint> m_p1;
+ Ref<DOMPoint> m_p2;
+ Ref<DOMPoint> m_p3;
+ Ref<DOMPoint> m_p4;
+};
+
+}
Added: trunk/Source/WebCore/dom/DOMQuad.idl (0 => 218458)
--- trunk/Source/WebCore/dom/DOMQuad.idl (rev 0)
+++ trunk/Source/WebCore/dom/DOMQuad.idl 2017-06-17 22:34:28 UTC (rev 218458)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://drafts.fxtf.org/geometry/#dictdef-domquadinit
+
+[
+ Constructor(optional DOMPointInit p1, optional DOMPointInit p2, optional DOMPointInit p3, optional DOMPointInit p4),
+ Exposed=(Window,Worker),
+ ImplementationLacksVTable,
+ JSCustomMarkFunction
+]
+interface DOMQuad {
+ [NewObject] static DOMQuad fromRect(optional DOMRectInit other);
+ [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other);
+
+ readonly attribute DOMPoint p1; // FIXME: Should be [SameObject].
+ readonly attribute DOMPoint p2; // FIXME: Should be [SameObject].
+ readonly attribute DOMPoint p3; // FIXME: Should be [SameObject].
+ readonly attribute DOMPoint p4; // FIXME: Should be [SameObject].
+ [NewObject] DOMRect getBounds();
+
+ // serializer = { attribute }; FIXME: implement.
+};
Added: trunk/Source/WebCore/dom/DOMQuadInit.h (0 => 218458)
--- trunk/Source/WebCore/dom/DOMQuadInit.h (rev 0)
+++ trunk/Source/WebCore/dom/DOMQuadInit.h 2017-06-17 22:34:28 UTC (rev 218458)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "DOMPointInit.h"
+
+namespace WebCore {
+
+struct DOMQuadInit {
+ DOMPointInit p1;
+ DOMPointInit p2;
+ DOMPointInit p3;
+ DOMPointInit p4;
+};
+
+}
Added: trunk/Source/WebCore/dom/DOMQuadInit.idl (0 => 218458)
--- trunk/Source/WebCore/dom/DOMQuadInit.idl (rev 0)
+++ trunk/Source/WebCore/dom/DOMQuadInit.idl 2017-06-17 22:34:28 UTC (rev 218458)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://drafts.fxtf.org/geometry/#dictdef-domquadinit
+
+dictionary DOMQuadInit {
+ DOMPointInit p1;
+ DOMPointInit p2;
+ DOMPointInit p3;
+ DOMPointInit p4;
+};