Diff
Modified: trunk/LayoutTests/ChangeLog (209676 => 209677)
--- trunk/LayoutTests/ChangeLog 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/LayoutTests/ChangeLog 2016-12-11 00:04:30 UTC (rev 209677)
@@ -1,5 +1,15 @@
2016-12-10 Simon Fraser <[email protected]>
+ Support the deprecated dictionary constructor for DOMPointReadOnly and DOMPoint
+ https://bugs.webkit.org/show_bug.cgi?id=165732
+
+ Reviewed by Sam Weinig.
+
+ * geometry/DOMPoint-001-expected.txt:
+ * geometry/DOMPoint-001.html:
+
+2016-12-10 Simon Fraser <[email protected]>
+
Animation followed by transition doesn't always fire transitionend event
https://bugs.webkit.org/show_bug.cgi?id=165731
rdar://problem/28471240
Modified: trunk/LayoutTests/geometry/DOMPoint-001-expected.txt (209676 => 209677)
--- trunk/LayoutTests/geometry/DOMPoint-001-expected.txt 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/LayoutTests/geometry/DOMPoint-001-expected.txt 2016-12-11 00:04:30 UTC (rev 209677)
@@ -7,6 +7,10 @@
PASS testConstructor3
PASS testConstructor4
PASS testConstructor5
+PASS testDictionaryConstructor1
+PASS testDictionaryConstructor2
+PASS testDictionaryConstructor3
+PASS testDictionaryConstructor4
PASS testConstructorDOMPointInit0
PASS testConstructorDOMPointInit1
PASS testConstructorDOMPointInit2
Modified: trunk/LayoutTests/geometry/DOMPoint-001.html (209676 => 209677)
--- trunk/LayoutTests/geometry/DOMPoint-001.html 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/LayoutTests/geometry/DOMPoint-001.html 2016-12-11 00:04:30 UTC (rev 209677)
@@ -35,7 +35,22 @@
test(function() {
checkDOMPoint(new DOMPoint(1, 2, 3, 4, 5), {x:1, y:2, z:3, w:4});
},'testConstructor5');
+
+ // Dictionary constructors are in http://www.w3.org/TR/geometry-1 but not http://dev.w3.org/fxtf/geometry.
test(function() {
+ checkDOMPoint(new DOMPoint({x:1, y:2, z:3, w:4}), {x:1, y:2, z:3, w:4});
+ },'testDictionaryConstructor1');
+ test(function() {
+ checkDOMPoint(new DOMPoint({}), {x:0, y:0, z:0, w:1});
+ },'testDictionaryConstructor2');
+ test(function() {
+ checkDOMPoint(new DOMPoint({x:1}), {x:1, y:0, z:0, w:1});
+ },'testDictionaryConstructor3');
+ test(function() {
+ checkDOMPoint(new DOMPoint({y:3, w:0.5}), {x:0, y:3, z:0, w:0.5});
+ },'testDictionaryConstructor4');
+
+ test(function() {
checkDOMPoint(DOMPoint.fromPoint({}), {x:0, y:0, z:0, w:1});
},'testConstructorDOMPointInit0');
test(function() {
Modified: trunk/Source/WebCore/ChangeLog (209676 => 209677)
--- trunk/Source/WebCore/ChangeLog 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/Source/WebCore/ChangeLog 2016-12-11 00:04:30 UTC (rev 209677)
@@ -1,3 +1,21 @@
+2016-12-10 Simon Fraser <[email protected]>
+
+ Support the deprecated dictionary constructor for DOMPointReadOnly and DOMPoint
+ https://bugs.webkit.org/show_bug.cgi?id=165732
+
+ Reviewed by Sam Weinig.
+
+ For compatibility with other browsers, support the DOMPointInit constructor to
+ DOMPoint and DOMPointReadOnly per <https://www.w3.org/TR/geometry-1/#DOMPoint>
+
+ Extended geometry/DOMPoint-001.html to test.
+
+ * dom/DOMPoint.h:
+ * dom/DOMPoint.idl:
+ * dom/DOMPointReadOnly.h:
+ (WebCore::DOMPointReadOnly::create):
+ * dom/DOMPointReadOnly.idl:
+
2016-12-10 Dave Hyatt <[email protected]>
[CSS Parser] Make sure content extensions initialize AtomicString
Modified: trunk/Source/WebCore/dom/DOMPoint.h (209676 => 209677)
--- trunk/Source/WebCore/dom/DOMPoint.h 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/Source/WebCore/dom/DOMPoint.h 2016-12-11 00:04:30 UTC (rev 209677)
@@ -38,6 +38,7 @@
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(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); }
void setX(double x) { m_x = x; }
Modified: trunk/Source/WebCore/dom/DOMPoint.idl (209676 => 209677)
--- trunk/Source/WebCore/dom/DOMPoint.idl 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/Source/WebCore/dom/DOMPoint.idl 2016-12-11 00:04:30 UTC (rev 209677)
@@ -28,7 +28,9 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// The DOMPointInit constructor exists in https://www.w3.org/TR/geometry-1/ but is removed in https://drafts.fxtf.org/geometry/
[
+ Constructor(DOMPointInit point),
Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
optional unrestricted double z = 0, optional unrestricted double w = 1),
Exposed=(Window,Worker),
Modified: trunk/Source/WebCore/dom/DOMPointReadOnly.h (209676 => 209677)
--- trunk/Source/WebCore/dom/DOMPointReadOnly.h 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/Source/WebCore/dom/DOMPointReadOnly.h 2016-12-11 00:04:30 UTC (rev 209677)
@@ -40,6 +40,7 @@
WTF_MAKE_FAST_ALLOCATED;
public:
static Ref<DOMPointReadOnly> create(double x, double y, double z, double w) { return adoptRef(*new DOMPointReadOnly(x, y, z, w)); }
+ static Ref<DOMPointReadOnly> create(const DOMPointInit& init) { return create(init.x, init.y, init.z, init.w); }
static Ref<DOMPointReadOnly> fromPoint(const DOMPointInit& init) { return create(init.x, init.y, init.z, init.w); }
double x() const { return m_x; }
Modified: trunk/Source/WebCore/dom/DOMPointReadOnly.idl (209676 => 209677)
--- trunk/Source/WebCore/dom/DOMPointReadOnly.idl 2016-12-10 23:36:59 UTC (rev 209676)
+++ trunk/Source/WebCore/dom/DOMPointReadOnly.idl 2016-12-11 00:04:30 UTC (rev 209677)
@@ -28,7 +28,9 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// The DOMPointInit constructor exists in https://www.w3.org/TR/geometry-1/ but is removed in https://drafts.fxtf.org/geometry/
[
+ Constructor(DOMPointInit point),
Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
optional unrestricted double z = 0, optional unrestricted double w = 1),
Exposed=(Window,Worker),