Timeline



Mar 15, 2018:

9:13 PM Changeset in webkit [229658] by Alan Bujtas
  • 6 edits in trunk/Tools

[LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
https://bugs.webkit.org/show_bug.cgi?id=183691

Reviewed by Antti Koivisto.

While laying out the boxes in a block formatting context, if we happen to need
to get to the containing block of a box to compute geometry, it should always be a
descendant of the root container (or the root container itself).
Nothing outside of the formatting context should be able to impact the boxes inside.

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:

(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._toAbsolutePosition):
(BlockFormattingContext):

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:

(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):

  • LayoutReloaded/LayoutTree/Box.js:

(Layout.Box.prototype.isRootBox):
(Layout.Box.prototype.isRootElement): Deleted.

  • LayoutReloaded/Utils.js:

(Utils.isDescendantOf):
(Utils.mapStaticToAbsolute): Deleted.

  • LayoutReloaded/misc/headers/Box.h:
7:57 PM Changeset in webkit [229657] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Include CADisplayLink explicitly where needed, instead of all of CA
https://bugs.webkit.org/show_bug.cgi?id=183689
<rdar://problem/38528719>

Reviewed by Wenson Hsieh.

  • platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
7:19 PM Changeset in webkit [229656] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Include MobileCoreServices in the WebCore prefix header
https://bugs.webkit.org/show_bug.cgi?id=183688
<rdar://problem/38527621>

Reviewed by Dan Bernstein.

  • WebCorePrefix.h:
6:46 PM Changeset in webkit [229655] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Avoid defining commonly-named system macros on all Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=183687

Reviewed by Dan Bernstein.

  • wtf/Platform.h:
6:12 PM Changeset in webkit [229654] by megan_gardner@apple.com
  • 28 edits
    2 adds in trunk/Source

Create MediaQueryParserContext to provide additional context for the evaluation of media queries
https://bugs.webkit.org/show_bug.cgi?id=183677

Reviewed by Tim Horton.

We need additional context for parsing media queries to make sure they are parsed correctly and valid.

Source/WebCore:

Not currently testable, will add tests in a later patch.

  • WebCore.xcodeproj/project.pbxproj:
  • css/MediaList.cpp:

(WebCore::MediaQuerySet::create):
(WebCore::MediaQuerySet::set):
(WebCore::MediaQuerySet::add):
(WebCore::MediaQuerySet::remove):

  • css/MediaList.h:
  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::mediaAttributeMatches):

  • css/MediaQueryExpression.cpp:

(WebCore::featureWithValidIdent):
(WebCore::featureWithValidDensity):
(WebCore::featureWithValidPositiveLength):
(WebCore::featureWithPositiveInteger):
(WebCore::featureWithPositiveNumber):
(WebCore::featureWithZeroOrOne):
(WebCore::isFeatureValidWithoutValue):
(WebCore::MediaQueryExpression::MediaQueryExpression):

  • css/MediaQueryExpression.h:
  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::matchMedia):

  • css/MediaQueryParserContext.cpp: Added.

(WebCore::MediaQueryParserContext::MediaQueryParserContext):

  • css/MediaQueryParserContext.h: Added.

(WebCore::MediaQueryParserContext::MediaQueryParserContext):

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium const):

  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::StyleRuleImport):
(WebCore::StyleRuleImport::setCSSStyleSheet):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeImportRule):
(WebCore::CSSParserImpl::consumeMediaRule):

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::parseMediaQuerySet):
(WebCore::MediaQueryParser::parseMediaCondition):
(WebCore::MediaQueryParser::MediaQueryParser):
(WebCore::MediaQueryData::addExpression):

  • css/parser/MediaQueryParser.h:

(WebCore::MediaQueryData::setMediaQueryParserContext):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::parse):

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createCSSStyleSheet):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::setCSSStyleSheet):

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::initializeStyleSheet):
(WebCore::HTMLLinkElement::setCSSStyleSheet):

  • html/HTMLLinkElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::selectNextSourceChild):

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::parsedMediaAttribute const):

  • html/HTMLSourceElement.h:
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::parseAttribute):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

Source/WebKitLegacy/mac:

  • DOM/DOM.mm:

(-[DOMHTMLLinkElement _mediaQueryMatches]):

5:16 PM Changeset in webkit [229653] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Rebaselined test on macOS WK1 after r229642.

Unreviewed test gardening.

  • platform/mac-wk1/fast/forms/file/entries-api/webkitdirectory-open-panel-expected.txt:
4:44 PM Changeset in webkit [229652] by Chris Dumez
  • 3 edits in trunk/LayoutTests

Unreviewed, mark location-protocol-setter-non-broken-async-delegate.html as flaky on all platforms, not just WK1

4:35 PM Changeset in webkit [229651] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.9.2/Source

Versioning.

4:35 PM Changeset in webkit [229650] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.9.2/Source/WTF

Cherry-pick r229611. rdar://problem/38448568

4:15 PM Changeset in webkit [229649] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.9.2

New tag.

4:07 PM Changeset in webkit [229648] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Fix MSVC run-time check after r229391.
https://bugs.webkit.org/show_bug.cgi?id=183673

Reviewed by Keith Miller.

Replaces attempted fix from r229424/r229432.
Apparently MSVC doesn't like it when a zero-length std::array is defined without explicit braces.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::clampArrayToSize):

4:00 PM Changeset in webkit [229647] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Unreviewed, rolling out r229639.
https://bugs.webkit.org/show_bug.cgi?id=183683

it is causing a crash in API tests (Requested by youenn on
#webkit).

Reverted changeset:

"ActiveDOMObject should assert that they are destroyed in the
thread they are created"
https://bugs.webkit.org/show_bug.cgi?id=183671
https://trac.webkit.org/changeset/229639

3:43 PM Changeset in webkit [229646] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Add and adopt WK_ALTERNATE_FRAMEWORKS_DIR in ANGLE
https://bugs.webkit.org/show_bug.cgi?id=183675
<rdar://problem/38515281>

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

Don't install the JSC alias if we're installing to an alternate location.
This should have been a part of r229637.

Source/ThirdParty/ANGLE:

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE.xcconfig:
  • Configurations/Base.xcconfig:
3:41 PM Changeset in webkit [229645] by youenn@apple.com
  • 12 edits
    4 deletes in trunk

Bad configuration parameters should make RTCPeerConnection constructor throw
https://bugs.webkit.org/show_bug.cgi?id=183615

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCConfiguration-bundlePolicy-expected.txt:
  • web-platform-tests/webrtc/RTCConfiguration-iceServers-expected.txt:
  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Source/WebCore:

Implement more of https://w3c.github.io/webrtc-pc/#set-pc-configuration.
Throw an error whenever underlying libwebrtc set configuration fails.

Covered by rebased test.

  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):

  • Modules/mediastream/RTCPeerConnection.js:

(initializeRTCPeerConnection):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

Removed tests that are subsumed by WPT ones.

  • fast/mediastream/RTCPeerConnection-expected.txt: Removed.
  • fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt: Removed.
  • fast/mediastream/RTCPeerConnection-getConfiguration.html: Removed.
  • fast/mediastream/RTCPeerConnection.html: Removed.
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
3:36 PM Changeset in webkit [229644] by youenn@apple.com
  • 4 edits in trunk

replaceTrack triggers negotiationneeded
https://bugs.webkit.org/show_bug.cgi?id=180342
<rdar://problem/35822426>

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.
Fix the case of replacing a track for which data is already flowing.
We should probably do the same for null tracks when fully implementing transceivers.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::enqueueReplaceTrackTask):

LayoutTests:

  • webrtc/video-replace-track.html:
3:27 PM Changeset in webkit [229643] by krollin@apple.com
  • 8 edits in trunk/Source

Telemetry for stalled webpage loads
https://bugs.webkit.org/show_bug.cgi?id=183221
<rdar://problem/36549013>

Reviewed by Chris Dumez.

Add telemetry for page loads, tracking the pages that succeed, fail,
or are canceled. This information will be used to track the overall
health of our page loading as time goes on.

Source/WebCore:

No new tests -- no new/changed user-level functionality.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::telemetryPageLoadKey):
(WebCore::DiagnosticLoggingKeys::timedOutKey):
(WebCore::DiagnosticLoggingKeys::canceledLessThan2SecondsKey):
(WebCore::DiagnosticLoggingKeys::canceledLessThan5SecondsKey):
(WebCore::DiagnosticLoggingKeys::canceledLessThan20SecondsKey):
(WebCore::DiagnosticLoggingKeys::canceledMoreThan20SecondsKey):
(WebCore::DiagnosticLoggingKeys::failedLessThan2SecondsKey):
(WebCore::DiagnosticLoggingKeys::failedLessThan5SecondsKey):
(WebCore::DiagnosticLoggingKeys::failedLessThan20SecondsKey):
(WebCore::DiagnosticLoggingKeys::failedMoreThan20SecondsKey):
(WebCore::DiagnosticLoggingKeys::occurredKey):
(WebCore::DiagnosticLoggingKeys::succeededLessThan2SecondsKey):
(WebCore::DiagnosticLoggingKeys::succeededLessThan5SecondsKey):
(WebCore::DiagnosticLoggingKeys::succeededLessThan20SecondsKey):
(WebCore::DiagnosticLoggingKeys::succeededMoreThan20SecondsKey):

  • page/DiagnosticLoggingKeys.h:
  • platform/network/cf/ResourceError.h:

(WebCore::ResourceError::ResourceError):

  • platform/network/mac/ResourceErrorMac.mm:

(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::getNSURLErrorDomain const):
(WebCore::ResourceError::getCFErrorDomainCFNetwork const):
(WebCore::ResourceError::mapPlatformError):

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::reportPageLoadResult):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::reportPageLoadResult):

3:12 PM Changeset in webkit [229642] by Chris Dumez
  • 3 edits in trunk/LayoutTests

webkitdirectory-open-panel stumbles over unordered results
https://bugs.webkit.org/show_bug.cgi?id=183643

Reviewed by Wenson Hsieh.

Update fast/forms/file/entries-api/webkitdirectory-open-panel.html to not rely on a
specific file ordering when checking input.files.

  • fast/forms/file/entries-api/webkitdirectory-open-panel-expected.txt:
  • fast/forms/file/entries-api/webkitdirectory-open-panel.html:
1:50 PM Changeset in webkit [229641] by wenson_hsieh@apple.com
  • 6 edits
    1 add in trunk

[iOS WK2] Hit-testing fails when specifying a large top content inset
https://bugs.webkit.org/show_bug.cgi?id=183648
<rdar://problem/38421894>

Reviewed by Tim Horton.

Source/WebKit:

Currently, in the process of computing unobscured content rect in the UI process on iOS, we subtract away parts
of the view that are obscured by insets (e.g. MobileSafari's chrome). The helper method -[WKWebView
_computeContentInset] is intended to compute these obscuring insets around the view, but it takes scroll view
insets into account. This means that if WKWebView's inner scroll view has content insets, we'll end up shrinking
the unobscured content rect as if the insetted region obscures the viewport; this causes visible content on the
page to be uninteractible, since WKWebView erroneously thinks it's obscured.

To address this, we rename _computeContentInset to _computeObscuredInset, and make it _not_ affected by the
scroll view's content insets. From code inspection and testing, all but one of the former call sites of
_computeContentInset really need the obscured inset instead (see below). The one exception, -[WKWebView
_adjustedContentOffset:], takes a scroll position from the page and maps it to a content offset in the inner
UIScrollView (see below for more details).

Tests: ScrollViewInsetTests.InnerHeightWithLargeTopContentInset

ScrollViewInsetTests.InnerHeightWithLargeBottomContentInset
ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash
ScrollViewInsetTests.RestoreInitialContentOffsetAfterNavigation

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
(-[WKWebView _initialContentOffsetForScrollView]):

See -_contentOffsetAdjustedForObscuredInset: below.

(-[WKWebView _contentOffsetAdjustedForObscuredInset:]):

Formerly -_adjustedContentOffset:. -_contentOffsetAdjustedForObscuredInset: no longer takes scroll view content
inset into account, and only cares about insets that obscure the view. This means that the scroll position
(0, 0) in the document now maps to the content offset in the inner UIScrollView, such that the top of the page
is aligned with the top of the viewport.

However, many call sites of -_adjustedContentOffset: were intended to compute the initial, top-left-most content
offset in the scroll view to scroll to when resetting the web view (i.e., they pass in CGPointZero for the
scroll position). An example of this is the scroll position to jump to after web content process termination, or
the scroll position after main frame navigation. In these cases, we actually want to jump to the top of the
scroll view, so we do want to use the version of the computed content insets that accounts for scroll view
insets.

Since these cases are limited to finding the top-left-most scroll position, we pull this out into a separate
helper method (-_initialContentOffsetForScrollView) and replace calls to
-[self _adjustedContentOffset:CGPointZero] with this instead.

(-[WKWebView _computedObscuredInset]):

A version of -_computeContentInset that doesn't care about scroll view insets. Used whereever we need to account
for obscured insets rather than the combination of content insets and unobscured insets (e.g.
-_initialContentOffsetForScrollView).

(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
(-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _navigationGestureDidBegin]):

In all these places where we inset the view bounds to compute the unobscured region of the viewport, it doesn't
make sense to additionally inset by the scroll view's content insets, since (1) the scroll view's content insets
don't obscure the viewport, and (2) it's perfectly valid for the inner scroll view to have arbitrarily large
content insets.

(-[WKWebView _adjustedContentOffset:]): Deleted.

Renamed to -_contentOffsetAdjustedForObscuredInset:.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _offsetForPageNumberIndicator]):

Similar to -_scrollToFragment: (see below).

(-[WKPDFView _scrollToFragment:]):

This helper figures out which content offset to scroll to, given the y-origin of a page in a PDF document. If
insets are added to the scroll view, we end up scrolling to the wrong content offset since we'll add the height
of the top content inset (imagine that the top content inset is enormous — then we'll scroll an amount equal to
the top content inset _past_ the point where the y-origin of the page is at the top of the viewport).

Tools:

Adds four new API tests to verify that adding top or bottom content insets to the WKWebView's scroll view does
not cause the DOMWindow's innerHeight to shrink. Currently, doing so would cause the innerHeight to be reported
as (viewHeight - inset.top) or (viewHeight - inset.bottom).

See WebKit ChangeLog for more details.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: Added.

(TestWebKitAPI::TEST):

1:41 PM Changeset in webkit [229640] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKitLegacy/win

[WinCairo] Fix build errors when ENABLE_NETSCAPE_PLUGIN_API is turned off
https://bugs.webkit.org/show_bug.cgi?id=183335

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-03-15
Reviewed by Alex Christensen.

  • Plugins/PluginDatabaseWin.cpp:
  • Plugins/PluginMessageThrottlerWin.cpp:

(WebCore::PluginMessageThrottlerWin::processQueuedMessage):

  • Plugins/PluginPackageWin.cpp:

(WebCore::PluginPackage::load):

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:
  • Plugins/npapi.cpp:
  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):

  • WebView.cpp:

(WebView::WebViewWndProc):

1:23 PM Changeset in webkit [229639] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

ActiveDOMObject should assert that they are destroyed in the thread they are created
https://bugs.webkit.org/show_bug.cgi?id=183671

Reviewed by Chris Dumez.

No change of behavior.
Moved MessagePort assertion to ActiveDOMObject.

  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::~ActiveDOMObject):

  • dom/ActiveDOMObject.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::~MessagePort):

  • dom/MessagePort.h:
1:08 PM Changeset in webkit [229638] by bfulgham@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Correct sandbox violations during Flash playback under ToT WebKit
https://bugs.webkit.org/show_bug.cgi?id=183672
<rdar://problem/38510839>

Reviewed by Eric Carlson.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
1:02 PM TestExpectations edited by krollin@apple.com
(diff)
12:43 PM Changeset in webkit [229637] by timothy_horton@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Add and adopt WK_ALTERNATE_FRAMEWORKS_DIR in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=183649
<rdar://problem/38480526>

Reviewed by Dan Bernstein.

  • Configurations/Base.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
12:21 PM Changeset in webkit [229636] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test http/wpt/service-workers/update-service-worker.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181753
<rdar://problem/36605091>

Unreviewed.

  • platform/mac-wk2/TestExpectations: Test is no longer flaky on High Sierra Release.
12:07 PM Changeset in webkit [229635] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.1-branch/Source

Versioning.

12:07 PM Changeset in webkit [229634] by jmarcell@apple.com
  • 2 edits in branches/safari-605.1.33.1-branch/Source/WebKitLegacy/mac

Revert r224040. rdar://problem/38299225

11:56 AM Changeset in webkit [229633] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.33.1.3

Tag Safari-605.1.33.1.3.

11:56 AM Changeset in webkit [229632] by jmarcell@apple.com
  • 1 delete in tags/Safari-605.1.33.1.3

Deleting tag.

11:41 AM Changeset in webkit [229631] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.33.1.3

Tag Safari-605.1.33.1.3.

11:39 AM Changeset in webkit [229630] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Add unit-test for NetworkTransaction URLError handling
https://bugs.webkit.org/show_bug.cgi?id=183664

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/networktransaction_unittest.py:

(NetworkTransactionTest._raise_URLError): Method to raise URLError.
(NetworkTransactionTest.test_retry_on_HTTPError): Renamed from test_retry.
(NetworkTransactionTest.test_retry_on_URLError): unit-test for testing URLError handling.

11:30 AM Changeset in webkit [229629] by bfulgham@apple.com
  • 4 edits in trunk/Source/WebKit

