Timeline



Jan 26, 2019:

6:10 PM Changeset in webkit [240551] by Simon Fraser
  • 13 edits in trunk/Source

Allow scrolling tree nodes to exist in a detached state
https://bugs.webkit.org/show_bug.cgi?id=193754

Reviewed by Zalan Bujtas.

Source/WebCore:

One of the (questionable?) design decisions of the scrolling tree is that the tree implementation
is hidden behind the ScrollingCoordinator interface. That interface only allowed nodes to exist
in a connected state; attachToStateTree() required a non-zero parent for any node that was not
the root.

This makes it impossible to coordinate the hookup of the scrolling tree across frame boundaries;
the scrolling tree has to have been fully constructed in ancestor frames before subframe nodes
can be attached. This is a significant difference from compositing, where a subframe can create
GraphicsLayers which don't have to be parented right away, and actually get parented later via
a compositing update in the parent frame.

We want to be able to hook up the scrolling tree via the same code paths as GraphicsLayer
connection (anything else is too confusing). So we need to be able to instantiate scrolling
tree nodes in a disconnected state, and attach them later.

To achieve this, add the notion of "unparented" nodes to ScrollingCoordinator and the ScrollingStateTree.
Allow clients to create unparented nodes, which can be attached later. ScrollingCoordinator stores
the roots of unparented subtrees in an owning HashMap. Nodes in unparented trees are still referenced
by m_stateNodeMap, so it's possible to find them and set state on them.

Clean up the ScrollingCoordinator interface to remove "state tree" terminology; the state vs. scrolling tree
is really an implementation detail.

This also removes the special-casing of ScrollingNodeType::Subframe nodes which ScrollingStateTree stored
in m_orphanedSubframeNodes; now the unparenting is controlled by the client.

Currently no code creates unparented nodes so there is no behavior change.

  • dom/Document.cpp:

(WebCore::Document::setPageCacheState):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::createNode):
(WebCore::AsyncScrollingCoordinator::insertNode):
(WebCore::AsyncScrollingCoordinator::unparentNode):
(WebCore::AsyncScrollingCoordinator::unparentChildrenAndDestroyNode):
(WebCore::AsyncScrollingCoordinator::detachAndDestroySubtree):
(WebCore::AsyncScrollingCoordinator::clearAllNodes):
(WebCore::AsyncScrollingCoordinator::parentOfNode const):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::AsyncScrollingCoordinator::attachToStateTree): Deleted.
(WebCore::AsyncScrollingCoordinator::detachFromStateTree): Deleted.
(WebCore::AsyncScrollingCoordinator::clearStateTree): Deleted.

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::handleWheelEvent):
(WebCore::ScrollingCoordinator::createNode):
(WebCore::ScrollingCoordinator::insertNode):
(WebCore::ScrollingCoordinator::unparentNode):
(WebCore::ScrollingCoordinator::unparentChildrenAndDestroyNode):
(WebCore::ScrollingCoordinator::detachAndDestroySubtree):
(WebCore::ScrollingCoordinator::clearAllNodes):
(WebCore::ScrollingCoordinator::parentOfNode const):
(WebCore::ScrollingCoordinator::childrenOfNode const):
(WebCore::ScrollingCoordinator::attachToStateTree): Deleted.
(WebCore::ScrollingCoordinator::detachFromStateTree): Deleted.
(WebCore::ScrollingCoordinator::clearStateTree): Deleted.

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::removeFromParent):
(WebCore::ScrollingStateNode::removeChild):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::ScrollingStateTree):
(WebCore::ScrollingStateTree::createUnparentedNode):
(WebCore::ScrollingStateTree::insertNode):
(WebCore::ScrollingStateTree::unparentNode):
(WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode):
(WebCore::ScrollingStateTree::detachAndDestroySubtree):
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::commit):
(WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
(WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
(showScrollingStateTree):
(WebCore::ScrollingStateTree::attachNode): Deleted.
(WebCore::ScrollingStateTree::detachNode): Deleted.

  • page/scrolling/ScrollingStateTree.h:

(WebCore::ScrollingStateTree::nodeCount const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
(WebCore::RenderLayerCompositor::attachScrollingNode):

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(WebKit::RemoteScrollingCoordinatorTransaction::decode):

3:54 PM Changeset in webkit [240550] by Devin Rousso
  • 5 edits in trunk

Web Inspector: handle CSS Color 4 color syntaxes
https://bugs.webkit.org/show_bug.cgi?id=193166
<rdar://problem/47062403>

Reviewed by Simon Fraser.

Source/WebInspectorUI:

  • UserInterface/Models/Color.js:

(WI.Color.fromString):
(WI.Color.fromString.splitFunctionString): Added.
(WI.Color.fromString.parseFunctionAlpha): Added.
(WI.Color.fromString.parseFunctionComponent): Added.
(WI.Color.fromString.parseHueComponent): Added.
(WI.Color.fromString.parsePercentageComponent): Added.

LayoutTests:

  • inspector/model/color.html:
  • inspector/model/color-expected.txt:
2:32 PM Changeset in webkit [240549] by Devin Rousso
  • 13 edits
    2 adds in trunk

Web Inspector: provide a way to edit the user agent of a remote target
https://bugs.webkit.org/show_bug.cgi?id=193862
<rdar://problem/47359292>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Page.json:

Add overrideUserAgent command.

Source/WebCore:

Test: inspector/page/overrideUserAgent.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::userAgent const):
(WebCore::FrameLoader::userAgentForJavaScript const):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::applyUserAgentOverride): Added.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl): Added.

  • inspector/agents/InspectorPageAgent.h:
  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideUserAgent): Added.
(WebCore::InspectorPageAgent::applyUserAgentOverride): Added.

Source/WebInspectorUI:

  • UserInterface/Base/Main.js:

(WI.loaded):
(WI.contentLoaded):
(WI.initializeTarget):
(WI._handleDeviceSettingsToolbarButtonClicked):
(WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
(WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
(WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
(WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
(WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
(WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
(WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):

  • UserInterface/Views/Main.css:

(.device-settings-content):
(.device-settings-content .user-agent-value): Added.
(.device-settings-content .user-agent-value > select): Added.
(.device-settings-content .user-agent-value > input): Added.
(body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
(body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
(.device-settings-content label > input): Added.
(body[dir=ltr] .device-settings-content label > input): Deleted.
(body[dir=rtl] .device-settings-content label > input): Deleted.

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/page/overrideUserAgent.html: Added.
  • inspector/page/overrideUserAgent-expected.txt: Added.
12:00 PM Changeset in webkit [240548] by Simon Fraser
  • 1 edit
    1 copy
    3 moves in trunk/LayoutTests

Move scrolling-tree/fixed-inside-frame.html into scrolling tree tests
https://bugs.webkit.org/show_bug.cgi?id=193871

Reviewed by Zalan Bujtas.

Move another test into scrollingcoordinator/scrolling-tree, and now that it runs on iOS,
add iOS results.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt.
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt.
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame.html.
  • scrollingcoordinator/scrolling-tree/resources/autoscrolling-frame-with-fixed.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/resources/autoscrolling-frame-with-fixed.html.
11:24 AM Changeset in webkit [240547] by Alan Bujtas
  • 5 edits
    2 adds in trunk

Source/WebCore:
[LFC] The initial values for top/bottom in contentHeightForFormattingContextRoot should not be 0.
https://bugs.webkit.org/show_bug.cgi?id=193867

Reviewed by Antti Koivisto.

The initial content top/bottom value is the border top + padding top.

This is only a problem when the box has float children only. While computing the height using the bottom-most float,
we call "top = std::min(floatTop, top)". With 0 initial top value, this returns an incorrect result when the box
has (top)border/padding.

Test: fast/block/block-only/abs-pos-with-border-padding-and-float-child.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::contentHeightForFormattingContextRoot):

Tools:
[LFC] The default values for top/bottom in contentHeightForFormattingContextRoot should not be 0.
https://bugs.webkit.org/show_bug.cgi?id=193867

Reviewed by Antti Koivisto.

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:
[LFC] The default values for top/bottom in contentHeightForFormattingContextRoot should not be 0.
https://bugs.webkit.org/show_bug.cgi?id=193867

Reviewed by Antti Koivisto.

  • fast/block/block-only/abs-pos-with-border-padding-and-float-child-expected.html: Added.
  • fast/block/block-only/abs-pos-with-border-padding-and-float-child.html: Added.
10:14 AM Scrolling created by Simon Fraser
10:08 AM WikiStart edited by Simon Fraser
(diff)
7:01 AM Changeset in webkit [240546] by Alan Bujtas
  • 7 edits
    2 adds in trunk

[LFC][BFC] Ignore last inflow child's collapsed through margin after when computing containing block's height.
https://bugs.webkit.org/show_bug.cgi?id=193865

Reviewed by Antti Koivisto.

Source/WebCore:

Height computation ->
10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
...the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom
margin does not collapse with the element's bottom margin

<div style="border: 1px solid green">

<div style="margin-top: 100px;"></div>

</div>

When the child vertical margins collapse through (margin-top = margin-bottom = 100px), the bottom edge of the bottom margin is
the same as the bottom edge of the top margin which is alredy taken into use while positioning so technically the bottom margin value should be ignored.

Test: fast/block/margin-collapse/collapsed-through-child-simple.html

  • layout/MarginTypes.h:

(WebCore::Layout::UsedVerticalMargin::isCollapsedThrough const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::hasCollapsedThroughMargin const):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/margin-collapse/collapsed-through-child-simple-expected.html: Added.
  • fast/block/margin-collapse/collapsed-through-child-simple.html: Added.
5:13 AM Changeset in webkit [240545] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][BFC][MarginCollapsing] marginAfterCollapsesWithParentMarginAfter/marginAfterCollapsesWithLastInFlowChildMarginAfter should check for border/padding after values.
https://bugs.webkit.org/show_bug.cgi?id=193864

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):

4:44 AM Changeset in webkit [240544] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Box::nextInFlowOrFloatingSibling() should always return sibling floats as well.
https://bugs.webkit.org/show_bug.cgi?id=193855

Reviewed by Antti Koivisto.

Use iterative algorithm to find next/previous siblings.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::nextInFlowOrFloatingSibling const):

1:07 AM Changeset in webkit [240543] by ysuzuki@apple.com
  • 21 edits
    2 adds in trunk

[JSC] NativeErrorConstructor should not have own IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=193713

Reviewed by Saam Barati.

JSTests:

Remove @Error use.

  • stress/try-get-by-id-should-spill-registers-dfg.js:

(let.f.createBuiltin):

Source/JavaScriptCore:

This removes an additional member in NativeErrorConstructor, and make sizeof(NativeErrorConstructor) == sizeof(InternalFunction).
We also make error constructors lazily allocated by using LazyClassStructure. Since error structures are not accessed from DFG / FTL
threads, this is OK. While TypeError constructor is eagerly allocated because it is touched from our builtin JS as @TypeError, we should
offer some function instead of exposing TypeError constructor in the future, and remove this @TypeError reference. This change removes
IsoSubspace for NativeErrorConstructor in VM. We also remove @Error and @RangeError references for builtins since they are no longer
referenced.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.h:
  • interpreter/Interpreter.h:
  • runtime/Error.cpp:

(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(WTF::printInternal): Deleted.

  • runtime/Error.h:
  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototype::create):
(JSC::ErrorPrototype::finishCreation):

  • runtime/ErrorPrototype.h:

(JSC::ErrorPrototype::create): Deleted.

  • runtime/ErrorType.cpp: Added.

(JSC::errorTypeName):
(WTF::printInternal):

  • runtime/ErrorType.h: Added.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::initializeErrorConstructor):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::internalPromiseConstructor const):
(JSC::JSGlobalObject::errorStructure const):
(JSC::JSGlobalObject::evalErrorConstructor const): Deleted.
(JSC::JSGlobalObject::rangeErrorConstructor const): Deleted.
(JSC::JSGlobalObject::referenceErrorConstructor const): Deleted.
(JSC::JSGlobalObject::syntaxErrorConstructor const): Deleted.
(JSC::JSGlobalObject::typeErrorConstructor const): Deleted.
(JSC::JSGlobalObject::URIErrorConstructor const): Deleted.

  • runtime/NativeErrorConstructor.cpp:

(JSC::NativeErrorConstructor<errorType>::NativeErrorConstructor):
(JSC::NativeErrorConstructorBase::finishCreation):
(JSC::NativeErrorConstructor<errorType>::constructNativeErrorConstructor):
(JSC::NativeErrorConstructor<errorType>::callNativeErrorConstructor):
(JSC::NativeErrorConstructor::NativeErrorConstructor): Deleted.
(JSC::NativeErrorConstructor::finishCreation): Deleted.
(JSC::NativeErrorConstructor::visitChildren): Deleted.
(JSC::Interpreter::constructWithNativeErrorConstructor): Deleted.
(JSC::Interpreter::callNativeErrorConstructor): Deleted.

  • runtime/NativeErrorConstructor.h:

(JSC::NativeErrorConstructorBase::createStructure):
(JSC::NativeErrorConstructorBase::NativeErrorConstructorBase):

  • runtime/NativeErrorPrototype.cpp:

(JSC::NativeErrorPrototype::finishCreation): Deleted.

  • runtime/NativeErrorPrototype.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::handleBadI64Use):

Jan 25, 2019:

11:29 PM Changeset in webkit [240542] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
https://bugs.webkit.org/show_bug.cgi?id=193860
<rdar://problem/47535022>

Reviewed by Antti Koivisto.

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
(WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):

  • UIProcess/Cocoa/ViewGestureController.h:

Treat provisional load and same document load the same: they already both
unpause the snapshot removal tracker, request render tree size notifications,
but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
and thus would get stuck waiting for RepaintAfterNavigation.

10:50 PM Changeset in webkit [240541] by rniwa@webkit.org
  • 14 edits in trunk

Need a mechanism to override navigator.userAgent
https://bugs.webkit.org/show_bug.cgi?id=193762
<rdar://problem/47504939>

Reviewed by Brent Fulgham.

Source/WebCore:

Added the ability to specify user agent string just for navigator.userAgent via DocumentLoader.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setCustomJavaScriptUserAgent):
(WebCore::DocumentLoader::customJavaScriptUserAgent const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::userAgentForJavaScript const):

  • loader/FrameLoader.h:
  • page/Navigator.cpp:

(WebCore::Navigator::userAgent const):

Source/WebKit:

This patch adds a new _WKWebsitePolicies SPI to specify the user agent string returned by
navigator.userAgent without affecting the user agent string used to send network requests.

Tests: WebKit.WebsitePoliciesCustomJavaScriptUserAgent

WebKit.WebsitePoliciesCustomUserAgents

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setCustomJavaScriptUserAgent:]):
(-[_WKWebsitePolicies customJavaScriptUserAgent]):

Tools:

Added test cases for _WKWebsitePolicies.customJavaScriptUserAgent.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[CustomJavaScriptUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomJavaScriptUserAgentDelegate webView:didFinishNavigation:]):

7:57 PM Changeset in webkit [240540] by Devin Rousso
  • 25 edits
    3 adds in trunk

Web Inspector: provide a way to edit page settings on a remote target
https://bugs.webkit.org/show_bug.cgi?id=193813
<rdar://problem/47359510>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Page.json:

Add overrideSetting command with supporting Setting enum type.

Source/WebCore:

Test: inspector/page/overrideSetting.html

  • page/Settings.yaml:
  • Scripts/GenerateSettings.rb:
  • Scripts/SettingsTemplates/Settings.cpp.erb:
  • Scripts/SettingsTemplates/Settings.h.erb:

Add support for an inspectorOverride boolean value for each setting that will take
precedence over the actual Setting's value when set.

  • inspector/agents/InspectorPageAgent.h:
  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideSetting): Added.

  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::isRemote const): Added.

  • inspector/InspectorFrontendClient.h:

(WebCore::InspectorFrontendClient::isRemote const): Added.

  • inspector/InspectorFrontendClientLocal.h:

(WebCore::InspectorFrontendClientLocal::isRemote const): Added.

Source/WebInspectorUI:

Add toolbar button that shows a popover with the target's (page's) settings when clicked.

  • UserInterface/Base/Main.js:

(WI.loaded):
(WI.contentLoaded):
(WI.initializeTarget): Added.
(WI._handleDeviceSettingsToolbarButtonClicked): Added.
(WI.didDismissPopover): Added.

  • UserInterface/Views/Main.css:

(.device-settings-content): Added.
(.device-settings-content .columns): Added.
(.device-settings-content .columns > .column): Added.
(.device-settings-content .columns > .column + .column): Added.
(body[dir=ltr] .device-settings-content label > input): Added.
(body[dir=rtl] .device-settings-content label > input): Added.

  • UserInterface/Views/Popover.js:

(WI.Popover.prototype._update.area):
(WI.Popover.prototype._update):
(WI.Popover.prototype._drawBackground):
(WI.Popover.prototype._bestMetricsForEdge):
(WI.Popover.prototype._drawFrame):
If the best area is negative, treat it as the worst area.
Allow areas to be clamped so long as the clamped edge is not the preferred edge.

  • UserInterface/Base/Test.js:

(WI.initializeTarget): Added.

  • UserInterface/Images/Device.svg: Added.
  • Localizations/en.lproj/localizedStrings.js:

Source/WebKit:

  • WebProcess/WebPage/WebInspectorUI.h:

(WebKit::WebInspectorUI::isRemote() const): Added.

  • WebProcess/WebPage/RemoteWebInspectorUI.h:

(WebKit::RemoteWebInspectorUI::isRemote() const): Added.

LayoutTests:

  • inspector/page/overrideSetting.html: Added.
  • inspector/page/overrideSetting-expected.txt: Added.
7:38 PM Changeset in webkit [240539] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Document::updateMainArticleElementAfterLayout() should be a no-op when no client depends on knowing the main article element
https://bugs.webkit.org/show_bug.cgi?id=193843

Reviewed by Zalan Bujtas.

  • dom/Document.cpp:

(WebCore::Document::updateMainArticleElementAfterLayout):

This function currently does a bit of wasted work after every layout, on clients that don't listen to the
"significant rendered text" layout milestone and therefore don't need to guess the main article element. Simply
don't bother keeping the main article element up to date in this scenario by bailing from
FrameView::updateHasReachedSignificantRenderedTextThreshold if the client doesn't care about the significant
rendered text milestone.

  • page/FrameView.cpp:

(WebCore::FrameView::updateHasReachedSignificantRenderedTextThreshold):

7:24 PM Changeset in webkit [240538] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: unable to import audits
https://bugs.webkit.org/show_bug.cgi?id=193861

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype.async processJSON):

5:46 PM Changeset in webkit [240537] by jer.noble@apple.com
  • 4 edits
    2 adds in trunk

<video> elements not in the DOM should be allowed to AirPlay
https://bugs.webkit.org/show_bug.cgi?id=193837
Source/WebCore:

<rdar://42559491>

Reviewed by Eric Carlson.

Test: media/airplay-allows-buffering.html

Some websites will switch between <video> elements backed by MSE to one backed by
a media file in order to implement an AirPlay control. But when a <video> element is
removed from the DOM and paused, further buffering is blocked. For some ports (namely
Cocoa ones), this keeps AirPlay from engaging. Relax this buffering restriction for
elements who have been asked to play wirelessly, but whose wireless playback has not
started yet.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::dataBufferingPermitted const):
(WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):

LayoutTests:

Reviewed by Eric Carlson.

  • media/airplay-allows-buffering-expected.txt: Added.
  • media/airplay-allows-buffering.html: Added.
  • platform/ios/TestExpectations:
5:40 PM Changeset in webkit [240536] by Simon Fraser
  • 3 edits
    1 copy in trunk/LayoutTests

Fix failing scrollingcoordinator/scrolling-tree/remove-scrolling-role.html

Test needed different macOS and iOS results. Added window.internals.settings.setAsyncOverflowScrollingEnabled(true)
so the test uses async overflow scrolling in the macOS result.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/remove-scrolling-role-expected.txt: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/remove-scrolling-role-expected.txt.
  • scrollingcoordinator/scrolling-tree/remove-scrolling-role-expected.txt:
  • scrollingcoordinator/scrolling-tree/remove-scrolling-role.html:
5:40 PM Changeset in webkit [240535] by Simon Fraser
  • 1 edit
    4 adds in trunk/LayoutTests

Add a scrolling tree test that toggles scrollability on an intermediate iframe
https://bugs.webkit.org/show_bug.cgi?id=193849

Reviewed by Dean Jackson.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/resources/scroll-toggling-frame.html: Added.
  • scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling.html: Added.
5:06 PM Changeset in webkit [240534] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: No node with given id found
https://bugs.webkit.org/show_bug.cgi?id=193833

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.layout):
(WI.CanvasContentView.prototype._refreshPixelSize):
Drive-by: show the refresh button when viewing a specific canvas.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView.prototype._removeCanvas):
Reset to the overview if the canvas is removed.

5:00 PM Changeset in webkit [240533] by dino@apple.com
  • 5 edits in trunk

REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL
https://bugs.webkit.org/show_bug.cgi?id=193831
<rdar://problem/47399263>

Reviewed by Chris Dumez.

Source/WebKit:

A System Preview (<a rel="ar">) displays in a modal and doesn't trigger
a navigation. If the link was cross origin, it was causing a process swap,
which meant that the response defaulted back to a navigation.

The fix is to not cause a PSON when the navigation is a system preview.

  • UIProcess/API/APINavigation.h:

(API::Navigation::shouldForceDownload const): This is now just tracking
the "download" attribute, and not including System Preview.
(API::Navigation::isSystemPreview const): New method to check for a
navigation triggered as a System Preview.

  • UIProcess/WebPageProxy.cpp: Move the code from receivedPolicyDecision to

receivedNavigationPolicyDecision, so that downloads and System Previews are
detected before we decide to change process.
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):

Tools:

Two new tests that exercise cross-origin and same-origin System
Previews.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
4:54 PM Changeset in webkit [240532] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Remove expectation for inspector/css/createStyleSheet.html as test appears to be passing.
https://bugs.webkit.org/show_bug.cgi?id=148636

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:44 PM Changeset in webkit [240531] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Find-in-page on nyt.com scrolls around without touching the screen when find holes are visible
https://bugs.webkit.org/show_bug.cgi?id=193853

Reviewed by Simon Fraser.

  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::FindController::updateFindIndicator):
There is no reason to scroll/zoom to the find indicator just because the
holes are up, we should only do it on initial indicator presentation.
This was a mistake in r178755 that was previously never exercised because
isShowingOverlay was always false.

4:44 PM Changeset in webkit [240530] by Chris Dumez
  • 32 edits
    1 copy
    1 add
    3 deletes in trunk

[iOS] Add support for the download attribute
https://bugs.webkit.org/show_bug.cgi?id=167341
<rdar://problem/30296281>

Reviewed by Geoffrey Garen.

Source/WTF:

Turn on HTML download attribute support on iOS.

  • wtf/FeatureDefines.h:

LayoutTests:

Make download attribute layout tests iOS-friendly and unskip them now that they pass.

  • fast/dom/HTMLAnchorElement/anchor-download-unset.html:
  • fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download.html:
  • fast/dom/HTMLAnchorElement/anchor-nodownload-set.html:
  • fast/dom/HTMLAnchorElement/anchor-nodownload.html:
  • http/tests/download/anchor-download-attribute-content-disposition.html:
  • http/tests/download/anchor-download-no-extension.html:
  • http/tests/download/anchor-download-no-value.html:
  • http/tests/download/anchor-download-redirect.html:
  • http/tests/download/area-download.html:
  • http/tests/download/convert-cached-load-to-download.html:
  • http/tests/security/anchor-download-allow-blob.html:
  • http/tests/security/anchor-download-allow-data.html:
  • http/tests/security/anchor-download-allow-sameorigin.html:
  • http/tests/security/anchor-download-block-crossorigin-expected.txt:
  • http/tests/security/anchor-download-block-crossorigin.html:
  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt: Copied from LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt.
4:18 PM Changeset in webkit [240529] by Alan Coon
  • 4 edits in tags/Safari-608.1.2.1/Source

Cherry-pick r240461. rdar://problem/47518428

[iOS] Silence MediaPlayer compile warnings
https://bugs.webkit.org/show_bug.cgi?id=193780
<rdar://problem/47518428>

Reviewed by Jer Noble.

Source/WebCore/PAL:

  • pal/spi/ios/MediaPlayerSPI.h:

Source/WebKit:

  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240461 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:09 PM Changeset in webkit [240528] by Alan Coon
  • 7 edits in tags/Safari-608.1.2.1/Source

Versioning.

4:05 PM Changeset in webkit [240527] by Alan Coon
  • 1 copy in tags/Safari-608.1.2.1

New tag.

4:02 PM Changeset in webkit [240526] by mark.lam@apple.com
  • 4 edits in branches/safari-607-branch

Cherry-pick r240335. rdar://problem/47494779

2019-01-23 David Kilzer <ddkilzer@apple.com>

[JSC] Duplicate global variables: JSC::opcodeLengths
<https://webkit.org/b/193714>
<rdar://problem/47340200>

Reviewed by Mark Lam.

  • bytecode/Opcode.cpp: (JSC::opcodeLengths): Move array implementation here and mark const.
  • bytecode/Opcode.h: (JSC::opcodeLengths): Change to extern declaration.
3:52 PM Changeset in webkit [240525] by Keith Rollin
  • 9 edits
    5 adds in trunk

Update Xcode projects with "Check .xcfilelists" build phase
https://bugs.webkit.org/show_bug.cgi?id=193790
<rdar://problem/47201374>

Reviewed by Alex Christensen.

Support for XCBuild includes specifying inputs and outputs to various
Run Script build phases. These inputs and outputs are specified as
.xcfilelist files. Once created, these .xcfilelist files need to be
kept up-to-date. In order to check that they are up-to-date or not,
add an Xcode build step that invokes an external script that performs
the checking. If the .xcfilelists are found to be out-of-date, update
them, halt the build, and instruct the developer to restart the build
with up-to-date files.

At this time, the checking and regenerating is performed only if the
WK_ENABLE_CHECK_XCFILELISTS environment variable is set to 1. People
who want to use this facility can set this variable and test out the
checking/regenerating. Once it seems like there are no egregious
issues that upset a developer's workflow, we'll unconditionally enable
this facility.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/check-xcfilelists.sh: Added.

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • Scripts/check-xcfilelists.sh: Added.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • Scripts/check-xcfilelists.sh: Added.
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/Scripts/check-xcfilelists.sh: Added.
  • WebKitTestRunner/Scripts/check-xcfilelists.sh: Added.
  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3:49 PM Changeset in webkit [240524] by mark.lam@apple.com
  • 4 edits
    1 copy in branches/safari-607-branch

Cherry-pick r240329. rdar://problem/47458354

This is for a follow up fix that was missed in the cherry-pick for rdar://problem/47458354.

2019-01-22 Yusuke Suzuki <ysuzuki@apple.com>

Unreviewed, fix initial global lexical binding epoch
https://bugs.webkit.org/show_bug.cgi?id=193603
<rdar://problem/47380869>

JSTests:

  • stress/global-lexical-binding-epoch-should-be-correct-one.js: Added. (f1.f2.f3.f4): (f1.f2.f3): (f1.f2): (f1):

Source/JavaScriptCore:

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation):
3:48 PM Changeset in webkit [240523] by Alan Coon
  • 1 copy in tags/Safari-607.1.28

Tag Safari-607.1.28.

3:45 PM Changeset in webkit [240522] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Web Inspector: Exclude Debugger Threads from CPU Usage values in Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=193796
<rdar://problem/47532910>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-25
Reviewed by Devin Rousso.

Source/JavaScriptCore:

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::machThread):

  • runtime/SamplingProfiler.h:

Expose the mach_port_t of the SamplingProfiler thread
so it can be tested against later.

Source/WebCore:

  • page/ResourceUsageData.h:
  • inspector/agents/InspectorCPUProfilerAgent.cpp:

(WebCore::InspectorCPUProfilerAgent::collectSample):
Show the CPU usage without debugger threads in the Web Inspector's timeline.

  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::ResourceUsageThread::platformSaveStateBeforeStarting):
For OS(DARWIN) ports, when starting to observe resource usage,
we grab the mach_port_t of SamplingProfiler on the main thread
in a thread safe way. For our purposes (Web Inspector timelines),
this will be good enough to identify the SamplingProfiler thread
during timeline recording. The SamplingProfiler thread won't change
during a timeline recording and recording start/stops will never
miss the SamplingProfiler changing.

(WebCore::filterThreads):
(WebCore::threadSendRights):
(WebCore::threadSendRightsExcludingDebuggerThreads):
(WebCore::cpuUsage):
(WebCore::ResourceUsageThread::platformCollectCPUData):
Calculate CPU usage twice, the second time excluding some threads.

  • page/linux/ResourceUsageThreadLinux.cpp:

(WebCore::ResourceUsageThread::platformSaveStateBeforeStarting):
(WebCore::ResourceUsageThread::platformCollectCPUData):
Stubs for linux ports.

3:44 PM Changeset in webkit [240521] by achristensen@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix Windows build after r240511

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):

3:41 PM Changeset in webkit [240520] by achristensen@apple.com
  • 6 edits in trunk/Source

Move logic from ChildProcess::setApplicationIsDaemon to NetworkProcess::initializeProcess
https://bugs.webkit.org/show_bug.cgi?id=193844

Reviewed by Andy Estes.

Source/WebCore/PAL:

  • pal/spi/mac/HIServicesSPI.h:

Source/WebKit:

This simplifies ChildProcess and removes NetworkProcess-specific code from this generic abstraction.

  • NetworkProcess/mac/NetworkProcessMac.mm:

(WebKit::NetworkProcess::initializeProcess):

  • Shared/ios/ChildProcessIOS.mm:

(WebKit::ChildProcess::setApplicationIsDaemon): Deleted.

  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::setApplicationIsDaemon): Deleted.

3:40 PM Changeset in webkit [240519] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Remove FrameView::m_significantRenderedTextMilestonePending
https://bugs.webkit.org/show_bug.cgi?id=193842

Reviewed by Wenson Hsieh.

Currently we keep processing the incoming text content until after the "SignificantRenderedTextMilestone" has been reached.
We can actually stop doing it right when the text content is above the threshold (regardless of whether all the conditions are met for the milestone).
This patch also ensures that we don't update Document::m_mainArticleElement once the threshold is reached.

  • page/FrameView.cpp:

(WebCore::FrameView::resetLayoutMilestones):
(WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
(WebCore::FrameView::hasReachedSignificantRenderedTextThreashold):
(WebCore::FrameView::qualifiesAsSignificantRenderedText const):
(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
(WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded): Deleted.

  • page/FrameView.h:
3:31 PM Changeset in webkit [240518] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebInspectorUI

Web Inspector: Improve Dark Mode appearance within Memory timeline
https://bugs.webkit.org/show_bug.cgi?id=193804

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-25
Reviewed by Matt Baker.

  • UserInterface/Views/TimelineOverview.css:

(.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
(.timeline-overview > .tree-outline.timelines .item.selected + .item,):
(@media (prefers-color-scheme: dark)):
(.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
(body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
Fix some colors for Timelines edit mode.

  • UserInterface/Views/CPUTimelineOverviewGraph.css:

(.timeline-overview-graph.cpu:nth-child(even) > .legend):
(@media (prefers-color-scheme: dark)):
(.timeline-overview-graph.cpu > .legend):
(.timeline-overview-graph:nth-child(even) > .legend): Deleted.

  • UserInterface/Views/MemoryTimelineOverviewGraph.css:

(.timeline-overview-graph.memory:nth-child(even) > .legend):
(@media (prefers-color-scheme: dark)):
(.timeline-overview-graph.memory > .legend):
(.timeline-overview-graph:nth-child(even) > .legend): Deleted.
Improved colors in CPU / Memory overview graph legends.

  • UserInterface/Views/CPUUsageView.css:

(.cpu-usage-view > .details):

  • UserInterface/Views/CircleChart.css:

(.circle-chart > svg > path.background):

  • UserInterface/Views/MemoryCategoryView.css:

(.memory-category-view > .details):
(.memory-category-view > .details > .name):

  • UserInterface/Views/MemoryTimelineView.css:

(.timeline-view.memory > .content > .overview .total-usage,):
(.timeline-view.memory .legend > .row > .size):
Improved colors in CPU / Memory detail views.

  • UserInterface/Views/Variables.css:

(:root):
Add a default --text-secondary-color which will end up slightly
lighter in dark mode where it was already implemented.

(@media (prefers-color-scheme: dark)):
Improved max-comparison colors.

3:19 PM Changeset in webkit [240517] by Keith Rollin
  • 9 edits in trunk

Update Xcode projects with "Apply Configuration to XCFileLists" build target
https://bugs.webkit.org/show_bug.cgi?id=193781
<rdar://problem/47201153>

Reviewed by Alex Christensen.

Part of generating the .xcfilelists used as part of adopting XCBuild
includes running make DerivedSources.make from a standalone script.
It’s important for this invocation to have the same environment as
when the actual build invokes make DerivedSources.make. If the
environments are different, then the two invocations will provide
different results. In order to get the same environment in the
standalone script, have the script launch xcodebuild targeting the
"Apply Configuration to XCFileLists" build target, which will then
re-invoke our standalone script. The script is now running again, this
time in an environment with all workspace, project, target, xcconfig
and other environment variables established.

The "Apply Configuration to XCFileLists" build target accomplishes
this task via a small embedded shell script that consists only of:

eval "${WK_SUBLAUNCH_SCRIPT_PARAMETERS[@]}"

The process that invokes "Apply Configuration to XCFileLists" first
sets WK_SUBLAUNCH_SCRIPT_PARAMETERS to an array of commands to be
evaluated and exports it into the shell environment. When xcodebuild
is invoked, it inherits the value of this variable and can eval the
contents of that variable. Our external standalone script can then set
WK_SUBLAUNCH_SCRIPT_PARAMETERS to the path to itself, along with a set
of command-line parameters needed to restart itself in the appropriate
state.

Source/JavaScriptCore:

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3:16 PM Changeset in webkit [240516] by achristensen@apple.com
  • 8 edits in trunk

Add SPI to inform an application that "Go Back" has been clicked from a safe browsing warning
https://bugs.webkit.org/show_bug.cgi?id=193802
<rdar://problem/46010580>

Reviewed by Andy Estes.

Source/WebKit:

  • UIProcess/API/APIUIClient.h:

(API::UIClient::didClickGoBackFromSafeBrowsingWarning):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didClickGoBackFromSafeBrowsingWarning):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(-[SafeBrowsingNavigationDelegate _webViewDidClickGoBackFromSafeBrowsingWarning:]):
(TEST):

3:16 PM Changeset in webkit [240515] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ iOS Simulator Release ] Layout Test fast/animation/request-animation-frame.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=190888

Unreviewed test gardening.

Patch by Shawn Roberts <Shawn Roberts> on 2019-01-25

  • platform/ios-wk2/TestExpectations:
3:12 PM Changeset in webkit [240514] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

[iOS] Pressing Tab key doesn't move to next cell with Google Sheets
https://bugs.webkit.org/show_bug.cgi?id=193048
<rdar://problem/46433836>

Reviewed by Brent Fulgham.

WebCore knows how interpret the Tab and Shift + Tab keys. When building with UIKit keyboard additions
we do not need to register key commands for handling them from the UIProcess code. Instead UIKit will
sends key events for these commands to us. This will make the behavior of these key commands when executed
in an editable field match the behavior of these command when executed in a non-editable field since
both code paths will now go through WebCore.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView keyCommands]): Only compile when building with !USE(UIKIT_KEYBOARD_ADDITIONS).

2:57 PM Changeset in webkit [240513] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix Linux build.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate):

2:35 PM Changeset in webkit [240512] by dbates@webkit.org
  • 8 edits in trunk

[iOS] uiController.keyDown() does not translate Control modified key
https://bugs.webkit.org/show_bug.cgi?id=192898

Reviewed by Wenson Hsieh.

Tools:

Implement uiController.keyDown() in terms of HIDEventGenerator so that UIKit performs
key translation, as applicable. Among other cases, key translation occurs when performing
a Control key modified key sequence. Writing uiController.keyDown() in terms of HIDEventGenerator
also makes the behavior of uiController.keyDown() more closely match the behavior of a
human pressing down and releasing key(s) using a hardware keyboard.

  • WebKitTestRunner/ios/HIDEventGenerator.h:
  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator sendMarkerHIDEventWithCompletionBlock:]): Renamed; formerly named _sendMarkerHIDEventWithCompletionBlock.

(-[HIDEventGenerator touchDown:touchCount:completionBlock:]):
(-[HIDEventGenerator liftUp:touchCount:completionBlock:]):
(-[HIDEventGenerator stylusDownAtPoint:azimuthAngle:altitudeAngle:pressure:completionBlock:]):
(-[HIDEventGenerator stylusMoveToPoint:azimuthAngle:altitudeAngle:pressure:completionBlock:]):
(-[HIDEventGenerator stylusUpAtPoint:completionBlock:]):
(-[HIDEventGenerator stylusTapAtPoint:azimuthAngle:altitudeAngle:pressure:completionBlock:]):
(-[HIDEventGenerator sendTaps:location:withNumberOfTouches:completionBlock:]):
(-[HIDEventGenerator longPress:completionBlock:]):
(-[HIDEventGenerator dragWithStartPoint:endPoint:duration:completionBlock:]):
Update code for above renaming.

(hidUsageCodeForCharacter): Translate \b to a backspace and teach this function to recognize the
DumpRenderTree EventSender-compatible modifier key names (e.g. "metaKey").

(-[HIDEventGenerator keyDown:]): Added.
(-[HIDEventGenerator keyUp:]): Added.
(-[HIDEventGenerator keyPress:completionBlock:]):
(-[HIDEventGenerator eventDispatchThreadEntry:]):
(-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]): Deleted; renamed to sendMarkerHIDEventWithCompletionBlock.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::parseModifierArray): Modified to return a vector of strings that represent the modifier keys to press.
(WTR::UIScriptController::keyDown): Write in terms of HIDEventGenerator.
(WTR::parseModifier): Deleted.

LayoutTests:

Make tests more robusts.

  • fast/events/ios/key-command-italic-dispatches-keydown.html: Remove the need to special-case the test runner and

expect a single key event that represents Command + I. Now that uiController.keyDown() makes use of HIDEventGenerator
we emit separate key events for each key pressed in the sequence: keydown Command, keydown i, keyup i, keyup Command.
This matches how a human being would execute such a key sequence.

  • fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible-expected.html:

Make the test less flaky by hiding the tap highlight. Depending on timing, the tap highlight may be snapshotted and thus
cause the reference test to mismatch the test. Mitigate this by hiding the tap highlight.

  • fast/text/scroll-text-overflow-ellipsis.html: Wait for a keyup event for the down arrow before declaring the

test complete.

2:31 PM Changeset in webkit [240511] by Tadeu Zagallo
  • 21 edits
    2 copies in trunk/Source/JavaScriptCore

Add API to generate and consume cached bytecode
https://bugs.webkit.org/show_bug.cgi?id=193401
<rdar://problem/47514099>

Reviewed by Keith Miller.

Add the generateBytecode and generateModuleBytecode functions to
generate serialized bytecode for a given SourceCode. These functions
will eagerly generate code for all the nested functions.

Additionally, update the API methods in JSScript to generate and use the
bytecode when the bytecodeCache path is provided.

  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • API/JSContext.mm:

(-[JSContext wrapperMap]):

  • API/JSContextInternal.h:
  • API/JSScript.mm:

(+[JSScript scriptWithSource:inVirtualMachine:]):
(+[JSScript scriptFromASCIIFile:inVirtualMachine:withCodeSigning:andBytecodeCache:]):
(-[JSScript dealloc]):
(-[JSScript readCache]):
(-[JSScript writeCache]):
(-[JSScript hash]):
(-[JSScript source]):
(-[JSScript cachedBytecode]):
(-[JSScript jsSourceCode:]):

  • API/JSScriptInternal.h:
  • API/JSScriptSourceProvider.h: Copied from Source/JavaScriptCore/API/JSScriptInternal.h.

(JSScriptSourceProvider::create):
(JSScriptSourceProvider::JSScriptSourceProvider):

  • API/JSScriptSourceProvider.mm: Copied from Source/JavaScriptCore/API/JSScriptInternal.h.

(JSScriptSourceProvider::hash const):
(JSScriptSourceProvider::source const):
(JSScriptSourceProvider::cachedBytecode const):

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine vm]):

  • API/JSVirtualMachineInternal.h:
  • API/tests/testapi.mm:

(testBytecodeCache):
(-[JSContextFileLoaderDelegate context:fetchModuleForIdentifier:withResolveHandler:andRejectHandler:]):
(testObjectiveCAPI):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • SourcesCocoa.txt:
  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):

  • bytecode/UnlinkedFunctionExecutable.h:
  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::source const):

  • parser/SourceProvider.h:

(JSC::CachedBytecode::CachedBytecode):
(JSC::CachedBytecode::operator=):
(JSC::CachedBytecode::data const):
(JSC::CachedBytecode::size const):
(JSC::CachedBytecode::owned const):
(JSC::CachedBytecode::~CachedBytecode):
(JSC::CachedBytecode::freeDataIfOwned):
(JSC::SourceProvider::cachedBytecode const):

  • parser/UnlinkedSourceCode.h:

(JSC::UnlinkedSourceCode::provider const):

  • runtime/CodeCache.cpp:

(JSC::generateUnlinkedCodeBlockForFunctions):
(JSC::writeCodeBlock):
(JSC::serializeBytecode):

  • runtime/CodeCache.h:

(JSC::CodeCacheMap::fetchFromDiskImpl):
(JSC::CodeCacheMap::findCacheAndUpdateAge):
(JSC::generateUnlinkedCodeBlockImpl):
(JSC::generateUnlinkedCodeBlock):

  • runtime/Completion.cpp:

(JSC::generateBytecode):
(JSC::generateModuleBytecode):

  • runtime/Completion.h:
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

2:23 PM Changeset in webkit [240510] by Keith Rollin
  • 2 edits in trunk/Tools

Complete the implementation of generate-xcfilelists
https://bugs.webkit.org/show_bug.cgi?id=193782

Reviewed by Alex Christensen.

A preliminary version of generate-xcfilelists was added in r238008.
This patch updates that script in order to:

  • Support checking of .xcfilelists
  • Perform better execution of make DerivedSources.make by relaunching generate-xcfilelists under xcodebuild
  • Support incremental generation and checking of .xcfilelists
  • Support supplementary .xcfilelists files from WebKitAdditions
  • Support being wrapped by parallel version of generate-xcfilelists in Internal that adds support for (re)generating WebKit projects in that repo.
  • Support builds that have been performed in WebKitBuild as well as ~/Library/Developer/code/DerivedData
  • Increase robustness and debugging facilities.
  • Scripts/generate-xcfilelists:
2:21 PM Changeset in webkit [240509] by Brent Fulgham
  • 2 edits in trunk/Tools

Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297
<rdar://problem/47158841>

Unreviewed test case fix.

These test cases require ResourceLoadStatistics to be active, so the feature must be turned on.
Previously, the default data store turned the feature on automatically, allowing these tests to pass.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

2:19 PM Changeset in webkit [240508] by Keith Rollin
  • 14 edits in trunk/Source

Update WebKitAdditions.xcconfig with correct order of variable definitions
https://bugs.webkit.org/show_bug.cgi?id=193793
<rdar://problem/47532439>

Reviewed by Alex Christensen.

XCBuild changes the way xcconfig variables are evaluated. In short,
all config file assignments are now considered in part of the
evaluation. When using the new build system and an .xcconfig file
contains multiple assignments of the same build setting:

  • Later assignments using $(inherited) will inherit from earlier assignments in the xcconfig file.
  • Later assignments not using $(inherited) will take precedence over earlier assignments. An assignment to a more general setting will mask an earlier assignment to a less general setting. For example, an assignment without a condition ('FOO = bar') will completely mask an earlier assignment with a condition ('FOO[sdk=macos*] = quux').

This affects some of our .xcconfig files, in that sometimes platform-
or sdk-specific definitions appear before the general definitions.
Under the new evaluations rules, the general definitions alway take
effect because they always overwrite the more-specific definitions. The
solution is to swap the order, so that the general definitions are
established first, and then conditionally overwritten by the
more-specific definitions.

Source/JavaScriptCore:

  • Configurations/Version.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/Version.xcconfig:

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • Configurations/Base.xcconfig:
  • Configurations/Version.xcconfig:

Source/WebKit:

  • Configurations/BaseTarget.xcconfig:
  • Configurations/Version.xcconfig:
  • Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/Version.xcconfig:
  • Configurations/WebKitLegacy.xcconfig:
2:16 PM Changeset in webkit [240507] by Keith Rollin
  • 20 edits in trunk

Update existing .xcfilelists
https://bugs.webkit.org/show_bug.cgi?id=193791
<rdar://problem/47201706>

Reviewed by Alex Christensen.

Many .xcfilelist files were added in r238824 in order to support
XCBuild. Update these with recent changes to the set of build files
and with the current generate-xcfilelist script.

Source/JavaScriptCore:

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • UnifiedSources-input.xcfilelist:
  • UnifiedSources-output.xcfilelist:

Source/WebCore:

No new tests since there should be no observable behavior difference.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • UnifiedSources-input.xcfilelist:
  • UnifiedSources-output.xcfilelist:

Source/WebKit:

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • UnifiedSources-input.xcfilelist:
  • UnifiedSources-output.xcfilelist:

Tools:

  • DumpRenderTree/DerivedSources-input.xcfilelist:
  • DumpRenderTree/DerivedSources-output.xcfilelist:
  • WebKitTestRunner/DerivedSources-input.xcfilelist:
  • WebKitTestRunner/DerivedSources-output.xcfilelist:
2:05 PM Changeset in webkit [240506] by Devin Rousso
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
https://bugs.webkit.org/show_bug.cgi?id=193186
<rdar://problem/45100694>

Reviewed by Joseph Pecoraro.

Shift around z-index values to make Timelines markers appear behind record bars. Widen the
marker hit region to make it easier to see the tooltip.

  • UserInterface/Views/Variables.css:

(:root):

  • UserInterface/Views/TimelineRuler.css:

(.timeline-ruler):
(.timeline-ruler > .markers):
(.timeline-ruler > .markers > .marker):
(body[dir=ltr] .timeline-ruler > .markers > .marker):
(body[dir=rtl] .timeline-ruler > .markers > .marker):
(.timeline-ruler > .markers > .marker::before):
(body[dir=ltr] .timeline-ruler > .markers > .marker::before):
(body[dir=rtl] .timeline-ruler > .markers > .marker::before):
(.timeline-ruler > .markers > .marker::after): Added.
(body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
(body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
(.timeline-ruler > .markers > .marker.current-time):
(.timeline-ruler > .markers > .marker.current-time::after): Added.
(.timeline-ruler > .markers > .marker.load-event):
(.timeline-ruler > .markers > .marker.dom-content-event):
(.timeline-ruler > .markers > .marker.timestamp):
(.timeline-ruler > .selection-handle):
(.timeline-ruler.both-handles-clamped > .selection-handle):
(.timeline-ruler > .shaded-area):
(.timeline-ruler > .markers > .marker.current-time::before): Deleted.

  • UserInterface/Views/TimelineRecordBar.css:

(.timeline-record-bar):
(.timeline-record-bar > .segment):

  • UserInterface/Views/CPUTimelineOverviewGraph.css:

(.timeline-overview-graph.cpu > .legend):

  • UserInterface/Views/MemoryTimelineOverviewGraph.css:

(.timeline-overview-graph.memory > .legend):

1:56 PM Changeset in webkit [240505] by Simon Fraser
  • 3 edits
    1 copy
    17 moves
    4 adds
    2 deletes in trunk/LayoutTests

Move more scrolling tree tests into scrollingcoordinator/scrolling-tree
https://bugs.webkit.org/show_bug.cgi?id=193845

Reviewed by Tim Horton.

Gather more tests of the scrolling tree into scrollingcoordinator/scrolling-tree.

  • platform/gtk/TestExpectations:
  • platform/ios-wk1/fast/scrolling/scrolling-tree-includes-frame-expected.txt: Removed.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/remove-coordinated-frame-expected.txt: Renamed from LayoutTests/platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt: Renamed from LayoutTests/platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt.
  • platform/mac-wk1/fast/scrolling/scrolling-tree-includes-frame-expected.txt: Removed.
  • platform/win/TestExpectations:
  • scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt.
  • scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt.
  • scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html.
  • scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt.
  • scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html.
  • scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt.
  • scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html.
  • scrollingcoordinator/scrolling-tree/coordinated-frame.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame.html.
  • scrollingcoordinator/scrolling-tree/remove-coordinated-frame-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt.
  • scrollingcoordinator/scrolling-tree/remove-coordinated-frame.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/remove-coordinated-frame.html.
  • scrollingcoordinator/scrolling-tree/remove-scrolling-role-expected.txt: Renamed from LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt.
  • scrollingcoordinator/scrolling-tree/remove-scrolling-role.html: Renamed from LayoutTests/fast/scrolling/ios/remove-scrolling-role.html.
  • scrollingcoordinator/scrolling-tree/resources/doc-with-sticky.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/resources/doc-with-sticky.html.
  • scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt: Renamed from LayoutTests/fast/scrolling/scrolling-tree-includes-frame-expected.txt.
  • scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame.html: Renamed from LayoutTests/fast/scrolling/scrolling-tree-includes-frame.html.
1:56 PM Changeset in webkit [240504] by Simon Fraser
  • 1 edit
    12 moves
    2 adds in trunk/LayoutTests

Move tests for scrolling tree mutations into their own directory
https://bugs.webkit.org/show_bug.cgi?id=193836

Reviewed by Tim Horton.

Add a scrollingcoordinator/scrolling-tree directory, which will contain tests for scrolling
tree mutations.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/gain-scrolling-node-parent-expected.txt: Renamed from LayoutTests/platform/ios/scrollingcoordinator/gain-scrolling-node-parent-expected.txt.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/lose-scrolling-node-parent-expected.txt: Renamed from LayoutTests/platform/ios/scrollingcoordinator/lose-scrolling-node-parent-expected.txt.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/reparent-across-compositing-layers-expected.txt: Renamed from LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-across-compositing-layers-expected.txt.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/reparent-with-layer-removal-expected.txt: Renamed from LayoutTests/platform/ios-wk2/scrollingcoordinator/reparent-with-layer-removal-expected.txt.
  • scrollingcoordinator/scrolling-tree/gain-scrolling-node-parent-expected.txt: Renamed from LayoutTests/scrollingcoordinator/gain-scrolling-node-parent-expected.txt.
  • scrollingcoordinator/scrolling-tree/gain-scrolling-node-parent.html: Renamed from LayoutTests/scrollingcoordinator/gain-scrolling-node-parent.html.
  • scrollingcoordinator/scrolling-tree/lose-scrolling-node-parent-expected.txt: Renamed from LayoutTests/scrollingcoordinator/lose-scrolling-node-parent-expected.txt.
  • scrollingcoordinator/scrolling-tree/lose-scrolling-node-parent.html: Renamed from LayoutTests/scrollingcoordinator/lose-scrolling-node-parent.html.
  • scrollingcoordinator/scrolling-tree/reparent-across-compositing-layers-expected.txt: Renamed from LayoutTests/scrollingcoordinator/reparent-across-compositing-layers-expected.txt.
  • scrollingcoordinator/scrolling-tree/reparent-across-compositing-layers.html: Renamed from LayoutTests/scrollingcoordinator/reparent-across-compositing-layers.html.
  • scrollingcoordinator/scrolling-tree/reparent-with-layer-removal-expected.txt: Renamed from LayoutTests/scrollingcoordinator/reparent-with-layer-removal-expected.txt.
  • scrollingcoordinator/scrolling-tree/reparent-with-layer-removal.html: Renamed from LayoutTests/scrollingcoordinator/reparent-with-layer-removal.html.
1:51 PM Changeset in webkit [240503] by Keith Rollin
  • 2 edits in trunk/Tools

Fix missing dependencies in extract-dependencies-from-makefile
https://bugs.webkit.org/show_bug.cgi?id=193783
<rdar://problem/47201571>

Reviewed by Alex Christensen.

The extract-dependencies-from-makefile script generates .xcfilelists
for XCBuild by invoking a makefile in --debug mode, parsing the
dependency information in the output, and extracting information
regarding targets and dependents. However, the way make emits this
dependency information is not rigorous, and so we need to determine
what lines to look for and parse by trial and error. This approach
didn't coriginally atch all the information we needed to collect, so
update the script to look for the additional lines we now know to look
for.

  • Scripts/extract-dependencies-from-makefile:

(Parser):
(Parser.addTarget):
(Parser.addPrereq):
(Parser.doParse):

1:49 PM Changeset in webkit [240502] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: remove experimental setting
https://bugs.webkit.org/show_bug.cgi?id=193743
<rdar://problem/28234022>

Reviewed by Joseph Pecoraro.

  • UserInterface/Base/Setting.js:

(WI.Setting):
(WI.Setting.localStorageKey): Added.
(WI.Setting.migrateValue):
Drive-by: add the localStorage key prefix to the key passed into WI.Setting.migrateValue.

  • UserInterface/Base/Main.js:

(WI.loaded):

  • UserInterface/Views/AuditTabContentView.js:

(WI.AuditTabContentView.isTabAllowed):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

  • Localizations/en.lproj/localizedStrings.js:
1:43 PM Changeset in webkit [240501] by mark.lam@apple.com
  • 10 edits in branches/safari-607-branch

Cherry-pick r239940. rdar://problem/47295340

JSTests:

2019-01-14 Mark Lam <mark.lam@apple.com>

Fix all CLoop JSC test failures (including some LLInt bugs due to recent bytecode format change).
https://bugs.webkit.org/show_bug.cgi?id=193402
<rdar://problem/46012309>

Reviewed by Keith Miller.

  • stress/regexp-compile-oom.js:
  • Skip this test for !$jitTests because it is tuned for stack usage when the JIT is enabled. As a result, it will fail on cloop builds though there is no bug.

Source/JavaScriptCore:

Also picked up a few missing changes in JITPropertyAccess32_64.cpp from the
cherry-pick of r240041.

2019-01-14 Mark Lam <mark.lam@apple.com>

Fix all CLoop JSC test failures (including some LLInt bugs due to recent bytecode format change).
https://bugs.webkit.org/show_bug.cgi?id=193402
<rdar://problem/46012309>

Reviewed by Keith Miller.

The CLoop builds via build-jsc were previously completely disabled after our
change to enable ASM LLInt build without the JIT. As a result, JSC tests have
regressed on CLoop builds. The CLoop builds and tests will be re-enabled when
the fix for https://bugs.webkit.org/show_bug.cgi?id=192955 lands. This patch
fixes all the regressions (and some old bugs) so that the CLoop test bots won't
be red when CLoop build gets re-enabled.

In this patch, we do the following:

  1. Change CLoopStack::grow() to set the new CLoop stack top at the maximum allocated capacity (after discounting the reserved zone) as opposed to setting it only at the level that the client requested.

This fixes a small performance bug that I happened to noticed when I was
debugging a stack issue. It does not affect correctness.

  1. In LowLevelInterpreter32_64.asm:
  1. Fix loadConstantOrVariableTag() to use subi for computing the constant index because the VirtualRegister offset and FirstConstantRegisterIndex values it is operating on are both signed ints. This is just to be pedantic. The previous use of subu will still produce a correct value.
  1. Fix llintOpWithReturn() to use getu (instead of get) for reading OpIsCellWithType::type because it is of type JSType, which is a uint8_t.
  1. Fix llintOpWithMetadata() to use loadis for loading OpGetById::Metadata::modeMetadata.protoLoadMode.cachedOffset[t5] because it is of type PropertyOffset, which is a signed int.
  1. Fix commonCallOp() to use getu for loading fields argv and argc because they are of type unsigned for OpCall, OpConstruct, and OpTailCall, which are the clients of commonCallOp.
  1. Fix llintOpWithMetadata() and getClosureVar() to use loadp for loading OpGetFromScope::Metadata::operand because it is of type uintptr_t.
  1. In LowLevelInterpreter64.asm:
  1. Fix llintOpWithReturn() to use getu for reading OpIsCellWithType::type because it is of type JSType, which is a uint8_t.
  1. Fix llintOpWithMetadata() to use loadi for loading OpGetById::Metadata::modeMetadata.protoLoadMode.structure[t2] because it is of type StructureID, which is a uint32_t.

Fix llintOpWithMetadata() to use loadis for loading
OpGetById::Metadata::modeMetadata.protoLoadMode.cachedOffset[t2] because it
is of type PropertyOffset, which is a signed int.

  1. commonOp() should reload the metadataTable for op_catch because unlike for the ASM LLInt, the exception unwinding code is not able to restore "callee saved registers" for the CLoop interpreter because the CLoop uses pseudo-registers (see the CLoopRegister class).

This was the source of many exotic Cloop failures after the bytecode format
change (which introduced the metadataTable callee saved register). Hence,
we fix it by reloading metadataTable's value on re-entry via op_catch for
exception handling. We already take care of restoring it in op_ret.

  1. Fix llintOpWithMetadata() and getClosureVar() to use loadp for loading OpGetFromScope::Metadata::operand because it is of type uintptr_t.
  1. In LowLevelInterpreter.asm:

Fix metadata() to use loadi for loading metadataTable offsets because they are
of type unsigned. This was also a source of many exotic CLoop test failures.

  1. Change CLoopRegister into a class with a uintptr_t as its storage element. Previously, we were using a union to convert between various value types that we would store in this pseudo-register. This method of type conversion is undefined behavior according to the C++ spec. As a result, the C++ compiler may choose to elide some CLoop statements, thereby resulting in some exotic bugs.

We fix this by now always using accessor methods and assignment operators to
ensure that we use bitwise_cast to do the type conversions. Since bitwise_cast
uses a memcpy, this ensures that there's no undefined behavior, and that CLoop
statements won't get elided willy-nilly by the compiler.

Ditto for the CloopDobleRegisters.

Similarly, use bitwise_cast for ints2Double() and double2Ints() utility
functions.

Also use bitwise_cast (instead of reinterpret_cast) for the CLoop CAST macro.

  1. Fix cloop.rb to use the new CLoopRegister and CLoopDoubleRegister classes.

Add a clLValue accessor for offlineasm operand types to distinguish
LValue use of the operands from RValue uses.

Replace the use of clearHighWord() with simply casting to uint32_t. This is
more efficient for the C++ compiler (and help speed up debug build runs).

Also fix 32-bit arithmetic operations to only set the lower 32-bit value of
the pseudo registers. This fixes some CLoop JSC test failures.

This patch has been manually tested with the JSC tests on the following builds:
64bit X86 ASM LLLint (without JIT), 64bit and 32bit X86 CLoop, and ARMv7 Cloop.

  • interpreter/CLoopStack.cpp: (JSC::CLoopStack::grow):
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp: (JSC::CLoopRegister::i const): (JSC::CLoopRegister::u const): (JSC::CLoopRegister::i32 const): (JSC::CLoopRegister::u32 const): (JSC::CLoopRegister::i8 const): (JSC::CLoopRegister::u8 const): (JSC::CLoopRegister::ip const): (JSC::CLoopRegister::i8p const): (JSC::CLoopRegister::vp const): (JSC::CLoopRegister::cvp const): (JSC::CLoopRegister::callFrame const): (JSC::CLoopRegister::execState const): (JSC::CLoopRegister::instruction const): (JSC::CLoopRegister::vm const): (JSC::CLoopRegister::cell const): (JSC::CLoopRegister::protoCallFrame const): (JSC::CLoopRegister::nativeFunc const): (JSC::CLoopRegister::i64 const): (JSC::CLoopRegister::u64 const): (JSC::CLoopRegister::encodedJSValue const): (JSC::CLoopRegister::opcode const): (JSC::CLoopRegister::operator ExecState*): (JSC::CLoopRegister::operator const Instruction*): (JSC::CLoopRegister::operator JSCell*): (JSC::CLoopRegister::operator ProtoCallFrame*): (JSC::CLoopRegister::operator Register*): (JSC::CLoopRegister::operator VM*): (JSC::CLoopRegister::operator=): (JSC::CLoopRegister::bitsAsDouble const): (JSC::CLoopRegister::bitsAsInt64 const): (JSC::CLoopDoubleRegister::operator T const): (JSC::CLoopDoubleRegister::d const): (JSC::CLoopDoubleRegister::bitsAsInt64 const): (JSC::CLoopDoubleRegister::operator=): (JSC::LLInt::ints2Double): (JSC::LLInt::double2Ints): (JSC::LLInt::decodeResult): (JSC::CLoop::execute): (JSC::LLInt::Ints2Double): Deleted. (JSC::LLInt::Double2Ints): Deleted. (JSC::CLoopRegister::CLoopRegister): Deleted. (JSC::CLoopRegister::clearHighWord): Deleted.
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/cloop.rb:
1:40 PM Changeset in webkit [240500] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Deny mach lookups to services not used.
https://bugs.webkit.org/show_bug.cgi?id=193828

Reviewed by Brent Fulgham.

Start denying mach lookups to iOS services, which were previously allowed with reporting.
Living-on has indicated that these services are not used.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1:35 PM Changeset in webkit [240499] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: show uncaught exception view for unhandled promise rejections
https://bugs.webkit.org/show_bug.cgi?id=193832

Reviewed by Matt Baker.

  • UserInterface/Debug/UncaughtExceptionReporter.js:

(handleUnhandledPromiseRejection): Added.

12:52 PM Changeset in webkit [240498] by Brent Fulgham
  • 25 edits in trunk

Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297
<rdar://problem/47158841>

Reviewed by Alex Christensen.

Source/WebCore:

Trigger logging to the UIProcess when the ResourceLoadObserver is used in the NetworkProcess.

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Notify NetworkProcess a connection was made to a resource.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback): Added.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Notify NetworkProcess of the load.
(WebCore::ResourceLoadObserver::logWebSocketLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): Ditto.

Source/WebKit:

This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
it off in the UIProcess. It also updates test infrastructure to work with this change
in architecture.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
(WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
(WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
(WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.

  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):

  • Webprocess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.

Tools:

  • TestWebKitAPI/Tests/WebKit Cocoa/ResourceLoadStatistics.mm:

Revise tests to ensure a running NetworkProcess before attempting ResourceLoadStatistics operations.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback): Simplify test configuration by
activating the message used to trigger the callback when it is set.

12:45 PM Changeset in webkit [240497] by rniwa@webkit.org
  • 5 edits
    2 adds
    2 deletes in trunk

iOS: inputmode="none" disables hardware keyboard's globe key
https://bugs.webkit.org/show_bug.cgi?id=193811
<rdar://problem/47406553>

Reviewed by Wenson Hsieh.

Source/WebKit:

Removed the support for inputmode="none" for now since we need a new SPI from UIKit
to properly implement this feature some time in the future.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView textInputTraits]):

LayoutTests:

Updated and renamed the test expecting the keyboard to update upon inputmode content attribute changed
to use inputmode="decimal" instead of inputmode="none", and updated another test to expect inputmode="none"
has no effect instead of hiding the keyboard.

  • fast/forms/ios/inputmode-change-update-keyboard-expected.txt: Renamed from inputmode-none-removed-expected.txt.
  • fast/forms/ios/inputmode-change-update-keyboard.html: Renamed from inputmode-none-removed.html.
  • fast/forms/ios/inputmode-none-expected.txt:
  • fast/forms/ios/inputmode-none.html:
12:39 PM Changeset in webkit [240496] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

12:38 PM Changeset in webkit [240495] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Remove FrameView::m_firstVisuallyNonEmptyLayoutCallbackPending
https://bugs.webkit.org/show_bug.cgi?id=193835

Reviewed by Simon Fraser.

Currently updateIsVisuallyNonEmpty() is called from fireLayoutRelatedMilestonesIfNeeded() and from the incrementVisually*() functions.
By calling it from incrementVisually*() and setting the m_isVisuallyNonEmpty flag to true early does not have any impact on when the milestone is fired.
The milestone firing, as part of the post-layout tasks is triggered by a subsequent layout.
However having multiple callers of updateIsVisuallyNonEmpty() requires an extra boolen (m_firstVisuallyNonEmptyLayoutCallbackPending) to maintain.
Also calling updateIsVisuallyNonEmpty() repeatedly could be costly (with the current threshold of 200 characters, I don't think it is though).

This patch removes m_firstVisuallyNonEmptyLayoutCallbackPending and moves the logic from updateIsVisuallyNonEmpty() to fireLayoutRelatedMilestonesIfNeeded().

  • page/FrameView.cpp:

(WebCore::FrameView::resetLayoutMilestones):
(WebCore::FrameView::loadProgressingStatusChanged):
(WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
(WebCore::FrameView::updateIsVisuallyNonEmpty): Deleted.

  • page/FrameView.h:

(WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):

12:24 PM Changeset in webkit [240494] by ddkilzer@apple.com
  • 17 edits
    2 copies
    1 add in trunk/Source

Move soft-linking of Lookup.framework out of LookupSPI.h
<https://webkit.org/b/193815>

Reviewed by Tim Horton.

Source/WebCore:

  • editing/cocoa/DictionaryLookup.mm:
  • Remove unused header.
  • editing/mac/DictionaryLookupLegacy.mm:

(WebCore::tokenRange):
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::hidePopup):

  • Move soft-linking to LookupSoftLink.{h,mm}.
  • platform/ios/ValidationBubbleIOS.mm:

(WebCore::ValidationBubble::show):

  • Update for changes to UIKitSoftLink.{h,mm} now that UIAccessibilityAnnouncementNotification is using SOFT_LINK_CONSTANT*().

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • Add LookupSoftLink.{h,mm} files to the project.
  • pal/ios/UIKitSoftLink.h:
  • pal/ios/UIKitSoftLink.mm:
  • Change SOFT_LINK_VARIABLE_FOR_HEADER() to SOFT_LINK_CONSTANT_FOR_HEADER() for UIAccessibilityAnnouncementNotification constant.
  • pal/mac/LookupSoftLink.h: Copied from Source/WebCore/PAL/pal/spi/mac/LookupSPI.h.
  • pal/mac/LookupSoftLink.mm: Copied from Source/WebCore/PAL/pal/spi/mac/LookupSPI.h.
  • Migrate soft-linking from LookupSPI.h to here.
  • pal/spi/mac/LookupSPI.h:
  • Replace soft-linking of Lookup.framework with LookupSoftLink.h.

Source/WebKit:

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKWindowVisibilityObserver dealloc]):
(-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]):

  • Move soft-linking to LookupSoftLink.{h,mm}.

Source/WebKitLegacy/mac:

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController _animationControllerForText]):

  • WebView/WebView.mm:

(-[WebView _prepareForDictionaryLookup]):

  • Move soft-linking to LookupSoftLink.{h,mm}.

Source/WTF:

  • wtf/cocoa/SoftLinking.h:

(SOFT_LINK_CONSTANT_FOR_HEADER):
(SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT):
(SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER):

  • Remove local declaration of constant. This should be handled by including *SPI.h or "real" headers.

(SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT):

  • Remove local declaration of constant.
  • Rename from SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE() and add export argument to support exporting of functions.

(SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE):

  • Redefine in terms of SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT().
12:20 PM Changeset in webkit [240493] by Antti Koivisto
  • 6 edits in trunk/Source/WebKit

REGRESSION (PSON): After swipe back, first few attempts to swipe forward not recognized as swipe gestures
https://bugs.webkit.org/show_bug.cgi?id=193818
<rdar://problem/47456584>

Reviewed by Tim Horton.

We don't hit the RenderTreeSizeThreshold milestone to remove the snapshot and allow interaction because we request it
from a wrong process (the one we are leaving behind).

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):

Request the RenderTreeSizeThreshold notification when the load has started and we know the process to use.

(WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):

  • UIProcess/Cocoa/ViewGestureController.h:

(WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::endSwipeGesture):

Don't request immediately, save the threshold to SnapshotRemovalTracker.

(WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):

Do the request to the right process.

  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

(WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):

Ensure we send the notification even if we reached the threshold before it was requested.

(WebKit::ViewGestureGeometryCollector::sendDidHitRenderTreeSizeThresholdIfNeeded):
(WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):

  • WebProcess/WebPage/ViewGestureGeometryCollector.h:

(WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold): Deleted.

11:56 AM Changeset in webkit [240492] by Jonathan Bedard
  • 3 edits in trunk/LayoutTests

webkitpy: Implement device type specific expected results (Gardening)
https://bugs.webkit.org/show_bug.cgi?id=192162
<rdar://problem/46345449>

Unreviewed test gardening.

  • platform/ios/TestExpectations: Remove non-existant directories.
  • platform/mac/TestExpectations: Ditto.
11:45 AM Changeset in webkit [240491] by Wenson Hsieh
  • 22 edits in trunk/Source

[iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
https://bugs.webkit.org/show_bug.cgi?id=193829

Reviewed by Tim Horton.

Source/WebCore:

No change in behavior.

  • page/EventHandler.h:
  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::tryToBeginDragAtPoint):
(WebCore::EventHandler::tryToBeginDataInteractionAtPoint): Deleted.

  • platform/ios/WebItemProviderPasteboard.mm:

(linkTemporaryItemProviderFilesToDropStagingDirectory):

Source/WebKit:

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::setDragCaretRect):

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

(WebKit::PageClientImpl::didHandleDragStartRequest):
(WebKit::PageClientImpl::didConcludeEditDrag):
(WebKit::PageClientImpl::didChangeDragCaretRect):
(WebKit::PageClientImpl::didHandleStartDataInteractionRequest): Deleted.
(WebKit::PageClientImpl::didConcludeEditDataInteraction): Deleted.
(WebKit::PageClientImpl::didChangeDataInteractionCaretRect): Deleted.

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

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView setupDragAndDropInteractions]):
(-[WKContentView teardownDragAndDropInteractions]):
(-[WKContentView _didHandleDragStartRequest:]):
(-[WKContentView _didConcludeEditDrag:]):
(-[WKContentView _didChangeDragCaretRect:currentRect:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView setupDataInteractionDelegates]): Deleted.
(-[WKContentView teardownDataInteractionDelegates]): Deleted.
(-[WKContentView _didHandleStartDataInteractionRequest:]): Deleted.
(-[WKContentView _didConcludeEditDataInteraction:]): Deleted.
(-[WKContentView _didChangeDataInteractionCaretRect:currentRect:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didHandleDragStartRequest):
(WebKit::WebPageProxy::requestDragStart):
(WebKit::WebPageProxy::didConcludeEditDrag):
(WebKit::WebPageProxy::didHandleStartDataInteractionRequest): Deleted.
(WebKit::WebPageProxy::requestStartDataInteraction): Deleted.
(WebKit::WebPageProxy::didConcludeEditDataInteraction): Deleted.

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::didConcludeEditDrag):

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

(WebKit::WebPage::requestDragStart):
(WebKit::WebPage::requestAdditionalItemsForDragSession):
(WebKit::WebPage::didConcludeEditDrag):
(WebKit::WebPage::requestStartDataInteraction): Deleted.
(WebKit::WebPage::didConcludeEditDataInteraction): Deleted.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::didConcludeEditDrag):

  • WebView/WebView.mm:

(-[WebView _requestStartDataInteraction:globalPosition:]):
(-[WebView _didConcludeEditDrag]):
(-[WebView _didConcludeEditDataInteraction]): Deleted.

  • WebView/WebViewInternal.h:
11:42 AM Changeset in webkit [240490] by achristensen@apple.com
  • 8 edits in trunk

WKWebView.goBack should reload if there is a safe browsing warning
https://bugs.webkit.org/show_bug.cgi?id=193805
<rdar://problem/46908216>

Reviewed by Geoff Garen.

Source/WebKit:

If a WKWebView is showing a safe browsing warning and the user clicks a back button
in the app which calls WKWebView.goBack, the WKWebView is in a state where it has not navigated yet,
so actually going back will appear to the user to go back twice. We can't just do nothing because the
app is in a state where it is expecting a navigation to happen. Reloading achieves what the user expects
and makes the app work like the app expects.

  • UIProcess/API/C/WKPage.cpp:

(WKPageGoBack):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView goBack]):

  • UIProcess/PageClient.h:

(WebKit::PageClient::hasSafeBrowsingWarning const):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::hasSafeBrowsingWarning const):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(+[Simple3LookupContext sharedLookupContext]):
(-[Simple3LookupContext lookUpURL:completionHandler:]):
(-[WKWebViewGoBackNavigationDelegate webView:didFinishNavigation:]):
(TEST):

11:39 AM Changeset in webkit [240489] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
https://bugs.webkit.org/show_bug.cgi?id=193830

Reviewed by Matt Baker.

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction.prototype.process):

11:37 AM Changeset in webkit [240488] by commit-queue@webkit.org
  • 1 edit
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: Add another Protocol Version (iOS 12.2)
https://bugs.webkit.org/show_bug.cgi?id=193810
<rdar://problem/42981838>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-25
Reviewed by Matt Baker.

  • UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
  • Versions/Inspector-iOS-12.2.json: Added.
11:35 AM Changeset in webkit [240487] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: WI.Setting.migrateValue doesn't take into account the key prefix
https://bugs.webkit.org/show_bug.cgi?id=193814

Reviewed by Matt Baker.

  • UserInterface/Base/Setting.js:

(WI.Setting):
(WI.Setting.migrateValue):
(WI.Setting._localStorageKey): Added.

11:21 AM Changeset in webkit [240486] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

10:54 AM Changeset in webkit [240485] by Chris Dumez
  • 4 edits in trunk

Regression(PSON) cross-site provisional page is not canceled if a new same-site one is started
https://bugs.webkit.org/show_bug.cgi?id=193788
<rdar://problem/47531231>

Reviewed by Alex Christensen.

Source/WebKit:

When the page starts a new provisional load, make sure we cancel any pending one in the provisional
process, as it would have happened in the first provisional load happened in the same process.
Without this, we could have 2 parallel loads happening, one in the committed process and another
in the provisional one, leading to assertion failures in debug.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONNavigationDelegate webView:didStartProvisionalNavigation:]):

10:49 AM Changeset in webkit [240484] by Chris Dumez
  • 15 edits
    1 delete in trunk/Source/WebKit

Drop WebKit::WebKitPolicyAction type as it is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=193827

Reviewed by Antti Koivisto.

Drop WebKit::WebKitPolicyAction type as it is no longer needed. It is now identical to
WebCore::PolicyAction.

  • Shared/WebPolicyAction.h: Removed.
  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

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

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::didReceivePolicyDecision):
(WebKit::toPolicyAction): Deleted.

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.h:
10:48 AM Changeset in webkit [240483] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Missing PID in crashlog name should not be fatal (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=193771

Unreviewed infrastructure fix.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._merge_crash_logs): Correct syntax for catching multiple exception types.

10:46 AM Changeset in webkit [240482] by Jon Davis
  • 4 edits in trunk

Source/WebCore:
Updated feature status for several features
https://bugs.webkit.org/show_bug.cgi?id=193794

Reviewed by Joseph Pecoraro.

Updated feature status for the following: CSS Font Display,
CSS Text Decoration Level 4, SVG in OpenType Fonts, Web SQL,
File and Directory Entries API, MediaStream Recording API,
Readable Streams, Subresource Integrity, Visual Viewport API,
and Web Audio.

  • features.json:

Websites/webkit.org:
Added feature status entry for "Removed in Preview"
https://bugs.webkit.org/show_bug.cgi?id=193794

Reviewed by Joseph Pecoraro.

  • wp-content/themes/webkit/status.php:
10:45 AM Changeset in webkit [240481] by Jon Davis
  • 2 edits in trunk/Source/JavaScriptCore

Update JavaScriptCore feature status entries.
https://bugs.webkit.org/show_bug.cgi?id=193797

Reviewed by Mark Lam.

Updated feature status for Async Iteration, and Object rest/spread.

  • features.json:
10:42 AM Changeset in webkit [240480] by ap@apple.com
  • 2 edits in trunk/Tools
  • Scripts/webkitpy/common/config/contributors.json: Removing a stray comma.
10:39 AM Changeset in webkit [240479] by ap@apple.com
  • 2 edits in trunk/Tools

Add contributors.json entries for Ling Ho and for a new bot watchers group.

  • Scripts/webkitpy/common/config/contributors.json:
9:58 AM Changeset in webkit [240478] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add logging of calls
https://bugs.webkit.org/show_bug.cgi?id=193784

Reviewed by Brent Fulgham.

Add permissive logging of calls on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
9:32 AM Changeset in webkit [240477] by Chris Dumez
  • 5 edits in trunk

Regression(PSON?) Crash under NavigationState::NavigationClient::decidePolicyForNavigationAction()
https://bugs.webkit.org/show_bug.cgi?id=193779
<rdar://problem/46170903>

Reviewed by Antti Koivisto.

Source/WebKit:

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::tryAppLink):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
We were crashing when trying to get the URL of the main frame, which was sad because we never
ended up using the main frame URL. Therefore, this patch drops the code in question.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
Add assertion to make sure that the DecidePolicyForNavigationActionAsync IPC it is getting
from the process is related to its main frame.

Tools:

Add API test that quickly navigates forward to a previous process without waiting for it to
suspend. I suspect the crash could have been happening due to receiving leftover IPC from
the process' previous page when reconnecting the it for the forward navigation.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
9:23 AM Changeset in webkit [240476] by Wenson Hsieh
  • 25 edits
    10 adds in trunk

Need a way for JavaScript (or bundle) code to participate in undo
https://bugs.webkit.org/show_bug.cgi?id=190009
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Finish hooking up UndoManager::addItems() to CustomUndoStep.

Tests: editing/undo-manager/undo-manager-add-item-exceptions.html

editing/undo-manager/undo-manager-add-item.html
editing/undo-manager/undo-manager-delete-stale-undo-items.html
editing/undo-manager/undo-manager-item-labels.html
editing/undo-manager/undo-manager-undo-redo-after-garbage-collection.html

  • editing/CompositeEditCommand.h:
  • editing/CustomUndoStep.cpp:

(WebCore::CustomUndoStep::didRemoveFromUndoManager):

Add a method to invalidate CustomUndoStep. This clears out the pointer to the undo item, and also invalidates
the UndoItem, removing it from its UndoManager.

  • editing/CustomUndoStep.h:
  • editing/Editor.cpp:

(WebCore::Editor::registerCustomUndoStep):

Add a helper method to register a CustomUndoStep as a platform undoable step.

  • editing/Editor.h:
  • editing/UndoStep.h:
  • page/UndoItem.h:

(WebCore::UndoItem::undoManager const):

  • page/UndoManager.cpp:

(WebCore::UndoManager::addItem):

Create a CustomUndoStep with the given UndoItem, and register it with the platform undo manager.

  • page/UndoManager.h:
  • page/UndoManager.idl:

Mark addItem() as capable of throwing exceptions.

Source/WebKit:

Invalidate undo steps when removing them from WebPage. Invalidation is a no-op for editing actions that come
from the UA, but for custom undo steps backed by an UndoItem, we clear out the custom undo step's pointer to its
UndoItem and additionally disconnect the UndoItem from its UndoManager.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::addWebUndoStep):
(WebKit::WebPage::removeWebEditCommand):

  • WebProcess/WebPage/WebUndoStep.h:

(WebKit::WebUndoStep::invalidate):

Tools:

Add UIScriptController helpers to grab the platform undo and redo action labels. Currently only implemented for
Cocoa platforms in WebKit2. See other ChangeLogs for more detail.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::lastUndoLabel const):
(WTR::UIScriptController::firstRedoLabel const):
(WTR::UIScriptController::platformUndoManager const):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::lastUndoLabel const):
(WTR::UIScriptController::firstRedoLabel const):
(WTR::UIScriptController::platformUndoManager const):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::lastUndoLabel const):
(WTR::UIScriptController::firstRedoLabel const):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/UIScriptControllerCocoa.mm:

(WTR::UIScriptController::lastUndoLabel const):
(WTR::UIScriptController::firstRedoLabel const):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::platformUndoManager const):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::platformUndoManager const):

LayoutTests:

Add a few new layout tests covering UndoManager.addItem().

  • editing/undo-manager/undo-manager-add-item-exceptions-expected.txt: Added.
  • editing/undo-manager/undo-manager-add-item-exceptions.html: Added.

Add a test to verify that we throw exceptions when calling addItem() in a couple of circumstances.

  • editing/undo-manager/undo-manager-add-item-expected.txt: Added.
  • editing/undo-manager/undo-manager-add-item.html: Added.

Add a test that exercises the new API in both the top-level context and a child frame.

  • editing/undo-manager/undo-manager-delete-stale-undo-items-expected.txt: Added.
  • editing/undo-manager/undo-manager-delete-stale-undo-items.html: Added.

Add a test to verify that after adding undo items, undoing, and then performing other edit actions, garbage
collection will destroy JS wrappers for the previously added UndoItems, since these undo items' handlers can no
longer be invoked.

  • editing/undo-manager/undo-manager-item-labels-expected.txt: Added.
  • editing/undo-manager/undo-manager-item-labels.html: Added.

Add a test verifying that the undo and redo action labels are updated correctly when undoing and redoing.

  • editing/undo-manager/undo-manager-undo-redo-after-garbage-collection-expected.txt: Added.
  • editing/undo-manager/undo-manager-undo-redo-after-garbage-collection.html: Added.

Add a test to verify that triggering garbage collection after adding an undo item without keeping references to
the item (or its undo/redo handlers) doesn't break the API.

  • resources/ui-helper.js:

(window.UIHelper.undoAndRedoLabels):

Add a helper method to grab the platform's current undo and redo action names.

(window.UIHelper):

8:50 AM Changeset in webkit [240475] by Alan Bujtas
  • 7 edits in trunk

[LFC][BFC][MarginCollapsing] Add "clear" to static position computation.
https://bugs.webkit.org/show_bug.cgi?id=193824

Reviewed by Antti Koivisto.

Source/WebCore:

When clear property is set and floats are present, we have to estimate and set the box's vertical position during
static positioning to be able to properly layout its subtree.

<div style="float: left; width: 100px; height: 100px;"></div>
<div style="clear: left;">

<div style="float: left; width: 100px; height: 100px;"></div>

</div>

In the above example since the second float's parent clears the first float, the second float is positioned below
the first float. If we didn't push down (clear) the box, the float child would get placed next to the first float.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const): Deleted.
(WebCore::Layout::BlockFormattingContext::adjustedVerticalPositionAfterMarginCollapsing const): Deleted.

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):

  • layout/displaytree/DisplayBox.h:

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
8:46 AM Changeset in webkit [240474] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][BFC][MarginCollapsing] Move positive/negative margin value updating to a dedicated function
https://bugs.webkit.org/show_bug.cgi?id=193812

Reviewed by Antti Koivisto.

Move update logic to BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues().

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

7:54 AM Changeset in webkit [240473] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebKit

[GTK][WPE] Add API to add paths to sandbox
https://bugs.webkit.org/show_bug.cgi?id=193571

This allows applications to add paths to the web process
if required by web extensions.

Patch by Patrick Griffis <Patrick Griffis> on 2019-01-25
Reviewed by Michael Catanzaro.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_add_path_to_sandbox):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bubblewrapSpawn):

  • UIProcess/WebProcessPool.h:
  • UIProcess/glib/WebProcessProxyGLib.cpp:

(WebKit::WebProcessProxy::platformGetLaunchOptions):

3:36 AM Changeset in webkit [240472] by graouts@webkit.org
  • 12 edits in trunk/Source/WebCore

Use ENABLE_POINTER_EVENTS for the touch-action property
https://bugs.webkit.org/show_bug.cgi?id=193819

Reviewed by Antti Koivisto.

Since we've added an ENABLE_POINTER_EVENTS we should be using it for anything related to the implementation of the
Pointer Events specification of which the touch-action property is a part.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:
  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/StyleBuilderConverter.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • dom/Element.cpp:

(WebCore::Element::allowsDoubleTapGesture const):

  • platform/TouchAction.h:
  • rendering/style/RenderStyle.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

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

  • rendering/style/StyleRareNonInheritedData.h:
1:27 AM Changeset in webkit [240471] by Devin Rousso
  • 20 edits in trunk

Web Inspector: improve invalid Audit/Recording JSON error messages
https://bugs.webkit.org/show_bug.cgi?id=193476
<rdar://problem/47303659>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Models/AuditTestBase.js:

(WI.AuditTestBase):

  • UserInterface/Models/AuditTestCase.js:

(WI.AuditTestCase.async fromPayload):

  • UserInterface/Models/AuditTestGroup.js:

(WI.AuditTestGroup.async fromPayload):

  • UserInterface/Models/AuditTestCaseResult.js:

(WI.AuditTestCaseResult.async fromPayload.checkArray):
(WI.AuditTestCaseResult.async fromPayload):

  • UserInterface/Models/AuditTestGroupResult.js:

(WI.AuditTestGroupResult.async fromPayload):

  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.synthesizeWarning): Added.
(WI.AuditManager.synthesizeError):
(WI.AuditManager.prototype.async processJSON):

  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
(WI.Recording.synthesizeWarning): Added.
(WI.Recording.synthesizeError):

  • UserInterface/Models/RecordingFrame.js:

(WI.RecordingFrame.fromPayload):

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction.fromPayload):
(WI.RecordingAction.prototype.async swizzle):
(WI.RecordingAction.prototype.apply):

  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager.prototype.processJSON):

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/model/auditTestCase.html:
  • inspector/model/auditTestCase-expected.txt:
  • inspector/model/auditTestCaseResult-expected.txt:
  • inspector/model/auditTestGroup.html:
  • inspector/model/auditTestGroup-expected.txt:
  • inspector/model/auditTestGroupResult-expected.txt:
  • inspector/model/recording-expected.txt:

Jan 24, 2019:

11:12 PM Changeset in webkit [240470] by Ryan Haddad
  • 5 edits in trunk/Tools

Update macOS JSC bot configurations
https://bugs.webkit.org/show_bug.cgi?id=193739

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/config.json: Remove 32-bit BuildAndTest queue.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer): Move JSC EWS to Mojave section.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot): Remove 32-bit BuildAndTest queue from dashboard.

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Update unit test.
10:47 PM Changeset in webkit [240469] by Devin Rousso
  • 10 edits in trunk

Web Inspector: Audit: add supports key to test/group for compatibility
https://bugs.webkit.org/show_bug.cgi?id=193686
<rdar://problem/47460872>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Models/AuditTestBase.js:

(WI.AuditTestBase):
(WI.AuditTestBase.prototype.get supported): Added.
(WI.AuditTestBase.prototype.set supported): Added.
(WI.AuditTestBase.prototype.set disabled):
(WI.AuditTestBase.prototype.async start):
(WI.AuditTestBase.prototype.stop):
(WI.AuditTestBase.toJSON):

  • UserInterface/Models/AuditTestCase.js:

(WI.AuditTestCase.async fromPayload):

  • UserInterface/Models/AuditTestGroup.js:

(WI.AuditTestGroup):
(WI.AuditTestGroup.async fromPayload):
(WI.AuditTestGroup.prototype.get supported): Added.
(WI.AuditTestGroup.prototype.set supported): Added.
Add support for a "supports" key in the test JSON that prevents the test from being run if
it's value is lower than the frontend/backend version.

  • UserInterface/Views/AuditTreeElement.js:

(WI.AuditTreeElement.prototype.onattach):
(WI.AuditTreeElement.prototype.ondelete):
(WI.AuditTreeElement.prototype.populateContextMenu):
(WI.AuditTreeElement.prototype._updateStatus): Added.
(WI.AuditTreeElement.prototype._showRunningSpinner):
(WI.AuditTreeElement.prototype._showRunningProgress):
(WI.AuditTreeElement.prototype._updateTestGroupDisabled):
(WI.AuditTreeElement.prototype._handleTestCaseCompleted):
(WI.AuditTreeElement.prototype._handleTestResultCleared):
(WI.AuditTreeElement.prototype._handleTestGroupCompleted):
(WI.AuditTreeElement.prototype._handleManagerEditingChanged):
(WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
(WI.AuditTreeElement.prototype._updateLevel): Deleted.

  • UserInterface/Views/AuditTreeElement.css:

(.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
(.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
(.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported > .status > img): Added.
(.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
(.tree-outline .item.audit.unsupported > .status > img): Added.
(.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
(.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
(.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
Drive-by: only allow tests to be deleted when in edit mode.

  • UserInterface/Views/AuditNavigationSidebarPanel.js:

(WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/audit/version.html:
8:39 PM Changeset in webkit [240468] by keith_miller@apple.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

Remove usage of internal macro from private header
https://bugs.webkit.org/show_bug.cgi?id=193809

Reviewed by Saam Barati.

Also, add a new file to include all of our API headers to make sure
they don't accidentally include C++ or internal values.

  • API/JSScript.h:
  • API/tests/testIncludes.m: Added.
  • JavaScriptCore.xcodeproj/project.pbxproj:
8:14 PM Changeset in webkit [240467] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][BFC][MarginCollapsing] Refactor MarginCollapse::updateCollapsedMarginAfter
https://bugs.webkit.org/show_bug.cgi?id=193807

Reviewed by Simon Fraser.

Rename updateCollapsedMarginAfter to updateMarginAfterForPreviousSibling and make the margin updating logic more explicit.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::updateCollapsedMarginAfter): Deleted.

6:53 PM Changeset in webkit [240466] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebKit

iOS: Split keyboard should not shrink visualViewport.height
https://bugs.webkit.org/show_bug.cgi?id=193798

Reviewed by Tim Horton.

Treat a split keyboard like a floating keyboard and don't consider its input view bounds in computing the visible content rects.

No new tests since while it's possible to transition between split and merged keyboard using some SPI,
there isn't a reliable mechanism to reset the keyboard state. e.g. we need to wait for a hard-coded amount of time.

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

(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

6:47 PM Changeset in webkit [240465] by ysuzuki@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] ErrorConstructor should not have own IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=193800

Reviewed by Saam Barati.

Similar to r240456, sizeof(ErrorConstructor) != sizeof(InternalFunction), and that is why we have
IsoSubspace errorConstructorSpace in VM. But it is allocated only one-per-JSGlobalObject, and it is
too costly to have IsoSubspace which allocates 16KB. Since stackTraceLimit information is per
JSGlobalObject information, we should have m_stackTraceLimit in JSGlobalObject instead and put
ErrorConstructor in InternalFunction's IsoSubspace. As r230813 (moving InternalFunction and subclasses
into IsoSubspaces) described,

"subclasses that are the same size as InternalFunction share its subspace. I did this because the subclasses
appear to just override methods, which are called dynamically via the structure or class of the object.
So, I don't see a type confusion risk if UAF is used to allocate one kind of InternalFunction over another."

Then, putting ErrorConstructor in InternalFunction IsoSubspace is fine since it meets the above condition.
This patch removes m_stackTraceLimit in ErrorConstructor, and drops IsoSubspace for errorConstructorSpace.
This reduces the memory usage.

  • interpreter/Interpreter.h:
  • runtime/Error.cpp:

(JSC::getStackTrace):

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::ErrorConstructor):
(JSC::ErrorConstructor::finishCreation):
(JSC::constructErrorConstructor):
(JSC::callErrorConstructor):
(JSC::ErrorConstructor::put):
(JSC::ErrorConstructor::deleteProperty):
(JSC::Interpreter::constructWithErrorConstructor): Deleted.
(JSC::Interpreter::callErrorConstructor): Deleted.

  • runtime/ErrorConstructor.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::stackTraceLimit const):
(JSC::JSGlobalObject::setStackTraceLimit):
(JSC::JSGlobalObject::errorConstructor const): Deleted.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
6:30 PM Changeset in webkit [240464] by Alan Coon
  • 1 copy in tags/Safari-607.1.27

Tag Safari-607.1.27.

6:24 PM Changeset in webkit [240463] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source

Cherry-pick r240461. rdar://problem/47536283

[iOS] Silence MediaPlayer compile warnings
https://bugs.webkit.org/show_bug.cgi?id=193780
<rdar://problem/47518428>

Reviewed by Jer Noble.

Source/WebCore/PAL:

  • pal/spi/ios/MediaPlayerSPI.h:

Source/WebKit:

  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240461 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6:23 PM Changeset in webkit [240462] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

6:00 PM Changeset in webkit [240461] by eric.carlson@apple.com
  • 4 edits in trunk/Source

[iOS] Silence MediaPlayer compile warnings
https://bugs.webkit.org/show_bug.cgi?id=193780
<rdar://problem/47518428>

Reviewed by Jer Noble.

Source/WebCore/PAL:

  • pal/spi/ios/MediaPlayerSPI.h:

Source/WebKit:

  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
5:49 PM Changeset in webkit [240460] by Fujii Hironori
  • 3 edits in trunk/Tools

[Win][WebKitTestRunner] Implement EventSenderProxy
https://bugs.webkit.org/show_bug.cgi?id=193755

Reviewed by Don Olmstead.

  • WebKitTestRunner/EventSenderProxy.h: Removed unused members m_buttonState and m_mouseButtonsCurrentlyDown.
  • WebKitTestRunner/win/EventSenderProxyWin.cpp:

(WTR::EventSenderProxy::dispatchMessage):
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):

5:16 PM Changeset in webkit [240459] by Ross Kirsling
  • 2 edits in trunk/Tools

Unreviewed fix for API test failure after r240437.

TestWTF.WTF.StringOperators apparently can't deal with another test using String::operator+. This is fine...

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:
5:09 PM Changeset in webkit [240458] by Alan Coon
  • 1 copy in tags/Safari-607.1.26

Tag Safari-607.1.26.

5:06 PM Changeset in webkit [240457] by commit-queue@webkit.org
  • 54 edits
    8 copies
    9 adds in trunk

Web Inspector: CPU Usage Timeline
https://bugs.webkit.org/show_bug.cgi?id=193730
<rdar://problem/46797201>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-24
Reviewed by Devin Rousso.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:

New files.

  • inspector/protocol/CPUProfiler.json: Added.

New domain that follows the pattern of Memory/ScriptProfiler.

  • inspector/protocol/Timeline.json:

New enum to auto-start a CPU instrument in the backend.

Source/WebCore:

Test: inspector/cpu-profiler/tracking.html

  • Sources.txt:
  • UnifiedSources-input.xcfilelist:
  • WebCore.xcodeproj/project.pbxproj:

New files.

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::createLazyAgents):

  • inspector/InstrumentingAgents.cpp:

(WebCore::InstrumentingAgents::reset):

  • inspector/InstrumentingAgents.h:

(WebCore::InstrumentingAgents::inspectorCPUProfilerAgent const):
(WebCore::InstrumentingAgents::setInspectorCPUProfilerAgent):
Create and track the CPUProfilerAgent.

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::toggleInstruments):
(WebCore::InspectorTimelineAgent::toggleCPUInstrument):
Handle backend auto-start of the CPU instrument / timeline.

  • inspector/agents/InspectorCPUProfilerAgent.h:
  • inspector/agents/InspectorCPUProfilerAgent.cpp: Added.

(WebCore::InspectorCPUProfilerAgent::InspectorCPUProfilerAgent):
(WebCore::InspectorCPUProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCPUProfilerAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorCPUProfilerAgent::startTracking):
(WebCore::InspectorCPUProfilerAgent::stopTracking):
(WebCore::InspectorCPUProfilerAgent::collectSample):
CPUProfilerAgent uses the ResourceUsageThread to get CPU data.

  • inspector/agents/InspectorTimelineAgent.h:
  • inspector/agents/InspectorMemoryAgent.cpp:

(WebCore::InspectorMemoryAgent::startTracking):
(WebCore::InspectorMemoryAgent::collectSample):
Update the MemoryAgent to collect only Memory data and use a more accurate sample timestamp.

  • page/ResourceUsageData.h:
  • page/ResourceUsageThread.cpp:

(WebCore::ResourceUsageThread::addObserver):
(WebCore::ResourceUsageThread::removeObserver):
(WebCore::ResourceUsageThread::notifyObservers):
(WebCore::ResourceUsageThread::recomputeCollectionMode):
(WebCore::ResourceUsageThread::threadBody):

  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageOverlayCocoa.mm:

(WebCore::ResourceUsageOverlay::platformInitialize):

  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::ResourceUsageThread::platformCollectCPUData):
(WebCore::ResourceUsageThread::platformCollectMemoryData):
(WebCore::ResourceUsageThread::platformThreadBody): Deleted.

  • page/linux/ResourceUsageOverlayLinux.cpp:

(WebCore::ResourceUsageOverlay::platformInitialize):

  • page/linux/ResourceUsageThreadLinux.cpp:

(WebCore::ResourceUsageThread::platformCollectCPUData):
(WebCore::ResourceUsageThread::platformCollectMemoryData):
(WebCore::ResourceUsageThread::platformThreadBody):
Give each observer their own collection mode. The ResourceUsageThread
will then collect data that is the union of all of the active observers.
This allows collecting CPU and Memory data separately, reducing the cost
of each when gathered individually.

Source/WebInspectorUI:

CPU Usage is gathered in the backend twice a second, the frequency of the
ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
ways in the Timeline.

We use a column chart in the timeline overview to display the frequency and
relative distance of samples. This helps show if the samples were close
together or far apart, which indicates how meaningful they will be at a
particular scale.

We use a line chart in the timeline detail view which will be easier to see
the changes over a particular time range selection.

  • Localizations/en.lproj/localizedStrings.js:

New strings.

  • UserInterface/Main.html:
  • UserInterface/Base/Main.js:

(WI.loaded):

  • UserInterface/Test.html:
  • UserInterface/Test/Test.js:

(WI.loaded):

  • UserInterface/Protocol/CPUProfilerObserver.js:

(WI.CPUProfilerObserver.prototype.trackingStart):
(WI.CPUProfilerObserver.prototype.trackingUpdate):
(WI.CPUProfilerObserver.prototype.trackingComplete):
(WI.CPUProfilerObserver):
New files and default registration.

  • UserInterface/Protocol/Target.js:

(WI.Target.prototype.get CPUProfilerAgent):
New Agent.

  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.availableTimelineTypes):
(WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
(WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
(WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
(WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
(WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
(WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.

  • UserInterface/Models/CPUInstrument.js:

(WI.CPUInstrument):
(WI.CPUInstrument.supported):
(WI.CPUInstrument.prototype.get timelineRecordType):
(WI.CPUInstrument.prototype.startInstrumentation):
(WI.CPUInstrument.prototype.stopInstrumentation):

  • UserInterface/Models/CPUTimelineRecord.js:

(WI.CPUTimelineRecord):
(WI.CPUTimelineRecord.prototype.get timestamp):
(WI.CPUTimelineRecord.prototype.get usage):

  • UserInterface/Models/Instrument.js:

(WI.Instrument.createForTimelineType):

  • UserInterface/Models/TimelineRecord.js:
  • UserInterface/Models/TimelineRecording.js:

(WI.TimelineRecording.prototype.addRecord):
Expose a new CPU instrument and timeline.

  • UserInterface/Views/ColumnChart.js: Added.

(WI.ColumnChart):
(WI.ColumnChart.prototype.get element):
(WI.ColumnChart.prototype.get bars):
(WI.ColumnChart.prototype.get size):
(WI.ColumnChart.prototype.set size):
(WI.ColumnChart.prototype.addBar):
(WI.ColumnChart.prototype.clear):
(WI.ColumnChart.prototype.needsLayout):
(WI.ColumnChart.prototype.updateLayout):
View that will draw vertical bars with independent widths.
This is meant to be used similiar to WI.LineChart.

  • UserInterface/Images/CPUInstrument.svg: Added.
  • UserInterface/Views/Variables.css:

(:root):
CPU timeline colors and icon.

  • UserInterface/Views/CPUTimelineOverviewGraph.css:

(body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
(.timeline-overview-graph.cpu):
(.timeline-overview-graph.cpu > .legend):
(body[dir=ltr] .timeline-overview-graph.cpu > .legend):
(body[dir=rtl] .timeline-overview-graph.cpu > .legend):
(.timeline-overview-graph:nth-child(even) > .legend):
(body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
(.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):

  • UserInterface/Views/CPUTimelineOverviewGraph.js: Added.

(WI.CPUTimelineOverviewGraph):
(WI.CPUTimelineOverviewGraph.prototype.get height):
(WI.CPUTimelineOverviewGraph.prototype.reset):
(WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
(WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
(WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
(WI.CPUTimelineOverviewGraph.prototype.layout):
(WI.CPUTimelineOverviewGraph.prototype._updateLegend):
(WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):

  • UserInterface/Views/CPUTimelineView.css:

(.timeline-view.cpu):
(.timeline-view.cpu > .content):
(.timeline-view.cpu > .content .subtitle):
(.timeline-view.cpu > .content > .details):
(.timeline-view.cpu > .content > .details > .timeline-ruler):
(body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
(body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
(.timeline-view.cpu > .content > .details > .subtitle):
(.cpu-usage-view .line-chart > svg > path):
(.timeline-view.cpu .legend > .row > .swatch.current):

  • UserInterface/Views/CPUTimelineView.js: Added.

(WI.CPUTimelineView):
(WI.CPUTimelineView.prototype.shown):
(WI.CPUTimelineView.prototype.hidden):
(WI.CPUTimelineView.prototype.closed):
(WI.CPUTimelineView.prototype.reset):
(WI.CPUTimelineView.prototype.get scrollableElements):
(WI.CPUTimelineView.prototype.get showsFilterBar):
(WI.CPUTimelineView.prototype.layout.layoutView):
(WI.CPUTimelineView.prototype.layout.xScale):
(WI.CPUTimelineView.prototype.layout.yScale):
(WI.CPUTimelineView.prototype.layout):
(WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):

  • UserInterface/Views/CPUUsageView.css:

(.cpu-usage-view):
(.cpu-usage-view > .details):
(body[dir=ltr] .cpu-usage-view > .details):
(body[dir=rtl] .cpu-usage-view > .details):
(.cpu-usage-view > .graph):
(body[dir=rtl] .cpu-usage-view > .graph):

  • UserInterface/Views/CPUUsageView.js:

(WI.CPUUsageView):
(WI.CPUUsageView.prototype.get element):
(WI.CPUUsageView.prototype.clear):
(WI.CPUUsageView.prototype.layoutWithDataPoints):
(WI.CPUUsageView.prototype._updateDetails):

  • UserInterface/Views/ContentView.js:

(WI.ContentView.createFromRepresentedObject):

  • UserInterface/Views/TimelineIcons.css:

(.cpu-icon .icon):

  • UserInterface/Views/TimelineOverviewGraph.js:

(WI.TimelineOverviewGraph.createForTimeline):

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView.displayNameForTimelineType):
(WI.TimelineTabContentView.iconClassNameForTimelineType):
(WI.TimelineTabContentView.genericClassNameForTimelineType):
(WI.TimelineTabContentView.iconClassNameForRecord):
(WI.TimelineTabContentView.displayNameForRecord):
Timeline views for CPU usage.

  • UserInterface/Views/MemoryCategoryView.js:

(WI.MemoryCategoryView):

  • UserInterface/Views/MemoryTimelineView.js:

(WI.MemoryTimelineView.createChartContainer):
(WI.MemoryTimelineView):
(WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
Minor updates to style and comments.

LayoutTests:

  • inspector/cpu-profiler/tracking-expected.txt: Added.
  • inspector/cpu-profiler/tracking.html: Added.

Test the CPUProfiler domain emits events.

  • inspector/heap/tracking-expected.txt:
  • inspector/heap/tracking.html:
  • inspector/memory/tracking-expected.txt:
  • inspector/memory/tracking.html:
  • inspector/script-profiler/tracking-expected.txt:
  • inspector/script-profiler/tracking.html:

Update test naming.

  • platform/win/TestExpectations:

Skip on platforms without RESOURCE_USAGE.

4:49 PM Changeset in webkit [240456] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] SharedArrayBufferConstructor and ArrayBufferConstructor should not have their own IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=193774

Reviewed by Mark Lam.

We put all the instances of InternalFunction and its subclasses in IsoSubspace to make safer from UAF.
But since IsoSubspace requires the memory layout of instances is the same, we created different IsoSubspace
for subclasses of InternalFunction if sizeof(subclass) != sizeof(InternalFunction). One example is
ArrayBufferConstructor and SharedArrayBufferConstructor. But it is too costly to allocate 16KB page just
for these two constructor instances. They are only two instances per JSGlobalObject.

This patch makes sizeof(ArrayBufferConstructor) == sizeof(InternalFunction) so that they can use IsoSubspace
of InternalFunction. We introduce JSGenericArrayBufferConstructor, and it takes ArrayBufferSharingMode as
its template parameter. We define JSArrayBufferConstructor as JSGenericArrayBufferConstructor<ArrayBufferSharingMode::Default>
and JSSharedArrayBufferConstructor as JSGenericArrayBufferConstructor<ArrayBufferSharingMode::Shared> so that
we do not need to hold ArrayBufferSharingMode in the field of the constructor. This change removes IsoSubspace
for ArrayBufferConstructors, and reduces the memory usage.

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::JSGenericArrayBufferConstructor<sharingMode>::JSGenericArrayBufferConstructor):
(JSC::JSGenericArrayBufferConstructor<sharingMode>::finishCreation):
(JSC::JSGenericArrayBufferConstructor<sharingMode>::constructArrayBuffer):
(JSC::JSGenericArrayBufferConstructor<sharingMode>::createStructure):
(JSC::JSGenericArrayBufferConstructor<sharingMode>::info):
(JSC::JSArrayBufferConstructor::JSArrayBufferConstructor): Deleted.
(JSC::JSArrayBufferConstructor::finishCreation): Deleted.
(JSC::JSArrayBufferConstructor::create): Deleted.
(JSC::JSArrayBufferConstructor::createStructure): Deleted.
(JSC::constructArrayBuffer): Deleted.

  • runtime/JSArrayBufferConstructor.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
4:35 PM Changeset in webkit [240455] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitdirs] iosSimulatorApplicationsPath may not have iOS.simruntime in its path
https://bugs.webkit.org/show_bug.cgi?id=193787
<rdar://problem/47497634>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitdirs.pm:

(iosSimulatorApplicationsPath): Pick from available runtime directories.

4:04 PM Changeset in webkit [240454] by commit-queue@webkit.org
  • 9 edits
    19 adds in trunk

Implement PerformanceObserver.supportedEntryTypes
https://bugs.webkit.org/show_bug.cgi?id=193428

LayoutTests/imported/w3c:

Patch by Charles Vazac <cvazac@akamai.com> on 2019-01-24
Reviewed by Joseph Pecoraro.

  • web-platform-tests/resource-timing/supported_resource_type.any-expected.txt:
  • web-platform-tests/resource-timing/supported_resource_type.any.worker-expected.txt:

Source/WebCore:

PerformanceObserver.supportedEntryTypes should return an array of
entryTypes that can be observed per specification
https://w3c.github.io/performance-timeline/#supportedentrytypes-attribute

Patch by Charles Vazac <cvazac@akamai.com> on 2019-01-24
Reviewed by Joseph Pecoraro.

This is covered by web-platform-tests
LayoutTests/imported/w3c/web-platform-tests/resource-timing/supported_resource_type.*.html.

  • page/PerformanceObserver.cpp:

(WebCore::PerformanceObserver::supportedEntryTypes):

  • page/PerformanceObserver.h:
  • page/PerformanceObserver.idl:
3:41 PM Changeset in webkit [240453] by Truitt Savell
  • 19 edits in trunk

Unreviewed, rolling out r240446.

Casued 5 API failures

Reverted changeset:

"Activate the WebResourceLoadStatisticsStore in the
NetworkProcess and deactivate it in the UIProcess."
https://bugs.webkit.org/show_bug.cgi?id=193297
https://trac.webkit.org/changeset/240446

3:30 PM Changeset in webkit [240452] by Wenson Hsieh
  • 6 edits
    1 delete in trunk

[iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site
https://bugs.webkit.org/show_bug.cgi?id=193758
<rdar://problem/43614978>

Reviewed by Tim Horton.

Source/WebCore:

CodeMirror's script adds a repeating timer that periodically normalizes the logical selection in the editor
(this is distinct from the actual DOM selection, which is inside a hidden textarea element). This script defines
a helper method to select all the text inside of a text form control, called selectInput, which normally
invokes node.select(). However, in the case of iOS, the script works around broken select() behavior by
setting selectionStart and selectionEnd to encompass all the content in the form control. When requesting
the desktop version of the site, CodeMirror no longer attempts to apply its iOS workaround.

This iOS-specific behavior was introduced to fix <rdar://problem/4901923>. However, the original bug no longer
reproduces even without this quirk. To fix CodeMirror, we make two adjustments:

  1. Roll out this ancient demo hack, in favor of standardized behavior.
  2. Note that select() is also used when focusing an input. However, when focusing an input element on iOS, we

want to match the platform (i.e. UITextField behavior) and move focus to the end of the text field. To
achieve this, we introduce a new helper on HTMLInputElement that is called when setting the default
selection of a text input after focus; on iOS, this helper method moves the selection to the end of the
input, but everywhere else, it selects all the text in the input element.

This causes 6 existing layout tests to begin passing on iOS.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::updateFocusAppearance):
(WebCore::HTMLInputElement::setDefaultSelectionAfterFocus):

  • html/HTMLInputElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::select):

LayoutTests:

Mark some existing layout tests as passing on iOS. Additionally, remove failing expectations for another
existing layout test on iOS.

  • platform/ios/TestExpectations:
  • platform/ios/editing/text-iterator/hidden-textarea-selection-quirk-expected.txt: Removed.
3:15 PM Changeset in webkit [240451] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Fix leak of AVSampleBufferRenderSynchronizer boundaryObserver object.
https://bugs.webkit.org/show_bug.cgi?id=193778

Reviewed by Jon Lee.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::performTaskAtMediaTime):

2:58 PM Changeset in webkit [240450] by Alan Bujtas
  • 5 edits
    1 add in trunk

DidFirstVisuallyNonEmptyLayout milestone should always fire at some point.
https://bugs.webkit.org/show_bug.cgi?id=193741
<rdar://problem/47135030>

Reviewed by Antti Koivisto and Simon Fraser.

Source/WebCore:

fireLayoutRelatedMilestonesIfNeeded() is part of the post-layout tasks. In certain cases when

  1. the received data is not "contentful" yet
  2. and we are expecting some more (loading is not complete yet)
  3. but no layout is initiated anymore

nothing triggers the milestone firing.

This patch ensures that we fire the DidFirstVisuallyNonEmptyLayout when the frame load is complete unless we already did.

  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):
(WebCore::FrameView::loadProgressingStatusChanged):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:

(TestWebKitAPI::TEST):

2:37 PM Changeset in webkit [240449] by ysuzuki@apple.com
  • 8 edits
    1 add in trunk

stress/const-semantics.js fails a dfg-eager / ftl-eager run with an ASAN release build.
https://bugs.webkit.org/show_bug.cgi?id=190693

Reviewed by Michael Saboff.

JSTests:

  • stress/regress-190693.js: Added.

(truth):
(assert):
(shouldThrowInvalidConstAssignment):
(taz):

Source/JavaScriptCore:

JITStubRoutine's fields are marked only when JITStubRoutine::m_mayBeExecuting is true.
This becomes true when we find the executable address in our conservative roots, which
means that we could be executing it right now. This means that object liveness in
JITStubRoutine depends on the information gathered in ConservativeRoots. However, our
constraints are separated, "Conservative Scan" and "JIT Stub Routines". They can even
be executed concurrently, so that "JIT Stub Routines" may miss to mark the actually
executing JITStubRoutine because "Conservative Scan" finds it later.
When finalizing the GC, we delete the dead JITStubRoutines. At that time, since
"Conservative Scan" already finishes, we do not delete some JITStubRoutines which do not
mark the depending objects. Then, in the next cycle, we find JITStubRoutines still live,
attempt to mark the depending objects, and encounter the dead objects which are collected
in the previous cycles.

This patch removes "JIT Stub Routines" and merge it to "Conservative Scan". Since
"Conservative Scan" and "JIT Stub Routines" need to be executed only when the execution
happens (ensured by GreyedByExecution and CollectionPhase check), this change is OK for
GC stop time.

  • heap/ConservativeRoots.h:

(JSC::ConservativeRoots::roots const):
(JSC::ConservativeRoots::roots): Deleted.

  • heap/Heap.cpp:

(JSC::Heap::addCoreConstraints):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::append):

  • heap/SlotVisitor.h:
  • jit/GCAwareJITStubRoutine.cpp:

(JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):

  • jit/GCAwareJITStubRoutine.h:
2:07 PM Changeset in webkit [240448] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Update ARM64EHash
https://bugs.webkit.org/show_bug.cgi?id=193776
<rdar://problem/47526457>

Reviewed by Mark Lam.

See radar for details.

  • assembler/AssemblerBuffer.h:

(JSC::ARM64EHash::update):
(JSC::ARM64EHash::finalHash const):

1:30 PM Changeset in webkit [240447] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Object Allocation Sinking phase can move a node that walks the stack into a place where the InlineCallFrame is no longer valid
https://bugs.webkit.org/show_bug.cgi?id=193751
<rdar://problem/47280215>

Reviewed by Michael Saboff.

JSTests:

  • stress/object-allocation-sinking-phase-must-only-move-allocations-if-stack-trace-is-still-valid.js: Added.

(let.thing):
(foo.let.hello):
(foo):

Source/JavaScriptCore:

The Object Allocation Sinking phase may move allocations around inside
of the program. However, it was not ensuring that it's still possible
to walk the stack at the point in the program that it moved the allocation to.
Certain InlineCallFrames rely on data in the stack when taking a stack trace.
All allocation sites can do a stack walk (we do a stack walk when we GC).
Conservatively, this patch says we're ok to move this allocation if we are
moving within the same InlineCallFrame. We could be more precise and do an
analysis of stack writes. However, this scenario is so rare that we just
take the conservative-and-straight-forward approach of checking that the place
we're moving to is the same InlineCallFrame as the allocation site.

In general, this issue arises anytime we do any kind of code motion.
Interestingly, LICM gets this right. It gets it right because the only
InlineCallFrames we can't move out of are the InlineCallFrames that
have metadata stored on the stack (callee for closure calls and argument
count for varargs calls). LICM doesn't have this issue because it relies
on Clobberize for doing its effects analysis. In clobberize, we model every
node within an InlineCallFrame that meets the above criteria as reading
from those stack fields. Consequently, LICM won't hoist any node in that
InlineCallFrame past the beginning of the InlineCallFrame since the IR
we generate to set up such an InlineCallFrame contains writes to that
stack location.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
1:09 PM Changeset in webkit [240446] by Brent Fulgham
  • 19 edits in trunk

Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297
<rdar://problem/47158841>

Reviewed by Alex Christensen.

Source/WebCore:

Trigger logging to the UIProcess when the ResourceLoadObserver is used in the NetworkProcess.

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Notify NetworkProcess a connection was made to a resource.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback): Added.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Notify NetworkProcess of the load.
(WebCore::ResourceLoadObserver::logWebSocketLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): Ditto.

Source/WebKit:

This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
it off in the UIProcess. It also updates test infrastructure to work with this change
in architecture.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
(WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
(WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
(WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.

  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):

  • Webprocess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback): Simplify test configuration by
activating the message used to trigger the callback when it is set.

11:21 AM Changeset in webkit [240445] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.h

Unreviewed build fix. rdar://problem/47457965

11:17 AM Changeset in webkit [240444] by wilander@apple.com
  • 18 edits
    3 adds in trunk

Add Ad Click Attribution as an internal/experimental feature
https://bugs.webkit.org/show_bug.cgi?id=193685
<rdar://problem/47450399>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/adClickAttribution/anchor-tag-attributes-reflect.html

  • html/HTMLAnchorElement.h:
  • html/HTMLAnchorElement.idl:
  • html/HTMLAttributeNames.in:

Addeed two new experimental attributes:

  • adcampaignid: Ad campaign ID.
  • addestination: Ad link destination site.
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::adClickAttributionEnabled const):
(WebCore::RuntimeEnabledFeatures::setAdClickAttributionEnabled):

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:

Added AdClickAttributionEnabled as a runtime enabled feature, off by default.

Source/WebKitLegacy/mac:

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

(+[WebPreferences initialize]):
(-[WebPreferences adClickAttributionEnabled]):
(-[WebPreferences setAdClickAttributionEnabled:]):

Added support for experimental ad click attribution.

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

(-[WebView _preferencesChanged:]):

Tools:

Added test option adClickAttributionEnabled.

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

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

(setWebPreferencesForTestOptions):

LayoutTests:

  • http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt: Added.
  • http/tests/adClickAttribution/anchor-tag-attributes-reflect.html: Added.
  • platform/win/TestExpectations:

Skipped on Windows for now.

10:35 AM Changeset in webkit [240443] by Antti Koivisto
  • 9 edits in trunk

[PSON] Flash on back navigation on Mac
https://bugs.webkit.org/show_bug.cgi?id=193716
<rdar://problem/47148458>

Reviewed by Chris Dumez.

Source/WebKit:

We close the page immediately if we fail to suspend. Layers disappear and we get a flash.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::close):

Track closed state so we don't send the message twice, causing unhandled message errors in web process.

(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):

Close the suspended page if the suspension fails.
Skip this if we are using web process side compositing on Mac.

  • UIProcess/SuspendedPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::enterAcceleratedCompositingMode):

On Mac, close the failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::closeFailedSuspendedPagesForPage):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspendForProcessSwap):

Don't close the page on suspension failure. This is now managed by the UI process.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

Closing of the previous page is delayed so waiting for didFinishNavigation is
not sufficient to guarantee we have received all the messages. Wait for them.

10:30 AM Changeset in webkit [240442] by Chris Dumez
  • 4 edits in trunk

Regression(PSON) Back/Forward list items' URL sometimes gets replaced with the URL of a subframe
https://bugs.webkit.org/show_bug.cgi?id=193761
<rdar://problem/47456405>

Reviewed by Alex Christensen.

Source/WebKit:

When doing a history navigation cross-process, the UIProcess would first send the back/forward list items
to the destination WebProcess via WebPage::updateBackForwardListForReattach(), then ask the process to
navigate to the expected back/forward list item.

WebPage::updateBackForwardListForReattach() would call restoreSessionInternal(), which would call
toHistoryItem() on each BackForwardListItem. This may end up creating more than one HistoryItem for each
BackForwardListItem because HistoryItems are part of a tree (each frame has its own list of history items).

Note that BackForwardListItems and HistoryItem share a BackForwardItemIdentifier which is a
(processIdentifier, itemIdentifier) pair. We normally generate the HistoryItem's identifier from inside
its constructor like so:
{ Process::identifier(), generateObjectIdentifier<BackForwardItemIdentifier::ItemIdentifierType>() }

However, when calling updateBackForwardListForReattach() and constructing children HistoryItem,
applyFrameState() would generate the identifier by itself and passing it to the HistoryItem constructor.
Its genegates the ID the exact same way so this would in theory not be a problem. Unfortunately, both
calls to generateObjectIdentifier() get inlined and both call sites end up with their own static counter
to generate ids. As a result, we may end up with conflicts as HistoryItems for child frames (restored
by restoreSessionInternal()) can end up with the same identifier as HistoryItems for top frames.

This confusion would lead to the WebContent process sending the UIProcess bad information and the URL
of subframes could end up as the WebBackForwardListItem's mainframe URL.

  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::applyFrameState):
Stop calling generateObjectIdentifier() explicitly and let the HistoryItem constructor take care of it.
Calling generateObjectIdentifier() for the same type from different places is not safe due to inlining.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
10:30 AM Changeset in webkit [240441] by youenn@apple.com
  • 4 edits in trunk/Source

Use MonotonicTime in WorkerRunLoop
https://bugs.webkit.org/show_bug.cgi?id=193417

Reviewed by Saam Barati.

Source/WebCore:

Condition is based on MonotonicTime so MessageQueue should also be based on MonotonicTime.
Ditto for WorkerRunLoop.
No easy way to test the change which should not be easily observable.

  • workers/WorkerRunLoop.cpp:

(WebCore::WorkerRunLoop::runInMode):

Source/WTF:

  • wtf/MessageQueue.h:

(WTF::MessageQueue<DataType>::waitForMessage):
(WTF::MessageQueue<DataType>::waitForMessageFilteredWithTimeout):

10:26 AM Changeset in webkit [240440] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Missing PID in crashlog name should not be fatal
https://bugs.webkit.org/show_bug.cgi?id=193771

If we can't determine the PID of a crashlog, just ignore the crashlog instead
of raising an exception.

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._merge_crash_logs):

9:52 AM Changeset in webkit [240439] by Kocsen Chung
  • 2 edits in branches/safari-607-branch/Source/WebCore/PAL

Cherry-pick r240430. rdar://problem/47484242

Follow-up #2: Override the session configuration for cookieAcceptPolicy
<https://bugs.webkit.org/show_bug.cgi?id=190925>
<rdar://problem/45497382>

  • pal/spi/cf/CFNetworkSPI.h: Protect Objective-C code using defined(OBJC) macro.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240430 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9:30 AM Changeset in webkit [240438] by Michael Catanzaro
  • 2 edits in trunk/Tools

test_exporter.py: webkitpy.common.system.executive.ScriptError from create_branch_with_patch
https://bugs.webkit.org/show_bug.cgi?id=193746

Reviewed by Youenn Fablet.

It calls 'git apply --index --abort', but --abort is not a valid argument to 'git apply',
so we'd best just not call it.

  • Scripts/webkitpy/w3c/test_exporter.py:

(WebPlatformTestExporter.create_branch_with_patch):

9:25 AM Changeset in webkit [240437] by Ross Kirsling
  • 187 edits
    13 moves
    2 adds in trunk

Move FileSystem to WTF
https://bugs.webkit.org/show_bug.cgi?id=193602

Reviewed by Yusuke Suzuki.

Source/WebCore:

  • Modules/encryptedmedia/CDM.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
  • Modules/entriesapi/DOMFileSystem.cpp:
  • Modules/entriesapi/FileSystemEntry.cpp:
  • Modules/indexeddb/IDBDatabaseIdentifier.cpp:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
  • Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
  • Modules/indexeddb/shared/InProcessIDBServer.cpp:
  • Modules/webdatabase/DatabaseTracker.cpp:
  • Modules/webdatabase/OriginLock.cpp:
  • Modules/webdatabase/OriginLock.h:
  • Modules/webdatabase/cocoa/DatabaseManagerCocoa.mm:
  • PlatformMac.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWin.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/GCController.cpp:
  • dom/DataTransferItem.cpp:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • fileapi/File.cpp:
  • fileapi/FileCocoa.mm:
  • html/FileInputType.cpp:
  • html/FileListCreator.cpp:
  • loader/appcache/ApplicationCacheHost.cpp:
  • loader/appcache/ApplicationCacheStorage.cpp:
  • page/Page.cpp:
  • page/SecurityOrigin.cpp:
  • page/SecurityOriginData.cpp:
  • platform/FileHandle.h:
  • platform/FileStream.cpp:
  • platform/FileStream.h:
  • platform/SharedBuffer.h:
  • platform/SourcesGLib.txt:
  • platform/cocoa/FileMonitorCocoa.mm:
  • platform/glib/FileMonitorGLib.cpp:
  • platform/glib/SharedBufferGlib.cpp:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
  • platform/ios/QuickLook.mm:
  • platform/ios/WebItemProviderPasteboard.mm:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/network/BlobDataFileReference.cpp:
  • platform/network/BlobRegistryImpl.cpp:
  • platform/network/BlobResourceHandle.cpp:
  • platform/network/FormData.cpp:
  • platform/network/cf/FormDataStreamCFNet.cpp:
  • platform/network/cocoa/ResourceRequestCocoa.mm:
  • platform/network/curl/CookieJarDB.cpp:
  • platform/network/curl/CurlCacheEntry.h:
  • platform/network/curl/CurlCacheManager.cpp:
  • platform/network/curl/CurlFormDataStream.h:
  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:
  • platform/network/curl/ResourceHandleCurl.cpp:
  • platform/network/mac/BlobDataFileReferenceMac.mm:
  • platform/network/soup/ResourceHandleSoup.cpp:
  • platform/network/soup/SoupNetworkSession.cpp:
  • platform/posix/SharedBufferPOSIX.cpp:
  • platform/sql/SQLiteFileSystem.cpp:
  • platform/text/hyphen/HyphenationLibHyphen.cpp:
  • platform/win/SearchPopupMenuDB.cpp:
  • rendering/RenderTheme.cpp:
  • rendering/RenderThemeGtk.cpp:
  • rendering/RenderThemeWin.cpp:
  • workers/service/server/RegistrationDatabase.cpp:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp:
  • NetworkProcess/NetworkDataTaskBlob.h:
  • NetworkProcess/NetworkProcess.cpp:
  • NetworkProcess/cache/CacheStorageEngine.cpp:
  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:
  • NetworkProcess/cache/NetworkCache.cpp:
  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
  • NetworkProcess/cache/NetworkCacheData.cpp:
  • NetworkProcess/cache/NetworkCacheFileSystem.cpp:
  • NetworkProcess/cache/NetworkCacheFileSystem.h:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
  • NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
  • NetworkProcess/cache/NetworkCacheStatistics.cpp:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • NetworkProcess/soup/NetworkProcessSoup.cpp:
  • PluginProcess/unix/PluginProcessMainUnix.cpp:
  • Shared/PersistencyUtils.cpp:
  • Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
  • Shared/Plugins/unix/PluginSearchPath.cpp:
  • Shared/WebMemorySampler.h:
  • Shared/glib/ProcessExecutablePathGLib.cpp:
  • Shared/ios/ChildProcessIOS.mm:
  • Shared/mac/ChildProcessMac.mm:
  • Shared/mac/SandboxExtensionMac.mm:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
  • UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
  • UIProcess/API/glib/IconDatabase.cpp:
  • UIProcess/API/glib/WebKitFaviconDatabase.cpp:
  • UIProcess/API/glib/WebKitFileChooserRequest.cpp:
  • UIProcess/API/glib/WebKitWebContext.cpp:
  • UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
  • UIProcess/API/win/APIWebsiteDataStoreWin.cpp:
  • UIProcess/Automation/WebAutomationSession.cpp:
  • UIProcess/Cocoa/DownloadClient.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/DeviceIdHashSaltStorage.cpp:
  • UIProcess/Downloads/DownloadProxy.cpp:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
  • UIProcess/Plugins/gtk/PluginInfoCache.cpp:
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
  • UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
  • UIProcess/ServiceWorkerProcessProxy.cpp:
  • UIProcess/WebStorage/LocalStorageDatabase.cpp:
  • UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:
  • UIProcess/glib/WebProcessProxyGLib.cpp:
  • UIProcess/gtk/WebInspectorProxyGtk.cpp:
  • UIProcess/gtk/WebProcessPoolGtk.cpp:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • UIProcess/ios/forms/WKFileUploadPanel.mm:
  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/win/WebProcessPoolWin.cpp:
  • UIProcess/win/WebView.cpp:
  • UIProcess/wpe/WebProcessPoolWPE.cpp:
  • WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:
  • WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
  • WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
  • WebProcess/Plugins/Netscape/NetscapePluginStream.h:
  • WebProcess/Plugins/PluginProcessConnection.cpp:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:
  • WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
  • WebProcess/WebPage/win/WebInspectorUIWin.cpp:
  • WebProcess/cocoa/WebProcessCocoa.mm:

Source/WebKitLegacy:

  • Storage/StorageAreaSync.cpp:
  • Storage/StorageSyncManager.cpp:
  • Storage/StorageTracker.cpp:

Source/WebKitLegacy/mac:

  • Misc/WebNSFileManagerExtras.mm:
  • Storage/WebDatabaseProvider.mm:
  • WebView/WebView.mm:

Source/WebKitLegacy/win:

  • Plugins/PluginDatabase.cpp:
  • Plugins/PluginPackage.h:
  • Plugins/PluginStream.h:
  • WebApplicationCache.cpp:
  • WebDatabaseManager.cpp:
  • WebDownloadCurl.cpp:
  • WebPreferences.cpp:
  • WebView.cpp:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/FileMetadata.h: Renamed from Source/WebCore/platform/FileMetadata.h.
  • wtf/FileSystem.cpp: Renamed from Source/WebCore/platform/FileSystem.cpp.
  • wtf/FileSystem.h: Renamed from Source/WebCore/platform/FileSystem.h.
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformMac.cmake:
  • wtf/PlatformPlayStation.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/PlatformWin.cmake:
  • wtf/cf/FileSystemCF.cpp: Renamed from Source/WebCore/platform/cf/FileSystemCF.cpp.
  • wtf/cocoa/FileSystemCocoa.mm: Renamed from Source/WebCore/platform/cocoa/FileSystemCocoa.mm.
  • wtf/glib/FileSystemGlib.cpp: Renamed from Source/WebCore/platform/glib/FileSystemGlib.cpp.
  • wtf/mac/FileSystemMac.mm: Renamed from Source/WebCore/platform/mac/FileSystemMac.mm.
  • wtf/posix/FileSystemPOSIX.cpp: Renamed from Source/WebCore/platform/posix/FileSystemPOSIX.cpp.
  • wtf/spi/mac/MetadataSPI.h: Renamed from Source/WebCore/PAL/pal/spi/mac/MetadataSPI.h.
  • wtf/win/FileSystemWin.cpp: Renamed from Source/WebCore/platform/win/FileSystemWin.cpp.
  • wtf/win/PathWalker.cpp: Renamed from Source/WebCore/platform/win/PathWalker.cpp.
  • wtf/win/PathWalker.h: Renamed from Source/WebCore/platform/win/PathWalker.h.

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformJSCOnly.cmake:
  • TestWebKitAPI/PlatformPlayStation.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/FileSystem.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/FileSystem.cpp.
  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
  • TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp:
  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:
  • TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp:
  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
  • TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
9:15 AM Changeset in webkit [240436] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][BFC][MarginCollapsing] MarginCollapse::collapsedVerticalValues should not return computed non-collapsed values.
https://bugs.webkit.org/show_bug.cgi?id=193768

Reviewed by Antti Koivisto.

When it comes to the actual used values it does not really matter, only from correctness point of view.
(This patch also moves some checks to their correct place.)

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):

8:10 AM Changeset in webkit [240435] by Simon Fraser
  • 19 edits
    4 adds in trunk/Source

Source/WebCore:
Add "frame hosting" nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=193753

Reviewed by Antti Koivisto.

When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
require the iframe's scrolling node to get reparented in a new ancestor, which requires
a layer tree walk of the parent frame. This is error-prone, and not very future-proof.

Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
to provide a consistent parent node for the subframe's scrolling node.

This patch adds the node types, but does not instantiate them yet.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::operator<<):

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/ScrollingStateFrameHostingNode.cpp: Added.

(WebCore::ScrollingStateFrameHostingNode::create):
(WebCore::ScrollingStateFrameHostingNode::ScrollingStateFrameHostingNode):
(WebCore::ScrollingStateFrameHostingNode::clone):
(WebCore::ScrollingStateFrameHostingNode::dumpProperties const):

  • page/scrolling/ScrollingStateFrameHostingNode.h: Added.
  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::isFrameHostingNode const):

  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::createNode):

  • page/scrolling/ScrollingTreeFrameHostingNode.cpp: Added.

(WebCore::ScrollingTreeFrameHostingNode::create):
(WebCore::ScrollingTreeFrameHostingNode::ScrollingTreeFrameHostingNode):
(WebCore::ScrollingTreeFrameHostingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameHostingNode::updateLayersAfterAncestorChange):
(WebCore::ScrollingTreeFrameHostingNode::dumpProperties const):

  • page/scrolling/ScrollingTreeFrameHostingNode.h: Added.
  • page/scrolling/ScrollingTreeNode.h:

(WebCore::ScrollingTreeNode::isFrameHostingNode const):

  • page/scrolling/ios/ScrollingTreeIOS.cpp:

(WebCore::ScrollingTreeIOS::createScrollingTreeNode):

  • page/scrolling/mac/ScrollingTreeMac.cpp:

(ScrollingTreeMac::createScrollingTreeNode):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::operator<<):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

  • rendering/RenderLayerCompositor.h:

Source/WebKit:
Create "frame hosting" nodes for the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=193753

Reviewed by Antti Koivisto.

When the scrolling tree crosses frame boundaries, mutations in the parent frame currently
require the iframe's scrolling node to get reparented in a new ancestor, which requires
a layer tree walk of the parent frame. This is error-prone, and not very future-proof.

Fix this by introducing "frame hosting" scrolling tree nodes. These are mostly inert
nodes that are owned by the RenderIFrame's layer backing in the parent frame, and exist
to provide a consistent parent node for the subframe's scrolling node.

This patch adds the node types, but does not instantiate them yet.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
(ArgumentCoder<ScrollingStateFrameHostingNode>::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::createScrollingTreeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

7:31 AM Changeset in webkit [240434] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

[iOS] Enable media element volume on iPad
https://bugs.webkit.org/show_bug.cgi?id=193745
<rdar://problem/47452297>

Reviewed by Jer Noble.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
(WebCore::HTMLMediaElement::updateVolume):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume):

6:34 AM Changeset in webkit [240433] by Philippe Normand
  • 2 edits in trunk/Tools

[WPE] Remove hard dependency on subprocess32 for the API tests

Rubber-stamped by Carlos Garcia Campos.

  • glib/api_test_runner.py:

(TestRunner._run_test_qt): Lazily import subprocess32 and check
its presence only when running WPEQt tests.

4:04 AM Changeset in webkit [240432] by guijemont@igalia.com
  • 35 edits
    1 add in trunk

[JSC] Reenable baseline JIT on mips
https://bugs.webkit.org/show_bug.cgi?id=192983

Reviewed by Mark Lam.

.:

Use baseline JIT by default on MIPS.

  • Source/cmake/WebKitFeatures.cmake:

JSTests:

Added a new test for a case that was triggering a RELEASE_ASSERT when
testing.
Disable some slow tests that were already disabled for arm and x86.

  • stress/json-parse-big-object.js: Added.
  • stress/new-largeish-contiguous-array-with-size.js:
  • stress/op_add.js:
  • stress/op_bitand.js:
  • stress/op_bitor.js:
  • stress/op_bitxor.js:
  • stress/op_lshift-ConstVar.js:
  • stress/op_lshift-VarConst.js:
  • stress/op_lshift-VarVar.js:
  • stress/op_mod-ConstVar.js:
  • stress/op_mod-VarConst.js:
  • stress/op_mod-VarVar.js:
  • stress/op_mul-ConstVar.js:
  • stress/op_mul-VarConst.js:
  • stress/op_mul-VarVar.js:
  • stress/op_rshift-ConstVar.js:
  • stress/op_rshift-VarConst.js:
  • stress/op_rshift-VarVar.js:
  • stress/op_sub-ConstVar.js:
  • stress/op_sub-VarConst.js:
  • stress/op_sub-VarVar.js:
  • stress/op_urshift-ConstVar.js:
  • stress/op_urshift-VarConst.js:
  • stress/op_urshift-VarVar.js:
  • stress/sampling-profiler-richards.js:
  • stress/spread-forward-call-varargs-stack-overflow.js:

Source/JavaScriptCore:

Use $s0 as metadata register and make sure it's properly saved and
restored.

  • jit/GPRInfo.h:
  • jit/RegisterSet.cpp:

(JSC::RegisterSet::vmCalleeSaveRegisters):
(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):

  • llint/LowLevelInterpreter.asm:
  • offlineasm/mips.rb:

Source/WTF:

Use baseline JIT by default on MIPS.

  • wtf/Platform.h:
3:09 AM Changeset in webkit [240431] by Carlos Garcia Campos
  • 9 edits
    2 adds in trunk

[GLIB] Expose JavaScriptCore options in GLib public API
https://bugs.webkit.org/show_bug.cgi?id=188742

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add new API to set, get and iterate JSC options.

  • API/glib/JSCOptions.cpp: Added.

(valueFromGValue):
(valueToGValue):
(jscOptionsSetValue):
(jscOptionsGetValue):
(jsc_options_set_boolean):
(jsc_options_get_boolean):
(jsc_options_set_int):
(jsc_options_get_int):
(jsc_options_set_uint):
(jsc_options_get_uint):
(jsc_options_set_size):
(jsc_options_get_size):
(jsc_options_set_double):
(jsc_options_get_double):
(jsc_options_set_string):
(jsc_options_get_string):
(jsc_options_set_range_string):
(jsc_options_get_range_string):
(jscOptionsType):
(jsc_options_foreach):
(setOptionEntry):
(jsc_options_get_option_group):

  • API/glib/JSCOptions.h: Added.
  • API/glib/docs/jsc-glib-4.0-sections.txt:
  • API/glib/docs/jsc-glib-docs.sgml:
  • API/glib/jsc.h:
  • GLib.cmake:

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add JSCOptions.cpp

Tools:

Add a test for the new API.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testsJSCOptions):
(main):

2:59 AM Changeset in webkit [240430] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Follow-up #2: Override the session configuration for cookieAcceptPolicy
<https://bugs.webkit.org/show_bug.cgi?id=190925>
<rdar://problem/45497382>

  • pal/spi/cf/CFNetworkSPI.h: Protect Objective-C code using

defined(OBJC) macro.

2:39 AM Changeset in webkit [240429] by ddkilzer@apple.com
  • 4 edits
    1 add in trunk/Source/WTF

Duplicate global variables: WTF::asciiCaseFoldTable
<https://webkit.org/b/193726>
<rdar://problem/47334622>

Reviewed by Michael Catanzaro.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • Add ASCIICType.cpp to build systems.
  • wtf/ASCIICType.cpp: Added.

(WTF::asciiCaseFoldTable): Move table to here so there is only
one copy. Mark as exported for other frameworks to use.

  • wtf/ASCIICType.h:

(WTF::asciiCaseFoldTable): Change to extern declaration, and
mark as exported for other frameworks to use.

2:02 AM Changeset in webkit [240428] by Carlos Garcia Campos
  • 10 edits
    3 adds in trunk

[GTK][WPE] Support JPEG 2000 images
https://bugs.webkit.org/show_bug.cgi?id=186272

Reviewed by Žan Doberšek.

.:

Add USE_OPENJPEG build option.

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

Source/WebCore:

Add JPEG2000ImageDecoder to support JPEG2000 images using OpenJPEG. For now only SRGB and SYCC color spaces are
supported.

  • platform/ImageDecoders.cmake:
  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::supportedImageMIMETypes):

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::create):

  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp: Added.

(WebCore::syccToRGB):
(WebCore::sycc444ToRGB):
(WebCore::sycc422ToRGB):
(WebCore::sycc420ToRGB):
(WebCore::JPEG2000ImageDecoder::JPEG2000ImageDecoder):
(WebCore::JPEG2000ImageDecoder::frameBufferAtIndex):
(WebCore::JPEG2000ImageDecoder::decode):

  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.h: Added.

Tools:

Add OpenJPEG to jhbuild since 2.2.0 version is required and it's not available in debian stable.

  • gtk/jhbuild.modules:
  • wpe/jhbuild.modules:

Jan 23, 2019:

10:43 PM Changeset in webkit [240427] by Alan Coon
  • 1 edit in branches/safari-607-branch/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

Unreviewed build fix. rdar://problem/47458234

10:42 PM Changeset in webkit [240426] by Alan Coon
  • 25 edits
    6 deletes in branches/safari-607-branch

Cherry-pick r240327. rdar://problem/47494707

REGRESSION(r239612) Crash at runtime due to broken DFG assumption
https://bugs.webkit.org/show_bug.cgi?id=193709
<rdar://problem/47363838>

Unreviewed, rollout to watch the tests.

JSTests:

  • stress/object-tostring-changed-proto.js: Removed.
  • stress/object-tostring-changed.js: Removed.
  • stress/object-tostring-misc.js: Removed.
  • stress/object-tostring-other.js: Removed.
  • stress/object-tostring-untyped.js: Removed.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall):
  • dfg/DFGClobberize.h: (JSC::DFG::clobberize):
  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): (JSC::DFG::FixupPhase::fixupObjectToString): Deleted.
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileObjectToString): Deleted.
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile):
  • dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf): (JSC::FTL::DFG::LowerDFGToB3::compileObjectToString): Deleted.
  • runtime/Intrinsic.cpp: (JSC::intrinsicName):
  • runtime/Intrinsic.h:
  • runtime/ObjectPrototype.cpp: (JSC::ObjectPrototype::finishCreation): (JSC::objectProtoFuncToString):
  • runtime/ObjectPrototype.h:
  • runtime/ObjectPrototypeInlines.h: Removed.
  • runtime/StructureRareData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240327 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240425] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240325. rdar://problem/47494727

Regression(r240178) Some API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193680

Reviewed by Alex Christensen.

r240178 made sure that userScripts / scriptMessageHandlers / contentExtensions are always
properly populated in the WebPageCreationParameters. This was needed in case we need to
reconstruct the WebUserContentController on the WebProcess side. However, this caused a
regression in the case we reuse a process where the WebUserContentController still exists
(because it was kept alive, e.g. by the WebPageGroup). In that case, we would add duplicate
entries to the existing WebUserContentController instance because its "add" methods did not
have duplicate checks. To address the issue, this patch adds duplicate checks to the
WebUserContentController "add" methods.

  • WebProcess/UserContent/WebUserContentController.cpp: (WebKit::WebUserContentController::addUserScriptMessageHandlerInternal): (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal): (WebKit::WebUserContentController::addUserScriptInternal): (WebKit::WebUserContentController::removeUserScriptInternal): (WebKit::WebUserContentController::addUserStyleSheetInternal): (WebKit::WebUserContentController::removeUserStyleSheetInternal): (WebKit::WebUserContentController::forEachUserMessageHandler const):
  • WebProcess/UserContent/WebUserContentController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240325 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240424] by Alan Coon
  • 22 edits in branches/safari-607-branch

Cherry-pick r240320. rdar://problem/47494587

Resync libwebrtc with latest M72 branch
https://bugs.webkit.org/show_bug.cgi?id=193693
LayoutTests/imported/w3c:

<rdar://problem/47463803>

Reviewed by Eric Carlson.

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

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

Update libwebrtc up to latest M72 branch to fix some identified issues:

  • Bad bandwidth estimation in case of multiple transceivers
  • mid handling for legacy endpoints
  • msid handling for updating mediastreams accordingly.
  • Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.cc:
  • Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.h:
  • Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control.cc:
  • Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc:
  • Source/webrtc/modules/congestion_controller/send_side_congestion_controller_unittest.cc:
  • Source/webrtc/pc/jsepsessiondescription_unittest.cc:
  • Source/webrtc/pc/mediasession.cc:
  • Source/webrtc/pc/mediasession_unittest.cc:
  • Source/webrtc/pc/peerconnection.cc:
  • Source/webrtc/pc/peerconnection.h:
  • Source/webrtc/pc/peerconnection_jsep_unittest.cc:
  • Source/webrtc/pc/peerconnection_media_unittest.cc:
  • Source/webrtc/pc/peerconnection_rtp_unittest.cc:
  • Source/webrtc/pc/sessiondescription.cc:
  • Source/webrtc/pc/sessiondescription.h:
  • Source/webrtc/pc/webrtcsdp.cc:
  • Source/webrtc/pc/webrtcsdp_unittest.cc:
  • Source/webrtc/system_wrappers/include/metrics.h:
  • Source/webrtc/video/BUILD.gn:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240423] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240298. rdar://problem/47494772

[iOS] Flash when swiping back to Google search result page
https://bugs.webkit.org/show_bug.cgi?id=193668
<rdar://problem/47071684>

Reviewed by Simon Fraser.

If the google page is scrolled, there is sometimes a short flash.

When restoring the page state we also restore exposedContentRect which is used to determine
which part of the page to create layers for. Scroll position is restored by the UI process
later so we rely on this to get the right layers for the initial view update.

A viewport configuration update may sometimes trample over the restored exposedContentRect,
moving it to top left. In this case the initial layer tree unfreeze commit may not have
layers to cover the actual visible view position.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::restorePageState):

Set a bit to indicate we have already restored the exposedContentRect.

(WebKit::WebPage::viewportConfigurationChanged):

Only reset exposedContentRect if wasn't already set by restorePageState.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240422] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240290. rdar://problem/47494764

Web Inspector: Network Table appears broken after filter - rows look collapsed
https://bugs.webkit.org/show_bug.cgi?id=192730
<rdar://problem/46853158>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-22
Reviewed by Devin Rousso.

  • UserInterface/Views/Table.js: (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded): Affect the filler row like the other applyColumnWidths calls since this now may be the initial call to size visible columns.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240290 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240421] by Alan Coon
  • 5 edits in branches/safari-607-branch

Cherry-pick r240206. rdar://problem/47357218

Reviewed by Eric Carlson.

If there is a deviceId constraint, remove any empty string from ideal/exact string list.
This will make the device selection be solely based on other constraints.
An improvement might be for 'exact' constraint to pick the default device.
There is currently no such notion of a default device.
Picking the best fitting device seems a good tradeoff.
Covered by updated test.

  • platform/mediastream/MediaConstraints.cpp:

(WebCore::MediaTrackConstraintSetMap::set):

  • platform/mediastream/MediaConstraints.h:

(WebCore::StringConstraint::removeEmptyStringConstraint):

10:42 PM Changeset in webkit [240420] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore/PAL

Cherry-pick r240184. rdar://problem/47484242

Follow-up: Override the session configuration for cookieAcceptPolicy
<https://bugs.webkit.org/show_bug.cgi?id=190925>
<rdar://problem/45497382>

Discussed with John Wilander.

  • pal/spi/cf/CFNetworkSPI.h: Declare new SPI for the internal macOS 10.12 Sierra SDK since it will never appear in those headers. This fixes the build for trunk WebKit on Sierra.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240184 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240419] by Alan Coon
  • 4 edits in branches/safari-607-branch

Cherry-pick r240178. rdar://problem/47494727

Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
https://bugs.webkit.org/show_bug.cgi?id=193588
<rdar://problem/47131566>

Reviewed by Alex Christensen.

Source/WebKit:

When the WebPageProxy needs to create initialization parameters for its WebPage in the
WebContent process, it calls WebProcessProxy::addWebUserContentControllerProxy()
which calls WebUserContentControllerProxy::addProcess(). This last call is supposed to
register the WebProcessProxy with the WebUserContentControllerProxy and adding the
contentRuleLists to the WebPageCreationParameters. The issue is that if the
WebUserContentControllerProxy already knows about this WebProcessProxy, it would return
early and not populate the WebPageCreationParameters.

In PSON world, when navigating back to a page that failed to enter page cache, we reuse
the process where we previously loaded the page but re-create a new WebPage on the
WebContent process site. When this happens, WebUserContentControllerProxy would not
add the contentRuleLists to the WebPageCreationParameters and the new WebPage in the
previously-suspended process would be missing them.

  • UIProcess/UserContent/WebUserContentControllerProxy.cpp: (WebKit::WebUserContentControllerProxy::addProcess):

Tools:

Add layout test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240178 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240418] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239994. rdar://problem/47295338

Add allow directive for MTLCompilerService.xpc to PluginProcess and WebContent
https://bugs.webkit.org/show_bug.cgi?id=193453
<rdar://problem/47268166>

Reviewed by Brent Fulgham.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239994 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240417] by Alan Coon
  • 3 edits in branches/safari-607-branch/LayoutTests

Cherry-pick r239966. rdar://problem/47295366

Restructure http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html to address flakiness
https://bugs.webkit.org/show_bug.cgi?id=191211
<rdar://problem/45818606>

Unreviewed test gardening.

This test is flaky on the MacOS WK2 bot. The patch avoids a page navigation and
redirect which may avoid the code that changed in
https://trac.webkit.org/changeset/237735/webkit and made the test more flaky.

  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt:
  • http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240416] by Alan Coon
  • 12 edits in branches/safari-607-branch

Cherry-pick r239965. rdar://problem/47295360

Animation and other code is too aggressive about invalidating layer composition
https://bugs.webkit.org/show_bug.cgi?id=193343

Reviewed by Antoine Quint.

Source/WebCore:

We used to have the concept of a "SyntheticStyleChange", which was used to trigger
style updates for animation, and also to get compositing updated.

That morphed into a call to Element::invalidateStyleAndLayerComposition(), which causes
a style update to result in a "RecompositeLayer" diff, which in turn triggers compositing work,
and dirties DOM touch event regions (which can be expensive to update).

However, not all the callers of Element::invalidateStyleAndLayerComposition() need to trigger
compositing, and doing so from animations caused excessive touch event regions on yahoo.com,
which has several visibility:hidden elements with background-position animation.

So fix callers of invalidateStyleAndLayerComposition() which don't care about compositing to instead
call just invalidateStyle().

Also fix KeyframeAnimation::animate to correctly return true when animation state changes—it failed to
do so, because fireAnimationEventsIfNeeded() can run the state machine and change state.

  • animation/KeyframeEffect.cpp: (WebCore::invalidateElement):
  • page/animation/AnimationBase.cpp: (WebCore::AnimationBase::setNeedsStyleRecalc):
  • page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationControllerPrivate::updateAnimations): (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle): (WebCore::CSSAnimationControllerPrivate::pauseAnimationAtTime): (WebCore::CSSAnimationControllerPrivate::pauseTransitionAtTime): (WebCore::CSSAnimationController::cancelAnimations):
  • page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::animate):
  • rendering/RenderImage.cpp: (WebCore::RenderImage::imageChanged):
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const):
  • rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientStyleChanged):
  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
  • svg/SVGAnimateElementBase.cpp: (WebCore::applyCSSPropertyToTarget): (WebCore::removeCSSPropertyFromTarget):

LayoutTests:

This test was clobbering the 'box' class on the animating element and therefore making it disappear.

  • legacy-animation-engine/compositing/animation/animation-compositing.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240415] by Alan Coon
  • 13 edits
    1 add in branches/safari-607-branch

Cherry-pick r239951. rdar://problem/47295353

[JSC] Do not use asArrayModes() with Structures because it discards TypedArray information
https://bugs.webkit.org/show_bug.cgi?id=193372

Reviewed by Saam Barati.

JSTests:

  • stress/typed-array-array-modes-profile.js: Added. (foo):

Source/JavaScriptCore:

When RegisteredStructureSet is filtered with AbstractValue, we use structure, SpeculationType, and ArrayModes.
However, we use asArrayModes() function with IndexingMode to compute the ArrayModes in AbstractValue. This is
wrong since this discards TypedArray ArrayModes. As a result, if RegisteredStructureSet with TypedArrays is
filtered with ArrayModes of AbstractValue populated from TypedArrays, we filter all the structures out since
AbstractValue's ArrayModes become NonArray, which is wrong with the TypedArrays' ArrayModes. This leads to
incorrect FTL code generation with MultiGetByOffset etc. nodes because,

  1. AI think that this MultiGetByOffset never succeeds since all the values of RegisteredStructureSet are filtered out by the AbstractValue.
  2. AI says the state of MultiGetByOffset is invalid since AI think it never succeeds.
  3. So subsequent code becomes FTL crash code since AI think the execution should do OSR exit.
  4. Then, FTL emits the code for MultiGetByOffset, and emits crash after that.
  5. But in reality, the incoming value can match to the one of the RegisteredStructureSet value since (1)'s structures are incorrectly filtered by the incorrect ArrayModes.
  6. Then, the execution goes on, and falls into the FTL crash.

This patch fixes the incorrect ArrayModes calculation by the following changes

  1. Rename asArrayModes to asArrayModesIgnoringTypedArrays.
  2. Fix incorrect asArrayModesIgnoringTypedArrays use in our code. Use arrayModesFromStructure instead.
  3. Fix OSR exit code which stores incorrect ArrayModes to the profiles.
  • bytecode/ArrayProfile.cpp: (JSC::dumpArrayModes): (JSC::ArrayProfile::computeUpdatedPrediction):
  • bytecode/ArrayProfile.h: (JSC::asArrayModesIgnoringTypedArrays): (JSC::arrayModesFromStructure): (JSC::arrayModesIncludeIgnoringTypedArrays): (JSC::shouldUseSlowPutArrayStorage): (JSC::shouldUseFastArrayStorage): (JSC::shouldUseContiguous): (JSC::shouldUseDouble): (JSC::shouldUseInt32): (JSC::asArrayModes): Deleted. (JSC::arrayModeFromStructure): Deleted. (JSC::arrayModesInclude): Deleted.
  • dfg/DFGAbstractValue.cpp: (JSC::DFG::AbstractValue::observeTransitions): (JSC::DFG::AbstractValue::set): (JSC::DFG::AbstractValue::mergeOSREntryValue): (JSC::DFG::AbstractValue::contains const):
  • dfg/DFGAbstractValue.h: (JSC::DFG::AbstractValue::observeTransition): (JSC::DFG::AbstractValue::validate const): (JSC::DFG::AbstractValue::observeIndexingTypeTransition):
  • dfg/DFGArrayMode.cpp: (JSC::DFG::ArrayMode::fromObserved): (JSC::DFG::ArrayMode::alreadyChecked const):
  • dfg/DFGArrayMode.h: (JSC::DFG::ArrayMode::structureWouldPassArrayModeFiltering): (JSC::DFG::ArrayMode::arrayModesThatPassFiltering const): (JSC::DFG::ArrayMode::arrayModesWithIndexingShape const):
  • dfg/DFGOSRExit.cpp: (JSC::DFG::OSRExit::executeOSRExit): (JSC::DFG::OSRExit::compileExit):
  • dfg/DFGRegisteredStructureSet.cpp: (JSC::DFG::RegisteredStructureSet::filterArrayModes): (JSC::DFG::RegisteredStructureSet::arrayModesFromStructures const):
  • ftl/FTLOSRExitCompiler.cpp: (JSC::FTL::compileStub):
  • jit/JITInlines.h: (JSC::JIT::chooseArrayMode): (JSC::arrayProfileSaw): Deleted.
  • runtime/JSType.h: (JSC::isTypedArrayType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:42 PM Changeset in webkit [240414] by Alan Coon
  • 14 edits in branches/safari-607-branch

Cherry-pick r239947. rdar://problem/47295371

Re-enable ability to build --cloop builds.
https://bugs.webkit.org/show_bug.cgi?id=192955
Source/JavaScriptCore:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

  • Configurations/FeatureDefines.xcconfig:

Tools:

<rdar://problem/46882363>

Reviewed by Saam barati and Keith Miller.

The --cloop build option was being ignored this whole time since r236381.
This patch makes it possible to build CLoop builds again.

  • Scripts/build-jsc:
  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239947 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:41 PM Changeset in webkit [240413] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239946. rdar://problem/47295375

https://bugs.webkit.org/show_bug.cgi?id=193403
<rdar://problem/46750743>

Continue fix in r239711 by using WeakPtr in SourceBufferPrivateAVFObjC.

Reviewed by Eric Carlson.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:41 PM Changeset in webkit [240412] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r239935. rdar://problem/47295382

Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
https://bugs.webkit.org/show_bug.cgi?id=193098
<rdar://problem/47016036>

Reviewed by Devin Rousso.

Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
move from wrapping text.

  • UserInterface/Views/CompletionSuggestionsView.js: (WI.CompletionSuggestionsView.prototype.hide): (WI.CompletionSuggestionsView.prototype.show): (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed. (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added. (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added. (WI.CompletionSuggestionsView):
  • UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype.set suggestionHint): (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion): (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView): (WI.SpreadsheetTextField.prototype._updateCompletions): (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.

(WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
Drive-by: abstract out repeating code into a private method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239935 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:41 PM Changeset in webkit [240411] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r239929. rdar://problem/47295348

Fix property access on ARM with the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=193393

Reviewed by Yusuke Suzuki.

Code was still using currentInstruction[4] to access the instruction's metadata.
Updated to use metadata.getPutInfo and metadata.resolveType.

  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope): (JSC::JIT::emit_op_put_to_scope):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239929 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:41 PM Changeset in webkit [240410] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239927. rdar://problem/47295363

DOMCacheStorage: use-after-move in doSequentialMatch()
https://bugs.webkit.org/show_bug.cgi?id=193396

Reviewed by Youenn Fablet.

Depending on the platform- and compiler-specific calling conventions,
the doSequentialMatch() code can move out the Vector<Ref<DOMCache>>
object into the callback lambda before the DOMCache object at the
specified index is retrieved for the DOMCache::doMatch() invocation.

This problem is now avoided by retrieving reference to the target
DOMCache object in an earlier expression.

  • Modules/cache/DOMCacheStorage.cpp: (WebCore::doSequentialMatch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239927 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:41 PM Changeset in webkit [240409] by Alan Coon
  • 5 edits in branches/safari-607-branch

Cherry-pick r239905. rdar://problem/47494732

Release assert with <img usemap> in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=193378

Reviewed by Ryosuke Niwa.

Source/WebCore:

When a shadow host that has <img usemap> in the shadow tree is removed from the document, we try
to remove the map from the scope of the host.

  • html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseAttribute): (WebCore::HTMLImageElement::insertedIntoAncestor): (WebCore::HTMLImageElement::removedFromAncestor):

Tree scope changes are relevant, not the connection to the document.

LayoutTests:

  • fast/shadow-dom/image-map-tree-scope.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:41 PM Changeset in webkit [240408] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Revert r239619. rdar://problem/47465051

10:10 PM Changeset in webkit [240407] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Change some RenderLayerCompositor functions to use references
https://bugs.webkit.org/show_bug.cgi?id=193760

Reviewed by Zalan Bujtas.

RenderWidget* -> RenderWidget&

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateConfiguration):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::frameContentsCompositor):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):

  • rendering/RenderLayerCompositor.h:
9:29 PM Changeset in webkit [240406] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 74

Added a tag for Safari Technology Preview release 74.

8:46 PM Changeset in webkit [240405] by Ross Kirsling
  • 4 edits in trunk/Source

[Curl] Unreviewed build fix for r240292 and friends.

WinCairo test stability must be restored in subsequent patch.

Source/WebKit:

  • NetworkProcess/curl/NetworkProcessCurl.cpp:

(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
(WebKit::NetworkProcess::setNetworkProxySettings):

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp:

(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::switchToNewTestingSession):
(NetworkStorageSessionMap::ensureSession):

8:31 PM Changeset in webkit [240404] by commit-queue@webkit.org
  • 4 edits in trunk/Source

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

"Causes multiple crashes on macOS port (probably used wrong
ENABLE macro)" (Requested by ddkilzer on #webkit).

Reverted changeset:

"[Curl] Unreviewed build fix for r240292 and friends."
https://trac.webkit.org/changeset/240403

6:50 PM Changeset in webkit [240403] by Ross Kirsling
  • 4 edits in trunk/Source

[Curl] Unreviewed build fix for r240292 and friends.

WinCairo test stability must be restored in subsequent patch.

Source/WebKit:

  • NetworkProcess/curl/NetworkProcessCurl.cpp:

(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
(WebKit::NetworkProcess::setNetworkProxySettings):

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp:

(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::switchToNewTestingSession):
(NetworkStorageSessionMap::ensureSession):

6:47 PM Changeset in webkit [240402] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style should warn when using soft-linking macros in a header
<https://webkit.org/b/193750>

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language): Add softlink/header check by refactoring the
softlink/framework check.
(CppChecker): Enable softlink/header check by default.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest.test_softlink_framework): Rename from
CppStyleTest.test_softlink() and change test framework name in
case AVFoundation gets its own AVFoundationSoftLink.{h,mm}
files. Set file_name for macros that only appear in headers.
(CppStyleTest.test_softlink_header): Add tests for using
soft-link macros in headers.

5:43 PM Changeset in webkit [240401] by benjamin@webkit.org
  • 2 edits in trunk/Source/WebCore

<rdar://problem/27686430> Revert workaround AVPlayer.setMuted bug on macOS
https://bugs.webkit.org/show_bug.cgi?id=193742

Reviewed by Eric Carlson.

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

The original bug was fixed, see radar: rdar://problem/27686430

5:23 PM Changeset in webkit [240400] by Alan Coon
  • 23 edits
    3 adds in branches/safari-607-branch

Cherry-pick r240254. rdar://problem/47458354

[JSC] Invalidate old scope operations using global lexical binding epoch
https://bugs.webkit.org/show_bug.cgi?id=193603
<rdar://problem/47380869>

Patch by Yusuke Suzuki <ysuzuki@apple.com> on 2019-01-22
Reviewed by Saam Barati.

JSTests:

  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js:
  • stress/scope-operation-cache-global-property-before-deleting.js: Added. (shouldThrow): (bar):
  • stress/scope-operation-cache-global-property-bump-counter.js: Added. (shouldBe): (get1): (get2): (get1If): (get2If):
  • stress/scope-operation-cache-global-property-even-if-it-fails.js: Added. (shouldThrow): (foo):

Source/JavaScriptCore:

Even if the global lexical binding does not shadow the global property at that time, we need to clear the cached information in
scope related operations since we may have a global property previously. Consider the following example,

foo = 0;
function get() { return foo; }
print(get()); 0
print(get());
0
delete globalThis.foo;
$.evalScript(const foo = 42;);
print(get()); Should be 42, but it returns 0 if the cached information in get() is not cleared.

To invalidate the cache easily, we introduce global lexical binding epoch. It is bumped every time we introduce a new lexical binding
into JSGlobalLexicalEnvironment, since that name could shadow the global property name previously. In op_resolve_scope, we first check
the epoch stored in the metadata, and go to slow path if it is not equal to the current epoch. Our slow path code convert the scope
operation to the appropriate one even if the resolve type is not UnresolvedProperty type. After updating the resolve type of the bytecode,
we update the cached epoch to the current one, so that we can use the cached information as long as we stay in the same epoch.

In op_get_from_scope and op_put_to_scope, we do not use this epoch since Structure check can do the same thing instead. If op_resolve_type
is updated by the epoch, and if it starts returning JSGlobalLexicalEnvironment instead JSGlobalObject, obviously the structure check fails.
And in the slow path, we update op_get_from_scope and op_put_to_scope appropriately.

So, the metadata for scope related bytecodes are eventually updated to the appropriate one. In DFG and FTL, we use the watchpoint based approach.
In DFG and FTL, we concurrently attempt to get the watchpoint for the lexical binding and look into it by using isStillValid() to avoid
infinite compile-and-fail loop.

When the global lexical binding epoch overflows we iterate all the live CodeBlock and update the op_resolve_scope's epoch. Even if the shadowing
happens, it is OK if we bump the epoch, since op_resolve_scope will return JSGlobalLexicalEnvironment instead of JSGlobalObject, and following
structure check in op_put_to_scope and op_get_from_scope fail. We do not need to update op_get_from_scope and op_put_to_scope because of the same
reason.

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::notifyLexicalBindingUpdate): (JSC::CodeBlock::notifyLexicalBindingShadowing): Deleted.
  • bytecode/CodeBlock.h:
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock):
  • dfg/DFGDesiredGlobalProperties.cpp: (JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread):
  • dfg/DFGDesiredGlobalProperties.h:
  • dfg/DFGGraph.cpp: (JSC::DFG::Graph::watchGlobalProperty):
  • dfg/DFGGraph.h:
  • dfg/DFGPlan.cpp: (JSC::DFG::Plan::isStillValidOnMainThread):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_resolve_scope):
  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_resolve_scope):
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp: (JSC::SLOW_PATH_DECL):
  • runtime/CommonSlowPaths.h: (JSC::CommonSlowPaths::tryCachePutToScopeGlobal): (JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::bumpGlobalLexicalBindingEpoch): (JSC::JSGlobalObject::getReferencedPropertyWatchpointSet): (JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet): (JSC::JSGlobalObject::notifyLexicalBindingShadowing): Deleted.
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::globalLexicalBindingEpoch const): (JSC::JSGlobalObject::globalLexicalBindingEpochOffset): (JSC::JSGlobalObject::addressOfGlobalLexicalBindingEpoch):
  • runtime/Options.cpp: (JSC::correctOptions): (JSC::Options::initialize): (JSC::Options::setOptions): (JSC::Options::setOptionWithoutAlias):
  • runtime/Options.h:
  • runtime/ProgramExecutable.cpp: (JSC::ProgramExecutable::initializeGlobalProperties):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240254 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240399] by Alan Coon
  • 24 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r240138. rdar://problem/47458154

Audit bytecode fields and ensure that LLInt instructions for accessing them are appropriate.
https://bugs.webkit.org/show_bug.cgi?id=193557
<rdar://problem/47369125>

Reviewed by Yusuke Suzuki.

  1. Rename some bytecode fields so that it's easier to discern whether the LLInt is accessing them the right way:
    • distinguish between targetVirtualRegister and targetLabel.
    • name all StructureID fields as structureID (oldStructureID, newStructureID) instead of structure (oldStructure, newStructure).
  1. Use bitwise_cast in struct Fits when sizeof(T) == size. This prevents potential undefined behavior issues arising from doing assignments with reinterpret_cast'ed pointers.
  1. Make Special::Pointer an unsigned type (previously int). Make ResolveType an unsigned type (previously int).
  1. In LowLevelInterpreter*.asm:
  • rename the op macro argument to opcodeName or opcodeStruct respectively. This makes it clearer which argument type the macro is working with.
  • rename the name macro argument to opcodeName.
  • fix operator types to match the field type being accessed. The following may have resulted in bugs before:
  1. The following should be read with getu() instead of get() because they are unsigned ints:

OpSwitchImm::m_tableIndex
OpSwitchChar::m_tableIndex
OpGetFromArguments::m_index
OpPutToArguments::m_index
OpGetRestLength::m_numParametersToSkip

OpJneqPtr::m_specialPointer should also be read with getu() though this
wasn't a bug because it was previously an int by default, and is only
changed to an unsigned int in this patch.

2.The following should be read with loadi (not loadp) because they are of

unsigned type (not a pointer):

OpResolveScope::Metadata::m_resolveType
CodeBlock::m_numParameters (see prepareForTailCall)

  1. OpPutToScope::Metadata::m_operand should be read with loadp (not loadis) because it is a uintptr_t.
  1. The following should be read with loadi (not loadis) because they are unsigned ints:

OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits
OpPutById::Metadata::m_oldStructureID
OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand

These may not have manifested in bugs because the operations that follow
the load are 32-bit instructions which ignore the high word.

  1. Give class GetPutInfo a default constructor so that we can use bitwise_cast on it. Also befriend LLIntOffsetsExtractor so that we can take the offset of m_operand in it.
  • bytecode/ArithProfile.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h: (JSC::computeUsesForBytecodeOffset): (JSC::computeDefsForBytecodeOffset):
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::propagateTransitions): (JSC::CodeBlock::finalizeLLIntInlineCaches):
  • bytecode/Fits.h:
  • bytecode/GetByIdMetadata.h:
  • bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeFromLLInt):
  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):
  • bytecode/PreciseJumpTargetsInlines.h: (JSC::jumpTargetForInstruction): (JSC::updateStoredJumpTargetsForInstruction):
  • bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFromLLInt):
  • bytecode/SpecialPointer.h:
  • bytecompiler/BytecodeGenerator.cpp: (JSC::Label::setLocation):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock):
  • jit/JITArithmetic.cpp: (JSC::JIT::emit_compareAndJump): (JSC::JIT::emit_compareUnsignedAndJump): (JSC::JIT::emit_compareAndJumpSlow):
  • jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_compareAndJump): (JSC::JIT::emit_compareUnsignedAndJump): (JSC::JIT::emit_compareAndJumpSlow): (JSC::JIT::emitBinaryDoubleOp):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_jmp): (JSC::JIT::emit_op_jfalse): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_jneq_ptr): (JSC::JIT::emit_op_jeq): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_jneq): (JSC::JIT::compileOpStrictEqJump): (JSC::JIT::emitSlow_op_jstricteq): (JSC::JIT::emitSlow_op_jnstricteq): (JSC::JIT::emit_op_check_tdz): (JSC::JIT::emitSlow_op_jeq): (JSC::JIT::emitSlow_op_jneq): (JSC::JIT::emit_op_profile_type):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_jmp): (JSC::JIT::emit_op_jfalse): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_jneq_ptr): (JSC::JIT::emit_op_jeq): (JSC::JIT::emitSlow_op_jeq): (JSC::JIT::emit_op_jneq): (JSC::JIT::emitSlow_op_jneq): (JSC::JIT::compileOpStrictEqJump): (JSC::JIT::emitSlow_op_jstricteq): (JSC::JIT::emitSlow_op_jnstricteq): (JSC::JIT::emit_op_check_tdz): (JSC::JIT::emit_op_profile_type):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): (JSC::LLInt::setupGetByIdPrototypeCache):
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:
  • runtime/GetPutInfo.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240138 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240398] by Alan Coon
  • 4 edits
    1 add in branches/safari-607-branch

Cherry-pick r240106. rdar://problem/47458403

[JSC] ToThis omission in DFGByteCodeParser is wrong
https://bugs.webkit.org/show_bug.cgi?id=193513
<rdar://problem/45842236>

Reviewed by Saam Barati.

JSTests:

  • stress/to-this-omission-with-different-strict-modes.js: Added. (thisA): (thisAStrictWrapper):

Source/JavaScriptCore:

DFGByteCodeParser omitted ToThis node when we have ToThis(ToThis(value)). This semantics is wrong if ToThis has different semantics
in the sloppy mode and the strict mode. If we convert ToThisInSloppyMode(ToThisInStrictMode(boolean)) to ToThisInStrictMode(boolean),
we get boolean instead of BooleanObject.

This optimization is introduced more than 7 years ago, and from that, we have several optimizations that can remove such ToThis nodes
in BytecodeParser, AI, and Fixup. Furthermore, this optimization is simply wrong since toThis() function of JSCell can be defined
as they want. Before ensuring all the toThis function is safe, we should not fold ToThis(ToThis(value)) => ToThis(value).
This patch just removes the problematic optimization. The performance numbers look neutral.

  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240106 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240397] by Alan Coon
  • 35 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r240041. rdar://problem/47458234

Refactor new bytecode structs so that the fields are prefixed with "m_".
https://bugs.webkit.org/show_bug.cgi?id=193467

Reviewed by Saam Barati and Tadeu Zagallo.

This makes it easier to do a manual audit of type correctness of the LLInt
instructions used to access these fields. Without this change, it would be
difficult (and error prone) to distinguish the difference between field names and
macro variables. This audit will be done after this patch lands.

  • bytecode/BytecodeGeneratorification.cpp: (JSC::BytecodeGeneratorification::BytecodeGeneratorification):
  • bytecode/BytecodeUseDef.h: (JSC::computeUsesForBytecodeOffset):
  • bytecode/CallLinkStatus.cpp: (JSC::CallLinkStatus::computeFromLLInt):
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::propagateTransitions): (JSC::CodeBlock::finalizeLLIntInlineCaches): (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffset): (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow): (JSC::CodeBlock::getArrayProfile): (JSC::CodeBlock::notifyLexicalBindingShadowing): (JSC::CodeBlock::tryGetValueProfileForBytecodeOffset): (JSC::CodeBlock::arithProfileForPC): (JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):
  • bytecode/CodeBlockInlines.h: (JSC::CodeBlock::forEachValueProfile): (JSC::CodeBlock::forEachArrayProfile): (JSC::CodeBlock::forEachArrayAllocationProfile): (JSC::CodeBlock::forEachObjectAllocationProfile): (JSC::CodeBlock::forEachLLIntCallLinkInfo):
  • bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeFromLLInt):
  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):
  • bytecode/PreciseJumpTargetsInlines.h: (JSC::jumpTargetForInstruction): (JSC::extractStoredJumpTargetsForInstruction): (JSC::updateStoredJumpTargetsForInstruction):
  • bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFromLLInt):
  • bytecode/UnlinkedCodeBlock.cpp: (JSC::dumpLineColumnEntry):
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::fuseCompareAndJump): (JSC::BytecodeGenerator::fuseTestAndJmp): (JSC::BytecodeGenerator::emitEqualityOp): (JSC::BytecodeGenerator::endSwitch): (JSC::StructureForInContext::finalize):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleCall): (JSC::DFG::ByteCodeParser::handleVarargsCall): (JSC::DFG::ByteCodeParser::parseGetById): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::handlePutByVal): (JSC::DFG::ByteCodeParser::handlePutAccessorById): (JSC::DFG::ByteCodeParser::handlePutAccessorByVal): (JSC::DFG::ByteCodeParser::handleNewFunc): (JSC::DFG::ByteCodeParser::handleNewFuncExp):
  • dfg/DFGOSREntry.cpp: (JSC::DFG::prepareCatchOSREntry):
  • ftl/FTLOperations.cpp: (JSC::FTL::operationMaterializeObjectInOSR):
  • generator/Argument.rb:
  • generator/Metadata.rb:
  • generator/Opcode.rb:
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::emit_op_unsigned): (JSC::JIT::emit_compareAndJump): (JSC::JIT::emit_compareUnsignedAndJump): (JSC::JIT::emit_compareUnsigned): (JSC::JIT::emit_compareAndJumpSlow): (JSC::JIT::emit_op_inc): (JSC::JIT::emit_op_dec): (JSC::JIT::emit_op_mod): (JSC::JIT::emit_op_negate): (JSC::JIT::emitBitBinaryOpFastPath): (JSC::JIT::emit_op_bitnot): (JSC::JIT::emitRightShiftFastPath): (JSC::JIT::emit_op_add): (JSC::JIT::emitMathICFast): (JSC::JIT::emitMathICSlow): (JSC::JIT::emit_op_div): (JSC::JIT::emit_op_mul): (JSC::JIT::emit_op_sub):
  • jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_compareAndJump): (JSC::JIT::emit_compareUnsignedAndJump): (JSC::JIT::emit_compareUnsigned): (JSC::JIT::emit_compareAndJumpSlow): (JSC::JIT::emit_op_unsigned): (JSC::JIT::emit_op_inc): (JSC::JIT::emit_op_dec): (JSC::JIT::emitBinaryDoubleOp): (JSC::JIT::emit_op_mod):
  • jit/JITCall.cpp: (JSC::JIT::emitPutCallResult): (JSC::JIT::compileSetupFrame): (JSC::JIT::compileCallEvalSlowCase): (JSC::JIT::compileTailCall): (JSC::JIT::compileOpCall):
  • jit/JITCall32_64.cpp: (JSC::JIT::emitPutCallResult): (JSC::JIT::emit_op_ret): (JSC::JIT::compileSetupFrame): (JSC::JIT::compileCallEvalSlowCase): (JSC::JIT::compileOpCall):
  • jit/JITInlines.h: (JSC::JIT::emitValueProfilingSiteIfProfiledOpcode): (JSC::JIT::emitValueProfilingSite): (JSC::JIT::copiedGetPutInfo): (JSC::JIT::copiedArithProfile):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_mov): (JSC::JIT::emit_op_end): (JSC::JIT::emit_op_jmp): (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_overrides_has_instance): (JSC::JIT::emit_op_instanceof): (JSC::JIT::emitSlow_op_instanceof): (JSC::JIT::emit_op_is_empty): (JSC::JIT::emit_op_is_undefined): (JSC::JIT::emit_op_is_undefined_or_null): (JSC::JIT::emit_op_is_boolean): (JSC::JIT::emit_op_is_number): (JSC::JIT::emit_op_is_cell_with_type): (JSC::JIT::emit_op_is_object): (JSC::JIT::emit_op_ret): (JSC::JIT::emit_op_to_primitive): (JSC::JIT::emit_op_set_function_name): (JSC::JIT::emit_op_not): (JSC::JIT::emit_op_jfalse): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_jneq_ptr): (JSC::JIT::emit_op_eq): (JSC::JIT::emit_op_jeq): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_neq): (JSC::JIT::emit_op_jneq): (JSC::JIT::emit_op_throw): (JSC::JIT::compileOpStrictEq): (JSC::JIT::compileOpStrictEqJump): (JSC::JIT::emitSlow_op_jstricteq): (JSC::JIT::emitSlow_op_jnstricteq): (JSC::JIT::emit_op_to_number): (JSC::JIT::emit_op_to_string): (JSC::JIT::emit_op_to_object): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_get_parent_scope): (JSC::JIT::emit_op_switch_imm): (JSC::JIT::emit_op_switch_char): (JSC::JIT::emit_op_switch_string): (JSC::JIT::emit_op_debug): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_get_scope): (JSC::JIT::emit_op_to_this): (JSC::JIT::emit_op_create_this): (JSC::JIT::emit_op_check_tdz): (JSC::JIT::emitSlow_op_eq): (JSC::JIT::emitSlow_op_neq): (JSC::JIT::emitSlow_op_jeq): (JSC::JIT::emitSlow_op_jneq): (JSC::JIT::emitSlow_op_instanceof_custom): (JSC::JIT::emit_op_new_regexp): (JSC::JIT::emitNewFuncCommon): (JSC::JIT::emitNewFuncExprCommon): (JSC::JIT::emit_op_new_array): (JSC::JIT::emit_op_new_array_with_size): (JSC::JIT::emit_op_has_structure_property): (JSC::JIT::emit_op_has_indexed_property): (JSC::JIT::emitSlow_op_has_indexed_property): (JSC::JIT::emit_op_get_direct_pname): (JSC::JIT::emit_op_enumerator_structure_pname): (JSC::JIT::emit_op_enumerator_generic_pname): (JSC::JIT::emit_op_profile_type): (JSC::JIT::emit_op_log_shadow_chicken_prologue): (JSC::JIT::emit_op_log_shadow_chicken_tail): (JSC::JIT::emit_op_profile_control_flow): (JSC::JIT::emit_op_argument_count): (JSC::JIT::emit_op_get_rest_length): (JSC::JIT::emit_op_get_argument):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_mov): (JSC::JIT::emit_op_end): (JSC::JIT::emit_op_jmp): (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_overrides_has_instance): (JSC::JIT::emit_op_instanceof): (JSC::JIT::emitSlow_op_instanceof): (JSC::JIT::emitSlow_op_instanceof_custom): (JSC::JIT::emit_op_is_empty): (JSC::JIT::emit_op_is_undefined): (JSC::JIT::emit_op_is_undefined_or_null): (JSC::JIT::emit_op_is_boolean): (JSC::JIT::emit_op_is_number): (JSC::JIT::emit_op_is_cell_with_type): (JSC::JIT::emit_op_is_object): (JSC::JIT::emit_op_to_primitive): (JSC::JIT::emit_op_set_function_name): (JSC::JIT::emit_op_not): (JSC::JIT::emit_op_jfalse): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_jneq_ptr): (JSC::JIT::emit_op_eq): (JSC::JIT::emitSlow_op_eq): (JSC::JIT::emit_op_jeq): (JSC::JIT::emitSlow_op_jeq): (JSC::JIT::emit_op_neq): (JSC::JIT::emitSlow_op_neq): (JSC::JIT::emit_op_jneq): (JSC::JIT::emitSlow_op_jneq): (JSC::JIT::compileOpStrictEq): (JSC::JIT::compileOpStrictEqJump): (JSC::JIT::emitSlow_op_jstricteq): (JSC::JIT::emitSlow_op_jnstricteq): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_throw): (JSC::JIT::emit_op_to_number): (JSC::JIT::emit_op_to_string): (JSC::JIT::emit_op_to_object): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_get_parent_scope): (JSC::JIT::emit_op_switch_imm): (JSC::JIT::emit_op_switch_char): (JSC::JIT::emit_op_switch_string): (JSC::JIT::emit_op_debug): (JSC::JIT::emit_op_get_scope): (JSC::JIT::emit_op_create_this): (JSC::JIT::emit_op_to_this): (JSC::JIT::emit_op_check_tdz): (JSC::JIT::emit_op_has_structure_property): (JSC::JIT::emit_op_has_indexed_property): (JSC::JIT::emitSlow_op_has_indexed_property): (JSC::JIT::emit_op_get_direct_pname): (JSC::JIT::emit_op_enumerator_structure_pname): (JSC::JIT::emit_op_enumerator_generic_pname): (JSC::JIT::emit_op_profile_type): (JSC::JIT::emit_op_log_shadow_chicken_prologue): (JSC::JIT::emit_op_log_shadow_chicken_tail):
  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emitGetByValWithCachedId): (JSC::JIT::emitSlow_op_get_by_val): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emitGenericContiguousPutByVal): (JSC::JIT::emitArrayStoragePutByVal): (JSC::JIT::emitPutByValWithCachedId): (JSC::JIT::emitSlow_op_put_by_val): (JSC::JIT::emit_op_put_getter_by_id): (JSC::JIT::emit_op_put_setter_by_id): (JSC::JIT::emit_op_put_getter_setter_by_id): (JSC::JIT::emit_op_put_getter_by_val): (JSC::JIT::emit_op_put_setter_by_val): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (JSC::JIT::emit_op_try_get_by_id): (JSC::JIT::emitSlow_op_try_get_by_id): (JSC::JIT::emit_op_get_by_id_direct): (JSC::JIT::emitSlow_op_get_by_id_direct): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emit_op_get_by_id_with_this): (JSC::JIT::emitSlow_op_get_by_id): (JSC::JIT::emitSlow_op_get_by_id_with_this): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emitSlow_op_put_by_id): (JSC::JIT::emit_op_in_by_id): (JSC::JIT::emitSlow_op_in_by_id): (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope): (JSC::JIT::emitSlow_op_get_from_scope): (JSC::JIT::emit_op_put_to_scope): (JSC::JIT::emit_op_get_from_arguments): (JSC::JIT::emit_op_put_to_arguments): (JSC::JIT::emitIntTypedArrayPutByVal): (JSC::JIT::emitFloatTypedArrayPutByVal):
  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_put_getter_by_id): (JSC::JIT::emit_op_put_setter_by_id): (JSC::JIT::emit_op_put_getter_setter_by_id): (JSC::JIT::emit_op_put_getter_by_val): (JSC::JIT::emit_op_put_setter_by_val): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emitGetByValWithCachedId): (JSC::JIT::emitSlow_op_get_by_val): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emitGenericContiguousPutByVal): (JSC::JIT::emitArrayStoragePutByVal): (JSC::JIT::emitPutByValWithCachedId): (JSC::JIT::emitSlow_op_put_by_val): (JSC::JIT::emit_op_try_get_by_id): (JSC::JIT::emitSlow_op_try_get_by_id): (JSC::JIT::emit_op_get_by_id_direct): (JSC::JIT::emitSlow_op_get_by_id_direct): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emitSlow_op_get_by_id): (JSC::JIT::emit_op_get_by_id_with_this): (JSC::JIT::emitSlow_op_get_by_id_with_this): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emitSlow_op_put_by_id): (JSC::JIT::emit_op_in_by_id): (JSC::JIT::emitSlow_op_in_by_id): (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope): (JSC::JIT::emitSlow_op_get_from_scope): (JSC::JIT::emit_op_put_to_scope): (JSC::JIT::emit_op_get_from_arguments): (JSC::JIT::emit_op_put_to_arguments):
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): (JSC::LLInt::setupGetByIdPrototypeCache): (JSC::LLInt::getByVal): (JSC::LLInt::genericCall): (JSC::LLInt::varargsSetup): (JSC::LLInt::commonCallEval):
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp: (JSC::SLOW_PATH_DECL): (JSC::updateArithProfileForUnaryArithOp):
  • runtime/CommonSlowPaths.h: (JSC::CommonSlowPaths::tryCachePutToScopeGlobal): (JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240396] by Alan Coon
  • 21 edits
    2 copies
    1 add in branches/safari-607-branch

Cherry-pick r240010. rdar://problem/47457965

Cannot tab out of WKWebView on macOS
https://bugs.webkit.org/show_bug.cgi?id=161448
<rdar://problem/28100085>

Reviewed by Dean Jackson.

Source/WebCore/PAL:

  • pal/spi/mac/NSViewSPI.h:
  • pal/spi/mac/NSWindowSPI.h: Move some SPI declarations in here from WebKitLegacy.

Source/WebKit:

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::takeFocus): If the UIDelegate doesn't implement takeFocus, provide a simple default implementation that just uses AppKit's key view loop to move the focus.
  • UIProcess/API/APIUIClient.h: (API::UIClient::takeFocus):
  • UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient):
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::takeFocus): Make API::UIClient's takeFocus return a bool indicating whether the client implements it or not.
  • UIProcess/PageClient.h:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::takeFocus): Plumb takeFocus to WebViewImpl.
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::takeFocus): Borrow the relevant portion of WebKitLegacy's implementation of takeFocus, shifting focus to the next/previous key view in the window.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.mm:
  • WebView/WebView.mm: Make use of SPI headers.

Tools:

Add a test that tabbing into and out of WKWebView works correctly.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm: (WebKit2_CommandBackForwardTest::SetUp): (-[CommandBackForwardOffscreenWindow isKeyWindow]): Deleted. (-[CommandBackForwardOffscreenWindow isVisible]): Deleted.
  • TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm: Added. (-[FocusableView canBecomeKeyView]): (TEST):
  • TestWebKitAPI/mac/OffscreenWindow.h: Added.
  • TestWebKitAPI/mac/OffscreenWindow.mm: Added. (-[OffscreenWindow initWithSize:]): (-[OffscreenWindow isKeyWindow]): (-[OffscreenWindow isVisible]):
  • TestWebKitAPI/mac/PlatformWebViewMac.mm: (TestWebKitAPI::PlatformWebView::initialize): (-[ActiveOffscreenWindow isKeyWindow]): Deleted. (-[ActiveOffscreenWindow isVisible]): Deleted. Factor ActiveOffscreenWindow out into OffscreenWindow and share it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240395] by Alan Coon
  • 7 edits
    4 adds in branches/safari-607-branch/Source

Revert r238815. rdar://problem/47457960

5:22 PM Changeset in webkit [240394] by Alan Coon
  • 3 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240229. rdar://problem/47458326

DFG: When inlining DataView set* intrinsics we need to set undefined as our result
https://bugs.webkit.org/show_bug.cgi?id=193644
<rdar://problem/46209745>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/data-view-set-intrinsic-undefined-result-2.js: Added. (foo):
  • stress/data-view-set-intrinsic-undefined-result.js: Added. (foo): (bar):

Source/JavaScriptCore:

This patch also makes it so we fail fast when we make this mistake.
I've made this mistake more than once.

  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240229 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240393] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r240225. rdar://problem/47458257

Unreviewed, fix -Wint-in-bool-context warning
https://bugs.webkit.org/show_bug.cgi?id=193483
<rdar://problem/47280522>

  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::addCheckStructureForOriginalStringObjectUse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240225 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240392] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/bmalloc

Cherry-pick r240193. rdar://problem/47458146

gigacage slide should randomize both start and end
https://bugs.webkit.org/show_bug.cgi?id=193601

Reviewed by Yusuke Suzuki.

This patch makes it so that the gigacade slide has an arbitrary
distance from the end as well as the start. This is done by
picking a random size then based on that size picking an random
starting offset.

  • bmalloc/Gigacage.h:
  • bmalloc/Heap.cpp: (bmalloc::Heap::Heap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240193 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240391] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r240186. rdar://problem/47458146

Follow-up: Gigacages should start allocations from a slide
<https://bugs.webkit.org/show_bug.cgi?id=193523>
<rdar://problem/44958707>

  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::caged): Add UNUSED_PARAM(kind) to fix the build.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240186 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240390] by Alan Coon
  • 11 edits in branches/safari-607-branch/Source

Cherry-pick r240175. rdar://problem/47458146

Gigacages should start allocations from a slide
https://bugs.webkit.org/show_bug.cgi?id=193523

Reviewed by Mark Lam.

Source/bmalloc:

This patch makes it so that Gigacage Heaps slide the start of the
cage by some random amount. We still ensure that there is always
at least 4/2GB, on MacOS/iOS respectively, of VA space available
for allocation.

Also, this patch changes some macros into constants since macros
are the devil.

  • bmalloc/Gigacage.cpp: (Gigacage::bmalloc::protectGigacageBasePtrs): (Gigacage::bmalloc::unprotectGigacageBasePtrs): (Gigacage::bmalloc::runwaySize): (Gigacage::ensureGigacage): (Gigacage::shouldBeEnabled):
  • bmalloc/Gigacage.h: (Gigacage::name): (Gigacage::gigacageSizeToMask): (Gigacage::size): (Gigacage::mask): (Gigacage::basePtr): (Gigacage::ensureGigacage): (Gigacage::wasEnabled): (Gigacage::isCaged): (Gigacage::isEnabled): (Gigacage::caged): (Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): (Gigacage::canPrimitiveGigacageBeDisabled): (Gigacage::disablePrimitiveGigacage): (Gigacage::addPrimitiveDisableCallback): (Gigacage::removePrimitiveDisableCallback):
  • bmalloc/Heap.cpp: (bmalloc::Heap::Heap):
  • bmalloc/Sizes.h: (bmalloc::Sizes::maskSizeClass): (bmalloc::Sizes::maskObjectSize): (bmalloc::Sizes::logSizeClass): (bmalloc::Sizes::logObjectSize): (bmalloc::Sizes::sizeClass): (bmalloc::Sizes::objectSize): (bmalloc::Sizes::pageSize):

Source/JavaScriptCore:

This patch changes some macros into constants since macros are the
devil.

  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::caged):
  • llint/LowLevelInterpreter64.asm:

Source/WTF:

This patch changes some macros into constants since macros are the
devil.

  • wtf/Gigacage.cpp:
  • wtf/Gigacage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240175 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240389] by Alan Coon
  • 9 edits in branches/safari-607-branch

Cherry-pick r240161. rdar://problem/47458286

Regression(PSON) Scroll position is not always restored properly when navigating back
https://bugs.webkit.org/show_bug.cgi?id=193578
<rdar://problem/47386331>

Reviewed by Tim Horton.

Source/WebKit:

Fix issues causing the scroll position to not be restored at all (or incorrectly) when
navigating back cross-site with PSON enabled. Also make sure that the swipe gesture
snapshot really stays up until we've restored the scroll position.

Note that even after those changes, I can still sometimes reproduce a white flash when
swiping back to Google search results (scroll position being correct now). This is
tracked by <rdar://problem/47071684> and happens even if I disable PSON entirely.

  • Shared/SessionState.cpp: (WebKit::FrameState::encode const): (WebKit::FrameState::decode):
  • Shared/SessionState.h:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp: (WebKit::toFrameState): (WebKit::applyFrameState): obscuredInsets is present on the HistoryItem in the WebProcess but was never passed to or stored by the UIProcess on the WebBackForwardListItem. obscuredInsets is needed to properly restore the scrollPosition (position was 70px off on my iPad without this). With PSON enabled, if you swipe back cross-process and the previous page was not put into PageCache, then the HistoryItem is gone on the WebProcess side. What happens is that the UIProcess sends its WebBackForwardListItem to the WebProcess, which restores the HistoryItem there, and then asks it to load it. The obscuredInsets was getting lost in the process since the UIProcess never knew about it.
  • UIProcess/Cocoa/ViewGestureController.cpp: (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState): Drop logic that was causing the ViewGestureController to not wait for the scroll position to be restored before taking down the snapshot, when UI-side compositing is enabled. If you look at the comment above the code, you'll see that the code in question was meant to impact only the non-UI side compositing code path. As a matter of fact, when the code was reviewed at https://bugs.webkit.org/show_bug.cgi?id=151224, it was protected by a #if PLATFORM(MAC), before getting modified the wrong way before landing. In practice, we would have often restored the scroll position by the time the load is finished so it would not cause a flash in most cases. However, with PSON enabled and the layer tree freezing we do on process-swap, the first post-scroll restoration layer tree commit may now occur a little bit later and we would lose the race more often.
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::updateBackForwardItem):
  • UIProcess/WebProcessProxy.h: When adding PageCache support to PSON, we used to navigate the "suspended" page to about:blank. This would lead to unwanted WebProcessProxy::updateBackForwardItem() calls from the WebProcess which we wanted to ignore. We thus added logic to ignore updateBackForwardItem() IPC from the old WebProcess after a swap. The issue with this is that we sometimes miss/ignore legit updates to the HistoryItem from the old process, in particular with regards to the scroll position and the pageScaleFactor. So if you swiped and then quickly enough did a cross-site navigation, the UIProcess' WebBackForwardList would not get updated with the latest scroll position and we would thus fail to restore it later on. To address the issue, we now stop ignoring updates from the old WebProcess after a swap. This logic is no longer needed since we no longer navigate the old page to about:blank after a swap, we merely suspend it "in place".

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240161 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:22 PM Changeset in webkit [240388] by Alan Coon
  • 6 edits in branches/safari-607-branch

Cherry-pick r240158. rdar://problem/47458281

FetchResponse::url should return the empty string for tainted responses
https://bugs.webkit.org/show_bug.cgi?id=193553

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js: (fetchNoCors):

Source/WebCore:

Check whether the response is tainted in FetchResponse::url, to match
the behavior described in https://fetch.spec.whatwg.org/#concept-filtered-response-opaque.

  • Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::url const):

LayoutTests:

  • http/wpt/fetch/response-opaque-clone.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240158 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240387] by Alan Coon
  • 5 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240152. rdar://problem/47458242

A track source should be unmuted whenever reenabled after setDirection changes
https://bugs.webkit.org/show_bug.cgi?id=193554
<rdar://problem/47366196>

Reviewed by Eric Carlson.

Source/WebCore:

Ensure that track gets unmuted after being fired as part of track event.
Test is triggering some existing issues with MediaPlayerPrivateMediaStreamAVFObjC.
Given the enqueuing of samples happens in a different frame than the thread used to update media stream and the active video track,
some enqueued samples might not be from the right active video track or there might be no active video track.

Test: webrtc/video-setDirection.html

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::fireTrackEvent):
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData):

LayoutTests:

  • webrtc/video-setDirection-expected.txt: Added.
  • webrtc/video-setDirection.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240152 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240386] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKitLegacy/win

Cherry-pick r240131. rdar://problem/47458219

[Win][HighDPI] Repaint glitches when scrolling.
https://bugs.webkit.org/show_bug.cgi?id=173152
<rdar://problem/45269953>

Reviewed by Brent Fulgham.

Non-integral device scale factors are causing repaint glitches, because the computation of the scroll
delta in pixel coordinates from the scroll delta in logical coordinates will not always be correct.
Instead of blitting the scroll rectangle, repaint the entire region affected by scrolling.

  • WebView.cpp: (WebView::scrollBackingStore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240131 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240385] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240122. rdar://problem/47458135

[Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable
https://bugs.webkit.org/show_bug.cgi?id=193478
<rdar://problem/34368591>

Reviewed by Brent Fulgham.

By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention
as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This
is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only
website that assumes submit buttons are focusable, and will prohibit users from completing immigration
forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to
HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable.

This quirk is for ceac.state.gov specifically, and therefore no tests.

  • html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::isMouseFocusable const): (WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const):
  • html/HTMLFormControlElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240122 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240384] by Alan Coon
  • 19 edits
    1 add
    1 delete in branches/safari-607-branch

Cherry-pick r240114. rdar://problem/47458257

StringObjectUse should not be a structure check for the original string object structure
https://bugs.webkit.org/show_bug.cgi?id=193483
<rdar://problem/47280522>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/cant-eliminate-string-object-structure-check-when-string-object-is-proven.js: Added. (foo): (a.valueOf.0):

Source/JavaScriptCore:

Prior to this patch, the use kind for StringObjectUse implied that we
do a StructureCheck on the input operand for the *original* StringObject
structure. This is generally not how we use UseKinds, so it's no surprise
that this is buggy. A UseKind should map to a set of SpeculatedTypes, not an
actual set of structures. This patch changes the meaning of StringObjectUse
to mean an object where jsDynamicCast<StringObject*> would succeed.

This patch also fixes a bug that was caused by the old and weird usage of the
UseKind to mean StructureCheck. Consider a program like this:
`
S1 = Original StringObject structure
S2 = Original StringObject structure with the field "f" added

a: GetLocal()
b: CheckStructure(@a, {S2})
c: ToString(StringObject:@a)
`

According to AI, in the above program, we would exit at @c, since
StringObject:@a implies a structure check of {S1}, and the intersection
of {S1} and {S2} is {}. So, we'd convert the program to be:
`
a: GetLocal()
b: CheckStructure(@a, {S2})
c: Check(StringObject:@a)
d: Unreachable
`

However, AI would set the proof status of the StringObject:@a edge
to be proven, since the SpeculatedType for @a is SpecStringObject.
This was incorrect of AI to do because the SpeculatedType itself
didn't capture the full power of StringObjectUse. However, having
a UseKind mean CheckStructure is weird precisely because what AI was
doing is a natural fit to how we typically we think about UseKinds.

So the above program would then incorrectly be converted to this, and
we'd crash when reaching the Unreachable node:
`
a: GetLocal()
b: CheckStructure(@a, {S2})
d: Unreachable
`

This patch makes it so that StringObjectUse just means that the object that
filters through a StringObjectUse check must !!jsDynamicCast<StringObject*>.
This is now in line with all other UseKinds. It also lets us simplify a bunch
of other code that had weird checks for the StringObjectUse UseKind.

This patch also makes it so that anywhere where we used to rely on
StringObjectUse implying a structure check we actually emit an explicit
CheckStructure node.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/ExitKind.cpp: (JSC::exitKindToString):
  • bytecode/ExitKind.h:
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGCSEPhase.cpp:
  • dfg/DFGClobberize.h: (JSC::DFG::clobberize):
  • dfg/DFGEdgeUsesStructure.h: Removed.
  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion): (JSC::DFG::FixupPhase::addCheckStructureForOriginalStringObjectUse): (JSC::DFG::FixupPhase::fixupToPrimitive): (JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor): (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd): (JSC::DFG::FixupPhase::isStringObjectUse): Deleted.
  • dfg/DFGGraph.cpp: (JSC::DFG::Graph::canOptimizeStringObjectAccess):
  • dfg/DFGMayExit.cpp:
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOrStringValueOf): (JSC::DFG::SpeculativeJIT::speculateStringObject): (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
  • dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure): Deleted.
  • dfg/DFGUseKind.h: (JSC::DFG::alreadyChecked): (JSC::DFG::usesStructure): Deleted.
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf): (JSC::FTL::DFG::LowerDFGToB3::speculateStringObject): (JSC::FTL::DFG::LowerDFGToB3::speculateStringOrStringObject): (JSC::FTL::DFG::LowerDFGToB3::speculateStringObjectForCell): (JSC::FTL::DFG::LowerDFGToB3::speculateStringObjectForStructureID): Deleted.
  • runtime/JSType.cpp: (WTF::printInternal):
  • runtime/JSType.h:
  • runtime/StringObject.h: (JSC::StringObject::createStructure):
  • runtime/StringPrototype.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240383] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240112. rdar://problem/47458291

[EME] Remove Amazon Prime Video from quirks list
https://bugs.webkit.org/show_bug.cgi?id=193514
rdar://problem/47295330

Reviewed by Jer Noble.

  • page/Quirks.cpp: (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240382] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240087. rdar://problem/47458394

Revert r239938
https://bugs.webkit.org/show_bug.cgi?id=193267
<rdar://problem/47297304>

  • Configurations/WebContent-iOS.entitlements:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240381] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r240051. rdar://problem/47458262

Web Inspector: Fix TreeOutline TypeError:​ this._indexesForSubtree is not a function
https://bugs.webkit.org/show_bug.cgi?id=193501
<rdar://problem/47323967>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype.removeChildAtIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240051 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240380] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240049. rdar://problem/47458184

ServiceWorkerContainer is leaking due to a ref cycle
https://bugs.webkit.org/show_bug.cgi?id=193462
<rdar://problem/47026303>

Reviewed by Brady Eidson.

ServiceWorkerContainer keeps a reference to its ready promise.
The ready promise keeps a ref to its value which is a ServiceWorkerRegistration.
ServiceWorkerRegistration keeps a ref to ServiceWorkerContainer.

To break the reference cycle, set the ready promise to zero when ServiceWorkerContainer is stopped.

Covered by imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html no longer leaking.

  • workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::stop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240379] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240045. rdar://problem/47458249

Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=193468
<rdar://problem/38645869>

Reviewed by Zalan Bujtas.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded): Adjust the null-check a bit; Zalan pointed out that the layout could be responsible for the Frame/RenderView going away, so we should bail *after* layout, not before.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240378] by Alan Coon
  • 6 edits
    4 adds in branches/safari-607-branch

Cherry-pick r240040. rdar://problem/47458365

JSFunction::canUseAllocationProfile() should account for builtin functions with no own prototypes.
https://bugs.webkit.org/show_bug.cgi?id=193423
<rdar://problem/46209355>

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/sinkable-new-object-with-builtin-constructor.js: Added.
  • stress/constructing-builtin-functions-with-getter-prototype-should-only-call-getter-once-per-new-1.js: Added.
  • stress/constructing-builtin-functions-with-getter-prototype-should-only-call-getter-once-per-new-2.js: Added.
  • stress/jsfunction-cannot-use-allocation-profile-with-builtin-functions-with-no-prototype.js: Added.

Source/JavaScriptCore:

JSFunction::canUseAllocationProfile() should return false for most builtins
because the majority of them have no prototype property. The only exception to
this is the few builtin functions that are explicitly used as constructors.

For these builtin constructors, JSFunction::canUseAllocationProfile() should also
return false if the prototype property is a getter or custom getter because
getting the prototype would then be effectful.

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp: (JSC::SLOW_PATH_DECL):
  • runtime/JSFunctionInlines.h: (JSC::JSFunction::canUseAllocationProfile):
  • runtime/PropertySlot.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240377] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240037. rdar://problem/47458128

Add more assertions to find root cause for release assert hit in StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=193488
<rdar://problem/30983040>

Reviewed by Zalan Bujtas.

  • css/StyleResolver.cpp: (WebCore::StyleResolver::~StyleResolver):

Release assert we are not resolving tree style.

  • dom/Document.cpp: (WebCore::Document::setIsResolvingTreeStyle):
  • dom/Document.h: (WebCore::Document::isResolvingTreeStyle const):
  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::Scope::Scope): (WebCore::Style::TreeResolver::Scope::~Scope):

Set isResolvingTreeStyle bit when we have a tree resolver scope.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240376] by Alan Coon
  • 5 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240024. rdar://problem/47458299

[JSC] Use KnownStringUse for GetByVal(Array::String) since AI would offer wider type information and offer non-string type after removing Check(String)
https://bugs.webkit.org/show_bug.cgi?id=193438
<rdar://problem/45581249>

Reviewed by Saam Barati and Keith Miller.

JSTests:

Under the heavy load (like, compiling WebKit), AI in this code can broaden type information after the 1st run.
Then, GetByVal(String) crashed.

  • stress/string-get-by-val-lowering.js: Added. (shouldBe): (test):
  • stress/type-for-get-by-val-can-be-widen-after-ai.js: Added. (Hello): (foo):

Source/JavaScriptCore:

GetByVal(Array::String) emits Check(String) before that. But AI can broaden type constraint in the second run.
After the first run removes Check(String), it would happen that AI starts saying the type of 1st child is not String.
To claim that it *is* a String type, we should use KnownStringUse here.

  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): StringCharAt and GetByVal(Array::String) share the underlying compiler code. We should change StringUse => KnownStringUse for StringCharAt too. And StringCharAt and StringCharCodeAt potentially have the same problem. This patch fixes it too.
  • dfg/DFGSSALoweringPhase.cpp: (JSC::DFG::SSALoweringPhase::lowerBoundsCheck):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt): (JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240375] by Alan Coon
  • 46 edits
    12 deletes in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r240023. rdar://problem/47458203

Try ripping out inferred types because it might be a performance improvement
https://bugs.webkit.org/show_bug.cgi?id=190906

Reviewed by Yusuke Suzuki.

This patch removes inferred types from JSC. Initial evidence shows that
this might be around a ~1% speedup on Speedometer2 and JetStream2.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl):
  • bytecode/Fits.h:
  • bytecode/PutByIdFlags.cpp: (WTF::printInternal):
  • bytecode/PutByIdFlags.h:
  • bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFromLLInt): (JSC::PutByIdStatus::computeForStubInfo): (JSC::PutByIdStatus::computeFor):
  • bytecode/PutByIdVariant.cpp: (JSC::PutByIdVariant::operator=): (JSC::PutByIdVariant::replace): (JSC::PutByIdVariant::transition): (JSC::PutByIdVariant::setter): (JSC::PutByIdVariant::attemptToMerge): (JSC::PutByIdVariant::dumpInContext const):
  • bytecode/PutByIdVariant.h: (JSC::PutByIdVariant::requiredType const): Deleted.
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGAbstractValue.cpp: (JSC::DFG::AbstractValue::isType const): Deleted.
  • dfg/DFGAbstractValue.h:
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleGetByOffset): (JSC::DFG::ByteCodeParser::handlePutByOffset): (JSC::DFG::ByteCodeParser::load): (JSC::DFG::ByteCodeParser::store): (JSC::DFG::ByteCodeParser::handlePutById): (JSC::DFG::ByteCodeParser::parseBlock):
  • dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): (JSC::DFG::ConstantFoldingPhase::emitGetByOffset): (JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
  • dfg/DFGDesiredInferredType.h: Removed.
  • dfg/DFGDesiredWatchpoints.cpp: (JSC::DFG::DesiredWatchpoints::reallyAdd): (JSC::DFG::DesiredWatchpoints::areStillValid const): (JSC::DFG::DesiredWatchpoints::dumpInContext const): (JSC::DFG::InferredTypeAdaptor::add): Deleted.
  • dfg/DFGDesiredWatchpoints.h: (JSC::DFG::DesiredWatchpoints::isWatched): (JSC::DFG::InferredTypeAdaptor::hasBeenInvalidated): Deleted. (JSC::DFG::InferredTypeAdaptor::dumpInContext): Deleted.
  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode):
  • dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): (JSC::DFG::Graph::inferredValueForProperty): (JSC::DFG::Graph::inferredTypeFor): Deleted.
  • dfg/DFGGraph.h: (JSC::DFG::Graph::registerInferredType): Deleted. (JSC::DFG::Graph::inferredTypeForProperty): Deleted.
  • dfg/DFGInferredTypeCheck.cpp: Removed.
  • dfg/DFGInferredTypeCheck.h: Removed.
  • dfg/DFGNode.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset): (JSC::FTL::DFG::LowerDFGToB3::checkInferredType): Deleted.
  • generator/DSL.rb:
  • heap/Heap.cpp: (JSC::Heap::finalizeUnconditionalFinalizers):
  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::branchIfNotType): Deleted.
  • jit/AssemblyHelpers.h:
  • jit/Repatch.cpp: (JSC::tryCachePutByID):
  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/InferredStructure.cpp: (JSC::InferredStructure::InferredStructure): Deleted.
  • runtime/InferredStructure.h: (): Deleted.
  • runtime/InferredStructureWatchpoint.cpp: (JSC::InferredStructureWatchpoint::fireInternal): Deleted.
  • runtime/InferredType.cpp: Removed.
  • runtime/InferredType.h: Removed.
  • runtime/InferredTypeInlines.h: Removed.
  • runtime/InferredTypeTable.cpp: Removed.
  • runtime/InferredTypeTable.h: Removed.
  • runtime/JSObjectInlines.h: (JSC::JSObject::putDirectInternal):
  • runtime/Structure.cpp: (JSC::Structure::materializePropertyTable): (JSC::Structure::addNewPropertyTransition): (JSC::Structure::removePropertyTransition): (JSC::Structure::willStoreValueSlow): (JSC::Structure::visitChildren):
  • runtime/Structure.h: (JSC::PropertyMapEntry::PropertyMapEntry):
  • runtime/StructureInlines.h: (JSC::Structure::get):
  • runtime/VM.cpp: (JSC::VM::VM):
  • runtime/VM.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [240374] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240016. rdar://problem/47458249

Frequent null-deref under TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=193468
<rdar://problem/38645869>

Reviewed by Beth Dakin.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded): I'm not sure why this got *worse*, but we should null-check RenderView. It's OK to bail from scaleViewToFitDocumentIfNeeded, we'll re-do it the next time we paint (which will surely happen if we gain a RenderView).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:20 PM Changeset in webkit [240373] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r240000. rdar://problem/47457985

Correctly handle rotation for local video playback
https://bugs.webkit.org/show_bug.cgi?id=193412

Reviewed by Eric Carlson.

Update AVVideoCaptureSource to compute the size given to settings after rotating the sample.
This ensures computing the size of video elements appropriately.
Also makes sure to notify observers of size change whenever rotation happens as settings() call will provide a different size.
Covered by manual testing as we do not have yet emulation of local capture with rotation.

  • platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::setIntrinsicSize):
  • platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::settings): (WebCore::AVVideoCaptureSource::computeSampleRotation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240000 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:20 PM Changeset in webkit [240372] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239971. rdar://problem/47458229

Only run the node comparison code in FrameSelection::respondToNodeModification() for range selections
https://bugs.webkit.org/show_bug.cgi?id=193416

Reviewed by Wenson Hsieh.

The code inside the m_selection.firstRange() clause needs to only run for non-collapsed selections, and
it shows up on Speedometer profiles so optimize to only run this code if we have a selection range.

  • editing/FrameSelection.cpp: (WebCore::FrameSelection::respondToNodeModification):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:20 PM Changeset in webkit [240371] by Alan Coon
  • 3 edits
    1 add in branches/safari-607-branch

Cherry-pick r239961. rdar://problem/47458424

[BigInt] Literal parsing is crashing when used inside a Object Literal
https://bugs.webkit.org/show_bug.cgi?id=193404

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/big-int-literal-inside-literal-object.js: Added.

Source/JavaScriptCore:

Former implementation was relying into token.m_data.radix after the
call of next() into Parser.cpp. This is not safe because next
clobbers token.m_data.radix in some cases (e.g is CLOSEBRACE).
Now we get radix value before calling next() into parser and store
in a local variable.

  • parser/Parser.cpp: (JSC::Parser<LexerType>::parsePrimaryExpression):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:17 PM Changeset in webkit [240370] by mark.lam@apple.com
  • 4 edits in trunk/Source

ARM64E should not ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=193744
<rdar://problem/46262952>

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):

Source/WTF:

  • wtf/Platform.h:
5:08 PM Changeset in webkit [240369] by Conrad Shultz
  • 2 edits in trunk/Source/WebKitLegacy/mac

Fix the Apple Internal build. See <rdar://problem/47491383>.

Rubber-stamped by Tim Horton.

  • WebCoreSupport/WebFrameLoaderClient.mm:
4:59 PM Changeset in webkit [240368] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
https://bugs.webkit.org/show_bug.cgi?id=193737

Reviewed by Matt Baker.

Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.update):

4:57 PM Changeset in webkit [240367] by Alan Coon
  • 1 copy in tags/Safari-608.1.2

Tag Safari-608.1.2.

4:29 PM Changeset in webkit [240366] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit

Stop using NetworkProcess::singleton
https://bugs.webkit.org/show_bug.cgi?id=193700

Reviewed by Don Olmstead.

This replaces it with a NeverDestroyed<NetworkProcess> and paves the way for more interesting things.

  • NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:

(WebKit::initializeChildProcess<WebKit::NetworkProcess>):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::singleton): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/soup/NetworkProcessMainSoup.cpp:

(WebKit::initializeChildProcess<WebKit::NetworkProcess>):

  • NetworkProcess/win/NetworkProcessMainWin.cpp:

(WebKit::initializeChildProcess<WebKit::NetworkProcess>):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:

(WebKit::initializeChildProcess):
(WebKit::XPCServiceInitializer):

4:23 PM Changeset in webkit [240365] by Ryan Haddad
  • 6 edits in trunk/Source/WebKit

Unreviewed, rolling out r240343.

Caused 4 PSON API test failures.

Reverted changeset:

"[PSON] Flash on back navigation on Mac"
https://bugs.webkit.org/show_bug.cgi?id=193716
https://trac.webkit.org/changeset/240343

4:17 PM Changeset in webkit [240364] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[DFG] AvailabilityMap::pruneByLiveness should make non-live operands Availability::unavailable instead of Availability()
https://bugs.webkit.org/show_bug.cgi?id=193711
<rdar://problem/47250262>

Reviewed by Saam Barati.

JSTests:

  • stress/availability-was-cleared-when-locals-are-not-live.js: Added.

(shouldBe):
(foo):
(bar):
(baz):

Source/JavaScriptCore:

When pruning OSR Availability based on bytecode liveness, we accidentally clear the Availability (making it DeadFlush) instead of
making it Availability::unavailable() (Making it ConflictingFlush). In OSRAvailabilityAnalysisPhase, we perform forward analysis.
We first clear all the availability of basic blocks DeadFlush, which is an empty set. And then, we set operands in the root block
ConflictingFlush. In this forward analysis, DeadFlush is BOTTOM, and ConflictingFlush is TOP. Then, we propagate information by
merging availability until we reach to the fixed-point. As an optimization, we perform "pruning" of the availability in the head
of the basic blocks. We remove availabilities of operands which are not live in the bytecode liveness at the head of the basic block.
The problem is, when removing availabilities, we set DeadFlush for them instead of ConflictingFlush. Basically, it means that we set
BOTTOM (an empty set) instead of TOP. Let's consider the following simple example. We have 6 basic blocks, and they are connected
as follows.

BB0 -> BB1 -> BB2 -> BB4

| \
v > BB3 /

BB5

And consider about loc1 in FTL, which is required to be recovered in BB4's OSR exit.

BB0 does nothing

head: loc1 is dead
tail: loc1 is dead

BB1 has MovHint @1, loc1

head: loc1 is dead
tail: loc1 is live

BB2 does nothing

head: loc1 is live
tail: loc1 is live

BB3 has PutStack @1, loc1

head: loc1 is live
tail: loc1 is live

BB4 has OSR exit using loc1

head: loc1 is live
tail: loc1 is live (in bytecode)

BB5 does nothing

head: loc1 is dead
tail: loc1 is dead

In our OSR Availability analysis, we always prune loc1 result in BB1's head since its head says "loc1 is dead".
But at that time, we clear the availability for loc1, which makes it DeadFlush, instead of making it ConflictingFlush.

So, the flush format of loc1 in each tail of BB is like this.

BB0

ConflictingFlush (because all the local operands are initialized with ConflictingFlush)

BB1

DeadFlush+@1 (pruning clears it)

BB2

DeadFlush+@1 (since it is propagated from BB1)

BB3

FlushedJSValue+@1 with loc1 (since it has PutStack)

BB4

FlushedJSValue+@1 with loc1 (since MERGE(DeadFlush, FlushedJSValue) = FlushedJSValue)

BB5

DeadFlush (pruning clears it)

Then, if we go the path BB0->BB1->BB2->BB4, we read the value from the stack while it is not flushed.
The correct fix is making availability "unavailable" when pruning based on bytecode liveness.

  • dfg/DFGAvailabilityMap.cpp:

(JSC::DFG::AvailabilityMap::pruneByLiveness): When pruning availability, we first set all the operands Availability::unavailable(),
and copy the calculated value from the current availability map.

  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::OSRAvailabilityAnalysisPhase::run): Add logging things for debugging.

3:34 PM Changeset in webkit [240363] by Chris Dumez
  • 19 edits in trunk

Deprecate API to limit the maximum number of WebProcesses
https://bugs.webkit.org/show_bug.cgi?id=193725
<rdar://problem/47464879>

Reviewed by Geoff Garen.

Source/WebKit:

Deprecate API to limit the maximum number of WebProcesses and make it a no-op. It adds
complexity and is not safe (conflicts with PSON).

Add a new usesSingleWebProcess SPI to _WKProcessPoolConfiguration to be used by
Minibrowser / Safari in order to disable process per tab (can be useful for debugging).
Note that enabling the single WebProcess mode will disable PSON and process prewarming.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextSetMaximumNumberOfProcesses):
(WKContextGetMaximumNumberOfProcesses):

  • UIProcess/API/C/WKContext.h:
  • UIProcess/API/Cocoa/WKProcessPool.mm:
  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration maximumProcessCount]):
(-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
(-[_WKProcessPoolConfiguration usesSingleWebProcess]):
(-[_WKProcessPoolConfiguration setUsesSingleWebProcess:]):
(-[_WKProcessPoolConfiguration description]):

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_set_process_model):
(webkit_web_context_set_web_process_count_limit):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:

Tools:

Update existing API tests to stop using deprecated API.

  • MiniBrowser/mac/AppDelegate.m:

(defaultConfiguration):

  • TestWebKitAPI/Tests/WebKit/UserMedia.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm:

(TEST):

2:15 PM Changeset in webkit [240362] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Allow failures in flaky tests from bug 193657
https://bugs.webkit.org/show_bug.cgi?id=193736

Unreviewed test gardening.

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-23

1:58 PM Changeset in webkit [240361] by aakash_jain@apple.com
  • 2 edits
    1 move in trunk/Tools

[ews-app] Rename ews model buildermappings to buildermapping
https://bugs.webkit.org/show_bug.cgi?id=193729

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/models/buildermapping.py: Renamed from Tools/BuildSlaveSupport/ews-app/ews/models/buildermappings.py.

(BuilderMapping): Renamed BuildMappings to BuilderMapping.

  • BuildSlaveSupport/ews-app/ews/models/init.py: Ditto.
1:55 PM Changeset in webkit [240360] by Brent Fulgham
  • 16 edits
    2 adds in trunk/Source/WebKit

Switch NetworkStorageSession portions of ResourceLoadStatistics to Async message passing style
https://bugs.webkit.org/show_bug.cgi?id=193659
<rdar://problem/47433290>

Reviewed by Alex Christensen.

Change the implementations of ResourceLoadStatistics code in NetworkStorageSession to use the
'sendWithAsyncReply' so that more of the code is autogenerated. This should make test runs more
consistent, and should reduce the possibility of bookkeeping errors in the message handling
implementations.

Fix the implementation of NetworkProcessProxy::clearCallbackStates to remove the manually constructed
(and incomplete) message callbacks. These errors are a big reason to move to the auto-generated
'sendWithAsyncReply' implementatoin. Ditto for NetworkProcessProxy::didClose.

This patch also moves an initializaton call (WebsiteDataStore::didCreateNetworkProcess) from
'ensureNetworkProcess' to 'processDidFinishLaunching'. In current code, the call happens before
a connection is established to the network process, causing initialization messages to get dropped
leading to test system flakiness.

Finally: The WK API test code was updated to ensure that completion handlers are always called, even
when built without ENABLE_RESOURCE_LOAD_STATISTICS defined.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
  • NetworkProcess/Classifier/ShouldGrandfatherStatistics.h: Added.
  • NetworkProcess/Classifier/StorageAccessStatus.h: Added.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcess::setAgeCapForClientSideCookies):
(WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
(WebKit::NetworkProcess::hasStorageAccessForFrame):
(WebKit::NetworkProcess::requestStorageAccess):
(WebKit::NetworkProcess::grantStorageAccess):
(WebKit::NetworkProcess::removeAllStorageAccess):
(WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::deleteWebsiteData):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::clearCallbackStates): Remove incomplete clean-up code that
is now autogenerated.
(WebKit::NetworkProcessProxy::didClose): Ditto.
(WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
(WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
(WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
(WebKit::NetworkProcessProxy::requestStorageAccess):
(WebKit::NetworkProcessProxy::grantStorageAccess):
(WebKit::NetworkProcessProxy::removeAllStorageAccess):
(WebKit::NetworkProcessProxy::setCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
(WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcessProxy::didUpdateBlockCookies): Deleted.
(WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies): Deleted.
(WebKit::NetworkProcessProxy::didUpdateRuntimeSettings): Deleted.
(WebKit::NetworkProcessProxy::storageAccessRequestResult): Deleted.
(WebKit::NetworkProcessProxy::storageAccessOperationResult): Deleted.
(WebKit::NetworkProcessProxy::didRemoveAllStorageAccess): Deleted.
(WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess): Move WebsiteDataStore 'didCreateNetworkProcess'
to 'processDidFinishLaunching'. Currently the call happens before a connection is established,
causing initialization messages to get dropped.
(WebKit::WebProcessPool::processDidFinishLaunching): Ditto.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setMaxStatisticsEntries):
(WebKit::WebsiteDataStore::setPruneEntriesDownTo):
(WebKit::WebsiteDataStore::setGrandfatheringTime):
(WebKit::WebsiteDataStore::setCacheMaxAgeCap):
(WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebsiteDataStore::setPrevalentResource):
(WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
(WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
(WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
(WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
(WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebKit.xcodeproj/project.pbxproj:
1:52 PM Changeset in webkit [240359] by aakash_jain@apple.com
  • 2 edits
    1 move in trunk/Tools

[ews-app] Rename ews model steps to step
https://bugs.webkit.org/show_bug.cgi?id=193697

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/models/step.py: Renamed from Tools/BuildSlaveSupport/ews-app/ews/models/steps.py.

(Step): Renamed Steps to Step.

1:39 PM Changeset in webkit [240358] by sihui_liu@apple.com
  • 10 edits in trunk

Clean up IndexedDB files between tests
https://bugs.webkit.org/show_bug.cgi?id=192796
<rdar://problem/46824999>

Reviewed by Geoffrey Garen.

Source/WebCore:

We should clean up the IndexedDB files between tests to make sure each IDB test is independent of others.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted):

Source/WebKit:

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreRemoveAllIndexedDatabases):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(runTest):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::RemoveAllIndexedDatabasesCallbackContext::RemoveAllIndexedDatabasesCallbackContext):
(WTR::RemoveAllIndexedDatabasesCallback):
(WTR::TestController::ClearIndexedDatabases):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

1:37 PM Changeset in webkit [240357] by aakash_jain@apple.com
  • 3 edits
    1 move in trunk/Tools

[ews-app] Rename ews model Builds to Build
https://bugs.webkit.org/show_bug.cgi?id=193695

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/models/build.py: Renamed from Tools/BuildSlaveSupport/ews-app/ews/models/builds.py.

(Build): Renamed Builds to Build.

1:28 PM Changeset in webkit [240356] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Wait longer when launching WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=193734

Reviewed by Aakash Jain.

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess._start): Increase timeout from 6 seconds to 15 seconds.

1:03 PM Changeset in webkit [240355] by Conrad Shultz
  • 18 edits in trunk/Source

Unreviewed; Revert "Clean up USE(WEB_THREAD)"

This reverts commit 24ba8bb9e1dad8679b492d9a2d47da619be85789.
https://bugs.webkit.org/show_bug.cgi?id=193698

12:54 PM Changeset in webkit [240354] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Add CSS Logical spec to features.json
https://bugs.webkit.org/show_bug.cgi?id=193717

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-23
Reviewed by Manuel Rego Casasnovas.

  • features.json:
12:36 PM Changeset in webkit [240353] by Conrad Shultz
  • 21 edits in trunk/Source

Clean up USE(WEB_THREAD)
https://bugs.webkit.org/show_bug.cgi?id=193698

Rubber-stamped by Tim Horton.

WebCore:

  • page/CaptionUserPreferencesMediaAF.cpp: (WebCore::userCaptionPreferencesChangedNotificationCallback):
  • platform/cf/MainThreadSharedTimerCF.cpp: (WebCore::applicationDidBecomeActive):
  • platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: (WebCore::dispatchToMainThread):
  • platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
  • platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::layoutTiles): (WebCore::LegacyTileCache::setTilingMode):
  • platform/ios/WebCoreMotionManager.mm: (-[WebCoreMotionManager sendAccelerometerData:]): (-[WebCoreMotionManager sendMotionData:withHeading:]):
  • platform/ios/WebVideoFullscreenControllerAVKit.mm: (VideoFullscreenControllerContext::requestUpdateInlineRect): (VideoFullscreenControllerContext::requestVideoContentLayer): (VideoFullscreenControllerContext::returnVideoContentLayer): (VideoFullscreenControllerContext::didSetupFullscreen): (VideoFullscreenControllerContext::willExitFullscreen): (VideoFullscreenControllerContext::didExitFullscreen): (VideoFullscreenControllerContext::didCleanupFullscreen): (VideoFullscreenControllerContext::fullscreenMayReturnToInline): (VideoFullscreenControllerContext::requestFullscreenMode): (VideoFullscreenControllerContext::setVideoLayerFrame): (VideoFullscreenControllerContext::setVideoLayerGravity): (VideoFullscreenControllerContext::fullscreenModeChanged): (VideoFullscreenControllerContext::play): (VideoFullscreenControllerContext::pause): (VideoFullscreenControllerContext::togglePlayState): (VideoFullscreenControllerContext::toggleMuted): (VideoFullscreenControllerContext::setMuted): (VideoFullscreenControllerContext::setVolume): (VideoFullscreenControllerContext::setPlayingOnSecondScreen): (VideoFullscreenControllerContext::beginScrubbing): (VideoFullscreenControllerContext::endScrubbing): (VideoFullscreenControllerContext::seekToTime): (VideoFullscreenControllerContext::fastSeek): (VideoFullscreenControllerContext::beginScanningForward): (VideoFullscreenControllerContext::beginScanningBackward): (VideoFullscreenControllerContext::endScanning): (VideoFullscreenControllerContext::selectAudioMediaOption): (VideoFullscreenControllerContext::selectLegibleMediaOption): (VideoFullscreenControllerContext::duration const): (VideoFullscreenControllerContext::currentTime const): (VideoFullscreenControllerContext::bufferedTime const): (VideoFullscreenControllerContext::isPlaying const): (VideoFullscreenControllerContext::playbackRate const): (VideoFullscreenControllerContext::seekableRanges const): (VideoFullscreenControllerContext::seekableTimeRangesLastModifiedTime const): (VideoFullscreenControllerContext::liveUpdateInterval const): (VideoFullscreenControllerContext::canPlayFastReverse const): (VideoFullscreenControllerContext::audioMediaSelectionOptions const): (VideoFullscreenControllerContext::audioMediaSelectedIndex const): (VideoFullscreenControllerContext::legibleMediaSelectionOptions const): (VideoFullscreenControllerContext::legibleMediaSelectedIndex const): (VideoFullscreenControllerContext::externalPlaybackEnabled const): (VideoFullscreenControllerContext::externalPlaybackTargetType const): (VideoFullscreenControllerContext::externalPlaybackLocalizedDeviceName const): (VideoFullscreenControllerContext::wirelessVideoPlaybackDisabled const): (VideoFullscreenControllerContext::setUpFullscreen): (VideoFullscreenControllerContext::exitFullscreen): (VideoFullscreenControllerContext::requestHideAndExitFullscreen): (-[WebVideoFullscreenController enterFullscreen:mode:]): (-[WebVideoFullscreenController exitFullscreen]): (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
  • platform/ios/wak/WAKWindow.mm: (-[WAKWindow setVisible:]): (-[WAKWindow setScreenScale:]): (-[WAKWindow sendEvent:]): (-[WAKWindow sendMouseMoveEvent:contentChange:]):
  • platform/network/ios/NetworkStateNotifierIOS.mm: (WebCore::NetworkStateNotifier::startObserving):
  • rendering/RenderThemeIOS.mm: (WebCore::contentSizeCategoryDidChange):

WebKitLegacy:

  • Misc/WebGeolocationProviderIOS.mm: (-[_WebCoreLocationUpdateThreadingProxy geolocationAuthorizationGranted]): (-[_WebCoreLocationUpdateThreadingProxy geolocationAuthorizationDenied]): (-[_WebCoreLocationUpdateThreadingProxy positionChanged:]): (-[_WebCoreLocationUpdateThreadingProxy errorOccurred:]): (-[_WebCoreLocationUpdateThreadingProxy resetGeolocation]):
  • WebCoreSupport/WebFixedPositionContent.mm: (-[WebFixedPositionContent didFinishScrollingOrZooming]):
  • Misc/WebCache.mm: (+[WebCache emptyInMemoryResources]):
  • WebCoreSupport/WebFrameLoaderClient.mm: (-[WebFramePolicyListener use]):
  • WebCoreSupport/WebGeolocationClient.mm: (-[WebGeolocationPolicyListener allow]): (-[WebGeolocationPolicyListener deny]): (-[WebGeolocationPolicyListener denyOnlyThisRequest]):
  • WebView/WebFrame.mm: (-[WebFrame deviceOrientationChanged]):
  • WebView/WebHTMLView.mm: (hardwareKeyboardAvailabilityChangedCallback):
  • WebView/WebView.mm: (+[WebView _releaseMemoryNow]): (+[WebView willEnterBackgroundWithCompletionHandler:]): (-[WebView updateLayoutIgnorePendingStyleSheets]): (-[WebView _dispatchUnloadEvent]): (-[WebView _close]): (-[WebView _preferencesChangedNotification:]): (-[WebView _setCustomFixedPositionLayoutRectInWebThread:synchronize:]): (-[WebView goBack]): (-[WebView goForward]): (+[WebView _cacheModelChangedNotification:]): (-[WebView stopLoading:]): (-[WebView stopLoadingAndClear]): (-[WebView reload:]): (WebInstallMemoryPressureHandler):
12:09 PM Changeset in webkit [240352] by Wenson Hsieh
  • 4 edits in trunk

[iOS] fast/events/touch/ios/hover-when-style-change-is-async.html times out
https://bugs.webkit.org/show_bug.cgi?id=193182
<rdar://problem/47452154>

Reviewed by Tim Horton.

Source/WebKit:

Fix an existing bug where blurring an element doesn't always un-suppress text interactions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _elementDidBlur]):

Tools:

This test was timing out because one of its preceding tests (drag-to-autoscroll-in-single-line-editable.html)
long presses and drags to select text, but does not end the touch by lifting up; subsequently, the tap gesture
recognizer isn't fired when simulating a tap in hover-when-style-change-is-async.html.

To fix this, tweak the test runner to make it safe for tests to end while touching the web view without
preventing later tests from recognizing gestures.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

Cancel all touches in the UIApplication when resetting to a consistent state between tests.

11:29 AM Changeset in webkit [240351] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

WebInspector: Confusingly nested events in the timeline for Mutation Observers
https://bugs.webkit.org/show_bug.cgi?id=192884
<rdar://problem/46854178>

Reviewed by Joseph Pecoraro.

If a microtask event (e.g. ObserverCallback) is contained within a EvaluatedScript
event, move that microtask event to be a sibling of the EvaluateScript, subtracting the
microtask's time taken from the EvaluateScript's time. If there are no other children
after this move, then remove the EvaluateScript altogether.

  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
(WI.TimelineManager.prototype.eventRecorded):
(WI.TimelineManager.prototype._mergeScriptProfileRecords):

11:18 AM Changeset in webkit [240350] by Michael Catanzaro
  • 6 edits in trunk/Source/WebKit

Minor improvements to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=193708

Reviewed by Alex Christensen.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::switchToNewTestingSession): Fix a spelling error.
(WebKit::NetworkProcess::ensureSession): Add useful assertion.
(WebKit::NetworkProcess::defaultStorageSession const): Split into platform functions.
(WebKit::NetworkProcess::destroySession): Add useful assertion.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):

  • NetworkProcess/curl/NetworkProcessCurl.cpp:

(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):

11:14 AM Changeset in webkit [240349] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix the Apple Internal build. See <rdar://problem/47486758>.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:previewForDroppingItem:withDefault:]):

11:13 AM Changeset in webkit [240348] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Sandbox fails to compile
https://bugs.webkit.org/show_bug.cgi?id=193727
<rdar://problem/47476903>

Reviewed by Brent Fulgham.

Use '(with send-signal SIGKILL)' instead of '(with termination)'.

  • WebProcess/com.apple.WebProcess.sb.in:
10:46 AM Changeset in webkit [240347] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Waterfall column should redraw when adding/removing new columns
https://bugs.webkit.org/show_bug.cgi?id=193696
<rdar://problem/47464149>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-23
Reviewed by Devin Rousso.

  • UserInterface/Views/TableColumn.js:

(WI.TableColumn.prototype.get needsReloadOnResize):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.initialLayout):
Mark the waterfall column as sensitive to any resizes.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.showColumn):
(WI.Table.prototype.hideColumn):
Update column widths and reload any columns that may be sensitive to resizes.

10:44 AM Changeset in webkit [240346] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION (r240243): CrashTracer: WebKitTestRunnerApp at com.apple.WebKit: WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const + 32
https://bugs.webkit.org/show_bug.cgi?id=193723
<rdar://problem/47476802>

Reviewed by David Kilzer.

The new code added in r240243 could attempt to submit telemetry after the relevant
WebResourceLoadStatisticsStore was destroyed. We should guard against this possibility.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:

(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):

10:39 AM Changeset in webkit [240345] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r240292): Attempt to fix WinCairo build

  • platform/network/curl/CurlResourceHandleDelegate.cpp:

(WebCore::handleCookieHeaders): Remove argument to
NetworkingContext::storageSession().

10:00 AM Changeset in webkit [240344] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

AX: [GTK] Layout test accessibility/set-selected-editable.html is failing
https://bugs.webkit.org/show_bug.cgi?id=193623

Patch by Eric Liang <ericliang@apple.com> on 2019-01-23
Reviewed by Michael Catanzaro.

AXSelected attribute behavior on GTK is different. Skipped.

  • platform/gtk/TestExpectations:
9:43 AM Changeset in webkit [240343] by Antti Koivisto
  • 6 edits in trunk/Source/WebKit

[PSON] Flash on back navigation on Mac
https://bugs.webkit.org/show_bug.cgi?id=193716
<rdar://problem/47148458>

Reviewed by Chris Dumez.

We close the page immediately if we fail to suspend. Layers disappear and we get a flash.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):

Remove the suspended page (so closing it on web process side) if the suspension fails.
Skip this if we are using web process side compositing on Mac.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::enterAcceleratedCompositingMode):

On Mac, remove failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::removeFailedSuspendedPagesForPage):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspendForProcessSwap):

Don't close the page on suspension failure.

9:30 AM Changeset in webkit [240342] by Wenson Hsieh
  • 19 edits in trunk/Source

Introduce UndoStep::label() and adopt it in WebKitLegacy and WebKit
https://bugs.webkit.org/show_bug.cgi?id=193706
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Refactors some existing logic when registering undoable actions, such that we propagate the undoable action's
label string instead of the EditAction to the client layer. This will help make handling of CustomUndoStep's
undo/redo label simpler, as the client layer won't need to worry about managing an EditAction and undo/redo
label simultaneously. There should be no change in behavior.

  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::label const):

  • editing/CompositeEditCommand.h:
  • editing/CustomUndoStep.cpp:

(WebCore::CustomUndoStep::label const):

  • editing/CustomUndoStep.h:
  • editing/EditAction.cpp:

(WebCore::undoRedoLabel):
(WebCore::nameForUndoRedo): Deleted.

  • editing/EditAction.h:

Rename nameForUndoRedo to undoRedoLabel, and remove the WEBCORE_EXPORT since it's no longer needed in WebKit or
WebKitLegacy.

  • editing/UndoStep.h:

Add UndoStep::label(). While EditCommandComposition implements this by mapping its EditAction to a
localized string, CustomUndoStep implements this by returning the undoable action label provided by script.

Source/WebKit:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::registerEditCommand):

  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::WebEditCommandProxy):

  • UIProcess/WebEditCommandProxy.h:

Drive-by tweak: make WebEditCommandProxy's backpointer to its WebPageProxy a WeakPtr instead of a raw pointer.
Additionally, call clear() instead of setting m_page to 0 upon invalidation. Also, turn the WebPageProxy*
argument into a WebPageProxy&, since the WebPageProxy must exist when it creates a new WebEditCommandProxy.

(WebKit::WebEditCommandProxy::create):
(WebKit::WebEditCommandProxy::label const):
(WebKit::WebEditCommandProxy::invalidate):
(WebKit::WebEditCommandProxy::editAction const): Deleted.

Adjust UI-side logic to just handle the undo/redo label, rather than map the edit action to a localized string.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::registerEditCommandForUndo):
(WebKit::WebPageProxy::resetState):

Tweak this to use std::exchange instead of copying all the WebEditCommandProxy RefPtrs into a separate Vector
and then iterating over the Vector.

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

Adjust this so that we only send the undo/redo label over IPC, rather than the edit action type.

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::registerEditCommand):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::registerUndoStep):

Source/WebKitLegacy/mac:

Use UndoStep::label().

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(-[WebUndoStep initWithUndoStep:]):
(+[WebUndoStep stepWithUndoStep:]):
(WebEditorClient::registerUndoOrRedoStep):
(WebEditorClient::registerUndoStep):
(WebEditorClient::registerRedoStep):

9:26 AM Changeset in webkit [240341] by Michael Catanzaro
  • 6 edits
    3 copies
    1 add
    1 delete in trunk/Source/WebKit

[SOUP] Remove libsoup cruft from WebProcess
https://bugs.webkit.org/show_bug.cgi?id=193710

Reviewed by Carlos Garcia Campos.

SoupNetworkSession is no longer accessible from the web process because it's owned
(indirectly) by NetworkProcess after r240292. It doesn't make sense to have any libsoup
code under WebProcess anymore. The current libsoup code consists of (a) unused stuff to be
removed, (b) stuff unrelated to libsoup, which should move to a WebProcessGLib.cpp, and (c)
WebKitSoupRequestInputStream, which is only used by NetworkProcess and should move there

  • NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: Renamed from Source/WebKit/WebProcess/soup/WebKitSoupRequestInputStream.cpp.

(AsyncReadData::AsyncReadData):
(webkitSoupRequestInputStreamReadAsyncResultComplete):
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamHasDataToRead):
(webkitSoupRequestInputStreamIsWaitingForData):
(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamReadFinish):
(webkitSoupRequestInputStreamFinalize):
(webkit_soup_request_input_stream_init):
(webkit_soup_request_input_stream_class_init):
(webkitSoupRequestInputStreamNew):
(webkitSoupRequestInputStreamAddData):
(webkitSoupRequestInputStreamDidFailWithError):
(webkitSoupRequestInputStreamFinished):

  • NetworkProcess/soup/WebKitSoupRequestInputStream.h: Renamed from Source/WebKit/WebProcess/soup/WebKitSoupRequestInputStream.h.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/soup/WebProcessPoolSoup.cpp:

(WebKit::WebProcessPool::setNetworkProxySettings): Don't send message to web processes.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/glib/WebProcessGLib.cpp: Renamed from Source/WebKit/WebProcess/soup/WebProcessSoup.cpp.

(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformTerminate):

9:24 AM Changeset in webkit [240340] by Michael Catanzaro
  • 10 edits in trunk/Source

[SOUP] Clean up NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=193707

Reviewed by Carlos Garcia Campos.

Source/WebCore:

A NetworkStorageSession now always has a SoupNetworkSession, so we can remove a lot of
complexity that is no longer needed. getOrCreateSoupNetworkSession can go away because we
know the session has always already been created. The soupNetworkSession getter can now
return a reference rather than a pointer, because it will never be NULL except after it has
been cleared with clearSoupNetworkSession (renamed), and that should only happen immediately
before process termination after nothing else is using it. Cookie jar syncing can also go
away; the NetworkStorageSession can now rely on the SoupNetworkSession to exist and just
use its cookie jar.

  • platform/network/NetworkStorageSession.h:

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

  • platform/network/soup/DNSResolveQueueSoup.cpp:

(WebCore::DNSResolveQueueSoup::updateIsUsingProxy):
(WebCore::DNSResolveQueueSoup::platformResolve):
(WebCore::DNSResolveQueueSoup::resolve):

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::~NetworkStorageSession):
(WebCore::NetworkStorageSession::soupNetworkSession const):
(WebCore::NetworkStorageSession::clearSoupNetworkSession):
(WebCore::NetworkStorageSession::cookieStorage const):
(WebCore::NetworkStorageSession::setCookieStorage):
(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const): Deleted.
(WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage): Deleted.

  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::create):

Source/WebKit:

Restore an important call to clearSoupNetworkSession that was removed in r240292. Also,
adapt to NetworkStorageSessions API changes.

  • NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:

(WebKit::LegacyCustomProtocolManager::registerScheme):

  • NetworkProcess/soup/NetworkProcessMainSoup.cpp:
  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::userPreferredLanguagesChanged):
(WebKit::NetworkProcess::setNetworkProxySettings):

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::soupSession const):

9:23 AM Changeset in webkit [240339] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Use correct config for --iphone-simulator and --ipad-simulator
https://bugs.webkit.org/show_bug.cgi?id=193722
<rdar://problem/47481475>

Reviewed by Lucas Forschler.

iPhone and iPad ports should both use the iOS config.

  • Scripts/webkitpy/port/ios_simulator.py:

(IPhoneSimulatorPort.init):
(IPadSimulatorPort.init):

8:48 AM Changeset in webkit [240338] by Philippe Normand
  • 2 edits in trunk/Source/WebKit

[GTK] Crash when browsing inspector:// uri without port set
https://bugs.webkit.org/show_bug.cgi?id=193721

Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::handleRequest): Return
back to caller after setting the error, if no port was provided
along with the inspector URL.

8:29 AM Changeset in webkit [240337] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][BFC] computeStaticPosition should include estimated computation as well.
https://bugs.webkit.org/show_bug.cgi?id=193719

Reviewed by Antti Koivisto.

Consolidate all static position (non-estimated, estimated) computation in BlockFormattingContext::computeStaticPosition.
It requires to compute width/horizontal margin first, since vertical top estimation needs valid horizontal widths (margin-top: 5% is computed using
the containing block's width).
This is also in preparation for moving 'clear' positioning to computeStaticPosition.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear const):
(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::adjustedVerticalPositionAfterMarginCollapsing const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const): Deleted.
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBeforeForAncestors const): Deleted.
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const): Deleted.

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):

8:11 AM Changeset in webkit [240336] by Simon Fraser
  • 8 edits
    7 adds in trunk

Compositing updates need to reparent scrolling tree nodes with a changed ancestor
https://bugs.webkit.org/show_bug.cgi?id=193699

Reviewed by Frédéric Wang.

Source/WebCore:

Now that compositing updates are incremental and may not do a full layer walk,
we need to ensure that when a scrolling tree node is removed, we traverse to all
descendant layers whose scrolling tree nodes refer to the removed node as their parent.

To achieve this, add a RenderLayer dirty bit for "NeedsScrollingTreeUpdate" which
ensures that the updateBackingAndHierarchy part of the compositing update traverses
layers with the bit set.

Adjust the compositing logging to make the legend easier to read.

Tests: scrollingcoordinator/reparent-across-compositing-layers.html

scrollingcoordinator/reparent-with-layer-removal.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::childrenOfNode const):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::childrenOfNode const):

  • rendering/RenderLayer.cpp:

(WebCore::outputPaintOrderTreeLegend):
(WebCore::outputPaintOrderTreeRecursive):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):

LayoutTests:

  • platform/ios-wk2/scrollingcoordinator/reparent-across-compositing-layers-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/reparent-with-layer-removal-expected.txt: Added.
  • scrollingcoordinator/reparent-across-compositing-layers-expected.txt: Added.
  • scrollingcoordinator/reparent-across-compositing-layers.html: Added.
  • scrollingcoordinator/reparent-with-layer-removal-expected.txt: Added.
  • scrollingcoordinator/reparent-with-layer-removal.html: Added.
7:40 AM Changeset in webkit [240335] by ddkilzer@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Duplicate global variables: JSC::opcodeLengths
<https://webkit.org/b/193714>
<rdar://problem/47340200>

Reviewed by Mark Lam.

  • bytecode/Opcode.cpp:

(JSC::opcodeLengths): Move array implementation here and mark
const.

  • bytecode/Opcode.h:

(JSC::opcodeLengths): Change to extern declaration.

7:04 AM Changeset in webkit [240334] by commit-queue@webkit.org
  • 13 edits in trunk

[css-logical] Implement flow-relative inset properties
https://bugs.webkit.org/show_bug.cgi?id=189441

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-23
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Enable the CSSLogicalEnabled flag in the test for logical insets, and
update its expectations. It still has some failures because sideways
writing modes have not been implemented yet
(https://bugs.webkit.org/show_bug.cgi?id=166941).

  • web-platform-tests/css/css-logical/logical-box-inset-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-inset.html:

Source/WebCore:

Implement 'inset', 'inset-block', 'inset-block-start', 'inset-block-end',
'inset-inline', 'inset-inline-start' and 'inset-inline-end' CSS properties
behind the CSSLogicalEnabled runtime flag.

Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-inset.html

webexposed/css-properties-behind-flags.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSProperties.json:
  • css/CSSProperty.cpp:

(WebCore::CSSProperty::resolveDirectionAwareProperty):
(WebCore::CSSProperty::isDirectionAwareProperty):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::isSimpleLengthPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

LayoutTests:

Check that the new CSS properties are disabled behind runtime flags
and are not exposed.

  • webexposed/css-properties-behind-flags-expected.txt:
  • webexposed/css-properties-behind-flags.html:
4:44 AM Changeset in webkit [240333] by commit-queue@webkit.org
  • 7 edits
    66 adds in trunk

[css-grid] Properly handle static positions of abspos inside grid items
https://bugs.webkit.org/show_bug.cgi?id=193657

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-23
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Import test changes from WPT.
Various orthogonal tests still fail because of https://bugs.webkit.org/show_bug.cgi?id=189513
Some other tests also fail because of https://bugs.webkit.org/show_bug.cgi?id=193656

  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-001.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-002.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-003.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-004-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-004.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-005-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-005.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-006-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-006.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-007-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-007.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-008-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-008.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-009-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-009.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-010-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-010.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-011-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-011.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-012-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-012.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-013-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-013.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-014-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-014.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-016-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-016.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-001.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-002.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-003.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-004-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-004.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-005-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-005.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-006-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-006.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-007-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-007.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-008-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-008.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-009-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-009.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-010-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-010.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-011-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-011.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-012-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-012.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-013-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-013.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-014-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-014.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-015-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-015.html: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-016-expected.txt: Added.
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-016.html: Added.
  • web-platform-tests/css/css-grid/abspos/support/positioned-grid-descendants.css: Added.

(.grid):
(.abspos):
(.orthogonal):
(.grid > :nth-child(1) > .abspos):
(.grid > :nth-child(2) > .abspos):

  • web-platform-tests/css/css-grid/abspos/support/positioned-grid-descendants.js: Added.

(export.runTests):

  • web-platform-tests/css/css-grid/abspos/support/w3c-import.log:
  • web-platform-tests/css/css-grid/abspos/w3c-import.log:

Source/WebCore:

Rename findChildLogicalPosition to setLogicalPositionForChild and let it set the position.
Add setLogicalOffsetForChild like setLogicalPositionForChild but just for one offset,
and only if it's needed (not for abspos descentants in their static position).
Add logicalOffsetForChild that finds the value to be set by the functions above.
Rename existing logicalOffsetForChild to logicalOffsetForOutOfFlowChild.

Tests: imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-001.html

imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-002.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-003.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-004.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-005.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-006.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-007.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-008.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-009.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-010.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-011.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-012.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-013.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-014.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-016.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-001.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-002.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-003.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-004.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-005.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-006.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-007.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-008.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-009.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-010.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-011.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-012.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-013.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-014.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-015.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-016.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::layoutPositionedObject):
(WebCore::RenderGrid::logicalOffsetForOutOfFlowChild const):
(WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const):
(WebCore::RenderGrid::setLogicalPositionForChild const):
(WebCore::RenderGrid::setLogicalOffsetForChild const):
(WebCore::RenderGrid::logicalOffsetForChild const):

  • rendering/RenderGrid.h:
3:58 AM Changeset in webkit [240332] by ddkilzer@apple.com
  • 7 edits in trunk/Source

Switch remaining CoreMedia soft-linking in WebKit over to CoreMediaSoftLink.{cpp,h}
<https://webkit.org/b/193694>
<rdar://problem/47464025>

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/cf/CoreMediaSoftLink.cpp:
  • Export kCMTimeZero soft-link.
  • pal/cf/CoreMediaSoftLink.h:
  • Update kCMTimeZero macro to use PAL namespace for use in WebKit.framework.

Source/WebKit:

  • Shared/ios/WebIconUtilities.mm:
  • Switch to using CoreMediaSoftLink.{h,mm} in PAL.

Source/WTF:

  • wtf/win/SoftLinking.h:

(SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT):

  • Implement for Windows.

(SOFT_LINK_CONSTANT_FOR_SOURCE):

  • Define using SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT().
3:32 AM Changeset in webkit [240331] by commit-queue@webkit.org
  • 13 edits
    1 add in trunk

Update MIME type parser
https://bugs.webkit.org/show_bug.cgi?id=180526

Patch by Rob Buis <rbuis@igalia.com> on 2019-01-23
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Update improved test expectations.

  • web-platform-tests/xhr/overridemimetype-blob-expected.txt:

Source/WebCore:

Add an enum to allow two modes of MIME type parsing, one mode
to keep supporting RFC2045 as before, and one mode to support
the updated MIME parser from mimesniff [1]. Mimesniff support
brings the following changes:

  • allows parameter names without matching =value.
  • skips whitespace after subtype, parameter value and before parameter name.
  • lower cases MIME type and parameter name.
  • parameter names parsed before are discarded.

The old mode is still used by CDM.cpp and MIMEHeader.cpp.

[1] https://mimesniff.spec.whatwg.org/

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):

  • platform/network/MIMEHeader.cpp:

(WebCore::MIMEHeader::parseHeader):

  • platform/network/ParsedContentType.cpp:

(WebCore::DummyParsedContentType::setContentType const):
(WebCore::DummyParsedContentType::setContentTypeParameter const):
(WebCore::isQuotedStringTokenCharacter):
(WebCore::isTokenCharacter):
(WebCore::parseToken):
(WebCore::containsNonTokenCharacters):
(WebCore::parseQuotedString):
(WebCore::isNotForwardSlash):
(WebCore::isNotSemicolon):
(WebCore::isNotSemicolonOrEqualSign):
(WebCore::parseContentType):
(WebCore::isValidContentType):
(WebCore::ParsedContentType::ParsedContentType):
(WebCore::ParsedContentType::setContentType):
(WebCore::isNonTokenCharacter):
(WebCore::isNonQuotedStringTokenCharacter):
(WebCore::ParsedContentType::setContentTypeParameter):

  • platform/network/ParsedContentType.h:

Test: web-platform-tests/xhr/overridemimetype-blob.html

Tools:

Add unit tests for both parse modes of ParsedContentType.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/ParsedContentType.cpp: Added.

(TestWebKitAPI::TEST):

LayoutTests:

Adjust test expectation.

  • http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt:
  • http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt:
  • http/tests/xmlhttprequest/post-blob-content-type-tests.js:
2:12 AM Changeset in webkit [240330] by Carlos Garcia Campos
  • 2 edits in trunk/Source/JavaScriptCore

[GLIB] Remote Inspector: no data displayed
https://bugs.webkit.org/show_bug.cgi?id=193569

Reviewed by Michael Catanzaro.

Release the remote inspector mutex before using RemoteConnectionToTarget in RemoteInspector::setup() to avoid a
deadlock.

  • inspector/remote/glib/RemoteInspectorGlib.cpp:

(Inspector::RemoteInspector::receivedSetupMessage):
(Inspector::RemoteInspector::setup):

Jan 22, 2019:

10:21 PM Changeset in webkit [240329] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

Unreviewed, fix initial global lexical binding epoch
https://bugs.webkit.org/show_bug.cgi?id=193603
<rdar://problem/47380869>

JSTests:

  • stress/global-lexical-binding-epoch-should-be-correct-one.js: Added.

(f1.f2.f3.f4):
(f1.f2.f3):
(f1.f2):
(f1):

Source/JavaScriptCore:

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

10:10 PM Changeset in webkit [240328] by Wenson Hsieh
  • 6 edits
    2 copies in trunk/Source/WebCore

Introduce CustomUndoStep.h and CustomUndoStep.cpp
https://bugs.webkit.org/show_bug.cgi?id=193704
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

This patch is more work in progress towards supporting UndoManager.addItem(). Here, we introduce a helper
class, CustomUndoStep, that holds a weak reference to a script-defined UndoItem. See below for more details.

No change in behavior.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/CustomUndoStep.cpp:

(WebCore::CustomUndoStep::CustomUndoStep):

Subclass UndoStep.

(WebCore::CustomUndoStep::unapply):
(WebCore::CustomUndoStep::reapply):

If possible, invoke the UndoItem's undo and redo handlers.

(WebCore::CustomUndoStep::isValid const):

  • editing/CustomUndoStep.h:
  • editing/EditingStyle.cpp:
  • editing/InsertEditableImageCommand.cpp:

(WebCore::InsertEditableImageCommand::doApply):

Unified build fixes.

  • page/UndoItem.h:
9:55 PM Changeset in webkit [240327] by ysuzuki@apple.com
  • 25 edits
    6 deletes in trunk

REGRESSION(r239612) Crash at runtime due to broken DFG assumption
https://bugs.webkit.org/show_bug.cgi?id=193709
<rdar://problem/47363838>

Unreviewed, rollout to watch the tests.

JSTests:

  • stress/object-tostring-changed-proto.js: Removed.
  • stress/object-tostring-changed.js: Removed.
  • stress/object-tostring-misc.js: Removed.
  • stress/object-tostring-other.js: Removed.
  • stress/object-tostring-untyped.js: Removed.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupObjectToString): Deleted.

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectToString): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

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

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectToString): Deleted.

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::finishCreation):
(JSC::objectProtoFuncToString):

  • runtime/ObjectPrototype.h:
  • runtime/ObjectPrototypeInlines.h: Removed.
  • runtime/StructureRareData.h:
9:42 PM Changeset in webkit [240326] by Simon Fraser
  • 5 edits
    7 adds in trunk

Adding a child to a ScrollingStateNode needs to trigger a tree state commit
https://bugs.webkit.org/show_bug.cgi?id=193682

Reviewed by Zalan Bujtas.

Source/WebCore:

Scrolling tree mutations that re-arrange nodes (e.g. node reordering when z-index changes)
need to trigger scrolling tree updates, and currently do not.

Fix by adding a "ChildNodes" dirty bit to ScrollingStateNode. There isn't any code that consults
this flag when committing the scrolling tree because we always eagerly traverse children, but
we could use it to optimize later. The important part is that we use it to trigger a tree update.

Can't test via z-reordering until webkit.org/b/192529 is fixed.

Tests: scrollingcoordinator/gain-scrolling-node-parent.html

scrollingcoordinator/lose-scrolling-node-parent.html

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::appendChild):
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::removeChildAtIndex):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::attachNode):

LayoutTests:

  • platform/ios/scrollingcoordinator/gain-scrolling-node-parent-expected.txt: Added.
  • platform/ios/scrollingcoordinator/lose-scrolling-node-parent-expected.txt: Added.
  • scrollingcoordinator/gain-scrolling-node-parent-expected.txt: Added.
  • scrollingcoordinator/gain-scrolling-node-parent.html: Added.
  • scrollingcoordinator/lose-scrolling-node-parent-expected.txt: Added.
  • scrollingcoordinator/lose-scrolling-node-parent.html: Added.
9:30 PM Changeset in webkit [240325] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Regression(r240178) Some API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193680

Reviewed by Alex Christensen.

r240178 made sure that userScripts / scriptMessageHandlers / contentExtensions are always
properly populated in the WebPageCreationParameters. This was needed in case we need to
reconstruct the WebUserContentController on the WebProcess side. However, this caused a
regression in the case we reuse a process where the WebUserContentController still exists
(because it was kept alive, e.g. by the WebPageGroup). In that case, we would add duplicate
entries to the existing WebUserContentController instance because its "add" methods did not
have duplicate checks. To address the issue, this patch adds duplicate checks to the
WebUserContentController "add" methods.

  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
(WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
(WebKit::WebUserContentController::addUserScriptInternal):
(WebKit::WebUserContentController::removeUserScriptInternal):
(WebKit::WebUserContentController::addUserStyleSheetInternal):
(WebKit::WebUserContentController::removeUserStyleSheetInternal):
(WebKit::WebUserContentController::forEachUserMessageHandler const):

  • WebProcess/UserContent/WebUserContentController.h:
9:20 PM Changeset in webkit [240324] by Simon Fraser
  • 6 edits in trunk/LayoutTests

Make scrollingcoordinator tests only run on iOS/macOS WK2
https://bugs.webkit.org/show_bug.cgi?id=193690

Reviewed by Zalan Bujtas.

scrollingcoordinator is only active in WK2, and both WPE and WinCairo skip this directory
already, so skip it at the top level, and re-enable for mac-wk2 and ios-wk2.

Also do some cleanup after tiled-drawing/ios was removed on 1/18.

  • TestExpectations:
  • platform/ios-device/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
8:51 PM Changeset in webkit [240323] by Devin Rousso
  • 13 edits
    2 adds in trunk

Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
https://bugs.webkit.org/show_bug.cgi?id=116191
<rdar://problem/13905910>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test inspector/timeline/line-column.html

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluateModule):

  • bindings/js/JSExecStateInstrumentation.h:

(WebCore::JSExecState::instrumentFunctionInternal):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::willEvaluateScript):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willCallFunctionImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):

  • inspector/agents/InspectorTimelineAgent.h:
  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):

  • inspector/TimelineRecordFactory.h:
  • inspector/TimelineRecordFactory.cpp:

(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::startColumn const): Added.

Source/WebInspectorUI:

  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.prototype._processRecord):

LayoutTests:

  • inspector/timeline/line-column.html: Added.
  • inspector/timeline/line-column-expected.txt: Added.
8:49 PM Changeset in webkit [240322] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari 12.0.3

Added a tag for Safari 12.0.3.

8:48 PM Changeset in webkit [240321] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/iOS 12.1.3

Added a tag iOS 12.1.3.

8:42 PM Changeset in webkit [240320] by youenn@apple.com
  • 22 edits in trunk

Resync libwebrtc with latest M72 branch
https://bugs.webkit.org/show_bug.cgi?id=193693
LayoutTests/imported/w3c:

<rdar://problem/47463803>

Reviewed by Eric Carlson.

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

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

Update libwebrtc up to latest M72 branch to fix some identified issues:

  • Bad bandwidth estimation in case of multiple transceivers
  • mid handling for legacy endpoints
  • msid handling for updating mediastreams accordingly.
  • Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.cc:
  • Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.h:
  • Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control.cc:
  • Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc:
  • Source/webrtc/modules/congestion_controller/send_side_congestion_controller_unittest.cc:
  • Source/webrtc/pc/jsepsessiondescription_unittest.cc:
  • Source/webrtc/pc/mediasession.cc:
  • Source/webrtc/pc/mediasession_unittest.cc:
  • Source/webrtc/pc/peerconnection.cc:
  • Source/webrtc/pc/peerconnection.h:
  • Source/webrtc/pc/peerconnection_jsep_unittest.cc:
  • Source/webrtc/pc/peerconnection_media_unittest.cc:
  • Source/webrtc/pc/peerconnection_rtp_unittest.cc:
  • Source/webrtc/pc/sessiondescription.cc:
  • Source/webrtc/pc/sessiondescription.h:
  • Source/webrtc/pc/webrtcsdp.cc:
  • Source/webrtc/pc/webrtcsdp_unittest.cc:
  • Source/webrtc/system_wrappers/include/metrics.h:
  • Source/webrtc/video/BUILD.gn:
8:28 PM Changeset in webkit [240319] by Dewei Zhu
  • 4 edits in trunk/Websites/perf.webkit.org

Analyzing a chart that does not exist should not halt whole run-analysis script.
https://bugs.webkit.org/show_bug.cgi?id=193563

Reviewed by Ryosuke Niwa.

Halting whole run-analysis script while there is any invalid chart specified in Manifest makes the script fragile.
Run-analysis is also responsible for adding retry and sending notification which should not be block by this error.
Skipping analyzing the corresponding configuration seems reasonable.

  • public/v3/models/measurement-set.js:

(MeasurementSet.prototype._ensureClusterPromise): Only add callback when callback is specified.
This will help to fix 'UnhandledPromiseRejectionWarning' while running the test.

  • tools/js/measurement-set-analyzer.js:

(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Catch the exception while failing to fetch a measurement set and skip the analysis for this config.

  • unit-tests/measurement-set-analyzer-tests.js: Added unit tests for this.
8:17 PM Changeset in webkit [240318] by Devin Rousso
  • 33 edits
    1 copy
    6 adds in trunk

Web Inspector: expose Audit and Recording versions to the frontend
https://bugs.webkit.org/show_bug.cgi?id=193262
<rdar://problem/47130684>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Audit.json:
  • inspector/protocol/Recording.json:

Add version values.

  • inspector/scripts/codegen/models.py:

(Protocol.parse_domain):
(Domain.init):
(Domain.version): Added.
(Domains):

  • inspector/scripts/codegen/generator.py:

(Generator.version_for_domain): Added.

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator.generate_output):
(CppProtocolTypesHeaderGenerator._generate_versions): Added.

  • inspector/scripts/codegen/generate_js_backend_commands.py:

(JSBackendCommandsGenerator.should_generate_domain):
(JSBackendCommandsGenerator.generate_domain):

  • inspector/scripts/tests/generic/version.json: Added.
  • inspector/scripts/tests/generic/expected/version.json-result: Added.
  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/domain-availability.json-result:
  • inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/generic/expected/enum-values.json-result:
  • inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
  • inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
  • inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Source/WebCore:

Tests: inspector/audit/version.html

inspector/recording/version.html

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass.prototype.registerVersion): Added.

  • UserInterface/Models/AuditTestCase.js:
  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
Add Interface version values.

LayoutTests:

  • inspector/audit/version.html: Added.
  • inspector/audit/version-expected.txt: Added.
  • inspector/recording/version.html: Added.
  • inspector/recording/version-expected.txt: Added.
8:06 PM Changeset in webkit [240317] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix GTK/WPE bots
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Doesn't make sense to clear the storage session right after creating it. This should fix
network process crash on startup under G_DEBUG=fatal-criticals due to the storage session
not having a cookie jar.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):

6:12 PM Changeset in webkit [240316] by Megan Gardner
  • 3 edits in trunk/Source/WebKit

Cancel Web Touches Properly so that long presses on YouTube links do not incorrectly trigger a load
https://bugs.webkit.org/show_bug.cgi?id=193687
<rdar://problem/47056717>

Reviewed by Tim Horton.

Cancel web gestures when a long press is recognized.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _cancelWebGestureRecognizer]):
(-[WKContentView _longPressRecognized:]):

6:06 PM Changeset in webkit [240315] by Wenson Hsieh
  • 8 edits
    2 copies in trunk/Source/WebCore

Add some bindings-related bookkeeping to UndoManager and UndoItem
https://bugs.webkit.org/show_bug.cgi?id=193111
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

This patch is work in progress towards supporting UndoManager.addItem(). Here, we add helper methods to
UndoItem and UndoManager which later patches will exercise, as well as introduce some custom bindings to
properly handle the case where UndoItems are given anonymous JavaScript functions (see below for more details).

No new tests, because there is no script-observable change in behavior yet. When addItems() is hooked up, I
will write a test to verify that the undo and redo JavaScript functions survive garbage collection.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSUndoItemCustom.cpp:

(WebCore::JSUndoItem::visitAdditionalChildren):

Have each JSUndoItem visit its undo and redo callback functions to ensure that the JavaScript wrapper objects
for these functions are not garbage collected underneath the item.

(WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):

Consider the undo item wrapper reachable from opaque roots if it is associated with its UndoManager's Document.
This ensures that if script isn't holding on to a reference to the wrapper (for instance, by calling
UndoManager.addItem(new UndoItem({ ... }))), we still protect the corresponding JSUndoItem as long as the
UndoManager's Document is alive. In the case where the undo item is not associated with a document, either (1)
script is keeping a reference to it, in which case it will be trivially reachable, or (2) script won't be able
to observe the destruction of the wrapper anyways (e.g. calling new UndoItem({ ... }) by itself).

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction):

Invalidate all undo items when the document is about to go away.

  • page/UndoItem.cpp:

(WebCore::UndoItem::setUndoManager):
(WebCore::UndoItem::invalidate):
(WebCore::UndoItem::isValid const):

Add a few helpers, to be used in a future patch. We consider an UndoItem valid if it has been added to an
UndoManager, and is thus associated with a document.

(WebCore::UndoItem::document const):

  • page/UndoItem.h:
  • page/UndoItem.idl:
  • page/UndoManager.cpp:

(WebCore::UndoManager::UndoManager):
(WebCore::UndoManager::addItem):

Have an UndoManager keep its UndoItems alive. These UndoItems remain in this set until either the document will
be destroyed, or the corresponding undo action is no longer needed because the platform undo stack has changed
(this latter behavior is yet to be implemented).

(WebCore::UndoManager::removeItem):
(WebCore::UndoManager::removeAllItems):

  • page/UndoManager.h:

(WebCore::UndoManager::UndoManager): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

Unified build fix.

5:46 PM Changeset in webkit [240314] by Nikita Vasilyev
  • 17 edits in trunk

Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
https://bugs.webkit.org/show_bug.cgi?id=193615

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Remove unused visibleProperties.

Rename:

  • properties to enabledProperties;
  • allProperties to properties;
  • allVisibleProperties to visibleProperties.
  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype._prependSemicolonIfNeeded):
(WI.CSSProperty):

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.get enabledProperties):
(WI.CSSStyleDeclaration.prototype.get properties):
(WI.CSSStyleDeclaration.prototype.propertyForName):
(WI.CSSStyleDeclaration.prototype.newBlankProperty):
(WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
(WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
(WI.DOMNodeStyles.prototype._markOverriddenProperties):
(WI.DOMNodeStyles.prototype._associateRelatedProperties):
(WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
(WI.DOMNodeStyles):

  • UserInterface/Views/BoxModelDetailsSectionRow.js:

(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):

  • UserInterface/Views/ComputedStyleSection.js:

(WI.ComputedStyleSection.prototype.get propertiesToRender):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.updateStatus):

LayoutTests:

Rename:

  • properties to enabledProperties;
  • allProperties to properties.
  • inspector/css/css-property-expected.txt:
  • inspector/css/css-property.html:
  • inspector/css/force-page-appearance.html:
  • inspector/css/matched-style-properties.html:
  • inspector/css/modify-css-property.html:
  • inspector/css/shadow-scoped-style.html:
5:13 PM Changeset in webkit [240313] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[WinCairo][WebKitTestRunner] Null dereference of GraphicsContext::m_data in GraphicsContext::releaseWindowsContext
https://bugs.webkit.org/show_bug.cgi?id=193664

Reviewed by Brent Fulgham.

WinCairo WebKitTestRunner always crash on openning test cases of
HTMLMeterElement.

If GraphicsContext::getWindowsContext retruned null HDC,
LocalWindowsContext shouldn't release the null HDC.

Covered by existing tests.

  • platform/graphics/win/LocalWindowsContext.h:

(WebCore::LocalWindowsContext::~LocalWindowsContext):
Release m_hdc only if it isn't null.

5:11 PM Changeset in webkit [240312] by sihui_liu@apple.com
  • 4 edits in trunk/LayoutTests

Layout test storage/indexeddb/open-during-transaction-private.html is failing
https://bugs.webkit.org/show_bug.cgi?id=193600

Reviewed by Brady Eidson.

Make sure the second request is finished before the third one so that test ends properly.

  • storage/indexeddb/open-during-transaction-expected.txt:
  • storage/indexeddb/open-during-transaction-private-expected.txt:
  • storage/indexeddb/resources/open-during-transaction.js:

(tryOpens.openreq3.onsuccess):
(tryOpens.openreq2.onsuccess):
(tryOpens):

4:43 PM Changeset in webkit [240311] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Fix an internal build failure after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580

Rubber-stamped by Wenson Hsieh.

  • SourcesCocoa.txt:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(-[WKMenuTarget forwardContextMenuAction:]):

  • WebKit.xcodeproj/project.pbxproj:

It was apparently unclear to the compiler sometimes which "state" selector to use, and this apparently mattered.
Tell the compiler to use the NSMenuItem selector, but at runtime it doesn't matter.

4:37 PM Changeset in webkit [240310] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix -Wsign-compare warning
https://bugs.webkit.org/show_bug.cgi?id=188697
<rdar://problem/46105624>

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::asText const):

4:32 PM Changeset in webkit [240309] by Devin Rousso
  • 7 edits in trunk

Web Inspector: Audit: provide a way to get related Accessibility properties for a given node
https://bugs.webkit.org/show_bug.cgi?id=193227
<rdar://problem/46787862>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/audit/run-accessibility.html

  • inspector/InspectorAuditAccessibilityObject.idl:
  • inspector/InspectorAuditAccessibilityObject.h:
  • inspector/InspectorAuditAccessibilityObject.cpp:

(WebCore::InspectorAuditAccessibilityObject::getComputedProperties): Added.

LayoutTests:

  • inspector/audit/run-accessibility.html:
  • inspector/audit/run-accessibility-expected.txt:
4:32 PM Changeset in webkit [240308] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix -Wunused-but-set-variable warning
https://bugs.webkit.org/show_bug.cgi?id=193660
<rdar://problem/47433602>

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

4:24 PM Changeset in webkit [240307] by Simon Fraser
  • 118 edits in trunk

Remove an iOS quirk where iframe renderers are identified as "RenderPartObject" in layout test results
https://bugs.webkit.org/show_bug.cgi?id=193692

Reviewed by Zalan Bujtas.

Source/WebCore:

Remove the iOS-specific renderName() implementation.

  • rendering/RenderIFrame.h:

LayoutTests:

Replace all instances of "RenderPartObject" with "RenderIFrame".

  • platform/ios-wk1/editing/pasteboard/4631972-expected.txt:
  • platform/ios-wk1/editing/pasteboard/subframe-dragndrop-1-expected.txt:
  • platform/ios-wk1/editing/selection/iframe-expected.txt:
  • platform/ios-wk1/editing/selection/select-all-iframe-expected.txt:
  • platform/ios-wk1/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios-wk1/fast/text/selection-hard-linebreak-expected.txt:
  • platform/ios-wk2/compositing/iframes/compositing-for-scrollable-iframe-expected.txt:
  • platform/ios-wk2/editing/pasteboard/4631972-expected.txt:
  • platform/ios-wk2/editing/pasteboard/subframe-dragndrop-1-expected.txt:
  • platform/ios-wk2/editing/selection/select-all-iframe-expected.txt:
  • platform/ios-wk2/fast/forms/basic-textareas-expected.txt:
  • platform/ios-wk2/fast/forms/tabbing-input-iframe-expected.txt:
  • platform/ios-wk2/fast/forms/targeted-frame-submission-expected.txt:
  • platform/ios-wk2/fast/frames/flattening/iframe-flattening-out-of-view-and-scroll-expected.txt:
  • platform/ios-wk2/fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout-expected.txt:
  • platform/ios-wk2/fast/frames/onlyCommentInIFrame-expected.txt:
  • platform/ios-wk2/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios-wk2/fast/replaced/border-radius-clip-expected.txt:
  • platform/ios/compositing/iframes/composited-iframe-alignment-expected.txt:
  • platform/ios/compositing/iframes/compositing-for-scrollable-iframe-expected.txt:
  • platform/ios/compositing/iframes/iframe-copy-on-scroll-expected.txt:
  • platform/ios/compositing/iframes/iframe-in-composited-layer-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-011-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-012-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-014-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-018-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-019-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-021-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-025-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-026-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-028-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-032-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-033-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-035-expected.txt:
  • platform/ios/css2.1/20110323/block-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/block-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/block-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/float-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/float-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/float-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/inline-block-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/inline-block-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/inline-block-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/inline-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/inline-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/inline-replaced-height-007-expected.txt:
  • platform/ios/editing/execCommand/find-after-replace-expected.txt:
  • platform/ios/editing/execCommand/paste-1-expected.txt:
  • platform/ios/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
  • platform/ios/editing/pasteboard/image-in-iframe-expected.txt:
  • platform/ios/editing/pasteboard/paste-2-expected.txt:
  • platform/ios/editing/selection/4776665-expected.txt:
  • platform/ios/editing/selection/4960137-expected.txt:
  • platform/ios/editing/selection/4975120-expected.txt:
  • platform/ios/editing/selection/drag-in-iframe-expected.txt:
  • platform/ios/editing/selection/drag-to-contenteditable-iframe-expected.txt:
  • platform/ios/editing/selection/iframe-expected.txt:
  • platform/ios/fast/block/basic/013-expected.txt:
  • platform/ios/fast/block/positioning/window-height-change-expected.txt:
  • platform/ios/fast/css/line-height-overflow-expected.txt:
  • platform/ios/fast/css/resize-corner-tracking-transformed-iframe-expected.txt:
  • platform/ios/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt:
  • platform/ios/fast/dom/Window/open-existing-pop-up-blocking-expected.txt:
  • platform/ios/fast/flexbox/016-expected.txt:
  • platform/ios/fast/forms/basic-textareas-expected.txt:
  • platform/ios/fast/forms/tabbing-input-iframe-expected.txt:
  • platform/ios/fast/forms/targeted-frame-submission-expected.txt:
  • platform/ios/fast/frames/001-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-height-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-width-and-height-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-width-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-nested-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-offscreen-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-out-of-view-and-scroll-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-out-of-view-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-simple-expected.txt:
  • platform/ios/fast/frames/frameElement-iframe-expected.txt:
  • platform/ios/fast/frames/iframe-option-crash-expected.txt:
  • platform/ios/fast/frames/iframe-scrolling-attribute-expected.txt:
  • platform/ios/fast/frames/iframe-with-frameborder-expected.txt:
  • platform/ios/fast/frames/onlyCommentInIFrame-expected.txt:
  • platform/ios/fast/frames/take-focus-from-iframe-expected.txt:
  • platform/ios/fast/images/favicon-as-image-expected.txt:
  • platform/ios/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios/fast/regions/repaint/line-flow-with-floats-in-regions-expected.txt:
  • platform/ios/fast/replaced/007-expected.txt:
  • platform/ios/fast/replaced/border-radius-clip-expected.txt:
  • platform/ios/fast/replaced/percent-height-in-anonymous-block-in-table-expected.txt:
  • platform/ios/fast/replaced/replaced-breaking-expected.txt:
  • platform/ios/fast/table/quote-text-around-iframe-expected.txt:
  • platform/ios/fast/text-autosizing/ios/contenteditable-expected.txt:
  • platform/ios/http/tests/loading/simple-subframe-expected.txt:
  • platform/ios/http/tests/local/file-url-sent-as-referer-expected.txt:
  • platform/ios/http/tests/misc/favicon-as-image-expected.txt:
  • platform/ios/http/tests/misc/frame-access-during-load-expected.txt:
  • platform/ios/http/tests/misc/iframe404-expected.txt:
  • platform/ios/http/tests/multipart/invalid-image-data-standalone-expected.txt:
  • platform/ios/http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/document-write/nested-document-write-2-expected.txt:
  • platform/ios/ios/fast/fixed/frame-with-fixed-expected.txt:
  • platform/ios/svg/custom/embedding-external-svgs-expected.txt:
  • platform/ios/svg/hixie/rendering-model/003-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug131020-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug137388-1-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug137388-2-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug137388-3-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug38916-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug4527-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug50695-2-expected.txt:
  • platform/ios/webarchive/loading/cache-expired-subresource-expected.txt:
4:19 PM Changeset in webkit [240306] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, further build fixes after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Oops.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::defaultStorageSession const):

4:13 PM Changeset in webkit [240305] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
https://bugs.webkit.org/show_bug.cgi?id=193647

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-01-22
Reviewed by Simon Fraser.

Source/WebCore:

Changing a style attribute of an SVGELement needs to call invalidateInstances().

Tests: svg/custom/svg-use-style-dynamic-change-invalidate.svg

  • svg/SVGElement.cpp:

(WebCore::SVGElement::attributeChanged):

LayoutTests:

  • svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg: Added.
  • svg/custom/svg-use-style-dynamic-change-invalidate.svg: Added.
4:10 PM Changeset in webkit [240304] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, further build fixes after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

This builds for libsoup. Doesn't work, but at least builds.

Also, speculative fixes for curl.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::defaultStorageSession const):

4:04 PM Changeset in webkit [240303] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] fetch loop should not stop on network issues
https://bugs.webkit.org/show_bug.cgi?id=193666

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(FetchLoop.run): Ensure that fetch loop doesn't exit on any exception.

3:50 PM Changeset in webkit [240302] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit

Unreviewed, further build fixes after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Still not working yet.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):

  • UIProcess/API/APIHTTPCookieStore.h:
3:21 PM Changeset in webkit [240301] by Wenson Hsieh
  • 4 edits in trunk/Tools

[iOS] Multiple WKWebViewAutofillTests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=189165
<rdar://problem/47433765>

Reviewed by Tim Horton.

These tests are currently flaky because they expect an invocation of "Element.blur()" in the web process to
immediately dispatch an IPC message to notify the UI process that the element has been blurred. In particular,
the -textInputHasAutofillContext helper assumes that waiting for the next remote layer tree commit in the UI
process in sufficient to ensure that any previous action that blurred the focused element in the web process
would make its way to the UI process by the time the layer tree commit is finished.

However, WebPage::elementDidBlur sends its IPC message to the UI process asynchronously, using callOnMainThread.
This means that if a layer tree flush was already scheduled in the web process before the element was blurred,
the element blur IPC message to the UI process will lose the race against the layer tree commit, and the test
will fail because it asks for -_autofillContext too early.

To fix this, we tweak these tests to actually wait until the intended input session change triggered by script
is handled in the UI process.

  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:

Tweak some of these tests to wait for input session changes before checking for the presence of an autofill
context. The only exception is an existing test that doesn't allow programmatic focus to begin input sessions
by default; to fix this test, we simply wait for _WKInputDelegate to be invoked, instead of waiting for a new
input session.

(-[AutofillTestView textInputHasAutofillContext]):

Remove the incorrect presentation update here. This helper now assumes that the UI process is up to date.

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

(nextInputSessionChangeCount):

Monotonically increasing identifier that's incremented whenever an input session is started in the UI process.
This includes changing the focused element from one to another.

(-[TestWKWebView initWithFrame:configuration:addToWindow:]):
(-[TestWKWebView didStartFormControlInteraction]):
(-[TestWKWebView didEndFormControlInteraction]):
(-[TestWKWebView evaluateJavaScriptAndWaitForInputSessionToChange:]):

Add a helper to evaluate JavaScript and wait for this script to cause some change in the input session. This
handles three cases: (1) changing focus from an element that doesn't require an input session to one that does,
(2) changing focus between elements that require input sessions, and (3) changing focus from an input session
that doesn't require an input session to one that doesn't.

3:08 PM Changeset in webkit [240300] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit/UIProcess

Apply patch. rdar://problem/47458213

Unreviewed, fix build after r240046.

2:51 PM Changeset in webkit [240299] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style reports false-positive whitespace/init warning in C++ initialization parameters
<https://webkit.org/b/193676>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_member_initialization_list):

  • Don't report missing whitespace around colon if the colon at the start of the line is formatted correctly.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(WebKitStyleTest.test_member_initialization_list):

  • Add a test for a missing permutation of existing tests.
  • Add a test this false-positive.
  • Add blank lines between subtests to make them easier to read.
2:31 PM Changeset in webkit [240298] by Antti Koivisto
  • 4 edits in trunk/Source/WebKit

[iOS] Flash when swiping back to Google search result page
https://bugs.webkit.org/show_bug.cgi?id=193668
<rdar://problem/47071684>

Reviewed by Simon Fraser.

If the google page is scrolled, there is sometimes a short flash.

When restoring the page state we also restore exposedContentRect which is used to determine
which part of the page to create layers for. Scroll position is restored by the UI process
later so we rely on this to get the right layers for the initial view update.

A viewport configuration update may sometimes trample over the restored exposedContentRect,
moving it to top left. In this case the initial layer tree unfreeze commit may not have
layers to cover the actual visible view position.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):

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

(WebKit::WebPage::restorePageState):

Set a bit to indicate we have already restored the exposedContentRect.

(WebKit::WebPage::viewportConfigurationChanged):

Only reset exposedContentRect if wasn't already set by restorePageState.

2:10 PM Changeset in webkit [240297] by achristensen@apple.com
  • 5 edits in trunk/Source

Fix more builds.

Source/WebCore:

  • platform/network/curl/CurlResourceHandleDelegate.cpp:

(WebCore::handleCookieHeaders):
(WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):

Source/WebKit:

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
2:04 PM Changeset in webkit [240296] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Another build fix after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Unreviewed, still not enough to fix soup builds, but closer.

  • UIProcess/API/APIHTTPCookieStore.h:
1:52 PM Changeset in webkit [240295] by achristensen@apple.com
  • 7 edits in trunk/Source

Fix some builds after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580

Source/WebCore:

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::switchToNewTestingSession):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::retrieve):

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp:
1:45 PM Changeset in webkit [240294] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Automation.computeElementLayout should return visual viewport-aware coordinates
https://bugs.webkit.org/show_bug.cgi?id=193598
<rdar://problem/35325644>

Unreviewed, restore a mistakenly-deleted line whose absence causes hangs.

  • Shared/CoordinateSystem.h:
1:34 PM Changeset in webkit [240293] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed, skip all resource load statistics tests on GTK

We don't have this feature enabled yet, so shouldn't be running the tests. Yet.

  • platform/gtk/TestExpectations:
1:28 PM Changeset in webkit [240292] by achristensen@apple.com
  • 62 edits
    3 adds in trunk/Source

Move NetworkStorageSession ownership to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=193580

Reviewed by Geoff Garen.

Source/WebCore:

NetworkStorageSessions used to be owned by a process-global map living in WebCore.
This patch moves the ownership to the WebKit/WebKitLegacy layer.
In WebKitLegacy they are still owned by a process-global map for compatibility.
In WebKit they are owned by a map owned by the NetworkProcess object.
There were three non-NetworkProcess uses of NetworkStorageSessions which have been dealt with thusly:

  1. The WebProcess used to clear credentials from a NetworkStorageSession. Since this was the only use

of a NetworkStorageSession in the WebProcess we can conclude there were no credentials to clear,
so this code was removed with no change in behavior.

  1. The WebProcess used NetworkStorageSessions to get persistent credentials. This was turned

into a static method that does the same thing. We should audit these calls and decide if we really want them.

  1. The UIProcess used NetworkStorageSessions in APIHTTPCookieStore to interact with the default cookie

storage on Cocoa platforms. This has been replaced by functions that do the same thing directly.

  • platform/network/CredentialStorage.h:
  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::processMayUseCookieAPI):
(WebCore::NetworkStorageSession::globalSessionMap): Deleted.
(WebCore::NetworkStorageSession::storageSession): Deleted.
(WebCore::NetworkStorageSession::destroySession): Deleted.
(WebCore::NetworkStorageSession::forEach): Deleted.

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

(WebCore::NetworkStorageSession::createCFStorageSessionForIdentifier):
(WebCore::createCFStorageSessionForIdentifier): Deleted.
(WebCore::defaultNetworkStorageSession): Deleted.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
(WebCore::NetworkStorageSession::ensureSession): Deleted.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):

  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::defaultSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
(WebCore::NetworkStorageSession::ensureSession): Deleted.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage):
(WebCore::defaultSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
(WebCore::NetworkStorageSession::ensureSession): Deleted.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.

Source/WebKit:

  • NetworkProcess/Cookies/WebCookieManager.cpp:

(WebKit::WebCookieManager::WebCookieManager):
(WebKit::WebCookieManager::getHostnamesWithCookies):
(WebKit::WebCookieManager::deleteCookiesForHostname):
(WebKit::WebCookieManager::deleteAllCookies):
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::startObservingCookieChanges):
(WebKit::WebCookieManager::stopObservingCookieChanges):

  • NetworkProcess/Cookies/WebCookieManager.h:
  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:

(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
(WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
(WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::switchToNewTestingSession):
(WebKit::NetworkProcess::ensureSession):
(WebKit::NetworkProcess::storageSession const):
(WebKit::NetworkProcess::defaultStorageSession const):
(WebKit::NetworkProcess::forEachNetworkStorageSession):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcess::setAgeCapForClientSideCookies):
(WebKit::NetworkProcess::hasStorageAccessForFrame):
(WebKit::NetworkProcess::getAllStorageAccessEntries):
(WebKit::NetworkProcess::grantStorageAccess):
(WebKit::NetworkProcess::removeAllStorageAccess):
(WebKit::NetworkProcess::removePrevalentDomains):
(WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation):
(WebKit::NetworkResourceLoader::logCookieInformation const):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::networkStorageSession const):

  • NetworkProcess/NetworkStorageSessionProvider.h:
  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::makeEntry):
(WebKit::NetworkCache::Cache::makeRedirectEntry):
(WebKit::NetworkCache::Cache::update):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformSyncAllCookies):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • SourcesCocoa.txt:
  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::~HTTPCookieStore):
(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookie):
(API::HTTPCookieStore::deleteCookie):
(API::HTTPCookieStore::registerObserver):
(API::HTTPCookieStore::unregisterObserver):
(API::HTTPCookieStore::registerForNewProcessPoolNotifications):
(API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
(API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
(API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
(API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
(API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
(API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: Added.

(API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
(API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
(API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
(API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
(API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
(API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::clearCachedCredentials):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::deleteWebsiteData):
(WebKit::WebProcess::clearCachedCredentials): Deleted.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp: Added.

(defaultNetworkStorageSession):
(globalSessionMap):
(NetworkStorageSessionMap::storageSession):
(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::switchToNewTestingSession):
(NetworkStorageSessionMap::ensureSession):
(NetworkStorageSessionMap::destroySession):

  • WebCoreSupport/NetworkStorageSessionMap.h: Added.
  • WebCoreSupport/PageStorageSessionProvider.h:
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • Misc/WebCache.mm:

(+[WebCache clearCachedCredentials]):

  • Misc/WebDownload.mm:

(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):

  • Plugins/WebBaseNetscapePluginView.mm:

(WebKit::getAuthenticationInfo):

  • WebCoreSupport/WebFrameNetworkingContext.mm:

(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebFrameNetworkingContext::storageSession const):

  • WebView/WebPreferences.mm:

(+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
(+[WebPreferences _clearNetworkLoaderSession]):
(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameNetworkingContext.cpp:

(WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebFrameNetworkingContext::storageSession const):

  • WebDownloadCFNet.cpp:

(WebDownload::didReceiveAuthenticationChallenge):

  • WebPreferences.cpp:

(WebPreferences::clearNetworkLoaderSession):
(WebPreferences::switchNetworkLoaderToNewTestingSession):

1:25 PM Changeset in webkit [240291] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] Unit-test failure after r237113
https://bugs.webkit.org/show_bug.cgi?id=193669

Reviewed by Michael Catanzaro.

  • BuildSlaveSupport/build.webkit.org-config/factories.py:

(Factory.init): Properly check for --no-experimental-features flag when additionalArguments has
multiple or zero flags.

1:23 PM Changeset in webkit [240290] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Table appears broken after filter - rows look collapsed
https://bugs.webkit.org/show_bug.cgi?id=192730
<rdar://problem/46853158>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-22
Reviewed by Devin Rousso.

  • UserInterface/Views/Table.js:

(WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
Affect the filler row like the other applyColumnWidths calls since this
now may be the initial call to size visible columns.

1:22 PM Changeset in webkit [240289] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Adjust logging policy in WebKit's sandbox
https://bugs.webkit.org/show_bug.cgi?id=193454

Reviewed by Brent Fulgham.

Add a rule to initially deny all calls, since the default is to allow every call.
Later rules allow syscalls that we determined are needed for proper WebKit function.
This reduces the API surface available to attackers.

  • WebProcess/com.apple.WebProcess.sb.in:
1:15 PM Changeset in webkit [240288] by dbates@webkit.org
  • 5 edits
    2 adds in trunk/Source/WebKit

[iOS] WebKit should handle shift state changes when using the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=191475
<rdar://problem/45949246>

Reviewed by Brent Fulgham.

Implement UIKit SPI to be notified of shift state changes to the software keyboard
and dispatch a synthetic keydown or keyup event for either the Shift key or Caps Lock
key.

A side benefit of this change is that we now show and hide the caps lock indicator
in a focused password field when caps lock is enabled or disabled using the software
keyboard, respectively.

  • Platform/spi/ios/UIKitSPI.h: Expose more SPI.
  • SourcesCocoa.txt:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView modifierFlagsDidChangeFrom:to:]): Create a synthetic flags changed
web event based on the state change and dispatch it.
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Early return if the event
was a synethic flags change event so that we do not notify UIKit about this event
as it does not know anything about such synthetic events.

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

(-[WKSyntheticFlagsChangedWebEvent initWithKeyCode:modifiers:keyDown:]):
(-[WKSyntheticFlagsChangedWebEvent initWithCapsLockState:]):
(-[WKSyntheticFlagsChangedWebEvent initWithShiftState:]):

  • WebKit.xcodeproj/project.pbxproj:
1:02 PM Changeset in webkit [240287] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240055. rdar://problem/47099573

Regression(r240046) Several API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193509

Reviewed by Geoffrey Garen.

The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
our process reference.

To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
our process stays alive.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::loadDataWithNavigationShared): (WebKit::WebPageProxy::didPerformDragControllerAction): (WebKit::WebPageProxy::findPlugin): (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didCreateSubframe): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): (WebKit::WebPageProxy::willPerformClientRedirectForFrame): (WebKit::WebPageProxy::didCancelClientRedirectForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): (WebKit::WebPageProxy::didRunInsecureContentForFrame): (WebKit::WebPageProxy::frameDidBecomeFrameSet): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNavigationActionSync): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::decidePolicyForResponseShared): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::willSubmitForm): (WebKit::WebPageProxy::didNavigateWithNavigationData): (WebKit::WebPageProxy::didNavigateWithNavigationDataShared): (WebKit::WebPageProxy::didPerformClientRedirect): (WebKit::WebPageProxy::didPerformClientRedirectShared): (WebKit::WebPageProxy::didPerformServerRedirect): (WebKit::WebPageProxy::didUpdateHistoryTitle): (WebKit::WebPageProxy::createNewPage): (WebKit::WebPageProxy::runJavaScriptAlert): (WebKit::WebPageProxy::runJavaScriptConfirm): (WebKit::WebPageProxy::runJavaScriptPrompt): (WebKit::WebPageProxy::unavailablePluginButtonClicked): (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): (WebKit::WebPageProxy::runOpenPanel): (WebKit::WebPageProxy::printFrame): (WebKit::WebPageProxy::backForwardGoToItem): (WebKit::WebPageProxy::backForwardGoToItemShared): (WebKit::WebPageProxy::learnWord): (WebKit::WebPageProxy::ignoreWord): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::editingRangeCallback): (WebKit::WebPageProxy::rectForCharacterRangeCallback): (WebKit::WebPageProxy::focusedFrameChanged): (WebKit::WebPageProxy::frameSetLargestFrameChanged): (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): (WebKit::WebPageProxy::startURLSchemeTask): (WebKit::WebPageProxy::startURLSchemeTaskShared): (WebKit::WebPageProxy::stopURLSchemeTask): (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
  • UIProcess/WebPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:02 PM Changeset in webkit [240286] by Alan Coon
  • 55 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240046. rdar://problem/47099573

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): When restoring from PageCache, make sure we notify the client that the load was committed *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h: Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to delay attaching the drawing area in case of a process-swap, no matter what now that the previous process is kept alive until the provisional load is committed in the new process.
  • Shared/WebPolicyAction.h: Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of process-swap, we now tell the previous process to simply ignore the load, while we create a ProvisionalPageProxy to do the new load in a new process. Suspension of the previous page in the old process, happens later, when a load is actually committed in the new process.
  • Sources.txt: Add new ProvisionalPageProxy file.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _killWebContentProcessAndResetState]): When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current process and the provisional one, to maintain previous behavior in our API tests.
  • UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/AcceleratedDrawingAreaProxy.cpp: (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy): (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing): (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createDrawingAreaProxy):
  • UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): (WebKit::DrawingAreaProxy::~DrawingAreaProxy): (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
  • UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::process):
  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::update):
  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd): (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay): (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm: (-[WKContentView _createDrawingAreaProxy:]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Pass the drawing area's associated process when constructing it and store it as a member in addition to the page. This is necessary now that a page can be associated with 2 WebProcesses at a time, each having its own drawing area.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Pass the process.
  • UIProcess/ProvisionalPageProxy.cpp: Added. (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::processDidTerminate): (WebKit::ProvisionalPageProxy::takeDrawingArea): (WebKit::ProvisionalPageProxy::cancel): (WebKit::ProvisionalPageProxy::processDidFinishLaunching): (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::goToBackForwardItem): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
  • UIProcess/ProvisionalPageProxy.h: Added. (WebKit::ProvisionalPageProxy::page): (WebKit::ProvisionalPageProxy::mainFrame const): (WebKit::ProvisionalPageProxy::process): (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const): (WebKit::ProvisionalPageProxy::navigationID const): (WebKit::ProvisionalPageProxy::drawingArea const): New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from the provisional process.
  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::unsuspend): (WebKit::SuspendedPageProxy::didProcessRequestToSuspend): Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy which tries to register itself as an IPC message receiver for the same pageID when a process-swap occurs and we're switching to a suspended page.
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isMainFrame const): WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame. Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's m_mainFrame to maintain previous behavior.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::provisionalDrawingArea const): Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.

(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy. This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):

(WebKit::WebPageProxy::provisionalProcessDidTerminate):
Cancel the provisiona load and destroy the ProvisionalPageProxy if
the provisional process crashes.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):

  • Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have more than one call site. This was just some bad factoring.
  • Take the process in parameter now that we page can be associated with several processes at a time.

(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::visitedLinkStore): (WebKit::WebPageProxy::provisionalPageProxy const):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::hasProvisionalPageWithID const): (WebKit::WebProcessProxy::updateBackForwardItem): (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch): (WebKit::WebProcessProxy::didFinishLaunching): (WebKit::WebProcessProxy::canTerminateChildProcess):
  • UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::addProvisionalPageProxy): (WebKit::WebProcessProxy::removeProvisionalPageProxy): Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID associated with this process yet, because it is still a ProvisionalPageProxy.
  • UIProcess/WebURLSchemeHandler.cpp: (WebKit::WebURLSchemeHandler::startTask):
  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp: (WebKit::WebURLSchemeTask::create): (WebKit::WebURLSchemeTask::WebURLSchemeTask): (WebKit::WebURLSchemeTask::didPerformRedirection): (WebKit::WebURLSchemeTask::didReceiveResponse): (WebKit::WebURLSchemeTask::didReceiveData): (WebKit::WebURLSchemeTask::didComplete): (WebKit::WebURLSchemeTask::pageDestroyed):
  • UIProcess/WebURLSchemeTask.h: Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
  • UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::endSwipeGesture): Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently associated with the page in case of process swap.
  • WebKit.xcodeproj/project.pbxproj: Add ProvisionalPageProxy class.
  • WebProcess/WebPage/WebFrame.cpp: (WebKit::toPolicyAction): (WebKit::WebFrame::didReceivePolicyDecision):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldAttachDrawingAreaOnPageTransition): (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didReceivePolicyDecision): Stop dealing with WebPolicyAction::Suspend as it no longer exists.

(WebKit::WebPage::didCompletePageTransition):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/WebPage.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:59 PM Changeset in webkit [240285] by dbates@webkit.org
  • 8 edits in trunk/Source

[iOS] Interpret text key commands on keydown and app key commands on keypress
https://bugs.webkit.org/show_bug.cgi?id=192897
<rdar://problem/46857378>

Reviewed by Brent Fulgham.

Source/WebKit:

Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
is false) and keypress (isCharEvent is true), respectively.

  • Platform/spi/ios/UIKitSPI.h: Add more SPI.
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interpretKeyEvent:isCharEvent:]):

Source/WebKitLegacy/ios:

Add stubs for SPI.

  • DefaultDelegates/WebDefaultUIKitDelegate.m:

(-[WebDefaultUIKitDelegate handleKeyTextCommandForCurrentEvent]): Added.
(-[WebDefaultUIKitDelegate handleKeyAppCommandForCurrentEvent]): Added.
(-[WebDefaultUIKitDelegate handleKeyCommandForCurrentEvent]): Deleted.

  • WebView/WebUIKitDelegate.h:

Source/WebKitLegacy/mac:

Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
is false) and keypress (isCharEvent is true), respectively.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _handleEditingKeyEvent:]):

12:58 PM Changeset in webkit [240284] by Alan Coon
  • 24 edits
    2 deletes in branches/safari-607-branch

Revert r240258. rdar://problem/47099573

12:58 PM Changeset in webkit [240283] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Revert r240259. rdar://problem/47099573

12:58 PM Changeset in webkit [240282] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source

Revert r240260. rdar://problem/47099573

12:58 PM Changeset in webkit [240281] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WTF

Revert r240261. rdar://problem/47099573

12:58 PM Changeset in webkit [240280] by Alan Coon
  • 24 edits
    2 adds in branches/safari-607-branch

Revert r240262. rdar://problem/47099573

12:58 PM Changeset in webkit [240279] by Alan Coon
  • 55 edits
    2 deletes in branches/safari-607-branch

Revert r240263. rdar://problem/47099573

12:57 PM Changeset in webkit [240278] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Revert r240264. rdar://problem/47099573

12:52 PM Changeset in webkit [240277] by Devin Rousso
  • 7 edits in trunk

Web Inspector: Audit: provide a way to get related Accessibility nodes for a given node
https://bugs.webkit.org/show_bug.cgi?id=193225
<rdar://problem/46799956>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/audit/run-accessibility.html

  • inspector/InspectorAuditAccessibilityObject.idl:
  • inspector/InspectorAuditAccessibilityObject.h:
  • inspector/InspectorAuditAccessibilityObject.cpp:

(WebCore::InspectorAuditAccessibilityObject::getActiveDescendant): Added.
(WebCore::addChildren): Added.
(WebCore::InspectorAuditAccessibilityObject::getChildNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getControlledNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getFlowedNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getMouseEventNode): Added.
(WebCore::InspectorAuditAccessibilityObject::getOwnedNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getParentNode): Added.
(WebCore::InspectorAuditAccessibilityObject::getSelectedChildNodes): Added.

LayoutTests:

  • inspector/audit/run-accessibility.html:
  • inspector/audit/run-accessibility-expected.txt:
12:51 PM Changeset in webkit [240276] by Kocsen Chung
  • 7 edits in tags/Safari-607.1.22.1/Source

Versioning.

12:49 PM Changeset in webkit [240275] by ddkilzer@apple.com
  • 7 edits
    1 copy in trunk/Source/WebKit

C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
<https://webkit.org/b/193607>
<rdar://problem/47334613>

Reviewed by Alex Christensen.

  • Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:

(WebKit::AuthenticationManager::initializeConnection):

  • UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:

(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):

  • Update name of constants.
  • Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
  • Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:
  • Put constant values in a namespace, and move values to ClientCertificateAuthenticationXPCConstants.cpp.
  • SourcesCocoa.txt:
  • UnifiedSources-input.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
  • Add ClientCertificateAuthenticationXPCConstants.cpp.
12:41 PM Changeset in webkit [240274] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.22.1

New tag.

12:33 PM Changeset in webkit [240273] by ysuzuki@apple.com
  • 17 edits in trunk/Source/JavaScriptCore

[JSC] Intl constructors should fit in sizeof(InternalFunction)
https://bugs.webkit.org/show_bug.cgi?id=193661

Reviewed by Mark Lam.

Previously all the Intl constructors have their own subspace. This is because these constructors have different size from InternalFunction.
But it is too costly approach in terms of the memory usage since these constructors are only one per JSGlobalObject. This patch attempts to
reduce the memory size consumed by these Intl objects by holding instance structures in IntlObject instead of in each Intl constructors.
So that we can make sizeof(Intl constructors) == sizeof(InternalFunction) and drop costly subspaces. Since this patch drops subspaces in VM,
it also significantly reduces the sizeof(VM), from 76696 to 74680.

This patch also includes the preparation for making Intl properties lazy. But currently it is not possible since @Collator reference exists
in builtin code.

  • CMakeLists.txt:
  • DerivedSources.make:
  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructor::create):
(JSC::IntlCollatorConstructor::finishCreation):
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::IntlCollatorConstructor::visitChildren): Deleted.

  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::create):
(JSC::IntlDateTimeFormatConstructor::finishCreation):
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructor::visitChildren): Deleted.

  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::create):
(JSC::IntlNumberFormatConstructor::finishCreation):
(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
(JSC::IntlNumberFormatConstructor::visitChildren): Deleted.

  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlObject.cpp:

(JSC::createCollatorConstructor):
(JSC::createNumberFormatConstructor):
(JSC::createDateTimeFormatConstructor):
(JSC::createPluralRulesConstructor):
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation):
(JSC::IntlObject::visitChildren):

  • runtime/IntlObject.h:
  • runtime/IntlPluralRulesConstructor.cpp:

(JSC::IntlPluralRulesConstructor::create):
(JSC::IntlPluralRulesConstructor::finishCreation):
(JSC::constructIntlPluralRules):
(JSC::IntlPluralRulesConstructor::visitChildren): Deleted.

  • runtime/IntlPluralRulesConstructor.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::intlObject const):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
12:12 PM Changeset in webkit [240272] by ddkilzer@apple.com
  • 12 edits
    2 moves in trunk/Source

Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
<https://webkit.org/b/193654>
<rdar://problem/47430290>

Reviewed by Alex Christensen.

  • Moves QuickLookSoftLink.{h,mm} to PAL.
  • Adds soft-link to 3 classes to consolidate QuickLook.framework soft-linking.
  • Updates existing source to work with above changes.

Source/WebCore:

  • SourcesCocoa.txt:
  • UnifiedSources-input.xcfilelist:
  • WebCore.xcodeproj/project.pbxproj:
  • Remove QuickLookSoftLink.{h,mm} due to move to PAL.
  • platform/ios/QuickLook.mm:

(WebCore::QLPreviewGetSupportedMIMETypesSet):
(WebCore::registerQLPreviewConverterIfNeeded):

  • Update for QuickLookSoftLink.{h,mm} move to PAL.
  • platform/network/ios/PreviewConverter.mm:

(WebCore::optionsWithPassword):
(WebCore::PreviewConverter::PreviewConverter):

  • Switch to using QuickLookSoftLink.{h,mm} in PAL.
  • platform/network/ios/WebCoreURLResponseIOS.mm:

(WebCore::adjustMIMETypeIfNecessary):

  • Update for QuickLookSoftLink.{h,mm} move to PAL.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • Add QuickLookSoftLink.{h,mm} due to move from WebCore.
  • pal/ios/QuickLookSoftLink.h: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.h.
  • pal/ios/QuickLookSoftLink.mm: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.mm.
  • Add 3 classes for soft-linking.
  • Change namespace from WebCore to PAL.

Source/WebKit:

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:

(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
(WebKit::SystemPreviewController::start):

  • UIProcess/ios/WKSystemPreviewView.mm:

(-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]):

  • Switch to using QuickLookSoftLink.{h,mm} in PAL.
11:55 AM Changeset in webkit [240271] by Simon Fraser
  • 3 edits
    2 adds in trunk

Fix the position of layers nested inside of composited overflow-scroll
https://bugs.webkit.org/show_bug.cgi?id=193642

Reviewed by Antti Koivisto and Sam Weinig.
Source/WebCore:

Remove an iOS #ifdef so that layers inside composited overflow gets the correct
positions on macOS too.

Test: compositing/geometry/fixed-inside-overflow-scroll.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):

LayoutTests:

Ref test. Black bar obscures the area that's different because of overlay/non-overlay
scrollbar differences between macOS and iOS.

  • compositing/geometry/fixed-inside-overflow-scroll-expected.html: Added.
  • compositing/geometry/fixed-inside-overflow-scroll.html: Added.
11:54 AM Changeset in webkit [240270] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
https://bugs.webkit.org/show_bug.cgi?id=193675
<rdar://problem/46628680>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/AuditTestGroupContentView.js:

(WI.AuditTestGroupContentView.prototype.layout):

  • Localizations/en.lproj/localizedStrings.js:
11:41 AM Changeset in webkit [240269] by sbarati@apple.com
  • 4 edits
    2 deletes in trunk

Unreviewed. Rollout r240223. It regressed JetStream2 by 1%.

JSTests:

  • stress/arith-abs-to-arith-negate-range-optimizaton.js:

(testUncheckedBetweenIntMinInclusiveAndZeroExclusive):
(testUncheckedLessThanZero):
(testUncheckedLessThanOrEqualZero):

  • stress/movhint-backwards-propagation-must-merge-use-as-value-add.js: Removed.
  • stress/movhint-backwards-propagation-must-merge-use-as-value.js: Removed.

Source/JavaScriptCore:

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

11:06 AM Changeset in webkit [240268] by Claudio Saavedra
  • 2 edits in trunk/Source/WebCore

[GTK] Build fix for Ubuntu LTS 16.04
https://bugs.webkit.org/show_bug.cgi?id=193672

Unreviewed build fix.

  • html/canvas/CanvasStyle.h: Add default copy constructor for

CMYKAColor struct.

11:03 AM Changeset in webkit [240267] by Alan Coon
  • 7 edits in tags/Safari-608.1.1.1/Source

Versioning.

10:54 AM Changeset in webkit [240266] by Alan Coon
  • 1 copy in tags/Safari-608.1.1.1

New tag.

10:42 AM Changeset in webkit [240265] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

10:34 AM Changeset in webkit [240264] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240055. rdar://problem/47099573

Regression(r240046) Several API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193509

Reviewed by Geoffrey Garen.

The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
our process reference.

To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
our process stays alive.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::loadDataWithNavigationShared): (WebKit::WebPageProxy::didPerformDragControllerAction): (WebKit::WebPageProxy::findPlugin): (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didCreateSubframe): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): (WebKit::WebPageProxy::willPerformClientRedirectForFrame): (WebKit::WebPageProxy::didCancelClientRedirectForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): (WebKit::WebPageProxy::didRunInsecureContentForFrame): (WebKit::WebPageProxy::frameDidBecomeFrameSet): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNavigationActionSync): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::decidePolicyForResponseShared): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::willSubmitForm): (WebKit::WebPageProxy::didNavigateWithNavigationData): (WebKit::WebPageProxy::didNavigateWithNavigationDataShared): (WebKit::WebPageProxy::didPerformClientRedirect): (WebKit::WebPageProxy::didPerformClientRedirectShared): (WebKit::WebPageProxy::didPerformServerRedirect): (WebKit::WebPageProxy::didUpdateHistoryTitle): (WebKit::WebPageProxy::createNewPage): (WebKit::WebPageProxy::runJavaScriptAlert): (WebKit::WebPageProxy::runJavaScriptConfirm): (WebKit::WebPageProxy::runJavaScriptPrompt): (WebKit::WebPageProxy::unavailablePluginButtonClicked): (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): (WebKit::WebPageProxy::runOpenPanel): (WebKit::WebPageProxy::printFrame): (WebKit::WebPageProxy::backForwardGoToItem): (WebKit::WebPageProxy::backForwardGoToItemShared): (WebKit::WebPageProxy::learnWord): (WebKit::WebPageProxy::ignoreWord): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::editingRangeCallback): (WebKit::WebPageProxy::rectForCharacterRangeCallback): (WebKit::WebPageProxy::focusedFrameChanged): (WebKit::WebPageProxy::frameSetLargestFrameChanged): (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): (WebKit::WebPageProxy::startURLSchemeTask): (WebKit::WebPageProxy::startURLSchemeTaskShared): (WebKit::WebPageProxy::stopURLSchemeTask): (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
  • UIProcess/WebPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:34 AM Changeset in webkit [240263] by Alan Coon
  • 55 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240046. rdar://problem/47099573

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): When restoring from PageCache, make sure we notify the client that the load was committed *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h: Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to delay attaching the drawing area in case of a process-swap, no matter what now that the previous process is kept alive until the provisional load is committed in the new process.
  • Shared/WebPolicyAction.h: Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of process-swap, we now tell the previous process to simply ignore the load, while we create a ProvisionalPageProxy to do the new load in a new process. Suspension of the previous page in the old process, happens later, when a load is actually committed in the new process.
  • Sources.txt: Add new ProvisionalPageProxy file.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _killWebContentProcessAndResetState]): When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current process and the provisional one, to maintain previous behavior in our API tests.
  • UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/AcceleratedDrawingAreaProxy.cpp: (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy): (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing): (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createDrawingAreaProxy):
  • UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): (WebKit::DrawingAreaProxy::~DrawingAreaProxy): (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
  • UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::process):
  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::update):
  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd): (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay): (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm: (-[WKContentView _createDrawingAreaProxy:]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Pass the drawing area's associated process when constructing it and store it as a member in addition to the page. This is necessary now that a page can be associated with 2 WebProcesses at a time, each having its own drawing area.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Pass the process.
  • UIProcess/ProvisionalPageProxy.cpp: Added. (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::processDidTerminate): (WebKit::ProvisionalPageProxy::takeDrawingArea): (WebKit::ProvisionalPageProxy::cancel): (WebKit::ProvisionalPageProxy::processDidFinishLaunching): (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::goToBackForwardItem): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
  • UIProcess/ProvisionalPageProxy.h: Added. (WebKit::ProvisionalPageProxy::page): (WebKit::ProvisionalPageProxy::mainFrame const): (WebKit::ProvisionalPageProxy::process): (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const): (WebKit::ProvisionalPageProxy::navigationID const): (WebKit::ProvisionalPageProxy::drawingArea const): New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from the provisional process.
  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::unsuspend): (WebKit::SuspendedPageProxy::didProcessRequestToSuspend): Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy which tries to register itself as an IPC message receiver for the same pageID when a process-swap occurs and we're switching to a suspended page.
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isMainFrame const): WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame. Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's m_mainFrame to maintain previous behavior.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::provisionalDrawingArea const): Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.

(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy. This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):

(WebKit::WebPageProxy::provisionalProcessDidTerminate):
Cancel the provisiona load and destroy the ProvisionalPageProxy if
the provisional process crashes.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):

  • Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have more than one call site. This was just some bad factoring.
  • Take the process in parameter now that we page can be associated with several processes at a time.

(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::visitedLinkStore): (WebKit::WebPageProxy::provisionalPageProxy const):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::hasProvisionalPageWithID const): (WebKit::WebProcessProxy::updateBackForwardItem): (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch): (WebKit::WebProcessProxy::didFinishLaunching): (WebKit::WebProcessProxy::canTerminateChildProcess):
  • UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::addProvisionalPageProxy): (WebKit::WebProcessProxy::removeProvisionalPageProxy): Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID associated with this process yet, because it is still a ProvisionalPageProxy.
  • UIProcess/WebURLSchemeHandler.cpp: (WebKit::WebURLSchemeHandler::startTask):
  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp: (WebKit::WebURLSchemeTask::create): (WebKit::WebURLSchemeTask::WebURLSchemeTask): (WebKit::WebURLSchemeTask::didPerformRedirection): (WebKit::WebURLSchemeTask::didReceiveResponse): (WebKit::WebURLSchemeTask::didReceiveData): (WebKit::WebURLSchemeTask::didComplete): (WebKit::WebURLSchemeTask::pageDestroyed):
  • UIProcess/WebURLSchemeTask.h: Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
  • UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::endSwipeGesture): Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently associated with the page in case of process swap.
  • WebKit.xcodeproj/project.pbxproj: Add ProvisionalPageProxy class.
  • WebProcess/WebPage/WebFrame.cpp: (WebKit::toPolicyAction): (WebKit::WebFrame::didReceivePolicyDecision):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldAttachDrawingAreaOnPageTransition): (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didReceivePolicyDecision): Stop dealing with WebPolicyAction::Suspend as it no longer exists.

(WebKit::WebPage::didCompletePageTransition):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/WebPage.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:34 AM Changeset in webkit [240262] by Alan Coon
  • 24 edits
    2 deletes in branches/safari-607-branch

Cherry-pick r240015. rdar://problem/47099573

Unreviewed, rolling out r239993, r239995, r239997, and
r239999.

Caused assertions under
ViewGestureController::disconnectFromProcess()

Reverted changesets:

"Regression(PSON) View becomes blank after click a cross-site
download link"
https://bugs.webkit.org/show_bug.cgi?id=193361
https://trac.webkit.org/changeset/239993

"Unreviewed iOS build fix after r239993."
https://trac.webkit.org/changeset/239995

"Fix iOS build after r239993"
https://bugs.webkit.org/show_bug.cgi?id=193361
https://trac.webkit.org/changeset/239997

"Unreviewed, revert part of r239997 as it is not needed to fix
the build."
https://trac.webkit.org/changeset/239999

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:34 AM Changeset in webkit [240261] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WTF

Cherry-pick r239999. rdar://problem/47099573

Unreviewed, revert part of r239997 as it is not needed to fix the build.

  • wtf/RefCounter.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239999 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:34 AM Changeset in webkit [240260] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source

Cherry-pick r239997. rdar://problem/47099573

Fix iOS build after r239993
https://bugs.webkit.org/show_bug.cgi?id=193361

Source/WebKit:

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/SuspendedPageProxy.h:

Source/WTF:

  • wtf/RefCounter.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239997 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:34 AM Changeset in webkit [240259] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239995. rdar://problem/47099573

Unreviewed iOS build fix after r239993.

  • UIProcess/SuspendedPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:34 AM Changeset in webkit [240258] by Alan Coon
  • 24 edits
    2 adds in branches/safari-607-branch

Cherry-pick r239993. rdar://problem/47099573

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoff Garen.

Source/WebCore:

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): When restoring from PageCache, make sure we notify the client that the load was committed *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h: Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to delay attaching the drawing area in case of a process-swap, no matter what now that the previous process is kept alive until the provisional load is committed in the new process.
  • Shared/WebPolicyAction.h: Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of process-swap, we now tell the previous process to simply ignore the load, while we create a ProvisionalPageProxy to do the new load in a new process. Suspension of the previous page in the old process, happens later, when a load is actually committed in the new process.
  • Sources.txt: Add new ProvisionalPageProxy file.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _killWebContentProcessAndResetState]): When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current process and the provisional one, to maintain previous behavior in our API tests.
  • UIProcess/PageClient.h: Tiny build fix.
  • UIProcess/ProvisionalPageProxy.cpp: Added. (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::takeDrawingArea): (WebKit::ProvisionalPageProxy::cancel): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::loadDataWithNavigation): (WebKit::ProvisionalPageProxy::loadRequestWithNavigation): (WebKit::ProvisionalPageProxy::goToBackForwardItem): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
  • UIProcess/ProvisionalPageProxy.h: Added. (WebKit::ProvisionalPageProxy::page): (WebKit::ProvisionalPageProxy::mainFrame const): (WebKit::ProvisionalPageProxy::process): (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const): (WebKit::ProvisionalPageProxy::navigationID const): Add new ProvisionalPageProxy class to wrap the provisional load in the new process after a swap. The provisional page is owned by the WebPageProxy and we only commit the provisional page when the load is committed. Until then, the WebPageProxy keeps using the old process and displaying the current content.
  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::unsuspend): (WebKit::SuspendedPageProxy::didProcessRequestToSuspend): Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy which tries to register itself as an IPC message receiver for the same pageID when a process-swap occurs and we're switching to a suspended page.
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isMainFrame const): WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame. Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's m_mainFrame to maintain previous behavior.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::swapToWebProcess): swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess() later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs to initialize some data members such as the drawing area and the main frame as it is transferring them over from the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::loadRequestWithNavigation):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy. This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForResponse):
Capture the process in the lambda, to make sure we send the policy decision to the same process that
asked for it, so as to not get confused by process swaps.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):
Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
more than one call site. This was just some bad factoring.

(WebKit::WebPageProxy::PageProcessOverride::PageProcessOverride):
(WebKit::WebPageProxy::PageProcessOverride::~PageProcessOverride):

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::temporarilyOverrideProcess): Add utility class to temporarily override the WebPageProxy's m_process with the provisional one when the ProvisionalPageProxy interacts with the WebPageProxy.
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::hasProvisionalPageWithID const): (WebKit::WebProcessProxy::updateBackForwardItem): Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID associated with this process yet, because it is still a ProvisionalPageProxy.

(WebKit::WebProcessProxy::canTerminateChildProcess):
Do not terminate the WebProcess if there are ProvisionalPageProxy objects using it.

  • UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::addProvisionalPageProxy): (WebKit::WebProcessProxy::removeProvisionalPageProxy):
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebFrame.cpp: (WebKit::toPolicyAction): (WebKit::WebFrame::didReceivePolicyDecision): Stop dealing with WebPolicyAction::Suspend as it no longer exists.
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didReceivePolicyDecision):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239993 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:33 AM Changeset in webkit [240257] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, restore bytecode cache-related JSC options deleted in r240254
https://bugs.webkit.org/show_bug.cgi?id=192782

The JSC options were committed as part of r240210, which got rolled out in
r240224. However, the options got re-landed in r240248 and then deleted
again in 240254 (immediately before the caching code code landed in 240255)

  • runtime/Options.h:
10:15 AM Changeset in webkit [240256] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193673>
<rdar://problem/47448241>

Reviewed by Dean Jackson.

  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:

(WebCore::appendArgumentToArray): Use adoptNS() to fix the leak.

10:00 AM Changeset in webkit [240255] by Tadeu Zagallo
  • 38 edits
    1 copy
    2 adds in trunk

Cache bytecode to disk
https://bugs.webkit.org/show_bug.cgi?id=192782
<rdar://problem/46084932>

Reviewed by Keith Miller.

Source/JavaScriptCore:

Add the logic to serialize and deserialize the new JSC bytecode. For now,
the cache is only used for tests.

Each class that can be serialized has a counterpart in CachedTypes, which
handles the decoding and encoding. When decoding, the cached objects are
mmap'd from disk, but only used for creating instances of the respective
in-memory version of each object. Ideally, the mmap'd objects should be
used at runtime in the future.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.cpp:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinNames.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setConstantIdentifierSetRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/HandlerInfo.h:

(JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo):

  • bytecode/InstructionStream.h:
  • bytecode/UnlinkedCodeBlock.h:

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

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecode/UnlinkedFunctionCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/UnlinkedGlobalCodeBlock.h:

(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):

  • bytecode/UnlinkedMetadataTable.h:
  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecode/UnlinkedProgramCodeBlock.h:
  • interpreter/Interpreter.cpp:
  • jsc.cpp:

(functionQuit):
(runJSC):

  • parser/SourceCode.h:
  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::operator!= const):

  • parser/UnlinkedSourceCode.h:
  • parser/VariableEnvironment.h:
  • runtime/CachedTypes.cpp: Added.

(JSC::Encoder::Allocation::buffer const):
(JSC::Encoder::Allocation::offset const):
(JSC::Encoder::Allocation::Allocation):
(JSC::Encoder::Encoder):
(JSC::Encoder::vm):
(JSC::Encoder::malloc):
(JSC::Encoder::offsetOf):
(JSC::Encoder::cachePtr):
(JSC::Encoder::offsetForPtr):
(JSC::Encoder::release):
(JSC::Encoder::Page::Page):
(JSC::Encoder::Page::malloc):
(JSC::Encoder::Page::buffer const):
(JSC::Encoder::Page::size const):
(JSC::Encoder::Page::getOffset const):
(JSC::Encoder::allocateNewPage):
(JSC::Decoder::Decoder):
(JSC::Decoder::~Decoder):
(JSC::Decoder::vm):
(JSC::Decoder::offsetOf):
(JSC::Decoder::cacheOffset):
(JSC::Decoder::addFinalizer):
(JSC::encode):
(JSC::decode):
(JSC::VariableLengthObject::buffer const):
(JSC::VariableLengthObject::allocate):
(JSC::CachedPtr::encode):
(JSC::CachedPtr::decode const):
(JSC::CachedPtr::operator-> const):
(JSC::CachedPtr::get const):
(JSC::CachedRefPtr::encode):
(JSC::CachedRefPtr::decode const):
(JSC::CachedWriteBarrier::encode):
(JSC::CachedWriteBarrier::decode const):
(JSC::CachedVector::encode):
(JSC::CachedVector::decode const):
(JSC::CachedPair::encode):
(JSC::CachedPair::decode const):
(JSC::CachedHashMap::encode):
(JSC::CachedHashMap::decode const):
(JSC::CachedUniquedStringImpl::encode):
(JSC::CachedUniquedStringImpl::decode const):
(JSC::CachedStringImpl::encode):
(JSC::CachedStringImpl::decode const):
(JSC::CachedString::encode):
(JSC::CachedString::decode const):
(JSC::CachedIdentifier::encode):
(JSC::CachedIdentifier::decode const):
(JSC::CachedOptional::encode):
(JSC::CachedOptional::decode const):
(JSC::CachedOptional::decodeAsPtr const):
(JSC::CachedSimpleJumpTable::encode):
(JSC::CachedSimpleJumpTable::decode const):
(JSC::CachedStringJumpTable::encode):
(JSC::CachedStringJumpTable::decode const):
(JSC::CachedCodeBlockRareData::encode):
(JSC::CachedCodeBlockRareData::decode const):
(JSC::CachedBitVector::encode):
(JSC::CachedBitVector::decode const):
(JSC::CachedHashSet::encode):
(JSC::CachedHashSet::decode const):
(JSC::CachedConstantIdentifierSetEntry::encode):
(JSC::CachedConstantIdentifierSetEntry::decode const):
(JSC::CachedVariableEnvironment::encode):
(JSC::CachedVariableEnvironment::decode const):
(JSC::CachedArray::encode):
(JSC::CachedArray::decode const):
(JSC::CachedScopedArgumentsTable::encode):
(JSC::CachedScopedArgumentsTable::decode const):
(JSC::CachedSymbolTableEntry::encode):
(JSC::CachedSymbolTableEntry::decode const):
(JSC::CachedSymbolTable::encode):
(JSC::CachedSymbolTable::decode const):
(JSC::CachedImmutableButterfly::encode):
(JSC::CachedImmutableButterfly::decode const):
(JSC::CachedRegExp::encode):
(JSC::CachedRegExp::decode const):
(JSC::CachedTemplateObjectDescriptor::encode):
(JSC::CachedTemplateObjectDescriptor::decode const):
(JSC::CachedBigInt::encode):
(JSC::CachedBigInt::decode const):
(JSC::CachedJSValue::encode):
(JSC::CachedJSValue::decode const):
(JSC::CachedInstructionStream::encode):
(JSC::CachedInstructionStream::decode const):
(JSC::CachedMetadataTable::encode):
(JSC::CachedMetadataTable::decode const):
(JSC::CachedSourceOrigin::encode):
(JSC::CachedSourceOrigin::decode const):
(JSC::CachedTextPosition::encode):
(JSC::CachedTextPosition::decode const):
(JSC::CachedSourceProviderShape::encode):
(JSC::CachedSourceProviderShape::decode const):
(JSC::CachedStringSourceProvider::encode):
(JSC::CachedStringSourceProvider::decode const):
(JSC::CachedWebAssemblySourceProvider::encode):
(JSC::CachedWebAssemblySourceProvider::decode const):
(JSC::CachedSourceProvider::encode):
(JSC::CachedSourceProvider::decode const):
(JSC::CachedUnlinkedSourceCodeShape::encode):
(JSC::CachedUnlinkedSourceCodeShape::decode const):
(JSC::CachedSourceCode::encode):
(JSC::CachedSourceCode::decode const):
(JSC::CachedFunctionExecutable::firstLineOffset const):
(JSC::CachedFunctionExecutable::lineCount const):
(JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const):
(JSC::CachedFunctionExecutable::unlinkedBodyStartColumn const):
(JSC::CachedFunctionExecutable::unlinkedBodyEndColumn const):
(JSC::CachedFunctionExecutable::startOffset const):
(JSC::CachedFunctionExecutable::sourceLength const):
(JSC::CachedFunctionExecutable::parametersStartOffset const):
(JSC::CachedFunctionExecutable::typeProfilingStartOffset const):
(JSC::CachedFunctionExecutable::typeProfilingEndOffset const):
(JSC::CachedFunctionExecutable::parameterCount const):
(JSC::CachedFunctionExecutable::features const):
(JSC::CachedFunctionExecutable::sourceParseMode const):
(JSC::CachedFunctionExecutable::isInStrictContext const):
(JSC::CachedFunctionExecutable::hasCapturedVariables const):
(JSC::CachedFunctionExecutable::isBuiltinFunction const):
(JSC::CachedFunctionExecutable::isBuiltinDefaultClassConstructor const):
(JSC::CachedFunctionExecutable::constructAbility const):
(JSC::CachedFunctionExecutable::constructorKind const):
(JSC::CachedFunctionExecutable::functionMode const):
(JSC::CachedFunctionExecutable::scriptMode const):
(JSC::CachedFunctionExecutable::superBinding const):
(JSC::CachedFunctionExecutable::derivedContextType const):
(JSC::CachedFunctionExecutable::name const):
(JSC::CachedFunctionExecutable::ecmaName const):
(JSC::CachedFunctionExecutable::inferredName const):
(JSC::CachedCodeBlock::instructions const):
(JSC::CachedCodeBlock::thisRegister const):
(JSC::CachedCodeBlock::scopeRegister const):
(JSC::CachedCodeBlock::globalObjectRegister const):
(JSC::CachedCodeBlock::sourceURLDirective const):
(JSC::CachedCodeBlock::sourceMappingURLDirective const):
(JSC::CachedCodeBlock::usesEval const):
(JSC::CachedCodeBlock::isStrictMode const):
(JSC::CachedCodeBlock::isConstructor const):
(JSC::CachedCodeBlock::hasCapturedVariables const):
(JSC::CachedCodeBlock::isBuiltinFunction const):
(JSC::CachedCodeBlock::superBinding const):
(JSC::CachedCodeBlock::scriptMode const):
(JSC::CachedCodeBlock::isArrowFunctionContext const):
(JSC::CachedCodeBlock::isClassContext const):
(JSC::CachedCodeBlock::wasCompiledWithDebuggingOpcodes const):
(JSC::CachedCodeBlock::constructorKind const):
(JSC::CachedCodeBlock::derivedContextType const):
(JSC::CachedCodeBlock::evalContextType const):
(JSC::CachedCodeBlock::hasTailCalls const):
(JSC::CachedCodeBlock::lineCount const):
(JSC::CachedCodeBlock::endColumn const):
(JSC::CachedCodeBlock::numVars const):
(JSC::CachedCodeBlock::numCalleeLocals const):
(JSC::CachedCodeBlock::numParameters const):
(JSC::CachedCodeBlock::features const):
(JSC::CachedCodeBlock::parseMode const):
(JSC::CachedCodeBlock::codeType const):
(JSC::CachedCodeBlock::rareData const):
(JSC::CachedProgramCodeBlock::encode):
(JSC::CachedProgramCodeBlock::decode const):
(JSC::CachedModuleCodeBlock::encode):
(JSC::CachedModuleCodeBlock::decode const):
(JSC::CachedEvalCodeBlock::encode):
(JSC::CachedEvalCodeBlock::decode const):
(JSC::CachedFunctionCodeBlock::encode):
(JSC::CachedFunctionCodeBlock::decode const):
(JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::decode const):
(JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock):
(JSC::UnlinkedModuleProgramCodeBlock::UnlinkedModuleProgramCodeBlock):
(JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock):
(JSC::CachedFunctionExecutable::encode):
(JSC::CachedFunctionExecutable::decode const):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedSourceCodeKey::encode):
(JSC::CachedSourceCodeKey::decode const):
(JSC::CacheEntry::encode):
(JSC::CacheEntry:: const):
(JSC:: const):
(JSC::encodeCodeBlock):
(JSC::decodeCodeBlockImpl):

  • runtime/CachedTypes.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedGlobalCodeBlock.h.

(JSC::decodeCodeBlock):

  • runtime/CodeCache.cpp:

(JSC::CodeCacheMap::pruneSlowCase):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
(JSC::CodeCache::write):

  • runtime/CodeCache.h:

(JSC::CodeCacheMap::begin):
(JSC::CodeCacheMap::end):
(JSC::CodeCacheMap::fetchFromDiskImpl):
(JSC::CodeCacheMap::findCacheAndUpdateAge):
(JSC::writeCodeBlock):

  • runtime/JSBigInt.cpp:
  • runtime/JSBigInt.h:
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/RegExp.h:
  • runtime/ScopedArgumentsTable.h:
  • runtime/StackFrame.h:
  • runtime/StructureInlines.h:
  • runtime/SymbolTable.h:

Source/WTF:

BitVectors have to be friends with JSC::CacheBitVector to allow
serializing its buffer as part of the bytecode cache encoding.

  • wtf/BitVector.h:

Tools:

Add test helper to execute bytecode-cache tests: it executes each test
twice, the first with JSC_diskCachePath set to a temporary directory
and second with JSC_forceDiskCache=true (in addition to the cache path)
to guarantee that only the disk cache is being used and no new
UnlinkedCodeBlocks are being created.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh: Added.
  • Scripts/run-jsc-stress-tests:
9:48 AM Changeset in webkit [240254] by commit-queue@webkit.org
  • 23 edits
    3 adds in trunk

[JSC] Invalidate old scope operations using global lexical binding epoch
https://bugs.webkit.org/show_bug.cgi?id=193603
<rdar://problem/47380869>

Patch by Yusuke Suzuki <ysuzuki@apple.com> on 2019-01-22
Reviewed by Saam Barati.

JSTests:

  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js:
  • stress/scope-operation-cache-global-property-before-deleting.js: Added.

(shouldThrow):
(bar):

  • stress/scope-operation-cache-global-property-bump-counter.js: Added.

(shouldBe):
(get1):
(get2):
(get1If):
(get2If):

  • stress/scope-operation-cache-global-property-even-if-it-fails.js: Added.

(shouldThrow):
(foo):

Source/JavaScriptCore:

Even if the global lexical binding does not shadow the global property at that time, we need to clear the cached information in
scope related operations since we may have a global property previously. Consider the following example,

foo = 0;
function get() { return foo; }
print(get()); 0
print(get());
0
delete globalThis.foo;
$.evalScript(const foo = 42;);
print(get()); Should be 42, but it returns 0 if the cached information in get() is not cleared.

To invalidate the cache easily, we introduce global lexical binding epoch. It is bumped every time we introduce a new lexical binding
into JSGlobalLexicalEnvironment, since that name could shadow the global property name previously. In op_resolve_scope, we first check
the epoch stored in the metadata, and go to slow path if it is not equal to the current epoch. Our slow path code convert the scope
operation to the appropriate one even if the resolve type is not UnresolvedProperty type. After updating the resolve type of the bytecode,
we update the cached epoch to the current one, so that we can use the cached information as long as we stay in the same epoch.

In op_get_from_scope and op_put_to_scope, we do not use this epoch since Structure check can do the same thing instead. If op_resolve_type
is updated by the epoch, and if it starts returning JSGlobalLexicalEnvironment instead JSGlobalObject, obviously the structure check fails.
And in the slow path, we update op_get_from_scope and op_put_to_scope appropriately.

So, the metadata for scope related bytecodes are eventually updated to the appropriate one. In DFG and FTL, we use the watchpoint based approach.
In DFG and FTL, we concurrently attempt to get the watchpoint for the lexical binding and look into it by using isStillValid() to avoid
infinite compile-and-fail loop.

When the global lexical binding epoch overflows we iterate all the live CodeBlock and update the op_resolve_scope's epoch. Even if the shadowing
happens, it is OK if we bump the epoch, since op_resolve_scope will return JSGlobalLexicalEnvironment instead of JSGlobalObject, and following
structure check in op_put_to_scope and op_get_from_scope fail. We do not need to update op_get_from_scope and op_put_to_scope because of the same
reason.

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::notifyLexicalBindingShadowing): Deleted.

  • bytecode/CodeBlock.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGDesiredGlobalProperties.cpp:

(JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread):

  • dfg/DFGDesiredGlobalProperties.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::watchGlobalProperty):

  • dfg/DFGGraph.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::isStillValidOnMainThread):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::bumpGlobalLexicalBindingEpoch):
(JSC::JSGlobalObject::getReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::notifyLexicalBindingShadowing): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::globalLexicalBindingEpoch const):
(JSC::JSGlobalObject::globalLexicalBindingEpochOffset):
(JSC::JSGlobalObject::addressOfGlobalLexicalBindingEpoch):

  • runtime/Options.cpp:

(JSC::correctOptions):
(JSC::Options::initialize):
(JSC::Options::setOptions):
(JSC::Options::setOptionWithoutAlias):

  • runtime/Options.h:
  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

9:25 AM Changeset in webkit [240253] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Floats] Decouple clearance computation and margin collapsing reset.
https://bugs.webkit.org/show_bug.cgi?id=193670

Reviewed by Antti Koivisto.

Move margin collapsing reset logic from FloatingContext to BlockFormattingContext. It's the BlockFormattingContext's job to do.
This is also in preparation for adding clear to static position.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::mapTopToAncestor):
(WebCore::Layout::FormattingContext::mapTopLeftToAncestor): Deleted.

  • layout/FormattingContext.h:
  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/floats/FloatingContext.h:
8:59 AM Changeset in webkit [240252] by fred.wang@free.fr
  • 2 edits in trunk/Source/WebCore

Minor refactoring of the scrolling code
https://bugs.webkit.org/show_bug.cgi?id=192398

Unreviewed build fix.

Patch by Frederic Wang <fwang@igalia.com> on 2019-01-22

  • page/scrolling/ScrollingTreeScrollingNode.cpp: Add missing header.
1:52 AM Changeset in webkit [240251] by commit-queue@webkit.org
  • 43 edits
    4 adds in trunk

[css-logical] Implement flow-relative margin, padding and border shorthands
https://bugs.webkit.org/show_bug.cgi?id=188697

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-22
Reviewed by Simon Fraser and Antti Koivisto.

LayoutTests/imported/w3c:

Import tests from the WPT test suite for CSS Logical Properties and Values,
and enable the CSSLogicalEnabled runtime flag for them.

They still have some failures because sideways writing modes have not been
implemented yet (https://bugs.webkit.org/show_bug.cgi?id=166941).

  • web-platform-tests/css/css-logical/logical-box-border-color-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-color.html:
  • web-platform-tests/css/css-logical/logical-box-border-shorthands-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-shorthands.html:
  • web-platform-tests/css/css-logical/logical-box-border-style-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-style.html:
  • web-platform-tests/css/css-logical/logical-box-border-width-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-width.html:
  • web-platform-tests/css/css-logical/logical-box-inset-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-inset.html:
  • web-platform-tests/css/css-logical/logical-box-margin-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-margin.html:
  • web-platform-tests/css/css-logical/logical-box-padding-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-padding.html:
  • web-platform-tests/css/css-logical/logical-box-size.html:
  • web-platform-tests/css/css-logical/resources/test-box-properties.js:

(export.createBoxPropertyGroup):
(export.createSizingPropertyGroup):
(export.runTests.set test):
(export.runTests):

  • web-platform-tests/css/css-logical/resources/test-shared.js: Added.

(export.testCSSValues):
(export.testComputedValues):
(export.makeDeclaration):

  • web-platform-tests/css/css-logical/resources/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color.html

imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
webexposed/css-properties-behind-flags.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
Allow the new properties to serialize their computed value.

(WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor2SidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor4SidesShorthand):

  • css/CSSComputedStyleDeclaration.h:

Rename getCSSPropertyValuesForSidesShorthand to getCSSPropertyValuesFor4SidesShorthand,
and add analogous getCSSPropertyValuesFor2SidesShorthand for serializing 2-sided
shorthands.

  • css/CSSProperties.json:

Add the new properties behind the CSSLogicalEnabled runtime flag.

  • css/CSSStyleDeclaration.cpp:

(WebCore::CSSStyleDeclaration::supportedPropertyNames const):
Prevent CSS properties disabled behind a runtime flag from being exposed in
style declarations.

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
Allow the new properties to serialize their specified value.

(WebCore::StyleProperties::get2Values const):
Add get2Values, analogous to get4Values, for serializing 2-sided shorthands.

(WebCore::StyleProperties::borderPropertyValue const):
Allow borderPropertyValue to serialize arbitrary multi-sided border shorthands
corresponding to width, style and color.

(WebCore::MutableStyleProperties::setProperty):
Prevent CSS properties disabled behind a runtime flag from being set a value.

(WebCore::StyleProperties::asText const):
Allow the new properties to be serialized in cssText.
Prevent CSS shorthands disabled behind a runtime flag from appearing in cssText,
and serialize the longhands instead. Note that there could be another shorthand
available which is enabled, but a proper solution would require bug 190496.

  • css/StyleProperties.h:

Update declarations of borderPropertyValue and get2Values.

  • css/makeprop.pl:

(addProperty):
Add isEnabledCSSProperty function for checking that a CSS property is not
disabled behind a runtime flag.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::cssPropertyID):
Prevent CSS properties disabled behind a runtime flag from being exposed in
computed styles.

(WebCore::CSSPropertyParser::addProperty):
Prevent CSS properties disabled behind a runtime flag from being set a value.

(WebCore::CSSPropertyParser::consumeBorder):
Change consumeBorder to provide the caller with the parsed values instead of
setting properties. Then the caller can decide to which properties the values
should be set, and whether border-image should be reset or not.

(WebCore::CSSPropertyParser::consume2ValueShorthand):
(WebCore::CSSPropertyParser::consume4ValueShorthand):
Rename consume4Values to consume4ValueShorthand, and add analogous
consume2ValueShorthand for parsing shorthands with two longhands.

(WebCore::CSSPropertyParser::parseShorthand):
Allow the new properties to be parsed.

  • css/parser/CSSPropertyParser.h:

Update declarations of consumeBorder, consume2ValueShorthand and
consume4ValueShorthand.

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
Prevent CSS properties disabled behind a runtime flag from being exposed in
the CSS inspector tool.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCSSLogicalEnabled):
(WebCore::RuntimeEnabledFeatures::cssLogicalEnabled const):
Add the CSSLogicalEnabled runtime flag.

Source/WebKit:

Add a CSSLogicalEnabled runtime flag.

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

Add CSSLogicalEnabled runtime flag.

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

(+[WebPreferences initialize]):
(-[WebPreferences cssLogicalEnabled]):
(-[WebPreferences setCSSLogicalEnabled:]):

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

(-[WebView _preferencesChanged:]):

Tools:

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

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

(setWebPreferencesForTestOptions):
Allow tests to enable the CSSLogicalEnabled flag in WK1.

  • Scripts/webkitpy/style/checkers/jsonchecker.py:

(JSONCSSPropertiesChecker.check_codegen_properties):
Allow CSS property definitions to have a 'runtime-flag' parameter which
disables the property when the specified runtime flag is disabled.

LayoutTests:

Add tests checking that CSS properties disabled behind runtime flags
are not exposed.

  • webexposed/css-properties-behind-flags-expected.txt: Added.
  • webexposed/css-properties-behind-flags.html: Added.
1:07 AM Changeset in webkit [240250] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Enable CSSOMViewScrollingAPI
https://bugs.webkit.org/show_bug.cgi?id=189472

Patch by Frederic Wang <fwang@igalia.com> on 2019-01-22
Reviewed by Simon Fraser.

This patch enables the CSSOMViewScrollingAPI option by default. This feature has already been
enabled in tests since r235855. Basically, this change fixes an old compatibility issue
regarding which scrolling element correspond to the viewport in standard mode (WebKit uses
document.body while Gecko/Edge/Chromium use document.documentElement as described in the
CSSOM View specification). WebKit developers writing tests can use document.scrollingElement
for that purpose, so that they work independently of whether the option is enabled.

[1] https://lists.webkit.org/pipermail/webkit-dev/2018-January/029857.html

  • Shared/WebPreferences.yaml: Enable by default and remove "experimental" category in

accordance with the new policy. Instead, keep an internal flag only for developers.

Note: See TracTimeline for information about the timeline view.