Timeline
Mar 19, 2017:
- 6:32 PM Changeset in webkit [214161] by
-
- 2 edits in branches/safari-603-branch/Source/JavaScriptCore
Merge r214079. rdar://problem/31116372
- 6:32 PM Changeset in webkit [214160] by
-
- 8 edits in branches/safari-603-branch/Source/JavaScriptCore
Merge r214071. rdar://problem/31077016
- 6:32 PM Changeset in webkit [214159] by
-
- 3 edits2 adds in branches/safari-603-branch
Merge r214059. rdar://problem/31099341
- 6:32 PM Changeset in webkit [214158] by
-
- 5 edits2 adds in branches/safari-603-branch
Merge r214023. rdar://problem/31091039
- 6:32 PM Changeset in webkit [214157] by
-
- 3 edits2 adds in branches/safari-603-branch
Merge r213967. rdar://problem/30921827
- 6:32 PM Changeset in webkit [214156] by
-
- 7 edits3 adds in branches/safari-603-branch
Merge r213897. rdar://problem/30921833
- 6:32 PM Changeset in webkit [214155] by
-
- 8 edits in branches/safari-603-branch/Source/WebCore
Merge r213833. rdar://problem/31092879
- 6:32 PM Changeset in webkit [214154] by
-
- 3 edits1 add in branches/safari-603-branch
Merge r213742. rdar://problem/30921818
- 6:32 PM Changeset in webkit [214153] by
-
- 2 edits in branches/safari-603-branch/Source/JavaScriptCore
Merge r213648. rdar://problem/30921824
- 6:32 PM Changeset in webkit [214152] by
-
- 3 edits2 adds in branches/safari-603-branch
Merge r213501. rdar://problem/30921830
- 6:31 PM Changeset in webkit [214151] by
-
- 5 edits in branches/safari-603-branch
Merge r213385. rdar://problem/30921816
- 6:31 PM Changeset in webkit [214150] by
-
- 5 edits2 adds in branches/safari-603-branch
Merge r213311. rdar://problem/30812769
- 6:31 PM Changeset in webkit [214149] by
-
- 2 edits in branches/safari-603-branch/Source/WebKit2
Merge r212726. rdar://problem/30921822
- 5:26 PM Changeset in webkit [214148] by
-
- 2 edits in trunk/Source/WebKit/mac
WebHTMLView is useless as WebResourceHandler
https://bugs.webkit.org/show_bug.cgi?id=169857
Reviewed by Dan Bernstein.
- WebView/WebHTMLView.mm:
(-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
WebHTMLView doesnt implement any of WebResourceHandler methods.
- 2:51 PM Changeset in webkit [214147] by
-
- 20 edits8 adds in trunk
Implement self.origin
https://bugs.webkit.org/show_bug.cgi?id=168023
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
- resources/import-expectations.json:
- web-platform-tests/html/dom/interfaces-expected.txt:
- web-platform-tests/html/dom/self-origin.any-expected.txt:
- web-platform-tests/html/dom/self-origin.sub-expected.txt:
Rebaseline several WPT tests now that more checks are passing.
- web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin-expected.txt: Added.
- web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin.html: Added.
- web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/support/WorkerSelfOriginSharedWorker.js: Added.
(onconnect):
- web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/support/WorkerSelfOriginWorker.js: Added.
- web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/support/w3c-import.log: Added.
- web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/w3c-import.log: Added.
Import test coverage for self.origin in workers.
Source/WebCore:
Implement self.origin:
Firefox and Chrome already support this.
Test: imported/w3c/web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin.html
- page/DOMWindow.cpp:
(WebCore::DOMWindow::origin):
- page/DOMWindow.h:
- page/WindowOrWorkerGlobalScope.idl:
- workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::origin):
- workers/WorkerGlobalScope.h:
LayoutTests:
- http/tests/websocket/tests/hybi/handshake-fail-by-maxlength-expected.txt:
- http/tests/websocket/tests/hybi/handshake-fail-by-maxlength.html:
- http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt:
- http/tests/websocket/tests/hybi/handshake-fail-by-no-cr.html:
- http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status-expected.txt:
- http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status.html:
- http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null-expected.txt:
- http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null.html:
Rename origin to wsOrigin in tests to avoid conflict with window.origin.
- 2:11 PM Changeset in webkit [214146] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: REGRESSION (r212910): Active call frame status icon has incorrect left margin
https://bugs.webkit.org/show_bug.cgi?id=169862
Reviewed by Brian Burg.
- UserInterface/Views/CallFrameTreeElement.css:
(.tree-outline .item.call-frame .status):
(body[dir=ltr] .tree-outline .item.call-frame .status):
(body[dir=rtl] .tree-outline .item.call-frame .status):
- 10:45 AM Changeset in webkit [214145] by
-
- 9 edits5 adds in trunk
const location = "foo"throws in a worker
https://bugs.webkit.org/show_bug.cgi?id=169839
Reviewed by Mark Lam.
JSTests:
- ChakraCore/test/es6/letconst_global_shadow_builtins_nonconfigurable.baseline-jsc:
Update expected jsc result now that we throw a SyntaxError when trying to shadow undefined
with a let variable. We used not to throw because the value is undefined but this was not
as per EcmaScript. Both Firefox and Chrome throw in this case.
- stress/global-lexical-redeclare-variable.js:
(catch):
Update test that defines a non-configurable 'zoo' property on the global object and then
expected shadowing it with a 'let zoo' variable to work because its value was undefined.
This was not as per EcmaScript spec and both Firefox and Chrome throw in this case.
Source/JavaScriptCore:
Our HasRestrictedGlobalProperty check in JSC was slightly wrong, causing us
to sometimes throw a Syntax exception when we shouldn't when declaring a
const/let variable and sometimes not throw an exception when we should have.
This aligns our behavior with ES6, Firefox and Chrome.
- runtime/ProgramExecutable.cpp:
(JSC::hasRestrictedGlobalProperty):
(JSC::ProgramExecutable::initializeGlobalProperties):
Rewrite hasRestrictedGlobalProperty logic as per the EcmaScript spec:
In particular, they were 2 issues:
- We should throw a SyntaxError if hasProperty() returned true but getOwnProperty() would fail to return a descriptor. This would happen for properties that are not OWN properties, but defined somewhere in the prototype chain. The spec does not say to use hasProperty(), only getOwnProperty() and says we should return false if getOwnProperty() does not return a descriptor. This is what we do now.
- We would fail to throw when declaring a let/const variable that shadows an own property whose value is undefined. This is because the previous code was explicitly checking for this case. I believe this was a misinterpretation of ES6 which says: """ Let desc be O.GetOwnProperty(P). If desc is undefined, return false. """ We should check that desc is undefined, not desc.value. This is now fixed.
LayoutTests:
- fast/dom/window-const-variable-shadowing-expected.txt: Added.
- fast/dom/window-const-variable-shadowing.html: Added.
- fast/workers/const-location-variable-expected.txt: Added.
- fast/workers/const-location-variable.html: Added.
- fast/workers/resources/worker-const-location.js: Added.
Add layout test coverage for behavior changes. Those tests pass in Firefox and Chrome.
- js/dom/const-expected.txt:
- js/dom/const.html:
Update test which wrongly expected a let variable not to be able to shadow a
window named property. This test was failing in Chrome and Firefox. The reason
this does not throw is because window named properties are not on the window
object, they are on the WindowProperties object in the Window prototype chain.
- 8:54 AM Changeset in webkit [214144] by
-
- 5 edits in trunk/Source/WebKit2
[Cocoa] Web Automation: non-sticky virtual keys like 'left arrow' don't work properly
https://bugs.webkit.org/show_bug.cgi?id=169733
<rdar://problem/30162608>
Reviewed by Joseph Pecoraro.
There were several issues that caused certain virtual keys to not work correctly.
When a virtual key like 'left arrow' was dispatched as a keydown event, it was
ultimately being translated into an insertText: command instead of moveLeft:.
- The automation browser window was not properly made key window and active, so AppKit never tried to match the NSEvent as a key equivalent. That code path must be taken in this case, as it translates arrow keys into command selectors.
- AppKit relies on its own private use area (PUA) unicode characters to encode control keys that do not affect key modifier state, like the arrow keys. Since these PUA characters were not being used as the 'characters' of the NSEvents we synthesize, the events are treated as unknown and AppKit falls back to inserting the codepoint as uninterpreted text.
- The Mac implementation of platformSimulateKeyStroke did not allow non-sticky virtual keys to use the 'InsertByKey' interaction which sends keydown+keyup. This is a programming mistake that causes such inputs to assert in debug builds and bail out to do nothing in non-debug builds.
- A few simulated virtual keys that are matched to key equivalents did not properly set 'charactersIgnoringModifiers' on NSEvents, which may use the wrong editing command.
- UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::performKeyboardInteractions):
Fix this guard so that we actually call into key event synthesis code for iOS.
- UIProcess/Automation/WebAutomationSession.h: Add declarations.
- UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::charCodeForVirtualKey): Moved from iOS implementation.
(WebKit::WebAutomationSession::charCodeIgnoringModifiersForVirtualKey): Added.
There are only a few special cases for now. We will probably need to hardcode
the decomposition for other ASCII characters so the expected DOM events are fired
when entering a shifted character (i.e., 'A' should be 'Shift'+'a', not 'A').
- UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
(WebKit::WebAutomationSession::platformSimulateKeyStroke):
Use charCodeIgnoringModifiersForVirtualKey().
- UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::sendSynthesizedEventsToPage): use -becomeKeyWindow.
(WebKit::keyHasStickyModifier): Added.
(WebKit::keyCodeForVirtualKey): Added.
(WebKit::eventModifierFlagsForVirtualKey):Added.
(WebKit::WebAutomationSession::platformSimulateKeyStroke):
Separately compute key stickiness, keyCode, event modifier, and charCode for
the simulated keystroke. The code to compute charCode is now shared between
iOS and macOS since the PUA characters are the same for both AppKit and UIKit.
- 8:41 AM Changeset in webkit [214143] by
-
- 3 edits1 add in trunk
import(arg) crashes when ToString(arg) throws
https://bugs.webkit.org/show_bug.cgi?id=169778
Reviewed by Saam Barati.
JSTests:
- stress/import-reject-with-exception.js: Added.
(shouldBe):
(let.x.get toString):
Source/JavaScriptCore:
JSPromiseDeferred should not be rejected with Exception*.
- runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncImportModule):
Mar 18, 2017:
- 6:06 PM WebKitGTK/2.16.x edited by
- (diff)
- 5:58 PM Changeset in webkit [214142] by
-
- 2 edits in trunk/Source/WebCore/platform/gtk/po
Update Ukrainian translation
https://bugs.webkit.org/show_bug.cgi?id=169812
Patch by Yuri Chornoivan <yurchor@ukr.net> on 2017-03-18
Rubber-stamped by Michael Catanzaro.
- uk.po:
- 5:58 PM Changeset in webkit [214141] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Empty attribute added to a DOM tree outline element should not add whitespace within the tag
https://bugs.webkit.org/show_bug.cgi?id=139623
Reviewed by Brian Burg.
- UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
If thenewTextafter editing has no content, remove the element for that attribute.
- 5:41 PM Changeset in webkit [214140] by
-
- 3 edits in trunk/Source/WebInspectorUI
Web Inspector: add keyboard shortcut to clear timeline records
https://bugs.webkit.org/show_bug.cgi?id=132485
Reviewed by Brian Burg.
- Localizations/en.lproj/localizedStrings.js:
- UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.handleClearShortcut):
- 1:22 PM Changeset in webkit [214139] by
-
- 13 edits in trunk
Add support for ImplementedAs, Clamp, EnforceRange, TreatNullAs for dictionary members
https://bugs.webkit.org/show_bug.cgi?id=169731
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
Rebaseline tests. The results seem to show a problem in the original tests.
- web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker-expected.txt:
- web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:
Source/WebCore:
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionaryImplementationContent): Create a new $implementationAsKey. Look for
ImplementedAs, and if it exists, override the value with the alias. Set the parameters of
convert<>() using JSValueToNative.
(IsValidContextForJSValueToNative): Update to include IDLDictionaryMembers.
(JSValueToNative): Bypass parseEnumeration serialization for enums if the context is an
IDLDictionaryMember. Dictionary members need convert<IDLEnumeration> which throw a TypeError
or return the enum (and utilizes parseEnumeration). parseEnumeration, in contrast, returns
an optional.
- bindings/scripts/test/TestObj.idl: Add test cases in TestDictionary.
Update test results.
- bindings/scripts/test/JS/JSTestEventConstructor.cpp:
- bindings/scripts/test/JS/JSTestObj.cpp:
- bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
LayoutTests:
Rebaseline. The enhancement progressed the results of these tests.
- crypto/subtle/aes-gcm-encrypt-malformed-parameters-expected.txt:
- crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
- crypto/subtle/hmac-generate-key-malformed-parameters-expected.txt:
- 1:21 PM Changeset in webkit [214138] by
-
- 2 edits in trunk/Source/JavaScriptCore
[JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp
https://bugs.webkit.org/show_bug.cgi?id=169832
Reviewed by Mark Lam.
Remove already covered condition in needsDerivedConstructorInArrowFunctionLexicalEnvironment
function. Condition isConstructor() && constructorKind() == ConstructorKind::Extends is already
isClassContext.
- bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::needsDerivedConstructorInArrowFunctionLexicalEnvironment):
- 1:03 PM Changeset in webkit [214137] by
-
- 3 edits in trunk/Source/WebCore
Use initializers for Document member variables
https://bugs.webkit.org/show_bug.cgi?id=169848
Reviewed by Chris Dumez.
Move Document to use C++11 brace initializers.
No behavior change.
- dom/Document.cpp:
(WebCore::Document::Document):
- dom/Document.h:
(WebCore::Document::xmlStandaloneStatus):
(WebCore::Document::setHasXMLDeclaration):
- 12:51 PM Changeset in webkit [214136] by
-
- 8 edits in trunk
innerText setter inserts empty text node if value starts with newline
https://bugs.webkit.org/show_bug.cgi?id=169600
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Re-sync tests with upstream to gain test coverage.
- web-platform-tests/innerText/getter-expected.txt:
- web-platform-tests/innerText/getter-tests.js:
- web-platform-tests/innerText/setter-expected.txt:
- web-platform-tests/innerText/setter-tests.js:
- web-platform-tests/innerText/setter.html:
Source/WebCore:
innerText setter should not create empty text nodes as per:
No new tests, updated existing test.
- html/HTMLElement.cpp:
(WebCore::textToFragment):
- 10:52 AM Changeset in webkit [214135] by
-
- 19 edits21 adds in trunk
Allow setting the prototype of cross-origin objects, as long as they don't change
https://bugs.webkit.org/show_bug.cgi?id=169787
Reviewed by Mark Lam.
LayoutTests/imported/w3c:
Import test coverage from W3C web-platform-tests.
- web-platform-tests/common/domain-setter.sub.html: Added.
- web-platform-tests/common/test-setting-immutable-prototype.js: Added.
(self.testSettingImmutablePrototypeToNewValueOnly.test):
(self.testSettingImmutablePrototypeToNewValueOnly):
(self.testSettingImmutablePrototype.else.test):
(self.testSettingImmutablePrototype):
- web-platform-tests/common/w3c-import.log:
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-cross-origin-domain.sub-expected.txt: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-cross-origin-domain.sub.html: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-goes-cross-origin-domain.sub-expected.txt: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-goes-cross-origin-domain.sub.html: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub-expected.txt: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub.html: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-expected.txt: Added.
- web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-same-origin.html: Added.
- web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/w3c-import.log: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin-domain.sub-expected.txt: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin-domain.sub.html: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub-expected.txt: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-domain.sub-expected.txt: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-domain.sub.html: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-expected.txt: Added.
- web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin.html: Added.
Source/JavaScriptCore:
- runtime/JSGlobalObject.h:
Mark JS global object as an immutable prototype exotic object to match Window.
- runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
Update setPrototypeWithCycleCheck() for immutable prototype exotic objects in order
to align with:
In particular, we need to call GetPrototypeOf and return true if it returns the same
value as the new prototype. We really need to call GetPrototypeOf and not merely
getting the prototype slot via getPrototypeDirect() since Location and Window override
GetPrototypeOf to return null in the cross-origin case.
- runtime/JSProxy.cpp:
(JSC::JSProxy::setPrototype):
Update JSProxy::setPrototype() to forward such calls to its target. This is needed so
we end up calling JSObject::setPrototypeWithCycleCheck() for the Window object.
Handling immutable prototype exotic objects in that method does the right thing for
Window.
Source/WebCore:
Allow setting the prototype of cross-origin objects, as long as they don't change:
- https://html.spec.whatwg.org/multipage/browsers.html#windowproxy-setprototypeof
- https://html.spec.whatwg.org/multipage/browsers.html#location-setprototypeof
- https://tc39.github.io/ecma262/#sec-set-immutable-prototype
Tests: imported/w3c/web-platform-tests/common/domain-setter.sub.html
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-cross-origin-domain.sub.html
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-goes-cross-origin-domain.sub.html
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub.html
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-same-origin.html
imported/w3c/web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin-domain.sub.html
imported/w3c/web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html
imported/w3c/web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-domain.sub.html
imported/w3c/web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin.html
- bindings/js/JSLocationCustom.cpp:
- page/Location.idl:
Drop custom setPrototype() implementation for Location and mark Location as an immutable
prototype exotic object now that JSC does the right thing for those.
LayoutTests:
- http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt:
- http/tests/security/cross-frame-access-object-setPrototypeOf.html:
- js/dom/setPrototypeOf-location-window-expected.txt:
- js/dom/setPrototypeOf-location-window.html:
Add checks for setting prototype of window and location objects to the same value
to make sure it does not throw, both in the same origin and the cross origin
cases.
- fast/dom/Window/window-custom-prototype-crash-expected.txt:
- http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt:
- js/object-literal-shorthand-construction-expected.txt:
Rebaseline tests now that the exception message is a bit different.
- js/script-tests/prototype-assignment.js:
Remove special casing for Window, it now behaves like a regular immutable prototype
exotic object.