REGRESSION(r229484): Plugins often require CGS Connections to draw
https://bugs.webkit.org/show_bug.cgi?id=183663
<rdar://problem/38439218>

Reviewed by Per Arne Vollan.

Flash requires an active CGSConnection to work properly. Since we don't want the WebContent
process to have on, create a new plugin process-specific layer host creation method that
gives this access.

  • Platform/mac/LayerHostingContext.h:
  • Platform/mac/LayerHostingContext.mm:

(WebKit::LayerHostingContext::createForExternalPluginHostingProcess): Added.

  • PluginProcess/mac/PluginControllerProxyMac.mm:

(WebKit::PluginControllerProxy::updateLayerHostingContext): Use the new creation
method.

11:21 AM Changeset in webkit [229628] by youenn@apple.com
  • 5 edits
    2 adds in trunk

MessagePort is not always destroyed on the right thread
https://bugs.webkit.org/show_bug.cgi?id=183619
<rdar://problem/38204711>

Reviewed by Chris Dumez.

Source/WebCore:

Add assertion to ensure MessagePort is destroyed in the right thread.
Modify methods taking a ref in a lambda to rely on weak pointers and refing the WorkerThread if in a worker context.
It is safe to ref the WorkerThread since it is thread safe ref counted and we are passing the ref to the main thread
where the WorkerThread is expected to be destroyed.

Test: http/tests/workers/worker-messageport-2.html

  • dom/MessagePort.cpp:

(WebCore::MessagePort::~MessagePort):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::updateActivity):
(WebCore::MessagePort::hasPendingActivity const):

  • dom/MessagePort.h:

LayoutTests:

  • TestExpectations:
  • http/tests/workers/worker-messageport-2-expected.txt: Added.
  • http/tests/workers/worker-messageport-2.html: Added.
10:35 AM Changeset in webkit [229627] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

EWS should print the URL in logs on URLError
https://bugs.webkit.org/show_bug.cgi?id=183651

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla.py:

(Bugzilla.open_url): Pass the url.

  • Scripts/webkitpy/common/net/networktransaction.py:

(NetworkTransaction.run): Accept optional url parameter and print it on URLError.

9:58 AM Changeset in webkit [229626] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Adopt new AVURLAssetUseClientURLLoadingExclusively AVURLAsset creation option.
https://bugs.webkit.org/show_bug.cgi?id=183660

Reviewed by Jon Lee.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

9:17 AM Changeset in webkit [229625] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix tiny mistake in r229615 that caused API tests failures.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::addRegistrationFromStore):

9:00 AM Changeset in webkit [229624] by Ms2ger@igalia.com
  • 5 edits in trunk

[GTK][WPE] Enable service workers
https://bugs.webkit.org/show_bug.cgi?id=178576

Reviewed by Žan Doberšek.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

LayoutTests:

  • platform/wpe/TestExpectations: update remaining expectations to point to another bug.
8:59 AM Changeset in webkit [229623] by Alan Bujtas
  • 13 edits in trunk/Tools

[LayoutReloaded] Introduce Layout namespace
https://bugs.webkit.org/show_bug.cgi?id=183659

Reviewed by Antti Koivisto.

This is in preparation for introducing the display tree.
Box -> Layout.Box

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:

(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype.computeWidth):
(BlockFormattingContext.prototype.computeHeight):
(BlockFormattingContext.prototype.marginTop):
(BlockFormattingContext.prototype.marginBottom):
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._placeOutOfFlowDescendants):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._horizontalConstraint):
(BlockFormattingContext.prototype._contentHeight):
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._shrinkToFitWidth):
(BlockFormattingContext):
(BlockFormattingContext.prototype._computeHorizontalConstraint): Deleted.
(BlockFormattingContext.prototype._computeContentHeight): Deleted.

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:

(BlockMarginCollapse.marginTop):
(BlockMarginCollapse.marginBottom):
(BlockMarginCollapse._isMarginTopCollapsedWithSibling):
(BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
(BlockMarginCollapse._nonCollapsedMarginTop):
(BlockMarginCollapse._nonCollapsedMarginBottom):
(BlockMarginCollapse._collapsedMarginTopFromFirstChild):
(BlockMarginCollapse._collapsedMarginBottomFromLastChild):
(BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
(BlockMarginCollapse):

  • LayoutReloaded/FormattingContext/FloatingContext.js:

(FloatingContext.prototype.computePosition):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):

  • LayoutReloaded/FormattingContext/FormattingContext.js:

(FormattingContext.prototype.computeWidth):
(FormattingContext.prototype.computeHeight):
(FormattingContext.prototype.marginTop):
(FormattingContext.prototype.marginLeft):
(FormattingContext.prototype.marginBottom):
(FormattingContext.prototype.marginRight):
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
(FormattingContext):

  • LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:

(InlineFormattingContext.prototype.layout):

  • LayoutReloaded/LayoutTree/BlockContainer.js:

(BlockContainer): Deleted.
(BlockContainer.prototype.establishesInlineFormattingContext): Deleted.

  • LayoutReloaded/LayoutTree/Box.js:

(Box): Deleted.
(Box.prototype.id): Deleted.
(Box.prototype.setRendererName): Deleted.
(Box.prototype.name): Deleted.
(Box.prototype.node): Deleted.
(Box.prototype.parent): Deleted.
(Box.prototype.nextSibling): Deleted.
(Box.prototype.nextInFlowSibling): Deleted.
(Box.prototype.previousSibling): Deleted.
(Box.prototype.previousInFlowSibling): Deleted.
(Box.prototype.setParent): Deleted.
(Box.prototype.setNextSibling): Deleted.
(Box.prototype.setPreviousSibling): Deleted.
(Box.prototype.rect): Deleted.
(Box.prototype.topLeft): Deleted.
(Box.prototype.bottomRight): Deleted.
(Box.prototype.setTopLeft): Deleted.
(Box.prototype.setSize): Deleted.
(Box.prototype.setWidth): Deleted.
(Box.prototype.setHeight): Deleted.
(Box.prototype.isContainer): Deleted.
(Box.prototype.isBlockLevelBox): Deleted.
(Box.prototype.isBlockContainerBox): Deleted.
(Box.prototype.isInlineLevelBox): Deleted.
(Box.prototype.setIsAnonymous): Deleted.
(Box.prototype.isAnonymous): Deleted.
(Box.prototype.establishesFormattingContext): Deleted.
(Box.prototype.establishedFormattingContext): Deleted.
(Box.prototype.establishesBlockFormattingContext): Deleted.
(Box.prototype.establishesInlineFormattingContext): Deleted.
(Box.prototype.isPositioned): Deleted.
(Box.prototype.isRelativePositioned): Deleted.
(Box.prototype.isAbsolutePositioned): Deleted.
(Box.prototype.isFixedPositioned): Deleted.
(Box.prototype.isInFlow): Deleted.
(Box.prototype.isOutOfFlowPositioned): Deleted.
(Box.prototype.isInFlowPositioned): Deleted.
(Box.prototype.isFloatingPositioned): Deleted.
(Box.prototype.isFloatingOrOutOfFlowPositioned): Deleted.
(Box.prototype.isRootElement): Deleted.
(Box.prototype.containingBlock): Deleted.
(Box.prototype.borderBox): Deleted.
(Box.prototype.paddingBox): Deleted.
(Box.prototype.contentBox): Deleted.

  • LayoutReloaded/LayoutTree/Container.js:

(Container): Deleted.
(Container.prototype.isContainer): Deleted.
(Container.prototype.setFirstChild): Deleted.
(Container.prototype.setLastChild): Deleted.
(Container.prototype.firstChild): Deleted.
(Container.prototype.firstInFlowChild): Deleted.
(Container.prototype.lastChild): Deleted.
(Container.prototype.lastInFlowChild): Deleted.
(Container.prototype.hasChild): Deleted.
(Container.prototype.hasInFlowChild): Deleted.

  • LayoutReloaded/LayoutTree/InitialBlockContainer.js:

(InitialBlockContainer): Deleted.
(InitialBlockContainer.prototype.establishesBlockFormattingContext): Deleted.
(InitialBlockContainer.prototype.paddingBox): Deleted.
(InitialBlockContainer.prototype.contentBox): Deleted.

  • LayoutReloaded/LayoutTree/InlineBox.js:

(InlineBox): Deleted.
(InlineBox.prototype.setText): Deleted.
(InlineBox.prototype.text): Deleted.

  • LayoutReloaded/TreeBuilder.js:

(TreeBuilder.prototype.createTree):
(TreeBuilder.prototype._createAndAttachBox):

  • LayoutReloaded/Utils.js:

(Utils._dumpBox):

1:37 AM WebKitGTK/2.20.x edited by tpopela@redhat.com
(diff)
12:34 AM Changeset in webkit [229622] by zandobersek@gmail.com
  • 8 edits in trunk/Source

[TexMap] Remove TextureMapperLayer::texture()
https://bugs.webkit.org/show_bug.cgi?id=183635

Reviewed by Michael Catanzaro.

Source/WebCore:

Remove the unused TextureMapperLayer::texture() method. This enables
removing the virtual TextureMapperBackingStore::texture() method, as
well as the implementations of it in TextureMapperTiledBackingStore and
CoordinatedBackingStore classes.

No change in behavior.

  • platform/graphics/texmap/TextureMapperBackingStore.h:
  • platform/graphics/texmap/TextureMapperLayer.h:
  • platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:

(WebCore::TextureMapperTiledBackingStore::texture const): Deleted.

  • platform/graphics/texmap/TextureMapperTiledBackingStore.h:

Source/WebKit:

Remove the CoordinatedBackingStore::texture() override since the virtual
method is also being removed.

  • Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:

(WebKit::CoordinatedBackingStore::texture const): Deleted.

  • Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
12:14 AM Changeset in webkit [229621] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[TexMap] Don't bother caching pattern transform matrix
https://bugs.webkit.org/show_bug.cgi?id=183633

Reviewed by Michael Catanzaro.

Remove the m_patternTransform and m_patternTransformDirty member
variables from the TextureMapperLayer class. These unnecessarily
complicate the state update methods that need to compare the given
attribute against the current state, and only update it if it has
changed.

Instead, compute the pattern TransformationMatrix value on-the-fly in
the paintSelf() method, if at all necessary.

No change in functionality.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::setContentsRect):
(WebCore::TextureMapperLayer::setContentsTileSize):
(WebCore::TextureMapperLayer::setContentsTilePhase):
(WebCore::TextureMapperLayer::computePatternTransformIfNeeded): Deleted.

  • platform/graphics/texmap/TextureMapperLayer.h:

Mar 14, 2018:

10:54 PM Changeset in webkit [229620] by webkit@devinrousso.com
  • 4 edits in trunk

Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion
https://bugs.webkit.org/show_bug.cgi?id=183647
<rdar://problem/38479187>

Reviewed by Matt Baker.

Source/WebInspectorUI:

When recordings are initiated via console.record, we don't want to automatically show the
recording after it's payload is sent to the frontend. We determine whether a recording came
from the console by comparing the recording's associated canvas with the current value of
_recordingCanvas. Previously, when stopping a recording, we would always null the value,
which meant that all non-single-frame recordings (single-frame recordings are stopped by
the agent after the first paint or tick after an action is performed) would be categorized
as coming from the console, since _recordingCanvas would be null by the time the frontend
recieved the payload.

This patch changes it so that the nulling of _recordingCanvas in stopRecording is only
done if the agent command errors. It was already the case that _recordingCanvas was nulled
in stopRecording, so this patch just prevents it from being nulled too early.

  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager.prototype.stopRecording):

LayoutTests:

  • inspector/canvas/recording-2d.html:

Reorder the agent calls so that the CanvasManager _recordingCanvas state variable has a
chance to properly update after a recording is stopped.

10:05 PM Changeset in webkit [229619] by wilander@apple.com
  • 13 edits in trunk/Source

Resource Load Statistics: Add clearing of storage access to WebResourceLoadStatisticsStore::clearInMemory()
https://bugs.webkit.org/show_bug.cgi?id=183641
<rdar://problem/38469497>

Reviewed by Brent Fulgham and Chris Dumez.

Source/WebCore:

No new tests. This change is to stabilize existing layout tests.
See Ryan Haddad's comment in https://bugs.webkit.org/show_bug.cgi?id=183620.

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

(WebCore::NetworkStorageSession::removeAllStorageAccess):

New function to clear out all storage access entries.

Source/WebKit:

This change is to stabilize existing layout tests by removing
all storage access entries on a call to
WebResourceLoadStatisticsStore::clearInMemory().
See Ryan Haddad's comment in https://bugs.webkit.org/show_bug.cgi?id=183620.

Almost all of the code changes are piping to get this
call from the WebResourceLoadStatisticsStore to
WebCore::NetworkStorageSession where entries reside.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::removeAllStorageAccess):

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

(WebKit::NetworkProcessProxy::removeAllStorageAccess):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::clearInMemory):

Now also clears all storage access entries in the network process.

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

(WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
8:17 PM Changeset in webkit [229618] by aakash_jain@apple.com
  • 4 edits in trunk/Websites/perf.webkit.org

Add support for boolean properties in BuildbotSyncer while submitting build request to Buildbot 0.9 server
https://bugs.webkit.org/show_bug.cgi?id=183638

Reviewed by Ryosuke Niwa.

  • tools/js/buildbot-syncer.js:

(BuildbotSyncer._parseRepositoryGroupPropertyTemplate): Allow boolean properties.

  • server-tests/tools-sync-buildbot-integration-tests.js: Tests for boolean properties.
  • unit-tests/buildbot-syncer-tests.js: Ditto.
3:58 PM Changeset in webkit [229617] by Ryan Haddad
  • 11 edits
    1 copy
    39 deletes in trunk

Unreviewed, rolling out r229613.

Caused API test failures

Reverted changeset:

"Make policy decisions asynchronous"
https://bugs.webkit.org/show_bug.cgi?id=180568
https://trac.webkit.org/changeset/229613

3:52 PM Changeset in webkit [229616] by youenn@apple.com
  • 15 edits in trunk/Source

imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=183602

Reviewed by Chris Dumez.

Introduce a map of ScriptExecutionContext that is read/write protected using a Lock.
This allows introducing postTaskTo taking a ScriptExecutionContext identifier and callable from any thread.
Use that method in Crypto instead of refing/unrefing the context.
Lock only happens if context does some postTask activity. This is governed by calling or not the new contextIdentifier() getter.

Covered by crypto tests no longer failing m_workerGlobalScope->hasOneRef() assertion.

  • crypto/CryptoAlgorithm.cpp:

(WebCore::dispatchAlgorithmOperation):

  • crypto/algorithms/CryptoAlgorithmECDH.cpp:

(WebCore::CryptoAlgorithmECDH::deriveBits):

  • crypto/algorithms/CryptoAlgorithmSHA1.cpp:

(WebCore::CryptoAlgorithmSHA1::digest):

  • crypto/algorithms/CryptoAlgorithmSHA224.cpp:

(WebCore::CryptoAlgorithmSHA224::digest):

  • crypto/algorithms/CryptoAlgorithmSHA256.cpp:

(WebCore::CryptoAlgorithmSHA256::digest):

  • crypto/algorithms/CryptoAlgorithmSHA384.cpp:

(WebCore::CryptoAlgorithmSHA384::digest):

  • crypto/algorithms/CryptoAlgorithmSHA512.cpp:

(WebCore::CryptoAlgorithmSHA512::digest):

  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • dom/Document.cpp:

(WebCore::Document::~Document):

  • dom/ScriptExecutionContext.cpp:

(WebCore::allScriptExecutionContextsMapLock):
(WebCore::ScriptExecutionContext::ScriptExecutionContext):
(WebCore::ScriptExecutionContext::removeFromContextsMap):
(WebCore::ScriptExecutionContext::checkConsistency const):
(WebCore::ScriptExecutionContext::postTaskTo):

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::contextIdentifier const):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::~WorkerGlobalScope):

3:32 PM Changeset in webkit [229615] by Chris Dumez
  • 9 edits in trunk/Source

Reduce use of SWServerToContextConnection::globalServerToContextConnection()
https://bugs.webkit.org/show_bug.cgi?id=183626

Reviewed by Youenn Fablet.

Source/WebCore:

Reduce use of SWServerToContextConnection::globalServerToContextConnection() as we are moving towards
having multiple context connections.

No new tests, no expected behavior change.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::matchAll):
(WebCore::SWServer::serverToContextConnectionCreated):
(WebCore::SWServer::runServiceWorkerIfNecessary):
(WebCore::SWServer::runServiceWorker):
(WebCore::SWServer::terminateWorkerInternal):
(WebCore::SWServer::markAllWorkersAsTerminated):
(WebCore::SWServer::workerContextTerminated):
(WebCore::SWServer::fireInstallEvent):
(WebCore::SWServer::fireActivateEvent):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerToContextConnection.cpp:

(WebCore::SWServerToContextConnection::findClientByIdentifier):
(WebCore::SWServerToContextConnection::matchAll):
(WebCore::SWServerToContextConnection::claim):

  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::contextConnection):
(WebCore::SWServerWorker::matchAll):

  • workers/service/server/SWServerWorker.h:

Source/WebKit:

Reduce use of SWServerToContextConnection::globalServerToContextConnection() as we are moving
towards having multiple context connections.

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::postMessageToServiceWorker):

3:20 PM Changeset in webkit [229614] by youenn@apple.com
  • 3 edits
    3 adds in trunk

MessagePort should remove its listeners when being closed
https://bugs.webkit.org/show_bug.cgi?id=183644

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/workers/worker-messageport.html

  • dom/MessagePort.cpp:

(WebCore::MessagePort::close):
(WebCore::MessagePort::contextDestroyed):

LayoutTests:

  • http/tests/workers/resources/messageport-echo-worker.js: Added.
  • http/tests/workers/worker-messageport-expected.txt: Added.
  • http/tests/workers/worker-messageport.html: Added.
2:47 PM Changeset in webkit [229613] by Chris Dumez
  • 11 edits
    27 copies
    1 move
    73 adds in trunk

Make policy decisions asynchronous
https://bugs.webkit.org/show_bug.cgi?id=180568
<rdar://problem/37131297>

Reviewed by Alex Christensen.

Source/WebKit:

Get rid of synchronous IPC and synchronous code paths for policy delegates.
Policy decisions are now all made asynchronously and rely on asynchronous
IPC.

This code change is based on work by Alex Christensen.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

LayoutTests:

Rebaseline tests for WebKit2. The issue is that some tests dump policy delegate calls
and things now happen in a slightly different order now that those delegates are
asynchronous.

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt:
  • platform/ios/http/tests/loading/simple-subframe-expected.txt:
  • platform/mac-wk2/http/tests/loading/simple-subframe-expected.txt: Copied from LayoutTests/platform/ios/http/tests/loading/simple-subframe-expected.txt.
  • platform/wk2/fast/loader/fragment-navigation-base-blank-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/fast/loader/iframe-meta-refresh-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/fast/loader/iframe-set-location-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/fast/loader/main-document-url-for-non-http-loads-expected.txt: Added.
  • platform/wk2/fast/loader/refresh-iframe-base-blank-expected.txt: Copied from LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt.
  • platform/wk2/fast/loader/subframe-removes-itself-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled-expected.txt: Added.
  • platform/wk2/http/tests/contentextensions/block-everything-unless-domain-expected.txt: Added.
  • platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt:
  • platform/wk2/http/tests/loading/bad-server-subframe-expected.txt: Added.
  • platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt:
  • platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt: Added.
  • platform/wk2/http/tests/loading/slow-parsing-subframe-expected.txt: Added.
  • platform/wk2/http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt: Added.
  • platform/wk2/http/tests/misc/window-dot-stop-expected.txt: Added.
  • platform/wk2/http/tests/navigation/redirect-preserves-fragment-expected.txt: Added.
  • platform/wk2/http/tests/navigation/redirect-to-fragment-expected.txt: Added.
  • platform/wk2/http/tests/navigation/redirect-to-invalid-url-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-in-body-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-allow-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow-expected.txt: Added.
  • platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt: Added.
  • platform/wk2/http/tests/security/blocked-on-redirect-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-enforced-and-report-policies-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-inherited-policy-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-xslt-document-in-iframe-with-inherited-policy-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-with-inherited-policy-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-main-frame-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades-expected.txt: Added.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/http-0.9/iframe-blocked-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/about-blank-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/data-url-iframe-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/data-url-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/empty-url-plugin-in-frame-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-css-with-secure-cookies-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-form-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/insecure-form-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/insecure-image-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/mixedContent/javascript-url-form-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-block-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-expected.txt: Added.
  • platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/inspector/page/frameScheduledNavigation-expected.txt: Added.
  • platform/wk2/loader/go-back-cached-main-resource-expected.txt: Added.
  • platform/wk2/webarchive/loading/mainresource-null-mimetype-crash-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/webarchive/loading/test-loading-archive-expected.txt: Copied from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
  • platform/wk2/webarchive/loading/video-in-webarchive-expected.txt: Renamed from LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt.
1:43 PM Changeset in webkit [229612] by Chris Dumez
  • 7 edits in trunk/Source

Drop unnecessary StorageToWebProcessConnection::workerContextProcessConnectionCreated()
https://bugs.webkit.org/show_bug.cgi?id=183624

Reviewed by Youenn Fablet.

Source/WebCore:

Pass in context connection to SWServer::serverToContextConnectionCreated() to avoid
relying on the deprecated globalServerToContextConnection().

No new tests, no expected behavior change.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::serverToContextConnectionCreated):

  • workers/service/server/SWServer.h:

Source/WebKit:

Drop unnecessary StorageToWebProcessConnection::workerContextProcessConnectionCreated()
since it was going through all SWServers. Calling workerContextProcessConnectionCreated()
on every StorageToWebProcessConnection was thus doing redundant work.

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::createStorageToWebProcessConnection):

  • StorageProcess/StorageToWebProcessConnection.cpp:

(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
(WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated): Deleted.

  • StorageProcess/StorageToWebProcessConnection.h:
1:20 PM Changeset in webkit [229611] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Fix the build after r229387
https://bugs.webkit.org/show_bug.cgi?id=183639
<rdar://problem/38448568>

Reviewed by Dean Jackson.

  • wtf/Platform.h:
1:07 PM Changeset in webkit [229610] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip three svg LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=183572

Unreviewed test gardening.

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

Enhance the MacroAssembler and LinkBuffer to support pointer profiling.
https://bugs.webkit.org/show_bug.cgi?id=183623
<rdar://problem/38443314>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

  1. Added a PtrTag argument to indirect call() and indirect jump() MacroAssembler emitters to support pointer profiling.
  1. Also added tagPtr(), untagPtr(), and removePtrTag() placeholder methods.
  1. Added a PtrTag to LinkBuffer finalizeCodeWithoutDisassembly() and clients.
  1. Updated clients to pass a PtrTag. For the most part, I just apply NoPtrTag as a placeholder until we have time to analyze what pointer profile each client site has later.


  1. Apply PtrTags to the YarrJIT.
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::linkJumpOrCall):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::getLinkerAddress):
(JSC::AbstractMacroAssembler::tagPtr):
(JSC::AbstractMacroAssembler::untagPtr):
(JSC::AbstractMacroAssembler::removePtrTag):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::finalizeCodeWithoutDisassembly):
(JSC::LinkBuffer::finalizeCodeWithDisassembly):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::link):
(JSC::LinkBuffer::locationOfNearCall):
(JSC::LinkBuffer::locationOf):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::jump):
(JSC::MacroAssemblerARM::call):
(JSC::MacroAssemblerARM::readCallTarget):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::call):
(JSC::MacroAssemblerARM64::jump):
(JSC::MacroAssemblerARM64::readCallTarget):
(JSC::MacroAssemblerARM64::linkCall):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::relativeTableJump):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::readCallTarget):

  • assembler/MacroAssemblerCodeRef.cpp:

(JSC::MacroAssemblerCodePtr::createLLIntCodePtr):
(JSC::MacroAssemblerCodeRef::createLLIntCodeRef):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::FunctionPtr::FunctionPtr):
(JSC::FunctionPtr::value const):
(JSC::MacroAssemblerCodePtr:: const):
(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
(JSC::MacroAssemblerCodeRef::retaggedCode const):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::jump):
(JSC::MacroAssemblerMIPS::call):
(JSC::MacroAssemblerMIPS::readCallTarget):

  • assembler/MacroAssemblerX86.h:

(JSC::MacroAssemblerX86::call):
(JSC::MacroAssemblerX86::jump):
(JSC::MacroAssemblerX86::readCallTarget):

  • assembler/MacroAssemblerX86Common.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::jump):
(JSC::MacroAssemblerX86Common::call):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::call):
(JSC::MacroAssemblerX86_64::jump):
(JSC::MacroAssemblerX86_64::readCallTarget):

  • assembler/testmasm.cpp:

(JSC::compile):
(JSC::invoke):

  • b3/B3Compile.cpp:

(JSC::B3::compile):

  • b3/B3LowerMacros.cpp:
  • b3/air/AirCCallSpecial.cpp:

(JSC::B3::Air::CCallSpecial::generate):

  • b3/air/testair.cpp:
  • b3/testb3.cpp:

(JSC::B3::invoke):
(JSC::B3::testInterpreter):
(JSC::B3::testEntrySwitchSimple):
(JSC::B3::testEntrySwitchNoEntrySwitch):
(JSC::B3::testEntrySwitchWithCommonPaths):
(JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
(JSC::B3::testEntrySwitchLoop):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/AccessCaseSnippetParams.cpp:

(JSC::SlowPathCallGeneratorWithArguments::generateImpl):

  • bytecode/InlineAccess.cpp:

(JSC::linkCodeInline):
(JSC::InlineAccess::rewireStubAsJump):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):
(JSC::PolymorphicAccess::regenerate):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileExceptionHandlers):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compileFunction):
(JSC::DFG::JITCompiler::noticeCatchEntrypoint):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::appendCall):

  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileOSRExit):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):
(JSC::DFG::osrWriteBarrier):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):
(JSC::DFG::SpeculativeJIT::emitSwitchImm):
(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitThunkGenerator):
(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::finalizeCommon):

  • ftl/FTLLazySlowPath.cpp:

(JSC::FTL::LazySlowPath::generate):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):

  • ftl/FTLSlowPathCall.cpp:

(JSC::FTL::SlowPathCallContext::makeCall):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::osrExitGenerationThunkGenerator):
(JSC::FTL::lazySlowPathGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::callExceptionFuzz):
(JSC::AssemblyHelpers::debugCall):

  • jit/CCallHelpers.cpp:

(JSC::CCallHelpers::ensureShadowChickenPacket):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::jumpToExceptionHandler):

  • jit/ExecutableAllocator.cpp:

(JSC::FixedVMPoolExecutableAllocator::jitWriteThunkGenerator):

  • jit/JIT.cpp:

(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::link):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:

(JSC::JIT::appendCall):

  • jit/JITMathIC.h:

(JSC::isProfileEmpty):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::stringGetByValStubGenerator):

  • jit/JITStubRoutine.h:
  • jit/Repatch.cpp:

(JSC::readCallTarget):
(JSC::appropriateOptimizingPutByIdFunction):
(JSC::linkPolymorphicCall):
(JSC::resetPutByID):

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::call):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):
(JSC::SpecializedThunkJIT::callDoubleToDouble):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):
(JSC::LLInt::functionForCallEntryThunkGenerator):
(JSC::LLInt::functionForConstructEntryThunkGenerator):
(JSC::LLInt::functionForCallArityCheckThunkGenerator):
(JSC::LLInt::functionForConstructArityCheckThunkGenerator):
(JSC::LLInt::evalEntryThunkGenerator):
(JSC::LLInt::programEntryThunkGenerator):
(JSC::LLInt::moduleProgramEntryThunkGenerator):

  • runtime/PtrTag.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::throwStackOverflowFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGTierUpThunkGenerator):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::wasmToJS):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
(JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels):
(JSC::Yarr::YarrGenerator::generateTryReadUnicodeCharacterHelper):
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):

  • yarr/YarrJIT.h:

(JSC::Yarr::YarrCodeBlock::execute):

Source/WebCore:

No new tests. Just adding PtrTags required by new MacroAssembler API.

  • cssjit/FunctionCall.h:

(WebCore::FunctionCall::prepareAndCall):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

1:00 PM Changeset in webkit [229608] by caitp@igalia.com
  • 11 edits
    1 add in trunk

[JSC] fix order of evaluation for ClassDefinitionEvaluation
https://bugs.webkit.org/show_bug.cgi?id=183523

Reviewed by Keith Miller.

Computed property names need to be evaluated in source order during class
definition evaluation, as it's observable (and specified to work this way).

This change improves compatibility with Chromium.

JSTests:

  • stress/class_elements.js: Added.

(test):
(test.C.prototype.effect):
(test.C.effect):
(test.C.prototype.get effect):
(test.C.prototype.set effect):
(test.C):

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitDefineClassElements):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createClassExpr):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createProperty):

  • parser/NodeConstructors.h:

(JSC::PropertyNode::PropertyNode):
(JSC::ClassExprNode::ClassExprNode):

  • parser/Nodes.cpp:

(JSC::PropertyListNode::hasStaticallyNamedProperty):

  • parser/Nodes.h:

(JSC::PropertyNode::isClassProperty const):
(JSC::PropertyNode::isStaticClassProperty const):
(JSC::PropertyNode::isInstanceClassProperty const):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseGetterSetter):

  • parser/Parser.h:
  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createClassExpr):
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createGetterOrSetterProperty):

12:54 PM Changeset in webkit [229607] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.9.1/Source

Versioning.

12:47 PM Changeset in webkit [229606] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.9.1

New tag.

12:44 PM Changeset in webkit [229605] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Move jsc CLI breakpoint function to $vm
https://bugs.webkit.org/show_bug.cgi?id=183512

Reviewed by Yusuke Suzuki.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionBreakpoint): Deleted.

  • tools/JSDollarVM.cpp:

(JSC::functionBreakpoint):
(JSC::JSDollarVM::finishCreation):

10:56 AM Changeset in webkit [229604] by aboya@igalia.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK test gardening.
https://bugs.webkit.org/show_bug.cgi?id=183636

  • platform/gtk/TestExpectations:
10:51 AM Changeset in webkit [229603] by Chris Fleizach
  • 11 edits
    2 adds in trunk

AX: Implement accessible dismiss action on iOS
https://bugs.webkit.org/show_bug.cgi?id=183352
<rdar://problem/38161500>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: accessibility/ios-simulator/AOM-dismiss-event.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityPerformEscape]):

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::dismiss const):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::dismiss):

LayoutTests:

  • accessibility/ios-simulator/AOM-dismiss-event-expected.txt: Added.
  • accessibility/ios-simulator/AOM-dismiss-event.html: Added.
  • platform/mac-wk1/TestExpectations:
10:41 AM Changeset in webkit [229602] by youenn@apple.com
  • 762 edits
    5 copies
    10 moves
    33 adds
    40 deletes in trunk

Update libwebrtc up to 36af4e9614f707f733eb2340fae66d6325aaac5b
https://bugs.webkit.org/show_bug.cgi?id=183481

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/: refreshed
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Covered by existing tests.
Updated libwebrtc binding code.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::fillEncodingParameters):

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:

Tools:

  • Scripts/webkitpy/style/checker.py: Do not check style.

LayoutTests:

  • webrtc/video-stats.html:
10:18 AM WebKitGTK/Gardening/Calendar edited by aboya@igalia.com
(diff)
9:18 AM Changeset in webkit [229601] by fred.wang@free.fr
  • 18 edits
    8 copies
    1 delete in trunk/LayoutTests

Finish migration to MathML WPT tests
https://bugs.webkit.org/show_bug.cgi?id=183628

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-14
Reviewed by Manuel Rego Casasnovas.

In r225162, the MathML tests from the WPT repository were imported. They were intended to
replace the ones in imported/mathml-in-html5 but the migration was not fully possible. The
main issue was that many MathML tests use Web fonts to test the use of OpenType parameters
but document.fonts.ready is unreliable in WebKit (bug 174030). A workaround was implemented
in WPT ( https://github.com/w3c/web-platform-tests/pull/10025 ) so this commit finishes
the migration. We update the WPT MathML tests and now run them all, we remove
imported/mathml-in-html5 and the associated TestExpectations failures. Two cases unrelated to
font loading are still failing: One for the SuperscriptShiftUpCramped parameter (bug 156401)
and one for the RadicalDegreeBottomRaisePercent parameter (bug 183631).

LayoutTests/imported/w3c:

Reviewed by Manuel Rego Casasnovas.

  • web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1-expected.txt.
  • web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2-expected.txt.
  • web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1-expected.txt.

Also add the failure with RadicalDegreeBottomRaisePercent.

  • web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1-expected.txt.

Also add the failure for SuperscriptShiftUpCramped.

  • web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1-expected.txt.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2-expected.txt.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3-expected.txt.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4-expected.txt: Renamed from LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4-expected.txt.
  • web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html: Import font loading workaround.
  • web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html: Import font loading workaround.
  • web-platform-tests/mathml/relations/css-styling/displaystyle-1.html: Import font loading workaround.
  • web-platform-tests/mathml/relations/css-styling/lengths-3.html: Import font loading workaround.
  • web-platform-tests/mathml/tools/utils/misc.py: Import update to Python 3.

(downloadWithProgressBar):

LayoutTests:

  • TestExpectations: Unskip MathML WPT tests.
  • imported/mathml-in-html5/LICENSE: Removed.
  • imported/mathml-in-html5/README.md: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3.html: Removed.
  • imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4.html: Removed.
  • platform/mac-wk2/TestExpectations: Remove the expectation.
  • platform/win/TestExpectations: Remove the expectation.
9:11 AM Changeset in webkit [229600] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Add label on github when exporting wpt tests to w3c/web-platform-test repo
https://bugs.webkit.org/show_bug.cgi?id=183575

Patch by Brendan McLoughlin <brendan@bocoup.com> on 2018-03-14
Reviewed by Youenn Fablet.

  • Scripts/webkitpy/w3c/test_exporter.py:

(TestExporter.make_pull_request):
(parse_args):

  • Scripts/webkitpy/w3c/test_exporter_unittest.py:

(TestExporterTest.test_export):

7:48 AM Changeset in webkit [229599] by Alan Bujtas
  • 8 edits in trunk/Tools

[LayoutReloaded] Add InlineBox dump
https://bugs.webkit.org/show_bug.cgi?id=183625

Reviewed by Antti Koivisto.

Right now line boxes live off of the inline formatting context but that's temporary and
they will be moved over to the BoxTree.

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:

(BlockFormattingContext.prototype._computeContentHeight):

  • LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:

(InlineFormattingContext):
(InlineFormattingContext.prototype.lines):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._commitLine):
(InlineFormattingContext.prototype._initializeLine):

  • LayoutReloaded/FormattingContext/InlineFormatting/Line.js:

