Image.__proto__ should be Function.prototype, not HTMLElement.prototype
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 22:53:33 +0000 (22:53 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 22:53:33 +0000 (22:53 +0000)
commite9ab37460bd9ec3505c333efd92a8d937a7ba196
treeb8e03c3e08671e766199f9f428a393aea7c5e750
parentf9b81e36fd730eb33062b71d580f6a146f674486
Image.__proto__ should be Function.prototype, not HTMLElement.prototype
https://bugs.webkit.org/show_bug.cgi?id=190216

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline existing WPT test now that it is passing.

* web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor-expected.txt:

Source/WebCore:

Properties created for named constructors should always use Function.prototype as prototype, as per:
- https://heycam.github.io/webidl/#named-constructors

Gecko and Blink agree with the Web IDL specification. However, WebKit was using the parent interface's
prototype if such a parent existing. So Image.__proto__ would end up being HTMLElement.prototype
instead of Function.prototype.

No new tests, rebaselined existing test.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor-expected.txt
LayoutTests/js/interface-objects-expected.txt
LayoutTests/js/interface-objects.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm