Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Update CustomEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163174 Reviewed by Darin Adler. Source/WebCore: Update CustomEvent to stop using legacy [ConstructorTemplate=Event] and use an actual constructor instead, like in the specification: - https://dom.spec.whatwg.org/#interface-customevent There is a very minor behavior change when explictly passing undefined as detail value in CustomEventInit. We used to initialize detail to undefined but we now initialize it to null instead, which is its default value. The new behavior matches the one of Chrome and Firefox. * bindings/scripts/CodeGeneratorJS.pm: (GenerateDefaultValue): (GenerateDictionaryImplementationContent): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::convertDictionary<TestObj::Dictionary>): * bindings/scripts/test/TestObj.idl: * dom/CustomEvent.cpp: (WebCore::CustomEvent::CustomEvent): * dom/CustomEvent.h: * dom/CustomEvent.idl: * dom/Document.cpp: (WebCore::Document::createEvent): * dom/Event.cpp: (WebCore::Event::Event): * dom/Event.h: LayoutTests: Update existing layout test to reflect minor behavior change. * fast/events/constructors/custom-event-constructor-expected.txt: * fast/events/constructors/custom-event-constructor.html: Canonical link: https://commits.webkit.org/181012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
93 additions
and 26 deletions.
- +12 −0 LayoutTests/ChangeLog
- +1 −1 LayoutTests/fast/events/constructors/custom-event-constructor-expected.txt
- +2 −2 LayoutTests/fast/events/constructors/custom-event-constructor.html
- +32 −0 Source/WebCore/ChangeLog
- +4 −2 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
- +8 −1 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
- +1 −0 Source/WebCore/bindings/scripts/test/TestObj.idl
- +5 −4 Source/WebCore/dom/CustomEvent.cpp
- +15 −10 Source/WebCore/dom/CustomEvent.h
- +8 −2 Source/WebCore/dom/CustomEvent.idl
- +1 −1 Source/WebCore/dom/Document.cpp
- +3 −2 Source/WebCore/dom/Event.cpp
- +1 −1 Source/WebCore/dom/Event.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -31,8 +31,9 @@ | ||
|
||
namespace WebCore { | ||
|
||
Event::Event(IsTrusted isTrusted) | ||
: m_isTrusted(isTrusted == IsTrusted::Yes) | ||
, m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | ||
{ | ||
} | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters