⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

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:
Note: See TracTimeline for information about the timeline view.