Timeline



Mar 9, 2017:

11:19 PM Changeset in webkit [213703] by tpopela@redhat.com
  • 26 edits in trunk/Source/WebKit2

Unreviewed, fix documentation typos

  • UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
  • UIProcess/API/gtk/WebKitContextMenuActions.h:
  • UIProcess/API/gtk/WebKitContextMenuItem.cpp:
  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkitDownloadNotifyProgress):

  • UIProcess/API/gtk/WebKitEditorState.cpp:
  • UIProcess/API/gtk/WebKitEditorState.h:
  • UIProcess/API/gtk/WebKitError.h:
  • UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
  • UIProcess/API/gtk/WebKitFindController.cpp:
  • UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:
  • UIProcess/API/gtk/WebKitHitTestResult.cpp:
  • UIProcess/API/gtk/WebKitPolicyDecision.cpp:
  • UIProcess/API/gtk/WebKitPrintOperation.h:
  • UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
  • UIProcess/API/gtk/WebKitSecurityManager.cpp:
  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_class_init):

  • UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:

(webkitUserMediaPermissionRequestAllow):

  • UIProcess/API/gtk/WebKitWebContext.cpp:
  • UIProcess/API/gtk/WebKitWebInspector.cpp:

(webkit_web_inspector_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_class_init):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkit_web_page_class_init):

9:18 PM Changeset in webkit [213702] by Ryan Haddad
  • 3 edits
    2 deletes in trunk/Source/JavaScriptCore

Unreviewed, rolling out r213695.

This change broke the Windows build.

Reverted changeset:

"Implement a StackTrace utility object that can capture stack
traces for debugging."
https://bugs.webkit.org/show_bug.cgi?id=169454
http://trac.webkit.org/changeset/213695

9:08 PM Changeset in webkit [213701] by Ryan Haddad
  • 15 edits
    3 deletes in trunk

Unreviewed, rolling out r213633.

This change caused LayoutTest imported/w3c/web-platform-
tests/html/semantics/embedded-content/the-img-
element/sizes/parse-a-sizes-attribute.html to become a flaky
failure.

Reverted changeset:

"Loading in-body stylesheets should not block rendering of
elements before them"
https://bugs.webkit.org/show_bug.cgi?id=169345
http://trac.webkit.org/changeset/213633

8:55 PM Changeset in webkit [213700] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
7:43 PM Changeset in webkit [213699] by achristensen@apple.com
  • 4 edits in trunk/Source

Fix CMake build

  • PlatformMac.cmake:
6:37 PM Changeset in webkit [213698] by achristensen@apple.com
  • 5 edits in trunk/Source

Fix GTK build after r213696

Source/WebCore:

  • PlatformMac.cmake:

Source/WebKit2:

  • CMakeLists.txt:
  • PlatformMac.cmake:
6:00 PM Changeset in webkit [213697] by commit-queue@webkit.org
  • 29 edits
    1 add in trunk

[ESnext] Implement Object Rest - Implementing Object Rest Destructuring
https://bugs.webkit.org/show_bug.cgi?id=167962

Patch by Caio Lima <Caio Lima> on 2017-03-09
Reviewed by Keith Miller.

JSTests:

  • stress/object-rest-deconstruct.js: Added.

(let.assert):
(let.assertPropDescriptor):
(catch):
(get 3):
(foo):
(let.src.get y):
(let.src.set y):
(let.gen):

Source/JavaScriptCore:

Object Rest/Spread Destructing proposal is in stage 3[1] and this
Patch is a prototype implementation of it. A simple change over the
parser was necessary to support the new '...' token on Object Pattern
destruction rule. In the bytecode generator side, We changed the
bytecode generated on ObjectPatternNode::bindValue to store in an
array identifiers of already destructed properties, following spec draft
section[2], and then pass it as excludedNames to CopyDataProperties.
The rest destruction the calls copyDataProperties to perform the
copy of rest properties in rhs.

We also implemented CopyDataProperties as private JS global operation
on builtins/GlobalOperations.js following it's specification on [3].
It is implemented using Set object to verify if a property is on
excludedNames to keep this algorithm with O(n + m) complexity, where n

number of source's own properties and m = excludedNames.length.

As a requirement to use JSSets as constants, a change in
CodeBlock::create API was necessary, because JSSet creation can throws OOM
exception. Now, CodeBlock::finishCreation returns false if an
execption is throwed by
CodeBlock::setConstantIdentifierSetRegisters and then we return
nullptr to ScriptExecutable::newCodeBlockFor. It is responsible to
check if CodeBlock was constructed properly and then, throw OOM
exception to the correct scope.

[1] - https://github.com/sebmarkbage/ecmascript-rest-spread
[2] - http://sebmarkbage.github.io/ecmascript-rest-spread/#Rest-RuntimeSemantics-PropertyDestructuringAssignmentEvaluation
[3] - http://sebmarkbage.github.io/ecmascript-rest-spread/#AbstractOperations-CopyDataProperties

  • builtins/BuiltinNames.h:
  • builtins/GlobalOperations.js:

(globalPrivate.copyDataProperties):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantIdentifierSetRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/EvalCodeBlock.h:

(JSC::EvalCodeBlock::create):

  • bytecode/FunctionCodeBlock.h:

(JSC::FunctionCodeBlock::create):

  • bytecode/ModuleProgramCodeBlock.h:

(JSC::ModuleProgramCodeBlock::create):

  • bytecode/ProgramCodeBlock.h:

(JSC::ProgramCodeBlock::create):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::addSetConstant):
(JSC::UnlinkedCodeBlock::constantIdentifierSets):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitLoad):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ObjectPatternNode::bindValue):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::appendObjectPatternRestEntry):
(JSC::ASTBuilder::setContainsObjectRestElement):

  • parser/Nodes.h:

(JSC::ObjectPatternNode::appendEntry):
(JSC::ObjectPatternNode::setContainsRestElement):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseProperty):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::operatorStackPop):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::privateToObject):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

Source/WTF:

  • wtf/HashSet.h:

(WTF::=):

LayoutTests:

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
5:48 PM Changeset in webkit [213696] by achristensen@apple.com
  • 32 edits
    8 copies
    4 moves
    1 add in trunk

Expose public APIs for content filters
https://bugs.webkit.org/show_bug.cgi?id=150479

Reviewed by Brady Eidson and Geoff Garen.

Source/WebCore:

  • English.lproj/Localizable.strings:

Source/WebKit2:

This takes _WKUserContentExtensionStore and _WKUserContentFilter and turns them into the consistently-named public API
WKContentExtensionStore and WKContentExtension respectively with the same design and functionaly of the original SPI.
We also added public functions to WKUserContentController corresponding to existing private functions.

The old SPI ObjC classes are now just wrappers around the new ObjC classes, which are wrappers around C++ objects in the API namespace.

The peak-memory-reducing optimization of having NS_RELEASES_ARGUMENT in _compileContentExtensionForIdentifier is kept for Safari,
but the public API doesn't need such an optimization. The public compileContentExtensionForIdentifier will not deallocate the input
NSString during compiling.

We moved the error codes into the WKErrorDomain, which requires changing the values of the error codes and domain, but source
compiled that uses the SPI before and after should still work. Using new applications with old frameworks or vice versa will
have unexpected error codes, though.

  • Shared/API/APIObject.h:
  • Shared/API/c/WKDeprecatedFunctions.cpp:

(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • UIProcess/API/APIContentExtension.cpp: Copied from UIProcess/API/APIUserContentExtension.cpp.

(API::ContentExtension::ContentExtension):
(API::ContentExtension::~ContentExtension):
(API::UserContentExtension::UserContentExtension): Deleted.
(API::UserContentExtension::~UserContentExtension): Deleted.

  • UIProcess/API/APIContentExtension.h: Copied from UIProcess/API/APIUserContentExtension.h.
  • UIProcess/API/APIContentExtensionStore.cpp: Copied from UIProcess/API/APIUserContentExtensionStore.cpp.

(API::ContentExtensionStore::defaultStore):
(API::ContentExtensionStore::storeWithPath):
(API::ContentExtensionStore::ContentExtensionStore):
(API::ContentExtensionStore::~ContentExtensionStore):
(API::compiledToFile):
(API::createExtension):
(API::ContentExtensionStore::lookupContentExtension):
(API::ContentExtensionStore::compileContentExtension):
(API::ContentExtensionStore::removeContentExtension):
(API::ContentExtensionStore::synchronousRemoveAllContentExtensions):
(API::ContentExtensionStore::invalidateContentExtensionVersion):
(API::contentExtensionStoreErrorCategory):
(API::UserContentExtensionStore::defaultStore): Deleted.
(API::UserContentExtensionStore::storeWithPath): Deleted.
(API::UserContentExtensionStore::UserContentExtensionStore): Deleted.
(API::UserContentExtensionStore::~UserContentExtensionStore): Deleted.
(API::UserContentExtensionStore::lookupContentExtension): Deleted.
(API::UserContentExtensionStore::compileContentExtension): Deleted.
(API::UserContentExtensionStore::removeContentExtension): Deleted.
(API::UserContentExtensionStore::synchronousRemoveAllContentExtensions): Deleted.
(API::UserContentExtensionStore::invalidateContentExtensionVersion): Deleted.
(API::userContentExtensionStoreErrorCategory): Deleted.

  • UIProcess/API/APIContentExtensionStore.h: Copied from UIProcess/API/APIUserContentExtensionStore.h.

(API::make_error_code):

  • UIProcess/API/APIUserContentExtension.cpp: Removed.
  • UIProcess/API/APIUserContentExtension.h: Removed.
  • UIProcess/API/APIUserContentExtensionStore.cpp: Removed.
  • UIProcess/API/APIUserContentExtensionStore.h: Removed.
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKPageGroup.cpp:
  • UIProcess/API/C/WKUserContentControllerRef.cpp:

(WKUserContentControllerAddUserContentFilter):
(WKUserContentControllerRemoveAllUserContentFilters):

  • UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:

(WKUserContentExtensionStoreGetTypeID):

  • UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm:

(API::ContentExtensionStore::defaultStorePath):
(API::UserContentExtensionStore::defaultStorePath): Deleted.

  • UIProcess/API/Cocoa/WKContentExtension.h: Copied from UIProcess/API/Cocoa/_WKUserContentFilter.h.
  • UIProcess/API/Cocoa/WKContentExtension.mm: Copied from UIProcess/API/Cocoa/_WKUserContentFilter.mm.

(-[WKContentExtension dealloc]):
(-[WKContentExtension _apiObject]):
(-[_WKUserContentFilter dealloc]): Deleted.
(-[_WKUserContentFilter _apiObject]): Deleted.

  • UIProcess/API/Cocoa/WKContentExtensionInternal.h: Copied from UIProcess/API/Cocoa/_WKUserContentFilterInternal.h.

(WebKit::wrapper):

  • UIProcess/API/Cocoa/WKContentExtensionStore.h: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStore.h.
  • UIProcess/API/Cocoa/WKContentExtensionStore.mm: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm.

(-[WKContentExtensionStore dealloc]):
(+[WKContentExtensionStore defaultStore]):
(+[WKContentExtensionStore storeWithURL:]):
(-[WKContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:releasesArgument:]):
(-[WKContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[WKContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[WKContentExtensionStore _apiObject]):
(-[WKContentExtensionStore _removeAllContentExtensions]):
(-[WKContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
(-[WKContentExtensionStore _compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore dealloc]): Deleted.
(+[_WKUserContentExtensionStore defaultStore]): Deleted.
(+[_WKUserContentExtensionStore storeWithURL:]): Deleted.
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]): Deleted.
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]): Deleted.
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]): Deleted.
(-[_WKUserContentExtensionStore _apiObject]): Deleted.
(-[_WKUserContentExtensionStore _removeAllContentExtensions]): Deleted.
(-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]): Deleted.

  • UIProcess/API/Cocoa/WKContentExtensionStoreInternal.h: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h.

(WebKit::wrapper):

  • UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h: Copied from UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h.
  • UIProcess/API/Cocoa/WKError.h:
  • UIProcess/API/Cocoa/WKError.mm:

(localizedDescriptionForErrorCode):

  • UIProcess/API/Cocoa/WKUserContentController.h:
  • UIProcess/API/Cocoa/WKUserContentController.mm:

(-[WKUserContentController addContentExtension:]):
(-[WKUserContentController removeContentExtension:]):
(-[WKUserContentController removeAllContentExtensions]):
(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):

  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:

(+[_WKUserContentExtensionStore defaultStore]):
(+[_WKUserContentExtensionStore storeWithURL:]):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore _apiObject]):
(-[_WKUserContentExtensionStore _removeAllContentExtensions]):
(-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
(-[_WKUserContentExtensionStore _initWithWKContentExtensionStore:]):
(-[_WKUserContentExtensionStore dealloc]): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:

(WebKit::wrapper): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
  • UIProcess/API/Cocoa/_WKUserContentFilter.mm:

(-[_WKUserContentFilter _apiObject]):
(-[_WKUserContentFilter _initWithWKContentExtension:]):
(-[_WKUserContentFilter dealloc]): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:

(WebKit::wrapper): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h: Added.
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addContentExtension):
(WebKit::WebUserContentControllerProxy::removeContentExtension):
(WebKit::WebUserContentControllerProxy::removeAllContentExtensions):
(WebKit::WebUserContentControllerProxy::addUserContentExtension): Deleted.
(WebKit::WebUserContentControllerProxy::removeUserContentExtension): Deleted.
(WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions): Deleted.

  • UIProcess/UserContent/WebUserContentControllerProxy.h:
  • UIProcess/WebPageGroup.cpp:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addContentExtensions):
(WebKit::WebUserContentController::removeContentExtension):
(WebKit::WebUserContentController::removeAllContentExtensions):
(WebKit::WebUserContentController::addUserContentExtensions): Deleted.
(WebKit::WebUserContentController::removeUserContentExtension): Deleted.
(WebKit::WebUserContentController::removeAllUserContentExtensions): Deleted.

  • WebProcess/UserContent/WebUserContentController.h:
  • WebProcess/UserContent/WebUserContentController.messages.in:
  • WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:

(WebKit::blockedByContentFilterError):

Tools:

Keep the existing tests to verify that I made the wrapper classes for the old SPI work correctly.
Add new identical tests for the new API are added with the new names.
We should keep both until we migrate from and remove the old SPI.
Enum error code values and strings have changed, but the API is source compatible.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm.

(WKUserContentExtensionStoreTest::SetUp):
(TEST_F):
(checkDomain):
(_WKUserContentExtensionStoreTest::SetUp): Deleted.

  • TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:

(checkDomain):

5:27 PM Changeset in webkit [213695] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk/Source/JavaScriptCore

Implement a StackTrace utility object that can capture stack traces for debugging.
https://bugs.webkit.org/show_bug.cgi?id=169454

Reviewed by Michael Saboff.

The underlying implementation is hoisted right out of Assertions.cpp from the
implementations of WTFPrintBacktrace().

The reason we need this StackTrace object is because during heap debugging, we
sometimes want to capture the stack trace that allocated the objects of interest.
Dumping the stack trace directly to stdout (using WTFReportBacktrace()) may
perturb the execution profile sufficiently that an issue may not reproduce,
while alternatively, just capturing the stack trace and deferring printing it
till we actually need it later perturbs the execution profile less.

In addition, just capturing the stack traces (instead of printing them
immediately at each capture site) allows us to avoid polluting stdout with tons
of stack traces that may be irrelevant.

For now, we only capture the native stack trace. We'll leave capturing and
integrating the JS stack trace as an exercise for the future if we need it then.

Here's an example of how to use this StackTrace utility:

Capture a stack trace of the top 10 frames.
std::unique_ptr<StackTrace> trace(StackTrace::captureStackTrace(10));
Print the trace.
dataLog(*trace);

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • tools/StackTrace.cpp: Added.

(JSC::StackTrace::instanceSize):
(JSC::StackTrace::captureStackTrace):
(JSC::StackTrace::dump):

  • tools/StackTrace.h: Added.

(JSC::StackTrace::StackTrace):
(JSC::StackTrace::size):

5:08 PM Changeset in webkit [213694] by dbates@webkit.org
  • 3 edits in trunk/Tools

Attempt to fix the WebKit2 test bots following <https://trac.webkit.org/changeset/213676>
(https://bugs.webkit.org/show_bug.cgi?id=169364)

Create new WebView with Credential Management enabled when the enableCredentialManagement
WebKitTestRunner option is specified.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::viewSupportsOptions):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::viewSupportsOptions):

4:59 PM Changeset in webkit [213693] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix some debug builds after r213686

Unreviewed.

  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:

(WebKit::WebURLSchemeHandlerCocoa::WebURLSchemeHandlerCocoa): Remove the 32-bit NOT_REACHED protection for now.

4:57 PM Changeset in webkit [213692] by keith_miller@apple.com
  • 4 edits in trunk/Source

WebAssembly: Enable fast memory for WK2
https://bugs.webkit.org/show_bug.cgi?id=169437

Reviewed by Tim Horton.

Source/JavaScriptCore:

Source/WebKit2:

I forgot to do this when I enabled implemented fast memory
for wasm.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

4:53 PM Changeset in webkit [213691] by Matt Baker
  • 15 edits
    1 copy
    1 move
    5 adds in trunk

Web Inspector: Add XHR breakpoints UI
https://bugs.webkit.org/show_bug.cgi?id=168763
<rdar://problem/30952439>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/DOMDebugger.json:

Added clarifying comments to command descriptions.

Source/WebCore:

Test: inspector/dom-debugger/xhr-breakpoints.html

  • inspector/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::discardBindings):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
Don't break for XHRs when breakpoints are disabled.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New UI strings.

  • UserInterface/Controllers/DOMDebuggerManager.js:

Plumbing for XHR breakpoints. Like DOM breakpoints, they are tracked
per-page. Unlike DOM breakpoints, they have no separate "resolved"
state, and are simply added/removed as the main frame changes.

(WebInspector.DOMDebuggerManager):
(WebInspector.DOMDebuggerManager.prototype.get allRequestsBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.get xhrBreakpoints):
(WebInspector.DOMDebuggerManager.prototype.isBreakpointRemovable):
(WebInspector.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.addXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.removeXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._detachXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated):
(WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._resolveXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._saveXHRBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._domBreakpointDisabledStateDidChange):
(WebInspector.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange):
(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):
(WebInspector.DOMDebuggerManager.prototype._saveBreakpoints): Deleted.
Renamed saveDOMBreakpoints.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype._pauseReasonFromPayload):
Plumbing for XHR breakpoint pause reason.

  • UserInterface/Controllers/XHRBreakpointTreeController.js: Added.

Creates the "All Requests" breakpoint, handles DOMDebuggerManager messages,
and updates an associated tree outline as XHR breakpoints are added and removed.

(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype.revealAndSelect):
(WebInspector.XHRBreakpointTreeController.prototype.disconnect):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointRemoved):
(WebInspector.XHRBreakpointTreeController.prototype._mainResourceDidChange):
(WebInspector.XHRBreakpointTreeController.prototype._reset):

  • UserInterface/Main.html:

New files.

  • UserInterface/Models/XHRBreakpoint.js: Added.

New model class. XHR breakpoints have an associated URL, which is matched
against the request URL when deciding whether to break. An empty URL matches
all XMLHttpRequests.

(WebInspector.XHRBreakpoint):
(WebInspector.XHRBreakpoint.prototype.get documentURL):
(WebInspector.XHRBreakpoint.prototype.get url):
(WebInspector.XHRBreakpoint.prototype.get disabled):
(WebInspector.XHRBreakpoint.prototype.set disabled):
(WebInspector.XHRBreakpoint.prototype.get serializableInfo):
(WebInspector.XHRBreakpoint.prototype.saveIdentityToCookie):

  • UserInterface/Test.html:

New files.

  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
Plumbing for new represented object type, to prevent runtime assertion.

  • UserInterface/Views/DOMBreakpointTreeElement.js:

(WebInspector.DOMBreakpointTreeElement):
Reuse BreakpointTreeElement styles.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WebInspector.DebuggerSidebarPanel.prototype._addXHRBreakpointButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype.willDismissPopover):

  • UserInterface/Views/InputPopover.css: Added.

(.popover .input-popover-content):
(.popover .input-popover-content > .editor):
(.popover .input-popover-content > .editor > .CodeMirror):
(.popover .input-popover-content > .editor > .CodeMirror-scroll):

  • UserInterface/Views/InputPopover.js: Added.

New general purpose popover class. Style and structure lifted from
the Popover implementation used by the Probe Expressions UI. A follow-up
has been filed to switch that UI over to this new class:
https://bugs.webkit.org/show_bug.cgi?id=169428.

(WebInspector.InputPopover):
(WebInspector.InputPopover.prototype.get value):
(WebInspector.InputPopover.prototype.get result):
(WebInspector.InputPopover.prototype.show):
(WebInspector.InputPopover.prototype._presentOverTargetElement):

  • UserInterface/Views/XHRBreakpointTreeElement.js: Added.

Tree element class for XHR breakpoints. Behaves identically to
script and DOM breakpoint tree elements.

(WebInspector.XHRBreakpointTreeElement):
Reuse BreakpointTreeElement styles.
(WebInspector.XHRBreakpointTreeElement.prototype.onattach):
(WebInspector.XHRBreakpointTreeElement.prototype.ondetach):
(WebInspector.XHRBreakpointTreeElement.prototype.ondelete):
(WebInspector.XHRBreakpointTreeElement.prototype.onenter):
(WebInspector.XHRBreakpointTreeElement.prototype.onspace):
(WebInspector.XHRBreakpointTreeElement.prototype.populateContextMenu):
(WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementClicked):
(WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementFocused):
(WebInspector.XHRBreakpointTreeElement.prototype._statusImageElementMouseDown):
(WebInspector.XHRBreakpointTreeElement.prototype._toggleBreakpoint):
(WebInspector.XHRBreakpointTreeElement.prototype._updateStatus):

LayoutTests:

Tests for pausing on XMLHttpRequests using XHR breakpoints.

  • inspector/dom-debugger/xhr-breakpoints-expected.txt: Added.
  • inspector/dom-debugger/xhr-breakpoints.html: Added.
4:53 PM Changeset in webkit [213690] by msaboff@apple.com
  • 20 edits
    1 add in trunk/Source

Source/JavaScriptCore:
Add plumbing to WebProcess to enable JavaScriptCore configuration and logging
https://bugs.webkit.org/show_bug.cgi?id=169387

Reviewed by Filip Pizlo.

Added a helper function, processConfigFile(), to process configuration file.
Changed jsc.cpp to use that function in lieu of processing the config file
manually.

  • JavaScriptCore.xcodeproj/project.pbxproj: Made ConfigFile.h a private header file.
  • jsc.cpp:

(jscmain):

  • runtime/ConfigFile.cpp:

(JSC::processConfigFile):

  • runtime/ConfigFile.h:

Source/WebCore:
Add plumbing to WebProcess to enable JavaScriptCore configuration and logging
https://bugs.webkit.org/show_bug.cgi?id=169387

Reviewed by Filip Pizlo.

Added a forwarding header file for JavScriptCore/runtime/ConfigFile.h.

  • ForwardingHeaders/runtime/ConfigFile.h: Added.

Source/WebKit2:
<<<<<<< .mine

4:52 PM Changeset in webkit [213689] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after committing an inline attribute editor in DOMTreeOutline
https://bugs.webkit.org/show_bug.cgi?id=168119
<rdar://problem/30466013>

Reviewed by Brian Burg.

Fix a regression caused by http://trac.webkit.org/changeset/196271, which
updated WebInspector.isEventTargetAnEditableField to detect the editing
scenarios used by DOMTreeElement and DataGrid. This subtly changed the
behavior of WebInspector._focusChanged, which expected all editable fields
to be backed by a CodeMirror instance.

  • UserInterface/Base/Main.js:
4:46 PM Changeset in webkit [213688] by wilander@apple.com
  • 22 edits
    2 adds in trunk

Resource Load Statistics: Remove statistics data as part of full website data removal
https://bugs.webkit.org/show_bug.cgi?id=169448

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):

The version of this function that takes a modifiedSince parameter
checks if it is equal to or less than the start of the Unix epoch.
If so, it clears the store. This is to support clear all website
data.

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
(WebCore::ResourceLoadStatisticsStore::setWritePersistentStoreCallback):

  • loader/ResourceLoadStatisticsStore.h:

Added m_writePersistentStoreHandler, a setter for it, and
ResourceLoadStatisticsStore::clearInMemoryAndPersistent().

Source/WebKit2:

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStore):

Infrastructure for test.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):

Infrastructure for test.

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):

Change due to the break-out of
WebResourceLoadStatisticsStore::writeStoreToDisk().

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

Now sets m_writePersistentStoreHandler in
WebCore::ResourceLoadStatisticsStore.

(WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk):

Separated out this function to make it available for the function set as
m_writePersistentStoreHandler in WebCore::ResourceLoadStatisticsStore.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

Both WebsiteDataStore::removeData() functions now cover resource load
statistics.

Tools:

This patch adds infrastructure for the new TestRunner function
statisticsClearInMemoryAndPersistentStore().

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::statisticsClearInMemoryAndPersistentStore):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store.html: Added.
  • platform/wk2/TestExpectations:

Marked as [ Pass ] for WebKit2.

4:44 PM Changeset in webkit [213687] by mrajca@apple.com
  • 3 edits in trunk/Source/WebCore

Only consider autoplay interference in the first 10 seconds of playback.
https://bugs.webkit.org/show_bug.cgi?id=169455

Reviewed by Alex Christensen.

If the media duration is relatively long, say, 10 minutes, and you pause 5 minutes in, that's
probably not a strong indication users may not want auto-play. This patch limits interference
events to the first 10 seconds of automatic playback.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::userDidInterfereWithAutoplay):
(WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture):
(WebCore::HTMLMediaElement::pageMutedStateDidChange):

  • html/HTMLMediaElement.h:
4:38 PM Changeset in webkit [213686] by beidson@apple.com
  • 23 edits
    8 copies
    8 adds in trunk/Source

Add WKURLSchemeHandler API for handling custom protocols.
https://bugs.webkit.org/show_bug.cgi?id=169422

Reviewed by Tim Horton.

Source/WebCore:

  • platform/URLParser.cpp:

(WebCore::URLParser::maybeCanonicalizeScheme):
(WebCore::URLParser::isSpecialScheme):

  • platform/URLParser.h:

Source/WebKit2:

This introduces two new protocols to the WK2 API surface:

  • WKURLSchemeHandler
  • WKURLSchemeHandlerTask

By registering an object that conforms to the WKURLSchemeHandler protocol with a WKWebViewConfiguration an application will
be handed an object conforming to WKURLSchemeHandlerTask for each resource load in that WKWebView with a custom URL scheme.

Using that id <WKURLSchemeHandlerTask>, the application can communicate the data for the resource back to WebKit.

  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIURLSchemeHandlerTask.cpp:

(API::URLSchemeHandlerTask::create):
(API::URLSchemeHandlerTask::URLSchemeHandlerTask):

  • UIProcess/API/APIURLSchemeHandlerTask.h:

Add the WKURLSchemeHandler @protocol:

  • UIProcess/API/Cocoa/WKURLSchemeHandler.h: Added.

Add the WKURLSchemeHandlerTask @protocol, as well as WebKit's concrete implementation of it:

  • UIProcess/API/Cocoa/WKURLSchemeHandlerTask.h: Added.
  • UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm: Added.

(raiseExceptionIfNecessary):
(-[WKURLSchemeHandlerTaskImpl request]):
(-[WKURLSchemeHandlerTaskImpl didReceiveResponse:]):
(-[WKURLSchemeHandlerTaskImpl didReceiveData:]):
(-[WKURLSchemeHandlerTaskImpl didFinish]):
(-[WKURLSchemeHandlerTaskImpl didFailWithError:]):
(-[WKURLSchemeHandlerTaskImpl _apiObject]):

  • UIProcess/API/Cocoa/WKURLSchemeHandlerTaskInternal.h:

(WebKit::wrapper):

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView urlSchemeHandlerForURLScheme:]):
(+[WKWebView handlesURLScheme:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):
(-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):
(-[WKWebViewConfiguration _urlSchemeHandlers]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:

(WebKit::WebURLSchemeHandlerCocoa::apiHandler):

  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: Added.

(WebKit::WebURLSchemeHandlerCocoa::create):
(WebKit::WebURLSchemeHandlerCocoa::WebURLSchemeHandlerCocoa):
(WebKit::WebURLSchemeHandlerCocoa::platformStartTask):
(WebKit::WebURLSchemeHandlerCocoa::platformStopTask):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setURLSchemeHandlerForScheme):
(WebKit::WebPageProxy::urlSchemeHandlerForScheme):
(WebKit::WebPageProxy::startURLSchemeHandlerTask):
(WebKit::WebPageProxy::stopURLSchemeHandlerTask):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebURLSchemeHandler.cpp:

(WebKit::generateWebURLSchemeHandlerIdentifier):
(WebKit::WebURLSchemeHandler::WebURLSchemeHandler):
(WebKit::WebURLSchemeHandler::~WebURLSchemeHandler):
(WebKit::WebURLSchemeHandler::startTask):
(WebKit::WebURLSchemeHandler::stopTask):

  • UIProcess/WebURLSchemeHandler.h:

(WebKit::WebURLSchemeHandler::identifier):

  • UIProcess/WebURLSchemeHandlerTask.cpp: Added.

(WebKit::WebURLSchemeHandlerTask::create):
(WebKit::WebURLSchemeHandlerTask::WebURLSchemeHandlerTask):
(WebKit::WebURLSchemeHandlerTask::didReceiveResponse):
(WebKit::WebURLSchemeHandlerTask::didReceiveData):
(WebKit::WebURLSchemeHandlerTask::didComplete):
(WebKit::WebURLSchemeHandlerTask::pageDestroyed):
(WebKit::WebURLSchemeHandlerTask::stop):

  • UIProcess/WebURLSchemeHandlerTask.h: Added.

(WebKit::WebURLSchemeHandlerTask::identifier):
(WebKit::WebURLSchemeHandlerTask::request):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::urlSchemeHandlerForScheme):
(WebKit::WebPage::registerURLSchemeHandler):
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveResponse):
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveData):
(WebKit::WebPage::urlSchemeHandlerTaskDidComplete):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp: Added.

(WebKit::WebURLSchemeHandlerProxy::WebURLSchemeHandlerProxy):
(WebKit::WebURLSchemeHandlerProxy::~WebURLSchemeHandlerProxy):
(WebKit::WebURLSchemeHandlerProxy::startNewTask):
(WebKit::WebURLSchemeHandlerProxy::taskDidReceiveResponse):
(WebKit::WebURLSchemeHandlerProxy::taskDidReceiveData):
(WebKit::WebURLSchemeHandlerProxy::taskDidComplete):

  • WebProcess/WebPage/WebURLSchemeHandlerProxy.h:

(WebKit::WebURLSchemeHandlerProxy::identifier):
(WebKit::WebURLSchemeHandlerProxy::page):

  • WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.cpp: Added.

(WebKit::WebURLSchemeHandlerTaskProxy::WebURLSchemeHandlerTaskProxy):
(WebKit::WebURLSchemeHandlerTaskProxy::startLoading):
(WebKit::WebURLSchemeHandlerTaskProxy::stopLoading):
(WebKit::WebURLSchemeHandlerTaskProxy::didReceiveResponse):
(WebKit::WebURLSchemeHandlerTaskProxy::didReceiveData):
(WebKit::WebURLSchemeHandlerTaskProxy::didComplete):

  • WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h:

(WebKit::WebURLSchemeHandlerTaskProxy::request):

  • WebKit2.xcodeproj/project.pbxproj:
  • CMakeLists.txt:
4:16 PM Changeset in webkit [213685] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebKit2

Unreviewed follow-up to r213682.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Forward declare SPIs to address possible build errors.

4:00 PM Changeset in webkit [213684] by dino@apple.com
  • 10 edits
    4 copies in trunk

WebGPU: Backend - Buffers
https://bugs.webkit.org/show_bug.cgi?id=169451
<rdar://problem/30959168>

Reviewed by Tim Horton.

Source/WebCore:

Implement the backend for GPUBuffer, which
represents a chunk of memory that can be used
by the GPU. You create one using an ArrayBufferView.

WebKit API Test: GPUBuffer.mm

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cocoa/GPUBufferMetal.mm:

(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::length):
(WebCore::GPUBuffer::contents):
(WebCore::GPUBuffer::platformBuffer):

  • platform/graphics/gpu/GPUBuffer.cpp:

(WebCore::GPUBuffer::create):
(WebCore::GPUBuffer::~GPUBuffer):
(WebCore::GPUBuffer::length):
(WebCore::GPUBuffer::contents):

  • platform/graphics/gpu/GPUBuffer.h:
  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createBufferFromData):

  • platform/graphics/gpu/GPUDevice.h:

Tools:

Test for GPUBuffer object.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm: Added.

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm:
  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm:
3:58 PM Changeset in webkit [213683] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

WKWebView should provide a way for clients to know the specific media state.
https://bugs.webkit.org/show_bug.cgi?id=169140
<rdar://problem/30838285>

Patch by Andrew Gold <agold@apple.com> on 2017-03-09
Reviewed by Alex Christensen.

Instead of notifying the UIDelegate only when a capture begins and ends,
we now notify the UIDelegate of any change in capture state.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::mediaCaptureStateDidChange):
(API::UIClient::didBeginCaptureSession): Deleted.
(API::UIClient::didEndCaptureSession): Deleted.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange):
(WebKit::UIDelegate::UIClient::didBeginCaptureSession): Deleted.
(WebKit::UIDelegate::UIClient::didEndCaptureSession): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange):

3:44 PM Changeset in webkit [213682] by Joseph Pecoraro
  • 31 edits
    2 adds in trunk

Web Inspector: Show HTTP protocol version and other Network Load Metrics (IP Address, Priority, Connection ID)
https://bugs.webkit.org/show_bug.cgi?id=29687
<rdar://problem/19281586>

Reviewed by Matt Baker and Brian Burg.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Add metrics object with optional properties to loadingFinished event.

Source/WebCore:

Test: http/tests/inspector/network/resource-metrics.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::toProtocol):
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):
(WebCore::InspectorNetworkAgent::didFinishLoading):
Send metrics at didFinishLoading time, we do not have all of
these at didReceiveResponse time.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishLoading):

  • inspector/InspectorNetworkAgent.h:
  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::finishedLoading):

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::didFinishLoad):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):

  • loader/ResourceLoadNotifier.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didFinishLoading):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFinishLoading):
Include or pass on NetworkLoadMetrics to Web Inspector.

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):
Add new optional metrics properties.

(WTF::Persistence::Coder<std::optional<WebCore::NetworkLoadPriority>>::encode):
(WTF::Persistence::Coder<std::optional<WebCore::NetworkLoadPriority>>::decode):
We never encode this but this is needed for the compiler.

  • platform/spi/cocoa/NSURLConnectionSPI.h:

New SPI for NSURLSessionTaskTransactionMetrics details.

Source/WebInspectorUI:

These columns are available in the Network DataGrids, but are
initially hidden. They can be shown by right clicking on the
table header and showing these columns. We are going to rework
the default list of visible columns later.

  • Localizations/en.lproj/localizedStrings.js:

New localized strings for data grid headers and Low/Medium/High.

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):

  • UserInterface/Protocol/NetworkObserver.js:

(WebInspector.NetworkObserver.prototype.loadingFinished):
Pass metrics on to the Resource.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.displayNameForType):
(WebInspector.Resource.responseSourceFromPayload):
(WebInspector.Resource.networkPriorityFromPayload):
(WebInspector.Resource.connectionIdentifierFromPayload):
(WebInspector.Resource.prototype.get protocol):
(WebInspector.Resource.prototype.get priority):
(WebInspector.Resource.prototype.get remoteAddress):
(WebInspector.Resource.prototype.get connectionIdentifier):
(WebInspector.Resource.prototype.updateWithMetrics):
Include metrics accessors and default values.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):
Add metrics columns if the backend may be sending them.

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype._displayNameForPriority):
(WebInspector.ResourceTimelineDataGridNode.prototype._cachedCellContent):
Display strings for new columns.

  • UserInterface/Views/TimelineDataGridNode.js:
  • UserInterface/Views/TimelineRecordBar.js:

(WebInspector.TimelineRecordBar.prototype.refresh):
Avoid assertions if Graph column is unavailable.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.createSettings):
(WebInspector.DataGrid.prototype.setColumnVisible):
Better support for restoring user preference of initially
hidden columns which the user may have shown.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
Show the Protocol and Priority in the Resources sidebar.

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(toNetworkLoadPriority):
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

  • Shared/WebCoreArgumentCoders.h:

Additional optional metrics on NetworkLoadMetrics.

LayoutTests:

  • http/tests/inspector/network/resource-metrics-expected.txt: Added.
  • http/tests/inspector/network/resource-metrics.html: Added.
3:21 PM Changeset in webkit [213681] by Ryan Haddad
  • 1 edit
    2 adds in trunk/LayoutTests

Add iOS baseline for compositing/contents-format/subpixel-antialiased-text-traversal.

Unreviewed test gardening.

  • platform/ios-simulator/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: Added.
3:14 PM Changeset in webkit [213680] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Minimal build is broken
https://bugs.webkit.org/show_bug.cgi?id=169416

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-09
Reviewed by Chris Dumez.

Since we now have some JS built-ins that are not tied to a compilation flag, we can remove compilation guards around m_vm.
We could probably remove m_vm by ensuring m_jsDOMBindingInternals appear first but this might break very easily.

  • Scripts/builtins/builtins_generate_internals_wrapper_header.py:

(generate_members):

  • Scripts/builtins/builtins_generate_internals_wrapper_implementation.py:

(BuiltinsInternalsWrapperImplementationGenerator.generate_constructor):

  • Scripts/tests/builtins/expected/WebCoreJSBuiltins.h-result:
2:49 PM Changeset in webkit [213679] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Use the right conditional.

  • Modules/applepay/ApplePayError.idl:
2:47 PM Changeset in webkit [213678] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Activate VideoToolbox when WebRTC is enabled on iOS
https://bugs.webkit.org/show_bug.cgi?id=169423

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-09
Reviewed by Jon Lee.

  • wtf/Platform.h: Activate VIDEOTOOLBOX if WEBRTC is enabled.
2:47 PM Changeset in webkit [213677] by dbates@webkit.org
  • 1 edit in trunk/Source/JavaScriptCore/ChangeLog

Guard Credential Management implementation behind a runtime enabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=169364
<rdar://problem/30957425>

Reviewed by Brent Fulgham.

Add common identifiers for Credential, PasswordCredential, and SiteBoundCredential that are
needed to guard these interfaces behind a runtime enabled feature flag.

  • runtime/CommonIdentifiers.h:
2:40 PM Changeset in webkit [213676] by dbates@webkit.org
  • 30 edits in trunk

Guard Credential Management implementation behind a runtime enabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=169364
<rdar://problem/30957425>

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

Add common identifiers for Credential, PasswordCredential, and SiteBoundCredential that are
needed to guard these interfaces behind a runtime enabled feature flag.

  • runtime/CommonIdentifiers.h:

Source/WebCore:

Add a runtime enabled feature flag for Credential Management (disabled by default).
Once we are happy with this feature we can enable the feature by default or remove the
the runtime enabled feature flag so as to enable it by default.

  • Modules/credentials/BasicCredential.idl: Enable only if the runtime enabled feature flag is enabled.
  • Modules/credentials/PasswordCredential.idl: Ditto.
  • Modules/credentials/SiteBoundCredential.idl: Ditto.
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Added.
(WebCore::RuntimeEnabledFeatures::credentialManagementEnabled): Added.

Source/WebKit/mac:

Add WebKit preference for Credential Management (disabled by default).

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences credentialManagementEnabled]): Added.
(-[WebPreferences setCredentialManagementEnabled:]): Added.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add WebKit2 preference for Credential Management (disabled by default).

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetCredentialManagementEnabled): Added.
(WKPreferencesGetCredentialManagementEnabled): Added.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Add a new test option header, enableCredentialManagement, to DumpRenderTree/WebKitTestRunner
to enable Credential Management.

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

LayoutTests:

  • credentials/idlharness.html: Use comment header to enable Credential Management API.
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt: Update expected results now

that we no longer expose the Credential Management API by default.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: Ditto.
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: Ditto.
  • platform/mac/js/dom/global-constructors-attributes-expected.txt: Ditto.
  • platform/win/TestExpectations: For now, skip the Credential Management API tests.
2:39 PM Changeset in webkit [213675] by mark.lam@apple.com
  • 4 edits
    5 moves in trunk/Source/JavaScriptCore

Refactoring some HeapVerifier code.
https://bugs.webkit.org/show_bug.cgi?id=169443

Reviewed by Filip Pizlo.

Renamed LiveObjectData to CellProfile.
Renamed LiveObjectList to CellList.
Moved CellProfile.*, CellList.*, and HeapVerifier.* from the heap folder to the tools folder.
Updated the HeapVerifier to handle JSCells instead of just JSObjects.

This is in preparation for subsequent patches to fix up the HeapVerifier for service again.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/Heap.cpp:

(JSC::Heap::runBeginPhase):
(JSC::Heap::runEndPhase):

  • heap/HeapVerifier.cpp: Removed.
  • heap/HeapVerifier.h: Removed.
  • heap/LiveObjectData.h: Removed.
  • heap/LiveObjectList.cpp: Removed.
  • heap/LiveObjectList.h: Removed.
  • tools/CellList.cpp: Copied from Source/JavaScriptCore/heap/LiveObjectList.cpp.

(JSC::CellList::findCell):
(JSC::LiveObjectList::findObject): Deleted.

  • tools/CellList.h: Copied from Source/JavaScriptCore/heap/LiveObjectList.h.

(JSC::CellList::CellList):
(JSC::CellList::reset):
(JSC::LiveObjectList::LiveObjectList): Deleted.
(JSC::LiveObjectList::reset): Deleted.

  • tools/CellProfile.h: Copied from Source/JavaScriptCore/heap/LiveObjectData.h.

(JSC::CellProfile::CellProfile):
(JSC::LiveObjectData::LiveObjectData): Deleted.

  • tools/HeapVerifier.cpp: Copied from Source/JavaScriptCore/heap/HeapVerifier.cpp.

(JSC::GatherCellFunctor::GatherCellFunctor):
(JSC::GatherCellFunctor::visit):
(JSC::GatherCellFunctor::operator()):
(JSC::HeapVerifier::gatherLiveCells):
(JSC::HeapVerifier::cellListForGathering):
(JSC::trimDeadCellsFromList):
(JSC::HeapVerifier::trimDeadCells):
(JSC::HeapVerifier::verifyButterflyIsInStorageSpace):
(JSC::HeapVerifier::reportCell):
(JSC::HeapVerifier::checkIfRecorded):
(JSC::GatherLiveObjFunctor::GatherLiveObjFunctor): Deleted.
(JSC::GatherLiveObjFunctor::visit): Deleted.
(JSC::GatherLiveObjFunctor::operator()): Deleted.
(JSC::HeapVerifier::gatherLiveObjects): Deleted.
(JSC::HeapVerifier::liveObjectListForGathering): Deleted.
(JSC::trimDeadObjectsFromList): Deleted.
(JSC::HeapVerifier::trimDeadObjects): Deleted.
(JSC::HeapVerifier::reportObject): Deleted.

  • tools/HeapVerifier.h: Copied from Source/JavaScriptCore/heap/HeapVerifier.h.
2:37 PM Changeset in webkit [213674] by aestes@apple.com
  • 9 edits in trunk/Source/WebKit2

[iOS] Add SPI to print to a single tall PDF page
https://bugs.webkit.org/show_bug.cgi?id=169439
<rdar://problem/30120532>

Reviewed by Tim Horton.

  • Shared/PrintInfo.cpp:

(WebKit::PrintInfo::encode): Encoded snapshotFirstPage.
(WebKit::PrintInfo::decode): Decoded snapshotFirstPage.
(WebKit::PrintInfo::PrintInfo): Deleted.

  • Shared/PrintInfo.h: Initialized member variables in place instead of in a default ctor.
  • UIProcess/_WKWebViewPrintFormatter.h: Declared BOOL property snapshotFirstPage.
  • UIProcess/_WKWebViewPrintFormatter.mm:

(-[_WKWebViewPrintFormatter _setSnapshotPaperRect:]): Added to set a custom paper size.
(-[_WKWebViewPrintFormatter rectForPageAtIndex:]): Returned the custom paper rect if
snapshotFirstPage is true.

  • UIProcess/_WKWebViewPrintFormatterInternal.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _wk_pageCountForPrintFormatter:]): Computed the custom paper size to be the
smaller of the document height and the maximum PDF page height.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _wk_pageCountForPrintFormatter:]): Changed to return a maximum page size of 1
if snapshotFirstPage is true.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::computePagesForPrintingAndDrawToPDF): Ditto.

2:34 PM Changeset in webkit [213673] by andersca@apple.com
  • 17 edits
    11 adds in trunk

Add delegate support to WebCore
https://bugs.webkit.org/show_bug.cgi?id=169427
Part of rdar://problem/28880714.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

  • DerivedSources.make:

Add idl files.

  • Modules/applepay/ApplePayError.cpp:

(WebCore::ApplePayError::create):
(WebCore::ApplePayError::ApplePayError):
(WebCore::ApplePayError::~ApplePayError):

  • Modules/applepay/ApplePayError.h:
  • Modules/applepay/ApplePayError.idl:
  • Modules/applepay/ApplePayPaymentAuthorizationResult.h:
  • Modules/applepay/ApplePayPaymentAuthorizationResult.idl:
  • Modules/applepay/ApplePayPaymentMethodUpdate.h:
  • Modules/applepay/ApplePayPaymentMethodUpdate.idl:
  • Modules/applepay/ApplePayShippingContactUpdate.h:
  • Modules/applepay/ApplePayShippingContactUpdate.idl:
  • Modules/applepay/ApplePayShippingMethodUpdate.h:
  • Modules/applepay/ApplePayShippingMethodUpdate.idl:

Add new files.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::toPaymentAuthorizationStatus):
Move this function to the top.

(WebCore::convertAndValidate):
Add new convertAndValidate functions.

(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
(WebCore::ApplePaySession::completePayment):

  • Modules/applepay/ApplePaySession.h:
  • Modules/applepay/ApplePaySession.idl:

Implement the old functions in terms of the new functions.

  • Modules/applepay/PaymentCoordinator.cpp:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Add feature define.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2:29 PM Changeset in webkit [213672] by yoav@yoav.ws
  • 5 edits
    5 adds in trunk

[link preload] Double downloads of preloaded CSS
https://bugs.webkit.org/show_bug.cgi?id=169274

Reviewed by Antti Koivisto.

Source/WebCore:

Avoid reloading link preloads in case of a charset mismatch.

Charset mismatch can happen for header based preloads, as they are requested before
the HTML's <meta charset> tag is processed. This change makes sure that in those
cases, we modify the resource's encoding setting instead of reloading it.

Test: http/tests/preload/single_download_preload_headers.php

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource): Initialize m_unknownCharset to be the same as the preload flag.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::hasUnknownEncoding):
(WebCore::CachedResource::setHasUnknownEncoding):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy): In case of a charset
mismatch, set the encoding of the Resource instead of reloading it if the charset is unknown.

LayoutTests:

Added tests making sure that header based preloads also trigger a single download,
and that we properly handle multiple charsets for the same preloaded resource.

  • http/tests/preload/single_download_preload_headers-expected.txt: Added.
  • http/tests/preload/single_download_preload_headers.php: Added.
  • http/tests/preload/preload-encoding-expected.txt: Added.
  • http/tests/preload/preload-encoding.php: Added.
2:24 PM Changeset in webkit [213671] by jiewen_tan@apple.com
  • 21 edits
    6 copies
    23 adds in trunk

Implement PBKDF2 in WebCrypto
https://bugs.webkit.org/show_bug.cgi?id=143458
<rdar://problem/27311703>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:

Source/WebCore:

This patch implements PBKDF2 according to the spec:
https://www.w3.org/TR/WebCryptoAPI/#pbkdf2. Supported
operations include deriveKey, deriveBits, importKey and
getKeyLength.

Tests: crypto/subtle/ecdh-import-key-derive-pbkdf2-key.html

crypto/subtle/pbkdf2-derive-bits-malformed-parametrs.html
crypto/subtle/pbkdf2-import-key-derive-bits.html
crypto/subtle/pbkdf2-import-key-derive-hmac-key.html
crypto/subtle/pbkdf2-import-key-malformed-parameters.html
crypto/subtle/pbkdf2-import-key.html
crypto/workers/subtle/pbkdf2-import-key-derive-bits.html
crypto/workers/subtle/pbkdf2-import-key-derive-hmac-key.html
crypto/workers/subtle/pbkdf2-import-key.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCryptoKeyCustom.cpp:

(WebCore::JSCryptoKey::algorithm):
Added RawKeyAlgorithm.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
A bit of reordering.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::write):
Faked implementation.

  • crypto/CryptoAlgorithmParameters.h:
  • crypto/CryptoKey.h:
  • crypto/algorithms/CryptoAlgorithmPBKDF2.cpp: Added.

(WebCore::CryptoAlgorithmPBKDF2::create):
(WebCore::CryptoAlgorithmPBKDF2::identifier):
(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):
(WebCore::CryptoAlgorithmPBKDF2::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmPBKDF2.h: Added.
  • crypto/gnutls/CryptoAlgorithmPBKDF2GnuTLS.cpp: Added.

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/keys/CryptoKeyRaw.cpp: Added.

(WebCore::CryptoKeyRaw::CryptoKeyRaw):
(WebCore::CryptoKeyRaw::buildAlgorithm):
(WebCore::CryptoKeyRaw::exportData):

  • crypto/keys/CryptoKeyRaw.h: Added.

(WebCore::RawKeyAlgorithm::RawKeyAlgorithm):
The CryptoKey class for PBKDF2 and later on HKDF.

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp: Added.

(WebCore::commonCryptoHMACAlgorithm):
(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h: Added.
  • crypto/parameters/Pbkdf2Params.idl: Added.

LayoutTests:

Mark slow tests as slow.

  • crypto/subtle/derive-key-malformed-parameters.html:
  • crypto/subtle/ecdh-import-key-derive-pbkdf2-key-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-pbkdf2-key.html: Added.
  • crypto/subtle/pbkdf2-derive-bits-malformed-parametrs-expected.txt: Added.
  • crypto/subtle/pbkdf2-derive-bits-malformed-parametrs.html: Added.
  • crypto/subtle/pbkdf2-import-key-derive-bits-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-derive-bits.html: Added.
  • crypto/subtle/pbkdf2-import-key-derive-hmac-key-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-derive-hmac-key.html: Added.
  • crypto/subtle/pbkdf2-import-key-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/pbkdf2-import-key-malformed-parameters.html: Added.
  • crypto/subtle/pbkdf2-import-key.html: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-bits-expected.txt: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-bits.html: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-hmac-key-expected.txt: Added.
  • crypto/workers/subtle/pbkdf2-import-key-derive-hmac-key.html: Added.
  • crypto/workers/subtle/pbkdf2-import-key-expected.txt: Added.
  • crypto/workers/subtle/pbkdf2-import-key.html: Added.
  • crypto/workers/subtle/resources/pbkdf2-import-key-derive-bits.js: Added.
  • crypto/workers/subtle/resources/pbkdf2-import-key-derive-hmac-key.js: Added.
  • crypto/workers/subtle/resources/pbkdf2-import-key.js: Added.
2:17 PM Changeset in webkit [213670] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[Modern Media Controls] iOS: long press on play button shows the Copy menu
https://bugs.webkit.org/show_bug.cgi?id=169355
<rdar://problem/30928998>

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Dean Jackson.

Source/WebCore:

Disable built-in UI behavior that shows a magnifier or a copy callout when pressing
on an element for a long time. These do not make sense for media controls.

Test: media/modern-media-controls/audio/audio-controls-styles.html

  • Modules/modern-media-controls/controls/media-controls.css:

(:host):

LayoutTests:

Add a test to check that the expected properties are set as they should to disable
built-in UI behavior that shows a magnifier or a copy callout when pressing on an
element for a long time.

  • media/modern-media-controls/audio/audio-controls-styles-expected.txt: Added.
  • media/modern-media-controls/audio/audio-controls-styles.html: Added.
  • platform/mac/TestExpectations:
2:17 PM Changeset in webkit [213669] by achristensen@apple.com
  • 22 edits in trunk

[Content Extensions] Introduce if-top-url and unless-top-url
https://bugs.webkit.org/show_bug.cgi?id=169433

Reviewed by Brady Eidson.

Source/WebCore:

In r184116 I added if-domain and unless-domain to control whether a rule applies
based on the domain of the main document URL. I'm expanding this by adding if-top-url
and unless-top-url that run regular expressions on the entire main document URL so that
example.com/user1content can be distinguished from example.com/user2content.
To not add to the number of passes we make on the URLs for each load and to maintain JSON
backwards compatibility, I've made it so that if-top-url and unless-top-url can be used
instead of if-domain and unless-domain (which continue to work) but the two condition types
cannot be used together since running regular expressions on the entire main document URL
is strictly more powerful than checking the domain and subdomains.
As a minor detail, content extension regexes are by default ASCII-case-insensitive, so I've
done the same with top URL regexes, adding top-url-filter-is-case-sensitive to mirror the existing
url-filter-is-case-sensitive if the JSON author decides to make regexes case sensitive.

Covered by new API tests.

  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
(WebCore::ContentExtensions::ContentExtension::topURLActions):
(WebCore::ContentExtensions::ContentExtension::cachedConditionedActions): Deleted.

  • contentextensions/ContentExtension.h:
  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::addUniversalActionsToDFA):
(WebCore::ContentExtensions::compileToBytecode):
We had three copies of compiling to bytecode that were almost the same and would've been made into three copies of the same code.
I moved them to one helper function that is called three times.
(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionCompiler.h:
  • contentextensions/ContentExtensionError.cpp:

(WebCore::ContentExtensions::contentExtensionErrorCategory):
Add the new error type for JSON that tries to use if-top-url and unless-top-url with if-domain and unless-domain.

  • contentextensions/ContentExtensionError.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::loadTrigger):
Parse the new values if-top-url, unless-top-url, and top-url-filter-is-case-sensitive.

  • contentextensions/ContentExtensionRule.h:

(WebCore::ContentExtensions::Trigger::~Trigger):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):

  • contentextensions/DFABytecodeInterpreter.cpp:

(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithConditions):

  • contentextensions/DFABytecodeInterpreter.h:

Source/WebKit2:

Rename conditionedFilters to topURLFilters to reflect the fact that they are the filters
that are run on the top URL, and possibly just the domain of the top url.
I was a bit too aggressive when renaming domain* to condition* in r213533.

  • Shared/WebCompiledContentExtension.cpp:

(WebKit::WebCompiledContentExtension::conditionsApplyOnlyToDomain):
(WebKit::WebCompiledContentExtension::topURLFiltersBytecode):
(WebKit::WebCompiledContentExtension::topURLFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecode): Deleted.
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecodeLength): Deleted.

  • Shared/WebCompiledContentExtension.h:
  • Shared/WebCompiledContentExtensionData.cpp:

(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):

  • Shared/WebCompiledContentExtensionData.h:

(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):

  • UIProcess/API/APIUserContentExtensionStore.cpp:

(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
(API::UserContentExtensionStore::invalidateContentExtensionVersion):
(API::userContentExtensionStoreErrorCategory):

  • UIProcess/API/APIUserContentExtensionStore.h:

Increment CurrentContentExtensionFileVersion because we have changed the format of the binary on disk.
We only added 4 bytes, but that's binary incompatible and requires re-compiling any existing content extensions.

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::TEST_F):
Add tests for new functionality and new failure types.

2:07 PM Changeset in webkit [213668] by Jon Davis
  • 3 edits in trunk/Websites/webkit.org

Prevent HTML in rich link previews
https://bugs.webkit.org/show_bug.cgi?id=169435

Reviewed by Tim Horton.

  • wp-content/plugins/social-meta.php:
1:58 PM Changeset in webkit [213667] by jmarcell@apple.com
  • 4 edits in tags/Safari-604.1.9/Source

Roll out r213557. rdar://problem/30955791

1:56 PM Changeset in webkit [213666] by Nikita Vasilyev
  • 12 edits
    4 adds in trunk/Source

Web Inspector: Show individual messages in the content pane for a WebSocket
https://bugs.webkit.org/show_bug.cgi?id=169011

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Add walltime parameter and correct the description of Timestamp type.

  • inspector/protocol/Network.json:

Source/WebCore:

Add walltime parameter.

No new tests. Tests will be added in a follow up patch.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):

Source/WebInspectorUI:

When selecting a Web Socket in Network panel or Resources, display a table
of all messages that have been sent and received.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.webSocketWillSendHandshakeRequest):
Add a walltime parameter.

(WebInspector.FrameResourceManager.prototype._webSocketFrameReceivedOrSent):
Fix a bug: masked messages are outgoing, not incoming.

  • UserInterface/Images/ArrowUp.svg: Added.
  • UserInterface/Images/gtk/ArrowUp.svg: Added.

Add an icon for outgoing messages.

  • UserInterface/Main.html:
  • UserInterface/Models/WebSocketResource.js:

(WebInspector.WebSocketResource):
(WebInspector.WebSocketResource.prototype.get walltime):
(WebInspector.WebSocketResource.prototype.addFrame):
(WebInspector.WebSocketResource.prototype._walltimeForWebSocketTimestamp):

  • UserInterface/Protocol/NetworkObserver.js:

(WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest):
(WebInspector.NetworkObserver.prototype.webSocketFrameSent):
(WebInspector.NetworkObserver.prototype.webSocketFrameError):
(WebInspector.NetworkObserver):

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):

  • UserInterface/Views/ResourceClusterContentView.js:

(WebInspector.ResourceClusterContentView.prototype.get responseContentView):

  • UserInterface/Views/WebSocketContentView.css: Added.

(.web-socket.content-view > .data-grid):
(.web-socket.content-view > .data-grid table.data):
(.web-socket.content-view > .data-grid td.data-column,):
(body[dir=ltr] .web-socket.content-view > .data-grid .data-column > div):
(body[dir=rtl] .web-socket.content-view > .data-grid .data-column > div):
(.web-socket.content-view .icon):
(body[dir=ltr] .web-socket.content-view .icon):
(body[dir=rtl] .web-socket.content-view .icon):
(.web-socket.content-view .outgoing .icon):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr:nth-child(odd)):
(.web-socket.content-view .data-grid table.data tr.revealed):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr.outgoing):
(.web-socket.content-view .data-grid.variable-height-rows table.data tr.non-text-frame):

  • UserInterface/Views/WebSocketContentView.js: Added.

(WebInspector.WebSocketContentView):
Only show Time column when walltime is available.

(WebInspector.WebSocketContentView.textForOpcode):
(WebInspector.WebSocketContentView.prototype.shown):
(WebInspector.WebSocketContentView.prototype.hidden):
(WebInspector.WebSocketContentView.prototype.addFrame):
(WebInspector.WebSocketContentView.prototype._updateFrames):
Only render frames that haven't been rendered yet.

(WebInspector.WebSocketContentView.prototype._addRow):
(WebInspector.WebSocketContentView.prototype._timeStringFromTimestamp):

1:42 PM Changeset in webkit [213665] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][iOS] Extend WebProcess sandbox to support audio and video compression/decompression
https://bugs.webkit.org/show_bug.cgi?id=169431
<rdar://problem/30844650>

Reviewed by Youenn Fablet.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1:39 PM Changeset in webkit [213664] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix weak external symbol error.

  • heap/SlotVisitor.h:
1:28 PM Changeset in webkit [213663] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r213628.

Use 'size_t' for the function definition to match the header file. If you do not,
the 32-bit build fails..

  • crypto/gnutls/CryptoAlgorithmECDHGnuTLS.cpp:

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

1:24 PM Changeset in webkit [213662] by Wenson Hsieh
  • 4 edits in trunk/Source

[WK2] Add a UI delegate hook for custom handling of data interaction operations
https://bugs.webkit.org/show_bug.cgi?id=169430
<rdar://problem/30954654>

Reviewed by Tim Horton.

Source/WebCore:

Ensure that m_documentUnderMouse is properly cleaned up even in the case where no drag operation was performed
due to the drop bailing at the client layer.

  • page/DragController.cpp:

(WebCore::DragController::dragEnded):

Source/WebKit2:

Introduce a new SPI method on the UI delegate for clients who need to override data interaction operation behaviors.
Note that implementing this delegate method and returning YES will not propagate a drop event to the page.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1:23 PM Changeset in webkit [213661] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
1:19 PM Changeset in webkit [213660] by Megan Gardner
  • 2 edits in trunk/Source/WebKit/mac

Fix DataInteraction guards
https://bugs.webkit.org/show_bug.cgi?id=169404

Reviewed by Wenson Hsieh.

  • WebCoreSupport/WebDragClient.mm:
1:18 PM Changeset in webkit [213659] by fpizlo@apple.com
  • 7 edits in trunk/Source

Source/JavaScriptCore:
std::isnan/isinf should work with WTF time classes
https://bugs.webkit.org/show_bug.cgi?id=164991

Reviewed by Darin Adler.

Changes AtomicsObject to use std::isnan() instead of operator== to detect NaN.

  • runtime/AtomicsObject.cpp:

(JSC::atomicsFuncWait):

Source/WTF:
std::isnan/isinf/isfinite should work with WTF time classes
https://bugs.webkit.org/show_bug.cgi?id=164991

Reviewed by Darin Adler.

The consensus view (see comments in https://bugs.webkit.org/show_bug.cgi?id=152045) of how
to check if something is NaN is to use std::isnan(). To be able to do that for time
classes, they need to provide their own isnan() overhload. This also provides isinf()
overloads.

  • wtf/MonotonicTime.h:

(std::isnan):
(std::isinf):

  • wtf/Seconds.h:

(std::isnan):
(std::isinf):

  • wtf/TimeWithDynamicClockType.h:

(std::isnan):
(std::isinf):

  • wtf/WallTime.h:

(std::isnan):
(std::isinf):

1:13 PM Changeset in webkit [213658] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

JSC EWS repeat the log message thrice about patch not being relevant
https://bugs.webkit.org/show_bug.cgi?id=169330

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-09
Reviewed by Chris Dumez.

  • Scripts/webkitpy/tool/steps/checkpatchrelevance.py:

(CheckPatchRelevance.run): Change log level to 'debug' to reduce stdout traffic.

1:05 PM Changeset in webkit [213657] by mark.lam@apple.com
  • 16 edits in trunk/Source

Use const AbstractLocker& (instead of const LockHolder&) in more places.
https://bugs.webkit.org/show_bug.cgi?id=169424

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::promoteYoungCodeBlocks):

  • heap/CodeBlockSet.h:
  • heap/CodeBlockSetInlines.h:

(JSC::CodeBlockSet::mark):

  • heap/ConservativeRoots.cpp:

(JSC::CompositeMarkHook::CompositeMarkHook):

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::tryCopyOtherThreadStacks):

  • heap/MachineStackMarker.h:
  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::ensureBytecodesFor):

  • profiler/ProfilerDatabase.h:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::FrameWalker):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::createThreadIfNecessary):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::releaseStackTraces):

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::setStopWatch):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::availableFastMemories):
(JSC::Wasm::activeFastMemories):
(JSC::Wasm::viewActiveFastMemories):

  • wasm/WasmMemory.h:

Source/WTF:

  • wtf/RunLoop.h:
  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::wakeUp):
(WTF::RunLoop::schedule):

12:47 PM Changeset in webkit [213656] by mrajca@apple.com
  • 15 edits in trunk

Let clients control autoplay quirks with website policies.
https://bugs.webkit.org/show_bug.cgi?id=169390

Reviewed by Wenson Hsieh.

Many sites incorrectly assume media will start off playing and display a pause button from the
start. We can trick many of these sites into updating their controls by sending a "pause"
event when we prevent a media element from playing.

We don't want this to become standard web behavior, however, since ultimately sites should adapt
to the new behavior. This patch lets clients decide which limited set of sites gets to use auto-play
quirks.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::needsAutoplayPlayPauseEventsQuirk):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::allowsAutoplayQuirks):
(WebCore::DocumentLoader::setAllowsAutoplayQuirks):

Source/WebKit2:

  • Shared/WebsitePolicies.h:

(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesSetAllowsAutoplayQuirks):
(WKWebsitePoliciesGetAllowsAutoplayQuirks):

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setAllowsAutoplayQuirks:]):
(-[_WKWebsitePolicies allowsAutoplayQuirks]):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateWebsitePolicies):

Tools:

  • TestWebKitAPI/Tests/WebKit2/autoplay-check.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:

(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):

12:35 PM Changeset in webkit [213655] by Devin Rousso
  • 2 edits in trunk/Tools

Unreviewed, change my status to be a WebKit reviewer

  • Scripts/webkitpy/common/config/contributors.json:
11:46 AM Changeset in webkit [213654] by Jonathan Bedard
  • 9 edits in trunk/Tools

Standardize device/simulator naming conventions
https://bugs.webkit.org/show_bug.cgi?id=169083
<rdar://problem/30810466>

Reviewed by Alexey Proskuryakov.

  • Scripts/build-webkit: Document --ios-device and --simulator options.
  • Scripts/package-root:

(usage): Ditto.

  • Scripts/run-api-tests: Document --simulator option.
  • Scripts/webkitdirs.pm:

(argumentsForConfiguration): Use --ios-device by default rather than --device.
(determineXcodeSDK): Parse --ios-device and --simulator options.

  • Scripts/webkitpy/common/config/ews.json: Change port name from ios to ios-device.
  • Scripts/webkitpy/common/config/ports.py: Ditto.

(DeprecatedPort.port):
(IOSPort): Change port name from ios to ios-device.

  • Scripts/webkitpy/port/factory.py:

(platform_options): Add --simulator option.
(PortFactory): Update comment.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort): Change port name from ios to ios-device.
(IOSDevicePort.operating_system): Ditto.

11:18 AM Changeset in webkit [213653] by sbarati@apple.com
  • 5 edits
    1 add in trunk

WebAssembly: Make the Unity AngryBots demo run
https://bugs.webkit.org/show_bug.cgi?id=169268

Reviewed by Keith Miller.

JSTests:

  • wasm/function-tests/many-arguments-to-function.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.I32Const.0.I32Const.1.I32Const.2.I32Const.3.I32Const.4.I32Const.5.I32Const.6.I32Const.7.I32Const.8.I32Const.9.I32Const.10.I32Const.11.I32Const.12.I32Const.13.I32Const.14.I32Const.15.I32Const.16.I32Const.17.Call.0.Return.End.End.foo):
(i.instance.exports.f0.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.Call.Return.End.End.foo):
(i.instance.exports.f0):
(instance.exports.f0.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.Call.Return.End.End.foo):
(instance.exports.f0):

Source/JavaScriptCore:

This patch fixes three bugs:

  1. The WasmBinding code for making a JS call was off

by 1 in its stack layout code.

  1. The WasmBinding code had a "<" comparison instead

of a ">=" comparison. This would cause us to calculate
the wrong frame pointer offset.

  1. The code to reload wasm state inside B3IRGenerator didn't

properly represent its effects.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::restoreWebAssemblyGlobalState):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::WebAssemblyInstanceConstructor::createInstance):

11:08 AM Changeset in webkit [213652] by mark.lam@apple.com
  • 47 edits in trunk/Source

Make the VM Traps mechanism non-polling for the DFG and FTL.
https://bugs.webkit.org/show_bug.cgi?id=168920
<rdar://problem/30738588>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

  1. Added a ENABLE(SIGNAL_BASED_VM_TRAPS) configuration in Platform.h. This is currently only enabled for OS(DARWIN) and ENABLE(JIT).
  2. Added assembler functions for overwriting an instruction with a breakpoint.
  3. Added a new JettisonDueToVMTraps jettison reason.
  4. Added CodeBlock and DFG::CommonData utility functions for over-writing invalidation points with breakpoint instructions.
  5. The BytecodeGenerator now emits the op_check_traps bytecode unconditionally.
  6. Remove the JSC_alwaysCheckTraps option because of (4) above. For ports that don't ENABLE(SIGNAL_BASED_VM_TRAPS), we'll force Options::usePollingTraps() to always be true. This makes the VMTraps implementation fall back to using polling based traps only.
  1. Make VMTraps support signal based traps.

Some design and implementation details of signal based VM traps:

  • The implementation makes use of 2 signal handlers for SIGUSR1 and SIGTRAP.
  • VMTraps::fireTrap() will set the flag for the requested trap and instantiate a SignalSender. The SignalSender will send SIGUSR1 to the mutator thread that we want to trap, and check for the occurence of one of the following events:
  1. VMTraps::handleTraps() has been called for the requested trap, or
  1. the VM is inactive and is no longer executing any JS code. We determine this to be the case if the thread no longer owns the JSLock and the VM's entryScope is null.

Note: the thread can relinquish the JSLock while the VM's entryScope is not
null. This happens when the thread calls JSLock::dropAllLocks() before
calling a host function that may block on IO (or whatever). For our purpose,
this counts as the VM still running JS code, and VM::fireTrap() will still
be waiting.

If the SignalSender does not see either of these events, it will sleep for a
while and then re-send SIGUSR1 and check for the events again. When it sees
one of these events, it will consider the mutator to have received the trap
request.

  • The SIGUSR1 handler will try to insert breakpoints at the invalidation points in the DFG/FTL codeBlock at the top of the stack. This allows the mutator thread to break (with a SIGTRAP) exactly at an invalidation point, where it's safe to jettison the codeBlock.

Note: we cannot have the requester thread (that called VMTraps::fireTrap())
insert the breakpoint instructions itself. This is because we need the
register state of the the mutator thread (that we want to trap in) in order to
find the codeBlocks that we wish to insert the breakpoints in. Currently,
we don't have a generic way for the requester thread to get the register state
of another thread.

  • The SIGTRAP handler will check to see if it is trapping on a breakpoint at an invalidation point. If so, it will jettison the codeBlock and adjust the PC to re-execute the invalidation OSR exit off-ramp. After the OSR exit, the baseline JIT code will eventually reach an op_check_traps and call VMTraps::handleTraps().

If the handler is not trapping at an invalidation point, then it must be
observing an assertion failure (which also uses the breakpoint instruction).
In this case, the handler will defer to the default SIGTRAP handler and crash.

  • The reason we need the SignalSender is because SignalSender::send() is called from another thread in a loop, so that VMTraps::fireTrap() can return sooner. send() needs to make use of the VM pointer, and it is not guaranteed that the VM will outlive the thread. SignalSender provides the mechanism by which we can nullify the VM pointer when the VM dies so that the thread does not continue to use it.
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::replaceWithBrk):

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::replaceWithBrk):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::replaceWithBkpt):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::replaceWithBkpt):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::replaceWithJump):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::replaceWithBreakpoint):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::replaceWithBreakpoint):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::replaceWithJump):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::replaceWithBreakpoint):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::replaceWithInt3):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::jettison):
(JSC::CodeBlock::hasInstalledVMTrapBreakpoints):
(JSC::CodeBlock::installVMTrapBreakpoints):

  • bytecode/CodeBlock.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitCheckTraps):

  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::installVMTrapBreakpoints):
(JSC::DFG::CommonData::isVMTrapBreakpoint):

  • dfg/DFGCommonData.h:

(JSC::DFG::CommonData::hasInstalledVMTrapsBreakpoints):

  • dfg/DFGJumpReplacement.cpp:

(JSC::DFG::JumpReplacement::installVMTrapBreakpoint):

  • dfg/DFGJumpReplacement.h:

(JSC::DFG::JumpReplacement::dataLocation):

  • dfg/DFGNodeType.h:
  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::contains):

  • heap/CodeBlockSet.h:
  • heap/CodeBlockSetInlines.h:

(JSC::CodeBlockSet::iterate):

  • heap/Heap.cpp:

(JSC::Heap::forEachCodeBlockIgnoringJITPlansImpl):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::forEachCodeBlockIgnoringJITPlans):

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::threadsListHead):

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::isValidExecutableMemory):

  • jit/ExecutableAllocator.h:
  • profiler/ProfilerJettisonReason.cpp:

(WTF::printInternal):

  • profiler/ProfilerJettisonReason.h:
  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

  • runtime/Options.cpp:

(JSC::overrideDefaults):

  • runtime/Options.h:
  • runtime/PlatformThread.h:

(JSC::platformThreadSignal):

  • runtime/VM.cpp:

(JSC::VM::~VM):
(JSC::VM::ensureWatchdog):
(JSC::VM::handleTraps): Deleted.
(JSC::VM::setNeedAsynchronousTerminationSupport): Deleted.

  • runtime/VM.h:

(JSC::VM::ownerThread):
(JSC::VM::traps):
(JSC::VM::handleTraps):
(JSC::VM::needTrapHandling):
(JSC::VM::needAsynchronousTerminationSupport): Deleted.

  • runtime/VMTraps.cpp:

(JSC::VMTraps::vm):
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::adjustPCToPointToTrappingInstruction):
(JSC::vmIsInactive):
(JSC::findActiveVMAndStackBounds):
(JSC::handleSigusr1):
(JSC::handleSigtrap):
(JSC::installSignalHandlers):
(JSC::sanitizedTopCallFrame):
(JSC::isSaneFrame):
(JSC::VMTraps::tryInstallTrapBreakpoints):
(JSC::VMTraps::invalidateCodeBlocksOnStack):
(JSC::VMTraps::VMTraps):
(JSC::VMTraps::willDestroyVM):
(JSC::VMTraps::addSignalSender):
(JSC::VMTraps::removeSignalSender):
(JSC::VMTraps::SignalSender::willDestroyVM):
(JSC::VMTraps::SignalSender::send):
(JSC::VMTraps::fireTrap):
(JSC::VMTraps::handleTraps):

  • runtime/VMTraps.h:

(JSC::VMTraps::~VMTraps):
(JSC::VMTraps::needTrapHandling):
(JSC::VMTraps::notifyGrabAllLocks):
(JSC::VMTraps::SignalSender::SignalSender):
(JSC::VMTraps::invalidateCodeBlocksOnStack):

  • tools/VMInspector.cpp:
  • tools/VMInspector.h:

(JSC::VMInspector::getLock):
(JSC::VMInspector::iterate):

Source/WebCore:

No new tests needed. This is covered by existing tests.

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::WorkerScriptController):
(WebCore::WorkerScriptController::scheduleExecutionTermination):

Source/WTF:

Make StackBounds more useful for checking if a pointer is within stack bounds.

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::isInAllocatedMemory):

  • wtf/MetaAllocator.h:
  • wtf/Platform.h:
  • wtf/StackBounds.h:

(WTF::StackBounds::emptyBounds):
(WTF::StackBounds::StackBounds):
(WTF::StackBounds::isEmpty):
(WTF::StackBounds::contains):

11:08 AM Changeset in webkit [213651] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Add unit test to prevent breakage of EWS
https://bugs.webkit.org/show_bug.cgi?id=169385

Reviewed by Alexey Proskuryakov.

Prevent <http://trac.webkit.org/changeset/213545> from happening in the future.

  • Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:

(test_ews_name): Added.

11:02 AM Changeset in webkit [213650] by dino@apple.com
  • 8 edits
    9 copies in trunk

WebGPU: Backend - Library and Functions
https://bugs.webkit.org/show_bug.cgi?id=169371
<rdar://problem/30928792>

Reviewed by Tim Horton.

Source/WebCore:

Implement the backends for GPULibrary and GPUFunction.
A GPULibrary is created from a GPUDevice, given some
shader source code. You can then extract the GPUFunctions
from the library.

WebKitAPITests: GPULibrary and GPUFunction.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cocoa/GPUFunctionMetal.mm:

(WebCore::GPUFunction::GPUFunction):
(WebCore::GPUFunction::name):
(WebCore::GPUFunction::platformFunction):

  • platform/graphics/cocoa/GPULibraryMetal.mm:

(WebCore::GPULibrary::GPULibrary):
(WebCore::GPULibrary::label):
(WebCore::GPULibrary::setLabel):
(WebCore::GPULibrary::functionNames):
(WebCore::GPULibrary::platformLibrary):

  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createLibrary):

  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/GPUFunction.cpp:

(WebCore::GPUFunction::create):
(WebCore::GPUFunction::~GPUFunction):
(WebCore::GPUFunction::GPUFunction):
(WebCore::GPUFunction::name):

  • platform/graphics/gpu/GPUFunction.h:
  • platform/graphics/gpu/GPULibrary.cpp:

(WebCore::GPULibrary::create):
(WebCore::GPULibrary::~GPULibrary):
(WebCore::GPULibrary::label):
(WebCore::GPULibrary::setLabel):
(WebCore::GPULibrary::functionNames):
(WebCore::GPULibrary::functionWithName):

  • platform/graphics/gpu/GPULibrary.h:

Tools:

Add tests for GPULibrary and GPUFunction.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm:

(TestWebKitAPI::TEST_F):
(TestWebKitAPI::TEST): Deleted.

  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm: Copied from Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm.

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm: Copied from Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm.

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPUTest.h: Copied from Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm.

(TestWebKitAPI::GPU::librarySourceCode):

10:54 AM Changeset in webkit [213649] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[WK2] Prevent app nap for the active tab
https://bugs.webkit.org/show_bug.cgi?id=169417
<rdar://problem/30876965>

Reviewed by Gavin Barraclough.

Prevent app nap for the active tab to minimize the risks of breakage.

From the AppNap documentation [1], the app is only a candidate for app nap if it not the
foreground app. However, in the Safari case, the foreground app is Safari (UIProcess) and
the same policy does not apply to our foreground WebContent process unless we explicitly
make it so. This patch addresses the issue by taking a UserActivity when the tab is
active to prevent app nap.

[1] https://developer.apple.com/library/content/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/AppNap.html

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateThrottleState):

10:53 AM Changeset in webkit [213648] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebKit: JSC: JSObject::ensureLength doesn't check if ensureLengthSlow failed
https://bugs.webkit.org/show_bug.cgi?id=169215

Reviewed by Mark Lam.

This doesn't have a test because it would be a very complicated test.

  • runtime/JSObject.h:

(JSC::JSObject::ensureLength): If ensureLengthSlow returns false, we need to return false.

10:33 AM Changeset in webkit [213647] by andersca@apple.com
  • 3 edits in trunk/Source/WebKit2

Add new delegate methods
https://bugs.webkit.org/show_bug.cgi?id=169394
Part of rdar://problem/28880714.

Reviewed by Tim Horton.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(-[WKPaymentAuthorizationViewControllerDelegate invalidate]):
(toShippingMethod):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:completion:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:completion:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:completion:]):
(WebKit::toPKPaymentAuthorizationStatus):
(WebKit::toPKPaymentErrorCode):
(WebKit::toNSError):
(WebKit::toNSErrors):
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):

9:59 AM Changeset in webkit [213646] by Chris Dumez
  • 7 edits
    2 adds in trunk

Align Document.elementFromPoint() with the CSSOM specification
https://bugs.webkit.org/show_bug.cgi?id=169403

Reviewed by Sam Weinig.

Source/WebCore:

Align Document.elementFromPoint() with the CSSOM specification:

In particular, the parameters should be mandatory and of type double.

The parameters are mandatory in both Firefox and Chrome already. Parameters
are finite floating point in Firefox and integers in Chrome.

Test: fast/dom/elementFromPoint-parameters.html

  • dom/DocumentOrShadowRoot.idl:
  • dom/TreeScope.cpp:

(WebCore::TreeScope::elementFromPoint):

  • dom/TreeScope.h:

LayoutTests:

Add layout test coverage.

  • fast/dom/elementFromPoint-parameters-expected.txt: Added.
  • fast/dom/elementFromPoint-parameters.html: Added.
  • fast/dom/non-numeric-values-numeric-parameters-expected.txt:
  • fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
9:40 AM Changeset in webkit [213645] by fpizlo@apple.com
  • 19 edits
    1 delete in trunk

WTF should make it super easy to do ARM concurrency tricks
https://bugs.webkit.org/show_bug.cgi?id=169300

Reviewed by Mark Lam.

Source/JavaScriptCore:

This changes a bunch of GC hot paths to use new concurrency APIs that lead to optimal
code on both x86 (fully leverage TSO, transactions become CAS loops) and ARM (use
dependency chains for fencing, transactions become LL/SC loops). While inspecting the
machine code, I found other opportunities for improvement, like inlining the "am I
marked" part of the marking functions.

  • heap/Heap.cpp:

(JSC::Heap::setGCDidJIT):

  • heap/HeapInlines.h:

(JSC::Heap::testAndSetMarked):

  • heap/LargeAllocation.h:

(JSC::LargeAllocation::isMarked):
(JSC::LargeAllocation::isMarkedConcurrently):
(JSC::LargeAllocation::aboutToMark):
(JSC::LargeAllocation::testAndSetMarked):

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::areMarksStaleWithDependency):
(JSC::MarkedBlock::aboutToMark):
(JSC::MarkedBlock::isMarkedConcurrently):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendSlow):
(JSC::SlotVisitor::appendHiddenSlow):
(JSC::SlotVisitor::appendHiddenSlowImpl):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::appendUnbarriered): Deleted.
(JSC::SlotVisitor::appendHidden): Deleted.

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::appendUnbarriered):
(JSC::SlotVisitor::appendHidden):
(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendValues):
(JSC::SlotVisitor::appendValuesHidden):

  • runtime/CustomGetterSetter.cpp:
  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterflyImpl):

  • runtime/JSObject.h:

Source/WTF:

This adds Atomic<>::loadLink and Atomic<>::storeCond, available only when HAVE(LL_SC).

It abstracts loadLink/storeCond behind prepare/attempt. You can write prepare/attempt
loops whenever your loop fits into the least common denominator of LL/SC and CAS.

This modifies Atomic<>::transaction to use prepare/attempt. So, if you write your loop
using Atomic<>::transaction, then you get LL/SC for free.

Depending on the kind of transaction you are doing, you may not want to perform an LL
until you have a chance to just load the current value. Atomic<>::transaction() assumes
that you do not care to have any ordering guarantees in that case. If you think that
the transaction has a good chance of aborting this way, you want
Atomic<>::transaction() to first do a plain load. But if you don't think that such an
abort is likely, then you want to go straight to the LL. The API supports this concept
via TransactionAbortLikelihood.

Additionally, this redoes the depend/consume API to be dead simple. Dependency is
unsigned. You get a dependency on a loaded value by just saying
dependency(loadedValue). You consume the dependency by using it as a bonus index to
some pointer dereference. This is made easy with the consume<T*>(ptr, dependency)
helper. In those cases where you want to pass around both a computed value and a
dependency, there's DependencyWith<T>. But you won't need it in most cases. The loaded
value or any value computed from the loaded value is a fine input to dependency()!

This change updates a bunch of hot paths to use the new APIs. Using transaction() gives
us optimal LL/SC loops for object marking and lock acquisition.

This change also updates a bunch of hot paths to use dependency()/consume().

This is a significant Octane/splay speed-up on ARM.

  • wtf/Atomics.h:

(WTF::hasFence):
(WTF::Atomic::prepare):
(WTF::Atomic::attempt):
(WTF::Atomic::transaction):
(WTF::Atomic::transactionRelaxed):
(WTF::nullDependency):
(WTF::dependency):
(WTF::DependencyWith::DependencyWith):
(WTF::dependencyWith):
(WTF::consume):
(WTF::Atomic::tryTransactionRelaxed): Deleted.
(WTF::Atomic::tryTransaction): Deleted.
(WTF::zeroWithConsumeDependency): Deleted.
(WTF::consumeLoad): Deleted.

  • wtf/Bitmap.h:

(WTF::WordType>::get):
(WTF::WordType>::concurrentTestAndSet):
(WTF::WordType>::concurrentTestAndClear):

  • wtf/LockAlgorithm.h:

(WTF::LockAlgorithm::lockFast):
(WTF::LockAlgorithm::unlockFast):
(WTF::LockAlgorithm::unlockSlow):

  • wtf/Platform.h:

Tools:

This vastly simplifies the consume API. The new API is thoroughly tested by being used
in the GC's guts. I think that unit tests are a pain to maintain, so we shouldn't have
them unless we are legitimately worried about coverage. We're not in this case.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Consume.cpp: Removed.
9:40 AM Changeset in webkit [213644] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: DOMTreeManager dispatches DocumentUpdated twice when the document is cleared
https://bugs.webkit.org/show_bug.cgi?id=168984

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/DOMTreeManager.js:

(WebInspector.DOMTreeManager.prototype._setDocument):
Compare old and new document values before dispatching message.

8:26 AM Changeset in webkit [213643] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

WKWebView should automatically respect insets from the view controller hierarchy
https://bugs.webkit.org/show_bug.cgi?id=169398
<rdar://problem/30617593>

Reviewed by Dean Jackson.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _computedContentInset]):
(activeMinimumLayoutSize):
(-[WKWebView _frameOrBoundsChanged]):
Factor insets from above us in the view controller hierarchy into our
content insets (and layout size) automatically.

8:17 AM Changeset in webkit [213642] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168409

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Eric Carlson.

Adding yet more logging to try to determine the cause of this test's flakiness.

  • media/modern-media-controls/airplay-button/airplay-button-expected.txt:
  • media/modern-media-controls/airplay-button/airplay-button.html:
8:10 AM Changeset in webkit [213641] by commit-queue@webkit.org
  • 10 edits in trunk

[Modern Media Controls] Fullscreen controls are difficult to drag around
https://bugs.webkit.org/show_bug.cgi?id=169412
<rdar://problem/30931892>

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Eric Carlson.

Source/WebCore:

Up until now, we would simply check that the event target when attempting to
initiate a drag would be the controls bar and not any of its children. This
was not so great as this would encompass also a large margin around the left,
center and right button containers as well as the time labels. We now check
that the event target is anything but an interactive element (<button> or <input>).

The existing test at media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html
has been updated to initiate dragging right between the rewind and play/pause button,
which would fail prior to this patch since this would have hit-tested within the center
button container and thus prevent dragging.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen button.volume-down):
(.media-controls.mac.fullscreen button.volume-up):
(.media-controls.mac.fullscreen button.rewind):
(.media-controls.mac.fullscreen button.play-pause):
(.media-controls.mac.fullscreen button.forward):
(.media-controls.mac.fullscreen .buttons-container.right button):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype._handleMousedown):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline > .controls-bar button):

  • Modules/modern-media-controls/controls/macos-media-controls.css:

(.media-controls.mac > .controls-bar button):

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:

Rebaseline test to account for CSS changes.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html:

Change drag start coordinate to be right over a button so that it is prevented. Starting with this patch,
a drag at this coordinate would have been tolerated as being part of the left buttons container but not
part of a button in that container.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:

Change drag start coordinate to be right between two buttons so that it would have failed prior to this
patch.

7:59 AM Changeset in webkit [213640] by commit-queue@webkit.org
  • 4 edits
    4 adds in trunk

[Modern Media Controls] Controls are not visible in fullscreen without the controls attribute
https://bugs.webkit.org/show_bug.cgi?id=169411
<rdar://problem/30931724>

Patch by Antoine Quint <Antoine Quint> on 2017-03-09
Reviewed by Eric Carlson.

Source/WebCore:

Ensure we show controls in fullscreen in the absence of the controls attribute.

Tests: media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html

media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype.get mediaEvents):
(ControlsVisibilitySupport.prototype._updateControls):
(ControlsVisibilitySupport):

LayoutTests:

Add two new tests to check that controls are visible in fullscreen in the absence of the controls attribute,
except if the fullscreen element is a parent element.

  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html: Added.
  • platform/ios-simulator/TestExpectations: Skip new tests on iOS since it uses platform controls.
7:25 AM Changeset in webkit [213639] by Alan Bujtas
  • 9 edits in trunk

Simple line layout: Add top level pagination support.
https://bugs.webkit.org/show_bug.cgi?id=169410
<rdar://problem/28536227>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch enables top level pagination for simple line layout.

Covered by existing tests.

  • rendering/RenderMultiColumnFlowThread.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::pushLayoutStateForPagination): Pagination flag needs to be set before calling pushLayoutStateForCurrentFlowThread.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):

  • rendering/SimpleLineLayoutCoverage.cpp:

(WebCore::SimpleLineLayout::printReason):

  • rendering/SimpleLineLayoutCoverage.h:
  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • rendering/SimpleLineLayoutPagination.cpp:

(WebCore::SimpleLineLayout::computeLineTopAndBottomWithOverflow): Matching normal line layout values.
(WebCore::SimpleLineLayout::setPageBreakForLine): Logic here matches RenderBlockFlow::adjustLinePositionForPagination

LayoutTests:

6:24 AM Changeset in webkit [213638] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebKit2

Correctly process the return value of gdk_drag_context_get_selected_action()

Reviewed by Carlos Garcia Campos.

It returns the action itself and not the bitmask.

  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::drop):

5:42 AM Changeset in webkit [213637] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[GTK] Use GtkFileChooserNative for open/save dialogs
https://bugs.webkit.org/show_bug.cgi?id=169278

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-03-09
Reviewed by Carlos Garcia Campos.

When building with GTK+ 3.20.0 or newer, use GtkFileChooserNative instead of GtkFileChooserDialog to allow for
better integration with the runtime environment and use native open/save dialogs. This also makes WebKitGTK+ use
portal-based load/save dialogs when running inside the Flatpak sandbox.

The existing GtkFileChooserDialog implementation will still be used when building against older versions of
GTK+, so this change does not require a new version of the toolkit.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(fileChooserDialogResponseCallback):
(webkitWebViewRunFileChooser):

5:10 AM Changeset in webkit [213636] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][MSE] Fix 'comparison between signed and unsigned integer
expressions' warning

Reviewed by Žan Doberšek.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::flush):

2:51 AM Changeset in webkit [213635] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Add settings for controlling Styles sidebar intelligence
https://bugs.webkit.org/show_bug.cgi?id=169181

Patch by Devin Rousso <Devin Rousso> on 2017-03-09
Reviewed by Timothy Hatcher.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:

Add three new settings:

  • stylesShowInlineWarnings
  • stylesInsertNewline
  • stylesSelectOnFirstClick
  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .separator): Added.
(.content-view.settings > .setting-container):
(.content-view.settings > .setting-container.combined):

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.layout.createContainer):
(WebInspector.SettingsTabContentView.prototype.layout.createSeparator): Added.
(WebInspector.SettingsTabContentView.prototype.layout):

1:51 AM Changeset in webkit [213634] by pvollan@apple.com
  • 12 edits
    4 adds in trunk

Implement stroke-width CSS property.
https://bugs.webkit.org/show_bug.cgi?id=169273

Reviewed by Simon Fraser.

Source/WebCore:

Support setting text stroke width using the CSS property stroke-width, see https://drafts.fxtf.org/paint/.
Text stroke width can currently be set with the -webkit-text-stroke-width property. To make sure this still
works, I added a check to determine if the stroke-width property has been explicitly set. If it has not been
set, we fall back to the value of the -webkit-text-stroke-width property.

Tests: fast/css/stroke-width-percent.html

fast/css/stroke-width.html

  • css/CSSProperties.json:
  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueStrokeWidth):
(WebCore::StyleBuilderCustom::applyValueWebkitTextStrokeWidth):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::computeOverflow):

  • rendering/TextDecorationPainter.cpp:

(WebCore::decorationColor):

  • rendering/TextPaintStyle.cpp:

(WebCore::computeTextPaintStyle):
(WebCore::computeTextSelectionPaintStyle):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::computedTextStrokeWidth):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setHasExplicitlySetStrokeWidth):
(WebCore::RenderStyle::hasExplicitlySetStrokeWidth):
(WebCore::RenderStyle::setHasExplicitlySetWebKitTextStrokeWidth):
(WebCore::RenderStyle::hasExplicitlySetWebKitTextStrokeWidth):
(WebCore::RenderStyle::InheritedFlags::operator==):

LayoutTests:

  • fast/css/stroke-width-expected.html: Added.
  • fast/css/stroke-width-percent-expected.html: Added.
  • fast/css/stroke-width-percent.html: Added.
  • fast/css/stroke-width.html: Added.
1:07 AM Changeset in webkit [213633] by Antti Koivisto
  • 15 edits
    3 adds in trunk

Source/WebCore:
Allow the page to render before <link> stylesheet tags in body
https://bugs.webkit.org/show_bug.cgi?id=149157
<rdar://problem/24658830>

Reviewed by Simon Fraser.

Currently we block style and renderer building completely if document has any loading
stylesheets. In case a script queries something layout dependent we construct the render
tree with whatever style we have but block painting in it.

This patch changes behavior so that a loading stylesheet in body only blocks rendering for elements
that are after it. The expectation is that such stylesheets rarely affect elements before them
and the elements can be rendered without causing ugly visible styling changes.

The patch replaces the old flash-of-unstyled-content (FOUC) preventation mechanism with a more
fine-grained one. Paint blocking is now done on per-renderer basis with based on isNonFinal flag in
RenderStyle.

For stylesheets in head the behavior should be largely unchanged.

Test: http/tests/incremental/stylesheet-body-incremental-rendering.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::pseudoStyleRulesForElement):

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::resolveStyle):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):

Remove the old FOUC preventation state tracking.

(WebCore::Document::shouldScheduleLayout):
(WebCore::Document::didRemoveAllPendingStylesheet):

Repaints will now get triggered by the normal style mechanism.

  • dom/Document.h:

(WebCore::Document::hasNodesWithNonFinalStyle):
(WebCore::Document::setHasNodesWithNonFinalStyle):

Track if we need to recompute the style later because non-final or unstyled elements.

(WebCore::Document::didLayoutWithPendingStylesheets): Deleted.
(WebCore::Document::hasNodesWithPlaceholderStyle): Deleted.
(WebCore::Document::setHasNodesWithPlaceholderStyle): Deleted.

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::rendererIsNeeded):

  • page/FrameView.cpp:

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):

Don't qualify as visually non-empty if we have loading stylesheets in head (even if there is
a fouc-prevented render tree).

(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintContents):

Instead of a global test, block painting if isNonFinal is set in the renderer's style.

  • rendering/RenderLayer.cpp:

(WebCore::shouldSuppressPaintingLayer):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresRepaint):

The isNonFinal flag prevents painting so we need to trigger repaint when it gets cleared.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isNotFinal):
(WebCore::RenderStyle::setIsNotFinal):
(WebCore::RenderStyle::isPlaceholderStyle): Deleted.
(WebCore::RenderStyle::setIsPlaceholderStyle): Deleted.

There is no need for placeholder styles anymore. Reuse the bit for isNotFinal.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::resolveElement):

If we have seens a loading stylesheet and don't have a renderer yet don't style the element.
In case there is a renderer or we are ignoring pending sheets, resolve the style normally
but mark it as non-final.

(WebCore::Style::makePlaceholderStyle): Deleted.

LayoutTests:
Loading in-body stylesheets should not block rendering of elements before them
https://bugs.webkit.org/show_bug.cgi?id=169345

Reviewed by Simon Fraser.

  • http/tests/incremental/resources/delayed-css.php: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering-expected.html: Added.
  • http/tests/incremental/stylesheet-body-incremental-rendering.html: Added.

Mar 8, 2017:

11:45 PM Changeset in webkit [213632] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[Modern Media Controls] iOS: Live Broadcast video shows scrubber with 00:00 duration until paused
https://bugs.webkit.org/show_bug.cgi?id=169374
<rdar://problem/30063273>

Patch by Antoine Quint <Antoine Quint> on 2017-03-08
Reviewed by Dean Jackson.

Source/WebCore:

We need to make sure we update the controls layout when they come back from being hidden, so promote
that functionality from MacOSInlineMediaControls to MediaControls so that iOS can pick that behavior
up.

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-status-label-enabled-hidden-controls-bar.html

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.controlsBarVisibilityDidChange): Deleted.

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.controlsBarVisibilityDidChange):

LayoutTests:

Add a test that checks that we correctly show the status label after enabling it with the controls bar
invisible.

  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-status-label-enabled-hidden-controls-bar-expected.txt: Added.
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-status-label-enabled-hidden-controls-bar.html: Added.
10:31 PM Changeset in webkit [213631] by Yusuke Suzuki
  • 8 edits in trunk

[GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
https://bugs.webkit.org/show_bug.cgi?id=160124

Reviewed by Mark Lam.

JSTests:

  • stress/spread-forward-call-varargs-stack-overflow.js:

Source/JavaScriptCore:

When performing CallVarargs, we will copy values to the stack.
Before actually copying values, we need to adjust the stackPointerRegister
to ensure copied values are in the allocated stack area.
If we do not that, OS can break the values that is stored beyond the stack
pointer. For example, signal stack can be constructed on these area, and
breaks values.

This patch fixes the crash in stress/spread-forward-call-varargs-stack-overflow.js
in Linux port. Since Linux ports use signal to suspend and resume threads,
signal handler is frequently called when enabling sampling profiler. Thus this
crash occurs.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • jit/SetupVarargsFrame.h:
10:02 PM Changeset in webkit [213630] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Fix error/warning duplication in JSON bindings results
https://bugs.webkit.org/show_bug.cgi?id=169305

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-08
Reviewed by Alexey Proskuryakov.

The distinction between failures and errors is not meaningful, since all errors will also be failures.
As a result, we only need to keep track of failures.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.init): Remove errors.
(BindingsTests.detect_changes): Remove errors.
(BindingsTests.main): Remove errors.

9:54 PM Changeset in webkit [213629] by Yusuke Suzuki
  • 3 edits
    3 adds in trunk

[JSC] Add helpers to run Six Speed to run-jsc-benchmarks
https://bugs.webkit.org/show_bug.cgi?id=169351

Reviewed by Saam Barati.

PerformanceTests:

  • SixSpeed/wrappers/wrapper.js: Added.

(assertEqual):
(test):
(jscRun):

Tools:

This patch adds an ability to run six-speed microbenchmarks
from run-jsc-benchmarks by specifying six-speed directory in
arewefastyet repository.

While it is a collection of microbenchmarks, it is useful
to ensure that our ES6 optimization covers major use cases.
For the macrobenchmark, we already have ARES-6.

  • Scripts/run-jsc-benchmarks:
9:50 PM Changeset in webkit [213628] by jiewen_tan@apple.com
  • 29 edits
    6 moves
    9 adds
    2 deletes in trunk

[WebCrypto] Implement SubtleCrypto::DeriveKey method
https://bugs.webkit.org/show_bug.cgi?id=169386
<rdar://problem/23789585>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch does following few things:

  1. It implements SubtleCrypto::DeriveKey method according to the spec:

https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-deriveKey.

  1. It implements getKeyLength operations for AES-CBC, AES-KW, AES-CFB,

AES-GCM, and HMAC, which is needed by the SubtleCrypto::DeriveKey method.

  1. It enables ECDH DeriveKey operation.
  2. It replaces unigned long with size_t in all the crypto codes.

Tests: crypto/subtle/derive-key-malformed-parameters.html

crypto/subtle/ecdh-import-key-derive-aes-key.html
crypto/subtle/ecdh-import-key-derive-hmac-key-custom-length.html
crypto/subtle/unwrap-key-malformed-parameters.html
crypto/subtle/wrap-key-malformed-parameters.html
crypto/workers/subtle/ecdh-import-key-derive-key.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionSignPromise):
(WebCore::jsSubtleCryptoFunctionVerifyPromise):
(WebCore::jsSubtleCryptoFunctionDigestPromise):
(WebCore::jsSubtleCryptoFunctionDeriveKeyPromise):
(WebCore::jsSubtleCryptoFunctionDeriveBitsPromise):
Remove unnecessary return statement from callbacks.

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::getKeyLength):

  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoAlgorithmParameters.h:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:

(WebCore::CryptoAlgorithmAES_CFB::generateKey):
(WebCore::CryptoAlgorithmAES_CFB::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.h:
  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::generateKey):
(WebCore::CryptoAlgorithmAES_GCM::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmAES_GCM.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::generateKey):
(WebCore::CryptoAlgorithmAES_KW::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/keys/CryptoKeyAES.cpp:

(WebCore::CryptoKeyAES::getKeyLength):

  • crypto/keys/CryptoKeyAES.h:
  • crypto/keys/CryptoKeyHMAC.cpp:

(WebCore::getKeyLengthFromHash):
(WebCore::CryptoKeyHMAC::generate):
(WebCore::CryptoKeyHMAC::getKeyLength):

  • crypto/keys/CryptoKeyHMAC.h:
  • crypto/mac/CryptoAlgorithmECDHMac.cpp:

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

  • crypto/parameters/AesKeyParams.idl: Renamed from Source/WebCore/crypto/parameters/AesKeyGenParams.idl.
  • crypto/parameters/CryptoAlgorithmAesKeyParams.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesKeyGenParams.h.

Rename AesKeyGenParams to AesKeyParams to represent a unified dictionary for AesKeyGenParams and AesDerivedKeyParams.

  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:

LayoutTests:

  • crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/derive-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/derive-key-malformed-parameters.html: Added.
  • crypto/subtle/deriveKey-malformed-parameters-expected.txt: Removed.
  • crypto/subtle/deriveKey-malformed-parameters.html: Removed.
  • crypto/subtle/ecdh-import-key-derive-aes-key-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-aes-key.html: Added.
  • crypto/subtle/ecdh-import-key-derive-hmac-key-custom-length-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-hmac-key-custom-length.html: Added.
  • crypto/subtle/unwrap-key-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/unwrapKey-malformed-parameters-expected.txt.
  • crypto/subtle/unwrap-key-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/unwrapKey-malformed-parameters.html.
  • crypto/subtle/wrap-key-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/wrapKey-malformed-parameters-expected.txt.
  • crypto/subtle/wrap-key-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/wrapKey-malformed-parameters.html.

A bit renaming.

  • crypto/workers/subtle/ecdh-import-key-derive-key-expected.txt: Added.
  • crypto/workers/subtle/ecdh-import-key-derive-key.html: Added.
  • crypto/workers/subtle/resources/ecdh-import-key-derive-key.js: Added.
9:16 PM Changeset in webkit [213627] by Wenson Hsieh
  • 19 edits in trunk/Source

Add plumbing for WebCore to notify WebKit2 when an edit drag has concluded
https://bugs.webkit.org/show_bug.cgi?id=169392
<rdar://problem/30882974>

Reviewed by Tim Horton.

Source/WebCore:

Add DragClient::didConcludeEditDrag and invoke it after performing an edit drag in
DragController::performDragOperation.

  • page/DragClient.h:

(WebCore::DragClient::didConcludeEditDrag):

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

Source/WebKit/mac:

Add a stub implementation of WebDragClient::didConcludeEditDrag.

  • WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Add boilerplate plumbing for didConcludeEditDataInteraction from the web process to the UI process. Also makes
some minor tweaks to WKContentView along the way.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didConcludeEditDataInteraction):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

Bail out of zooming to the focus rect when performing a data interaction operation. This needs to eventually
work, but is not high priority at the moment.

(-[WKContentView becomeFirstResponderForWebView]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView useSelectionAssistantWithMode:]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView suppressAssistantSelectionView]):
(-[WKContentView setSuppressAssistantSelectionView:]):

Add a mechanism for suppressing the text interaction assistant's selection view. If the text interaction
assistant exists while beginning or ending suppression, the selection will be deactivated or activated. If there
is not text interaction assistant, then we instead remember whether or not we should be suppressing the
selection, and bail out of activating the selection if so.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didConcludeEditDataInteraction):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::didConcludeEditDrag):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didConcludeEditDataInteraction):

8:55 PM Changeset in webkit [213626] by Matt Baker
  • 33 edits
    2 copies
    7 adds in trunk

Web Inspector: Add DOM breakpoints UI for node/subtree modification events
https://bugs.webkit.org/show_bug.cgi?id=168101

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/dom-debugger/dom-breakpoints.html

  • inspector/InspectorDOMAgent.h:

Removed declarations for undefined member functions.

  • inspector/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::disable):
(WebCore::InspectorDOMDebuggerAgent::mainFrameDOMContentLoaded):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
Check that DebuggerAgent breakpoints are active before breaking.
(WebCore::InspectorDOMDebuggerAgent::clear): Deleted.
Replaced by call to discardBindings.

  • inspector/InspectorDOMDebuggerAgent.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
DOMDebugger agent needs to discard bindings when the main frame navigates.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New UI strings.

  • UserInterface/Base/Main.js:

(WebInspector.loaded):
Add new manager.

  • UserInterface/Controllers/DOMBreakpointTreeController.js: Added.

Handles messages from DOMDebuggerManager, and updates an associated
tree outline as DOM breakpoints are added and removed.
(WebInspector.DOMBreakpointTreeController):
(WebInspector.DOMBreakpointTreeController.appendBreakpointContextMenuItems):
(WebInspector.DOMBreakpointTreeController.prototype.disconnect):
(WebInspector.DOMBreakpointTreeController.prototype._addBreakpointTreeElement):
(WebInspector.DOMBreakpointTreeController.prototype._removeBreakpointTreeElement):
(WebInspector.DOMBreakpointTreeController.prototype._domBreakpointAdded):
(WebInspector.DOMBreakpointTreeController.prototype._domBreakpointRemoved):
(WebInspector.DOMBreakpointTreeController.prototype._domBreakpointResolvedStateDidChange):
(WebInspector.DOMBreakpointTreeController.prototype._mainResourceDidChange):

  • UserInterface/Controllers/DOMDebuggerManager.js: Added.

New frontend manager for the DOMDebugger domain. A DOM breakpoint is
described by a location (URL and node path) and type. The manager keeps
all known DOM breakpoints in memory, and considers a breakpoint to be
"resolved" once its location is pushed to the frontend.

Breakpoints located within a child frame are still associated with the
main frame. Whenever a the main resource of a child frame changes, all
unresolved breakpoints associated with the main frame are speculatively
resolved.

(WebInspector.DOMDebuggerManager):
(WebInspector.DOMDebuggerManager.prototype.get supported):
(WebInspector.DOMDebuggerManager.prototype.get domBreakpoints):
(WebInspector.DOMDebuggerManager.prototype.domBreakpointsForNode):
(WebInspector.DOMDebuggerManager.prototype.addDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._detachDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._detachBreakpointsForFrame):
(WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._updateDOMBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._saveBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._domBreakpointDisabledStateDidChange):
(WebInspector.DOMDebuggerManager.prototype._childFrameWasRemoved):
(WebInspector.DOMDebuggerManager.prototype._mainFrameDidChange):
(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):
(WebInspector.DOMDebuggerManager.prototype._nodeInserted):
(WebInspector.DOMDebuggerManager.prototype._nodeRemoved):

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype._pauseReasonFromPayload):
Plumbing for DOM breakpoint pause reason.

  • UserInterface/Images/DOMBreakpoint.svg: Added.

New art. Visually very similar to a script breakpoint, with some
tweaks to make it suitable for display in the DOM tree gutter.

  • UserInterface/Main.html:

New files.

  • UserInterface/Models/DOMBreakpoint.js: Added.

New model class. DOM breakpoints are either associated with a DOM node
when created, or constructed from a cookie and resolved in the future.

(WebInspector.DOMBreakpoint):
(WebInspector.DOMBreakpoint.prototype.get type):
(WebInspector.DOMBreakpoint.prototype.get url):
(WebInspector.DOMBreakpoint.prototype.get path):
(WebInspector.DOMBreakpoint.prototype.get disabled):
(WebInspector.DOMBreakpoint.prototype.set disabled):
(WebInspector.DOMBreakpoint.prototype.get domNodeIdentifier):
(WebInspector.DOMBreakpoint.prototype.set domNodeIdentifier):
(WebInspector.DOMBreakpoint.prototype.get serializableInfo):
(WebInspector.DOMBreakpoint.prototype.saveIdentityToCookie):

  • UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:

The DOMDebugger should not be enabled for legacy backends, since legacy
backend support was never tested and may have issues.

  • UserInterface/Test.html:

New files.

  • UserInterface/Test/Test.js:

(WebInspector.loaded):
Add new manager.

  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject):
Plumbing for additional represented object types. DOMNode is included
because the Debugger sidebar panel shows DOM breakpoint tree elements
as children of a DOM node tree element.

  • UserInterface/Views/DOMBreakpointTreeElement.css: Added.

(.item.dom-breakpoint .icon):
(.item.dom-breakpoint.breakpoint-paused-icon .icon):
(.item.dom-breakpoint .status img):
(.item.dom-breakpoint .status > img.disabled):
Styles for "Pause Reason" and "DOM Breakpoints" sections.

  • UserInterface/Views/DOMBreakpointTreeElement.js: Added.

Tree element class for DOM breakpoints. Includes a breakpoint status
element and context menu for delete/disable actions, similar to script
breakpoint tree elements.

(WebInspector.DOMBreakpointTreeElement):
(WebInspector.DOMBreakpointTreeElement.displayNameForType):
(WebInspector.DOMBreakpointTreeElement.prototype.onattach):
(WebInspector.DOMBreakpointTreeElement.prototype.ondetach):
(WebInspector.DOMBreakpointTreeElement.prototype.ondelete):
(WebInspector.DOMBreakpointTreeElement.prototype.onenter):
(WebInspector.DOMBreakpointTreeElement.prototype.onspace):
(WebInspector.DOMBreakpointTreeElement.prototype.populateContextMenu):
(WebInspector.DOMBreakpointTreeElement.prototype._statusImageElementClicked):
(WebInspector.DOMBreakpointTreeElement.prototype._statusImageElementFocused):
(WebInspector.DOMBreakpointTreeElement.prototype._statusImageElementMouseDown):
(WebInspector.DOMBreakpointTreeElement.prototype._toggleBreakpoint):
(WebInspector.DOMBreakpointTreeElement.prototype._updateStatus):

  • UserInterface/Views/DOMNodeTreeElement.js: Added.

Tree element class for DOM nodes, which serves as a parent for DOM
breakpoint tree elements. Includes context menu for bulk delete/disable
of all child breakpoints.

(WebInspector.DOMNodeTreeElement):
(WebInspector.DOMNodeTreeElement.prototype.ondelete):
(WebInspector.DOMNodeTreeElement.prototype.populateContextMenu):

  • UserInterface/Views/DOMTreeContentView.css:

Styles for DOM breakpoint gutter and breakpoint indicators, including
"left pointing" breakpoints for RTL mode.

(.content-view.dom-tree.show-gutter .tree-outline.dom):
(body[dir=ltr] .content-view.dom-tree.show-gutter .tree-outline.dom):
(body[dir=rtl] .content-view.dom-tree.show-gutter .tree-outline.dom):
(.content-view.dom-tree .tree-outline.dom li .status-image):
(body[dir=ltr] .content-view.dom-tree .tree-outline.dom li .status-image):
(body[dir=rtl] .content-view.dom-tree .tree-outline.dom li .status-image):
(.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
(body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li.selected .status-image.breakpoint):
(.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled):
(.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint):
(.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled):

  • UserInterface/Views/DOMTreeContentView.js:

Add support for DOM breakpoint gutter and breakpoint indicators.
Breakpoint indicator elements are part of the DOM tree element, and are
updated whenever there a breakpoint's disabled or resolved state changes.

(WebInspector.DOMTreeContentView):
(WebInspector.DOMTreeContentView.prototype.get breakpointGutterEnabled):
(WebInspector.DOMTreeContentView.prototype.set breakpointGutterEnabled):
(WebInspector.DOMTreeContentView.prototype.shown):
(WebInspector.DOMTreeContentView.prototype.closed):
(WebInspector.DOMTreeContentView.prototype._domTreeElementAdded):
(WebInspector.DOMTreeContentView.prototype._domBreakpointAddedOrRemoved):
(WebInspector.DOMTreeContentView.prototype._domBreakpointDisabledStateDidChange):
(WebInspector.DOMTreeContentView.prototype._domBreakpointResolvedStateDidChange):
(WebInspector.DOMTreeContentView.prototype._updateBreakpointStatus):
(WebInspector.DOMTreeContentView.prototype._restoreBreakpointsAfterUpdate):
(WebInspector.DOMTreeContentView.prototype._breakpointsEnabledDidChange):

  • UserInterface/Views/DOMTreeElement.js:

Add support for breakpoint status element and content menu.
(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype.get breakpointStatus):
(WebInspector.DOMTreeElement.prototype.set breakpointStatus):
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
(WebInspector.DOMTreeElement.prototype.updateTitle):
(WebInspector.DOMTreeElement.prototype._updateBreakpointStatus):
(WebInspector.DOMTreeElement.prototype._statusImageContextmenu):

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger .details-section.dom-breakpoints .item.dom-node .titles):
(.sidebar > .panel.navigation.debugger .details-section.dom-breakpoints .item.dom-node .icon):
Styles for DOM node tree elements.

  • UserInterface/Views/DebuggerSidebarPanel.js:

Add new DOM Breakpoints section, and support for the "DOM" pause reason.

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype.closed):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WebInspector.DebuggerSidebarPanel.prototype._domBreakpointAddedOrRemoved):

  • UserInterface/Views/FrameDOMTreeContentView.js:

(WebInspector.FrameDOMTreeContentView.prototype._rootDOMNodeAvailable):
Restore DOM breakpoints once the root node is available.

  • UserInterface/Views/Variables.css:

(:root):
Fill and stroke colors for resolved, unresolved, and disabled breakpoints.

  • Versions/Inspector-iOS-10.0.json:
  • Versions/Inspector-iOS-10.3.json:
  • Versions/Inspector-iOS-7.0.json:
  • Versions/Inspector-iOS-8.0.json:
  • Versions/Inspector-iOS-9.0.json:
  • Versions/Inspector-iOS-9.3.json:

LayoutTests:

Tests for pausing on supported DOM breakpoint types, and DOMDebuggerManager
events triggered by added/removed DOM nodes that have breakpoints.

  • inspector/dom-debugger/dom-breakpoints-expected.txt: Added.
  • inspector/dom-debugger/dom-breakpoints.html: Added.
8:23 PM Changeset in webkit [213625] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

import-w3c-tests doesn't work with svn repositories.
https://bugs.webkit.org/show_bug.cgi?id=169190

Patch by Sam Weinig <sam@webkit.org> on 2017-03-08
Reviewed by Tim Horton.

The script assumed you had WebKit checked-out as a git repository, but
there was no reason for that.

  • Scripts/webkitpy/common/checkout/scm/git.py:

(Git.clone):
Add a class method to clone a repository which does not require
an existing checkout.

(Git.fetch):
(Git.checkout):
Add methods needed for test_downloader.py, so it doesn't have to use
the internal _run_git

  • Scripts/webkitpy/w3c/test_downloader.py:

(TestDownloader.checkout_test_repository):
Switch to using Git.clone(), which doesn't require an existing git
directory, and then also adopt non private methods to fetch/checkout.

8:04 PM Changeset in webkit [213624] by jiewen_tan@apple.com
  • 16 edits
    4 copies
    1 move
    12 adds
    1 delete in trunk

[WebCrypto] Implement ECDH DeriveBits operation
https://bugs.webkit.org/show_bug.cgi?id=169319
<rdar://problem/23789585>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch implements DeriveBits operation of ECDH according to the spec:
https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.

Tests: crypto/subtle/derive-bits-malformed-parameters.html

crypto/subtle/ecdh-derive-bits-malformed-parametrs.html
crypto/subtle/ecdh-generate-key-derive-bits.html
crypto/subtle/ecdh-import-key-derive-bits-custom-length.html
crypto/subtle/ecdh-import-key-derive-bits-null-length.html
crypto/workers/subtle/ecdh-import-key-derive-bits.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionDeriveKeyPromise):
(WebCore::jsSubtleCryptoFunctionDeriveBitsPromise):
(WebCore::JSSubtleCrypto::generateKey):
Reorder a bit of the functions.

  • crypto/CommonCryptoUtilities.h:
  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::deriveBits):

  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoAlgorithmParameters.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/gnutls/CryptoAlgorithmECDHGnuTLS.cpp: Added.

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

  • crypto/keys/CryptoKeyEC.h:
  • crypto/mac/CryptoAlgorithmECDHMac.cpp: Added.

(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

  • crypto/parameters/CryptoAlgorithmEcdhKeyDeriveParams.h: Added.
  • crypto/parameters/EcdhKeyDeriveParams.idl: Added.

LayoutTests:

Refine some comments.

  • crypto/subtle/derive-bits-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/deriveBits-malformed-parameters-expected.txt.
  • crypto/subtle/derive-bits-malformed-parameters.html: Added.
  • crypto/subtle/deriveBits-malformed-parameters.html: Removed.
  • crypto/subtle/ecdh-derive-bits-malformed-parametrs-expected.txt: Added.
  • crypto/subtle/ecdh-derive-bits-malformed-parametrs.html: Added.
  • crypto/subtle/ecdh-generate-key-derive-bits-expected.txt: Added.
  • crypto/subtle/ecdh-generate-key-derive-bits.html: Added.
  • crypto/subtle/ecdh-import-key-derive-bits-custom-length-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-bits-custom-length.html: Added.
  • crypto/subtle/ecdh-import-key-derive-bits-null-length-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-bits-null-length.html: Added.
  • crypto/workers/subtle/ecdh-import-key-derive-bits-expected.txt: Added.
  • crypto/workers/subtle/ecdh-import-key-derive-bits.html: Added.
  • crypto/workers/subtle/resources/ecdh-import-key-derive-bits.js: Added.
8:02 PM Changeset in webkit [213623] by wilander@apple.com
  • 35 edits
    5 adds in trunk

Resource Load Statistics: Communicate to the network process which domains to partition
https://bugs.webkit.org/show_bug.cgi?id=169322
<rdar://problem/30768921>

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

Now calls ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler()
to tell the network process the domain has got user interaction.

(WebCore::ResourceLoadObserver::logUserInteraction):

Now calls ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler()
to tell the network process the domain has got user interaction.

(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):

To allow TestRunner to set a domain for which
partitioning should be applied.

(WebCore::ResourceLoadObserver::primaryDomain):

New overloaded convenience function.

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):

Now bootstraps the network process' set of known domains to
partition cookies for.

(WebCore::ResourceLoadStatisticsStore::setShouldPartitionCookiesCallback):
(WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
(WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):

Now tells the network process to start partitioning again
when user interaction ages out.

  • loader/ResourceLoadStatisticsStore.h:
  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::shouldPartitionCookiesForHost):
(WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts):

Source/WebKit2:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::shouldPartitionCookiesForTopPrivatelyOwnedDomains):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

Now consults WebCore::NetworkStorageSession::shouldPartitionCookiesForHost()
to decide whether partitioning should be applied or not.

  • UIProcess/API/C/WKCookieManager.cpp:

(WKCookieManagerSetCookieStoragePartitioningEnabled):

To allow TestRunner to configure cookie partitioning.

  • UIProcess/API/C/WKCookieManager.h:
  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandler):

To allow TestRunner to set a domain for which
partitioning should be applied.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::shouldPartitionCookiesForTopPrivatelyOwnedDomains):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebCookieManagerProxy.cpp:

(WebKit::WebCookieManagerProxy::setCookieStoragePartitioningEnabled):

To allow TestRunner to configure cookie partitioning.

  • UIProcess/WebCookieManagerProxy.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):

To allow TestRunner to set a domain for which
partitioning should be applied.

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::classifyResource):

Now tells the network process as soon as a domain
has been classified as prevalent.

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

Overloaded function to allow injection of handlers for communication with the
network process.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
(WebKit::WebsiteDataStore::registerSharedResourceLoadObserver):

Now sets two callback handlers for communication with the network process.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

These changes add support for two new TestRunner functions:

  • setCookieStoragePartitioningEnabled()
  • statisticsFireShouldPartitionCookiesHandler()
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setCookieStoragePartitioningEnabled):
(WTR::TestRunner::statisticsFireShouldPartitionCookiesHandler):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::statisticsFireShouldPartitionCookiesHandler):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html: Added.
  • http/tests/loading/resourceLoadStatistics/resources: Added.
  • http/tests/loading/resourceLoadStatistics/resources/get-cookies.php: Added.
  • http/tests/loading/resourceLoadStatistics/resources/set-cookie.php: Added.
7:44 PM Changeset in webkit [213622] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: table header columns and cells don't line up, dragging seems backwards
https://bugs.webkit.org/show_bug.cgi?id=168289

Patch by Devin Rousso <Devin Rousso> on 2017-03-08
Reviewed by Brian Burg.

Changed the algorithm used to position columns when in RTL to use right offsets instead of
left offsets. This also applies to the resizer elements between columns.

  • UserInterface/Views/DataGrid.css:

(.data-grid):
(.data-grid th):
(body[dir=ltr] .data-grid :matches(th, td):not(:last-child)):
(body[dir=rtl] .data-grid :matches(th, td):not(:last-child)):
(.data-grid th:matches(.sort-ascending, .sort-descending)):
(body[dir=ltr] .data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)):
(body[dir=rtl] .data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)):
(.data-grid .right div):
(body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child):
(body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child):
(.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after):
(body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after):
(body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after):
(.data-grid th.sort-ascending > div:first-child::after):
(.data-grid th.sort-descending > div:first-child::after):
(.data-grid tr.parent td.disclosure::before):
(body[dir=ltr] .data-grid tr.parent td.disclosure::before):
(body[dir=rtl] .data-grid tr.parent td.disclosure::before):
(.data-grid td .icon):
(body[dir=ltr] .data-grid td .icon):
(body[dir=rtl] .data-grid td .icon):
(.data-grid td .go-to-arrow):
(body[dir=ltr] .data-grid td .go-to-arrow):
(body[dir=rtl] .data-grid td .go-to-arrow):
(.data-grid .resizer):
(body[dir=ltr] .data-grid .resizer):
(body[dir=rtl] .data-grid .resizer):
(.data-grid table:matches(.header, .data)):
(body[dir=ltr] .data-grid table:matches(.header, .data)):
(body[dir=rtl] .data-grid table:matches(.header, .data)):
(body[dir=ltr] .data-grid :matches(th, td):first-child):
(body[dir=rtl] .data-grid :matches(th, td):first-child):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.data-grid :matches(th, td):not(:last-child)): Deleted.
(.data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)): Deleted.
(.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child): Deleted.
(.data-grid table.header, .data-grid table.data): Deleted.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype._positionResizerElements):
(WebInspector.DataGrid.prototype._positionHeaderViews):
(WebInspector.DataGrid.prototype.resizerDragging):

7:35 PM Changeset in webkit [213621] by Joseph Pecoraro
  • 30 edits
    9 adds in trunk

Web Inspector: Should be able to see where Resources came from (Memory Cache, Disk Cache)
https://bugs.webkit.org/show_bug.cgi?id=164892
<rdar://problem/29320562>

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Replace "fromDiskCache" property with "source" property which includes
more complete information about the source of this response (network,
memory cache, disk cache, or unknown).

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(_generate_class_for_object_declaration):

  • inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:

(CppProtocolTypesImplementationGenerator._generate_open_field_names):

  • inspector/scripts/codegen/generator.py:

(Generator):
(Generator.open_fields):
To avoid conflicts between the Inspector::Protocol::Network::Response::Source
enum and open accessor string symbol that would have the same name, only generate
a specific list of open accessor strings. This reduces the list of exported
symbols from all properties to just the ones that are needed. This can be
cleaned up later if needed.

  • inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result: Added.
  • inspector/scripts/tests/generic/type-with-open-parameters.json: Added.

Test for open accessors generation.

Source/WebCore:

Test: http/tests/inspector/network/resource-response-source-disk-cache.html

http/tests/inspector/network/resource-response-source-memory-cache.html
http/tests/inspector/network/resource-response-source-network.html

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::setSource): Deleted.

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::setSource):
Make Source mutable to allow it to be set in const methods.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse):
Set the Response source after a successful memory cache validation
as early as possible so that future copies have up to date info.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::responseSource):
(WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
(WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorNetworkAgent::markResourceAsCached): Deleted.
Eliminate this "markResourceAsCached" path.
Update Response to include required source parameter instead of
optional fromDiskCache parameter.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::markResourceAsCachedImpl): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::markResourceAsCached): Deleted.

  • inspector/InspectorNetworkAgent.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadedResourceFromMemoryCache):
Eliminate this "markResourceAsCached" call because the later delegate
messages will include this information.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New localized strings for memory/disk cache information.

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache):
Make this legacy path more explicit.

(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
Make this memory cache path more explicit.

(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
Pass the resource's response source onward.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.responseSourceFromPayload):
(WebInspector.Resource.prototype.get responseSource):
(WebInspector.Resource.prototype.hasResponse):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.markAsCached):
(WebInspector.Resource.prototype.legacyMarkServedFromMemoryCache):
(WebInspector.Resource.prototype.legacyMarkServedFromDiskCache):
Include a WebInspector.ResponseSource enum.
Update a Resource's responseSource state where appropriate.

  • UserInterface/Protocol/NetworkObserver.js:

(WebInspector.NetworkObserver.prototype.requestServedFromCache):
Mark legacy path.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):
Tweak default column sizes to make Cached and graph columns a little larger.

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype._cachedCellContent):
Update "Cached" column data with more information if available.

  • UserInterface/Views/NetworkGridContentView.css:

(.content-view.network-grid > .data-grid .cache-type):
(.content-view.network-grid > .data-grid:matches(:focus, .force-focus) tr.selected .cache-type):
Style the cache type a secondary color.

LayoutTests:

  • http/tests/inspector/network/resource-response-source-disk-cache-expected.txt: Added.
  • http/tests/inspector/network/resource-response-source-disk-cache.html: Added.
  • http/tests/inspector/network/resource-response-source-memory-cache-expected.txt: Added.
  • http/tests/inspector/network/resource-response-source-memory-cache.html: Added.
  • http/tests/inspector/network/resource-response-source-network-expected.txt: Added.
  • http/tests/inspector/network/resource-response-source-network.html: Added.
  • http/tests/inspector/network/resources/cached-script.js: Added.

Test for Network, MemoryCache, and DiskCache loads.

  • http/tests/inspector/network/resource-timing-expected.txt:
  • http/tests/inspector/network/resource-timing.html:

Fix a typo.

  • http/tests/cache/disk-cache/resources/cache-test.js:

(loadResourcesWithOptions):
(loadResources):
Fix typos and style.

  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:

Skip disk cache tests where the disk cache is not enabled.

6:40 PM Changeset in webkit [213620] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit2

Fix -Wattributes warning spam
https://bugs.webkit.org/show_bug.cgi?id=169243

Reviewed by Alexey Proskuryakov.

  • Shared/API/c/WKDeclarationSpecifiers.h: Add WK_UNAVAILABLE macro.
  • UIProcess/API/C/WKPageGroup.h: Use it.
6:37 PM Changeset in webkit [213619] by Chris Dumez
  • 9 edits
    2 deletes in trunk

Drop support for non-standard document.all.tags()
https://bugs.webkit.org/show_bug.cgi?id=169337

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline web platform test now that one more check is passing.

  • web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection-expected.txt:

Source/WebCore:

Drop support for non-standard document.all.tags(). It is not part of the specification:

It is not supported by Firefox and its support was dropped from Chrome back in early 2014:

No new tests, updated existing test.

  • html/HTMLAllCollection.cpp:
  • html/HTMLAllCollection.h:
  • html/HTMLAllCollection.idl:

LayoutTests:

Update existing test to check that document.all.tags does not exist.

  • fast/dom/document-all-tags-expected.txt:
  • fast/dom/document-all-tags.html:
6:16 PM Changeset in webkit [213618] by commit-queue@webkit.org
  • 25 edits in trunk

Enable async image decoding for large images
https://bugs.webkit.org/show_bug.cgi?id=165039

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-03-08
Reviewed by Simon Fraser.

Source/WebCore:

Once FrameView finishes flushing compositing, it will request all its
images, which intersect with the tileCoverageRect (aka the futureRect)
of the TileController, to start asynchronously decoding their image frames.
This should improve the image first time paint and the scrolling scenarios.
It also makes the scrolling more responsive by removing the decoding step
from the main thread.

For now we are going to disable the asynchronous image decoding for the
webkit test runner because drawing the image does not block the page rendering
anymore. An image can be repainted later when its frame is ready for painting.
This can cause a test to fail because the webkit test runner may capture
an image for the page before painting all the images. The asynchronous image
decoding can to be explicitly enabled from the test page. Once the specs
of the image 'async' attribute and 'ready' event is approved, this should
be revisited. It is important to test what we ship and eventually async
image decoding should be enabled in the webkit test runner.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::willDetachRenderers):
Register/unregister the renderer of the HTMLImageElement for async image decoding
from the RenderView. I followed what HTMLMediaElement to registerForVisibleInViewportCallback().

  • html/HTMLImageElement.h:
  • page/FrameView.cpp:

(WebCore::FrameView::flushCompositingStateForThisFrame): For all the images inside
the tileCoverageRect of the TileController, request async image decoding.
(WebCore::FrameView::applyRecursivelyWithAbsoluteRect): Request the async image decoding for the
the images inside this FrameView and then recursively do the same thing for all sub FrameViews.
(WebCore::FrameView::requestAsyncDecodingForImagesInAbsoluteRect): Calls the RenderView to
make the request.
(WebCore::FrameView::requestAsyncDecodingForImagesInAbsoluteRectIncludingSubframes): Calls
applyRecursivelyWithAbsoluteRect giving an apply lambda which calls requestAsyncDecodingForImagesInAbsoluteRect.

  • page/FrameView.h:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyDecodedData): ImageSource::hasDecodingQueue() is renamed to ImageSource::hasAsyncDecodingQueue().
(WebCore::BitmapImage::dataChanged): Use String::utf8().data() instead of String::characters8().
(WebCore::BitmapImage::draw): If drawing the current frame is called while it is being
decoded, draw the the image if the current frame was decoded but for a different size
and and will not invoke decoding while painting. If the frame is being decoded and there
isn't a decoded frame, return without drawing but set a flag that that this image needs
a repaint.
(WebCore::BitmapImage::internalStartAnimation): Use String::utf8().data() instead of String::characters8().
(WebCore::BitmapImage::advanceAnimation): Ditto.
(WebCore::BitmapImage::internalAdvanceAnimation): Ditto.
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): Now this callback can be
called form the ImageFrameCache when finishing a frame of an animated image or the
frame of a large image. For large images, we need to call CachedImage::changedInRect()
if this image needs a repaint. If the decoding queue is idle, we should close it.
(WebCore::BitmapImage::requestAsyncDecoding): This is called form
RenderView::requestAsyncDecodingForImagesInRect().

  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:

(WebCore::Image::requestAsyncDecoding): Add the default implementation of a virtual function.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::~ImageFrameCache): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
(WebCore::ImageFrameCache::decodingQueue): Change the QNS of the decoding thread to be WorkQueue::QOS::Default.
WorkQueue::QOS::UserInteractive causes the scrolling thread to preempted which can make the scrolling choppy.
(WebCore::ImageFrameCache::startAsyncDecodingQueue): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Ditto.
(WebCore::ImageFrameCache::isAsyncDecodingQueueIdle): A helper function to tell whether the decoding thread is idle.
(WebCore::ImageFrameCache::stopAsyncDecodingQueue): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().

  • platform/graphics/ImageFrameCache.h:

(WebCore::ImageFrameCache::hasAsyncDecodingQueue): Rename this function to be consistent with the rest of the functions.
(WebCore::ImageFrameCache::hasDecodingQueue): Deleted.

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::hasAsyncDecodingQueue): hasDecodingQueue() was renamed to hasAsyncDecodingQueue().
(WebCore::ImageSource::isAsyncDecodingQueueIdle): A wrapper for ImageFrameCache::isAsyncDecodingQueueIdle().
(WebCore::ImageSource::hasDecodingQueue): Deleted.

  • platform/graphics/TiledBacking.h: Fix a comment. tileGridExtent() is the only one that is used for testing.
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::intersectsAbsoluteRect): Make this function does what shouldRepaintForImageAnimation()
was doing expect the check for document.activeDOMObjectsAreSuspended().
(WebCore::RenderElement::newImageAnimationFrameAvailable): Replace the call to
shouldRepaintForImageAnimation() by checking document().activeDOMObjectsAreSuspended() then a call to
RenderElement::intersectsAbsoluteRect().
(WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded): Ditto.
(WebCore::RenderElement::registerForAsyncImageDecodingCallback): Call the RenderView to register the renderer..
(WebCore::RenderElement::unregisterForAsyncImageDecodingCallback): Call the RenderView to unregister the renderer..
(WebCore::shouldRepaintForImageAnimation): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::setIsRegisteredForAsyncImageDecodingCallback):

  • rendering/RenderObject.h:

(WebCore::RenderObject::isRegisteredForAsyncImageDecodingCallback):
(WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
Mark/unmark the renderer for being RegisteredForAsyncImageDecodingCallback.

  • rendering/RenderReplaced.h: Make intrinsicSize() be a public function.
  • rendering/RenderView.cpp:

(WebCore::RenderView::registerForAsyncImageDecodingCallback): Register a renderer for async image decoding.
(WebCore::RenderView::unregisterForAsyncImageDecodingCallback): Remove a renderer from the list of async image decoding.
(WebCore::RenderView::requestAsyncDecodingForImagesInAbsoluteRect):This loops through all the registered RenderImages
inside this RenderView and if any of them intersects with the rectangle, requestAsyncDecoding for it.

  • rendering/RenderView.h:

Source/WebKit2:

Add WK2 preferences for setting/getting LargeImageAsyncDecoding and
AnimatedImageAsyncDecoding.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetLargeImageAsyncDecodingEnabled):
(WKPreferencesGetLargeImageAsyncDecodingEnabled):
(WKPreferencesSetAnimatedImageAsyncDecodingEnabled):
(WKPreferencesGetAnimatedImageAsyncDecodingEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Tools:

Disable LargeImageAsyncDecoding for DRT/WTR.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

6:13 PM Changeset in webkit [213617] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: add a "create breakpoint" context menu item for linkified source locations
https://bugs.webkit.org/show_bug.cgi?id=47442

Patch by Devin Rousso <Devin Rousso> on 2017-03-08
Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WebInspector.isShowingResourcesTab): Added.
(WebInspector.linkifyElement):
Now calls WebInspector.appendContextMenuItemsForSourceCode on "contextmenu" events for the
created element.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.breakpointForSourceCodeLocation):
Returns the first breakpoint (since there should only be one) that matches the given location.

  • UserInterface/Views/ContextMenuUtilities.js:

(WebInspector.appendContextMenuItemsForSourceCode):
Rework parameters to also accept a WebInspector.SourceCodeLocation, thereby allowing the
setting of breakpoints so long as the associated WebInspector.SourceCode is a script.

  • UserInterface/Views/Main.css:

(.resource-link, .go-to-link):
Prevent link from being selected.

6:06 PM Changeset in webkit [213616] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Fix missing return value after r213499
https://bugs.webkit.org/show_bug.cgi?id=168198

Reviewed by Myles C. Maxfield.

  • platform/text/CharacterProperties.h:

(WebCore::isEmojiGroupCandidate):

5:47 PM Changeset in webkit [213615] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: Switching back to System Direction doesn't change the dock side
https://bugs.webkit.org/show_bug.cgi?id=169323

Patch by Devin Rousso <Devin Rousso> on 2017-03-08
Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WebInspector.setLayoutDirection):
Change the dock side based on the resolved layout direction, not the current setting value.

5:44 PM Changeset in webkit [213614] by Wenson Hsieh
  • 19 edits in trunk/Source

Add TextIndicator support for providing a snapshot excluding selected content
https://bugs.webkit.org/show_bug.cgi?id=169309
<rdar://problem/30883525>

Reviewed by Tim Horton.

Source/WebCore:

Work towards <rdar://problem/30882974>. Adds support in TextIndicator to include a snapshot of all visible
content, excluding nodes captured in the current selection. This comes in the form of the new
TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection flag -- see per-method changes for more details.

No new tests, since there is no change in behavior yet.

  • page/FrameSnapshotting.cpp:

(WebCore::snapshotFrameRectWithClip):

  • page/FrameSnapshotting.h:

Introduce a new snapshot option flag, SnapshotOptionsPaintEverythingExcludingSelection.

(WebCore::snapshotFrameRectWithClip):

  • page/TextIndicator.cpp:

If TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection is turned on, capture and include a
snapshot of the visible bounds of the frame.

(WebCore::takeSnapshot):
(WebCore::takeSnapshots):
(WebCore::initializeIndicator):

  • page/TextIndicator.h:

Introduce TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthOfTextRange):

  • platform/graphics/FontCascade.h:

Teach FontCascade to retrieve the width of a range in a TextRun, and also compute the widths of the TextRun
before and after the range. This is used by InlineTextBox to compute the painting rect to clip out when skipping
text decorations for the selected region of the TextRun.

  • rendering/InlineTextBox.cpp:

Teach InlineTextBox to respect PaintBehaviorExcludeSelection. When painting text, if this paint behavior is
used, we will not paint the portion of the text run that lies inside the range determined by selectionStartEnd().
Similarly, when painting text decorations, we exclude the rect surrounding the selected content.

(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintDecoration):

  • rendering/InlineTextBox.h:
  • rendering/PaintPhase.h:

Introduce PaintBehaviorExcludeSelection, used to inform members of the render tree not to paint portions that
lie within the current selection range.

  • rendering/RenderLayer.cpp:

Propagate the PaintBehaviorExcludeSelection flag to children when painting.

(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintForegroundForFragments):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::shouldPaint):

Teach RenderReplaced to respect PaintBehaviorExcludeSelection by bailing from painting if it is selected and the
paint behavior is enabled.

  • rendering/TextDecorationPainter.h:
  • rendering/TextPaintStyle.cpp:

(WebCore::computeTextSelectionPaintStyle):

  • rendering/TextPaintStyle.h:
  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintText):

  • rendering/TextPainter.h:

Source/WebKit2:

Serialize the snapshot excluding the selection and the snapshot's bounds when sending TextIndicatorData over
IPC to the UI process.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):

5:35 PM Changeset in webkit [213613] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
https://bugs.webkit.org/show_bug.cgi?id=169389

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-08
Reviewed by Eric Carlson.

Temporary fix to support appr.tc web site.
A future patch should allow to set MaxBundle.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration):

5:31 PM Changeset in webkit [213612] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.9/Source/WebKit2

Merge r213611. rdar://problem/30930190

5:28 PM Changeset in webkit [213611] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

REGRESSION(r213564): Netflix does not play content
https://bugs.webkit.org/show_bug.cgi?id=169391
<rdar://problem/30930190>

Reviewed by Alex Christensen.

Add the missing IOKit properties identified during testing on Netflix.

  • WebProcess/com.apple.WebProcess.sb.in:
5:24 PM Changeset in webkit [213610] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r212998): Web Inspector: DetailsSections with options have broken layout
https://bugs.webkit.org/show_bug.cgi?id=169350

Reviewed by Brian Burg.

  • UserInterface/Views/DetailsSection.css:

(.details-section):
Fix negative margin.
(body[dir=ltr] .details-section > .header > :matches(label, .node-link, .go-to-arrow),):
(body[dir=ltr] .details-section > .header::before,):
(body[dir=ltr] .details-section > .header > :matches(label, .node-link, .go-to-arrow, .options > .navigation-bar),): Deleted.
It looks like :matches doesn't accept compound selectors in its selector list.

4:43 PM Changeset in webkit [213609] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Clean up WebPaymentCoordinatorProxy
https://bugs.webkit.org/show_bug.cgi?id=169393
Part of rdar://problem/28880714.

Reviewed by Beth Dakin.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewControllerDidFinish:]):
Move this to where it belongs.

(WebKit::toPKPaymentSummaryItems):
Add a new helper function.

(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
Use the new helper function.

4:34 PM Changeset in webkit [213608] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

4:30 PM Changeset in webkit [213607] by Chris Dumez
  • 8 edits
    2 adds in trunk

Drop select.remove() / options.remove() overloads taking an option element in parameter
https://bugs.webkit.org/show_bug.cgi?id=169339

Reviewed by Sam Weinig.

Source/WebCore:

Drop select.remove() / options.remove() overloads taking an option element in parameter.
It is non-standard:

It is not supported by Firefox and was removed from Chrome:

Chrome UseCounter data shows consistent 0% usage:

Test: fast/dom/HTMLSelectElement/remove-option-element.html

  • html/HTMLOptionsCollection.cpp:
  • html/HTMLOptionsCollection.h:
  • html/HTMLOptionsCollection.idl:
  • html/HTMLSelectElement.cpp:
  • html/HTMLSelectElement.h:
  • html/HTMLSelectElement.idl:

LayoutTests:

Add layout test coverage.

  • fast/dom/HTMLSelectElement/remove-option-element-expected.txt: Added.
  • fast/dom/HTMLSelectElement/remove-option-element.html: Added.
4:30 PM Changeset in webkit [213606] by Chris Dumez
  • 12 edits
    2 adds in trunk

Parameter to input.setCustomValidity() should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=169332

Reviewed by Sam Weinig.

Source/WebCore:

Parameter to input.setCustomValidity() should not be nullable:

Firefox and Chrome agree with the specification so the change
should be safe.

Test: fast/forms/setCustomValidity-null-parameter.html

  • html/HTMLButtonElement.idl:
  • html/HTMLFieldSetElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLKeygenElement.idl:
  • html/HTMLObjectElement.idl:
  • html/HTMLOutputElement.idl:
  • html/HTMLSelectElement.idl:
  • html/HTMLTextAreaElement.idl:

LayoutTests:

  • fast/forms/ValidityState-customError-expected.txt:
  • fast/forms/ValidityState-customError.html:

Rebaseline now that behavior has changed when passing null or undefined
to setCustomValidity().

  • fast/forms/setCustomValidity-null-parameter-expected.txt: Added.
  • fast/forms/setCustomValidity-null-parameter.html: Added.

Add layout test coverage.

4:21 PM Changeset in webkit [213605] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Use H264 hardware encoder for Mac libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=169383

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-08
Reviewed by Alex Christensen.

Switching to H264 hardware encoder if available for Mac.
Adding logs in case hardware encoder cannot be used.

  • Configurations/libwebrtc.xcconfig:
  • Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm:

(webrtc::H264VideoToolboxEncoder::ResetCompressionSession):
(webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession):

4:12 PM Changeset in webkit [213604] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/airplay-button/airplay-button.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=168409

Unreviewed test gardening.

3:50 PM Changeset in webkit [213603] by Simon Fraser
  • 12 edits
    2 adds in trunk

Support transitions/animations of background-position with right/bottom-relative values
https://bugs.webkit.org/show_bug.cgi?id=162048

Reviewed by Dean Jackson.
Source/WebCore:

Make transitions between "background-position: 10px 20px" and "background-position: right 10px bottom 20px"
work. We do this by by converting "right 10px" to "calc(100% - 10px)" when blending.

Also improve logging of calculated lengths, and better animation logging for FillLayer properties.

Test: transitions/background-position-transitions.html

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase): Keep the propertyID
around so logging can use it.
(WebCore::FillLayerAnimationPropertyWrapperBase::property):
(WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
(WebCore::FillLayerPropertyWrapperGetter::value):
(WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
(WebCore::createCalculatedLength):
(WebCore::FillLayerPositionPropertyWrapper::FillLayerPositionPropertyWrapper):
(WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
(WebCore::CSSPropertyAnimation::blendProperties): Blend then log, so that the logging
can show the result.

  • platform/CalculationValue.cpp:

(WebCore::CalcExpressionNumber::dump):
(WebCore::CalcExpressionBinaryOperation::dump):
(WebCore::CalcExpressionLength::dump):
(WebCore::CalcExpressionBlendLength::dump):
(WebCore::operator<<):

  • platform/CalculationValue.h:
  • platform/Length.cpp:

(WebCore::operator<<):

LayoutTests:

  • transitions/background-position-transitions-expected.txt: Added.
  • transitions/background-position-transitions.html: Added.
  • transitions/resources/transition-test-helpers.js:
  • transitions/svg-transitions-expected.txt:
3:31 PM Changeset in webkit [213602] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[Mac][WK2] Whitelist a local cache needed by CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=169388
<rdar://problem/30224000>

Reviewed by Alex Christensen.

Whitelist access to a local cache needed by CFNetwork.

  • WebProcess/com.apple.WebProcess.sb.in:
2:56 PM Changeset in webkit [213601] by andersca@apple.com
  • 23 edits in trunk/Source

Simplify the PaymentCoordinator interface
https://bugs.webkit.org/show_bug.cgi?id=169382
Part of rdar://problem/28880714.

Reviewed by Tim Horton.

Source/WebCore:

Add four new structs: PaymentAuthorizationResult, PaymentMethodUpdate, ShippingContactUpdate and ShippingMethodUpdate.
Change the various PaymentCoordinator and PaymentCoordinatorClient functions to take these new objects instead of multiple parameters.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
(WebCore::ApplePaySession::completePayment):
(WebCore::ApplePaySession::didSelectShippingMethod):
(WebCore::ApplePaySession::didSelectShippingContact):

  • Modules/applepay/PaymentAuthorizationStatus.h:
  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::completeShippingMethodSelection):
(WebCore::PaymentCoordinator::completeShippingContactSelection):
(WebCore::PaymentCoordinator::completePaymentMethodSelection):
(WebCore::PaymentCoordinator::completePaymentSession):

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.h:
  • Modules/applepay/PaymentRequest.h:
  • loader/EmptyClients.cpp:

Source/WebKit/mac:

Update for PaymentCoordinatorClient changes.

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::completeShippingMethodSelection):
(WebPaymentCoordinatorClient::completeShippingContactSelection):
(WebPaymentCoordinatorClient::completePaymentMethodSelection):
(WebPaymentCoordinatorClient::completePaymentSession):

Source/WebKit2:

Send the new structs over the wire to the UI process and update the various proxy object to take them instead of
multiple parameters.

  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::PaymentAuthorizationResult>::encode):
(IPC::ArgumentCoder<WebCore::PaymentAuthorizationResult>::decode):
(IPC::ArgumentCoder<WebCore::PaymentError>::encode):
(IPC::ArgumentCoder<WebCore::PaymentError>::decode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::encode):
(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
(IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::encode):
(IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::completeShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::completeShippingContactSelection):
(WebKit::WebPaymentCoordinatorProxy::completePaymentMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::completePaymentSession):
(WebKit::isValidEnum): Deleted.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::completeShippingMethodSelection):
(WebKit::WebPaymentCoordinator::completeShippingContactSelection):
(WebKit::WebPaymentCoordinator::completePaymentMethodSelection):
(WebKit::WebPaymentCoordinator::completePaymentSession):

  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Source/WTF:

  • wtf/EnumTraits.h:

Fix a build warning.

2:53 PM Changeset in webkit [213600] by Simon Fraser
  • 4 edits
    3 adds in trunk

Change determineNonLayerDescendantsPaintedContent to max out based on renderers traversed
https://bugs.webkit.org/show_bug.cgi?id=169384

Reviewed by Zalan Bujtas.

Source/WebCore:

determineNonLayerDescendantsPaintedContent() would bail after depth 3, sibling count 20. However,
empirical testing shows that it would run to completion more often if the limit was based on the
number of nodes traversed (in particular, it's common to see fairly deep subtrees with few siblings).
Running to completion has huge memory advantages, because we can then be sure to have checked all the
renderers for smoothed text, allowing us, on some pages, to avoid the extra memory cost of using
layers that support subpixel-antialiased text.

Performance measurement shows that mean runtime of this function goes up from 0.30us to 0.34us
with a 200 renderer limit, which seems worthwhile.

Test: compositing/contents-format/subpixel-antialiased-text-traversal.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

Rebaseline an existing test which changes behavior, and add a new test that generates divs
on both sides of the threshold, in depth and breadth.

  • compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: Added.
  • compositing/contents-format/subpixel-antialiased-text-traversal.html: Added.
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt:
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-traversal-expected.txt: Added.
2:50 PM Changeset in webkit [213599] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

WebAssembly: Make OOB for fast memory do an extra safety check by ensuring the faulting address is in the range we allocated for fast memory
https://bugs.webkit.org/show_bug.cgi?id=169290

Reviewed by Saam Barati.

This patch adds an extra sanity check by ensuring that the the memory address we faulting trying to load is in range
of some wasm fast memory.

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):
(JSC::Wasm::enableFastMemory):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::activeFastMemories):
(JSC::Wasm::viewActiveFastMemories):
(JSC::Wasm::tryGetFastMemory):
(JSC::Wasm::releaseFastMemory):

  • wasm/WasmMemory.h:
2:44 PM Changeset in webkit [213598] by commit-queue@webkit.org
  • 22 edits
    1 copy
    30 adds in trunk

Support canvas captureStream
https://bugs.webkit.org/show_bug.cgi?id=169192

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-08
Reviewed by Dean Jackson.

Source/WebCore:

Tests: fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events.html

fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-clone-track.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-creation.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-exceptions.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-offscreencanvas.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-request-frame-events.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html

Adding canvas captureStream as defined in https://w3c.github.io/mediacapture-fromelement/#html-canvas-element-media-capture-extensions
This allows creating a video MediaStreamTrack fed by canvas taken frames.
Frames are produced when canvas get changed.

Tests taken from Chromium.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: Added.

(WebCore::CanvasCaptureMediaStreamTrack::create):
(WebCore::CanvasCaptureMediaStreamTrack::CanvasCaptureMediaStreamTrack):
(WebCore::CanvasCaptureMediaStreamTrack::Source::create):
(WebCore::CanvasCaptureMediaStreamTrack::Source::Source):
(WebCore::CanvasCaptureMediaStreamTrack::Source::startProducingData):
(WebCore::CanvasCaptureMediaStreamTrack::Source::stopProducingData):
(WebCore::CanvasCaptureMediaStreamTrack::Source::requestFrameTimerFired):
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasDestroyed):
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
(WebCore::CanvasCaptureMediaStreamTrack::Source::captureCanvas):
(WebCore::CanvasCaptureMediaStreamTrack::Source::paintCurrentFrameInContext):
(WebCore::CanvasCaptureMediaStreamTrack::Source::currentFrameImage):

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h: Added.

(isType):

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.idl: Added.
  • Modules/mediastream/MediaStreamTrack.h:

(WebCore::MediaStreamTrack::isCanvas):

  • Modules/mediastream/MediaStreamTrack.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSMediaStreamTrackCustom.cpp:

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toMediaSample):
(WebCore::HTMLCanvasElement::captureStream):

  • html/HTMLCanvasElement.h:
  • html/HTMLCanvasElement.idl:
  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::clear):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::markContextChangedAndNotifyCanvasObserver):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
(WebCore::WebGLRenderingContextBase::drawArraysInstanced):
(WebCore::WebGLRenderingContextBase::drawElementsInstanced):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::toBGRAData):

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/avfoundation/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::releaseUint8Vector):
(WebCore::MediaSampleAVFObjC::createImageSample):

  • platform/graphics/cg/ImageBufferCG.cpp:
  • platform/graphics/cg/ImageBufferDataCG.cpp:

(WebCore::transferData):
(WebCore::ImageBufferData::toBGRAData):

  • platform/graphics/cg/ImageBufferDataCG.h:

LayoutTests:

  • fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-clone-track-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-clone-track.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-creation-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-creation.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-exceptions-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-exceptions.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-offscreencanvas-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-offscreencanvas.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-request-frame-events-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-request-frame-events.html: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt: Added.
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html: Added.
  • fast/mediacapturefromelement/resources/svg-with-image-with-foreignobject.svg: Added.
  • fast/mediacapturefromelement/resources/webgl-test.js: Added.
2:14 PM Changeset in webkit [213597] by andersca@apple.com
  • 7 edits in trunk/Source/WebCore

Use the new code path when dragging web contents
https://bugs.webkit.org/show_bug.cgi?id=169298

Reviewed by Beth Dakin.

  • editing/Editor.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::writeSelection):
Add a new function that writes the selection to a writer object.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):
Use the new writeSelection if mustUseLegacyDragClient is false.

  • platform/PasteboardWriterData.cpp:

(WebCore::PasteboardWriterData::WebContent::WebContent):
(WebCore::PasteboardWriterData::WebContent::~WebContent):
(WebCore::PasteboardWriterData::setWebContent):

  • platform/PasteboardWriterData.h:

Add getters and setters.

  • platform/mac/PasteboardWriter.mm:

(WebCore::toUTIUnlessAlreadyUTI):
Add a helper.

(WebCore::createPasteboardWriter):
Convert web content to pasteboard types.

2:10 PM Changeset in webkit [213596] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 25

Added a tag for Safari Technology Preview release 25.

1:56 PM Changeset in webkit [213595] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168409

Patch by Antoine Quint <Antoine Quint> on 2017-03-08
Reviewed by Dean Jackson.

Adding more detailed assertions to try to understand where the timeouts might be coming from.

  • media/modern-media-controls/airplay-button/airplay-button-expected.txt:
  • media/modern-media-controls/airplay-button/airplay-button.html:
1:42 PM Changeset in webkit [213594] by Megan Gardner
  • 2 edits in trunk/Source/WebKit/mac

Fix for dependency fix
https://bugs.webkit.org/show_bug.cgi?id=169369

Reviewed by Beth Dakin.

  • WebView/WebViewPrivate.h:
1:11 PM Changeset in webkit [213593] by hyatt@apple.com
  • 9 edits
    12 deletes in trunk

CSS Multicolumn should not clip columns horizontally
https://bugs.webkit.org/show_bug.cgi?id=169363

Reviewed by Sam Weinig.

Source/WebCore:

Revised multiple tests in fast/multicol.

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
Stop clipping horizontally. Section 8.1 of the spec changed from "clip" to "don't clip",
so we're changing to match the latest draft. Keep iBooks-based pagination clipping though.

LayoutTests:

  • fast/multicol/newmulticol/adjacent-spanners-expected.html:
  • fast/multicol/newmulticol/adjacent-spanners.html:
  • fast/multicol/newmulticol/clipping-expected.html:
  • fast/multicol/newmulticol/clipping.html:
  • fast/multicol/newmulticol/spanner-inline-block-expected.html:
  • fast/multicol/newmulticol/spanner-inline-block.html:
12:39 PM Changeset in webkit [213592] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

Remove the trace command from the sandbox profile.

  • WebProcess/com.apple.WebProcess.sb.in: Unreviewed.
12:36 PM Changeset in webkit [213591] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

REGRESSION(r212904): [WK2][Mac] Revise sandbox to support AES3
https://bugs.webkit.org/show_bug.cgi?id=169361
<rdar://problem/30927476>

Unreviewed sandbox revert. Avoid web compatibility issue by
restoring access to AES3 Plugin path.

Tests: Existing media tests, on older Mac hardware.

  • WebProcess/com.apple.WebProcess.sb.in:
12:01 PM Changeset in webkit [213590] by Simon Fraser
  • 42 edits
    7 adds in trunk

Add support for history.scrollRestoration
https://bugs.webkit.org/show_bug.cgi?id=147782
rdar://problem/22614568

Reviewed by Sam Weinig.
LayoutTests/imported/w3c:

New passing baselines.

  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic-expected.txt:
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin-expected.txt:
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin-expected.txt:
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc-expected.txt:

Source/WebCore:

Add support for history.scrollRestoration, per spec:
<https://html.spec.whatwg.org/multipage/browsers.html#dom-history-scroll-restoration>

This is a new attribute on the History interface. On setting, sets the "shouldRestoreScrollPosition"
state on the current history item, and the getter returns that state. pushState() inherits the
state from the current item.

HistoryController::restoreScrollPositionAndViewState() consults this state, and if set to "manual"
("don't restore) it just uses the current scroll position (we need something to pass to
setPageScaleFactor() so can't just avoid the restoration).

FrameLoader::scrollToFragmentWithParentBoundary() also needs to consult the historyItem
to know if it's OK to scroll to a fragment, on back/forward same-document loads.

Tests: fast/history/history-scroll-restoration-attribute.html

fast/history/history-scroll-restoration.html

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::shouldRestoreScrollPosition):
(WebCore::HistoryItem::setShouldRestoreScrollPosition):

  • history/HistoryItem.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadInSameDocument):
(WebCore::itemAllowsScrollRestoration):
(WebCore::isSameDocumentReload):
(WebCore::FrameLoader::scrollToFragmentWithParentBoundary):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):

  • loader/FrameLoader.h:
  • loader/HistoryController.cpp:

(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):

  • page/History.cpp:

(WebCore::History::scrollRestoration):
(WebCore::History::setScrollRestoration):

  • page/History.h:
  • page/History.idl:

Source/WebKit2:

Need to send shouldRestoreScrollPosition to the UI process in SessionState,
WKWebView now stores _unobscuredCenterToRestore and _scrollOffsetToRestore as
std::optionals, and they will be nullopt if scroll restoration should not happen.

ViewGestureControllerIOS also needs knowledge of whether scroll restoration will
happen, and compares UI-process scroll position vs. the position at snapshot time
to know if the snapshot should be shown (this prevents showing a misleading snapshot
when swiping back on a navigation where scroll restoration is disabled).

  • Shared/SessionState.cpp:

(WebKit::FrameState::encode):
(WebKit::FrameState::decode):

  • Shared/SessionState.h:
  • Shared/WebBackForwardListItem.h:

(WebKit::WebBackForwardListItem::pageState):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _restorePageScrollPosition:scrollOrigin:previousObscuredInset:scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::viewScrollPosition):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::viewScrollPosition):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::viewScrollPosition):
(WebKit::PageClientImpl::restorePageState):
(WebKit::PageClientImpl::restorePageCenterAndScale):

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::restorePageState):
(WebKit::WebPageProxy::restorePageCenterAndScale):

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::viewScrollPosition):

  • UIProcess/mac/ViewSnapshotStore.h:

(WebKit::ViewSnapshot::setViewScrollPosition):
(WebKit::ViewSnapshot::viewScrollPosition):

  • UIProcess/mac/ViewSnapshotStore.mm:

(WebKit::ViewSnapshotStore::recordSnapshot):

  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFrameState):
(WebKit::applyFrameState):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::restoreViewState):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::restorePageState):

LayoutTests:

Sadly history-scroll-restoration.html needs to be cloned for iOS and to use uiController.doAfterPresentationUpdate()
there, since restoration involves a trip to the UI process, and this same test did not work for Mac WK1 (dispatch_async()
doesn't seem to give the right timing in DRT).

  • TestExpectations:
  • fast/dom/Window/window-appendages-cleared-expected.txt:
  • fast/history/history-scroll-restoration-attribute-expected.txt: Added.
  • fast/history/history-scroll-restoration-attribute.html: Added.
  • fast/history/history-scroll-restoration-expected.txt: Added.
  • fast/history/history-scroll-restoration.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
11:52 AM Changeset in webkit [213589] by Chris Dumez
  • 4 edits
    2 adds in trunk

[iOS] Throttle DOM timers to 30fps in low power mode
https://bugs.webkit.org/show_bug.cgi?id=169213
<rdar://problem/30876965>

Reviewed by Simon Fraser.

Source/WebCore:

Throttle and align DOM timers to ~30fps in low power mode on iOS
to save battery.

Test: fast/dom/timer-throttling-lowPowerMode.html

  • page/DOMTimer.h:
  • page/Page.cpp:

(WebCore::Page::handleLowModePowerChange):
(WebCore::Page::updateDOMTimerAlignmentInterval):

LayoutTests:

Add layout test coverage.

  • fast/dom/timer-throttling-lowPowerMode-expected.txt: Added.
  • fast/dom/timer-throttling-lowPowerMode.html: Added.
11:03 AM Changeset in webkit [213588] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Update outdated comment about HTMLElement.dropzone
https://bugs.webkit.org/show_bug.cgi?id=169338

Reviewed by Sam Weinig.

Update outdated comment about HTMLElement.dropzone since it was dropped
from the HTML specification:

Also add comment about HTMLElement.webkitdropzone since Blink dropped
it in:

  • html/HTMLElement.idl:
10:55 AM Changeset in webkit [213587] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark editing/selection/move-by-word-visually-multi-space.html as flaky on Sierra Debug WK2.
https://bugs.webkit.org/show_bug.cgi?id=168346

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:48 AM Changeset in webkit [213586] by mrajca@apple.com
  • 5 edits in trunk

Add support for updating autoplay policies after a page has been loaded.
https://bugs.webkit.org/show_bug.cgi?id=169360

Reviewed by Alex Christensen.

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateWebsitePolicies):

Tools:

  • TestWebKitAPI/Tests/WebKit2/autoplay-check.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:

(TEST):

10:48 AM Changeset in webkit [213585] by mrajca@apple.com
  • 3 edits in trunk/Source/WebCore

Add support for an autoplay play-pause events quirk.
https://bugs.webkit.org/show_bug.cgi?id=169235

Reviewed by Jer Noble.

For sites that assume media starts off playing, send a playing and pause event to trigger
custom media controls to update.

  • html/HTMLMediaElement.cpp:

(WebCore::needsAutoplayPlayPauseEventsQuirk):
(WebCore::HTMLMediaElement::dispatchPlayPauseEventsIfNeedsQuirks):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):

  • html/HTMLMediaElement.h:
10:33 AM Changeset in webkit [213584] by timothy_horton@apple.com
  • 13 edits
    2 adds in trunk/Source/WebKit2

Switching focus from a UITextField to an editable WKWebView causes the keyboard to dance
https://bugs.webkit.org/show_bug.cgi?id=168932
<rdar://problem/30193996>

Reviewed by Beth Dakin.

When WKWebView first becomes first responder from a tap, we don't have
enough information to immediately respond accurately to various questions
from UIKit, because we haven't had time to ask the Web Content process
what is under the touch. Defer updating input views until we get a
response or lose first responder status, so that the keyboard doesn't
start transitioning to its new state until we know what that is.

There is currently no test because TestWebKitAPI has no UIApplication,
and thus cannot generate mock events.

  • Platform/spi/ios/UIKitSPI.h:
  • WebKit2.xcodeproj/project.pbxproj:
  • UIProcess/ios/InputViewUpdateDeferrer.h: Added.
  • UIProcess/ios/InputViewUpdateDeferrer.mm: Added.

Add an RAII object that defers input view updates while alive.

  • UIProcess/ios/WKContentView.mm:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]):
(-[WKContentView _commitPotentialTapFailed]):
(-[WKContentView _didNotHandleTapAsClick:]):
(-[WKContentView _didCompleteSyntheticClick]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
Create a InputViewUpdateDeferrer just before we become first responder
from a tap, and destroy it when we get a response (of any kind) or lose
first-responder status (or interaction is torn down).

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didCompleteSyntheticClick):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCompleteSyntheticClick):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::completeSyntheticClick):
Plumb an indication that the synthetic click completed, regardless of
how it was handled.

10:22 AM Changeset in webkit [213583] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.9

Tag Safari-604.1.9.

10:19 AM Changeset in webkit [213582] by Megan Gardner
  • 2 edits in trunk/Source/WebKit/mac

Fix Project Dependency
https://bugs.webkit.org/show_bug.cgi?id=169340

Unreviewed Dependency Fix.

  • WebView/WebViewPrivate.h:
10:15 AM Changeset in webkit [213581] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=169359

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:09 AM Changeset in webkit [213580] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/track/media-element-enqueue-event-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169324

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:09 AM Changeset in webkit [213579] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=167589

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:09 AM Changeset in webkit [213578] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/play-pause-button/play-pause-button.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=167447

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:50 AM Changeset in webkit [213577] by Jonathan Bedard
  • 9 edits in trunk/Tools

Unreviewed, rolling out r213545.

iOS EWS broken by this change

Reverted changeset:

"Standardize device/simulator naming conventions"
https://bugs.webkit.org/show_bug.cgi?id=169083
http://trac.webkit.org/changeset/213545

9:44 AM Changeset in webkit [213576] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebKit2

[WK2] Guard GLib-specific code in Module, Connection files with USE(GLIB)
https://bugs.webkit.org/show_bug.cgi?id=169349

Reviewed by Carlos Garcia Campos.

Use the USE(GLIB) build guards for GLib-specific code in Connection and
Module header files and the ConnectionUnix implementation file, instead
of the PLATFORM(GTK) guard.

  • Platform/IPC/Connection.h:
  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::platformInitialize):
(IPC::Connection::platformInvalidate):
(IPC::Connection::open):
(IPC::Connection::sendOutputMessage):

  • Platform/Module.h:
9:43 AM Changeset in webkit [213575] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

MediaPlayerPrivateGStreamerBase::volume() should override the MediaPlayerPrivate method
https://bugs.webkit.org/show_bug.cgi?id=169347

Reviewed by Carlos Garcia Campos.

Enable the MediaPlayerPrivate::volume() method for the USE(GSTREAMER) configuration
and override it in the MediaPlayerPrivateGStreamerBase class.

  • platform/graphics/MediaPlayerPrivate.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
9:10 AM Changeset in webkit [213574] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[mac-wk2 Debug] LayoutTest webrtc/libwebrtc/descriptionGetters.html is failing
https://bugs.webkit.org/show_bug.cgi?id=169317

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-08

  • platform/mac-wk2/TestExpectations: Removing failure expectation.
  • webrtc/libwebrtc/descriptionGetters.html: Fixing paths.
8:37 AM Changeset in webkit [213573] by Jon Davis
  • 2 edits in trunk/PerformanceTests

Fixed ARES-6 animations for other browsers

4:49 AM Changeset in webkit [213572] by eocanha@igalia.com
  • 6 edits in trunk/Source/WebCore

[GStreamer][MSE] Actually implement flush() on playback pipeline
https://bugs.webkit.org/show_bug.cgi?id=169202

Reviewed by Žan Doberšek.

  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Added GRefPtr support for GstQuery.

(WTF::adoptGRef):
(WTF::refGPtr<GstQuery>):
(WTF::derefGPtr<GstQuery>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h: Ditto.
  • platform/graphics/gstreamer/GUniquePtrGStreamer.h: Added GUniquePtr support for GstSegment.
  • platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:

(WebCore::MediaSourceClientGStreamerMSE::flush): Only actually flush in the non-seek case. For the seek case,
GStreamer seek will already do the flush.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::addSourceBuffer): Configure appsrc to be time-based instead of bytes-based to ensure
that the segments it produces are time-based.
(WebCore::segmentFixerProbe): This captures the next segment in the stream and "fixes" its base time by setting
it to the start time. This prevent audio/video desynchronizations.
(WebCore::PlaybackPipeline::flush): Really implement flushing by sending flush start/stop events, reconfiguring
appsrc with a new (seamless) segment (so it reconfigures the rest of the elements in that stream), and attached
a segmentFixerProbe to fix the segment emitted by basesrc (appsrc). The current pipeline position is used as
start time used for the new segment. This prevents displaying samples already displayed before flushing, while
allowing the decoder to decode them as a base for future (dependent) p-frame and b-frame samples.

2:34 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
ShareableSurface was renamed to WebCoordinatedSurface (diff)
1:35 AM Changeset in webkit [213571] by timothy_horton@apple.com
  • 9 edits in trunk/Source/WebKit2

Remove unused WebPageIOS::zoomToRect and plumbing
https://bugs.webkit.org/show_bug.cgi?id=169344

Reviewed by Alex Christensen.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::zoomToRect): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::zoomToRect): Deleted.

1:15 AM Changeset in webkit [213570] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

UIViewController with WKWebView presented modally causes the presented UIViewController to be dismissed.
https://bugs.webkit.org/show_bug.cgi?id=165225

Patch by Brad Wright <bwright2@apple.com> on 2017-03-08
Reviewed by Wenson Hsieh.

The problem happens on an iPhone with a WKWebView inside a view controller presented modally. If the user selects an HTML file input
tag button, a UIDocumentMenuViewController will appear. Anything the user does next causes the entire modal view controller to get dismissed.

To fix this problem, I prevent the UIDocumentMenuViewController from being dismissed by not saving a pointer to it. The UIDocumentMenuViewController
always goes away by itself on any user interaction. Trying to dismiss the UIDocumentMenuViewController when it is already dismissed causes the modal view controller
to be dismissed.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel _cancel]):
(-[WKFileUploadPanel dismiss]):
(-[WKFileUploadPanel _showDocumentPickerMenu]):
(-[WKFileUploadPanel _presentMenuOptionForCurrentInterfaceIdiom:]):
(-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]): Deleted.

Mar 7, 2017:

11:52 PM Changeset in webkit [213569] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

WebKit should not export dyld install name hints on watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=169342

Reviewed by Dan Bernstein.

  • Shared/API/Cocoa/WebKit.m:
11:32 PM Changeset in webkit [213568] by ap@apple.com
  • 2 edits in trunk/Source/WebKit/mac

WebKitLegacy should re-export symbols from WebCore on watchos and tvos
https://bugs.webkit.org/show_bug.cgi?id=169341
<rdar://problem/30913788>

Reviewed by Dan Bernstein.

  • MigrateHeaders.make:
10:06 PM Changeset in webkit [213567] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Remove never-implemented CSS3 text decoration-related properties
https://bugs.webkit.org/show_bug.cgi?id=169009

Reviewed by Zalan Bujtas.

The following CSS properties were added many years ago based on an old CSS3 Text
draft (https://www.w3.org/TR/2003/CR-css3-text-20030514/), but never had any implementations.
Remove them.

text-line-through
text-line-through-color
text-line-through-mode
text-line-through-style
text-line-through-width
text-overline
text-overline-color
text-overline-mode
text-overline-style
text-overline-width
text-underline
text-underline-color
text-underline-mode
text-underline-style
text-underline-width

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSProperties.json:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isKeywordPropertyID):

9:46 PM Changeset in webkit [213566] by Simon Fraser
  • 30 edits in trunk

Have fixedPositionCreatesStackingContext be on by default everywhere
https://bugs.webkit.org/show_bug.cgi?id=169334

Reviewed by Zalan Bujtas.

It makes no sense to have web-exposed CSS functionality be different based on setting,
and other browser are now aligned with having position:fixed create stacking context.

So remove the fixedPositionCreatesStackingContext setting and have StyleResolver::adjustRenderStyle()
always force stacking context for position:fixed.

Source/WebCore:

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):

  • page/Settings.cpp:
  • page/Settings.in:

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setUseFixedLayout):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

LayoutTests:

  • compositing/absolute-inside-out-of-view-fixed.html:
  • compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html:
  • compositing/layer-creation/fixed-overlap-extent-rtl.html:
  • compositing/layer-creation/fixed-overlap-extent.html:
  • compositing/layer-creation/fixed-position-change-out-of-view-in-view.html:
  • compositing/layer-creation/fixed-position-in-view-dynamic.html:
  • compositing/layer-creation/fixed-position-out-of-view-dynamic.html:
  • compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html:
  • compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html:
  • compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html:
  • compositing/layer-creation/fixed-position-out-of-view-scaled.html:
  • compositing/layer-creation/fixed-position-transformed-into-view.html:
  • compositing/layer-creation/fixed-position-transformed-outside-view.html:
  • compositing/layer-creation/no-compositing-for-fixed-position-under-transform.html:
  • compositing/repaint/scroll-fixed-layer-no-content.html:
  • compositing/repaint/scroll-fixed-layer-out-of-view.html:
  • fast/block/positioning/fixed-position-stacking-context2.html:
  • fullscreen/full-screen-fixed-pos-parent.html:
9:18 PM Changeset in webkit [213565] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: DOM Tree broken if an element has a "debounce" attribute
https://bugs.webkit.org/show_bug.cgi?id=169336
<rdar://problem/30899430>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-03-07
Reviewed by Brian Burg.

  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.getAttribute):
(WebInspector.DOMNode.prototype.removeAttribute.mycallback):
(WebInspector.DOMNode.prototype.removeAttribute):
Convert the attributes map to an actual Map to avoid name collisions
with Object.prototype properties.

8:49 PM Changeset in webkit [213564] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit2

[Mac][WK2] Whitelist iokit-get-properties
https://bugs.webkit.org/show_bug.cgi?id=169331
<rdar://problem/16363632>

Reviewed by Alex Christensen.

Block access to all IOKit properties by default. Turn on only those properties
that are actually needed by our engine.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
7:54 PM Changeset in webkit [213563] by commit-queue@webkit.org
  • 17 edits in trunk/Source/WebCore

Asynchronous image decoding should consider the drawing size if it is smaller than the size of the image
https://bugs.webkit.org/show_bug.cgi?id=168814

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-03-07
Reviewed by Simon Fraser.

If the image destinationRect.size() is smaller than the imageSourceSize
(e.g. 3000x3000 pixels), CGImageSourceCreateThumbnailAtIndex() is slower
than CGImageSourceCreateImageAtIndex() in decoding this image. To overcome
this problem, the entry (kCGImageSourceThumbnailMaxPixelSize,
max(destinationRect.width, destinationRect.height)) is added to the options
dictionary when calling CGImageSourceCreateThumbnailAtIndex(). This will
avoid copying a large block of memory for the unscaled bitmap image.

An argument named 'sizeForDrawing' of type std::optional<IntSize> will be passed
all the way from BitmapImage to ImageDecoder. If bool(sizeForDrawing) equals
true that means we want async image decoding. Otherwise the image will be decoded
synchronously.

The subsamplingLevel argument will be passed as std::optional<SubsamplingLevel>.
to ImageFrame query functions. When combined with sizeForDrawing, the meaning of
these two arguments will be the following:
-- !bool(subsamplingLevel): No caching is required. return what is stored in ImageFrameCache.
-- bool(subsamplingLevel) && !bool(sizeForDrawing): Match subsamplingLevel only. Recache if it's different.
-- bool(subsamplingLevel) && bool(sizeForDrawing): Match both both. . Recache if one of them is different.

We are going to allow decoding the same ImageFrame for different sizeForDrawings.
The rule is a new decoding is allowed only if the maxPixelSize(sizeForDrawing) of
the last requested image decoding is less than the new request sizeForDrawing.

  • loader/cache/CachedImage.h: Add a helper function which returns the URL of a CachedImage.
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::frameImageAtIndex): Add a new argument for sizeForDrawing.
(WebCore::BitmapImage::nativeImage): Pass an empty sizeForDrawing to frameImageAtIndex(). We an image with the native size.
(WebCore::BitmapImage::nativeImageForCurrentFrame): Ditto.
(WebCore::BitmapImage::nativeImageOfSize): Ditto.
(WebCore::BitmapImage::draw): Pass the destRect.size() to internalStartAnimation().
(WebCore::BitmapImage::isAsyncDecodingRequired): A helper function to answer the question
whether the async image decoding is required. It takes into account the animated images, the
large image, and the image size.
(WebCore::BitmapImage::internalStartAnimation): If async image decoding is requested for this frame m_sizeForDraw
will be set. If internalStartAnimation() is called from startAnimation(), sizeForDraw will be empty. In this
case no async image decoding will be requested. This happens only when startAnimation() is called from outside
BitmapImage::draw().
(WebCore::BitmapImage::advanceAnimation): Change the log message.
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): Ditto.

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageFrame.cpp:

(WebCore::ImageFrame::operator=): Include m_sizeForDraw in the properties of ImageFrame.
(WebCore::maxPixelSize): Returns the maximum of the width() and the height of an IntSize.
(WebCore::ImageFrame::isBeingDecoded): Returns true if the ImageFrame is currently being decoded for a specific sizeForDrawing.
(WebCore::ImageFrame::hasValidNativeImage): Ditto.

  • platform/graphics/ImageFrame.h:

(WebCore::ImageFrame::enqueueSizeForDecoding): Adds a new sizeForDrawing; this sets the ImageFrame is being decoded for this sizeForDrawing.
(WebCore::ImageFrame::dequeueSizeForDecoding): Removes the first sizeForDrawing was enqueued; this marks this ImageFrame has finished decoding for this sizeForDrawing.
(WebCore::ImageFrame::clearSizeForDecoding): Clears the sizeForDecoding queue. Marks the ImageFrame for not being decoded.
(WebCore::ImageFrame::isEmpty): Replace Decoding::Empty by Decoding::None.
(WebCore::ImageFrame::sizeForDrawing): Returns the ImageFrame sizeForDraw.
(WebCore::ImageFrame::hasDecodedNativeImage): Returns true if the ImageFrame doesn't need decoding before drawing.
(WebCore::ImageFrame::hasValidNativeImage): Deleted. Moved to the source file.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::setFrameNativeImageAtIndex): Take a new argument for sizeForDraw.
(WebCore::ImageFrameCache::setFrameMetadataAtIndex): When sizeForDraw is set, use the decoder to get the image
frame size. Otherwise, get the size of the nativeImage.
(WebCore::ImageFrameCache::replaceFrameNativeImageAtIndex): Take a new argument for sizeForDraw.
(WebCore::ImageFrameCache::cacheFrameNativeImageAtIndex): Ditto.
(WebCore::ImageFrameCache::startAsyncDecodingQueue): Pass the sizeForDraw as a new property of the ImageFrame.
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Store sizeForDraw in ImageFrameRequest. Delete unneeded check.
This function always receives a valid subsamplingLevel.
(WebCore::ImageFrameCache::stopAsyncDecodingQueue): Marks all the queued ImageFrames for not being decoded.
(WebCore::ImageFrameCache::frameAtIndexCacheIfNeeded): Take a new argument for sizeForDraw. If this function fixes the
properties of ImageFrame properties, keep the old sizeForDraw and/or subsamplingLevel. If a new frame is
decoded, no async image decoding will be done in this code path. So pass an empty std::optional<IntSize> to
ImageDecoder::createFrameImageAtIndex() and store std::optional<IntSize> in ImageFrame.
(WebCore::ImageFrameCache::frameMetadataAtIndex): A new helper function which takes a variable number of arguments which
will be passed to the (ImageFrame::*functor).
(WebCore::ImageFrameCache::frameMetadataAtIndexCacheIfNeeded): Make this function takes a variable number of arguments which
will be passed to the frameAtIndexCacheIfNeeded().
(WebCore::ImageFrameCache::size): Pass an Metadata, valid SubsamplingLevel and empty sizeForDraw to frameMetadataAtIndexCacheIfNeeded().
(WebCore::ImageFrameCache::sizeRespectingOrientation): Ditto.
(WebCore::ImageFrameCache::singlePixelSolidColor): Pass MetadataAndImage, empty SubsamplingLevel and empty sizeForDraw to
frameMetadataAtIndexCacheIfNeeded(); we can use the current frame image regardless of its size.
(WebCore::ImageFrameCache::frameIsBeingDecodedAtIndex): Pass the ImageFrame method as a function argument instead of
passing it as a template argument.
(WebCore::ImageFrameCache::frameIsCompleteAtIndex): Ditto.
(WebCore::ImageFrameCache::frameHasAlphaAtIndex): Ditto.
(WebCore::ImageFrameCache::frameHasImageAtIndex): Ditto.
(WebCore::ImageFrameCache::frameHasValidNativeImageAtIndex): Pass subsamplingLevel and sizeForDrawing to frameMetadataAtIndex().
(WebCore::ImageFrameCache::frameHasDecodedNativeImage): New helper function to answer the question whether an ImageFrame will need
decoding when drawing or not.
(WebCore::ImageFrameCache::frameSubsamplingLevelAtIndex): Pass the ImageFrame method as a function argument instead of
passing it as a template argument.
(WebCore::ImageFrameCache::frameSizeAtIndex): Ditto.
(WebCore::ImageFrameCache::frameBytesAtIndex): Ditto.
(WebCore::ImageFrameCache::frameDurationAtIndex): Ditto.
(WebCore::ImageFrameCache::frameOrientationAtIndex):
(WebCore::ImageFrameCache::frameImageAtIndex): Ditto.
(WebCore::ImageFrameCache::frameAtIndex): Deleted. Renamed to frameAtIndexCacheIfNeeded().

  • platform/graphics/ImageFrameCache.h:

(WebCore::ImageFrameCache::frameAtIndexCacheIfNeeded):

  • platform/graphics/ImageObserver.h: Define a virtual function for image sourceUrl().
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::frameImageAtIndex): Take a new argument for sizeForDrawing.

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::requestFrameAsyncDecodingAtIndex): Take a new argument for sizeForDrawing.
(WebCore::ImageSource::frameHasValidNativeImageAtIndex): Ditto.
(WebCore::ImageSource::frameHasDecodedNativeImage): New helper function.
(WebCore::ImageSource::frameImageAtIndex): Ditto.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::createImageSourceOptions): Create a dictionary with the basic image decoding options.
(WebCore::createImageSourceAsyncOptions): Create a dictionary with the basic asynchronous image decoding options.
(WebCore::appendImageSourceOption): Append the SubsamplingLevel or the MaxPixelSize option to an CGImageSource options dictionary.
(WebCore::appendImageSourceOptions): Append the SubsamplingLevel and the MaxPixelSize option to an CGImageSource options dictionary.
(WebCore::imageSourceOptions): Creates a dictionary for the synchronous image decoding options.
(WebCore::imageSourceAsyncOptions): Creates a dictionary for the asynchronous image decoding options.
(WebCore::ImageDecoder::createFrameImageAtIndex): Replace the DecodingMode argument by an std::optional<IntSize>.

  • platform/graphics/cg/ImageDecoderCG.h: Change a prototype.
  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoder::createFrameImageAtIndex): Replace the DecodingMode argument by an std::optional<IntSize>.

  • platform/graphics/win/ImageDecoderDirect2D.h: Change a prototype.
  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::createFrameImageAtIndex): Replace the DecodingMode argument by an std::optional<IntSize>.

  • platform/image-decoders/ImageDecoder.h: Change a prototype.
7:46 PM Changeset in webkit [213562] by commit-queue@webkit.org
  • 8 edits in trunk/Tools

Perf and layout test results should report using correct scm revision.
https://bugs.webkit.org/show_bug.cgi?id=169171

Patch by Kocsen Chung <Kocsen Chung> on 2017-03-07
Reviewed by Ryosuke Niwa.

For accurate record keeping, perf test and layout test results should
report using the native scm revision as an identifier.
To do so we introduce a new scm functions:

native_revision() and timestamp_of_native_revision().

The former is responsible for returning a git hash if scm.git or an
svn revision if scm.svn. The latter is responsible for retrieving the correct timestamp.
We also add the corresponding tests and a helper function _most_recent_log_for_revision.

  • Scripts/webkitpy/common/checkout/scm/scm.py:

(SCM.run):
Drive-by indentation fix to adhere to WebKit style conventions.
(SCM.svn_revision):
Remove superfluous comment.
(SCM.native_revision):
Add new abstract function native_revision and make it a _subclass_must_implement()
as we want to closely mimic svn_revision() function due to their similar behavior.
(SCM.timestamp_of_native_revision):
Add new abstract function timestamp_of_native_revision to closely mimic timestamp_of_revision.

  • Scripts/webkitpy/common/checkout/scm/git.py:

(Git._most_recent_log_for_revision):
New helper function similar to _most_recent_log_matching that is git hash friendly.
(Git.native_revision):
Implement new function native_revision(). Get the native_revision by running:

git log -1 --pretty=format:%H

and thus returning the latest git hash (in long format).
(Git.timestamp_of_native_revision):
Since perftestrunner and layout_test.controllers.manager use the new native_revision
function, we create a new native_revision timestamp retriever.
You will notice this uses a far more simplified way to retrieve UTC strict-ISO timestamp
than its non-native counterpart: timestamp_of_revision().

  • Scripts/webkitpy/common/checkout/scm/svn.py:

(SVN.native_revision):
Implement native_revision for SVN: simply return self.svn_revision()
(SVN.timestamp_of_native_revision):
Implement timestamp_of_native_revision for SVN: simply return self.timestamp_of_revision()

  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py:

(test_native_revision):
[SVN] Confirm that svn_revision == native_revision. And that native_revision returns 5.
Use '.' as the path parameter instead of svn_checkout_path to avoid violating pylint/E1101
and since we are guaranteed by test setUp to be in the correct SVN dir.
(GitTest.test_native_revision):
[Git] Confirm that git rev-parse HEAD is equal to newly implemented native_revision().
(GitSVNTest.test_native_revision):
[Git] Confirm that git rev-parse HEAD is equal to newly implemented native_revision().
(test_timestamp_of_native_revision):
Test new function timestamp_of_native_revision. Very similar fashion to
test_timestamp_of_revision.

  • Scripts/webkitpy/common/checkout/scm/scm_mock.py:

(MockSCM.native_revision):
Add MockSCM.native_revision to behave like svn.py (default).
(MockSCM.test_native_revision):
Add MockSCM.test_native_revision to behave like its non-native counterpart.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.upload_results):
When iterating through a list of projects, make sure we use the project's new native revision.

  • Scripts/webkitpy/performance_tests/perftestsrunner.py:

(_generate_results_dict):
As per the FIXME in manager.py, we have duplicate code in perftestsrunner.py.
So make the same exact change here.

7:15 PM Changeset in webkit [213561] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Parsing -webkit-hyphenate-character uses confusingly named consumeLocale()
https://bugs.webkit.org/show_bug.cgi?id=168638

Reviewed by Zalan Bujtas.

Parsing CSSPropertyWebkitHyphenateCharacter very confusingly called consumeLocale(),
which is really just "consume the 'auto' ident or a string", so rename that function.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeAutoOrString):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeLocale): Deleted.

6:09 PM Changeset in webkit [213560] by jiewen_tan@apple.com
  • 20 edits
    51 adds in trunk

[WebCrypto] Implement ECDH ImportKey/ExportKey operations
https://bugs.webkit.org/show_bug.cgi?id=169257
<rdar://problem/23789585>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey-expected.txt:

Source/WebCore:

This patch implements ECDH ImportKey/ExportKey operations according to:
https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations. Sad that we can't
support SPKI/PKCS8 formats at this moment due to lack of necessary
support in the underlying crypto library. Bug 169318 is tracking the
issue. Also, this patch fixes minor bugs while importing JWK keys for
HMAC/RSA.

Tests: crypto/subtle/ec-export-key-malformed-parameters.html

crypto/subtle/ec-import-jwk-key-export-jwk-key-private.html
crypto/subtle/ec-import-jwk-key-export-jwk-key-public.html
crypto/subtle/ec-import-jwk-key-export-raw-key.html
crypto/subtle/ec-import-key-malformed-parameters.html
crypto/subtle/ec-import-raw-key-export-jwk-key.html
crypto/subtle/ec-import-raw-key-export-raw-key.html
crypto/subtle/ecdh-generate-export-jwk-key-p256.html
crypto/subtle/ecdh-generate-export-jwk-key-p384.html
crypto/subtle/ecdh-generate-export-key-raw-p256.html
crypto/subtle/ecdh-generate-export-key-raw-p384.html
crypto/subtle/ecdh-import-jwk-key-minimum.html
crypto/subtle/ecdh-import-jwk-private-key-p256.html
crypto/subtle/ecdh-import-jwk-private-key-p384.html
crypto/subtle/ecdh-import-jwk-public-key-p256.html
crypto/subtle/ecdh-import-jwk-public-key-p384.html
crypto/subtle/ecdh-import-raw-key-p256.html
crypto/subtle/ecdh-import-raw-key-p384.html
crypto/workers/subtle/ec-generate-export-jwk-key.html
crypto/workers/subtle/ec-generate-export-raw-key.html
crypto/workers/subtle/ec-import-jwk-key-private.html
crypto/workers/subtle/ec-import-jwk-key-public.html
crypto/workers/subtle/ec-import-raw-key.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::supportExportKeyThrow):
Added EC family support.

  • crypto/CommonCryptoUtilities.h:

Added needed CommonCrypto SPIs.

  • crypto/CryptoAlgorithm.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::importKey):
(WebCore::CryptoAlgorithmECDH::exportKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/gnutls/CryptoKeyECGnuTLS.cpp:

(WebCore::CryptoKeyEC::keySizeInBits):
(WebCore::CryptoKeyEC::exportRaw):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformAddFieldElements):
Faked implementations for GTK+.

  • crypto/keys/CryptoKeyEC.cpp:

(WebCore::toNamedCurve):
(WebCore::CryptoKeyEC::generatePair):
(WebCore::CryptoKeyEC::importRaw):
(WebCore::CryptoKeyEC::importJwk):
(WebCore::CryptoKeyEC::exportJwk):

  • crypto/keys/CryptoKeyEC.h:
  • crypto/keys/CryptoKeyHMAC.cpp:

(WebCore::CryptoKeyHMAC::importJwk):
Fixed a bug.

  • crypto/keys/CryptoKeyRSA.cpp:

(WebCore::CryptoKeyRSA::importJwk):
Fixed a bug.

  • crypto/mac/CryptoKeyECMac.cpp:

(WebCore::doesUncompressedPointMatchNamedCurve):
(WebCore::doesFieldElementMatchNamedCurve):
(WebCore::getKeySizeFromNamedCurve):
(WebCore::CryptoKeyEC::~CryptoKeyEC):
(WebCore::CryptoKeyEC::keySizeInBits):
(WebCore::CryptoKeyEC::exportRaw):
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformAddFieldElements):

LayoutTests:

  • crypto/subtle/ec-export-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/ec-export-key-malformed-parameters.html: Added.
  • crypto/subtle/ec-import-jwk-key-export-jwk-key-private-expected.txt: Added.
  • crypto/subtle/ec-import-jwk-key-export-jwk-key-private.html: Added.
  • crypto/subtle/ec-import-jwk-key-export-jwk-key-public-expected.txt: Added.
  • crypto/subtle/ec-import-jwk-key-export-jwk-key-public.html: Added.
  • crypto/subtle/ec-import-jwk-key-export-raw-key-expected.txt: Added.
  • crypto/subtle/ec-import-jwk-key-export-raw-key.html: Added.
  • crypto/subtle/ec-import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/ec-import-key-malformed-parameters.html: Added.
  • crypto/subtle/ec-import-raw-key-export-jwk-key-expected.txt: Added.
  • crypto/subtle/ec-import-raw-key-export-jwk-key.html: Added.
  • crypto/subtle/ec-import-raw-key-export-raw-key-expected.txt: Added.
  • crypto/subtle/ec-import-raw-key-export-raw-key.html: Added.
  • crypto/subtle/ecdh-generate-export-jwk-key-p256-expected.txt: Added.
  • crypto/subtle/ecdh-generate-export-jwk-key-p256.html: Added.
  • crypto/subtle/ecdh-generate-export-jwk-key-p384-expected.txt: Added.
  • crypto/subtle/ecdh-generate-export-jwk-key-p384.html: Added.
  • crypto/subtle/ecdh-generate-export-key-raw-p256-expected.txt: Added.
  • crypto/subtle/ecdh-generate-export-key-raw-p256.html: Added.
  • crypto/subtle/ecdh-generate-export-key-raw-p384-expected.txt: Added.
  • crypto/subtle/ecdh-generate-export-key-raw-p384.html: Added.
  • crypto/subtle/ecdh-import-jwk-key-minimum-expected.txt: Added.
  • crypto/subtle/ecdh-import-jwk-key-minimum.html: Added.
  • crypto/subtle/ecdh-import-jwk-private-key-p256-expected.txt: Added.
  • crypto/subtle/ecdh-import-jwk-private-key-p256.html: Added.
  • crypto/subtle/ecdh-import-jwk-private-key-p384-expected.txt: Added.
  • crypto/subtle/ecdh-import-jwk-private-key-p384.html: Added.
  • crypto/subtle/ecdh-import-jwk-public-key-p256-expected.txt: Added.
  • crypto/subtle/ecdh-import-jwk-public-key-p256.html: Added.
  • crypto/subtle/ecdh-import-jwk-public-key-p384-expected.txt: Added.
  • crypto/subtle/ecdh-import-jwk-public-key-p384.html: Added.
  • crypto/subtle/ecdh-import-raw-key-p256-expected.txt: Added.
  • crypto/subtle/ecdh-import-raw-key-p256.html: Added.
  • crypto/subtle/ecdh-import-raw-key-p384-expected.txt: Added.
  • crypto/subtle/ecdh-import-raw-key-p384.html: Added.
  • crypto/subtle/hmac-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/hmac-import-key-malformed-parameters.html:
  • crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/rsa-import-key-malformed-parameters.html:

Fixed some minor bugs.

  • crypto/workers/subtle/ec-generate-export-jwk-key-expected.txt: Added.
  • crypto/workers/subtle/ec-generate-export-jwk-key.html: Added.
  • crypto/workers/subtle/ec-generate-export-raw-key-expected.txt: Added.
  • crypto/workers/subtle/ec-generate-export-raw-key.html: Added.
  • crypto/workers/subtle/ec-import-jwk-key-private-expected.txt: Added.
  • crypto/workers/subtle/ec-import-jwk-key-private.html: Added.
  • crypto/workers/subtle/ec-import-jwk-key-public-expected.txt: Added.
  • crypto/workers/subtle/ec-import-jwk-key-public.html: Added.
  • crypto/workers/subtle/ec-import-raw-key-expected.txt: Added.
  • crypto/workers/subtle/ec-import-raw-key.html: Added.
  • crypto/workers/subtle/resources/ec-generate-export-jwk-key.js: Added.
  • crypto/workers/subtle/resources/ec-generate-export-raw-key.js: Added.
  • crypto/workers/subtle/resources/ec-import-jwk-key-private.js: Added.
  • crypto/workers/subtle/resources/ec-import-jwk-key-public.js: Added.
  • crypto/workers/subtle/resources/ec-import-raw-key.js: Added.
5:50 PM Changeset in webkit [213559] by Simon Fraser
  • 2 edits in trunk/Source/WebKit/mac

Initialize the subpixelAntialiasedLayerTextEnabled Setting in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=169230

Reviewed by Tim Horton.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

5:48 PM Changeset in webkit [213558] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

WebRTC can be used even if getUserMedia is off
https://bugs.webkit.org/show_bug.cgi?id=169303

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-07
Reviewed by Alex Christensen.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::peerConnectionEnabled): No longer tieing peerConnectionEnabled to
mediaStreamEnabled.

5:43 PM Changeset in webkit [213557] by Simon Fraser
  • 4 edits in trunk/Source

Enable SubpixelAntialiasedLayerTextEnabled by default on some versions of macOS
https://bugs.webkit.org/show_bug.cgi?id=169329

Reviewed by Tim Horton.

If the macOS version is > 101300, enable subpixelAntialiasedLayerTextEnabled.

Source/WebKit/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:
5:36 PM Changeset in webkit [213556] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

Make platformDevice() not inline, to avoid a
weak external symbol issue on newer compilers/linkers

  • platform/graphics/cocoa/GPUDeviceMetal.mm:

(WebCore::GPUDevice::platformDevice):

  • platform/graphics/gpu/GPUDevice.h:

(WebCore::GPUDevice::platformDevice): Deleted.

5:03 PM Changeset in webkit [213555] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Fix the TestWebKitAPI build

Rubber-stamped by Anders Carlsson.

  • TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:

(TestWebKitAPI::TEST_F):
Fix a new warning about default argument promotion and va_start by
making this a enum class.

4:59 PM Changeset in webkit [213554] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Add Debug flag to TestExpectation for webrtc/libwebrtc/descriptionGetters.html.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:54 PM Changeset in webkit [213553] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark webrtc/libwebrtc/descriptionGetters.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=169317

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:54 PM Changeset in webkit [213552] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

TurnPort::OnSocketConnect is crashing
https://bugs.webkit.org/show_bug.cgi?id=169284

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-07
Reviewed by Eric Carlson.

  • Source/webrtc/p2p/base/turnport.cc: Fixing the assertion.
4:41 PM Changeset in webkit [213551] by Megan Gardner
  • 3 edits in trunk/Source/WebKit/mac

Additional DataInteraction Support
https://bugs.webkit.org/show_bug.cgi?id=169316
<rdar://problem/30884234>

Reviewed by Wenson Hsieh.

Add stub implementations to WebView for methods that handle data interaction

  • WebView/WebView.mm:

(-[WebView _enteredDataInteraction:client:global:operation:]):
(-[WebView _updatedDataInteraction:client:global:operation:]):
(-[WebView _exitedDataInteraction:client:global:operation:]):
(-[WebView _performDataInteraction:client:global:operation:]):
(-[WebView _endedDataInteraction:global:]):

  • WebView/WebViewPrivate.h:
4:31 PM Changeset in webkit [213550] by Chris Dumez
  • 1 edit
    2 adds in trunk/LayoutTests

Add test case to check that MessageEvent.data returns the value it was initialized to
https://bugs.webkit.org/show_bug.cgi?id=169311

Reviewed by Sam Weinig.

  • fast/events/constructors/message-event-constructor-data-identity-expected.txt: Added.
  • fast/events/constructors/message-event-constructor-data-identity.html: Added.
4:09 PM Changeset in webkit [213549] by dino@apple.com
  • 15 edits in trunk

Some platforms won't be able to create a GPUDevice
https://bugs.webkit.org/show_bug.cgi?id=169314
<rdar://problems/30907521>

Reviewed by Jon Lee.

Source/JavaScriptCore:

Disable WEB_GPU on the iOS Simulator.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Protect for the case where the hardware doesn't support Metal. And
we might as well disable WebGPU completely in the iOS simulator
for now.

  • Configurations/FeatureDefines.xcconfig:
  • platform/graphics/cocoa/GPUDeviceMetal.mm:

(WebCore::GPUDevice::GPUDevice):

  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::create):

Source/WebCore/PAL:

Disable WEB_GPU on the iOS Simulator.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Disable WEB_GPU on the iOS Simulator.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Disable WEB_GPU on the iOS Simulator.

  • Configurations/FeatureDefines.xcconfig:

Tools:

Protect for the case where the hardware doesn't support Metal.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm:

(TestWebKitAPI::TEST):

3:21 PM Changeset in webkit [213548] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Update ReadMe.md to use directory format for backing up & restoring the database
https://bugs.webkit.org/show_bug.cgi?id=169263

Reviewed by Joseph Pecoraro.

Update ReadMe.md's instruction to backup and restore the database to use directory format instead of
piping it to gzip. The new command will backup and restore the database with multiple concurrent processes
with a custom compression level.

  • ReadMe.md:
3:12 PM Changeset in webkit [213547] by Ryan Haddad
  • 6 edits
    1 add in trunk

Correctly check for an empty database file.
<rdar://problem/30542242> Removing Website Data not working (WebSQL directories being left behind)
https://bugs.webkit.org/show_bug.cgi?id=169256

Patch by Maureen Daum <mdaum@apple.com> on 2017-03-07
Reviewed by Brady Eidson.

Source/WebCore:

Tests: DatabaseTrackerTest.DeleteDatabaseFileIfEmpty verifies that we actually delete an empty file.

Instead of checking that a database file's size is zero bytes, we should check if it contains
any tables. Once we open an empty database file and set its journal mode to WAL, it will have a
valid SQLite header and therefore will no longer be empty. We can know that the database was empty
if it does not contain any tables.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
Use BEGIN EXCLUSIVE TRANSACTION in order to obtain the exclusive lock. If the database doesn't contain
any tables, it is empty and can be deleted.

Source/WebKit/mac:

Check if the folder for an origin's WebSQL databases is empty after trying to delete
all of its files. Currently we check if the deletedDatabaseFileCount matches the number
of files that were in the folder. However, when we delete the actual database file in
DatabaseTracker::deleteDatabaseFileIfEmpty(), the shm and wal files get deleted along with
the database file, but deletedDatabaseFileCount only gets incremented once.

  • Storage/WebDatabaseManager.mm:

(+[WebDatabaseManager removeEmptyDatabaseFiles]):
Delete the folder if it is empty.

Tools:

Add a test for DatabaseTracker::deleteDatabaseFileIfEmpty that verifies
that if we pass in an empty file it actually gets deleted.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Add TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp.

  • TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp: Added.

(TestWebKitAPI::TEST):

3:07 PM Changeset in webkit [213546] by commit-queue@webkit.org
  • 8 edits in trunk

[URLParser] Fix file URLs that are just file:// and a Windows drive letter
https://bugs.webkit.org/show_bug.cgi?id=169242

Patch by Alex Christensen <achristensen@webkit.org> on 2017-03-07
Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

This is specified in https://url.spec.whatwg.org/#file-host-state and tested by a newly-passing
web platform test. I added the check for the windows drive quirk in the FileHost state of the
parser but I forgot it when FileHost is the terminal state.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

3:05 PM Changeset in webkit [213545] by Jonathan Bedard
  • 9 edits in trunk/Tools

Standardize device/simulator naming conventions
https://bugs.webkit.org/show_bug.cgi?id=169083
<rdar://problem/30810466>

Reviewed by Alexey Proskuryakov.

  • Scripts/build-webkit: Document --ios-device and --simulator options.
  • Scripts/package-root:

(usage): Ditto.

  • Scripts/run-api-tests: Document --simulator option.
  • Scripts/webkitdirs.pm:

(argumentsForConfiguration): Use --ios-device by default rather than --device.
(determineXcodeSDK): Parse --ios-device and --simulator options.

  • Scripts/webkitpy/common/config/ews.json: Change port name from ios to ios-device.
  • Scripts/webkitpy/common/config/ports.py: Ditto.

(DeprecatedPort.port):
(IOSPort): Change port name from ios to ios-device.

  • Scripts/webkitpy/port/factory.py:

(platform_options): Add --simulator option.
(PortFactory): Update comment.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort): Change port name from ios to ios-device.
(IOSDevicePort.operating_system): Ditto.

2:53 PM Changeset in webkit [213544] by Brent Fulgham
  • 8 edits in trunk/Source/WebKit2

[Mac][iOS][WK2] Whitelist sysctl-read
https://bugs.webkit.org/show_bug.cgi?id=169306
<rdar://problem/16371458>

Reviewed by Alex Christensen.

Limit access to the 'sysctl' call to read-only cases of the very small
set of operations we actually use.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
2:44 PM Changeset in webkit [213543] by Chris Dumez
  • 5 edits in trunk/Source

Drop non-standard MessageEvent.webkitInitMessageEvent()
https://bugs.webkit.org/show_bug.cgi?id=169295

Reviewed by Joseph Pecoraro.

Source/WebCore:

Drop non-standard MessageEvent.webkitInitMessageEvent().

Chrome dropped it almost 3 years ago. They had UseCounter data showing
consistent 0% usage:

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::handleInitMessageEvent): Deleted.
(WebCore::JSMessageEvent::webkitInitMessageEvent): Deleted.

  • dom/MessageEvent.idl:

Source/WebInspectorUI:

Drop MessageEvent.webkitInitMessageEvent and update parameters for various
init*Event() operations to match the current implementation.

  • UserInterface/Models/NativeFunctionParameters.js:
2:24 PM Changeset in webkit [213542] by Chris Dumez
  • 4 edits
    6 adds in trunk

Label of an <option> element should not be displayed in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=169296
<rdar://problem/30900751>

Reviewed by Simon Fraser.

Source/WebCore:

Label of an <option> element should not be displayed in quirks mode, to
match Chrome and Firefox. However, we should still display the label in
strict mode, as per the HTML specification:

Chrome renders the label in strict mode, same as us. Firefox does not:

Tests: fast/dom/HTMLOptionElement/option-label-quirksmode.html

fast/dom/HTMLOptionElement/option-label-quirksmode2.html
fast/dom/HTMLOptionElement/option-label-strictmode.html

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::displayLabel):
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):

  • html/HTMLOptionElement.h:

LayoutTests:

Add layout test coverage.

  • fast/dom/HTMLOptionElement/option-label-quirksmode-expected.html: Added.
  • fast/dom/HTMLOptionElement/option-label-quirksmode.html: Added.
  • fast/dom/HTMLOptionElement/option-label-quirksmode2-expected.html: Added.
  • fast/dom/HTMLOptionElement/option-label-quirksmode2.html: Added.
  • fast/dom/HTMLOptionElement/option-label-strictmode-expected.html: Added.
  • fast/dom/HTMLOptionElement/option-label-strictmode.html: Added.
2:23 PM Changeset in webkit [213541] by dino@apple.com
  • 7 edits
    7 adds in trunk

Add GPUDevice implementation and WebGPULayer
https://bugs.webkit.org/show_bug.cgi?id=169219
<rdar://problem/30879048>

Reviewed by Sam Weinig.

Source/WebCore:

Add a basic implementation of a GPUDevice object,
which references a MTLDevice. Also add a WebGPULayer
that will ultimately be used to host WebGPU content.

WebKit API Test: WebCore/mac/GPUDevice.mm

  • Configurations/WebCore.xcconfig: Link to Metal.
  • PlatformMac.cmake: New files.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/Logging.h: Add a WebGPU logging channel.
  • platform/graphics/cocoa/GPUDeviceMetal.mm: Added.

(WebCore::GPUDevice::GPUDevice): Cocoa implementation.
(WebCore::GPUDevice::reshape):

  • platform/graphics/cocoa/WebGPULayer.h: Added.
  • platform/graphics/cocoa/WebGPULayer.mm: Added.

(-[WebGPULayer initWithGPUDevice:]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):
(-[WebGPULayer display]):

  • platform/graphics/gpu/GPUDevice.cpp: Added.

(WebCore::GPUDevice::create):
(WebCore::GPUDevice::~GPUDevice):
(WebCore::GPUDevice::GPUDevice): Implementation for platforms
other than Mac and iOS hardware.
(WebCore::GPUDevice::reshape):

  • platform/graphics/gpu/GPUDevice.h: Added.

(WebCore::GPUDevice::platformLayer):
(WebCore::GPUDevice::platformDevice):
(WebCore::GPUDevice::layer):

Tools:

Test for WebCore's GPUDevice class.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm: Added.

(TestWebKitAPI::TEST):

2:22 PM Changeset in webkit [213540] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Modern Media Controls] Log an error to the console when an image fails to load
https://bugs.webkit.org/show_bug.cgi?id=169292

Patch by Antoine Quint <Antoine Quint> on 2017-03-07
Reviewed by Dean Jackson.

In order to help debug flaky tests we now log the image source when an image fails to load.

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype.handleEvent):
(IconButton.prototype._loadImage):

1:51 PM Changeset in webkit [213539] by jmarcell@apple.com
  • 6 edits in tags/Safari-604.1.8.2.1/Source

Versioning.

1:46 PM Changeset in webkit [213538] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.8.2.1

Tag Safari-604.1.8.2.1.

1:26 PM Changeset in webkit [213537] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/seek-backward-support/seek-backward-support.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=165386

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:26 PM Changeset in webkit [213536] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169117

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:26 PM Changeset in webkit [213535] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove Debug flag from flaky test http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache.html.
https://bugs.webkit.org/show_bug.cgi?id=162975

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:02 PM Changeset in webkit [213534] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Do not use invalid m_lastNonWhitespaceFragment while removing trailing whitespace.
https://bugs.webkit.org/show_bug.cgi?id=169288
rdar://problem/30576976

Reviewed by Antti Koivisto.

Source/WebCore:

When the current line has nothing but whitespace, m_lastNonWhitespaceFragment is invalid so
we should not use the start/end values to decide how many characters we need to revert.
This patch makes m_lastNonWhitespaceFragment optional. When it's invalid we just remove
all the runs from the current line since they are all considered whitespace runs.

Test: fast/text/simple-line-layout-line-is-all-whitespace.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::revertAllRunsOnCurrentLine):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):

LayoutTests:

  • fast/text/simple-line-layout-line-is-all-whitespace-expected.txt: Added.
  • fast/text/simple-line-layout-line-is-all-whitespace.html: Added.
12:54 PM Changeset in webkit [213533] by achristensen@apple.com
  • 25 edits in trunk

[Content Extensions] Rename "Domain" to "Condition" where appropriate
https://bugs.webkit.org/show_bug.cgi?id=169297

Reviewed by Brady Eidson.

Source/WebCore:

In r184116 I added the ability for a content blocker author to add conditions to the triggers,
if-domain and unless-domain which look at the domain of the main document URL.
I plan to add more conditions soon to run regexes on the entire URL, but to make that patch more
manageable, I took the non-behavior-changing parts and put them in this patch.

No change in behavior except some error messages were made more generic.

  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::ContentExtension):
(WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
Pass the main document URL instead of just the domain. No change in behavior yet.
(WebCore::ContentExtensions::ContentExtension::cachedConditionedActions):
(WebCore::ContentExtensions::ContentExtension::universalActionsWithConditions):
(WebCore::ContentExtensions::ContentExtension::populateDomainCacheIfNeeded): Deleted.
(WebCore::ContentExtensions::ContentExtension::cachedDomainActions): Deleted.
(WebCore::ContentExtensions::ContentExtension::universalActionsWithDomains): Deleted.

  • contentextensions/ContentExtension.h:

(WebCore::ContentExtensions::ContentExtension::universalActionsWithoutConditions):
(WebCore::ContentExtensions::ContentExtension::universalActionsWithoutDomains): Deleted.

  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionCompiler.h:
  • contentextensions/ContentExtensionError.cpp:

(WebCore::ContentExtensions::contentExtensionErrorCategory):

  • contentextensions/ContentExtensionError.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::getStringList):
Don't pass the error type as a parameter. It's always JSONInvalidConditionList.
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):

  • contentextensions/ContentExtensionRule.h:

(WebCore::ContentExtensions::Trigger::~Trigger):
(WebCore::ContentExtensions::Trigger::isEmpty):
(WebCore::ContentExtensions::Trigger::operator==):
(WebCore::ContentExtensions::TriggerHash::hash):
Use bitwise xor instead of bitwise or to have fewer hash collisions.
Also, before we were accidentally doing the same hash operation here for IfDomain and UnlessDomain.
This caused unnecessary hash collisions. This is fixed, but should not change any behavior.

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):

  • contentextensions/DFABytecode.h:

(WebCore::ContentExtensions::instructionSizeWithArguments):

  • contentextensions/DFABytecodeCompiler.cpp:

(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):

  • contentextensions/DFABytecodeInterpreter.cpp:

(WebCore::ContentExtensions::matchesCondition):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsMatchingEverything):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithConditions):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
(WebCore::ContentExtensions::matchesDomain): Deleted.
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithDomains): Deleted.

  • contentextensions/DFABytecodeInterpreter.h:
  • loader/ResourceLoadInfo.h:

Source/WebKit2:

  • Shared/WebCompiledContentExtension.cpp:

(WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithConditionsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithConditionsBytecodeLength):
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecode):
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode): Deleted.
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength): Deleted.
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode): Deleted.
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength): Deleted.
(WebKit::WebCompiledContentExtension::domainFiltersBytecode): Deleted.
(WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength): Deleted.

  • Shared/WebCompiledContentExtension.h:
  • Shared/WebCompiledContentExtensionData.cpp:

(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):

  • Shared/WebCompiledContentExtensionData.h:

(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):

  • UIProcess/API/APIUserContentExtensionStore.cpp:

(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
(API::UserContentExtensionStore::lookupContentExtension):
(API::UserContentExtensionStore::compileContentExtension):
(API::UserContentExtensionStore::removeContentExtension):

  • UIProcess/API/APIUserContentExtensionStore.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::TEST_F):

12:36 PM Changeset in webkit [213532] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[FreeType] FontPlatformData::fallbacks() returns unprepared FcPatterns
https://bugs.webkit.org/show_bug.cgi?id=164689

Reviewed by Carlos Garcia Campos.

From the documentation of FcFontSort():

"""The returned FcFontSet references FcPattern structures which may be shared by the
return value from multiple FcFontSort calls, applications must not modify these patterns.
Instead, they should be passed, along with p to FcFontRenderPrepare which combines them into
a complete pattern."""

That means each call to FcFontSort() must be followed up by a call to FcFontRenderPrepare(),
else the patterns will lack information about how to draw the font properly.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::fallbacks):

12:16 PM Changeset in webkit [213531] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

Flaky Test: media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html
https://bugs.webkit.org/show_bug.cgi?id=169159

Patch by Antoine Quint <Antoine Quint> on 2017-03-07
Reviewed by Dean Jackson.

Make this test more defensive to ensure it doesn't fail.

  • media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel-expected.txt:
  • media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:
  • platform/mac/TestExpectations:
12:05 PM Changeset in webkit [213530] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Refactor setup_test_run for IOSPort and IOSSimulator
https://bugs.webkit.org/show_bug.cgi?id=169220
<rdar://problem/30879645>

Reviewed by Daniel Bates.

Provide more specific port setup functions for iOS ports to allow more sharing of common code.

  • Scripts/webkitpy/port/ios.py:

(IOSPort):
(IOSPort._create_devices): Added.
(IOSPort.setup_test_run): Shared iOS device setup code.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort._create_devices): Renamed from setup_test_run.
(IOSSimulatorPort.setup_test_run): Renamed as _create_devices.

11:27 AM Changeset in webkit [213529] by andersca@apple.com
  • 2 edits in trunk/Tools

Rewrite the DRT Pasteboard implementation to use UTIs and WTF types
https://bugs.webkit.org/show_bug.cgi?id=169289

Reviewed by Tim Horton.

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm:

(-[LocalPasteboard initWithName:]):
(-[LocalPasteboard name]):
(-[LocalPasteboard declareTypes:owner:]):
(isUTI):
(toUTI):
(-[LocalPasteboard addTypes:owner:]):
(-[LocalPasteboard changeCount]):
(-[LocalPasteboard types]):
(-[LocalPasteboard availableTypeFromArray:]):
(-[LocalPasteboard setData:forType:]):
(-[LocalPasteboard dataForType:]):
(-[LocalPasteboard writeObjects:]):
(-[LocalPasteboard dealloc]): Deleted.

11:26 AM Changeset in webkit [213528] by mmaxfield@apple.com
  • 7 edits
    1 add in trunk

Parsing font descriptors inside @font-face needs to accept ranges
https://bugs.webkit.org/show_bug.cgi?id=168893

Reviewed by Dean Jackson.

Source/WebCore:

Parse font-weight, font-stretch, and font-style ranges according to
https://drafts.csswg.org/css-fonts-4/#font-prop-desc. There is one difference, though:
as documented in https://github.com/w3c/csswg-drafts/issues/783, slashes are a better
delimiters than hyphens, so this patch implements that instead. I'll update the spec to
include slashes as soon as possible.

Because this patch is all about creating FontSelectionValues from fonts, it doesn't
actually modify the font selection algorithm, and therefore only tests the creation of
these new values. The font selection algorithm itself is already tested elsewhere.

This new work is behind the ENABLE(VARIATION_FONTS) flag.

Test: fast/text/font-selection-font-face-parse.html

  • css/CSSFontFace.cpp:

(WebCore::calculateWeightRange):
(WebCore::calculateStretchRange):
(WebCore::calculateItalicRange):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontWeightRange):
(WebCore::consumeFontStretchRange):
(WebCore::consumeFontStyleRange):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::extractVariationBounds):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::capabilitiesForFontDescriptor):

LayoutTests:

  • fast/text/font-selection-font-face-parse-expected.txt:
  • fast/text/font-selection-font-face-parse.html:
  • platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:

Variations are off on El Capitan, so this platform needs explicit results.

11:21 AM Changeset in webkit [213527] by fpizlo@apple.com
  • 2 edits in trunk/PerformanceTests

Revise the ARES-6 explainer text
https://bugs.webkit.org/show_bug.cgi?id=169287

Reviewed by Saam Barati.

Just did some copy-editing.

  • ARES-6/about.html:
11:16 AM Changeset in webkit [213526] by clopez@igalia.com
  • 1 edit
    2 moves in trunk/LayoutTests

Move webrtc/descriptionGetters.html to webrtc/libwebrtc/descriptionGetters.html
https://bugs.webkit.org/show_bug.cgi?id=169216

Unreviewed test gardening.

Move the test webrtc/descriptionGetters.html under the directory webrtc/libwebrtc
because its still not testing the spec, but the current libwebrtc based implementation.

This way the test is skipped on the GTK+ port (The whole directory webrtc/libwebrtc is skipped).

  • webrtc/libwebrtc/descriptionGetters-expected.txt: Renamed from LayoutTests/webrtc/descriptionGetters-expected.txt.
  • webrtc/libwebrtc/descriptionGetters.html: Renamed from LayoutTests/webrtc/descriptionGetters.html.
10:54 AM Changeset in webkit [213525] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

Add David Jonathan Ross to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=169265

Unreviewed.

David Jonathan Ross very kindly offered to create and contribute his Boxis font in r211060,
which is used for testing font variations.

  • Scripts/webkitpy/common/config/contributors.json:
10:37 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
Mention that TextureMapperBackingStore is the interface (diff)
10:06 AM Changeset in webkit [213524] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[Mac][WK2] Expand sandbox to support access to audio component registrar
https://bugs.webkit.org/show_bug.cgi?id=169283
<rdar://problem/30793512>

Reviewed by Alexey Proskuryakov.

  • WebProcess/com.apple.WebProcess.sb.in:
9:59 AM Changeset in webkit [213523] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

Animated GIFs fail to play in multi-column layout
https://bugs.webkit.org/show_bug.cgi?id=167901
<rdar://problem/30382262>

Reviewed by Zalan Bujtas.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeRectForRepaint):
Make sure to handle the case where we pass in a null repaintContainer and need
to cross a multicolumn flow thread -> region boundary as a result.

9:43 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
GraphicsLayerAnimation was renamed to TextureMapperAnimation (diff)
9:36 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
LayerTreeRenderer was renamed to CoordinatedGraphicsScene (diff)
9:33 AM Changeset in webkit [213522] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

ShadowBlur::calculateLayerBoundingRect doesn't need to return the enclosingIntRect of layerRect
https://bugs.webkit.org/show_bug.cgi?id=168650

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-07
Reviewed by Simon Fraser.

No new tests, no behavior change.

  • platform/graphics/ShadowBlur.h: Change the type of return value

from IntRect to IntSize.

  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::calculateLayerBoundingRect): Ditto.
(WebCore::ShadowBlur::drawRectShadow): Rename a variable layerRect layerSize.
(WebCore::ShadowBlur::drawInsetShadow): Ditto.
(WebCore::ShadowBlur::drawRectShadowWithoutTiling): Ditto.
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling): Ditto.
(WebCore::ShadowBlur::beginShadowLayer): Ditto.

9:29 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
Updated paths of some source files (diff)
9:22 AM Changeset in webkit [213521] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Replace debug assertion with release one in Frame::setView()
https://bugs.webkit.org/show_bug.cgi?id=169189

Reviewed by Ryosuke Niwa.

Replace debug assertion with release one in Frame::setView() to make make sure the
document does not have a living render tree. This will help identify possible
remaining cases where this can happen.

  • dom/Document.cpp:

(WebCore::Document::didBecomeCurrentDocumentInView): Deleted.

  • dom/Document.h:
  • page/Frame.cpp:

(WebCore::Frame::setView):

9:15 AM Changeset in webkit [213520] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Expose WebRTC current/pending description getters
https://bugs.webkit.org/show_bug.cgi?id=169216

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-07
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/descriptionGetters.html

Implement pending and current description getters through libwebrtc.
These getters do not yet match the spec as can be seen from the test, which is written to match the implemented behavior.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::currentLocalDescription):
(WebCore::LibWebRTCPeerConnectionBackend::currentRemoteDescription):
(WebCore::LibWebRTCPeerConnectionBackend::pendingLocalDescription):
(WebCore::LibWebRTCPeerConnectionBackend::pendingRemoteDescription):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

  • webrtc/descriptionGetters-expected.txt: Added.
  • webrtc/descriptionGetters.html: Added.
9:11 AM Changeset in webkit [213519] by Chris Dumez
  • 32 edits in trunk/Source

Port DOMTimer from std::chrono::milliseconds to WTF::Seconds type
https://bugs.webkit.org/show_bug.cgi?id=169236

Reviewed by Simon Fraser.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::minimumDOMTimerInterval):
(WebCore::Document::timerAlignmentInterval):

  • dom/Document.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::adjustMinimumDOMTimerInterval):
(WebCore::ScriptExecutionContext::minimumDOMTimerInterval):
(WebCore::ScriptExecutionContext::timerAlignmentInterval):

  • dom/ScriptExecutionContext.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didInstallTimerImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didInstallTimer):

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::didInstallTimer):

  • inspector/InspectorTimelineAgent.h:
  • inspector/TimelineRecordFactory.cpp:

(WebCore::TimelineRecordFactory::createTimerInstallData):

  • inspector/TimelineRecordFactory.h:
  • page/DOMTimer.cpp:

(WebCore::shouldForwardUserGesture):
(WebCore::userGestureTokenToForward):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::intervalClampedToMinimum):
(WebCore::DOMTimer::alignedFireTime):

  • page/DOMTimer.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):

  • page/Page.cpp:

(WebCore::Page::setTimerThrottlingState):
(WebCore::Page::setDOMTimerAlignmentIntervalIncreaseLimit):
(WebCore::Page::updateDOMTimerAlignmentInterval):

  • page/Page.h:

(WebCore::Page::domTimerAlignmentInterval):

  • page/Settings.cpp:

(WebCore::Settings::setMinimumDOMTimerInterval):

  • page/Settings.h:

(WebCore::Settings::minimumDOMTimerInterval):

  • page/SuspendableTimer.h:

(WebCore::SuspendableTimer::startRepeating):
(WebCore::SuspendableTimer::startOneShot):
(WebCore::SuspendableTimer::augmentFireInterval):
(WebCore::SuspendableTimer::augmentRepeatInterval):

  • platform/Timer.cpp:

(WebCore::TimerBase::setNextFireTime):

  • platform/Timer.h:

(WebCore::TimerBase::alignedFireTime):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setMinimumTimerInterval):

  • testing/InternalSettings.h:
  • testing/Internals.cpp:

(WebCore::Internals::isTimerThrottled):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):

Source/WebKit2:

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::updateHiddenPageThrottlingAutoIncreaseLimit):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::setHiddenPageDOMTimerThrottlingIncreaseLimit):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setHiddenPageDOMTimerThrottlingIncreaseLimit):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
9:10 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
USE(UI_SIDE_COMPOSITING) is USE(COORDINATED_GRAPHICS) now (diff)
9:08 AM Changeset in webkit [213518] by commit-queue@webkit.org
  • 6 edits in trunk

W3C importer should be able to update the import expectations file
https://bugs.webkit.org/show_bug.cgi?id=168037

LayoutTests/imported/w3c:

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-07
Reviewed by Ryosuke Niwa.

  • resources/import-expectations.json:

Tools:

Patch by Youenn Fablet <youennf@gmail.com> on 2017-03-07
Reviewed by Ryosuke Niwa.

Changing import expectations from an array to a map.
Marking all test paths as import and updating import expectations file accordingly.

  • Scripts/webkitpy/w3c/test_downloader.py:

(TestDownloader.init):
(TestDownloader._init_paths_from_expectations):
(TestDownloader):
(TestDownloader.update_import_expectations):

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.do_import):

  • Scripts/webkitpy/w3c/test_importer_unittest.py:
9:03 AM Changeset in webkit [213517] by Chris Dumez
  • 20 edits
    1 copy
    2 adds
    2 deletes in trunk

Align initEvent / initCustomEvent / initMessageEvent with the latest specification
https://bugs.webkit.org/show_bug.cgi?id=169176

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Re-sync web-platform tests from upstream after:

  • web-platform-tests/dom/events/CustomEvent-expected.txt:
  • web-platform-tests/dom/events/CustomEvent.html:
  • web-platform-tests/dom/events/Event-initEvent-expected.txt:
  • web-platform-tests/dom/events/Event-initEvent.html:
  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/dom/interfaces.html:
  • web-platform-tests/html/dom/interfaces-expected.txt:
  • web-platform-tests/html/dom/interfaces.html:
  • web-platform-tests/html/dom/resources/interfaces.idl: Copied from LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html.
  • web-platform-tests/html/dom/resources/untested-interfaces.idl: Added.
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor-expected.txt: Removed.
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.html: Removed.
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html:

Source/WebCore:

Align initEvent / initCustomEvent / initMessageEvent with the latest specification
after:

In particular, the following changes were made:

  • initEvent: The length property now properly returns 1 instead of 3 as only the first parameter is mandatory. We were already behaving correcting the the length property value was wrong because we forgot to drop a hack from the bindings generator.
  • initCustomEvent: Make all parameters except the first optional. Previously, all parameters were mandatory so this is safe.
  • initMessageEvent: Drop the custom code and mark the first parameter as mandatory. A side effect of dropping the custom code is that null is no longer considered as valid input for the last parameter. The parameter is of type sequence<> and the new behavior is consistent with the specification and Firefox. If it turns out to break existing content, I'll make the parameter nullable in a follow-up.

No new tests, updated existing tests.

  • bindings/js/JSMessageEventCustom.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePropertiesHashTable):

  • dom/CustomEvent.idl:
  • dom/MessageEvent.idl:

LayoutTests:

Updated existing tests to reflect behavior change.

  • fast/events/init-events-expected.txt:
  • fast/events/script-tests/init-events.js:
  • fast/eventsource/eventsource-attribute-listeners.html:
9:02 AM Changeset in webkit [213516] by clopez@igalia.com
  • 3 edits in trunk/LayoutTests

[GTK][Wayland] Update list of test failing on the Wayland release test bot.

Unreviewed test gardening.

  • platform/gtk-wayland/TestExpectations: Update list of test failing on the Wayland release test bot.
  • platform/gtk/TestExpectations: media/video-played-collapse.html crashes sometimes.
8:54 AM Changeset in webkit [213515] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

Differentiate between pending head and body stylesheets in Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=169277

Reviewed by Andreas Kling.

Split pending stylesheet node set into separate sets for head and body elements and processing instructions.

This tightens typing and will also be useful later.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::~Scope):
(WebCore::Style::Scope::addPendingSheet):
(WebCore::Style::Scope::removePendingSheet):
(WebCore::Style::Scope::didRemovePendingStylesheet):
(WebCore::Style::Scope::hasPendingSheet):
(WebCore::Style::Scope::hasPendingSheetInBody):
(WebCore::Style::Scope::hasProcessingInstructionWithPendingSheet): Deleted.

  • style/StyleScope.h:

(WebCore::Style::Scope::hasPendingSheet): Deleted.
(WebCore::Style::Scope::hasPendingSheets): Deleted.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::hasLoadingStylesheet):

Just test for body stylesheets.

(WebCore::Style::TreeResolver::resolve):

Treat all before-body stylesheets uniformly.

8:35 AM CoordinatedGraphicsSystem edited by Konstantin Tokarev
Updated TiledBackingStore and CoordinatedTile description to reflect … (diff)
8:23 AM Changeset in webkit [213514] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Setting a valid source after an invalid one retains the invalid placard
https://bugs.webkit.org/show_bug.cgi?id=169280
<rdar://problem/30876078>

Patch by Antoine Quint <Antoine Quint> on 2017-03-07
Reviewed by Jon Lee.

Source/WebCore:

We need to track when a new load start to see if we might have recovered from an error
and hide the "invalid" placard.

Test: media/modern-media-controls/placard-support/placard-support-error-recover.html

  • Modules/modern-media-controls/media/placard-support.js:

(PlacardSupport.prototype.get mediaEvents):

LayoutTests:

Add a new test that checks that we know to remove the "invalid" placard if a new source is
set and media starts loading again.

  • media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt: Added.
  • media/modern-media-controls/placard-support/placard-support-error-recover.html: Added.
6:45 AM Changeset in webkit [213513] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Mark media/video-buffered.html as flaky.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
5:16 AM Changeset in webkit [213512] by Manuel Rego Casasnovas
  • 3 edits in trunk/Tools

Add pdr to the rendering watchlist
https://bugs.webkit.org/show_bug.cgi?id=167298

Patch by Philip Rogers <pdr@google.com> on 2017-03-07
Reviewed by Andreas Kling.

  • Scripts/webkitpy/common/config/contributors.json: Switch to pdr+autocc@chromium.org
  • Scripts/webkitpy/common/config/watchlist: Add pdr to the rendering watchlist.
5:05 AM Changeset in webkit [213511] by Manuel Rego Casasnovas
  • 2 edits in trunk/LayoutTests

[css-grid] Mark a few tests from the W3C suite as pass after r213480
https://bugs.webkit.org/show_bug.cgi?id=169270

Unreviewed test gardening.

r213480 was porting some Blink patches that makes these tests to pass now.
Check the following bugs for more information:

grid-minimum-size-grid-items-009.xht as passing.
Keep grid-items-sizing-alignment-001.html as failure but now for a different issue
(see http://webkit.org/b/169271).

4:46 AM Changeset in webkit [213510] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] ECDH tests from imported/w3c/web-platform-tests/WebCryptoAPI/generateKey fail.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
2:15 AM Changeset in webkit [213509] by mario@webkit.org
  • 2 edits in trunk/Tools

Unreviewed. Removed myself from the Accessibility watch list

Patch by Mario Sanchez Prada <mario@webkit.org> on 2017-03-07

  • Scripts/webkitpy/common/config/watchlist: Removed myself.
1:51 AM Changeset in webkit [213508] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION (r213412): JPEG premultiplication tests fail under GuardMalloc
https://bugs.webkit.org/show_bug.cgi?id=169266

Reviewed by Tim Horton.

r213412 added functions to create a CGImageRef from a canvas image buffer, which were used
to create data: URLs and blobs. If JPEG premultiplication is applied, though,
WebCore::cgImage() would return an image with a data provider pointing to stack memory.

I fixed a similar issue in ImageBuffer::toCGImage() by leaking the reference to a
Uint8ClampedArray then creating a CGDataProviderRef with a releaseData function that adopts
the leaked reference.

We could take that approach in cgImage() too by allocating the premultiplied data buffer on
the heap then freeing it with a releaseData function, but it's simpler to refactor
toCGImage()/cgImage() to return an encoded image as a CFDataRef instead of a CFImageRef.
This ensures that a CGDataProviderRef never outlives the data it points to.

Covered by existing tests.

  • platform/graphics/ImageBuffer.h: Renamed toCGImage() to toCFData().
  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::dataURL): Changed to take a CFDataRef.
(WebCore::dataVector): Renamed from data(). Changed to take a CFDataRef.
(WebCore::ImageBuffer::toDataURL): Changed to call toCFData().
(WebCore::ImageBuffer::toData): Ditto.
(WebCore::ImageBuffer::toCFData): Changed to return a CFDataRef after encoding the
CGImageRef that was previously returned.
(WebCore::cfData): Ditto.
(WebCore::dataURL): Changed to call cfData().
(WebCore::data): Ditto.
(WebCore::ImageBuffer::toCGImage): Renamed to ImageBuffer::toCFData().
(WebCore::cgImage): Renamed to WebCore::cfData().

12:47 AM Changeset in webkit [213507] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Test fix after r213505
https://bugs.webkit.org/show_bug.cgi?id=169267

Unreviewed.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):

Mar 6, 2017:

11:38 PM Changeset in webkit [213506] by sbarati@apple.com
  • 7 edits
    1 add in trunk

WebAssembly: Implement the WebAssembly.instantiate API
https://bugs.webkit.org/show_bug.cgi?id=165982
<rdar://problem/29760110>

Reviewed by Keith Miller.

JSTests:

  • wasm/js-api/web-assembly-instantiate.js: Added.

(assert.eq.async.test):
(assert.eq):
(assert.truthy.async.test):
(assert.truthy):

Source/JavaScriptCore:

This patch is a straight forward implementation of the WebAssembly.instantiate
API: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblyinstantiate

I implemented the API in a synchronous manner. We should make it
asynchronous: https://bugs.webkit.org/show_bug.cgi?id=169187

  • wasm/JSWebAssembly.cpp:

(JSC::webAssemblyCompileFunc):
(JSC::webAssemblyInstantiateFunc):
(JSC::JSWebAssembly::finishCreation):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):
(JSC::WebAssemblyInstanceConstructor::createInstance):

  • wasm/js/WebAssemblyInstanceConstructor.h:
  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::createModule):

  • wasm/js/WebAssemblyModuleConstructor.h:
11:30 PM Changeset in webkit [213505] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

Apply well-known-axis variation values at the right time in preparePlatformFont()
https://bugs.webkit.org/show_bug.cgi?id=168896

Reviewed by Jon Lee.

Source/WebCore:

Simply plumb the FontSelectionRequest to the place where font variations are implemented.

Test: fast/text/variations/font-selection-properties.html

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):
(WebCore::fontWithFamily):
(WebCore::FontCache::createFontPlatformData):
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

LayoutTests:

  • fast/text/variations/font-selection-properties-expected.html: Added.
  • fast/text/variations/font-selection-properties.html: Added.
11:19 PM Changeset in webkit [213504] by aakash_jain@apple.com
  • 4 edits in trunk/Source/WebKit2

Enable SUPPORTS_TEXT_BASED_API in WebKit2 for iOS
https://bugs.webkit.org/show_bug.cgi?id=169233

Reviewed by Alexey Proskuryakov.

  • Configurations/Base.xcconfig: Enable SUPPORTS_TEXT_BASED_API.
  • Configurations/WebKit.xcconfig: Pass information to TAPI about reexporting WebKitLegacy and few extra headers.
  • WebKit2.xcodeproj/project.pbxproj: Run scripts which are run for installhdrs phase for installapi phase as well.
11:01 PM Changeset in webkit [213503] by Yusuke Suzuki
  • 2 edits in trunk/Tools

Add Fujii Hironori to contributor's list
https://bugs.webkit.org/show_bug.cgi?id=169261

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-06
Reviewed by Yusuke Suzuki.

Add myself to the contributor's lists so that my e-mail autocompletes for CC

  • Scripts/webkitpy/common/config/contributors.json:
10:24 PM Changeset in webkit [213502] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Unreviewed post-review fixup after r213464
https://bugs.webkit.org/show_bug.cgi?id=169255

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator==):
(WebCore::FontDescriptionKey::computeHash):
(WebCore::FontDescriptionKey::makeFlagsKey):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::computeNecessarySynthesis):

10:10 PM Changeset in webkit [213501] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Validate DOM after potentially destructive actions during parser insert operations
https://bugs.webkit.org/show_bug.cgi?id=169222
<rdar://problem/30689729>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Do not perform an insert operation if the next child's parent is no longer
part of the tree. This can happen if JavaScript runs during node removal
events and modifies the contents of the document.

This patch was inspired by a similar Blink change by Marius Mlynski:
<https://src.chromium.org/viewvc/blink?view=revision&revision=200690>

Tests: fast/parser/scriptexec-during-parserInsertBefore.html

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::executeReparentTask):
(WebCore::executeInsertAlreadyParsedChildTask):

LayoutTests:

This change merges a Blink test case from:
<https://src.chromium.org/viewvc/blink?view=revision&revision=200690>

  • fast/parser/scriptexec-during-parserInsertBefore-expected.txt: Added.
  • fast/parser/scriptexec-during-parserInsertBefore.html: Added.
9:44 PM Changeset in webkit [213500] by msaboff@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Unreviewed build fix to add
-isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
for objective C++ files.

  • Configurations/WebKitLegacy.xcconfig:
9:37 PM Changeset in webkit [213499] by mmaxfield@apple.com
  • 6 edits in trunk

Update isEmojiGroupCandidate() to the latest version of Unicode
https://bugs.webkit.org/show_bug.cgi?id=168198

Reviewed by Jon Lee.

Source/WebCore:

In the latest version of Unicode, many more code points are candidates for emoji groups.
Therefore, isEmojiGroupCandidate() should be made more permissive. This way, the function
is more future-proof.

Test: editing/deleting/delete-emoji.html

  • platform/text/CharacterProperties.h:

(WebCore::icuLibraryUnderstandsSupplementalSymbolsAndPictographs):
(WebCore::isEmojiGroupCandidate):

LayoutTests:

  • platform/ios-simulator/editing/deleting/delete-emoji-expected.txt:
  • platform/mac/editing/deleting/delete-emoji-expected.txt:
  • editing/deleting/delete-emoji.html:
9:15 PM Changeset in webkit [213498] by mitz@apple.com
  • 3 edits in trunk/Source/WebKit2

[Cocoa] Expose API::InjectedBundle::EditorClient::didChange via the Objective-C bundle SPI
https://bugs.webkit.org/show_bug.cgi?id=169223

Reviewed by Tim Horton.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Declared new delegate method -_webProcessPlugInBrowserContextControllerDidChangeByEditing:.
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added an override

of API::InjectedBundle::EditorClient::didChange that calls the new delegate method.

8:44 PM Changeset in webkit [213497] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Bring back WebKit specific changes to disable temporarily libwebrtc video adaptation
https://bugs.webkit.org/show_bug.cgi?id=169229

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-06
Reviewed by Alex Christensen.

  • Source/webrtc/modules/video_coding/video_sender.cc: disabling frame dropping.
  • Source/webrtc/video/vie_encoder.cc: disabling resolution decrease based on CPU overuse.
8:39 PM Changeset in webkit [213496] by msaboff@apple.com
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix after r213492.

  • Configurations/Base.xcconfig:
8:22 PM Changeset in webkit [213495] by aakash_jain@apple.com
  • 3 edits in trunk/Source/WebKit2

Add WK_CLASS_AVAILABLE to _WKLinkIconParameters and _WKWebViewPrintFormatter
https://bugs.webkit.org/show_bug.cgi?id=169225

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/_WKLinkIconParameters.h:
  • UIProcess/_WKWebViewPrintFormatter.h:
8:21 PM Changeset in webkit [213494] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Use default configuration for libwebrtc peerconnection
https://bugs.webkit.org/show_bug.cgi?id=169239

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-06
Reviewed by Alex Christensen.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration): Using the default configuration instead of the aggressive one.

8:17 PM Changeset in webkit [213493] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[CMake] SN-DBS fails to build: Cannot open include file: 'WebCoreTestSupportPrefix.h'
https://bugs.webkit.org/show_bug.cgi?id=169244

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-06
Reviewed by Alex Christensen.

A distributed build system SN-DBS can not find
WebCoreTestSupportPrefix.h without an include path to it.

  • CMakeLists.txt: Add 'WebCore/testing/js' to include paths.
7:37 PM Changeset in webkit [213492] by msaboff@apple.com
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix after r213483.

  • Configurations/Base.xcconfig:
7:11 PM Changeset in webkit [213491] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[cairo] error C2065: 'quality': undeclared identifier since r213412
https://bugs.webkit.org/show_bug.cgi?id=169240

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-06
Reviewed by Ryosuke Niwa.

  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBuffer::toDataURL): Name the unnamed second argument 'quality'.

7:09 PM Changeset in webkit [213490] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[Mac][WK2] Support new CoreMedia routing features
https://bugs.webkit.org/show_bug.cgi?id=169241
<rdar://problem/30077969>

Reviewed by Alexey Proskuryakov.

  • WebProcess/com.apple.WebProcess.sb.in:
6:56 PM Changeset in webkit [213489] by jiewen_tan@apple.com
  • 19 edits
    6 copies
    15 adds in trunk

[WebCrypto] Implement ECDH GenerateKey operation
https://bugs.webkit.org/show_bug.cgi?id=169093
<rdar://problem/23789585>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt:

Source/WebCore:

This patch implements GenerateKey operation of ECDH according to:
https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.
Note: Sad that we are not able to support P-521 at this moment due
to lack of necessary support in the underlying crypto library.

Tests: crypto/subtle/ec-generate-key-malformed-parameters.html

crypto/subtle/ecdh-generate-key-extractable.html
crypto/subtle/ecdh-generate-key-p256.html
crypto/subtle/ecdh-generate-key-p384.html
crypto/subtle/ecdh-generate-key-single-usage.html
crypto/workers/subtle/ec-generate-key.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCryptoKeyCustom.cpp:

(WebCore::JSCryptoKey::algorithm):

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
Add support for ECDH.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::write):
Structured clonable will be added later on.

  • crypto/CommonCryptoUtilities.h:

Add SPI for EC.

  • crypto/CryptoAlgorithmParameters.h:
  • crypto/CryptoKey.h:
  • crypto/algorithms/CryptoAlgorithmECDH.cpp: Added.

(WebCore::CryptoAlgorithmECDH::create):
(WebCore::CryptoAlgorithmECDH::identifier):
(WebCore::CryptoAlgorithmECDH::generateKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h: Added.
  • crypto/gnutls/CryptoKeyECGnuTLS.cpp: Added.

(WebCore::CryptoKeyEC::~CryptoKeyEC):
(WebCore::CryptoKeyEC::platformGeneratePair):

  • crypto/keys/CryptoKeyEC.cpp: Added.

(WebCore::CryptoKeyEC::CryptoKeyEC):
(WebCore::CryptoKeyEC::generatePair):
(WebCore::CryptoKeyEC::buildAlgorithm):
(WebCore::CryptoKeyEC::exportData):

  • crypto/keys/CryptoKeyEC.h: Added.

(WebCore::EcKeyAlgorithm::EcKeyAlgorithm):
(WebCore::EcKeyAlgorithm::namedCurve):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
Add support for ECDH.

  • crypto/mac/CryptoKeyECMac.cpp: Added.

(WebCore::CryptoKeyEC::~CryptoKeyEC):
(WebCore::CryptoKeyEC::platformGeneratePair):

  • crypto/parameters/CryptoAlgorithmEcKeyParams.h: Added.
  • crypto/parameters/EcKeyParams.idl: Added.

LayoutTests:

  • crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/ec-generate-key-malformed-parameters.html: Added.
  • crypto/subtle/ecdh-generate-key-extractable-expected.txt: Added.
  • crypto/subtle/ecdh-generate-key-extractable.html: Added.
  • crypto/subtle/ecdh-generate-key-p256-expected.txt: Added.
  • crypto/subtle/ecdh-generate-key-p256.html: Added.
  • crypto/subtle/ecdh-generate-key-p384-expected.txt: Added.
  • crypto/subtle/ecdh-generate-key-p384.html: Added.
  • crypto/subtle/ecdh-generate-key-single-usage-expected.txt: Added.
  • crypto/subtle/ecdh-generate-key-single-usage.html: Added.
  • crypto/workers/subtle/ec-generate-key-expected.txt: Added.
  • crypto/workers/subtle/ec-generate-key.html: Added.
  • crypto/workers/subtle/resources/ec-generate-key.js: Added.
6:54 PM Changeset in webkit [213488] by jmarcell@apple.com
  • 6 edits in tags/Safari-604.1.8.1.2/Source

Versioning.

6:46 PM Changeset in webkit [213487] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.8.1.2

Tag Safari-604.1.8.1.2.

6:32 PM Changeset in webkit [213486] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix unused parameter warning after r213464

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::getFontSelectionCapabilitiesInFamily):

6:31 PM Changeset in webkit [213485] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Mark WTF_Lock.ContendedLongSection and WTF_WordLock.ContendedLongSection as slow.

Unreviewed test gardening.

The ContendedShortSection version of this tests were already marked as slow.
And the ContendedLongSection version takes more or less the same time to run.
They cause time outs on the bot sometimes.

  • Scripts/run-gtk-tests:

(TestRunner):

6:10 PM Changeset in webkit [213484] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Unreviewed. Fix test expected error message.

  • wasm/js-api/element.js:

(assert.throws):

5:51 PM Changeset in webkit [213483] by msaboff@apple.com
  • 18 edits in trunk

Take advantage of fast permissions switching of JIT memory for devices that support it
https://bugs.webkit.org/show_bug.cgi?id=169155

Reviewed by Saam Barati.

Source/JavaScriptCore:

Start using the os_thread_self_restrict_rwx_to_XX() SPIs when available to
control access to JIT memory.

Had to update the Xcode config files to handle various build variations of
public and internal SDKs.

  • Configurations/Base.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • jit/ExecutableAllocator.cpp:

(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
(JSC::FixedVMPoolExecutableAllocator::initializeSeparatedWXHeaps):

  • jit/ExecutableAllocator.h:

(JSC::performJITMemcpy):

Source/WebCore:

Updated the Xcode config files to match what is in the JavaScriptCore ones.

  • Configurations/Base.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebCore.xcconfig:

Source/WebCore/PAL:

Updated the Xcode config files to match what is in the JavaScriptCore ones.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Updated the Xcode config files to match what is in the JavaScriptCore ones.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Updated the Xcode config files to match what is in the JavaScriptCore ones.

  • Configurations/FeatureDefines.xcconfig:

Tools:

Updated the Xcode config files to match what is in the JavaScriptCore ones.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
5:39 PM Changeset in webkit [213482] by aakash_jain@apple.com
  • 4 edits in trunk/Source

Make WKMenuItemIdentifiersPrivate.h private header
https://bugs.webkit.org/show_bug.cgi?id=168981

Reviewed by Tim Horton.

Source/WebCore:

  • platform/spi/mac/NSMenuSPI.h: NSUserInterfaceItemIdentification is in the public header in recent SDKs.

Source/WebKit2:

  • WebKit2.xcodeproj/project.pbxproj: Made WKMenuItemIdentifiersPrivate.h private.
5:39 PM Changeset in webkit [213481] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Replace -sub_umbrella linker flag with a build setting
https://bugs.webkit.org/show_bug.cgi?id=169146

Reviewed by Tim Horton.

  • Configurations/WebKit.xcconfig:
5:29 PM Changeset in webkit [213480] by hyatt@apple.com
  • 22 edits
    2 adds in trunk

REGRESSION: Block no longer shrinks to preferred width in this flex box layout
https://bugs.webkit.org/show_bug.cgi?id=169203
<rdar://problem/30873895>

Reviewed by Simon Fraser.

Source/WebCore:

Added new test in css3/flexbox.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustStyleForAlignment):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerElement::resolveCustomStyle):
Resolve auto alignment values by adjusting the render style as needed. Make a helper
function for adjusting only alignment that can be called from the inner text control
custom style creation.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild):
Replaced items in grids should not stretch by default.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hasStretchedLogicalWidth):
Patched to properly check the default alignment for the child, making sure
that if it's a replacd item inside a grid, that the default is start and not
stretch.

  • rendering/RenderBox.h:

(WebCore::RenderBox::selfAlignmentNormalBehavior):
Self-alignment function now takes an optional child argument, since the behavior
varies in grids depending on the child being replaced or not.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::alignmentForChild):
Fixed to do the right thing when the child is anonymous.

(WebCore::RenderFlexibleBox::styleDidChange): Deleted.

  • rendering/RenderFlexibleBox.h:

Deleted, since alignment changes are handled at the style diff level now.

  • rendering/RenderFullScreen.h:

Patched the selfAlignmentNormalBehavior method to take an optional child argument.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::alignSelfForChild):
(WebCore::RenderGrid::justifySelfForChild):
(WebCore::RenderGrid::columnAxisPositionForChild):
(WebCore::RenderGrid::rowAxisPositionForChild):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::defaultAlignmentIsStretch): Deleted.
(WebCore::defaultAlignmentChangedToStretchInRowAxis): Deleted.
(WebCore::defaultAlignmentChangedFromStretchInRowAxis): Deleted.
(WebCore::defaultAlignmentChangedFromStretchInColumnAxis): Deleted.
(WebCore::selfAlignmentChangedToStretchInRowAxis): Deleted.
(WebCore::selfAlignmentChangedFromStretchInRowAxis): Deleted.
(WebCore::selfAlignmentChangedFromStretchInColumnAxis): Deleted.

  • rendering/RenderGrid.h:

Removed the alignment change logic in styleDidChange for grids, since style diffing handles
it now. Updated all selfAlignmentForNormalBehavior queries to pass in the child so that
replaced elements are handled properly.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::overflowInlineDirection):
(WebCore::RenderStyle::overflowBlockDirection):
(WebCore::RenderStyle::setJustifySelfPosition):
New helpers used by grid and by adjustRenderStyle.

  • style/StyleChange.cpp:

(WebCore::Style::determineChange):
If alignment or justification changes occur on a parent that could affect the child (e.g., align-items)
return Inherit so the child render styles get adjusted properly.

LayoutTests:

  • css3/flexbox/column-inside-normal-block-preferred-width-expected.html: Added.
  • css3/flexbox/column-inside-normal-block-preferred-width.html: Added.
  • fast/css-grid-layout/grid-align-stretching-replaced-items-expected.txt:
  • fast/css-grid-layout/grid-align-stretching-replaced-items.html:
  • fast/repaint/align-items-change-expected.txt:
  • fast/repaint/align-items-overflow-change-expected.txt:
  • fast/repaint/justify-items-change-expected.txt:
  • fast/repaint/justify-items-legacy-change-expected.txt:
  • fast/repaint/justify-items-overflow-change-expected.txt:
4:20 PM Changeset in webkit [213479] by Lucas Forschler
  • 2 edits in trunk/Tools

https://bugs.webkit.org/show_bug.cgi?id=169234
torchmobile.com.cn is no longer a registered domain. These email addresses will bounce, so clean them up.

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/config/contributors.json:
4:09 PM Changeset in webkit [213478] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: numberOfChannels == 2 in WebCore::RealtimeIncomingAudioSource::OnData
https://bugs.webkit.org/show_bug.cgi?id=169224
<rdar://problem/30856811>

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-06
Reviewed by Alex Christensen.

  • platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::OnData): Updated assertion to allow 1 channel since we can handle it as well.

3:38 PM Changeset in webkit [213477] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/worker/console-basic.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169228

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:33 PM Changeset in webkit [213476] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark scrollingcoordinator/ios/non-stable-viewport-scroll.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=168924

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
3:29 PM Changeset in webkit [213475] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169159

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:24 PM Changeset in webkit [213474] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169158

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:07 PM Changeset in webkit [213473] by Chris Dumez
  • 9 edits
    2 adds in trunk

[iOS] Throttle CSS animations to 30fps in low power mode
https://bugs.webkit.org/show_bug.cgi?id=169138
<rdar://problem/30837805>

Reviewed by Said Abou-Hallawa.

Source/WebCore:

Throttle software CSS animations to 30fps in low power mode on iOS
to save battery.

Test: fast/animation/css-animation-throttling-lowPowerMode.html

  • page/Page.cpp:

(WebCore::Page::handleLowModePowerChange):

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::CSSAnimationControllerPrivate):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
(WebCore::CSSAnimationControllerPrivate::updateThrottlingState):
(WebCore::CSSAnimationControllerPrivate::animationInterval):
(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdate):
(WebCore::CSSAnimationController::updateThrottlingState):
(WebCore::CSSAnimationController::animationInterval):

  • page/animation/CSSAnimationController.h:
  • page/animation/CSSAnimationControllerPrivate.h:
  • testing/Internals.cpp:

(WebCore::Internals::animationsInterval):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

Add layout test coverage.

  • fast/animation/css-animation-throttling-lowPowerMode-expected.txt: Added.
  • fast/animation/css-animation-throttling-lowPowerMode.html: Added.
3:07 PM Changeset in webkit [213472] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r212778): It made 400 tests crash on AArch64 Linux
https://bugs.webkit.org/show_bug.cgi?id=168502

Reviewed by Filip Pizlo.

  • heap/RegisterState.h: Use setjmp code path on AArch64 Linux too to fix crashes.
3:06 PM Changeset in webkit [213471] by mrajca@apple.com
  • 7 edits in trunk

Media: notify clients when the user never plays a media element that was prevented from auto-playing
https://bugs.webkit.org/show_bug.cgi?id=169150

Reviewed by Alex Christensen.

Source/WebCore:

Added API tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):

  • page/AutoplayEvent.h:

Source/WebKit2:

  • UIProcess/API/C/WKPageUIClient.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:

(TEST): Added.

2:56 PM Changeset in webkit [213470] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Refactor ContentExtensionParser
https://bugs.webkit.org/show_bug.cgi?id=169214

Reviewed by Brady Eidson.

No change in behavior, as verified by existing API tests.
This will make it easier to use getStringList for other things in coming patches.

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::getStringList):
(WebCore::ContentExtensions::getDomainList):

2:55 PM Changeset in webkit [213469] by achristensen@apple.com
  • 11 edits in trunk

Fix URLs relative to file URLs with paths beginning with Windows drive letters
https://bugs.webkit.org/show_bug.cgi?id=169178

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

Windows drives in file URLs can begin with windows drive letters, such as file:///C:/
which should not be removed when making other URLs relative to them.
See https://url.spec.whatwg.org/#file-slash-state

Covered by new API tests and newly passing web-platform-tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::copyBaseWindowsDriveLetter):
(WebCore::URLParser::copyASCIIStringUntil):
(WebCore::URLParser::parse):

  • platform/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

  • fast/url/relative-win-expected.txt:

Some tests pass now. localhost should indeed be removed according to the latest spec.

2:46 PM Changeset in webkit [213468] by achristensen@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Fix Production libwebrtc build after r213418
https://bugs.webkit.org/show_bug.cgi?id=169217
<rdar://problem/30876775>

Reviewed by Tim Horton.

  • Source/webrtc/base/checks.h:
  • libwebrtc.xcodeproj/project.pbxproj:

MakeCheckOpString was a weak export, and it wasn't needed.
There is an internal build that checks for weak exports and fails if there is one.
Run the check-for-weak-vtables-and-externals script for libwebrtc.dylib like we do for the other frameworks.

2:03 PM Changeset in webkit [213467] by commit-queue@webkit.org
  • 29 edits
    4 adds in trunk

op_get_by_id_with_this should use inline caching
https://bugs.webkit.org/show_bug.cgi?id=162124

Patch by Caio Lima <Caio Lima> on 2017-03-06
Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/super-getter.js: Added.

(A.prototype.get f):
(A):
(B.prototype.get f):
(B):

  • stress/super-force-ic-fail.js: Added.

(let.assert):
(let.aObj.get foo):
(let.obj.jaz):
(let.bObj.get foo):
(let.obj2.foo):

  • stress/super-get-by-id.js: Added.

(assert):
(Base):
(Base.prototype.get name):
(Base.prototype.set name):
(Subclass.prototype.get name):
(Subclass):
(getterName):
(getterValue):
(PolymorphicSubclass.prototype.get value):
(PolymorphicSubclass):
(i.let.BaseCode):
(i.get value):
(MegamorphicSubclass.prototype.get value):
(MegamorphicSubclass):
(let.subObj.get value):
(i.catch):
(subObj.get value):
(BaseException):
(BaseException.prototype.get name):
(SubclassException.prototype.get name):
(SubclassException):
(prototype.foo):
(prototype.get name):
(SubclassExceptionComplex.prototype.get name):
(SubclassExceptionComplex):

  • stress/super-getter-reset-ic.js: Added.

(let.assert):
(let.B.f):

Source/JavaScriptCore:

This patch is enabling inline cache for op_get_by_id_with_this in all
tiers. It means that operations using super.member are going to
be able to be optimized by PIC. To enable it, we introduced a new
member of StructureStubInfo.patch named thisGPR, created a new class
to manage the IC named JITGetByIdWithThisGenerator and changed
PolymorphicAccess.regenerate that uses StructureStubInfo.patch.thisGPR
to decide the correct this value on inline caches.
With inline cached enabled, super.member are ~4.5x faster,
according microbenchmarks.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:
  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::reset):

  • bytecode/StructureStubInfo.h:
  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addGetByIdWithThis):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileIn):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/ICStats.h:
  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITGetByIdWithThisGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):

  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):

  • jit/Repatch.cpp:

(JSC::appropriateOptimizingGetByIdFunction):
(JSC::appropriateGenericGetByIdFunction):
(JSC::tryCacheGetByID):

  • jit/Repatch.h:
  • jsc.cpp:

(WTF::CustomGetter::getOwnPropertySlot):
(WTF::CustomGetter::customGetterAcessor):

1:45 PM Changeset in webkit [213466] by Simon Fraser
  • 18 edits
    1 copy
    15 adds in trunk

Only use layer backing store which supports subpixel antialiased text if we know subpixel antialiased will be painted into it
https://bugs.webkit.org/show_bug.cgi?id=169191

Reviewed by Zalan Bujtas.

Source/WebCore:

Instead of unconditionally calling setSupportsSubpixelAntialiasedText() on GraphicsLayers created
by RenderLayerBacking, only do so when we know (or suspect) that a layer contains smoothed text.

This is done by enhancing RenderLayer::isVisuallyNonEmpty() and RenderLayer::hasNonEmptyChildRenderers()
to take a PaintedContentRequest parameter, which allows the caller to specify what qualities of
the layer contents it is interested in. Most of the time, this is just any painted content, but on
platforms where GraphicsLayer::supportsSubpixelAntialiasedLayerText() returns true, the query also
asks about whether the layer will contain subpixel-antialiased text. In this case, it can't early
return as soon as painted content is found; it must keep iterating renderers while all the query
requests are unsatisfied, or until it hits depth or sibling limits. If a limit is hit, we take the
same path of assuming there is subpixel-antialiased text (via the "Undetermined" state).

RenderLayerBacking also makes use of PaintedContentRequest during its non-composited child layer walk.

To offset the additional cost of this tree walking, RenderLayerBacking now caches information about its
painted content for the duration of a single update via PaintedContentsInfo, so we no longer call
isDirectlyCompositedImage() and isSimpleContainerCompositingLayer() multiple times per backing per update.
The traversal code here too now has to continue until all necessary states in the request have been computed.

Add some functions to RenderImage so that we know if it's showing the alt text or has a non-bitmap image
(which may contain text).

Subpixel-antialiased ("smoothed") text is disabled by DRT and WTR by default, so we need Internals API to enable it.

Platforms now express their support for subpixel-antialiased text via GraphicsLayer::supportsSubpixelAntialiasedLayerText()
which only returns true on Mac.

Tests: compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style.html

compositing/contents-format/subpixel-antialiased-text-configs.html
compositing/contents-format/subpixel-antialiased-text-images.html
compositing/contents-format/subpixel-antialiased-text-visibility.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::supportsSubpixelAntialiasedLayerText):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayer::supportsSubpixelAntialiasedLayerText):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::isShowingMissingOrImageError):
(WebCore::RenderImage::isShowingAltText):
(WebCore::RenderImage::hasNonBitmapImage):

  • rendering/RenderImage.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::PaintedContentsInfo::PaintedContentsInfo):
(WebCore::PaintedContentsInfo::setWantsSubpixelAntialiasedTextState):
(WebCore::PaintedContentsInfo::paintsBoxDecorations):
(WebCore::PaintedContentsInfo::paintsContent):
(WebCore::PaintedContentsInfo::paintsSubpixelAntialiasedText):
(WebCore::PaintedContentsInfo::isSimpleContainer):
(WebCore::PaintedContentsInfo::isDirectlyCompositedImage):
(WebCore::PaintedContentsInfo::paintsBoxDecorationsDetermination):
(WebCore::PaintedContentsInfo::paintsContentDetermination):
(WebCore::PaintedContentsInfo::paintsSubpixelAntialiasedTextDetermination):
(WebCore::PaintedContentsInfo::contentsTypeDetermination):
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect):
(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations):
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::paintsContent):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
(WebCore::RenderLayerBacking::hasVisibleNonCompositedDescendants):
(WebCore::RenderLayerBacking::containsPaintedContent):
(WebCore::RenderLayerBacking::contentChanged):
(WebCore::RenderLayerBacking::updateImageContents):
(WebCore::RenderLayerBacking::paintsChildRenderers): Deleted.

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):

  • testing/Internals.cpp:

(WebCore::Internals::setFontSmoothingEnabled):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

Test lots of layer configs for subpixel antialiased text support. Only Mac results show the
"(supports subpixel antialiased text 1)" flag on layers now, since the patch makes this
dependent on platform support.

  • compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: Added.
  • compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style.html: Added.
  • compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: Added.
  • compositing/contents-format/subpixel-antialiased-text-configs.html: Added.
  • compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt:
  • compositing/contents-format/subpixel-antialiased-text-enabled.html:
  • compositing/contents-format/subpixel-antialiased-text-images-expected.txt: Added.
  • compositing/contents-format/subpixel-antialiased-text-images.html: Added.
  • compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: Added.
  • compositing/contents-format/subpixel-antialiased-text-visibility.html: Added.
  • compositing/resources/circle-with-text.svg: Added.
  • compositing/resources/circle.svg: Added.
  • platform/mac-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt:
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: Added.
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: Added.
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Copied from LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt.
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-images-expected.txt: Added.
  • platform/mac/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: Added.
1:44 PM Changeset in webkit [213465] by sbarati@apple.com
  • 9 edits in trunk

WebAssembly: implement init_expr for Element
https://bugs.webkit.org/show_bug.cgi?id=165888
<rdar://problem/29760199>

Reviewed by Keith Miller.

JSTests:

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Element):

  • wasm/assert.js:
  • wasm/js-api/element.js:

(assert.throws):
(badInstantiation.makeModule):
(badInstantiation.test):
(badInstantiation):

  • wasm/js-api/global-error.js:

Source/JavaScriptCore:

This patch fixes a few bugs. The main change is allowing init_expr
for the Element's offset. To do this, I had to fix a couple of
other bugs:

  • I removed our invalid early module-parse-time invalidation

of out of bound Element sections. This is not in the spec because
it can't be validated in the general case when the offset is a
get_global.

  • Our get_global validation inside our init_expr parsing code was simply wrong.

It thought that the index operand to get_global went into the pool of imports,
but it does not. It indexes into the pool of globals. I changed the code to
refer to the global pool instead.

  • wasm/WasmFormat.h:

(JSC::Wasm::Element::Element):

  • wasm/WasmModuleParser.cpp:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::evaluate):

1:40 PM Changeset in webkit [213464] by mmaxfield@apple.com
  • 56 edits
    2 copies
    7 adds in trunk

Expand font-weight and font-stretch to take any number
https://bugs.webkit.org/show_bug.cgi?id=168889

Reviewed by Simon Fraser.

Source/WebCore:

This patch expands parsing support for font-weight and font-stretch so that they can accept
numbers in addition to the keyword values they accepted previously. Eventually, these numbers
will be used as inputs to select variation fonts; however, in this patch, the values are just
parsed and held in our internal data model. This means that this patch doesn't actually change
the general behavior of WebKit; instead, it parses new values, outputs them (via
getComputedStyle() and similar functions), and provides them as input to our preexisting font
selection algorithm.

This patch doesn't actually modify anything algorithmically, and therefore, it doesn't include
any additional tests for the font selection algorithm. Instead, it tests the parsing of the
newly accepted values (both input and output).

Because our internal data model needs to hold numbers now, this patch also completely eliminates
the FontWidth, FontItalic, and FontTraitsMask enum values in favor of FontSelectionValues (which
can hold numbers instead of individual enum values). Therefore, every place which we were using
these enum values is migrated in this patch to using FontSelectionValues instead.

Tests: fast/text/font-selection-font-face-parse.html

fast/text/font-selection-font-loading-api-parse.html
fast/text/font-style-parse.html
fast/text/font-weight-parse.html

  • accessibility/AccessibilityRenderObject.cpp: Migrate off of old enum types.

(WebCore::AccessibilityRenderObject::hasBoldFont):
(WebCore::AccessibilityRenderObject::hasItalicFont):
(WebCore::AccessibilityRenderObject::hasPlainText):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp: Ditto.

(getAttributeSetForAccessibilityObject):

  • css/CSSComputedStyleDeclaration.cpp: Output newly parsed values.

(WebCore::fontWeightFromStyle):
(WebCore::fontStretchFromStyle):
(WebCore::fontStyleFromStyle):
(WebCore::fontShorthandValueForSelectionProperties):
(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSFontFace.cpp: Migrate off old enum types.

(WebCore::calculateWeightRange):
(WebCore::CSSFontFace::setWeight):
(WebCore::calculateStretchRange):
(WebCore::CSSFontFace::setStretch):
(WebCore::calculateStyleRange):
(WebCore::CSSFontFace::setStyle):
(WebCore::CSSFontFace::calculateStyleMask): Deleted.
(WebCore::CSSFontFace::calculateWeightMask): Deleted.
(WebCore::CSSFontFace::calculateStretch): Deleted.

  • css/CSSFontFace.h:
  • css/CSSFontFaceSet.cpp: Migrate off old enum types.

(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
(WebCore::calculateWeightValue):
(WebCore::calculateStretchValue):
(WebCore::calculateStyleValue):
(WebCore::computeFontSelectionRequest):
(WebCore::CSSFontFaceSet::matchingFaces):
(WebCore::CSSFontFaceSet::fontFace):
(WebCore::computeFontTraitsMask): Deleted.
(WebCore::computeFontStretch): Deleted.

  • css/CSSFontFaceSet.h:
  • css/CSSFontSelector.cpp: Migrate off old enum types.

(WebCore::CSSFontSelector::fontRangesForFamily):

  • css/CSSPrimitiveValueMappings.h: font-weight and font-style are no longer

keyword properties.
(WebCore::CSSPrimitiveValue::operator FontWeight): Deleted.
(WebCore::CSSPrimitiveValue::operator FontItalic): Deleted.

  • css/CSSProperties.json: Use the same infrastructure for all three of the

font selection properties.

  • css/CSSSegmentedFontFace.cpp: Migrate off old enum types.

(WebCore::CSSSegmentedFontFace::fontRanges):

  • css/CSSValueKeywords.in: The 100-based font-weight values are now represented

as real numbers.

  • css/FontFace.cpp: Update the string output functions for the new values.

(WebCore::rangeIsSingleValue):
(WebCore::FontFace::style):
(WebCore::FontFace::weight):
(WebCore::FontFace::stretch):

  • css/StyleBuilderConverter.h: Use CSSValue conversion functions to convert

to our new data model.
(WebCore::StyleBuilderConverter::convertFontWeight):
(WebCore::StyleBuilderConverter::convertFontStretch):
(WebCore::StyleBuilderConverter::convertFontStyle):

  • css/StyleBuilderCustom.h: font-weight is no longer a completely custom

property.
(WebCore::StyleBuilderCustom::applyInitialFontWeight): Deleted.
(WebCore::StyleBuilderCustom::applyInheritFontWeight): Deleted.
(WebCore::StyleBuilderCustom::applyValueFontWeight): Deleted.

  • css/parser/CSSParserFastPaths.cpp: font-style is no longer a keyword property.

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp: Parse the new values in the font selection

properties.
(WebCore::consumeFontWeightKeywordValue):
(WebCore::consumeFontWeightCSS21):
(WebCore::consumeFontWeight):
(WebCore::consumeFontStyleKeywordValue):
(WebCore::consumeFontStyle):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::consumeFont):

  • editing/EditingStyle.cpp: Migrate off old enum types.

(WebCore::fontWeightIsBold):

  • editing/mac/EditorMac.mm: Ditto.

(WebCore::Editor::applyFontStyles):

  • platform/graphics/FontCache.h: Unify our font selection values into

their enclosing struct, FontSelectionCapabilities. Also, clean up utility
functions.

  • platform/graphics/FontCascade.cpp: Migrate off old enum types.

(WebCore::FontCascade::FontCascade):

  • platform/graphics/FontCascade.h: Ditto.

(WebCore::FontCascade::italic):
(WebCore::FontCascade::weight):

  • platform/graphics/FontDescription.cpp: Ditto.

(WebCore::FontDescription::FontDescription):
(WebCore::FontCascadeDescription::lighterWeight):
(WebCore::FontCascadeDescription::bolderWeight):
(WebCore::FontDescription::traitsMask): Deleted.

  • platform/graphics/FontDescription.h: Migrate off old enum types.

(WebCore::FontDescription::italic):
(WebCore::FontDescription::stretch):
(WebCore::FontDescription::weight):
(WebCore::FontDescription::fontSelectionRequest):
(WebCore::FontDescription::computedPixelSize):
(WebCore::FontDescription::setItalic):
(WebCore::FontDescription::setStretch):
(WebCore::FontDescription::setIsItalic):
(WebCore::FontDescription::setWeight):
(WebCore::FontDescription::operator==):
(WebCore::FontCascadeDescription::lighterWeight):
(WebCore::FontCascadeDescription::bolderWeight):
(WebCore::FontCascadeDescription::initialItalic):
(WebCore::FontCascadeDescription::initialWeight):
(WebCore::FontCascadeDescription::initialStretch):

  • platform/graphics/FontSelectionAlgorithm.cpp: Delete code which was only

present to convert from the old enum types to the new FontSelectionRequest
type.
(WebCore::fontSelectionRequestForTraitsMask): Deleted.
(WebCore::initialFontSelectionCapabilitiesForTraitsMask): Deleted.
(WebCore::fontSelectionCapabilitiesForTraitsMask): Deleted.

  • platform/graphics/FontSelectionAlgorithm.h: Migrate to new named functions

for special values.
(WebCore::isItalic):
(WebCore::boldWeightValue):
(WebCore::normalWeightValue):
(WebCore::isFontWeightBold):
(WebCore::normalStretchValue):
(WebCore::FontSelectionRequest::FontSelectionRequest):

  • platform/graphics/cocoa/FontCacheCoreText.cpp: Migrate all platforms which

compile this file to know about FontDatabase. This simplifies the interaction
between @font-face fonts and installed fonts. Also, migrate off old enum types.
(WebCore::stretchFromCoreTextTraits):
(WebCore::fontWeightFromCoreText):
(WebCore::capabilitiesForFontDescriptor):
(WebCore::FontCache::getFontSelectionCapabilitiesInFamily):
(WebCore::platformFontLookupWithFamily):
(WebCore::invalidateFontCache):
(WebCore::fontWithFamily):
(WebCore::FontCache::createFontPlatformData):
(WebCore::lookupFallbackFont):
(WebCore::toTraitsMask): Deleted.
(WebCore::isFontWeightBold): Deleted.
(WebCore::toCoreTextFontWeight): Deleted.
(): Deleted.
(WebCore::FontDatabase::capabilitiesForFontDescriptor): Deleted.
(WebCore::calculateFontSelectionRequest): Deleted.

  • platform/graphics/freetype/FontCacheFreeType.cpp: Migrate off old enum types.

(WebCore::FontCache::getFontSelectionCapabilitiesInFamily):
(WebCore::fontWeightToFontconfigWeight):
(): Deleted.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp: Ditto.

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/ios/FontCacheIOS.mm: Ditto.

(WebCore::baseSystemFontDescriptor):
(WebCore::systemFontModificationAttributes):
(WebCore::systemFontDescriptor):
(WebCore::platformFontWithFamilySpecialCase):
(WebCore::FontCache::weightOfCTFont): Deleted.

  • platform/graphics/mac/FontCacheMac.mm: Ditto.

(WebCore::toNSFontWeight):
(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/win/FontCacheWin.cpp: Ditto.

(WebCore::toGDIFontWeight):
(WebCore::traitsInFamilyEnumProc):
(WebCore::FontCache::getFontSelectionCapabilitiesInFamily):
(): Deleted.

  • platform/mock/MockRealtimeVideoSource.cpp: Ditto.

(WebCore::MockRealtimeVideoSource::applySize):

  • platform/text/TextFlags.h: Delete old enum types.
  • platform/win/DragImageWin.cpp: Migrate off old enum types.

(WebCore::dragLabelFont):

  • rendering/RenderEmbeddedObject.cpp: Ditto.

(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):

  • rendering/RenderThemeGtk.cpp: Ditto.

(WebCore::RenderThemeGtk::updateCachedSystemFontDescription):

  • rendering/RenderThemeIOS.mm: Ditto.

(WebCore::RenderThemeIOS::updateCachedSystemFontDescription):

  • rendering/RenderThemeMac.mm: Ditto.

(WebCore::toFontWeight):

  • rendering/RenderThemeWin.cpp: Ditto.

(WebCore::fillFontDescription):

Source/WebKit/mac:

Migrate off old enum types.

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::populate):

  • WebView/WebHTMLView.mm:

(fontNameForDescription):

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

Source/WebKit/win:

Migrate off old enum types.

  • WebKitGraphics.cpp:

(makeFont):

Source/WebKit2:

Migrate off old enum types.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::editorState):

Tools:

Migrate off old enum types.

  • TestWebKitAPI/Tests/WebCore/FontCache.cpp:

(TestWebKitAPI::createPlatformFont):
(TestWebKitAPI::compareFonts):
(TestWebKitAPI::TEST_F):

LayoutTests:

  • fast/text/font-selection-font-face-parse-expected.txt: Added.
  • fast/text/font-selection-font-face-parse.html: Added.
  • fast/text/font-selection-font-loading-api-parse-expected.txt: Added.
  • fast/text/font-selection-font-loading-api-parse.html: Added.
  • fast/text/font-stretch-parse-expected.txt:
  • fast/text/font-stretch-parse.html:
  • fast/text/font-style-parse-expected.txt: Copied from LayoutTests/fast/text/font-stretch-parse-expected.txt.
  • fast/text/font-style-parse.html: Added.
  • fast/text/font-weight-parse-expected.txt: Copied from LayoutTests/fast/text/font-stretch-parse-expected.txt.
  • fast/text/font-weight-parse.html: Added.
1:14 PM Changeset in webkit [213463] by Jon Davis
  • 5 edits
    1 copy in trunk/PerformanceTests

Refined the ARES-6 experience
https://bugs.webkit.org/show_bug.cgi?id=169205

Reviewed by Saam Barati.

  • ARES-6/about.html: Copied from PerformanceTests/ARES-6/index.html.
  • ARES-6/driver.js:

(Driver.prototype.start):
(Driver.prototype._updateIterations):
(Driver):

  • ARES-6/index.html:
  • ARES-6/stats.js:

(Stats.prototype.toString.span.span):

  • ARES-6/styles.css:

(body):
(.swoop):
(p):
(.logo):
(.start):
(.test):
(.test:nth-child(odd)):
(.overall):
(.about h2):
(.button):
(.button:hover):
(.button.return:before):
(@keyframes fade-in):
(@keyframes scale-in):
(@keyframes flicker-in):
(@keyframes wipe-in):
(.flip): Deleted.
(.testing, .about): Deleted.
(.testing): Deleted.
(.about): Deleted.
(#about:target): Deleted.

1:13 PM Changeset in webkit [213462] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Mark fast/parser/adoption-agency-unload-iframe-4.html as timing out on platform GTK.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
12:27 PM Changeset in webkit [213461] by commit-queue@webkit.org
  • 2 edits in trunk/PerformanceTests

StandardCanPlayThrough.html does not work on iOS.
https://bugs.webkit.org/show_bug.cgi?id=169207

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-03-06
Reviewed by Jer Noble.

On iOS only, add muted=true and autoplay=allowed. The loading policy on iOS requires these attributes to load enough
data to trigger canPlayThrough.

  • Media/StandardCanPlayThrough.html:
11:43 AM Changeset in webkit [213460] by Chris Dumez
  • 12 edits
    2 adds in trunk

[iOS] Disable autoplay of silent videos in low power mode
https://bugs.webkit.org/show_bug.cgi?id=168985
<rdar://problem/30739051>

Reviewed by Jer Noble.

Source/WebCore:

Disable autoplay of silent videos in low power mode on iOS to save battery.
We force the display of the start button when denying autoplay in low power
mode to allow the user to start playback.

Test: media/modern-media-controls/start-support/start-support-lowPowerMode.html

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::shouldForceControlsDisplay):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:

Add shouldForceControlsDisplay property on MediaControlsHost. This property
is set to true when we want to force the display for media controls. Currently,
this only returns true for autoplay videos, while in low power mode.

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype._updateControls):
Take into consideration MediaControlsHost.shouldForceControlsDisplay when
initializing shouldShowControls variable.

  • Modules/modern-media-controls/media/start-support.js:

(StartSupport.prototype._shouldShowStartButton):
Show the start button when MediaControlsHost.shouldForceControlsDisplay
returns true.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
Add MediaElementSession::RequireUserGestureForVideoDueToLowPowerMode restriction
to the session when low power mode is enabled so we know we need to force a
gesture to start playback of autoplay videos.

(WebCore::HTMLMediaElement::shouldForceControlsDisplay):
Add convenience function to decide if we should force display of media controls.
This returns true if the media element is a video with autoplay attribute and
its session has the MediaElementSession::RequireUserGestureForVideoDueToLowPowerMode
restriction (i.e. we are in low power mode).

(WebCore::HTMLMediaElement::configureMediaControls):
Force requireControls variable to true if shouldForceControlsDisplay() returns
true. We do this here instead of inside HTMLMediaElement::controls() because
we do not want to change the value of media.controls exposed to JavaScript.

(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
Add MediaElementSession::RequireUserGestureForVideoDueToLowPowerMode to the list
of restrictions that get removed on user gesture.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted):
Deny playback for videos that have the RequireUserGestureForVideoDueToLowPowerMode
restriction unless there is a user gesture.

  • html/MediaElementSession.h:

Add new MediaElementSession::RequireUserGestureForVideoDueToLowPowerMode
restriction.

LayoutTests:

Add layout test coverage.

  • media/modern-media-controls/start-support/start-support-lowPowerMode-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-lowPowerMode.html: Added.
11:24 AM Changeset in webkit [213459] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/icon-button/icon-button-active-state.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167752

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:14 AM Changeset in webkit [213458] by Chris Dumez
  • 16 edits in trunk

LayoutTest fast/dom/timer-throttling-hidden-page.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168927

Reviewed by Simon Fraser.

Source/WebCore:

Update internals.isTimerThrottled() to return true for any kind of throttling.
It used to only account only for specific timers that do not cause changes
inside the viewport. It now accounts for all kind of throttling, such as
timer alignment due to the page being hidden.

  • page/DOMTimer.h:
  • testing/Internals.cpp:

(WebCore::Internals::isTimerThrottled):

LayoutTests:

  • fast/dom/nested-timer-visible-element-throttling.html:
  • fast/dom/repeating-timer-element-overflow-throttling.html:
  • fast/dom/repeating-timer-element-overflowing-child-own-layer-throttling.html:
  • fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling.html:
  • fast/dom/repeating-timer-visible-element-throttling.html:
  • fast/dom/timer-height-change-no-throttling.html:
  • fast/frames/flattening/resources/iframe-to-resize.html:

Use 10 milliseconds interval for tests relying on internals.isTimerThrottled().
Using 0 is problematic because we always internally cap to 1ms and 4ms after
reaching the max nesting level. Therefore, a 0 delay timer is always considered
to be throttled.

  • fast/dom/timer-throttling-hidden-page-expected.txt:
  • fast/dom/timer-throttling-hidden-page-non-nested-expected.txt:
  • fast/dom/timer-throttling-hidden-page-non-nested.html:
  • fast/dom/timer-throttling-hidden-page.html:

Rewrite tests to stop measuring timer intervals as this is inherently
flaky and rely on internals.isTimerThrottled() instead.

  • platform/mac/TestExpectations:

Unskip test that used to be flaky.

11:09 AM Changeset in webkit [213457] by Manuel Rego Casasnovas
  • 5 edits
    286 adds in trunk/LayoutTests

[css-grid] Import W3C Test Suite
https://bugs.webkit.org/show_bug.cgi?id=169196

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

This patch imports the CSS Grid Layout test suite from csswg-test repository:
https://github.com/w3c/csswg-test/tree/master/css-grid-1

  • csswg-test/css-grid-1/OWNERS: Added.
  • csswg-test/css-grid-1/README.md: Added.
  • csswg-test/css-grid-1/grid-definition/fr-unit-expected.html: Added.
  • csswg-test/css-grid-1/grid-definition/fr-unit-with-percentage-expected.html: Added.
  • csswg-test/css-grid-1/grid-definition/fr-unit-with-percentage.html: Added.
  • csswg-test/css-grid-1/grid-definition/fr-unit.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-flexible-lengths-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-flexible-lengths-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-grid-template-areas-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-grid-template-areas-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-grid-template-columns-rows-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-grid-template-columns-rows-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-named-grid-lines-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-named-grid-lines-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-repeat-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-support-repeat-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-template-columns-rows-resolved-values-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-inline-template-columns-rows-resolved-values-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-layout-auto-tracks-expected.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-layout-auto-tracks.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-layout-basic-expected.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-layout-basic.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-layout-repeat-notation-expected.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-layout-repeat-notation.html: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-flexible-lengths-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-flexible-lengths-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-grid-template-areas-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-grid-template-areas-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-grid-template-columns-rows-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-grid-template-columns-rows-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-named-grid-lines-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-named-grid-lines-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-repeat-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-support-repeat-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/grid-template-columns-rows-resolved-values-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-definition/grid-template-columns-rows-resolved-values-001.xht: Added.
  • csswg-test/css-grid-1/grid-definition/support/testing-utils.js: Added.

(checkGridTemplateRows):
(testGridTemplateColumnsRows):
(testGridTemplateAreas):
(TestingUtils):

  • csswg-test/css-grid-1/grid-definition/support/w3c-import.log: Added.
  • csswg-test/css-grid-1/grid-definition/w3c-import.log: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-inline-blocks-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-items-inline-blocks-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-auto-placement-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-order-property-painting-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-006-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-inline-z-axis-ordering-overlapped-items-006.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-001.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-002.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-003.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-item-containing-block-004.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-inline-blocks-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-inline-blocks-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-sizing-alignment-001-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-items-sizing-alignment-001.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-layout-grid-in-grid-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-layout-grid-in-grid.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-layout-z-order-a-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-layout-z-order-a.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-layout-z-order-b-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-layout-z-order-b.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-005-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-006-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-006.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-007-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-007.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-008-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-008.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-009-expected.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-009.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-010-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-010.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-011-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-011.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-012-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-012.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-013-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-013.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-014-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-014.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-015-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-015.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-016-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-016.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-017-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-017.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-018-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-minimum-size-grid-items-018.html: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-auto-placement-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-order-property-painting-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-001.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-002.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-003.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-004-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-004.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-005-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-005.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-006-expected.xht: Added.
  • csswg-test/css-grid-1/grid-items/grid-z-axis-ordering-overlapped-items-006.xht: Added.
  • csswg-test/css-grid-1/grid-items/ref-filled-green-100px-square-image.html: Added.
  • csswg-test/css-grid-1/grid-items/support/100x100-green.png: Added.
  • csswg-test/css-grid-1/grid-items/support/100x50-green.png: Added.
  • csswg-test/css-grid-1/grid-items/support/200x200-green.png: Added.
  • csswg-test/css-grid-1/grid-items/support/50x100-green.png: Added.
  • csswg-test/css-grid-1/grid-items/support/50x50-green.png: Added.
  • csswg-test/css-grid-1/grid-items/support/w3c-import.log: Added.
  • csswg-test/css-grid-1/grid-items/w3c-import.log: Added.
  • csswg-test/css-grid-1/grid-layout-properties-expected.txt: Added.
  • csswg-test/css-grid-1/grid-layout-properties.html: Added.
  • csswg-test/css-grid-1/grid-model/display-grid-expected.html: Added.
  • csswg-test/css-grid-1/grid-model/display-grid.html: Added.
  • csswg-test/css-grid-1/grid-model/display-inline-grid-expected.html: Added.
  • csswg-test/css-grid-1/grid-model/display-inline-grid.html: Added.
  • csswg-test/css-grid-1/grid-model/grid-computed-value-display-floated-items-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-model/grid-computed-value-display-floated-items-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-display-grid-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-display-grid-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-display-inline-grid-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-display-inline-grid-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-letter-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-letter-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-letter-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-letter-002.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-letter-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-letter-003.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-line-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-line-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-line-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-line-002.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-line-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-first-line-003.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-float-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-float-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-floats-no-intrude-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-floats-no-intrude-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-letter-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-letter-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-letter-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-letter-002.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-letter-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-letter-003.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-line-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-line-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-line-002-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-line-002.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-line-003-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-first-line-003.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-float-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-float-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-floats-no-intrude-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-floats-no-intrude-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-margins-no-collapse-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-margins-no-collapse-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-multicol-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-multicol-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-vertical-align-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-inline-vertical-align-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-margins-no-collapse-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-margins-no-collapse-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-multicol-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-multicol-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-support-display-001-expected.txt: Added.
  • csswg-test/css-grid-1/grid-model/grid-support-display-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-vertical-align-001-expected.xht: Added.
  • csswg-test/css-grid-1/grid-model/grid-vertical-align-001.xht: Added.
  • csswg-test/css-grid-1/grid-model/w3c-import.log: Added.
  • csswg-test/css-grid-1/implicit-grids/grid-support-grid-auto-columns-rows-001-expected.html: Added.
  • csswg-test/css-grid-1/implicit-grids/grid-support-grid-auto-columns-rows-001.html: Added.
  • csswg-test/css-grid-1/implicit-grids/w3c-import.log: Added.
  • csswg-test/css-grid-1/layout-algorithm/grid-layout-free-space-unit-expected.html: Added.
  • csswg-test/css-grid-1/layout-algorithm/grid-layout-free-space-unit.html: Added.
  • csswg-test/css-grid-1/layout-algorithm/w3c-import.log: Added.
  • csswg-test/css-grid-1/placement/grid-layout-grid-span-expected.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-grid-span.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-lines-expected.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-lines-shorthands-expected.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-lines-shorthands.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-lines.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-placement-shorthands-expected.html: Added.
  • csswg-test/css-grid-1/placement/grid-layout-placement-shorthands.html: Added.
  • csswg-test/css-grid-1/placement/w3c-import.log: Added.
  • csswg-test/css-grid-1/test-plan/index.html: Added.
  • csswg-test/css-grid-1/test-plan/w3c-import.log: Added.
  • csswg-test/css-grid-1/w3c-import.log: Added.
  • resources/import-expectations.json:
  • resources/resource-files.json:

LayoutTests:

A few tests are not passing yet, so the TextExpectations file
has been updated accordingly linking the different bugs.

11:01 AM Changeset in webkit [213456] by clopez@igalia.com
  • 2 edits in trunk/JSTests

[JSC] [Linux] Test stress/spread-forward-call-varargs-stack-overflow.js fails
https://bugs.webkit.org/show_bug.cgi?id=169206

Unreviewed test gardening.

  • stress/spread-forward-call-varargs-stack-overflow.js: Skip on Linux platforms.
10:00 AM Changeset in webkit [213455] by hyatt@apple.com
  • 38 edits
    22 adds
    2 deletes in trunk

Enable fieldsets to be flexboxes, grids and multicolumn.
https://bugs.webkit.org/show_bug.cgi?id=169082

Source/WebCore:

Reviewed by Simon Fraser .

Added new tests in fast/forms/fieldset.

This patch eliminates RenderFieldset and moves the functionality into RenderBlock so that
derived classes can also be fieldsets.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:

Remove RenderFieldset from the project.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::titleUIElement):
Call in to RenderBlock now instead of RenderFieldset.

  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::createElementRenderer):

  • html/HTMLFieldSetElement.h:

The fieldset DOM element now uses RenderElement::createFor to make renderers so that multiple display types
can be supported. A special flag has been added that indicates only to make flexbox and block-related
renderers (not table display types).

  • rendering/OrderIterator.cpp:

(WebCore::OrderIterator::shouldSkipChild):
(WebCore::OrderIteratorPopulator::collectChild):

  • rendering/OrderIterator.h:

Streamline child collection for flexboxes and grids to indicate whether the child should be skipped as a return
value from collectChild. Add a shouldSkipChild method that skips both out of flow positioned objects and
excluded children like the legends of fieldsets.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlockRareData::RenderBlockRareData):
When the legend is taller than the fieldset's borderBefore(), intrinsic border is added to the CSS border width.
This intrinsic border being factored in ensures that the padding and content boxes of fieldsets are correct
across any layout system, since the legend is now just treated as part of the border.

(WebCore::RenderBlock::computePreferredLogicalWidths):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
Call the new computePreferredWidthsForExcludedChildren to ensure that excluded children contribute to
preferred width in their own way and not as part of a specific layout system.

(WebCore::RenderBlock::renderName):
Hacked to still return RenderFieldSet for RenderBlockFlow-backed fieldsets for layout test compatibility.

(WebCore::RenderBlock::layoutExcludedChildren):
Renamed from layoutSpecialExcludedChild to more accurately reflect the fact that multiple excluded children
can be included here (e.g., both a multicolumn flow thread and a legend). The RenderBlock base class handles
the layout of legends by both placing them and setting the correct intrinsic border before amount on the
block.

(WebCore::RenderBlock::findFieldsetLegend):
Moved from RenderFieldset.

(WebCore::RenderBlock::adjustBorderBoxRectForPainting):
(WebCore::RenderBlock::paintRectToClipOutFromBorder):
These methods are used when painting to shrink the border box as needed to account for the legend and to
provide the portion of the border that needs to be clipped out. These methods have been enhanced to
properly support all writing modes.

(WebCore::RenderBlock::intrinsicBorderForFieldset):
(WebCore::RenderBlock::setIntrinsicBorderForFieldset):
(WebCore::RenderBlock::borderTop):
(WebCore::RenderBlock::borderLeft):
(WebCore::RenderBlock::borderBottom):
(WebCore::RenderBlock::borderRight):
(WebCore::RenderBlock::borderBefore):
These methods are overridden for border to ensure that the intrinsic border added by a tall legend is
properly factored in.

(WebCore::RenderBlock::computePreferredWidthsForExcludedChildren):

  • rendering/RenderBlock.h:

This method computes the preferred widths for legend children in order to ensure that the legend properly
grows the width of the fieldset when it is the widest item.

(WebCore::RenderBlock::adjustBorderBoxLogicalHeightForBoxSizing):
(WebCore::RenderBlock::adjustContentBoxLogicalHeightForBoxSizing):
Preserve the behavior of fieldsets in that the available content size includes the space lost accounting
for the legend. I don't think this makes much sense, but it matches the behavior of other browsers
(and our old behavior).

(WebCore::RenderBlock::paintExcludedChildrenInBorder):
Method for painting the excluded children that might be present in our border. We only do this if the
paint phase is a box decoration painting phase and if the legend isn't self-painting.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::willCreateColumns):
Allow fieldsets to create columns now.

(WebCore::RenderBlockFlow::layoutBlockChildren):
(WebCore::RenderBlockFlow::layoutExcludedChildren):
Renamed this method and change it to call the base class to ensure that legends in multicolumn fieldsets
get handled properly.

(WebCore::RenderBlockFlow::addChild):
Patched to make sure legends don't get put into the multicolumn flow thread, as they need to
remain outside of it.

(WebCore::RenderBlockFlow::layoutSpecialExcludedChild): Deleted.
Renamed to layoutExcludedChildren.

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintMask):
Patched to call the new adjustBorderBoxRectForPainting and paintRectToClipOutFromBorder methods in
order to properly shrink the border box rect for painting and to clip out the portion of the border
covered by the legend.

(WebCore::RenderBox::avoidsFloats):
Add fieldsets as avoiding floats. RenderFieldset used to subclass this method to return true, but with
its removal, we need to put this in the base class along with legends.

  • rendering/RenderBox.h:

(WebCore::RenderBox::isGridItem):
(WebCore::RenderBox::isFlexItem):
Patched to exclude legends so that they don't try to size like they are really in the grid or flexbox.

(WebCore::RenderBox::adjustBorderBoxRectForPainting):
This method is overridden by RenderBLock to handle adjusting fieldset border rects for painting.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintBorder):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::paintRectToClipOutFromBorder):
Patched to properly paint fieldsets using the new helpers.

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::FlexBoxIterator::next):
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
Make sure deprecated flexible boxes lay out their legends properly by calling layoutExcludedChildren.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor):

  • rendering/RenderElement.h:

Patched to take a flag that limits what renderers can be created so that fieldsets don't make table
display types.

  • rendering/RenderFieldset.cpp: Removed.
  • rendering/RenderFieldset.h: Removed.

Remove RenderFieldset files from the tree.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
(WebCore::RenderFlexibleBox::firstLineBaseline):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins):
Make sure flexible boxes lay out their legends properly by calling layoutExcludedChildren.
Patch methods to use the OrderIterator's new shouldSkipChild method to ensure legends aren't
part of the flexible box layout.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::layoutGridItems):
Make sure grids lay out their legends properly by calling layoutExcludedChildren.
Patch methods to use the OrderIterator's new shouldSkipChild method to ensure legends aren't
part of the grid's layout.

  • rendering/RenderMultiColumnFlowThread.cpp:

(WebCore::RenderMultiColumnFlowThread::populate):
Pull legends back up into the block and don't let them be part of the flow thread.

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::requiresBalancing):
Fix an assert to allow legends to exist as siblings of multicolumn sets.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::isFieldset):
Changed to examine the HTML element rather than RenderFieldset.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isExcludedFromNormalLayout):
(WebCore::RenderObject::setIsExcludedFromNormalLayout):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
RenderObjects now have a new bit that is set for excluded objects like legends, flow threads,
placeholders, and ruby text. This bit lets code easily detect that an object is excluded from
the layout system and can be skipped.

(WebCore::RenderObject::isExcludedAndPlacedInBorder):
Helper method for asking if an object is painting inside the border. Used to know we
need to factor it into preferred width calculations outside of any one layout system
and also to know that we need to paint it when we paint the fieldset's border instead of
later (after we might have scrolled or clipped the child painting area).

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::layoutExcludedChildren):
(WebCore::RenderRubyRun::layoutSpecialExcludedChild): Deleted.

  • rendering/RenderRubyRun.h:

Rename layoutSpecialExcludedChild to layoutExcludedChildren.

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::adjustBorderBoxRectForPainting):
(WebCore::RenderTable::paintBoxDecorations):
(WebCore::RenderTable::paintMask):
(WebCore::RenderTable::subtractCaptionRect): Deleted.

  • rendering/RenderTable.h:

Patched tables to share the same border box rect adjustment used by fieldsets when subtracting
out captions. This is prep work to allow tables to be fieldsets, but for now I didn't go all the
way.

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBoxDecorations):
(WebCore::RenderTableCell::paintMask):
Make sure table cells adjust their border box rects for painting. Again this is prep work for
cells potentially being fieldsets, but not supported yet.

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::layoutExcludedChildren):
(WebCore::RenderTextControl::layoutSpecialExcludedChild): Deleted.

  • rendering/RenderTextControl.h:
  • rendering/RenderTextControlMultiLine.cpp:

(WebCore::RenderTextControlMultiLine::layoutExcludedChildren):
(WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild): Deleted.

  • rendering/RenderTextControlMultiLine.h:

Renamed the methods for doing the excluded child layout.

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):
Make sure to dump the original fieldset border and not the border with the extra legend stuff in it.

LayoutTests:

Reviewed by Simon Fraser.

  • fast/forms/fieldset/abs-pos-child-sizing-expected.html: Added.
  • fast/forms/fieldset/abs-pos-child-sizing.html: Added.
  • fast/forms/fieldset/fieldset-deprecated-flexbox-expected.html: Added.
  • fast/forms/fieldset/fieldset-deprecated-flexbox.html: Added.
  • fast/forms/fieldset/fieldset-flexbox-expected.html: Added.
  • fast/forms/fieldset/fieldset-flexbox.html: Added.
  • fast/forms/fieldset/fieldset-grid-expected.html: Added.
  • fast/forms/fieldset/fieldset-grid.html: Added.
  • fast/forms/fieldset/fieldset-multicolumn-expected.html: Added.
  • fast/forms/fieldset/fieldset-multicolumn.html: Added.
  • fast/forms/fieldset/fieldset-overflow-auto-expected.html: Added.
  • fast/forms/fieldset/fieldset-overflow-auto.html: Added.
  • fast/forms/fieldset/fieldset-overflow-hidden-expected.html: Added.
  • fast/forms/fieldset/fieldset-overflow-hidden.html: Added.
  • fast/forms/fieldset/fieldset-positioned-children-expected.html: Added.
  • fast/forms/fieldset/fieldset-positioned-children.html: Added.
  • fast/forms/fieldset/fieldset-positioned-legend-expected.html: Added.
  • fast/forms/fieldset/fieldset-positioned-legend.html: Added.
  • fast/forms/fieldset/fieldset-self-painting-legend-expected.html: Added.
  • fast/forms/fieldset/fieldset-self-painting-legend.html: Added.
  • fast/forms/fieldset/fieldset-writing-modes-expected.html: Added.
  • fast/forms/fieldset/fieldset-writing-modes.html: Added.
9:49 AM Changeset in webkit [213454] by commit-queue@webkit.org
  • 12 edits
    1 copy
    1 add in trunk

[Modern Media Controls] Tracks panel should clip and scroll content when numerous tracks are available
https://bugs.webkit.org/show_bug.cgi?id=169201
<rdar://problem/30867979>

Patch by Antoine Quint <Antoine Quint> on 2017-03-06
Reviewed by Eric Carlson.

Source/WebCore:

We now position and size the tracks panel dynamically and ensure a max-height is applied
to the panel so that it allows a margin of 10px above it within the media controls. We also
apply that same max-height to a new intermediary scrollable container for the track lists,
so that it scrolls independently of the container and the background tint.

Test: media/modern-media-controls/tracks-panel/tracks-panel-position-and-size.html

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype.showTracksPanel): Deleted.

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline .volume.slider):
(.media-controls.mac.inline .tracks-panel): Deleted.

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.showTracksPanel): Deleted.

  • Modules/modern-media-controls/controls/macos-media-controls.js:

(MacOSMediaControls.prototype.showTracksPanel):

  • Modules/modern-media-controls/controls/tracks-panel.css:

(.tracks-panel > .background-tint > div,):
(.tracks-panel > .scrollable-container):
(.tracks-panel section):
(.tracks-panel section:first-of-type):
(.tracks-panel section > h3):
(.tracks-panel section > ul):
(.tracks-panel section > ul > li):
(.tracks-panel section > ul > li:focus):
(.tracks-panel section > ul > li.selected:before):
(.tracks-panel section > ul > li.animated):
(.tracks-panel > .background-tint > div): Deleted.
(.tracks-panel > section): Deleted.
(.tracks-panel > section:first-of-type): Deleted.
(.tracks-panel > section > h3): Deleted.
(.tracks-panel > section > ul): Deleted.
(.tracks-panel > section > ul > li): Deleted.
(.tracks-panel > section > ul > li:focus): Deleted.
(.tracks-panel > section > ul > li.selected:before): Deleted.
(.tracks-panel > section > ul > li.animated): Deleted.

  • Modules/modern-media-controls/controls/tracks-panel.js:

(TracksPanel.prototype.presentInParent):
(TracksPanel.prototype.get maxHeight):
(TracksPanel.prototype.set maxHeight):
(TracksPanel.prototype.commitProperty):
(TracksPanel.prototype._childrenFromDataSource):

LayoutTests:

Rebaseline a couple of existing tests to account for the DOM structure change in
the tracks panel and the fact that positioning is now dependent on the bounds of
the tracks button.

We also add a new test that checks that the tracks panel is positioned and sized
correctly to ensure that it can be scrolled when it has too many tracks to fit.

  • media/modern-media-controls/tracks-panel/tracks-panel-population-expected.txt:
  • media/modern-media-controls/tracks-panel/tracks-panel-population.html:
  • media/modern-media-controls/tracks-panel/tracks-panel-position-and-size-expected.txt: Added.
  • media/modern-media-controls/tracks-panel/tracks-panel-position-and-size.html: Added.
  • media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-mouse-expected.txt:
  • media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-mouse.html:
9:26 AM Changeset in webkit [213453] by Yusuke Suzuki
  • 5 edits in trunk

[JSC] Allow indexed module namespace object fields
https://bugs.webkit.org/show_bug.cgi?id=168870

Reviewed by Saam Barati.

JSTests:

  • wasm/spec-tests/names.wast.js:

Source/JavaScriptCore:

While JS modules cannot expose any indexed bindings,
Wasm modules can expose them. However, module namespace
object currently does not support indexed properties.
This patch allows module namespace objects to offer
indexed binding accesses.

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::getOwnPropertySlotCommon):
(JSC::JSModuleNamespaceObject::getOwnPropertySlot):
(JSC::JSModuleNamespaceObject::getOwnPropertySlotByIndex):

  • runtime/JSModuleNamespaceObject.h:
8:57 AM Changeset in webkit [213452] by Yusuke Suzuki
  • 4 edits
    2 adds in trunk

Null pointer crash when loading module with unresolved import also as a script file
https://bugs.webkit.org/show_bug.cgi?id=168971

Reviewed by Saam Barati.

JSTests:

  • stress/re-execute-error-module.js: Added.

(shouldBe):
(async):

  • stress/resources/error-module.js: Added.

Source/JavaScriptCore:

If linking throws an error, this error should be re-thrown
when requesting the same module.

  • builtins/ModuleLoaderPrototype.js:

(globalPrivate.newRegistryEntry):

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::link):

8:02 AM Changeset in webkit [213451] by Yusuke Suzuki
  • 2 edits in trunk

Unreviewed, fix AppleWin build
https://bugs.webkit.org/show_bug.cgi?id=164032

  • Source/cmake/WebKitFeatures.cmake:
7:43 AM Changeset in webkit [213450] by Yusuke Suzuki
  • 12 edits in trunk

[GTK][JSCOnly] Enable WebAssembly on Linux environment
https://bugs.webkit.org/show_bug.cgi?id=164032

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

This patch enables WebAssembly on JSCOnly and GTK ports.
Basically, almost all the WASM code is portable to Linux.
One platform-dependent part is faster memory load using SIGBUS
signal handler. This patch ports this part to Linux.

  • CMakeLists.txt:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):
(JSC::Wasm::enableFastMemory):

Tools:

  • Scripts/run-jsc-stress-tests:

Enable WASM tests.

  • Scripts/webkitperl/FeatureList.pm:

Enable WebAssembly.

7:30 AM Changeset in webkit [213449] by Manuel Rego Casasnovas
  • 6 edits in trunk

[css-grid] Stretch should grow and shrink items to fit its grid area
https://bugs.webkit.org/show_bug.cgi?id=163200

Reviewed by Darin Adler.

Source/WebCore:

After some discussions the CSS WG agreed that stretch should not only
grow items, but also shrink them to fit its grid area.
That way the "min-width|height: auto" is somehow ignored for grid items.
More info at: https://github.com/w3c/csswg-drafts/issues/283

The good part is that this allows us to remove some ugly code we've
in RenderBox that was only used by Grid Layout.

For images, we'll be stretching on both axis right now, so the aspect
ratio won't be preserved. The default behavior might change in those
cases, but that should be implemented in a different patch.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalHeight):

LayoutTests:

The tests have been updated according to the new expected behavior.

  • fast/css-grid-layout/grid-container-percentage-columns.html:
  • fast/css-grid-layout/min-width-height-auto-and-margins.html:
  • fast/css-grid-layout/min-width-height-auto.html:
6:19 AM Changeset in webkit [213448] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] WebProcess from WebKitGtk+ 2.15.x SIGSEVs in GIFLZWContext::doLZW(unsigned char const*, unsigned long) at Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp:303
https://bugs.webkit.org/show_bug.cgi?id=167304

Reviewed by Carlos Garcia Campos.

Add a lock to ensure that the GIFImageReader that we are using for decoding is not deleted while
the decoding thread is using it.

No new tests.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::clearFrameBufferCache):

6:06 AM Changeset in webkit [213447] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Currency digits calculation in Intl.NumberFormat should call out to ICU
https://bugs.webkit.org/show_bug.cgi?id=169182

Patch by Daniel Ehrenberg <littledan@igalia.com> on 2017-03-06
Reviewed by Yusuke Suzuki.

  • runtime/IntlNumberFormat.cpp:

(JSC::computeCurrencyDigits):
(JSC::computeCurrencySortKey): Deleted.
(JSC::extractCurrencySortKey): Deleted.

4:19 AM Changeset in webkit [213446] by Antti Koivisto
  • 16 edits in trunk

Allow render tree building before loading stylesheet elements
https://bugs.webkit.org/show_bug.cgi?id=169079
Source/WebCore:

<rdar://problem/30865709>

Reviewed by Andreas Kling.

Currently we don't resolve style or construct renderers if there are any pending
stylesheet loads. This patch enables style and renderer constuction up to the
first encountered loading style element.

This is a step toward allowing incremental rendering for in-body stylesheets.

  • dom/Document.cpp:

(WebCore::Document::needsStyleRecalc):

Ensure scrolling to anchor eventually happens.

  • dom/Document.h:

(WebCore::Document::isIgnoringPendingStylesheets):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::removedFrom):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::addPendingSheet):
(WebCore::Style::Scope::removePendingSheet):

Track pending sheet nodes in a map so we can test if a given node has a pending sheet.
This is also more robust in general.

(WebCore::Style::Scope::hasProcessingInstructionWithPendingSheet):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleScope.h:

(WebCore::Style::Scope::hasPendingSheet):
(WebCore::Style::Scope::hasPendingSheets):
(WebCore::Style::Scope::addPendingSheet): Deleted.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::styleForElement):

Instead of global test for placeholder construction check the status of the pending sheet flag.

(WebCore::Style::hasLoadingStylesheet):
(WebCore::Style::TreeResolver::resolveComposedTree):

Set a flag when encountering a pending top level sheet during DOM traversal.

(WebCore::Style::TreeResolver::resolve):

  • style/StyleTreeResolver.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Ensure SVG images have layout before getting the size.

LayoutTests:

Reviewed by Andreas Kling.

Ensure that style is synchronized after adding a stylesheet dynamically by doing an additional test.
Otherwise the class/attr invalidation test may as we don't know about the new stylesheet yet.
This is functionally fine (future synchronization would invalidate the style) but messes up the test
trying to verify class/attr change invalidation specifically.

  • fast/css/style-invalidation-attribute-change-descendants-expected.txt:
  • fast/css/style-invalidation-attribute-change-descendants.html:
  • fast/css/style-invalidation-class-change-descendants-expected.txt:
  • fast/css/style-invalidation-class-change-descendants.html:
2:32 AM Changeset in webkit [213445] by commit-queue@webkit.org
  • 18 edits in trunk/Source/WebCore

[GStreamer] Adopt nullptr
https://bugs.webkit.org/show_bug.cgi?id=123438

Patch by Vanessa Chipirrás Navalón <vchipirras@igalia.com> on 2017-03-06
Reviewed by Xabier Rodriguez-Calvar.

To adapt the code to the C++11 standard, all NULL or 0 pointers have been changed to nullptr.

  • platform/audio/gstreamer/AudioDestinationGStreamer.cpp:

(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):

  • platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:

(WebCore::AudioFileReader::handleNewDeinterleavePad):
(WebCore::AudioFileReader::plugDeinterleave):
(WebCore::AudioFileReader::decodeAudioForBusCreation):

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::configureAudioBin):
(WebCore::AudioSourceProviderGStreamer::setClient):
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webkit_web_audio_src_init):
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):

  • platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:

(WebCore::AudioTrackPrivateGStreamer::setEnabled):

  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::initializeGStreamer):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
(WebCore::initializeGStreamerAndRegisterWebKitElements):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::newTextSample):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
Removed the unused second argument on processTableOfContentsEntry function.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
Removed the unused second argument on this function.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Removed the unused second argument on processTableOfContentsEntry function.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
(WebCore::MediaPlayerPrivateGStreamerBase::muted):
(WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
(WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
(WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::registerMediaEngine):

  • platform/graphics/gstreamer/TextCombinerGStreamer.cpp:

(webkit_text_combiner_init):
(webkitTextCombinerPadEvent):
(webkitTextCombinerRequestNewPad):
(webkitTextCombinerNew):

  • platform/graphics/gstreamer/TextSinkGStreamer.cpp:

(webkitTextSinkNew):

  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:

(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkit_video_sink_init):
(webkitVideoSinkProposeAllocation):
(webkitVideoSinkNew):

  • platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:

(WebCore::VideoTrackPrivateGStreamer::setSelected):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcSetProperty):
(webKitWebSrcStop):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetProtocols):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcGetProtocols):

2:02 AM Changeset in webkit [213444] by akling@apple.com
  • 10 edits in trunk/Source

[iOS] Report domains crashing under memory pressure via enhanced privacy logging.
<https://webkit.org/b/169133>
<rdar://problem/29964017>

Reviewed by Antti Koivisto.

Source/WebCore:

  • page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Notify the UI process when the memory pressure status changes.
If a web process crashes while under memory pressure, log the domain of the last open page
using enhanced privacy logging.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidCrash):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::memoryPressureStatusChanged):
(WebKit::WebProcessProxy::isUnderMemoryPressure):

  • UIProcess/WebProcessProxy.messages.in:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

Add a mechanism for getting a callback when the memory pressure status changes.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::measurementTimerFired):
(WTF::MemoryPressureHandler::beginSimulatedMemoryPressure):
(WTF::MemoryPressureHandler::endSimulatedMemoryPressure):
(WTF::MemoryPressureHandler::setUnderMemoryPressure):
(WTF::MemoryPressureHandler::memoryPressureStatusChanged):

  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback):
(WTF::MemoryPressureHandler::setUnderMemoryPressure): Deleted.

Mar 5, 2017:

11:38 PM Changeset in webkit [213443] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline fast/css/css2-system-fonts.html after r213267.

  • platform/gtk/fast/css/css2-system-fonts-expected.txt:
9:51 PM Changeset in webkit [213442] by beidson@apple.com
  • 1 edit
    3 deletes in trunk/Source/WebKit2

Remove new files accidentally added in r213441

Unreviewed.

  • UIProcess/WebLoadingProviderProxy.cpp: Removed.
  • UIProcess/WebLoadingProviderProxy.h: Removed.
  • UIProcess/WebLoadingProviderProxy.messages.in: Removed.
6:53 PM Changeset in webkit [213441] by beidson@apple.com
  • 23 edits
    3 copies
    9 moves
    1 add
    1 delete in trunk/Source/WebKit2

Rename CustomProtocolFoo to LegacyCustomProtocolFoo.
https://bugs.webkit.org/show_bug.cgi?id=169188

Reviewed by Andy Estes.

  • CMakeLists.txt:
  • DerivedSources.make:
  • NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm.

(+[WKCustomProtocol canInitWithRequest:]):
(+[WKCustomProtocol canonicalRequestForRequest:]):
(+[WKCustomProtocol requestIsCacheEquivalent:toRequest:]):
(-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
(-[WKCustomProtocol initializationRunLoop]):
(-[WKCustomProtocol startLoading]):
(-[WKCustomProtocol stopLoading]):
(WebKit::LegacyCustomProtocolManager::registerProtocolClass):
(WebKit::LegacyCustomProtocolManager::registerScheme):
(WebKit::LegacyCustomProtocolManager::unregisterScheme):
(WebKit::LegacyCustomProtocolManager::supportsScheme):
(WebKit::dispatchOnInitializationRunLoop):
(WebKit::LegacyCustomProtocolManager::didFailWithError):
(WebKit::LegacyCustomProtocolManager::didLoadData):
(WebKit::LegacyCustomProtocolManager::didReceiveResponse):
(WebKit::LegacyCustomProtocolManager::didFinishLoading):
(WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest):
(WebKit::LegacyCustomProtocolManager::protocolForID):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp.

(WebKit::generateCustomProtocolID):
(WebKit::LegacyCustomProtocolManager::supplementName):
(WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
(WebKit::LegacyCustomProtocolManager::initialize):
(WebKit::LegacyCustomProtocolManager::addCustomProtocol):
(WebKit::LegacyCustomProtocolManager::removeCustomProtocol):
(WebKit::LegacyCustomProtocolManager::startLoading):
(WebKit::LegacyCustomProtocolManager::stopLoading):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h.
  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in.
  • NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp.

(WebKit::CustomProtocolManager::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
(WebKit::CustomProtocolManager::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
(WebKit::CustomProtocolManager::registerProtocolClass):
(WebKit::CustomProtocolManager::registerScheme):
(WebKit::CustomProtocolManager::unregisterScheme):
(WebKit::CustomProtocolManager::supportsScheme):
(WebKit::CustomProtocolManager::didFailWithError):
(WebKit::CustomProtocolManager::didLoadData):
(WebKit::CustomProtocolManager::didReceiveResponse):
(WebKit::CustomProtocolManager::didFinishLoading):
(WebKit::CustomProtocolManager::wasRedirectedToRequest):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::create):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::globalLegacyCustomProtocolManager):
(WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager):
(WebKit::NetworkSessionCocoa::create):
(WebKit::NetworkSessionCocoa::defaultSession):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::globalCustomProtocolManager): Deleted.
(WebKit::NetworkSessionCocoa::setCustomProtocolManager): Deleted.

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):

  • UIProcess/API/APICustomProtocolManagerClient.h:

(API::LegacyCustomProtocolManagerClient::~LegacyCustomProtocolManagerClient):
(API::LegacyCustomProtocolManagerClient::startLoading):
(API::LegacyCustomProtocolManagerClient::stopLoading):
(API::LegacyCustomProtocolManagerClient::invalidate):
(API::CustomProtocolManagerClient::~CustomProtocolManagerClient): Deleted.
(API::CustomProtocolManagerClient::startLoading): Deleted.
(API::CustomProtocolManagerClient::stopLoading): Deleted.
(API::CustomProtocolManagerClient::invalidate): Deleted.

  • UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h.
  • UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm.

(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(-[WKCustomProtocolLoader dealloc]):
(-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]):
(-[WKCustomProtocolLoader connection:didFailWithError:]):
(-[WKCustomProtocolLoader connection:willCacheResponse:]):
(-[WKCustomProtocolLoader connection:didReceiveResponse:]):
(-[WKCustomProtocolLoader connection:didReceiveData:]):
(-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
(-[WKCustomProtocolLoader connectionDidFinishLoading:]):
(WebKit::LegacyCustomProtocolManagerClient::startLoading):
(WebKit::LegacyCustomProtocolManagerClient::stopLoading):
(WebKit::LegacyCustomProtocolManagerClient::invalidate):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitialize):

  • UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Removed.
  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: Added.

(WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy):
(WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy):
(WebKit::LegacyCustomProtocolManagerProxy::startLoading):
(WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
(WebKit::LegacyCustomProtocolManagerProxy::processDidClose):
(WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
(WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
(WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
(WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
(WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):

  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h.
  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in.
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
(WebKit::WebProcessPool::registerSchemeForCustomProtocol):
(WebKit::WebProcessPool::unregisterSchemeForCustomProtocol):
(WebKit::WebProcessPool::setCustomProtocolManagerClient): Deleted.

  • UIProcess/WebProcessPool.h:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/cocoa/WebProcessCocoa.mm:
6:48 PM Changeset in webkit [213440] by Simon Fraser
  • 9 edits in trunk

Avoid backing store for layers with empty text nodes in a few more cases
https://bugs.webkit.org/show_bug.cgi?id=169185

Reviewed by Dan Bernstein.

Source/WebCore:

In hasPaintingNonLayerDescendants() we can check whether the RenderText's linesBoundingBox()
is empty to avoid backing store in a few more cases. Also use containsOnlyWhitespace() rather
than isAllCollapsibleWhitespace(), because there's no need for backing store for non-selectable
whitespace text.

Covered by existing tests.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

inline-block-no-backing.html enhanced to have a layer with non-collapsible whitespace (an &nbsp;).

Rebaselined other tests.

  • compositing/backing/inline-block-no-backing-expected.txt:
  • compositing/backing/inline-block-no-backing.html:
  • compositing/iframes/page-cache-layer-tree-expected.txt:
  • css3/blending/blend-mode-clip-accelerated-blending-canvas-expected.txt:
  • platform/ios-simulator-wk2/compositing/backing/inline-block-no-backing-expected.txt:
  • platform/ios-simulator-wk2/compositing/iframes/page-cache-layer-tree-expected.txt:
5:37 PM Changeset in webkit [213439] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Drop unnecessary backslash in ResourceResponse::sanitizeSuggestedFilename()
https://bugs.webkit.org/show_bug.cgi?id=169066

Reviewed by Sam Weinig.

Drop unnecessary backslash in ResourceResponse::sanitizeSuggestedFilename().

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::sanitizeSuggestedFilename):

5:36 PM Changeset in webkit [213438] by Chris Dumez
  • 3 edits
    2 adds in trunk

Using <form> in <template> causes following <form> to get swallowed
https://bugs.webkit.org/show_bug.cgi?id=163552

Reviewed by Sam Weinig.

Source/WebCore:

As per the HTML specification [1], when finding a "form" tag in the "in body"
insertion mode, we should insert an HTML element for the token, and, if there
is no template element on the stack of open elements, set the form element
pointer to point to the element created.

We were missing the "if there is no template element on the stack of open
elements" check and setting the form element pointer unconditionally.
This patch fixes the issue.

[1] https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody:form-element-pointer-2

Test: fast/parser/form-after-template.html

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::insertHTMLFormElement):

LayoutTests:

Add layout test coverage.

  • fast/parser/form-after-template-expected.html: Added.
  • fast/parser/form-after-template.html: Added.
12:31 PM Changeset in webkit [213437] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

Add support for canvas.toBlob
https://bugs.webkit.org/show_bug.cgi?id=148878

Reviewed by Tim Horton.

Address additional review feedback received after r213412 landed.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toBlob): Passed null to the blob callback if blob conversion
fails for any reason.

  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::cgImage): Removed an unnecessary local variable.

12:14 PM Changeset in webkit [213436] by mmaxfield@apple.com
  • 19 edits
    2 adds in trunk

Update CSSFontSelector's matching algorithm to understand ranges
https://bugs.webkit.org/show_bug.cgi?id=168892

Reviewed by Jon Lee.

Source/WebCore:

This patch migrates the font selection algorithm out of FontCacheCoreText and into its own file which can be shared
among all ports. It then migrates our web font selection algorithm to use it.

This patch doesn't actually change the parsing rules; it just changes the internal machinery for how fonts get
selected. Therefore, this patch simply makes zero-length ranges from the discrete values the parser emits, and passes
those zero-length ranges to the range-based font selection routine. This means that this patch doesn't actually
change the results of the font selection algorithm.

One of the inputs to the new font selection algorithm is font-stretch, which previously was not parsed inside
@font-face blocks or the CSS Font Loading API. This patch therefore adds parsing support and modifies the existing
tests for these pieces to expect parsing to work. Because the font selection algorithm itself is shared between
installed fonts and webfonts, this patch doesn't add any additional tests for it (because it is already covered under
existing tests).

No new tests because there is no behavior change.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj: Add new file for the font selection algorithm.
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::calculateStretch): Used on @font-face blocks and the CSS Font Loading API.
(WebCore::CSSFontFace::setStretch): Fill out the previously stubbed function.

  • css/CSSFontFace.h: Add the range member variable to CSSFontFaces.
  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): Now that we care about font-stretch, we need to
look it up for local fonts too. This current approach of an extra FontSelectionValue hanging around with a
FontTraitsMask is very ugly and will be removed soon (https://bugs.webkit.org/show_bug.cgi?id=168889 and
https://bugs.webkit.org/show_bug.cgi?id=168890).
(WebCore::computeFontStretch): Used on @font-face blocks and the CSS Font Loading API.
(WebCore::CSSFontFaceSet::matchingFaces): Educate about font-stretch.
(WebCore::CSSFontFaceSet::fontFace): Migrate to the new font-selection algorithm.
(WebCore::fontFaceComparator): Deleted.

  • css/CSSFontFaceSet.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule): Educate about font-stretch.
(WebCore::CSSFontSelector::fontRangesForFamily): Ditto.

  • css/FontFace.cpp:

(WebCore::FontFace::setStretch): Ditto.
(WebCore::FontFace::stretch): Ditto.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseFontFaceDescriptor): Ditto.

  • platform/graphics/FontCache.h: Ditto.
  • platform/graphics/FontDescription.h:
  • platform/graphics/FontSelectionAlgorithm.cpp: Added.

(WebCore::FontSelectionAlgorithm::filterCapability):
(WebCore::FontSelectionAlgorithm::indexOfBestCapabilities):
(WebCore::fontSelectionRequestForTraitsMask):
(WebCore::initialFontSelectionCapabilitiesForTraitsMask):
(WebCore::fontSelectionCapabilitiesForTraitsMask):

  • platform/graphics/FontSelectionAlgorithm.h: Added. Taken from FontCacheCoreText.cpp.

(WebCore::FontSelectionValue::FontSelectionValue):
(WebCore::FontSelectionValue::operator float):
(WebCore::FontSelectionValue::rawValue):
(WebCore::FontSelectionValue::maximumValue):
(WebCore::FontSelectionValue::minimumValue):
(WebCore::FontSelectionValue::operator+):
(WebCore::FontSelectionValue::operator-):
(WebCore::FontSelectionValue::operator*):
(WebCore::FontSelectionValue::operator/):
(WebCore::FontSelectionValue::operator==):
(WebCore::FontSelectionValue::operator!=):
(WebCore::FontSelectionValue::operator<):
(WebCore::FontSelectionValue::operator<=):
(WebCore::FontSelectionValue::operator>):
(WebCore::FontSelectionValue::operator>=):
(WebCore::FontSelectionRange::isValid):
(WebCore::FontSelectionRange::expand):
(WebCore::FontSelectionRange::includes):
(WebCore::FontSelectionRequest::operator==):
(WebCore::FontSelectionRequest::operator!=):
(WebCore::FontSelectionRequestKey::FontSelectionRequestKey):
(WebCore::FontSelectionRequestKey::isHashTableDeletedValue):
(WebCore::FontSelectionRequestKey::operator==):
(WebCore::FontSelectionRequestKeyHash::hash):
(WebCore::FontSelectionRequestKeyHash::equal):
(WebCore::FontSelectionCapabilities::expand):
(WebCore::FontSelectionAlgorithm::FontSelectionAlgorithm):
(WebCore::FontSelectionAlgorithm::iterateActiveCapabilitiesWithReturn):
(WebCore::FontSelectionAlgorithm::iterateActiveCapabilities):

  • platform/graphics/cocoa/FontCacheCoreText.cpp: Moved to FontSelectionAlgorithm.

(WebCore::stretchFromCoreTextTraits):
(WebCore::FontDatabase::capabilitiesForFontDescriptor):
(WebCore::findClosestFont):
(WebCore::calculateFontSelectionRequest):
(WebCore::platformFontLookupWithFamily):
(WebCore::FontCache::getTraitsInFamily): Deleted.
(WebCore::iterateActiveFontsWithReturn): Deleted.
(WebCore::iterateActiveFonts): Deleted.
(WebCore::findClosestStretch): Deleted.
(WebCore::filterStretch): Deleted.
(WebCore::findClosestStyle): Deleted.
(WebCore::filterStyle): Deleted.
(WebCore::findClosestWeight): Deleted.
(WebCore::filterWeight): Deleted.
(WebCore::computeTargetWeight): Deleted.

  • platform/text/TextFlags.h: Moved to FontSelectionAlgorithm.

(WebCore::FontSelectionValue::FontSelectionValue): Deleted.
(WebCore::FontSelectionValue::operator float): Deleted.
(WebCore::FontSelectionValue::operator+): Deleted.
(WebCore::FontSelectionValue::operator-): Deleted.
(WebCore::FontSelectionValue::operator*): Deleted.
(WebCore::FontSelectionValue::operator/): Deleted.
(WebCore::FontSelectionValue::operator==): Deleted.
(WebCore::FontSelectionValue::operator!=): Deleted.
(WebCore::FontSelectionValue::operator<): Deleted.
(WebCore::FontSelectionValue::operator<=): Deleted.
(WebCore::FontSelectionValue::operator>): Deleted.
(WebCore::FontSelectionValue::operator>=): Deleted.
(WebCore::FontSelectionValue::rawValue): Deleted.
(WebCore::FontSelectionValue::maximumValue): Deleted.
(WebCore::FontSelectionValue::minimumValue): Deleted.
(WebCore::FontSelectionRange::isValid): Deleted.
(WebCore::FontSelectionRange::expand): Deleted.
(WebCore::FontSelectionRange::includes): Deleted.
(WebCore::FontSelectionCapabilities::expand): Deleted.

LayoutTests:

Update CSS Font Loading API test to accept font-stretch values.

  • fast/text/font-face-javascript-expected.txt:
  • fast/text/font-face-javascript.html:
11:14 AM Changeset in webkit [213435] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Make some RenderLayer tree traversal in RenderLayerBacking more generic
https://bugs.webkit.org/show_bug.cgi?id=169177

Reviewed by Zalan Bujtas.

The real goal of this patch is reduce the number of callers of
RenderLayerBacking::isPaintDestinationForDescendantLayers() to one. To achieve that,
have the setContentsVisible() logic (which is really just about the CSS 'visibility' property)
do its own tree traversal which just consults layer.hasVisibleContent(). So
make descendantLayerPaintsIntoAncestor() a generic traversal function which walks
descendant layers which may paint into the target layer. The "Visible" in the name
reflects the fact that it can bypass a subtree for a layer with !hasVisibleDescendant().

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::traverseVisibleNonCompositedDescendantLayers):
(WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
(WebCore::RenderLayerBacking::hasVisibleNonCompositedDescendants):
(WebCore::descendantLayerPaintsIntoAncestor): Deleted.

  • rendering/RenderLayerBacking.h:
3:10 AM Changeset in webkit [213434] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[GTK] Two file reset tests are failing in the bots since they were added in r213042
https://bugs.webkit.org/show_bug.cgi?id=169126

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-03-05
Reviewed by Michael Catanzaro.

They are failing because the GTK+ event sender is not firing the second UIHelper.activateAt() after the change
event. In one case this causes that the reset button is not clicked, and in the other one the file input is not
unfocused. This is because the change event is emitted before the mouse up, and the GTK+ event sender ignores
mouse down events when the button is already down to not confuse Xvfb. So, we can easily fix theses tests by
using a timeout to ensure the next UIHelper.activateAt() happens in a different run loop iteration, after the
mouse up.

  • fast/forms/file/file-input-reset-using-open-panel.html:
  • fast/forms/file/file-reset-in-change-using-open-panel.html:
12:37 AM Changeset in webkit [213433] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[JSCOnly][GTK] Suppress warnings on return type in B3 and WASM
https://bugs.webkit.org/show_bug.cgi?id=168869

Reviewed by Keith Miller.

  • b3/B3Width.h:
  • wasm/WasmSections.h:
Note: See TracTimeline for information about the timeline view.