(Line):
(Line.prototype.isEmpty):
(Line.prototype.rect):
(Line.prototype.lineBoxes):
(Line.prototype.addLineBox):
(Line.prototype.appendFragment): Deleted.

  • LayoutReloaded/README.md:
  • LayoutReloaded/Utils.js:

(Utils.computedLineHeight):
(Utils.isBlockContainerElement):
(Utils.textHeight):
(Utils._dumpBox):
(Utils._dumpLines.):
(Utils._dumpLines):
(Utils._dumpTree):
(Utils.precisionRound):
(Utils):

  • LayoutReloaded/misc/LayoutReloadedWebKit.patch:
  • LayoutReloaded/test/index.html:
1:04 AM Changeset in webkit [229598] by timothy_horton@apple.com
  • 12 edits in trunk

Fix the build after r229567

  • Configurations/FeatureDefines.xcconfig:

Mar 13, 2018:

10:17 PM Changeset in webkit [229597] by wilander@apple.com
  • 14 edits
    5 adds in trunk

Resource Load Statistics: Immediately forward cookie access for domains with previous user interaction when there's an opener document
https://bugs.webkit.org/show_bug.cgi?id=183620
<rdar://problem/38431469>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/storageAccess/deny-storage-access-under-opener.html

http/tests/storageAccess/grant-storage-access-under-opener.html

It turns out the fix in https://bugs.webkit.org/show_bug.cgi?id=183577
wasn't enough to address the compatibility issues with popups. Some of
them just detect their unpartitioned cookies, auto-dismiss themselves,
and expect their unpartitioned cookies to be available under the opener
afterwards. We should grant them access if the popup's domain has had
user interaction _previously_.

Note that we still need https://bugs.webkit.org/show_bug.cgi?id=183577
because if the popup's domain has not received user interaction
previously, we will not grant it storage access on just the window open.

  • dom/Document.cpp:

(WebCore::Document::hasRequestedPageSpecificStorageAccessWithUserInteraction):
(WebCore::Document::setHasRequestedPageSpecificStorageAccessWithUserInteraction):
(WebCore::Document::hasGrantedPageSpecificStorageAccess): Deleted.
(WebCore::Document::setHasGrantedPageSpecificStorageAccess): Deleted.

Renamed from *Granted* to *Requested* since there is now a case
where access will not be granted, i.e. when the popup domain has
not had user interaction previously.

  • dom/Document.h:
  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):

Renamed *Grant* to *Request*.

(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logWindowCreation):

New function called from DOMWindow::createWindow().

(WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):

New convenience function.

(WebCore::ResourceLoadObserver::setGrantStorageAccessUnderOpenerCallback): Deleted.

Renamed *Grant* to *Request*.

  • loader/ResourceLoadObserver.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

Now calls ResourceLoadObserver::logWindowCreation() if a window
was created and the opener has a document and a page ID.

Source/WebKit:

It turns out the fix in https://bugs.webkit.org/show_bug.cgi?id=183577
wasn't enough to address the compatibility issues with popups. Some of
them just detect their unpartitioned cookies, auto-dismiss themselves,
and expect their unpartitioned cookies to be available under the opener
afterwards. We should grant them access if the popup's domain has had
user interaction _previously_.

Note that we still need https://bugs.webkit.org/show_bug.cgi?id=183577
because if the popup's domain has not received user interaction
previously, we will not grant it storage access on just the window open.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccessUnderOpener): Deleted.

Renamed WebResourceLoadStatisticsStore::grantStorageAccessUnderOpener()
to WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener()
since there is now a case where access will not be granted, i.e. when
the popup domain has not had user interaction previously.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebResourceLoadStatisticsStore.messages.in:

Similar renaming.

  • WebProcess/WebProcess.cpp:

(WebProcess::WebProcess):

Similar renaming.

LayoutTests:

  • http/tests/storageAccess/deny-storage-access-under-opener-expected.txt: Added.
  • http/tests/storageAccess/deny-storage-access-under-opener.html: Added.
  • http/tests/storageAccess/grant-storage-access-under-opener-expected.txt: Added.
  • http/tests/storageAccess/grant-storage-access-under-opener.html: Added.
  • http/tests/storageAccess/resources/set-cookie-and-report-back.html: Added.
  • platform/ios/TestExpectations:

New tests marked as [ Pass ].

  • platform/mac-wk2/TestExpectations:

New tests marked as [ Pass ].

6:02 PM Changeset in webkit [229596] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

fast/loader/javascript-url-iframe-remove-on-navigate.html is a flaky crash on iOS with async delegates
https://bugs.webkit.org/show_bug.cgi?id=183610

Reviewed by Youenn Fablet.

The issue was that in DocumentLoader::loadMainResource(), the call to requestMainResource() which
return null due to the load getting cancelled synchronously. If this load is the parent frame's last
pending load, then the 'load' event gets fired in the parent frame. In the test, the parent frame's
load event handler does a document.write() call which blows away the iframe. As a result, when
we return from the requestMainResource(), m_frame is null and we crash later on dereferencing it.

No new tests, covered by fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html
which was crashing flakily.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::loadMainResource):

6:00 PM Changeset in webkit [229595] by jmarcell@apple.com
  • 2 edits
    1 move
    1 add
    6 deletes in tags/Safari-606.1.9/Source/WebKit

Revert r229512. rdar://problem/38435829

6:00 PM Changeset in webkit [229594] by jmarcell@apple.com
  • 1 edit
    10 deletes in tags/Safari-606.1.9/Source/WebKit

Revert r229592. rdar://problem/38435829

5:07 PM WebKitGTK/2.20.x edited by Adrian Perez de Castro
Remove item which is not yet merged to trunk (diff)
5:06 PM WebKitGTK/2.20.x edited by Adrian Perez de Castro
(diff)
4:47 PM Changeset in webkit [229593] by jmarcell@apple.com
  • 1 edit
    13 adds in tags/Safari-606.1.9/Source/WebKit

Cherry-pick r229592. rdar://problem/38435829

4:19 PM Changeset in webkit [229592] by jer.noble@apple.com
  • 1 edit
    13 adds in trunk/Source/WebKit

Add missing artwork for fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=183618

Reviewed by Jon Lee.

4:18 PM Changeset in webkit [229591] by timothy_horton@apple.com
  • 9 edits in trunk/Source

Add and adopt WK_ALTERNATE_FRAMEWORKS_DIR in WTF and bmalloc
https://bugs.webkit.org/show_bug.cgi?id=183576
<rdar://problem/38396766>

Reviewed by Dan Bernstein.

  • Configurations/Base.xcconfig:

Source/bmalloc:

  • Configurations/bmalloc.xcconfig:
  • Configurations/mbmalloc.xcconfig:

Source/WTF:

  • Configurations/CopyWTFHeaders.xcconfig:
  • Configurations/WTF.xcconfig:
  • Configurations/mbmalloc.xcconfig:
4:01 PM Changeset in webkit [229590] by youenn@apple.com
  • 5 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=182853
<rdar://problem/37645429>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/register-closed-window.https-expected.txt:

LayoutTests:

3:54 PM Changeset in webkit [229589] by jer.noble@apple.com
  • 5 edits
    1 add in trunk

[iOS] Muted media playback can interrupt out-of-process audio
https://bugs.webkit.org/show_bug.cgi?id=183606
<rdar://problem/37466253>

Reviewed by Eric Carlson.

Source/WebCore:

Test: Updated TestWebKitAPI test to verify the correct AVAudioSession category is set.

A non-playing, non-muted media element will cause the AVAudioSession category to be set to
"playing" when a muted media element begins playback. Ignore these non-playing elements for
the purposes of determining the AVAudioSession category.

  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp:

(PlatformMediaSessionManager::updateSessionState):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html: Added.
2:42 PM Changeset in webkit [229588] by Brian Burg
  • 2 edits in trunk/Source/WebKit

[WK2] Web Inspector: NavigationAction for opening a link in a new tab should have a UserGestureIndicator
https://bugs.webkit.org/show_bug.cgi?id=183612
<rdar://problem/38388641>

Reviewed by Timothy Hatcher.

The current gesture token will be attached to the NavigationAction at construction time,
so set up a UserGestureIndicator when creating the action and sending it out.

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openInNewTab):

2:14 PM Changeset in webkit [229587] by youenn@apple.com
  • 5 edits in trunk

Calling removeTrack with RTCRtpSender does not set SenderTrack to null
https://bugs.webkit.org/show_bug.cgi?id=183308

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-removeTrack.https-expected.txt:

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::stop): Set track to null when being stopped i.e. removed.

  • Modules/mediastream/RTCRtpSender.h:
1:50 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
1:48 PM Changeset in webkit [229586] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed GTK expectations gardening

  • platform/gtk/TestExpectations:
1:39 PM Changeset in webkit [229585] by youenn@apple.com
  • 5 edits
    3 adds in trunk

Changing link element rel attribute from preload to stylesheet should succeed loading the stylesheet
https://bugs.webkit.org/show_bug.cgi?id=183601
<rdar://problem/38309441>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: http/wpt/preload/change-link-rel-attribute.html

  • loader/LinkPreloadResourceClients.h:

(WebCore::LinkPreloadResourceClient::clearResource): Remove the call to CachedResource::cancelLoad.
This call is expected to be called by ResourceLoader when cancelling the load from below CachedResource.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::allClientsRemoved): In case of preload,
cancel the load if not finished when there is no more client attached to it.

  • loader/cache/CachedResource.h:

LayoutTests:

  • http/wpt/preload/change-link-rel-attribute-expected.txt: Added.
  • http/wpt/preload/change-link-rel-attribute.html: Added.
  • http/wpt/preload/resources/style.css: Added.

(body):

1:14 PM Changeset in webkit [229584] by Michael Catanzaro
  • 2 edits in trunk/Source/WTF

Unreviewed, fix typo in a comment

  • wtf/Platform.h:
1:10 PM Changeset in webkit [229583] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

WKSystemPreviewView needs to implement some of UIScrollViewDelegate
https://bugs.webkit.org/show_bug.cgi?id=183607
<rdar://problem/38427622>

Reviewed by Antoine Quint.

Add an empty implementation of scrollViewDidScroll.

  • UIProcess/ios/WKSystemPreviewView.mm:

(-[WKSystemPreviewView scrollViewDidScroll:]):

12:44 PM Changeset in webkit [229582] by fred.wang@free.fr
  • 2 edits
    2 deletes in trunk/LayoutTests

Skip mathml-in-dashboard-expected on Windows
https://bugs.webkit.org/show_bug.cgi?id=183562

There is no dashboard compatibility mode on Windows so the test is not necessary.

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-13
Reviewed by Alexey Proskuryakov.

  • platform/win/TestExpectations: Skip test.
  • platform/win/mathml/mathml-in-dashboard-expected.png: Removed.
  • platform/win/mathml/mathml-in-dashboard-expected.txt: Removed.
12:25 PM Changeset in webkit [229581] by jmarcell@apple.com
  • 3 edits in tags/Safari-606.1.7.1/Source/WebKit

Cherry-pick r229575. rdar://problem/38219763

11:28 AM Changeset in webkit [229580] by dino@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Fix some build errors and cleanup QuickLookSPI.h
https://bugs.webkit.org/show_bug.cgi?id=183599

Reviewed by Ryan Haddad.

  • pal/spi/ios/QuickLookSPI.h:
11:07 AM Changeset in webkit [229579] by Chris Dumez
  • 2 edits
    2 adds in trunk/LayoutTests

fast/loader/javascript-url-iframe-remove-on-navigate.html is flaky with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183588

Reviewed by Alex Christensen.

The test was setting the frame's src to a javascript URL in a setTimeout(0), expecting the
navigation policy delegate to have already completed. However, with asynchronous policy
delegates, this is not necessarily the case. Therefore, we now wait for the beforeunload
event to be fired at the window, since this indicates a policy decision has been made and
we are actually navigating.

I checked that this test was printing the "FAIL" alert in both Firefox and Chrome before
this change.

  • fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate-expected.txt: Added.
  • fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html: Added.
  • fast/loader/javascript-url-iframe-remove-on-navigate.html:
10:16 AM Changeset in webkit [229578] by Ross Kirsling
  • 10 edits in trunk

[Win] Layout Test fast/html/menuitem-element.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=179299

Reviewed by Per Arne Vollan.

Source/WebKitLegacy/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::menuItemElementEnabled):
(WebPreferences::setMenuItemElementEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):
Add private web preference "menuItemElementEnabled".

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(setWebPreferencesForTestOptions):
Recognize test option "enableMenuItemElement".

LayoutTests:

  • platform/win/TestExpectations:

Remove "failure" line.

9:12 AM Changeset in webkit [229577] by commit-queue@webkit.org
  • 2 edits
    1 copy
    1 add in trunk/LayoutTests

LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html fails with async policy delegate
https://bugs.webkit.org/show_bug.cgi?id=183386

Patch by Danyao Wang <danyao@chromium.org> on 2018-03-13
Reviewed by Chris Dumez.

This test relies on the happenstance that with sync poicy decision, the subframe transitions
to FrameLoadProvisional before main frame navigation is committed. With async delegate,
policy checks for the main frame and subframe are interleaved. When the main frame policy
decision is received, it cancels the subframe check. So the page ends up being cached when
navigating away. This is working as intended.

  • http/tests/navigation/page-cache-iframe-provisional-load-async-delegates-expected.txt: Added.
  • http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html: Copied from LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html.

Add a new version of the test that forces async policy delegate.

  • http/tests/navigation/page-cache-iframe-provisional-load.html:

Update test to sequence main frame navigation after start of provisional navigation in subframe.

6:44 AM Changeset in webkit [229576] by fred.wang@free.fr
  • 10 edits in trunk/LayoutTests

Rewrite frameset-flattening-simple to make expectation clearer
https://bugs.webkit.org/show_bug.cgi?id=183129

The description of fast/frames/flattening/frameset-flattening-simple.html says that the
iframe should be 800px wide and should not have any scrollbars. However, it is a bit
difficult to know the size when checking the test visually. Moreover, the scrollbars of the
main frame are visible, which makes things a bit confusing and may be the cause of bug 71655
on GTK.

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-13
Reviewed by Javier Fernandez.

  • fast/frames/flattening/frameset-flattening-simple.html: Put the frame inside a 200x300

frameset cell and set its width to 300px. The frame should be a 300x300 square when it is
flattened (test passes) and a 200x300 rectangle when it is not (test fails). That's easier
to verify visually. That also avoids scrollbars on the main frame.

  • platform/gtk/TestExpectations: Attempt to remove flacky expectation.
  • platform/gtk/fast/frames/flattening/frameset-flattening-simple-expected.png: Update.
  • platform/gtk/fast/frames/flattening/frameset-flattening-simple-expected.txt: Ditto.
  • platform/ios/fast/frames/flattening/frameset-flattening-simple-expected.txt: Ditto.
  • platform/mac-wk2/fast/frames/flattening/frameset-flattening-simple-expected.txt: Ditto.
  • platform/mac/fast/frames/flattening/frameset-flattening-simple-expected.png: Ditto.
  • platform/mac/fast/frames/flattening/frameset-flattening-simple-expected.txt: Ditto.
  • platform/win/fast/frames/flattening/frameset-flattening-simple-expected.txt: Ditto.
1:56 AM Changeset in webkit [229575] by jiewen_tan@apple.com
  • 3 edits in trunk/Source/WebKit

Soft-link LocalAuthentication.Framework
https://bugs.webkit.org/show_bug.cgi?id=183587
<rdar://problem/38219763>

Reviewed by Brian Burg.

  • UIProcess/CredentialManagement/cocoa/WebCredentialsMessengerProxyCocoa.mm:

(WebKit::WebCredentialsMessengerProxy::platformIsUserVerifyingPlatformAuthenticatorAvailable):

  • WebKit.xcodeproj/project.pbxproj:

Mar 12, 2018:

11:10 PM Changeset in webkit [229574] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: speculative build fix for WinCairo.
https://bugs.webkit.org/show_bug.cgi?id=183573

Not reviewed.

  • runtime/NativeFunction.h:

(JSC::TaggedNativeFunction::TaggedNativeFunction):

9:11 PM Changeset in webkit [229573] by dino@apple.com
  • 6 edits
    2 adds in trunk/Source

Add a WKWebViewContentProvider for system previews
https://bugs.webkit.org/show_bug.cgi?id=183582
<rdar://problem/38393569>

Reviewed by Tim Horton.

Source/WebCore/PAL:

Add some QuickLook SPI.

  • pal/spi/ios/QuickLookSPI.h:

Source/WebKit:

Implement WKSystemPreviewView, which conforms to WKWebViewContentProvider, in
order to view content as a "system preview". This effectively replaces the
SystemPreviewController, which will be removed soon.

Some of the required methods of WKWebViewContentProvider are not necessary on
this instance, so a follow-up patch will clean the protocol up a bit.

  • UIProcess/Cocoa/NavigationState.mm: Don't trigger a SystemPreview when downloading.

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):

  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry init]): Register the WKSystemPreviewView for
MIME types retrieved from WebKitAdditions.

  • UIProcess/ios/WKSystemPreviewView.h: Added.
  • UIProcess/ios/WKSystemPreviewView.mm: Added.

(-[WKSystemPreviewView web_initWithFrame:webView:]):
(-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]): This is the
method that actually creates a QuickLook preview and provides the data.
(-[WKSystemPreviewView web_setMinimumSize:]):
(-[WKSystemPreviewView web_setOverlaidAccessoryViewsInset:]):
(-[WKSystemPreviewView web_computedContentInsetDidChange]):
(-[WKSystemPreviewView web_setFixedOverlayView:]):
(-[WKSystemPreviewView web_didSameDocumentNavigation:]):
(-[WKSystemPreviewView web_countStringMatches:options:maxCount:]):
(-[WKSystemPreviewView web_findString:options:maxCount:]):
(-[WKSystemPreviewView web_hideFindUI]):

(-[WKSystemPreviewView numberOfPreviewItemsInPreviewController:]): QuickLook delegates.
(-[WKSystemPreviewView previewController:previewItemAtIndex:]):
(-[WKSystemPreviewView provideDataForItem:]):
(-[WKSystemPreviewView previewControllerWillDismiss:]):

  • WebKit.xcodeproj/project.pbxproj: Add new files.
8:19 PM Changeset in webkit [229572] by don.olmstead@sony.com
  • 14 edits in trunk/Source

[CMake][Win] Forwarding headers of WTF and PAL are copied twice in Visual Studio builds
https://bugs.webkit.org/show_bug.cgi?id=183240

Reviewed by Alex Christensen.

Source/WebCore/PAL:

  • pal/CMakeLists.txt:
  • pal/PlatformAppleWin.cmake:
  • pal/PlatformGTK.cmake:
  • pal/PlatformMac.cmake:
  • pal/PlatformWPE.cmake:
  • pal/PlatformWinCairo.cmake:

Source/WTF:

  • wtf/CMakeLists.txt:
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformMac.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/PlatformWin.cmake:
8:10 PM Changeset in webkit [229571] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

Unreviewed, include time.h
https://bugs.webkit.org/show_bug.cgi?id=183312

Attempt to fix oss-fuzz build.

  • wtf/CurrentTime.cpp:
  • wtf/unix/CPUTimeUnix.cpp:
8:04 PM Changeset in webkit [229570] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix obsolete ASSERT
https://bugs.webkit.org/show_bug.cgi?id=183310

Now NewObject can be conereted from CallObjectConstructor and CreateThis.

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToNewObject):

7:05 PM Changeset in webkit [229569] by wilander@apple.com
  • 20 edits in trunk/Source

Resource Load Statistics: Immediately forward cookie access at user interaction when there's an opener document
https://bugs.webkit.org/show_bug.cgi?id=183577
<rdar://problem/38266987>

Reviewed by Brent Fulgham.

Source/WebCore:

Tested manually on live websites.
No new automated tests because of a bug in WebKitTestRunner:
https://bugs.webkit.org/show_bug.cgi?id=183578
The event sender triggers gestures in the opener rather than
in the popup.

  • dom/Document.cpp:

(WebCore::Document::removedLastRef):

Clears the new m_primaryDomainsGrantedPageSpecificStorageAccess.

(WebCore::Document::hasGrantedPageSpecificStorageAccess):
(WebCore::Document::setHasGrantedPageSpecificStorageAccess):

  • dom/Document.h:

Added member m_primaryDomainsGrantedPageSpecificStorageAccess
where we store domains that have been granted access.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setGrantStorageAccessUnderOpenerCallback):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

Now checks if there is a cross-origin opener and if so, immediately
grants cookie access to the popup's domain if it is partitioned or
blocked.

  • loader/ResourceLoadObserver.h:
  • platform/network/NetworkStorageSession.h:

Added member m_pagesGrantedStorageAccess.

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::cookieStoragePartition const):
(WebCore::NetworkStorageSession::hasStorageAccess const):

Renamed from hasStorageAccessForFrame since the frameID now is optional.

(WebCore::NetworkStorageSession::grantStorageAccess):

Renamed from grantStorageAccessForFrame since the frameID now is optional.

(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage):

Now removes the pageID entry in m_pagesGrantedStorageAccess.

(WebCore::NetworkStorageSession::hasStorageAccessForFrame const): Deleted.

Renamed since the frameID now is optional.

(WebCore::NetworkStorageSession::grantStorageAccessForFrame): Deleted.

Renamed since the frameID now is optional.

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::hasStorageAccessForFrame):

Now also checks for general page access.

(WebKit::NetworkProcess::grantStorageAccess):

Renamed from grantStorageAccessForFrame since the frameID now is optional.

(WebKit::NetworkProcess::grantStorageAccessForFrame): Deleted.

Renamed since the frameID now is optional.

  • NetworkProcess/NetworkProcess.h:

Renaming since the frameID now is optional.

  • NetworkProcess/NetworkProcess.messages.in:

Renaming since the frameID now is optional.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::logCookieInformation):

Consequence of function renaming.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::grantStorageAccess):
(WebKit::NetworkProcessProxy::grantStorageAccessForFrame): Deleted.

Renaming since the frameID now is optional.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):

Renaming since the frameID now is optional.

(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):

Handler renaming since the frameID now is optional.

(WebKit::WebResourceLoadStatisticsStore::grantStorageAccessUnderOpener):

New function for that grants cookie access under a whole page.

  • UIProcess/WebResourceLoadStatisticsStore.h:

Member renaming since the frameID now is optional.

  • UIProcess/WebResourceLoadStatisticsStore.messages.in:

New message received straight from WebCore::ResourceLoadObserver.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::grantStorageAccessHandler):

Renamed and made frameID optional.

(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):

Consequence of renaming and making frameID optional.

(WebKit::WebsiteDataStore::grantStorageAccessForFrameHandler): Deleted.

Renamed and made frameID optional.

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

(WebProcess::WebProcess):

Now calls setGrantStorageAccessUnderOpenerCallback() on the shared
WebCore::ResourceLoadObserver.

6:54 PM Changeset in webkit [229568] by jmarcell@apple.com
  • 4 edits in tags/Safari-606.1.9/Source/WebCore

Cherry-pick r229564. rdar://problem/38395317

6:38 PM Changeset in webkit [229567] by timothy_horton@apple.com
  • 14 edits
    3 copies
    4 moves
    3 deletes in trunk

Stop using SDK conditionals to control feature definitions
https://bugs.webkit.org/show_bug.cgi?id=183430
<rdar://problem/38251619>

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/ThirdParty/libwebrtc:

  • Configurations/WebKitTargetConditionals.xcconfig: Renamed.
  • Configurations/opus.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig: Renamed.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.
6:37 PM Changeset in webkit [229566] by Chris Dumez
  • 6 edits in trunk

Return boolean from DOMTokenList's replace() method
https://bugs.webkit.org/show_bug.cgi?id=183567

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline web platform test now that all checks are passing.

  • web-platform-tests/dom/nodes/Element-classlist-expected.txt:

Source/WebCore:

Have DOMTokenList's replace() method return a boolean indicating if the
token was replaced, as per:

This is a recent addition to the DOM specification:

No new tests, rebaselined existing test.

  • html/DOMTokenList.cpp:

(WebCore::replaceInOrderedSet):
(WebCore::DOMTokenList::replace):

  • html/DOMTokenList.h:
  • html/DOMTokenList.idl:
6:29 PM Changeset in webkit [229565] by Ross Kirsling
  • 7 edits
    1 move in trunk/Tools

[DRT] TestOptions should not be ObjC.
https://bugs.webkit.org/show_bug.cgi?id=183487

Reviewed by Per Arne Vollan.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/PlatformMac.cmake:

Move TestOptions to platform-agnostic sources.

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.cpp: Renamed from Tools/DumpRenderTree/TestOptions.mm.
  • DumpRenderTree/mac/DumpRenderTree.mm:

Remove NSURL dependency and align with WTR as much as possible.

  • DumpRenderTree/win/DumpRenderTree.cpp:

Consume TestOptions (recognizing just the ones that have WebPreferences defined for now).

4:46 PM Changeset in webkit [229564] by Brian Burg
  • 4 edits in trunk/Source/WebCore

Ignore some deprecation warnings encountered when compiling with newer versions of ICU
https://bugs.webkit.org/show_bug.cgi?id=183584
<rdar://problem/38395317>

Reviewed by Daniel Bates.

Ignore new deprecation warnings. Where a function has more than one
deprecation warning, mark out the entire function so it remains readable.

  • editing/TextIterator.cpp:
  • platform/graphics/SurrogatePairAwareTextIterator.cpp:

(WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks):

  • platform/text/TextEncoding.cpp:
4:28 PM Changeset in webkit [229563] by yoav@yoav.ws
  • 31 edits in trunk

Runtime flag for link prefetch and remove link subresource.
https://bugs.webkit.org/show_bug.cgi?id=183540

Reviewed by Chris Dumez.

.:

Remove the LINK_PREFETCH build time flag.

  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

Remove the LINK_PREFETCH build time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

This patch removes the LINK_PREFETCH build time flag, removes
link subresource, adds an off-by-default runtime flag for link
prefetch and makes sure link prefetch only works when this flag is on.

Subresource is removed as it's not a part of any spec, nor supported by any
other browser. It was replaced by link preload.

No new tests as this is not adding any new functionality.

  • Configurations/FeatureDefines.xcconfig: Remove the LINK_PREFETCH flag.
  • html/LinkRelAttribute.cpp:

(WebCore::LinkRelAttribute::LinkRelAttribute): Put prefetch support behind the runtime flag.
(WebCore::LinkRelAttribute::isSupported): Add prefetch.

  • html/LinkRelAttribute.h: Remove the LINK_PREFETCH flag.
  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient): Remove the LINK_PREFETCH flag.
(WebCore::LinkLoader::prefetchIfNeeded): Move the prefetch code to prefetchIfNeeded(). Remove subresource bits.
(WebCore::LinkLoader::loadLink): Call prefetchIfNeeded().

  • loader/LinkLoader.h:
  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType): Remove the LINK_PREFETCH flag as well as subresource.

  • loader/SubresourceLoader.cpp:

(WebCore::logResourceLoaded): Remove the LINK_PREFETCH flag as well as subresource.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType): Remove the LINK_PREFETCH flag as well as subresource.
(WebCore::CachedResource::load): Remove the LINK_PREFETCH flag.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::ignoreForRequestCount const): Remove the LINK_PREFETCH flag as well as subresource.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource): Remove the LINK_PREFETCH flag as well as subresource.
(WebCore::CachedResourceLoader::requestLinkResource): Remove subresource.
(WebCore::contentTypeFromResourceType): Remove the LINK_PREFETCH flag as well as subresource.
(WebCore::CachedResourceLoader::checkInsecureContent const): Remove the LINK_PREFETCH flag as well as subresource.
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest): Remove the LINK_PREFETCH flag as well as subresource.

  • loader/cache/CachedResourceLoader.h:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setLinkPrefetchEnabled): Set the prefetch flag.
(WebCore::RuntimeEnabledFeatures::linkPrefetchEnabled const): Get the prefetch flag.

Source/WebCore/PAL:

Remove the LINK_PREFETCH build time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Remove the LINK_PREFETCH build time flag.

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

Source/WebKitLegacy/mac:

Remove the LINK_PREFETCH build time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

Remove the LINK_PREFETCH build time flag.

  • wtf/FeatureDefines.h:

Tools:

Remove the LINK_PREFETCH build time flag.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:21 PM Changeset in webkit [229562] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

4:15 PM Changeset in webkit [229561] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.9/Source

Versioning.

4:06 PM Changeset in webkit [229560] by Chris Dumez
  • 6 edits
    2 adds in trunk

Load may get committed before receiving policy for the resource response
https://bugs.webkit.org/show_bug.cgi?id=183579
<rdar://problem/38268780>

Reviewed by Youenn Fablet.

Source/WebKit:

r228852 updated WebResourceLoader::didReceiveResponse to only send the
ContinueDidReceiveResponse IPC back to the Networkprocess *after* the
policy decision for the resource response has been made. This is necessary
now that policy decisions can be made asynchronously.

However, one of the 2 code paths in NetworkProcess side (code path when
the resource is already in the HTTP disk cache) failed to wait for the
ContinueDidReceiveResponse IPC before sending over the data to the WebProcess.
As a result, the WebProcess could commit the load before even receiving the
policy response from the client.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse):

  • NetworkProcess/NetworkResourceLoader.h:

Make sure NetworkResourceLoader::didRetrieveCacheEntry() does not start sending the data
until the network process gets the ContinueDidReceiveResponse IPC back from the WebProcess.

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):

  • WebProcess/Network/WebResourceLoader.h:

Add assertion to make sure didReceiveData() never gets called before didReceiveResponse's
completion handler has been called. If this hits, then the load may get committed even
though the client did not reply to the policy for the resource response yet.

LayoutTests:

Add layout test coverage.

  • http/tests/cache/cachedEntry-waits-for-response-policy-expected.txt: Added.
  • http/tests/cache/cachedEntry-waits-for-response-policy.html: Added.
4:01 PM Changeset in webkit [229559] by Ryan Haddad
  • 3 edits in trunk/LayoutTests/imported/w3c

Unreviewed, rebaseline two cssom tests after r229544.

  • web-platform-tests/cssom-view/interfaces-expected.txt:
  • web-platform-tests/cssom/interfaces-expected.txt:
3:58 PM Changeset in webkit [229558] by ajuma@chromium.org
  • 3 edits
    2 adds in trunk

http/tests/workers/service/service-worker-download.https.html times out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183479

Reviewed by Youenn Fablet.

Source/WebKit:

Ensure that ServiceWorkerFetchClient::m_isCheckingResponse is set before code that depends on it
executes. This bit was set by code that's posted to the runloop using 'callOnMainThread' in
ServiceWorkerFetchClient::didReceiveResponse. But when didReceiveResponse is executing, tasks for
handling didReceiveData, didFail, or didFinish may already have been posted to the runloop, and in
that case would execute before m_isCheckingResponse gets set, and then incorrectly fail to
early-out. Fix this by directly setting m_isCheckingResponse in didReceiveResponse.

  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::start):
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):

LayoutTests:

Add layout test coverage.

  • http/tests/workers/service/service-worker-download-async-delegates.https-expected.txt: Added.
  • http/tests/workers/service/service-worker-download-async-delegates.https.html: Added.
3:24 PM Changeset in webkit [229557] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: speculative build fix for Windows.
https://bugs.webkit.org/show_bug.cgi?id=183573

Not reviewed.

  • runtime/NativeFunction.h:

(JSC::TaggedNativeFunction::TaggedNativeFunction):

2:59 PM Changeset in webkit [229556] by jmarcell@apple.com
  • 7 edits
    5 adds in branches/safari-605-branch

Cherry-pick r229086. rdar://problem/37992301

2:59 PM Changeset in webkit [229555] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebKit

Cherry-pick r229134. rdar://problem/38035474

2:59 PM Changeset in webkit [229554] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Cherry-pick r229028. rdar://problem/37992284

2:59 PM Changeset in webkit [229553] by jmarcell@apple.com
  • 15 edits in branches/safari-605-branch

Cherry-pick r228279. rdar://problem/38154561

2:59 PM Changeset in webkit [229552] by jmarcell@apple.com
  • 1 edit in branches/safari-605-branch/Source/JavaScriptCore/runtime/Options.h

Apply patch. rdar://problem/38035486

2:50 PM Changeset in webkit [229551] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add another PtrTag.
https://bugs.webkit.org/show_bug.cgi?id=183580
<rdar://problem/38390584>

Reviewed by Keith Miller.

  • runtime/PtrTag.h:
2:43 PM Changeset in webkit [229550] by youenn@apple.com
  • 1 edit
    7 deletes in trunk/Source/ThirdParty/libwebrtc

Remove empty cpp files in Source/ThirdParty/libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=183529

Unreviewed.

Removing further empty files.

2:19 PM Changeset in webkit [229549] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.9

Tag Safari-606.1.9.

2:16 PM Changeset in webkit [229548] by youenn@apple.com
  • 6 edits in trunk

RTCPeerConnection's close method should update signalingState
https://bugs.webkit.org/show_bug.cgi?id=174314
<rdar://problem/33267977>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-createDataChannel-expected.txt:

Source/WebCore:

Covered by rebased test.
Add closed as signalingState enum value.
Set peer connection signaling state to closed once close is called.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::doClose):

  • Modules/mediastream/RTCSignalingState.idl:
  • platform/mediastream/RTCSignalingState.h:
2:06 PM Changeset in webkit [229547] by mark.lam@apple.com
  • 69 edits
    1 add in trunk/Source

Make a NativeFunction into a class to support pointer profiling.
https://bugs.webkit.org/show_bug.cgi?id=183573
<rdar://problem/38384697>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

  1. NativeFunction is now a class, and introducing RawNativeFunction and TaggedNativeFunction.

RawNativeFunction is the raw pointer type (equivalent
to the old definition of NativeFunction). This is mainly used for underlying
storage inside the NativeFunction class, and also for global data tables that
cannot embed non-trivially constructed objects.

NativeFunction's role is mainly to encapsulate a pointer to a C function that
we pass into the VM.

TaggedNativeFunction encapsulates the tagged version of a pointer to a C
function that we track in the VM.

  1. Added a convenience constructor for TrustedImmPtr so that we don't have to cast function pointers to void* anymore when constructing a TrustedImmPtr.
  1. Removed the unused CALL_RETURN macro in CommonSlowPaths.cpp.
  1. Added more PtrTag utility functions.
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):

  • create_hash_table:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):

  • interpreter/InterpreterInlines.h:

(JSC::Interpreter::getOpcodeID):

  • jit/JITThunks.cpp:

(JSC::JITThunks::hostFunctionStub):

  • jit/JITThunks.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:

(JSC::CLoop::execute):

  • llint/LowLevelInterpreter64.asm:
  • offlineasm/ast.rb:
  • runtime/CallData.h:
  • runtime/CommonSlowPaths.cpp:
  • runtime/ConstructData.h:
  • runtime/InternalFunction.h:

