HTMLImageElement.width / height attributes should be unsigned
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Sep 2016 19:46:10 +0000 (19:46 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Sep 2016 19:46:10 +0000 (19:46 +0000)
commite4b4182df744155d001f0f18a009f06719b2920c
tree140c5520f7d8cea3a6323c42617ead17138229d2
parent32cdb197b9030975d13c21dd73391f87c98cf212
HTMLImageElement.width / height attributes should be unsigned
https://bugs.webkit.org/show_bug.cgi?id=161730

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

HTMLImageElement.width / height attributes should be unsigned as per
the HTML specification:
- https://html.spec.whatwg.org/#htmlimageelement

However, they are signed in WebKit. Firefox agrees with the
specification.

No new tests, rebaselined existing test.

* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::construct):
(WebCore::createImageConstructor): Deleted.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createForJSConstructor):
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
(WebCore::HTMLImageElement::setHeight):
(WebCore::HTMLImageElement::setWidth):
* html/HTMLImageElement.h:
* html/HTMLImageElement.idl:
* html/ImageDocument.cpp:
(WebCore::ImageDocument::restoreImageSize):

LayoutTests:

Update existing test to reflect behavior change.

* js/dom/custom-constructors-expected.txt:
* js/dom/script-tests/custom-constructors.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt
LayoutTests/js/dom/custom-constructors-expected.txt
LayoutTests/js/dom/script-tests/custom-constructors.js
LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSImageConstructor.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLImageElement.h
Source/WebCore/html/HTMLImageElement.idl
Source/WebCore/html/ImageDocument.cpp