Timeline
Apr 16, 2017:
- 11:02 PM Changeset in webkit [215406] by
-
- 9 edits1 delete in branches/safari-603-branch
Roll out r211294 vi 215335. rdar://problem/31512298
- 7:59 PM Changeset in webkit [215405] by
-
- 7 edits in trunk
test262: test262/test/built-ins/Object/prototype/toLocaleString/primitive_this_value.js
https://bugs.webkit.org/show_bug.cgi?id=170882
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-16
Reviewed by Saam Barati.
JSTests:
- test262.yaml:
Source/JavaScriptCore:
- runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncToLocaleString):
We should be using the this value without ToObject conversion both when
getting the potential accessor and calling it. In strict mode, the this
value will remain its simple value, in non-strict it is still converted.
LayoutTests:
- js/dom/object-prototype-toLocaleString-expected.txt:
- js/dom/script-tests/object-prototype-toLocaleString.js:
Test the case of toLocaleString where toString does not exist.
- 5:56 PM Changeset in webkit [215404] by
-
- 8 edits4 adds in trunk
CMD+R / CMD+Q is considered as user interaction and beforeunload alert is shown
https://bugs.webkit.org/show_bug.cgi?id=169995
<rdar://problem/23798897>
Reviewed by Sam Weinig.
Source/WebCore:
Any key event was considered as user interaction with the page, which meant that they
would allow beforeunload alerts to be shown even when they do not represent actual
user interaction (e.g CMD+R / CMD+Q / CMD+T keyboard shortcuts).
To address the issue, we now only treat as user interaction with the page key events
that are actually handled by the page (i.e. handled by JS, typed into a field, ...).
Tests: fast/events/beforeunload-alert-handled-keydown.html
fast/events/beforeunload-alert-unhandled-keydown.html
- dom/Document.h:
(WebCore::Document::setUserDidInteractWithPage):
(WebCore::Document::userDidInteractWithPage):
- dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):
- loader/FrameLoader.cpp:
(WebCore::shouldAskForNavigationConfirmation):
- page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::internalKeyEvent):
- page/EventHandler.h:
LayoutTests:
Add layout test coverage.
- fast/events/beforeunload-alert-handled-keydown-expected.txt: Added.
- fast/events/beforeunload-alert-handled-keydown.html: Added.
- fast/events/beforeunload-alert-unhandled-keydown-expected.txt: Added.
- fast/events/beforeunload-alert-unhandled-keydown.html: Added.
- 5:50 PM Changeset in webkit [215403] by
-
- 26 edits1 add1 delete in trunk
[WebIDL] Switch IDLAttributes.txt over to a more structured format so that more information can be added for each attribute
https://bugs.webkit.org/show_bug.cgi?id=170843
Patch by Sam Weinig <sam@webkit.org> on 2017-04-16
Reviewed by Chris Dumez.
.:
- Source/cmake/WebKitMacros.cmake:
Update extension of IDLAttributes to .json
Source/WebCore:
- Converts IDLAttributes.txt to IDLAttributes.json, and adds additional information for each attribute about what contexts they are valid in which is checked by the parser.
- Removes CustomSetPrototype which was unused, and Immutable which did nothing.
- DerivedSources.make:
Update extension of IDLAttributes to .json
- WebCore.xcodeproj/project.pbxproj:
Update project file for new file name and add some missing IDL files.
- bindings/scripts/CodeGenerator.pm:
Store the processed IDLAttributes in the code generator, so it can
be used for any additional Parser instantiations.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
Remove support for CustomSetPrototype. Nobody is using it.
- bindings/scripts/IDLAttributes.json: Copied from Source/WebCore/bindings/scripts/IDLAttributes.txt.
- bindings/scripts/IDLAttributes.txt: Removed.
Rename IDLAttributes.txt -> IDLAttributes.json and move the data
into a more structured format. For now each extended attribute can
have the following fields:
Required:
'contextsAllowed' -> Non-empty array of strings from the contexts array.
Optional:
'values' -> Non-empty array of strings allowed after the equal (=) sign in
the extended attribute. Like before, an empty string indicates it is
ok to not have a value and a star (*) indicates any string is allowed.
Not providing a values property at all indicates that no value is
allowed.
'standard' -> An object with information about the standard this attribute
comes from. Should only be added to attributes that come from standards.
'unsupported' -> A boolean with value true, indicating this property is not
yet supported. Should only be used for standard attributes.
'notes' -> A string with notes explaining something about this attribute.
- bindings/scripts/IDLParser.pm:
Pass and store the processed extended attribute map to the parser, and use it
validate that extended attributes being added to things are appropriate for the
context. Fix FIXME in isExtendedAttributeApplicableToTypes by using the map to
implement the predicate, rather than hard coding the list.
- bindings/scripts/generate-bindings.pl:
(generateEmptyHeaderAndCpp):
(loadIDLAttributes): Deleted.
(checkIDLAttributes): Deleted.
(checkIfIDLAttributesExists): Deleted.
Make specifying an IDL attributes file required. Switch to processing it
as a JSON file, and having the parser validate attributes.
- bindings/scripts/test/JS/JSTestObj.cpp:
- bindings/scripts/test/JS/JSTestTypedefs.cpp:
- bindings/scripts/test/TestImplements.idl:
- bindings/scripts/test/TestObj.idl:
- bindings/scripts/test/TestSupplemental.idl:
- bindings/scripts/test/TestTypedefs.idl:
- Remove use of Immutable extended attribute in the tests, as it does nothing.
- Remove use of the made up ReadOnly attribute, as the tests now use the IDLAttributes file to validate that the attributes are supported, so this would otherwise fail.
- css/WebKitCSSMatrix.idl:
- svg/SVGZoomEvent.idl:
- Remove use of the Immutable extended attribute, as it does nothing.
- page/NavigatorID.idl:
- page/NavigatorLanguage.idl:
- Remove use of the Nondeterministic extended attribute, as it does nothing.
- Modules/mediasource/SourceBufferList.idl:
Remove use of CallWith on the interface. It is illegal, and does nothing.
- animation/KeyframeEffect.idl:
- animation/WebAnimation.idl:
Remove use of [Default=Undefined]. This construct does nothing and now
correctly fails to parse.
Tools:
- DumpRenderTree/DerivedSources.make:
- WebKitTestRunner/DerivedSources.make:
- Scripts/webkitpy/bindings/main.py:
(BindingsTests.generate_from_idl):
Pass IDLAttributes.json, as it is now mandatory to have one.
- 1:20 PM Changeset in webkit [215402] by
-
- 10 edits1 add in trunk
test262: test262/test/built-ins/isNaN/toprimitive-not-callable-throws.js
https://bugs.webkit.org/show_bug.cgi?id=170888
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-16
Reviewed by Saam Barati.
JSTests:
- stress/computed-accessor.js:
- stress/eval-in-arrow-function.js:
- stress/rest-elements.js:
- stress/string-object-define-own-property.js:
Remove unused shouldThrow.
- stress/symbol-toprimitive-errors.js: Added.
Check for ToPrimitive TypeErrors.
- test262.yaml:
Source/JavaScriptCore:
- runtime/ExceptionHelpers.h:
- runtime/ExceptionHelpers.cpp:
(JSC::createInvalidInstanceofParameterErrorHasInstanceValueNotFunction):
Fix up this function name.
- runtime/JSObject.cpp:
(JSC::callToPrimitiveFunction):
When called with @@isPrimitive, bail on undefined or null and
throw a type error if the value is not callable.
(JSC::JSObject::toPrimitive):
Use throw scope to check for exception.
- 1:01 PM Changeset in webkit [215401] by
-
- 4 edits1 add in trunk
test262: test262/test/language/expressions/tagged-template/template-object.js
https://bugs.webkit.org/show_bug.cgi?id=170878
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-16
Reviewed by Saam Barati.
JSTests:
- stress/array-length-not-writable.js: Added.
(assert):
- test262.yaml:
Source/JavaScriptCore:
- runtime/JSArray.cpp:
(JSC::JSArray::put):
The fast path for setting an Array's length should check if length is
writable before checking for and possibly throwing a RangeError.
- 10:37 AM Changeset in webkit [215400] by
-
- 9 edits in trunk
test262: test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js
https://bugs.webkit.org/show_bug.cgi?id=170879
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-16
Reviewed by Saam Barati.
JSTests:
- ChakraCore/test/es5/enumerable.baseline-jsc:
- test262.yaml:
Source/JavaScriptCore:
- runtime/StringObject.h:
- runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertyNames):
(JSC::StringObject::getOwnNonIndexPropertyNames):
Ensure 'length' comes after all indexed properties by moving
it out to the getOwnNonIndexPropertyNames method which is called
inside of getOwnPropertyNames after JSObject handles indices.
LayoutTests:
- js/Object-getOwnPropertyNames-expected.txt:
- js/script-tests/Object-getOwnPropertyNames.js:
- 4:13 AM Changeset in webkit [215399] by
-
- 11 edits in trunk
test262: test262/test/built-ins/Date/prototype/Symbol.toPrimitive/name.js
https://bugs.webkit.org/show_bug.cgi?id=170884
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-16
Reviewed by Yusuke Suzuki.
JSTests:
- test262.yaml:
Source/JavaScriptCore:
- runtime/DatePrototype.cpp:
(JSC::DatePrototype::finishCreation):
- runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):
- runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::finishCreation):
- runtime/SymbolPrototype.cpp:
(JSC::SymbolPrototype::finishCreation):
Give symbol property functions proper function names.
This addresses function.name but not function.toString().
Apr 15, 2017:
- 11:24 PM Changeset in webkit [215398] by
-
- 2 edits in trunk/Source/WebCore
Fix Windows build after r215396.
https://bugs.webkit.org/show_bug.cgi?id=170828
- platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::openTypeTable):
- 7:40 PM Changeset in webkit [215397] by
-
- 5 edits in trunk/Source/WebKit2
Include resource size in some existing logging
https://bugs.webkit.org/show_bug.cgi?id=170866
Reviewed by Alex Christensen.
In order to correlate resource load times with resource size, we log
when the resource is starting to be loaded and when the resource is
finished loading. In NetworkResourceLoader::didReceiveResponse, we
also log the expected resource length. However, we can only log the
length if it is provided in Content-Length, which is not always the
case. If it's not provided, we end up logging "length = -1". To make
up for this, change NetworkResourceLoader::didFinishLoading and
WebResourceLoader:: didFinishLoading to log the length once we know
it.
- NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
- NetworkProcess/NetworkResourceLoader.h:
- WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
- WebProcess/Network/WebResourceLoader.h:
- 5:09 PM Changeset in webkit [215396] by
-
- 5 edits in trunk/Source/WebCore
Remove unused SharedBuffer constructor
https://bugs.webkit.org/show_bug.cgi?id=170828
Reviewed by Brady Eidson.
- platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
- platform/SharedBuffer.h:
(WebCore::SharedBuffer::create):
- platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::openTypeTable):
- platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::openTypeTable):
- 3:44 PM Changeset in webkit [215395] by
-
- 10 edits in trunk
test262: test262/test/language/global-code/new.target-arrow.js
https://bugs.webkit.org/show_bug.cgi?id=170872
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-15
Reviewed by Saam Barati.
JSTests:
- stress/async-arrow-functions-lexical-new.target-binding.js:
(shouldThrowAsync): Deleted.
(shouldThrowAsync.async): Deleted.
This code should have thrown a SyntaxError. Instead it was throwing
a ReferenceError for the internal @newTargetLocal variable.
- stress/new-target-syntax-errors.js:
Cover the arrow function in global code cases.
- ChakraCore.yaml:
- ChakraCore/test/es6/globalLambdaNewTargetSyntaxError.baseline-jsc:
We now pass with an expected SyntaxError. Our error message is different.
- test262.yaml:
Source/JavaScriptCore:
- parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
Mark the global code scope.
(JSC::Parser<LexerType>::parseMemberExpression):
If new.target is detected in an arrow function defined in global scope
throw a SyntaxError.
- parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::setIsGlobalCodeScope):
(JSC::Scope::isGlobalCodeScope):
Marker for a global code scope.
- parser/ParserModes.h:
(JSC::isModuleParseMode):
(JSC::isProgramParseMode):
(JSC::isProgramOrModuleParseMode):
Helper for detecting global code based on parse mode.
- 11:15 AM Changeset in webkit [215394] by
-
- 5 edits in trunk/Source/WebCore
Unreviewed, rolling out r215393.
https://bugs.webkit.org/show_bug.cgi?id=170876
breaks scrollable iframes on ios (Requested by anttik on
#webkit).
Reverted changeset:
"GraphicsLayerCA::recursiveCommitChanges should not descend
into subtrees without changes"
https://bugs.webkit.org/show_bug.cgi?id=170851
http://trac.webkit.org/changeset/215393
- 6:15 AM Changeset in webkit [215393] by
-
- 5 edits in trunk/Source/WebCore
GraphicsLayerCA::recursiveCommitChanges should not descend into subtrees without changes
https://bugs.webkit.org/show_bug.cgi?id=170851
Reviewed by Simon Fraser.
With lots of layers this can be very slow as it always traverses the entire layer tree.
For example GIF animations on tumblr.com trigger expensive commits where almost nothing changes.
This patch adds m_hasDescendantsWithUncommittedChanges bit to GraphicsLayerCA. With this
we can avoid descending to branches without changes when committing.
- platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
Do all setting of m_uncommittedChanges bits via addUncommittedChanges function.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
Bail out if neither the current layer nor any of its descendants have any uncommited changes
and none of the ancestors had changes.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
(WebCore::GraphicsLayerCA::addUncommittedChanges):
Set m_hasDescendantsWithUncommittedChanges bit in ancestors when mutating m_uncommittedChanges.
(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
- platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::RenderLayerCompositor::frameViewDidScroll):
Tell the scrolling layer that it needs to recompute coverage.
This also schedules a layer flush so no need to do that separately.
- 2:37 AM Changeset in webkit [215392] by
-
- 22 edits in trunk/Source
[WK2] Support data interaction of files into file inputs
https://bugs.webkit.org/show_bug.cgi?id=170803
<rdar://problem/31286130>
Reviewed by Tim Horton.
Source/WebCore:
Adds remaining support to allow data interaction of files onto inputs of type file. See per-change annotations
for more details. Unit tests to be added in the next patch.
- platform/PasteboardStrategy.h:
- platform/PlatformPasteboard.h:
- platform/ios/AbstractPasteboard.h:
- platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::numberOfFiles):
- platform/ios/WebItemProviderPasteboard.mm:
Implements numberOfFiles by counting the number of item providers that may be represented as a file, which
includes all item providers that contain at least one content UTI type.
(-[WebItemProviderPasteboard numberOfFiles]):
Adds boilerplate plumbing to fetch the number of files available on the pasteboard. On Mac, logic that
previously existed in DragData::numberOfFiles to query the number of files available in the pasteboard is now
on PlatformPasteboard instead, which both makes the implementation of DragData::numberOfFiles platform-invariant,
and also saves us one synchronous IPC call to the UI process in the WebKit2 implementation.
- platform/mac/DragDataMac.mm:
(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):
Add support for recognizing objects in the pasteboard that may be represented by files, and therefore may be
uploaded via file input. Following suit with behavior elsewhere on the platform, we consider item providers able
to be represented by a file if they contain at least one content UTI type.
- platform/mac/PlatformPasteboardMac.mm:
Logic previously in DragData::numberOfFiles to get and then count all file path names in the pasteboard has been
moved here instead, and no longer needs to go through the pasteboard proxy.
(WebCore::PlatformPasteboard::numberOfFiles):
Source/WebKit/mac:
Add boilerplate plumbing for fetching the number of files in the pasteboard.
- WebCoreSupport/WebPlatformStrategies.h:
- WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::getNumberOfFiles):
Source/WebKit2:
Implements remaining support for performing data interaction onto file inputs. There are two main changes at
this layer: plumbing the number of files in the pasteboard to the web process, and pulling the implementation of
createSandboxExtensionsIfNeeded out of Mac-specific WebViewImpl::createSandboxExtensionsIfNeeded and into
WebPageProxy::createSandboxExtensionsIfNeeded.
- Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):
Relax special-casing of encoding and decoding filenames to be PLATFORM(COCOA) rather than PLATFORM(MAC).
- UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
- UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getNumberOfFiles):
More boilerplate plumbing to deliver the number of files in the pasteboard to the web process.
- UIProcess/Cocoa/WebViewImpl.h:
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::performDragOperation):
(WebKit::WebViewImpl::createSandboxExtensionsIfNeeded): Deleted.
Move the logic in WebViewImpl::createSandboxExtensionsIfNeeded over to WebPageProxy::createSandboxExtensionsIfNeeded.
- UIProcess/WebPageProxy.h:
- UIProcess/WebPasteboardProxy.h:
- UIProcess/WebPasteboardProxy.messages.in:
- WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getNumberOfFiles):
- WebProcess/WebCoreSupport/WebPlatformStrategies.h:
- 2:06 AM Changeset in webkit [215391] by
-
- 3 edits in trunk/Source/WebKit/win
Unreviewed, fix the Windows build after r215385
r215385 introduced a new virtual method on ChromeClient that needs to be implemented in WebChromeClient for
Windows in WebKit1.
- WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::createIconForFiles):
- WebCoreSupport/WebChromeClient.h:
- 1:47 AM Changeset in webkit [215390] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, fix the build after r215389
Use WebCore::createTemporaryDirectory instead of -_webkit_createTemporaryDirectoryWithTemplatePrefix:.
- platform/ios/WebItemProviderPasteboard.mm:
(temporaryFileURLForDataInteractionContent):