(JSC::InternalFunction::nativeFunctionFor):

  • runtime/JSCell.cpp:

(JSC::JSCell::getCallData):
(JSC::JSCell::getConstructData):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::nativeFunction):
(JSC::JSFunction::nativeConstructor):
(JSC::isHostFunction):

  • runtime/Lookup.h:

(JSC::HashTableValue::function const):
(JSC::HashTableValue::accessorGetter const):
(JSC::HashTableValue::accessorSetter const):
(JSC::nonCachingStaticFunctionGetter):

  • runtime/NativeExecutable.cpp:

(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):

  • runtime/NativeExecutable.h:
  • runtime/NativeFunction.h: Added.

(JSC::NativeFunction::NativeFunction):
(JSC::NativeFunction::operator intptr_t const):
(JSC::NativeFunction::operator bool const):
(JSC::NativeFunction::operator! const):
(JSC::NativeFunction::operator== const):
(JSC::NativeFunction::operator!= const):
(JSC::NativeFunction::operator()):
(JSC::NativeFunction::rawPointer const):
(JSC::NativeFunctionHash::hash):
(JSC::NativeFunctionHash::equal):
(JSC::TaggedNativeFunction::TaggedNativeFunction):
(JSC::TaggedNativeFunction::operator bool const):
(JSC::TaggedNativeFunction::operator! const):
(JSC::TaggedNativeFunction::operator== const):
(JSC::TaggedNativeFunction::operator!= const):
(JSC::TaggedNativeFunction::operator()):
(JSC::TaggedNativeFunction::operator NativeFunction):
(JSC::TaggedNativeFunction::rawPointer const):
(JSC::TaggedNativeFunctionHash::hash):
(JSC::TaggedNativeFunctionHash::equal):

  • runtime/PtrTag.h:

(JSC::tagCFunctionPtr):
(JSC::untagCFunctionPtr):

  • runtime/VM.h:

(JSC::VM::targetMachinePCForThrowOffset): Deleted.

Source/WebCore:

No new tests because there's no new behavior. Only updating bindings.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHashTableValueArray):

  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCallTracer.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestIterable.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestStringifier.cpp:
  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Source/WTF:

Changed Poisoned so that it can be used on tagged pointers as well.

  • wtf/Poisoned.h:
1:51 PM Changeset in webkit [229546] by timothy_horton@apple.com
  • 5 edits
    1 add in trunk/Source/WebCore

Use a different SPI header for some AudioToolbox enums
https://bugs.webkit.org/show_bug.cgi?id=183574
<rdar://problem/38385889>

Reviewed by Anders Carlsson.

Source/WebCore:

  • platform/audio/ios/AudioDestinationIOS.cpp:
  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

Adjust SPI imports.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/AudioToolboxSPI.h: Added.
1:19 PM Changeset in webkit [229545] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix simple goof that was causing 32-bit DFG crashes.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):

12:44 PM Changeset in webkit [229544] by Chris Dumez
  • 82 edits
    35 adds in trunk/LayoutTests

183570_dom_wpt_resync

12:35 PM Changeset in webkit [229543] by Jon Davis
  • 18 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove redundant tooltips
https://bugs.webkit.org/show_bug.cgi?id=183099

Reviewed by Matt Baker.

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

(WI.contentLoaded):
Instantiate ConsoleDrawer so the keyboard shortcuts for FindBanner are available.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement):
Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.

  • UserInterface/Views/ButtonNavigationItem.js:

(WI.ButtonNavigationItem):
Only show tooltips when the button style is an image.

  • UserInterface/Views/ConsoleDrawer.js:

(WI.ConsoleDrawer):
(WI.ConsoleDrawer.prototype.toggleButtonShortcutTooltip):
Added helper to set the toggle button keyboard shortcut tooltip.

  • UserInterface/Views/DOMBreakpointTreeElement.js:

(WI.DOMBreakpointTreeElement):
Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.

  • UserInterface/Views/DOMNodeTreeElement.js:

(WI.DOMNodeTreeElement):
Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.

  • UserInterface/Views/FindBanner.js:

(WI.FindBanner):

  • UserInterface/Views/HierarchicalPathComponent.js:

(WI.HierarchicalPathComponent):
(WI.HierarchicalPathComponent.prototype.get tooltip):
(WI.HierarchicalPathComponent.prototype.set tooltip):
(WI.HierarchicalPathComponent.prototype.get hideTooltip):
(WI.HierarchicalPathComponent.prototype.set hideTooltip):
(WI.HierarchicalPathComponent.prototype._updateElementTitleAndText):
Add tooltip management features to manage tooltips separately of the displayName,
and provide a behavior to hide tooltips while retaining the tooltip data.

  • UserInterface/Views/HierarchicalPathNavigationItem.js:

(WI.HierarchicalPathNavigationItem.prototype.updateLayout):
Hide tooltips when fully visible, show tooltips for collapsed items.

  • UserInterface/Views/PinnedTabBarItem.js:

(WI.PinnedTabBarItem.prototype.titleDidChange):
Set tooltips for pinned tab bar items.

  • UserInterface/Views/QuickConsole.js:

(WI.QuickConsole):
Set the ConsoleDrawer toggle button tooltip after the keyboard shortcut is registered.

  • UserInterface/Views/StorageTreeElement.js:

(WI.StorageTreeElement):
Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.

  • UserInterface/Views/TabBarItem.js:

(WI.TabBarItem.prototype.get title):
(WI.TabBarItem.prototype.set title):
(WI.TabBarItem.prototype.titleDidChange):
(WI.TabBarItem):
Add title property management with an overridable titleDidChange handler for
setting tooltips when needed.

  • UserInterface/Views/TimelineTreeElement.js:

(WI.TimelineTreeElement):
Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.

  • UserInterface/Views/ToggleButtonNavigationItem.js:

(WI.ToggleButtonNavigationItem.prototype.set defaultToolTip):
Added a setter for manging the default tooltip of a toggle button.

  • UserInterface/Views/XHRBreakpointTreeElement.js:

(WI.XHRBreakpointTreeElement):
Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.

12:25 PM Changeset in webkit [229542] by wenson_hsieh@apple.com
  • 8 edits
    4 adds in trunk

REGRESSION(r211643): Dismissing WKActionSheet should not also dismiss its presenting view controller
https://bugs.webkit.org/show_bug.cgi?id=183549
<rdar://problem/34960698>

Reviewed by Andy Estes.

Source/WebKit:

Fixes the bug by dismissing the presented view controller (i.e. the action sheet or the view controller being
presented during rotation) rather than the presenting view controller.

Test: ActionSheetTests.DismissingActionSheetShouldNotDismissPresentingViewController

  • UIProcess/ios/WKActionSheet.mm:

(-[WKActionSheet doneWithSheet:]):

Tools:

Add TestWebKitAPI support for testing WKWebViews embedded within presented view controllers, and use this to
check that dismissing an action sheet does not additionally cause the view controller being used to present the
web view to also dismiss.

  • TestWebKitAPI/ClassMethodSwizzler.h: Added.
  • TestWebKitAPI/ClassMethodSwizzler.mm: Added.

(TestWebKitAPI::ClassMethodSwizzler::ClassMethodSwizzler):
(TestWebKitAPI::ClassMethodSwizzler::~ClassMethodSwizzler):

Add ClassMethodSwizzler, an RAII which swizzles an Objective-C class method over its lifetime.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm:

Add a new API test that loads a view controller which embeds a WKWebView, and verifies that presenting and then
dismissing an action sheet from that web view does not cause the view controller to also dismiss.

(TestWebKitAPI::setOverrideViewControllerForFullscreenPresentation):
(TestWebKitAPI::overrideViewControllerForFullscreenPresentation):

Mock +[UIViewController _viewControllerForFullScreenPresentationFromView:] to return the web view. This works
around the fact that TestWebKitAPI is not a UI application, so certain pieces of UIKit API and SPI need to be
stubbed or mocked to simulate being a UI application. We can remove these workarounds once
https://webkit.org/b/175204 is addressed, and TestWebKitAPI becomes a UI application that can actually maintain
a root view controller and key window.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView initWithFrame:configuration:addToWindow:]):

Add a new initializer for TestWKWebView that doesn't force the view to be hosted within a UIWindow. This is used
by TestWKWebViewController to create a TestWKWebView in -loadView.

  • TestWebKitAPI/ios/TestWKWebViewController.h: Added.
  • TestWebKitAPI/ios/TestWKWebViewController.mm: Added.

(-[TestWKWebViewControllerWindow _beginKeyWindowDeferral]):
(-[TestWKWebViewControllerWindow _endKeyWindowDeferral]):

Stub out these methods to prevent UIKit from hitting assertions when making this UIWindow the key window. This
can also be removed once TestWebKitAPI is a UI application.

(-[TestWKWebViewController initWithFrame:configuration:]):
(-[TestWKWebViewController loadView]):
(-[TestWKWebViewController webView]):
(-[TestWKWebViewController dismissViewControllerAnimated:completion:]):
(-[TestWKWebViewController dismissalHandler]):
(-[TestWKWebViewController setDismissalHandler:]):

Add a UIViewController helper subclass whose -view is a WKWebView. The new API test presents this view
controller. Tests may also provide a dismissalHandler, which is invoked when the view controller is being
dismissed. The new API test uses this hook to verify that the view controller containing the web view isn't also
dismissed after the action sheet goes away.

  • TestWebKitAPI/ios/UIKitSPI.h:
11:05 AM Changeset in webkit [229541] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Tools

[webkitpy] Remove openssl command dependency.
https://bugs.webkit.org/show_bug.cgi?id=183494

Patch by Basuke Suzuki <Basuke Suzuki> on 2018-03-12
Reviewed by Ryosuke Niwa.

Added Python implementation of PEM file perser and switched to use that
from external openssl command.

  • Scripts/webkitpy/common/system/pemfile.py: Added.

(load):
(BadFormatError):
(Pem):
(Pem.init):
(Pem.get):
(Pem.get_all):
(Pem.certificate):
(Pem.private_key):
(Pem.csr):
(Pem.certificate_request):
(Pem.certificate_signing_request):
(_parse_pem_format):
(_parse_pem_format.find_begin):
(_parse_pem_format.find_end):
(_parse_pem_format.sections):

  • Scripts/webkitpy/common/system/pemfile_unittest.py: Added.

(PemFileTest):
(PemFileTest.test_parse):
(PemFileTest.test_parse_bad_format):

  • Scripts/webkitpy/port/base.py:

(Port.start_websocket_server):
(Port._extract_certificate_from_pem): Deleted.
(Port._extract_private_key_from_pem): Deleted.

10:53 AM Changeset in webkit [229540] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Add a query and fragment exception to history API's unique origin restriction.
https://bugs.webkit.org/show_bug.cgi?id=183028

Patch by Danyao Wang <danyao@chromium.org> on 2018-03-12
Reviewed by Brent Fulgham.

Tests: http/tests/navigation/pushstate-at-unique-origin-denied.php

Tools/TestWebKitAPI/Tests/WebCore/URL.cpp

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

10:50 AM Changeset in webkit [229539] by Chris Dumez
  • 5 edits
    2 copies in trunk/LayoutTests

http/tests/security/frame-loading-via-document-write-async-delegates.html fails with async delegates
https://bugs.webkit.org/show_bug.cgi?id=183460

Reviewed by Alex Christensen.

The test has 3 frames which all initially load "about:blank". Then using document.write(), it inserts
HTML in each frame.
Frame 1: body has an onload event handler, which calls JS is click an anchor link to navigate the frame.
Frame 2: body has an onload event handler to do some logging
Frame 3: body has an onload event handler and finishes the test (calls testRunner.notifyDone())

The issue is that with asynchronous policy delegates, the first frame may not have navigated yet by the
time the third frame is loaded. Indeed, the onload event of the first frame merely clicks am anchor link
which will trigger a navigation policy check and then later navigate.

To make the test more robust, we now count the number of loads and call testRunner.notifyDone() when
we've reached the expected number of loads.

  • http/tests/security/frame-loading-via-document-write-async-delegates-expected.txt: Added.
  • http/tests/security/frame-loading-via-document-write-async-delegates.html: Copied from LayoutTests/http/tests/security/frame-loading-via-document-write.html.
  • http/tests/security/frame-loading-via-document-write.html:
  • http/tests/security/resources/frame-loading-via-document-write.js:
9:47 AM Changeset in webkit [229538] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Remove empty cpp files in Source/ThirdParty/libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=183529

Unreviewed.

  • libwebrtc.xcodeproj/project.pbxproj: fix the build.
9:15 AM Changeset in webkit [229537] by Antti Koivisto
  • 8 edits in trunk/Source/WebCore

Don't invalidate descendants for nth pseudo classes unless needed
https://bugs.webkit.org/show_bug.cgi?id=183566

Reviewed by Zalan Bujtas.

We currently invalidate the whole subtrees that may match :nth-child and similar. In many common
cases we know that only the direct siblings may be affected.

  • css/SelectorChecker.cpp:

(WebCore::localContextForParent):
(WebCore::SelectorChecker::matchRecursively const):

Track if the context matches the subject element if the selector or its siblings only.

(WebCore::SelectorChecker::checkOne const):

Use different bits of descendant and child invalidation cases.

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::fragmentMatchesRightmostOrAdjacentElement):
(WebCore::SelectorCompiler::constructFragmentsInternal):

Track if the context matches the subject element if the selector or its siblings only.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):

Use different bits of descendant and child invalidation cases.

  • dom/Element.cpp:

(WebCore::invalidateForForwardPositionalRules):
(WebCore::invalidateForBackwardPositionalRules):

Invalidate more precisely based on the new bits.

(WebCore::checkForSiblingStyleChanges):
(WebCore::Element::setDescendantsAffectedByForwardPositionalRules):
(WebCore::Element::setDescendantsAffectedByBackwardPositionalRules):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
(WebCore::Element::rareDataDescendantsAffectedByForwardPositionalRules const):
(WebCore::Element::rareDataDescendantsAffectedByBackwardPositionalRules const):

New bits.

  • dom/Element.h:

(WebCore::Element::descendantsAffectedByForwardPositionalRules const):
(WebCore::Element::descendantsAffectedByBackwardPositionalRules const):

  • dom/ElementRareData.h:

(WebCore::ElementRareData::descendantsAffectedByForwardPositionalRules const):
(WebCore::ElementRareData::setDescendantsAffectedByForwardPositionalRules):
(WebCore::ElementRareData::descendantsAffectedByBackwardPositionalRules const):
(WebCore::ElementRareData::setDescendantsAffectedByBackwardPositionalRules):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetStyleRelations):

  • style/StyleRelations.cpp:

(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):

  • style/StyleRelations.h:
9:14 AM Changeset in webkit [229536] by youenn@apple.com
  • 1 edit
    100 deletes in trunk/Source/ThirdParty/libwebrtc

Remove empty cpp files in Source/ThirdParty/libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=183529

Reviewed by Eric Carlson.

9:11 AM Changeset in webkit [229535] by fred.wang@free.fr
  • 5 edits
    10 adds in trunk/LayoutTests/imported/w3c

Import WPT tests for blocked modal dialogs in sanboxed documents
https://bugs.webkit.org/show_bug.cgi?id=183568

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-12
Reviewed by Youenn Fablet.

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js: Added.

(runTest):

  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
8:42 AM Changeset in webkit [229534] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark webanimations/css-animations.html and webanimations/css-transitions.html as failures on Windows.
https://bugs.webkit.org/show_bug.cgi?id=183569

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:13 AM Changeset in webkit [229533] by fred.wang@free.fr
  • 7 edits
    2 deletes in trunk/LayoutTests

Do not rely on Latin Modern Math to test fraction/radical bars
https://bugs.webkit.org/show_bug.cgi?id=183446

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-12
Reviewed by Manuel Rego Casasnovas.

mathml/opentype/fraction-line.html was added in bug 155639 to test OpenType MATH parameters
for fraction but relies on the presence of the Latin Modern Math font, which is not available
on several platforms. Since these features are now already covered by the Web Platform
tests in Layout/imported/mathml-in-html5/mathml/presentation-markup/fractions/ we just remove
the test. Similarly, mathml/presentation/fractions-linethickness.html relies on Latin Modern
Math to ensure correct linethickness and we rewrite that test to use the web font
fraction-rulethickness10000.woff instead. We perform similar rewriting for
radical-bar-visibility.html, using a WOFF font with a specified radical line thickness.
Finally, we update the test expectations accordingly on iOS, macOS and Windows platform.

  • mathml/opentype/fraction-line.html: Removed. Already tested by other tests.
  • mathml/opentype/fraction-line-expected.html: Ditto.
  • mathml/presentation/fractions-linethickness.html: Use fraction-rulethickness10000.woff
  • mathml/presentation/fractions-linethickness-expected.html: Ditto.
  • mathml/presentation/radical-bar-visibility.html: Use radical-degreebottomraisepercent25-rulethickness1000.woff
  • platform/ios/TestExpectations: Update expectations.
  • platform/mac/TestExpectations: Ditto.
  • platform/win/TestExpectations: Ditto.
6:50 AM Changeset in webkit [229532] by zandobersek@gmail.com
  • 2 edits in trunk

Unreviewed. Unbreak the WPE layout testing that's been broken since
r229470. Due to disassociation between ENABLE(ACCESSIBILITY) and
HAVE(ACCESSIBILITY), the injected bundle for the WPE port was left with
undefined symbols. This is fixed with ENABLE_ACCESSIBILITY being enabled
for the WPE port as well.

  • Source/cmake/OptionsWPE.cmake:
6:48 AM Changeset in webkit [229531] by jfernandez@igalia.com
  • 29 edits
    6 deletes in trunk

Remove GridLayout runtime flag
https://bugs.webkit.org/show_bug.cgi?id=183484

Reviewed by Myles C. Maxfield.

Source/WebCore:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.

No new tests, because there are no changes in functionality.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertContentAlignmentData):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSParserMode.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • dom/Document.cpp:
  • dom/Document.h:
  • page/RuntimeEnabledFeatures.h:
  • rendering/RenderFlexibleBox.cpp:

(WebCore::alignmentOffset):

  • rendering/style/RenderStyle.cpp:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialDefaultAlignment):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebKit:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.

  • Shared/WebPreferences.yaml:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the

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

(+[WebPreferences initialize]):

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

(-[WebView _preferencesChanged:]):

Tools:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

LayoutTests:

Since the GridLayout runtime flag is removed and the feature
enabled by default, we don't need the tests verifying the
codepaths run when the feature is disabled.

  • css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
  • css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: Removed.
  • css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: Removed.
  • fast/css-grid-layout/grid-disable-expected.txt: Removed.
  • fast/css-grid-layout/grid-disable.html: Removed.
  • fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: Removed.
  • fast/css/ensure-flexbox-compatibility-with-initial-values.html: Removed.
5:56 AM Changeset in webkit [229530] by graouts@webkit.org
  • 45 edits
    2 copies
    4 adds in trunk

[Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
https://bugs.webkit.org/show_bug.cgi?id=183504
<rdar://problem/38372965>

LayoutTests/imported/w3c:

Reviewed by Dean Jackson and Jon Lee.

Since we've improved our implementation of getAnimations() we updated the expectations to mark
the progressions. Both tests for getAnimations() now pass 100%. Another test now fails at a later
stage and needed its expectation updated.

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animatable/getAnimations-expected.txt:
  • web-platform-tests/web-animations/interfaces/Document/getAnimations-expected.txt:

Source/WebCore:

Reviewed by Dean Jackson and Jon Lee.

Tests: webanimations/css-animations.html

webanimations/css-transitions.html

This patch implements CSS Animations and CSS Transitions as Web Animations. The main changes are:

  • StyleTreeResolver: StyleTreeResolver now has a code path to add CSSAnimation and CSSTransition objects onto the DocumentTimeline

to be picked up by the Web Animations engine. The previous CSSAnimationController code path is preserved if the runtime flag is disabled.

  • AnimationTimeline: we add two new methods, updateCSSAnimationsForElement() and updateCSSTransitionsForElement() which are called from

TreeResolver::createAnimatedElementUpdate(). These look at the AnimationList for the old and new RenderStyle objects and create, update
and remove matching CSSAnimation and CSSTransition instances.

  • DeclarativeAnimation: a new superclass to both CSSAnimation and CSSTransition which introduces the concept of a backingAnimation(),

which is an Animation held by the RenderStyle objects, and two virtual methods with base implementations, initialize() which is called
upon creating by create() methods in subclasses, and syncPropertiesWithBackingAnimation() which ensures that properties on the
DeclarativeAnimation objects (Web Animations side) match the backing animation (CSS side).

  • KeyframeEffectReadOnly: two new important methods to create blending keyframes (KeyframeList) based on backing Animation objects,

computeCSSAnimationBlendingKeyframes() and computeCSSTransitionBlendingKeyframes().

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationEffectReadOnly.h:

(WebCore::AnimationEffectReadOnly::isKeyframeEffectReadOnly const): We fix this method such that calling it on a KeyframeEffect, which
is a subclass of KeyframeEffectReadOnly, returns true.

  • animation/AnimationEffectTimingReadOnly.cpp: In order for DeclarativeAnimation::syncPropertiesWithBackingAnimation() to set the timing

function for a declarative animation's effect, we need a public method to set an effect's timing function outside of just the "easing"
property setter exposed via the JS API. So we introduce a setTimingFunction() method and call it from setEasing().
(WebCore::AnimationEffectTimingReadOnly::setEasing):
(WebCore::AnimationEffectTimingReadOnly::setTimingFunction):

  • animation/AnimationEffectTimingReadOnly.h:
  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::~AnimationTimeline): Clear all maps and sets containing WebAnimation references to ensure these get destructed
when the AnimationTimeline is being destructed and should no longer hold a reference to them.
(WebCore::AnimationTimeline::relevantMapForAnimation): We store various subclasses of WebAnimation in dedicated maps so we can composite
animations in the correct order when animating. This function returns the correct map for a given animation such that animationWasAddedToElement()
and animationWasRemovedFromElement() mutate the right map.
(WebCore::AnimationTimeline::animationWasAddedToElement):
(WebCore::AnimationTimeline::animationWasRemovedFromElement):
(WebCore::AnimationTimeline::animationsForElement): Make sure to look for animations in the lists of CSS Animations and CSS Transitions as well
as Web Animations.
(WebCore::AnimationTimeline::updateCSSAnimationsForElement): This method is called by TreeResolver::createAnimatedElementUpdate() during style
resolution. It compares the AnimationList of the previous style and the new style for a given element, checks that animations with a given name
that were not present in the old AnimationList have a new matching CSSAnimation object for them added to the AnimationTimeline, that animations
with a given name that are no longer present in the new AnimationList have their matching CSSAnimation object removed from the AnimationTimeline,
and that animations with a given name that are present in both the old and new AnimationList have their matching CSSAnimation updated to match
the current state of the animation in the AnimationList.
(WebCore::AnimationTimeline::updateCSSTransitionsForElement): Similarly to updateCSSAnimationsForElement(), this method is called during style
resolution by TreeResolver::createAnimatedElementUpdate(). Its role is to create or remove CSSTransition objects based on the AnimationList found
in the old and new styles for a given element. It follows a slightly different logic than updateCSSAnimationsForElement() since for CSS Transitions,
there is no need to update CSSTransition objects for a CSS property existing in both the old and new AnimationList, since when a CSS transitions
property is changed, a whole new transition is initiated. However, it's important to check that different Animation objects and styles would actually
result in different timing properties and blending keyframes, so check for this as well before creating new CSSTransition objects.

  • animation/AnimationTimeline.h:

(WebCore::AnimationTimeline::animations const): Change the m_animations type from HashSet to ListHashSet to guarantee we preserve the insertion order which is
required by getAnimations().
(WebCore::AnimationTimeline::hasElementAnimations const): Indicates to DocumentTimeline::updateAnimations() that there are animations targeting the provided element.
(WebCore::AnimationTimeline::elementToAnimationsMap):
(WebCore::AnimationTimeline::elementToCSSAnimationsMap):
(WebCore::AnimationTimeline::elementToCSSTransitionsMap):

  • animation/CSSAnimation.cpp: CSSAnimation is now a subclass of DeclarativeAnimation and subclasses initialize() and syncPropertiesWithBackingAnimation()

to perform work specific to CSS Animations.
(WebCore::CSSAnimation::create): Set the animationName property based on the provided backing animation.
(WebCore::CSSAnimation::CSSAnimation):
(WebCore::CSSAnimation::initialize): Create the blending keyframes for this CSSAnimation.
(WebCore::CSSAnimation::syncPropertiesWithBackingAnimation): Reflect the animation-fill-mode, animation-direction, animation-iteration-count and
animation-play-state CSS properties on the AnimationEffectTimingReadOnly object associated with this CSSAnimation.

  • animation/CSSAnimation.h:
  • animation/CSSTransition.cpp: CSSTransition is now a subclass of DeclarativeAnimation.

(WebCore::CSSTransition::create): Set the transitionProperty property based on the provided backing animation.
(WebCore::CSSTransition::CSSTransition):
(WebCore::CSSTransition::matchesBackingAnimationAndStyles const):
(WebCore::CSSTransition::canBeListed const): Subclass this method such that we also check that we have blending keyframes for a CSSTransition to be
listed by calls to getAnimations().

  • animation/CSSTransition.h:
  • animation/DeclarativeAnimation.cpp: Added. This new WebAnimation subclass now is the common base class for both CSSAnimation and CSSTransition.

It establishes a relationship with a "backing animation", which is an Animation obtained from a style's AnimationList while resolving styles.
These backing animations contain all of the parsed CSS styles related to CSS Animations and CSS Transitions and we use those to set matching properties
of the Web Animations timing model in the new syncPropertiesWithBackingAnimation() virtual method, which subclasses can override to perform further
work that is specific to a given declarative animation type. The initialize() method is called during create() methods to perform common animation
setup work. Note that while both initialize() and syncPropertiesWithBackingAnimation() are called, we suspend invalidation to that animation's effect
since these methods are meant to be called during style invalidation and we would hit an assertion if we followed the usual route of calling
updateStyleIfNeeded() on the target's document during invalidation.
(WebCore::DeclarativeAnimation::DeclarativeAnimation):
(WebCore::DeclarativeAnimation::setBackingAnimation):
(WebCore::DeclarativeAnimation::initialize): Create a KeyframeEffectReadOnly for this animation and set the provided element as its target, set that
element's document's timeline and play the animation if the backing animation's play state is playing.
(WebCore::DeclarativeAnimation::syncPropertiesWithBackingAnimation): Reflect the {animation|transition}-delay, {animation|transition}-duration and
{animation|transition}-timing-function properties as set on the backing animation.

  • animation/DeclarativeAnimation.h: Added.

(WebCore::DeclarativeAnimation::backingAnimation const):

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::updateAnimations): Trigger style invalidation for elements targeted not just by WebAnimation instances, but also by any
of the DeclarativeAnimation subclasses. We also remove the call to updateFinishedState() which should have been removed when we implemented correct
support for asynchronous WebAnimation operations.
(WebCore::DocumentTimeline::animatedStyleForRenderer): Declarative animations are backed by KeyframeEffectReadOnly effects, so make sure we check
for KeyframeEffectReadOnly or one of its subclasses and not just KeyframeEffect since there now are animation types that use the ReadOnly variant.
(WebCore::DocumentTimeline::runningAnimationsForElementAreAllAccelerated): Same as for animatedStyleForRenderer, check for KeyframeEffectReadOnly
and not simply KeyframeEffect.

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::invalidateElement): Stop forcing a style resolution as we invalidate element, marking them as dirty is sufficient. Calls to getAnimations()
already force a style resolution as needed.
(WebCore::KeyframeEffectReadOnly::create): Add a new create() method that only provides a target and which is used by DeclarativeAnimation::initialize().
(WebCore::KeyframeEffectReadOnly::getKeyframes): The previous implementation of getKeyframes() used the ParsedKeyframe list held as m_parsedKeyframes
to compute keyframes. In the case of declarative animations, there are no ParsedKeyframe since the JS API was not involved, so we use the blending keyframes
to look for keyframe data.
(WebCore::KeyframeEffectReadOnly::computeCSSAnimationBlendingKeyframes): Called by CSSAnimation::initialize(), this function creates blending keyframes by
looking up the keyframes date obtained from the @keyframes rule with this backing animation's name.
(WebCore::KeyframeEffectReadOnly::computeCSSTransitionBlendingKeyframes): Called by CSSTransition::create(), this function creates blending keyframes by
creating a 0-offset keyframe with the old style and a 1-offset keyframe with the new style as provided during TreeResolver::createAnimatedElementUpdate().
(WebCore::KeyframeEffectReadOnly::stylesWouldYieldNewCSSTransitionsBlendingKeyframes const): Called by AnimationTimeline::updateCSSTransitionsForElement()
to check that a provided backing Animation and a pair of old and new RenderStyles that may be different objects actually would yield different timing
properties and keyframe CSS values for a given CSS transition to avoid the deletion and creation of CSSTransition objects.
(WebCore::KeyframeEffectReadOnly::shouldRunAccelerated): We mistakenly assumed we always had blending keyframes, which is not always the case with a
CSSTransition where the transition style itself might be set first, but the target value after. So we should only run accelerated provided there are blending
keyframes at least, the function already returning false if it finds a blending keyframe animating a non-accelerated CSS property.
(WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): Check that there actually is a matching ParsedKeyframe to read the timing function from.

  • animation/KeyframeEffectReadOnly.h:

(WebCore::KeyframeEffectReadOnly::hasBlendingKeyframes const):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::~WebAnimation): We used to do something very wrong when a WebAnimation was destroyed which uncovered crashes when dealing with
declarative animations. In AnimationTimeline's updateCSSAnimationsForElement() and updateCSSTransitionsForElement(), when we identify that a DeclarativeAnimation
no longer matches an Animation from the current style's AnimationList, we set that DeclarativeAnimation's effect to null and call removeAnimation() on
the timeline. This removes all references from AnimationTimeline to this DeclarativeAnimation and leads to ~WebAnimation being called. Calling removeAnimation()
again in the destructor means that we'd hit ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun) in ref(). It was also meaningless to perform this work in
the WebAnimation destructor since an animation could never be destroyed if it were still registered on a timeline.
(WebCore::WebAnimation::suspendEffectInvalidation): DeclarativeAnimation instances have their timing model properties set during style invalidation, so we need
a mechanism to allow the usual effect invalidation to be suspended in this case. We now maintain a simple m_suspendCount count that increases and decreases with
calls to this method and unsuspendEffectInvalidation() and a isEffectInvalidationSuspended() method returning true whenever that count is positive.
(WebCore::WebAnimation::unsuspendEffectInvalidation):
(WebCore::WebAnimation::timingModelDidChange): Check that effect invalidation is not suspended before proceeding with invalidating the effect.
(WebCore::WebAnimation::setEffect): Check for KeyframeEffectReadOnly and not just KeyframeEffect since declarative animations have ReadOnly effects.
(WebCore::WebAnimation::setTimeline): Check for KeyframeEffectReadOnly and not just KeyframeEffect since declarative animations have ReadOnly effects.
(WebCore::WebAnimation::scheduleMicrotaskIfNeeded): Ensure that the WebAnimation's lifecycle is extended at least to the completion of the scheduled microtask.
This would otherwise cause crashes after declarative animations were destroyed when they were no longer applied.
(WebCore::WebAnimation::runPendingPlayTask): Only fulfill the "ready" promise if it hasn't already been, which might have been the case if multiple calls to play()
are made as a result of updating the animation play state in CSSAnimation::syncPropertiesWithBackingAnimation().
(WebCore::WebAnimation::runPendingPauseTask): Same as above but with multiple pause() calls.
(WebCore::WebAnimation::startOrStopAccelerated): Check for KeyframeEffectReadOnly and not just KeyframeEffect since declarative animations have ReadOnly effects.
(WebCore::WebAnimation::canBeListed const): This new method is called by {Document|Element}::getAnimations() to check that an animation is in the correct state to
be listed. The Web Animations spec explains that only animations "that have an associated target effect which is current or in effect" can be listed. We implement
this behavior as specified.

  • animation/WebAnimation.h:

(WebCore::WebAnimation::isDeclarativeAnimation const):
(WebCore::WebAnimation::isEffectInvalidationSuspended):

  • dom/Document.cpp:

(WebCore::Document::getAnimations): Ensure that the document's pending styles are resolved before returning animations to ensure that any pending declarative
animations are created. Additionally, we ensure that we only list qualifying animations that have effects targeting elements that are children of thi document.

  • dom/Element.cpp:

(WebCore::Element::getAnimations): Same as Document::getAnimations().

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate): When resolving styles, call into the AnimationTimeline if the runtime flag to enable CSS Animations and
CSS Transitions as Web Animations is on. Otherwise, use CSSAnimationController.

Source/WebKitLegacy/mac:

Reviewed by Dean Jackson and Jon Lee.

Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.

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

(+[WebPreferences initialize]):
(-[WebPreferences setModernMediaControlsEnabled:]):
(-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
(-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):

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

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Reviewed by Dean Jackson and Jon Lee.

Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferences.cpp:

(WebPreferences::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
(WebPreferences::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):

  • WebPreferenceKeysPrivate.h
  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

Reviewed by Jon Lee.

Add a new <!-- webkit-test-runner --> flag to enable the CSS Animations and CSS Transitions
as Web Animations runtime flag in the new tests we've created for this feature.

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

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):

  • WebKitTestRunner/TestController.cpp:

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

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Reviewed by Dean Jackson and Jon Lee.

Add a series of new tests to check CSSAnimation and CSSTransition objects are correctly created
as CSS animation-* and CSS transition-* properties are used. We also update some existing tests
to use a more concise API since we've implement Element.animate() since their creation.

  • webanimations/animation-opacity-animation-crash.html:
  • webanimations/css-animations-expected.txt: Added.
  • webanimations/css-animations.html: Added.
  • webanimations/css-transitions-expected.txt: Added.
  • webanimations/css-transitions.html: Added.
  • webanimations/opacity-animation-no-longer-composited-upon-completion.html:
  • webanimations/opacity-animation-yields-compositing.html:
2:56 AM Changeset in webkit [229529] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.20.0

WebKitGTK+ 2.20.0

2:55 AM Changeset in webkit [229528] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.20

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.20.0 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.20.0.
2:46 AM Changeset in webkit [229527] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed. Fix library version of JavaScriptCoreGTK.

  • Source/cmake/OptionsGTK.cmake:
2:28 AM Changeset in webkit [229526] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r229525 - [GTK] Crash in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland
https://bugs.webkit.org/show_bug.cgi?id=176490

Reviewed by Žan Doberšek.

Destroy the wl_display with wl_display_disconnect() (client process API), not
wl_display_destroy() (server process API). It has to be destroyed last, so explicitly
destroy the wl_registry and wl_compositor first.

  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::~PlatformDisplayWayland):

2:14 AM Changeset in webkit [229525] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GTK] Crash in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland
https://bugs.webkit.org/show_bug.cgi?id=176490

Reviewed by Žan Doberšek.

Destroy the wl_display with wl_display_disconnect() (client process API), not
wl_display_destroy() (server process API). It has to be destroyed last, so explicitly
destroy the wl_registry and wl_compositor first.

  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::~PlatformDisplayWayland):

2:12 AM Changeset in webkit [229524] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.20

Merge r229461 - [GTK] Do not use WebKitDOMHTMLFormElement as argument of signal WebKitWebPage::will-submit-form
https://bugs.webkit.org/show_bug.cgi?id=183510

Reviewed by Michael Catanzaro.

Source/WebKit:

In 2.22 WebKitDOMHTMLFormElement will be deprecated in GTK+ port and won't still exist in WPE. The new
JavaScript GLib API will be used to replace most of the DOM API, but a few classes will remain with a minimal
API for things that can't be done with JavaScript. WebKitDOMElement will stay and will be added to WPE as well,
so if we change the signal parameter to WebKitDOMElement we will be able to keep using
WebKitWebPage::will-submit-form without any changes. WPE will gain this signal and the rest of the API that uses
DOM.

  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:

(webkit_web_page_class_init):

Tools:

Update the test to use WebKitDOMElement instead and fix a memory leak.

  • TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:

(handleFormSubmissionCallback):
(willSubmitFormCallback):

2:10 AM Changeset in webkit [229523] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r229396 - REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called, otherwise inspector does not close
https://bugs.webkit.org/show_bug.cgi?id=181126

Reviewed by Carlos Alberto Lopez Perez.

Fix the condition to decide whether to detach the inspector view ourselves.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::platformDetach): Remove the inspector view from its parent if we don't have a client
or the client didn't detach it.

Mar 11, 2018:

8:46 PM Changeset in webkit [229522] by Alan Bujtas
  • 5 edits
    2 copies
    11 moves
    4 adds in trunk/Tools

[LayoutReloaded] Add Line class for InlineFormattingContext -and move files around.
https://bugs.webkit.org/show_bug.cgi?id=183551

Reviewed by Wenson Hsieh.

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: Renamed from Tools/LayoutReloaded/BlockFormattingContext.js.

(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype.computeWidth):
(BlockFormattingContext.prototype.computeHeight):
(BlockFormattingContext.prototype.marginTop):
(BlockFormattingContext.prototype.marginBottom):
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._placeOutOfFlowDescendants):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._computeHorizontalConstraint):
(BlockFormattingContext.prototype._computeContentHeight):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._shrinkToFitWidth):

  • LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js: Renamed from Tools/LayoutReloaded/BlockMarginCollapse.js.

(BlockMarginCollapse.marginTop):
(BlockMarginCollapse.marginBottom):
(BlockMarginCollapse._isMarginTopCollapsedWithSibling):
(BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
(BlockMarginCollapse._nonCollapsedMarginTop):
(BlockMarginCollapse._nonCollapsedMarginBottom):
(BlockMarginCollapse._collapsedMarginTopFromFirstChild):
(BlockMarginCollapse._collapsedMarginBottomFromLastChild):
(BlockMarginCollapse._marginValue):
(BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
(BlockMarginCollapse):

  • LayoutReloaded/FormattingContext/FloatingContext.js: Renamed from Tools/LayoutReloaded/FloatingContext.js.

(FloatingContext):
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype.bottom):
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
(FloatingContext.prototype._addFloating):
(FloatingContext.prototype._findInnerMostLeftAndRight):
(FloatingContext.prototype._moveToNextVerticalPosition):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._findFloatingAtVerticalPosition):
(FloatingContext.prototype._isEmpty):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._bottom):
(FloatingContext.prototype._formattingContext):

  • LayoutReloaded/FormattingContext/FormattingContext.js: Renamed from Tools/LayoutReloaded/FormattingContext.js.

(FormattingContext):
(FormattingContext.prototype.rootContainer):
(FormattingContext.prototype.floatingContext):
(FormattingContext.prototype.layout):
(FormattingContext.prototype.computeWidth):
(FormattingContext.prototype.computeHeight):
(FormattingContext.prototype.marginTop):
(FormattingContext.prototype.marginLeft):
(FormattingContext.prototype.marginBottom):
(FormattingContext.prototype.marginRight):
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):

  • LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: Renamed from Tools/LayoutReloaded/InlineFormattingContext.js.

(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineBox):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._commitLine):
(InlineFormattingContext.prototype._line):

  • LayoutReloaded/FormattingContext/InlineFormatting/Line.js: Copied from Tools/LayoutReloaded/InitialBlockContainer.js.

(Line):
(Line.prototype.isEmpty):
(Line.prototype.availableWidth):
(Line.prototype.appendFragment):

  • LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
  • LayoutReloaded/LayoutTree/BlockContainer.js: Renamed from Tools/LayoutReloaded/BlockContainer.js.

(BlockContainer):
(BlockContainer.prototype.establishesInlineFormattingContext):

  • LayoutReloaded/LayoutTree/Box.js: Renamed from Tools/LayoutReloaded/Box.js.

(Box):
(Box.prototype.id):
(Box.prototype.setRendererName):
(Box.prototype.name):
(Box.prototype.node):
(Box.prototype.parent):
(Box.prototype.nextSibling):
(Box.prototype.nextInFlowSibling):
(Box.prototype.previousSibling):
(Box.prototype.previousInFlowSibling):
(Box.prototype.setParent):
(Box.prototype.setNextSibling):
(Box.prototype.setPreviousSibling):
(Box.prototype.rect):
(Box.prototype.topLeft):
(Box.prototype.bottomRight):
(Box.prototype.setTopLeft):
(Box.prototype.setSize):
(Box.prototype.setWidth):
(Box.prototype.setHeight):
(Box.prototype.isContainer):
(Box.prototype.isBlockLevelBox):
(Box.prototype.isBlockContainerBox):
(Box.prototype.isInlineLevelBox):
(Box.prototype.setIsAnonymous):
(Box.prototype.isAnonymous):
(Box.prototype.establishesFormattingContext):
(Box.prototype.establishedFormattingContext):
(Box.prototype.establishesBlockFormattingContext):
(Box.prototype.establishesInlineFormattingContext):
(Box.prototype.isPositioned):
(Box.prototype.isRelativePositioned):
(Box.prototype.isAbsolutePositioned):
(Box.prototype.isFixedPositioned):
(Box.prototype.isInFlow):
(Box.prototype.isOutOfFlowPositioned):
(Box.prototype.isInFlowPositioned):
(Box.prototype.isFloatingPositioned):
(Box.prototype.isFloatingOrOutOfFlowPositioned):
(Box.prototype.isRootElement):
(Box.prototype.containingBlock):
(Box.prototype.borderBox):
(Box.prototype.paddingBox):
(Box.prototype.contentBox):

  • LayoutReloaded/LayoutTree/Container.js: Renamed from Tools/LayoutReloaded/Container.js.

(Container):
(Container.prototype.isContainer):
(Container.prototype.setFirstChild):
(Container.prototype.setLastChild):
(Container.prototype.firstChild):
(Container.prototype.firstInFlowChild):
(Container.prototype.lastChild):
(Container.prototype.lastInFlowChild):
(Container.prototype.hasChild):
(Container.prototype.hasInFlowChild):

  • LayoutReloaded/LayoutTree/InitialBlockContainer.js: Renamed from Tools/LayoutReloaded/InitialBlockContainer.js.

(InitialBlockContainer):
(InitialBlockContainer.prototype.establishesBlockFormattingContext):
(InitialBlockContainer.prototype.paddingBox):
(InitialBlockContainer.prototype.contentBox):

  • LayoutReloaded/LayoutTree/InlineBox.js: Renamed from Tools/LayoutReloaded/InlineBox.js.

(InlineBox):
(InlineBox.prototype.setText):
(InlineBox.prototype.text):

  • LayoutReloaded/LayoutTree/Text.js: Renamed from Tools/LayoutReloaded/Text.js.

(Text):
(Text.prototype.node):
(Text.prototype.content):
(Text.prototype.length):

  • LayoutReloaded/Utils.js:

(Utils.nextBreakingOpportunity):
(Utils.measureText):

  • LayoutReloaded/misc/headers/Line.h: Copied from Tools/LayoutReloaded/misc/headers/Text.h.
  • LayoutReloaded/misc/headers/Text.h:
  • LayoutReloaded/test/border-simple.html:
  • LayoutReloaded/test/index.html:
8:38 PM Changeset in webkit [229521] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the internal iOS build after r229512
https://bugs.webkit.org/show_bug.cgi?id=183550

Reviewed by Zalan Bujtas.

Fixes a typo in a header import, as well as a nullability error. SecTrustEvaluate() takes in a nonnull outparam,
which was removed in r229512; this adds the outparam back, but does not consult its value when setting the
infoDictionary.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController _EVOrganizationName]):

8:25 PM Changeset in webkit [229520] by Yusuke Suzuki
  • 4 edits
    2 adds in trunk

[DFG] AI should convert CreateThis to NewObject if the prototype object is proved
https://bugs.webkit.org/show_bug.cgi?id=183310

Reviewed by Filip Pizlo.

JSTests:

  • stress/ai-create-this-to-new-object-fire.js: Added.

(assert):
(test):
(func):
(check):
(test.body.A):
(test.body.B):
(test.body):

  • stress/ai-create-this-to-new-object.js: Added.

(assert):
(test):
(func):
(check):
(test.body.A):
(test.body.B):
(test.body):

Source/JavaScriptCore:

This patch implements CreateThis -> NewObject conversion in AI if the given function is constant.
This contributes to 6% win in Octane/raytrace.

baseline patched

raytrace x2 1.19915+-0.01862 1.13156+-0.01589 definitely 1.0597x faster

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

3:05 PM Changeset in webkit [229519] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Disable Sigill crash analyzer on watchOS
https://bugs.webkit.org/show_bug.cgi?id=183548
<rdar://problem/38338032>

Reviewed by Mark Lam.

Sigill is not supported on watchOS.

  • runtime/Options.cpp:

(JSC::overrideDefaults):

2:09 PM Changeset in webkit [229518] by fpizlo@apple.com
  • 22 edits
    1 add in trunk/Source

Split DirectArguments into JSValueOOB and JSValueStrict parts
https://bugs.webkit.org/show_bug.cgi?id=183458

Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:


Our Spectre plan for JSValue objects is to allow inline JSValue stores and loads guarded by
unmitigated structure checks. This works because objects reachable from JSValues (i.e. JSValue
objects, like String, Symbol, and any descendant of JSObject) will only contain fields that it's OK
to read and write within a Spectre mitigation window. Writes are important, because within the
window, a write could appear to be made speculatively and rolled out later. This means that:

  • JSValue objects cannot have lengths, masks, or anything else inline.


  • JSValue objects cannot have an inline type that is used as part of a Spectre mitigation for a type check, unless that type is in the form of a poison key.


This means that the dynamic poisoning that I previously landed for DirectArguments is wrong. It also
means that it's wrong for DirectArguments to have an inline length.

This changes DirectArguments to use poisoning according to the universal formula:

  • The random accessed portions are out-of-line, pointed to by a poisoned pointer.


  • No inline length.


Surprisingly, this is perf-neutral. It's probably perf-neutral because our compiler optimizations
amortize whatever cost there was.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):

  • dfg/DFGCallCreateDirectArgumentsSlowPathGenerator.h:

(JSC::DFG::CallCreateDirectArgumentsSlowPathGenerator::CallCreateDirectArgumentsSlowPathGenerator):

  • dfg/DFGCallCreateDirectArgumentsWithKnownLengthSlowPathGenerator.h: Added.

(JSC::DFG::CallCreateDirectArgumentsWithKnownLengthSlowPathGenerator::CallCreateDirectArgumentsWithKnownLengthSlowPathGenerator):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetFromArguments):
(JSC::DFG::SpeculativeJIT::compilePutToArguments):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileGetFromArguments):
(JSC::FTL::DFG::LowerDFGToB3::compilePutToArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedHeapCell):
(JSC::FTL::DFG::LowerDFGToB3::dynamicPoison): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::dynamicPoisonOnLoadedType): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::dynamicPoisonOnType): Deleted.

  • heap/SecurityKind.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emitDirectArgumentsGetByVal):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::DirectArguments):
(JSC::DirectArguments::createUninitialized):
(JSC::DirectArguments::create):
(JSC::DirectArguments::createByCopying):
(JSC::DirectArguments::estimatedSize):
(JSC::DirectArguments::visitChildren):
(JSC::DirectArguments::overrideThings):
(JSC::DirectArguments::copyToArguments):
(JSC::DirectArguments::mappedArgumentsSize):

  • runtime/DirectArguments.h:
  • runtime/JSCPoison.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSSymbolTableObject.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WTF:

  • wtf/MathExtras.h:

(WTF::dynamicPoison): Deleted.

12:52 PM Changeset in webkit [229517] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[B3] Above/Below should be strength-reduced for comparison with 0
https://bugs.webkit.org/show_bug.cgi?id=183543

Reviewed by Filip Pizlo.

Above(0, x) and BelowEqual(0, x) can be converted to constants false and true respectively.
This can be seen in ArraySlice(0) case: Select(Above(0, length), length, 0) this should
be converted to 0. This patch adds such a folding to comparisons.

We also fix B3ReduceStrength issue creating an orphan value. If a flipped value is folded to
a constant, we do not insert flipped value and make it an orphan. This issue causes JSC test
failure with this B3Const32/64Value change. With this patch, we create a flipped value only
when we fail to fold it to a constant.

  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::lessThanConstant const):
(JSC::B3::Const32Value::greaterThanConstant const):
(JSC::B3::Const32Value::lessEqualConstant const):
(JSC::B3::Const32Value::greaterEqualConstant const):
(JSC::B3::Const32Value::aboveConstant const):
(JSC::B3::Const32Value::belowConstant const):
(JSC::B3::Const32Value::aboveEqualConstant const):
(JSC::B3::Const32Value::belowEqualConstant const):

  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::lessThanConstant const):
(JSC::B3::Const64Value::greaterThanConstant const):
(JSC::B3::Const64Value::lessEqualConstant const):
(JSC::B3::Const64Value::greaterEqualConstant const):
(JSC::B3::Const64Value::aboveConstant const):
(JSC::B3::Const64Value::belowConstant const):
(JSC::B3::Const64Value::aboveEqualConstant const):
(JSC::B3::Const64Value::belowEqualConstant const):

  • b3/B3ReduceStrength.cpp:
  • b3/testb3.cpp:

(JSC::B3::int64Operands):
(JSC::B3::int32Operands):

10:45 AM Changeset in webkit [229516] by fpizlo@apple.com
  • 10 edits
    1 add in trunk/Source/bmalloc

PerProcess<> should be safe by default
https://bugs.webkit.org/show_bug.cgi?id=183545

Reviewed by Yusuke Suzuki.

This makes PerProcess<> safe by default, so we don't need SafePerProcess<>.

The new PerProcess<> design relies on a hash-consing mechanism for PerProcess<> storage based
on the PRETTY_FUNCTION from inside PerProcess<>, which captures the instantiated type in
the string. Therefore, this can be used to runtime-coalesce PerProcess<> instances based on
type.

I expect this to be perf-neutral. It's an important prerequisite to more bmalloc work, since I
don't want to have more PerProcess<> vs SafePerProcess<> bugs, and SafePerProcess<> can't be
used for everything (I don't see how to use it for isoheaps).

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/IsoDirectoryInlines.h:

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::didBecome):

  • bmalloc/PerProcess.cpp: Added.

(bmalloc::stringHash):
(bmalloc::allocate):
(bmalloc::getPerProcessData):

  • bmalloc/PerProcess.h:

(bmalloc::PerProcess::mutex):
(bmalloc::PerProcess::coalesce):
(bmalloc::PerProcess::getSlowCase):
(): Deleted.

  • bmalloc/Scavenger.cpp:
  • bmalloc/Scavenger.h:
  • bmalloc/bmalloc.cpp:

(bmalloc::api::scavenge):
(bmalloc::api::setScavengerThreadQOSClass):

12:03 AM Changeset in webkit [229515] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[Win] Use SRWLOCK and CONDITION_VARIABLE to simplify implementation
https://bugs.webkit.org/show_bug.cgi?id=183541

Reviewed by Darin Adler.

After Windows Vista, Windows offers SRWLOCK and CONDITION_VARIABLE.
They can simplify the implementation of our WTF::Mutex and WTF::ThreadCondition.

C++ std::mutex and std::condition_variable uses std::chrono for their timed
functions. Since std::chrono is not overflow-aware, we cannot reliably use
this functionalities. This is why we still keep WTF::Mutex and WTF::ThreadCondition.
They are used for ParkingLot.

  • wtf/ThreadingPrimitives.h:
  • wtf/ThreadingWin.cpp:

(WTF::Mutex::Mutex):
(WTF::Mutex::~Mutex):
(WTF::Mutex::lock):
(WTF::Mutex::tryLock):
(WTF::Mutex::unlock):
(WTF::absoluteTimeToWaitTimeoutInterval):
(WTF::ThreadCondition::ThreadCondition):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::ThreadCondition::signal):
(WTF::ThreadCondition::broadcast):
(WTF::PlatformCondition::timedWait): Deleted.
(WTF::PlatformCondition::signal): Deleted.

Note: See TracTimeline for information about the timeline view.