Timeline



Jan 22, 2019:

10:21 PM Changeset in webkit [240329] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

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

JSTests:

  • stress/global-lexical-binding-epoch-should-be-correct-one.js: Added.

(f1.f2.f3.f4):
(f1.f2.f3):
(f1.f2):
(f1):

Source/JavaScriptCore:

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

10:10 PM Changeset in webkit [240328] by Wenson Hsieh
  • 6 edits
    2 copies in trunk/Source/WebCore

Introduce CustomUndoStep.h and CustomUndoStep.cpp
https://bugs.webkit.org/show_bug.cgi?id=193704
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

This patch is more work in progress towards supporting UndoManager.addItem(). Here, we introduce a helper
class, CustomUndoStep, that holds a weak reference to a script-defined UndoItem. See below for more details.

No change in behavior.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/CustomUndoStep.cpp:

(WebCore::CustomUndoStep::CustomUndoStep):

Subclass UndoStep.

(WebCore::CustomUndoStep::unapply):
(WebCore::CustomUndoStep::reapply):

If possible, invoke the UndoItem's undo and redo handlers.

(WebCore::CustomUndoStep::isValid const):

  • editing/CustomUndoStep.h:
  • editing/EditingStyle.cpp:
  • editing/InsertEditableImageCommand.cpp:

(WebCore::InsertEditableImageCommand::doApply):

Unified build fixes.

  • page/UndoItem.h:
9:55 PM Changeset in webkit [240327] by ysuzuki@apple.com
  • 25 edits
    6 deletes in trunk

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

Unreviewed, rollout to watch the tests.

JSTests:

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

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupObjectToString): Deleted.

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectToString): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

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

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectToString): Deleted.

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::finishCreation):
(JSC::objectProtoFuncToString):

  • runtime/ObjectPrototype.h:
  • runtime/ObjectPrototypeInlines.h: Removed.
  • runtime/StructureRareData.h:
9:42 PM Changeset in webkit [240326] by Simon Fraser
  • 5 edits
    7 adds in trunk

Adding a child to a ScrollingStateNode needs to trigger a tree state commit
https://bugs.webkit.org/show_bug.cgi?id=193682

Reviewed by Zalan Bujtas.

Source/WebCore:

Scrolling tree mutations that re-arrange nodes (e.g. node reordering when z-index changes)
need to trigger scrolling tree updates, and currently do not.

Fix by adding a "ChildNodes" dirty bit to ScrollingStateNode. There isn't any code that consults
this flag when committing the scrolling tree because we always eagerly traverse children, but
we could use it to optimize later. The important part is that we use it to trigger a tree update.

Can't test via z-reordering until webkit.org/b/192529 is fixed.

Tests: scrollingcoordinator/gain-scrolling-node-parent.html

scrollingcoordinator/lose-scrolling-node-parent.html

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::appendChild):
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::removeChildAtIndex):

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

(WebCore::ScrollingStateTree::attachNode):

LayoutTests:

  • platform/ios/scrollingcoordinator/gain-scrolling-node-parent-expected.txt: Added.
  • platform/ios/scrollingcoordinator/lose-scrolling-node-parent-expected.txt: Added.
  • scrollingcoordinator/gain-scrolling-node-parent-expected.txt: Added.
  • scrollingcoordinator/gain-scrolling-node-parent.html: Added.
  • scrollingcoordinator/lose-scrolling-node-parent-expected.txt: Added.
  • scrollingcoordinator/lose-scrolling-node-parent.html: Added.
9:30 PM Changeset in webkit [240325] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

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

Reviewed by Alex Christensen.

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

  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
(WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
(WebKit::WebUserContentController::addUserScriptInternal):
(WebKit::WebUserContentController::removeUserScriptInternal):
(WebKit::WebUserContentController::addUserStyleSheetInternal):
(WebKit::WebUserContentController::removeUserStyleSheetInternal):
(WebKit::WebUserContentController::forEachUserMessageHandler const):

  • WebProcess/UserContent/WebUserContentController.h:
9:20 PM Changeset in webkit [240324] by Simon Fraser
  • 6 edits in trunk/LayoutTests

Make scrollingcoordinator tests only run on iOS/macOS WK2
https://bugs.webkit.org/show_bug.cgi?id=193690

Reviewed by Zalan Bujtas.

scrollingcoordinator is only active in WK2, and both WPE and WinCairo skip this directory
already, so skip it at the top level, and re-enable for mac-wk2 and ios-wk2.

Also do some cleanup after tiled-drawing/ios was removed on 1/18.

  • TestExpectations:
  • platform/ios-device/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
8:51 PM Changeset in webkit [240323] by Devin Rousso
  • 13 edits
    2 adds in trunk

Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
https://bugs.webkit.org/show_bug.cgi?id=116191
<rdar://problem/13905910>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test inspector/timeline/line-column.html

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluateModule):

  • bindings/js/JSExecStateInstrumentation.h:

(WebCore::JSExecState::instrumentFunctionInternal):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::willEvaluateScript):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willCallFunctionImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):

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

(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):

  • inspector/TimelineRecordFactory.h:
  • inspector/TimelineRecordFactory.cpp:

(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::startColumn const): Added.

Source/WebInspectorUI:

  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.prototype._processRecord):

LayoutTests:

  • inspector/timeline/line-column.html: Added.
  • inspector/timeline/line-column-expected.txt: Added.
8:49 PM Changeset in webkit [240322] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari 12.0.3

Added a tag for Safari 12.0.3.

8:48 PM Changeset in webkit [240321] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/iOS 12.1.3

Added a tag iOS 12.1.3.

8:42 PM Changeset in webkit [240320] by youenn@apple.com
  • 22 edits in trunk

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

<rdar://problem/47463803>

Reviewed by Eric Carlson.

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

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

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

  • Bad bandwidth estimation in case of multiple transceivers
  • mid handling for legacy endpoints
  • msid handling for updating mediastreams accordingly.
  • Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.cc:
  • Source/webrtc/modules/congestion_controller/goog_cc/delay_based_bwe.h:
  • Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control.cc:
  • Source/webrtc/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc:
  • Source/webrtc/modules/congestion_controller/send_side_congestion_controller_unittest.cc:
  • Source/webrtc/pc/jsepsessiondescription_unittest.cc:
  • Source/webrtc/pc/mediasession.cc:
  • Source/webrtc/pc/mediasession_unittest.cc:
  • Source/webrtc/pc/peerconnection.cc:
  • Source/webrtc/pc/peerconnection.h:
  • Source/webrtc/pc/peerconnection_jsep_unittest.cc:
  • Source/webrtc/pc/peerconnection_media_unittest.cc:
  • Source/webrtc/pc/peerconnection_rtp_unittest.cc:
  • Source/webrtc/pc/sessiondescription.cc:
  • Source/webrtc/pc/sessiondescription.h:
  • Source/webrtc/pc/webrtcsdp.cc:
  • Source/webrtc/pc/webrtcsdp_unittest.cc:
  • Source/webrtc/system_wrappers/include/metrics.h:
  • Source/webrtc/video/BUILD.gn:
8:28 PM Changeset in webkit [240319] by Dewei Zhu
  • 4 edits in trunk/Websites/perf.webkit.org

Analyzing a chart that does not exist should not halt whole run-analysis script.
https://bugs.webkit.org/show_bug.cgi?id=193563

Reviewed by Ryosuke Niwa.

Halting whole run-analysis script while there is any invalid chart specified in Manifest makes the script fragile.
Run-analysis is also responsible for adding retry and sending notification which should not be block by this error.
Skipping analyzing the corresponding configuration seems reasonable.

  • public/v3/models/measurement-set.js:

(MeasurementSet.prototype._ensureClusterPromise): Only add callback when callback is specified.
This will help to fix 'UnhandledPromiseRejectionWarning' while running the test.

  • tools/js/measurement-set-analyzer.js:

(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Catch the exception while failing to fetch a measurement set and skip the analysis for this config.

  • unit-tests/measurement-set-analyzer-tests.js: Added unit tests for this.
8:17 PM Changeset in webkit [240318] by Devin Rousso
  • 33 edits
    1 copy
    6 adds in trunk

Web Inspector: expose Audit and Recording versions to the frontend
https://bugs.webkit.org/show_bug.cgi?id=193262
<rdar://problem/47130684>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Audit.json:
  • inspector/protocol/Recording.json:

Add version values.

  • inspector/scripts/codegen/models.py:

(Protocol.parse_domain):
(Domain.init):
(Domain.version): Added.
(Domains):

  • inspector/scripts/codegen/generator.py:

(Generator.version_for_domain): Added.

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator.generate_output):
(CppProtocolTypesHeaderGenerator._generate_versions): Added.

  • inspector/scripts/codegen/generate_js_backend_commands.py:

(JSBackendCommandsGenerator.should_generate_domain):
(JSBackendCommandsGenerator.generate_domain):

  • inspector/scripts/tests/generic/version.json: Added.
  • inspector/scripts/tests/generic/expected/version.json-result: Added.
  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/domain-availability.json-result:
  • inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/generic/expected/enum-values.json-result:
  • inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
  • inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
  • inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Source/WebCore:

Tests: inspector/audit/version.html

inspector/recording/version.html

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass.prototype.registerVersion): Added.

  • UserInterface/Models/AuditTestCase.js:
  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
Add Interface version values.

LayoutTests:

  • inspector/audit/version.html: Added.
  • inspector/audit/version-expected.txt: Added.
  • inspector/recording/version.html: Added.
  • inspector/recording/version-expected.txt: Added.
8:06 PM Changeset in webkit [240317] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix GTK/WPE bots
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Doesn't make sense to clear the storage session right after creating it. This should fix
network process crash on startup under G_DEBUG=fatal-criticals due to the storage session
not having a cookie jar.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):

6:12 PM Changeset in webkit [240316] by Megan Gardner
  • 3 edits in trunk/Source/WebKit

Cancel Web Touches Properly so that long presses on YouTube links do not incorrectly trigger a load
https://bugs.webkit.org/show_bug.cgi?id=193687
<rdar://problem/47056717>

Reviewed by Tim Horton.

Cancel web gestures when a long press is recognized.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _cancelWebGestureRecognizer]):
(-[WKContentView _longPressRecognized:]):

6:06 PM Changeset in webkit [240315] by Wenson Hsieh
  • 8 edits
    2 copies in trunk/Source/WebCore

Add some bindings-related bookkeeping to UndoManager and UndoItem
https://bugs.webkit.org/show_bug.cgi?id=193111
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

This patch is work in progress towards supporting UndoManager.addItem(). Here, we add helper methods to
UndoItem and UndoManager which later patches will exercise, as well as introduce some custom bindings to
properly handle the case where UndoItems are given anonymous JavaScript functions (see below for more details).

No new tests, because there is no script-observable change in behavior yet. When addItems() is hooked up, I
will write a test to verify that the undo and redo JavaScript functions survive garbage collection.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSUndoItemCustom.cpp:

(WebCore::JSUndoItem::visitAdditionalChildren):

Have each JSUndoItem visit its undo and redo callback functions to ensure that the JavaScript wrapper objects
for these functions are not garbage collected underneath the item.

(WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):

Consider the undo item wrapper reachable from opaque roots if it is associated with its UndoManager's Document.
This ensures that if script isn't holding on to a reference to the wrapper (for instance, by calling
UndoManager.addItem(new UndoItem({ ... }))), we still protect the corresponding JSUndoItem as long as the
UndoManager's Document is alive. In the case where the undo item is not associated with a document, either (1)
script is keeping a reference to it, in which case it will be trivially reachable, or (2) script won't be able
to observe the destruction of the wrapper anyways (e.g. calling new UndoItem({ ... }) by itself).

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction):

Invalidate all undo items when the document is about to go away.

  • page/UndoItem.cpp:

(WebCore::UndoItem::setUndoManager):
(WebCore::UndoItem::invalidate):
(WebCore::UndoItem::isValid const):

Add a few helpers, to be used in a future patch. We consider an UndoItem valid if it has been added to an
UndoManager, and is thus associated with a document.

(WebCore::UndoItem::document const):

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

(WebCore::UndoManager::UndoManager):
(WebCore::UndoManager::addItem):

Have an UndoManager keep its UndoItems alive. These UndoItems remain in this set until either the document will
be destroyed, or the corresponding undo action is no longer needed because the platform undo stack has changed
(this latter behavior is yet to be implemented).

(WebCore::UndoManager::removeItem):
(WebCore::UndoManager::removeAllItems):

  • page/UndoManager.h:

(WebCore::UndoManager::UndoManager): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

Unified build fix.

5:46 PM Changeset in webkit [240314] by Nikita Vasilyev
  • 17 edits in trunk

Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
https://bugs.webkit.org/show_bug.cgi?id=193615

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Remove unused visibleProperties.

Rename:

  • properties to enabledProperties;
  • allProperties to properties;
  • allVisibleProperties to visibleProperties.
  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype._prependSemicolonIfNeeded):
(WI.CSSProperty):

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.get enabledProperties):
(WI.CSSStyleDeclaration.prototype.get properties):
(WI.CSSStyleDeclaration.prototype.propertyForName):
(WI.CSSStyleDeclaration.prototype.newBlankProperty):
(WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
(WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
(WI.DOMNodeStyles.prototype._markOverriddenProperties):
(WI.DOMNodeStyles.prototype._associateRelatedProperties):
(WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
(WI.DOMNodeStyles):

  • UserInterface/Views/BoxModelDetailsSectionRow.js:

(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):

  • UserInterface/Views/ComputedStyleSection.js:

(WI.ComputedStyleSection.prototype.get propertiesToRender):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.updateStatus):

LayoutTests:

Rename:

  • properties to enabledProperties;
  • allProperties to properties.
  • inspector/css/css-property-expected.txt:
  • inspector/css/css-property.html:
  • inspector/css/force-page-appearance.html:
  • inspector/css/matched-style-properties.html:
  • inspector/css/modify-css-property.html:
  • inspector/css/shadow-scoped-style.html:
5:13 PM Changeset in webkit [240313] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[WinCairo][WebKitTestRunner] Null dereference of GraphicsContext::m_data in GraphicsContext::releaseWindowsContext
https://bugs.webkit.org/show_bug.cgi?id=193664

Reviewed by Brent Fulgham.

WinCairo WebKitTestRunner always crash on openning test cases of
HTMLMeterElement.

If GraphicsContext::getWindowsContext retruned null HDC,
LocalWindowsContext shouldn't release the null HDC.

Covered by existing tests.

  • platform/graphics/win/LocalWindowsContext.h:

(WebCore::LocalWindowsContext::~LocalWindowsContext):
Release m_hdc only if it isn't null.

5:11 PM Changeset in webkit [240312] by sihui_liu@apple.com
  • 4 edits in trunk/LayoutTests

Layout test storage/indexeddb/open-during-transaction-private.html is failing
https://bugs.webkit.org/show_bug.cgi?id=193600

Reviewed by Brady Eidson.

Make sure the second request is finished before the third one so that test ends properly.

  • storage/indexeddb/open-during-transaction-expected.txt:
  • storage/indexeddb/open-during-transaction-private-expected.txt:
  • storage/indexeddb/resources/open-during-transaction.js:

(tryOpens.openreq3.onsuccess):
(tryOpens.openreq2.onsuccess):
(tryOpens):

4:43 PM Changeset in webkit [240311] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Fix an internal build failure after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580

Rubber-stamped by Wenson Hsieh.

  • SourcesCocoa.txt:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(-[WKMenuTarget forwardContextMenuAction:]):

  • WebKit.xcodeproj/project.pbxproj:

It was apparently unclear to the compiler sometimes which "state" selector to use, and this apparently mattered.
Tell the compiler to use the NSMenuItem selector, but at runtime it doesn't matter.

4:37 PM Changeset in webkit [240310] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix -Wsign-compare warning
https://bugs.webkit.org/show_bug.cgi?id=188697
<rdar://problem/46105624>

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::asText const):

4:32 PM Changeset in webkit [240309] by Devin Rousso
  • 7 edits in trunk

Web Inspector: Audit: provide a way to get related Accessibility properties for a given node
https://bugs.webkit.org/show_bug.cgi?id=193227
<rdar://problem/46787862>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/audit/run-accessibility.html

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

(WebCore::InspectorAuditAccessibilityObject::getComputedProperties): Added.

LayoutTests:

  • inspector/audit/run-accessibility.html:
  • inspector/audit/run-accessibility-expected.txt:
4:32 PM Changeset in webkit [240308] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix -Wunused-but-set-variable warning
https://bugs.webkit.org/show_bug.cgi?id=193660
<rdar://problem/47433602>

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

4:24 PM Changeset in webkit [240307] by Simon Fraser
  • 118 edits in trunk

Remove an iOS quirk where iframe renderers are identified as "RenderPartObject" in layout test results
https://bugs.webkit.org/show_bug.cgi?id=193692

Reviewed by Zalan Bujtas.

Source/WebCore:

Remove the iOS-specific renderName() implementation.

  • rendering/RenderIFrame.h:

LayoutTests:

Replace all instances of "RenderPartObject" with "RenderIFrame".

  • platform/ios-wk1/editing/pasteboard/4631972-expected.txt:
  • platform/ios-wk1/editing/pasteboard/subframe-dragndrop-1-expected.txt:
  • platform/ios-wk1/editing/selection/iframe-expected.txt:
  • platform/ios-wk1/editing/selection/select-all-iframe-expected.txt:
  • platform/ios-wk1/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios-wk1/fast/text/selection-hard-linebreak-expected.txt:
  • platform/ios-wk2/compositing/iframes/compositing-for-scrollable-iframe-expected.txt:
  • platform/ios-wk2/editing/pasteboard/4631972-expected.txt:
  • platform/ios-wk2/editing/pasteboard/subframe-dragndrop-1-expected.txt:
  • platform/ios-wk2/editing/selection/select-all-iframe-expected.txt:
  • platform/ios-wk2/fast/forms/basic-textareas-expected.txt:
  • platform/ios-wk2/fast/forms/tabbing-input-iframe-expected.txt:
  • platform/ios-wk2/fast/forms/targeted-frame-submission-expected.txt:
  • platform/ios-wk2/fast/frames/flattening/iframe-flattening-out-of-view-and-scroll-expected.txt:
  • platform/ios-wk2/fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout-expected.txt:
  • platform/ios-wk2/fast/frames/onlyCommentInIFrame-expected.txt:
  • platform/ios-wk2/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios-wk2/fast/replaced/border-radius-clip-expected.txt:
  • platform/ios/compositing/iframes/composited-iframe-alignment-expected.txt:
  • platform/ios/compositing/iframes/compositing-for-scrollable-iframe-expected.txt:
  • platform/ios/compositing/iframes/iframe-copy-on-scroll-expected.txt:
  • platform/ios/compositing/iframes/iframe-in-composited-layer-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-011-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-012-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-014-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-018-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-019-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-021-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-025-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-026-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-028-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-032-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-033-expected.txt:
  • platform/ios/css2.1/20110323/absolute-replaced-height-035-expected.txt:
  • platform/ios/css2.1/20110323/block-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/block-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/block-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/float-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/float-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/float-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/inline-block-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/inline-block-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/inline-block-replaced-height-007-expected.txt:
  • platform/ios/css2.1/20110323/inline-replaced-height-004-expected.txt:
  • platform/ios/css2.1/20110323/inline-replaced-height-005-expected.txt:
  • platform/ios/css2.1/20110323/inline-replaced-height-007-expected.txt:
  • platform/ios/editing/execCommand/find-after-replace-expected.txt:
  • platform/ios/editing/execCommand/paste-1-expected.txt:
  • platform/ios/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
  • platform/ios/editing/pasteboard/image-in-iframe-expected.txt:
  • platform/ios/editing/pasteboard/paste-2-expected.txt:
  • platform/ios/editing/selection/4776665-expected.txt:
  • platform/ios/editing/selection/4960137-expected.txt:
  • platform/ios/editing/selection/4975120-expected.txt:
  • platform/ios/editing/selection/drag-in-iframe-expected.txt:
  • platform/ios/editing/selection/drag-to-contenteditable-iframe-expected.txt:
  • platform/ios/editing/selection/iframe-expected.txt:
  • platform/ios/fast/block/basic/013-expected.txt:
  • platform/ios/fast/block/positioning/window-height-change-expected.txt:
  • platform/ios/fast/css/line-height-overflow-expected.txt:
  • platform/ios/fast/css/resize-corner-tracking-transformed-iframe-expected.txt:
  • platform/ios/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt:
  • platform/ios/fast/dom/Window/open-existing-pop-up-blocking-expected.txt:
  • platform/ios/fast/flexbox/016-expected.txt:
  • platform/ios/fast/forms/basic-textareas-expected.txt:
  • platform/ios/fast/forms/tabbing-input-iframe-expected.txt:
  • platform/ios/fast/forms/targeted-frame-submission-expected.txt:
  • platform/ios/fast/frames/001-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-height-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-width-and-height-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-fixed-width-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-nested-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-offscreen-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-out-of-view-and-scroll-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-out-of-view-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout-expected.txt:
  • platform/ios/fast/frames/flattening/iframe-flattening-simple-expected.txt:
  • platform/ios/fast/frames/frameElement-iframe-expected.txt:
  • platform/ios/fast/frames/iframe-option-crash-expected.txt:
  • platform/ios/fast/frames/iframe-scrolling-attribute-expected.txt:
  • platform/ios/fast/frames/iframe-with-frameborder-expected.txt:
  • platform/ios/fast/frames/onlyCommentInIFrame-expected.txt:
  • platform/ios/fast/frames/take-focus-from-iframe-expected.txt:
  • platform/ios/fast/images/favicon-as-image-expected.txt:
  • platform/ios/fast/overflow/scrollRevealButton-expected.txt:
  • platform/ios/fast/regions/repaint/line-flow-with-floats-in-regions-expected.txt:
  • platform/ios/fast/replaced/007-expected.txt:
  • platform/ios/fast/replaced/border-radius-clip-expected.txt:
  • platform/ios/fast/replaced/percent-height-in-anonymous-block-in-table-expected.txt:
  • platform/ios/fast/replaced/replaced-breaking-expected.txt:
  • platform/ios/fast/table/quote-text-around-iframe-expected.txt:
  • platform/ios/fast/text-autosizing/ios/contenteditable-expected.txt:
  • platform/ios/http/tests/loading/simple-subframe-expected.txt:
  • platform/ios/http/tests/local/file-url-sent-as-referer-expected.txt:
  • platform/ios/http/tests/misc/favicon-as-image-expected.txt:
  • platform/ios/http/tests/misc/frame-access-during-load-expected.txt:
  • platform/ios/http/tests/misc/iframe404-expected.txt:
  • platform/ios/http/tests/multipart/invalid-image-data-standalone-expected.txt:
  • platform/ios/http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/document-write/nested-document-write-2-expected.txt:
  • platform/ios/ios/fast/fixed/frame-with-fixed-expected.txt:
  • platform/ios/svg/custom/embedding-external-svgs-expected.txt:
  • platform/ios/svg/hixie/rendering-model/003-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug131020-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug137388-1-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug137388-2-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug137388-3-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug38916-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug4527-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug50695-2-expected.txt:
  • platform/ios/webarchive/loading/cache-expired-subresource-expected.txt:
4:19 PM Changeset in webkit [240306] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, further build fixes after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Oops.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::defaultStorageSession const):

4:13 PM Changeset in webkit [240305] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
https://bugs.webkit.org/show_bug.cgi?id=193647

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-01-22
Reviewed by Simon Fraser.

Source/WebCore:

Changing a style attribute of an SVGELement needs to call invalidateInstances().

Tests: svg/custom/svg-use-style-dynamic-change-invalidate.svg

  • svg/SVGElement.cpp:

(WebCore::SVGElement::attributeChanged):

LayoutTests:

  • svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg: Added.
  • svg/custom/svg-use-style-dynamic-change-invalidate.svg: Added.
4:10 PM Changeset in webkit [240304] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, further build fixes after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

This builds for libsoup. Doesn't work, but at least builds.

Also, speculative fixes for curl.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::defaultStorageSession const):

4:04 PM Changeset in webkit [240303] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] fetch loop should not stop on network issues
https://bugs.webkit.org/show_bug.cgi?id=193666

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(FetchLoop.run): Ensure that fetch loop doesn't exit on any exception.

3:50 PM Changeset in webkit [240302] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit

Unreviewed, further build fixes after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Still not working yet.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):

  • UIProcess/API/APIHTTPCookieStore.h:
3:21 PM Changeset in webkit [240301] by Wenson Hsieh
  • 4 edits in trunk/Tools

[iOS] Multiple WKWebViewAutofillTests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=189165
<rdar://problem/47433765>

Reviewed by Tim Horton.

These tests are currently flaky because they expect an invocation of "Element.blur()" in the web process to
immediately dispatch an IPC message to notify the UI process that the element has been blurred. In particular,
the -textInputHasAutofillContext helper assumes that waiting for the next remote layer tree commit in the UI
process in sufficient to ensure that any previous action that blurred the focused element in the web process
would make its way to the UI process by the time the layer tree commit is finished.

However, WebPage::elementDidBlur sends its IPC message to the UI process asynchronously, using callOnMainThread.
This means that if a layer tree flush was already scheduled in the web process before the element was blurred,
the element blur IPC message to the UI process will lose the race against the layer tree commit, and the test
will fail because it asks for -_autofillContext too early.

To fix this, we tweak these tests to actually wait until the intended input session change triggered by script
is handled in the UI process.

  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:

Tweak some of these tests to wait for input session changes before checking for the presence of an autofill
context. The only exception is an existing test that doesn't allow programmatic focus to begin input sessions
by default; to fix this test, we simply wait for _WKInputDelegate to be invoked, instead of waiting for a new
input session.

(-[AutofillTestView textInputHasAutofillContext]):

Remove the incorrect presentation update here. This helper now assumes that the UI process is up to date.

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

(nextInputSessionChangeCount):

Monotonically increasing identifier that's incremented whenever an input session is started in the UI process.
This includes changing the focused element from one to another.

(-[TestWKWebView initWithFrame:configuration:addToWindow:]):
(-[TestWKWebView didStartFormControlInteraction]):
(-[TestWKWebView didEndFormControlInteraction]):
(-[TestWKWebView evaluateJavaScriptAndWaitForInputSessionToChange:]):

Add a helper to evaluate JavaScript and wait for this script to cause some change in the input session. This
handles three cases: (1) changing focus from an element that doesn't require an input session to one that does,
(2) changing focus between elements that require input sessions, and (3) changing focus from an input session
that doesn't require an input session to one that doesn't.

3:08 PM Changeset in webkit [240300] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit/UIProcess

Apply patch. rdar://problem/47458213

Unreviewed, fix build after r240046.

2:51 PM Changeset in webkit [240299] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style reports false-positive whitespace/init warning in C++ initialization parameters
<https://webkit.org/b/193676>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_member_initialization_list):

  • Don't report missing whitespace around colon if the colon at the start of the line is formatted correctly.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(WebKitStyleTest.test_member_initialization_list):

  • Add a test for a missing permutation of existing tests.
  • Add a test this false-positive.
  • Add blank lines between subtests to make them easier to read.
2:31 PM Changeset in webkit [240298] by Antti Koivisto
  • 4 edits in trunk/Source/WebKit

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

Reviewed by Simon Fraser.

If the google page is scrolled, there is sometimes a short flash.

When restoring the page state we also restore exposedContentRect which is used to determine
which part of the page to create layers for. Scroll position is restored by the UI process
later so we rely on this to get the right layers for the initial view update.

A viewport configuration update may sometimes trample over the restored exposedContentRect,
moving it to top left. In this case the initial layer tree unfreeze commit may not have
layers to cover the actual visible view position.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):

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

(WebKit::WebPage::restorePageState):

Set a bit to indicate we have already restored the exposedContentRect.

(WebKit::WebPage::viewportConfigurationChanged):

Only reset exposedContentRect if wasn't already set by restorePageState.

2:10 PM Changeset in webkit [240297] by achristensen@apple.com
  • 5 edits in trunk/Source

Fix more builds.

Source/WebCore:

  • platform/network/curl/CurlResourceHandleDelegate.cpp:

(WebCore::handleCookieHeaders):
(WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):

Source/WebKit:

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
2:04 PM Changeset in webkit [240296] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Another build fix after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580
<rdar://problem/47457742>

Unreviewed, still not enough to fix soup builds, but closer.

  • UIProcess/API/APIHTTPCookieStore.h:
1:52 PM Changeset in webkit [240295] by achristensen@apple.com
  • 7 edits in trunk/Source

Fix some builds after r240292
https://bugs.webkit.org/show_bug.cgi?id=193580

Source/WebCore:

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::switchToNewTestingSession):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::retrieve):

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp:
1:45 PM Changeset in webkit [240294] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Automation.computeElementLayout should return visual viewport-aware coordinates
https://bugs.webkit.org/show_bug.cgi?id=193598
<rdar://problem/35325644>

Unreviewed, restore a mistakenly-deleted line whose absence causes hangs.

  • Shared/CoordinateSystem.h:
1:34 PM Changeset in webkit [240293] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed, skip all resource load statistics tests on GTK

We don't have this feature enabled yet, so shouldn't be running the tests. Yet.

  • platform/gtk/TestExpectations:
1:28 PM Changeset in webkit [240292] by achristensen@apple.com
  • 62 edits
    3 adds in trunk/Source

Move NetworkStorageSession ownership to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=193580

Reviewed by Geoff Garen.

Source/WebCore:

NetworkStorageSessions used to be owned by a process-global map living in WebCore.
This patch moves the ownership to the WebKit/WebKitLegacy layer.
In WebKitLegacy they are still owned by a process-global map for compatibility.
In WebKit they are owned by a map owned by the NetworkProcess object.
There were three non-NetworkProcess uses of NetworkStorageSessions which have been dealt with thusly:

  1. The WebProcess used to clear credentials from a NetworkStorageSession. Since this was the only use

of a NetworkStorageSession in the WebProcess we can conclude there were no credentials to clear,
so this code was removed with no change in behavior.

  1. The WebProcess used NetworkStorageSessions to get persistent credentials. This was turned

into a static method that does the same thing. We should audit these calls and decide if we really want them.

  1. The UIProcess used NetworkStorageSessions in APIHTTPCookieStore to interact with the default cookie

storage on Cocoa platforms. This has been replaced by functions that do the same thing directly.

  • platform/network/CredentialStorage.h:
  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::processMayUseCookieAPI):
(WebCore::NetworkStorageSession::globalSessionMap): Deleted.
(WebCore::NetworkStorageSession::storageSession): Deleted.
(WebCore::NetworkStorageSession::destroySession): Deleted.
(WebCore::NetworkStorageSession::forEach): Deleted.

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

(WebCore::NetworkStorageSession::createCFStorageSessionForIdentifier):
(WebCore::createCFStorageSessionForIdentifier): Deleted.
(WebCore::defaultNetworkStorageSession): Deleted.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
(WebCore::NetworkStorageSession::ensureSession): Deleted.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):

  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::defaultSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
(WebCore::NetworkStorageSession::ensureSession): Deleted.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage):
(WebCore::defaultSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
(WebCore::NetworkStorageSession::ensureSession): Deleted.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.

Source/WebKit:

  • NetworkProcess/Cookies/WebCookieManager.cpp:

(WebKit::WebCookieManager::WebCookieManager):
(WebKit::WebCookieManager::getHostnamesWithCookies):
(WebKit::WebCookieManager::deleteCookiesForHostname):
(WebKit::WebCookieManager::deleteAllCookies):
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::startObservingCookieChanges):
(WebKit::WebCookieManager::stopObservingCookieChanges):

  • NetworkProcess/Cookies/WebCookieManager.h:
  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:

(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
(WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame):
(WebKit::NetworkConnectionToWebProcess::removeStorageAccessForAllFramesOnPage):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::switchToNewTestingSession):
(WebKit::NetworkProcess::ensureSession):
(WebKit::NetworkProcess::storageSession const):
(WebKit::NetworkProcess::defaultStorageSession const):
(WebKit::NetworkProcess::forEachNetworkStorageSession):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcess::setAgeCapForClientSideCookies):
(WebKit::NetworkProcess::hasStorageAccessForFrame):
(WebKit::NetworkProcess::getAllStorageAccessEntries):
(WebKit::NetworkProcess::grantStorageAccess):
(WebKit::NetworkProcess::removeAllStorageAccess):
(WebKit::NetworkProcess::removePrevalentDomains):
(WebKit::NetworkProcess::setCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::validateCacheEntryForMaxAgeCapValidation):
(WebKit::NetworkResourceLoader::logCookieInformation const):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::networkStorageSession const):

  • NetworkProcess/NetworkStorageSessionProvider.h:
  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::makeEntry):
(WebKit::NetworkCache::Cache::makeRedirectEntry):
(WebKit::NetworkCache::Cache::update):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformSyncAllCookies):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • SourcesCocoa.txt:
  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::~HTTPCookieStore):
(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookie):
(API::HTTPCookieStore::deleteCookie):
(API::HTTPCookieStore::registerObserver):
(API::HTTPCookieStore::unregisterObserver):
(API::HTTPCookieStore::registerForNewProcessPoolNotifications):
(API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
(API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
(API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
(API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
(API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
(API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: Added.

(API::HTTPCookieStore::flushDefaultUIProcessCookieStore):
(API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies):
(API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore):
(API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore):
(API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):
(API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::clearCachedCredentials):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::deleteWebsiteData):
(WebKit::WebProcess::clearCachedCredentials): Deleted.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp: Added.

(defaultNetworkStorageSession):
(globalSessionMap):
(NetworkStorageSessionMap::storageSession):
(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::switchToNewTestingSession):
(NetworkStorageSessionMap::ensureSession):
(NetworkStorageSessionMap::destroySession):

  • WebCoreSupport/NetworkStorageSessionMap.h: Added.
  • WebCoreSupport/PageStorageSessionProvider.h:
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • Misc/WebCache.mm:

(+[WebCache clearCachedCredentials]):

  • Misc/WebDownload.mm:

(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):

  • Plugins/WebBaseNetscapePluginView.mm:

(WebKit::getAuthenticationInfo):

  • WebCoreSupport/WebFrameNetworkingContext.mm:

(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebFrameNetworkingContext::storageSession const):

  • WebView/WebPreferences.mm:

(+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
(+[WebPreferences _clearNetworkLoaderSession]):
(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameNetworkingContext.cpp:

(WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebFrameNetworkingContext::storageSession const):

  • WebDownloadCFNet.cpp:

(WebDownload::didReceiveAuthenticationChallenge):

  • WebPreferences.cpp:

(WebPreferences::clearNetworkLoaderSession):
(WebPreferences::switchNetworkLoaderToNewTestingSession):

1:25 PM Changeset in webkit [240291] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] Unit-test failure after r237113
https://bugs.webkit.org/show_bug.cgi?id=193669

Reviewed by Michael Catanzaro.

  • BuildSlaveSupport/build.webkit.org-config/factories.py:

(Factory.init): Properly check for --no-experimental-features flag when additionalArguments has
multiple or zero flags.

1:23 PM Changeset in webkit [240290] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Table appears broken after filter - rows look collapsed
https://bugs.webkit.org/show_bug.cgi?id=192730
<rdar://problem/46853158>

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

  • UserInterface/Views/Table.js:

(WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
Affect the filler row like the other applyColumnWidths calls since this
now may be the initial call to size visible columns.

1:22 PM Changeset in webkit [240289] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Adjust logging policy in WebKit's sandbox
https://bugs.webkit.org/show_bug.cgi?id=193454

Reviewed by Brent Fulgham.

Add a rule to initially deny all calls, since the default is to allow every call.
Later rules allow syscalls that we determined are needed for proper WebKit function.
This reduces the API surface available to attackers.

  • WebProcess/com.apple.WebProcess.sb.in:
1:15 PM Changeset in webkit [240288] by dbates@webkit.org
  • 5 edits
    2 adds in trunk/Source/WebKit

[iOS] WebKit should handle shift state changes when using the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=191475
<rdar://problem/45949246>

Reviewed by Brent Fulgham.

Implement UIKit SPI to be notified of shift state changes to the software keyboard
and dispatch a synthetic keydown or keyup event for either the Shift key or Caps Lock
key.

A side benefit of this change is that we now show and hide the caps lock indicator
in a focused password field when caps lock is enabled or disabled using the software
keyboard, respectively.

  • Platform/spi/ios/UIKitSPI.h: Expose more SPI.
  • SourcesCocoa.txt:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView modifierFlagsDidChangeFrom:to:]): Create a synthetic flags changed
web event based on the state change and dispatch it.
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]): Early return if the event
was a synethic flags change event so that we do not notify UIKit about this event
as it does not know anything about such synthetic events.

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

(-[WKSyntheticFlagsChangedWebEvent initWithKeyCode:modifiers:keyDown:]):
(-[WKSyntheticFlagsChangedWebEvent initWithCapsLockState:]):
(-[WKSyntheticFlagsChangedWebEvent initWithShiftState:]):

  • WebKit.xcodeproj/project.pbxproj:
1:02 PM Changeset in webkit [240287] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240055. rdar://problem/47099573

Regression(r240046) Several API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193509

Reviewed by Geoffrey Garen.

The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
our process reference.

To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
our process stays alive.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::loadDataWithNavigationShared): (WebKit::WebPageProxy::didPerformDragControllerAction): (WebKit::WebPageProxy::findPlugin): (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didCreateSubframe): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): (WebKit::WebPageProxy::willPerformClientRedirectForFrame): (WebKit::WebPageProxy::didCancelClientRedirectForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): (WebKit::WebPageProxy::didRunInsecureContentForFrame): (WebKit::WebPageProxy::frameDidBecomeFrameSet): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNavigationActionSync): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::decidePolicyForResponseShared): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::willSubmitForm): (WebKit::WebPageProxy::didNavigateWithNavigationData): (WebKit::WebPageProxy::didNavigateWithNavigationDataShared): (WebKit::WebPageProxy::didPerformClientRedirect): (WebKit::WebPageProxy::didPerformClientRedirectShared): (WebKit::WebPageProxy::didPerformServerRedirect): (WebKit::WebPageProxy::didUpdateHistoryTitle): (WebKit::WebPageProxy::createNewPage): (WebKit::WebPageProxy::runJavaScriptAlert): (WebKit::WebPageProxy::runJavaScriptConfirm): (WebKit::WebPageProxy::runJavaScriptPrompt): (WebKit::WebPageProxy::unavailablePluginButtonClicked): (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): (WebKit::WebPageProxy::runOpenPanel): (WebKit::WebPageProxy::printFrame): (WebKit::WebPageProxy::backForwardGoToItem): (WebKit::WebPageProxy::backForwardGoToItemShared): (WebKit::WebPageProxy::learnWord): (WebKit::WebPageProxy::ignoreWord): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::editingRangeCallback): (WebKit::WebPageProxy::rectForCharacterRangeCallback): (WebKit::WebPageProxy::focusedFrameChanged): (WebKit::WebPageProxy::frameSetLargestFrameChanged): (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): (WebKit::WebPageProxy::startURLSchemeTask): (WebKit::WebPageProxy::startURLSchemeTaskShared): (WebKit::WebPageProxy::stopURLSchemeTask): (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
  • UIProcess/WebPageProxy.h:

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

1:02 PM Changeset in webkit [240286] by Alan Coon
  • 55 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240046. rdar://problem/47099573

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): When restoring from PageCache, make sure we notify the client that the load was committed *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h: Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to delay attaching the drawing area in case of a process-swap, no matter what now that the previous process is kept alive until the provisional load is committed in the new process.
  • Shared/WebPolicyAction.h: Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of process-swap, we now tell the previous process to simply ignore the load, while we create a ProvisionalPageProxy to do the new load in a new process. Suspension of the previous page in the old process, happens later, when a load is actually committed in the new process.
  • Sources.txt: Add new ProvisionalPageProxy file.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _killWebContentProcessAndResetState]): When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current process and the provisional one, to maintain previous behavior in our API tests.
  • UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/AcceleratedDrawingAreaProxy.cpp: (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy): (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing): (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createDrawingAreaProxy):
  • UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): (WebKit::DrawingAreaProxy::~DrawingAreaProxy): (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
  • UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::process):
  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::update):
  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd): (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay): (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm: (-[WKContentView _createDrawingAreaProxy:]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Pass the drawing area's associated process when constructing it and store it as a member in addition to the page. This is necessary now that a page can be associated with 2 WebProcesses at a time, each having its own drawing area.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Pass the process.
  • UIProcess/ProvisionalPageProxy.cpp: Added. (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::processDidTerminate): (WebKit::ProvisionalPageProxy::takeDrawingArea): (WebKit::ProvisionalPageProxy::cancel): (WebKit::ProvisionalPageProxy::processDidFinishLaunching): (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::goToBackForwardItem): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
  • UIProcess/ProvisionalPageProxy.h: Added. (WebKit::ProvisionalPageProxy::page): (WebKit::ProvisionalPageProxy::mainFrame const): (WebKit::ProvisionalPageProxy::process): (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const): (WebKit::ProvisionalPageProxy::navigationID const): (WebKit::ProvisionalPageProxy::drawingArea const): New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from the provisional process.
  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::unsuspend): (WebKit::SuspendedPageProxy::didProcessRequestToSuspend): Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy which tries to register itself as an IPC message receiver for the same pageID when a process-swap occurs and we're switching to a suspended page.
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isMainFrame const): WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame. Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's m_mainFrame to maintain previous behavior.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::provisionalDrawingArea const): Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.

(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy. This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):

(WebKit::WebPageProxy::provisionalProcessDidTerminate):
Cancel the provisiona load and destroy the ProvisionalPageProxy if
the provisional process crashes.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):

  • Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have more than one call site. This was just some bad factoring.
  • Take the process in parameter now that we page can be associated with several processes at a time.

(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::visitedLinkStore): (WebKit::WebPageProxy::provisionalPageProxy const):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::hasProvisionalPageWithID const): (WebKit::WebProcessProxy::updateBackForwardItem): (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch): (WebKit::WebProcessProxy::didFinishLaunching): (WebKit::WebProcessProxy::canTerminateChildProcess):
  • UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::addProvisionalPageProxy): (WebKit::WebProcessProxy::removeProvisionalPageProxy): Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID associated with this process yet, because it is still a ProvisionalPageProxy.
  • UIProcess/WebURLSchemeHandler.cpp: (WebKit::WebURLSchemeHandler::startTask):
  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp: (WebKit::WebURLSchemeTask::create): (WebKit::WebURLSchemeTask::WebURLSchemeTask): (WebKit::WebURLSchemeTask::didPerformRedirection): (WebKit::WebURLSchemeTask::didReceiveResponse): (WebKit::WebURLSchemeTask::didReceiveData): (WebKit::WebURLSchemeTask::didComplete): (WebKit::WebURLSchemeTask::pageDestroyed):
  • UIProcess/WebURLSchemeTask.h: Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
  • UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::endSwipeGesture): Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently associated with the page in case of process swap.
  • WebKit.xcodeproj/project.pbxproj: Add ProvisionalPageProxy class.
  • WebProcess/WebPage/WebFrame.cpp: (WebKit::toPolicyAction): (WebKit::WebFrame::didReceivePolicyDecision):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldAttachDrawingAreaOnPageTransition): (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didReceivePolicyDecision): Stop dealing with WebPolicyAction::Suspend as it no longer exists.

(WebKit::WebPage::didCompletePageTransition):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/WebPage.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:

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

12:59 PM Changeset in webkit [240285] by dbates@webkit.org
  • 8 edits in trunk/Source

[iOS] Interpret text key commands on keydown and app key commands on keypress
https://bugs.webkit.org/show_bug.cgi?id=192897
<rdar://problem/46857378>

Reviewed by Brent Fulgham.

Source/WebKit:

Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
is false) and keypress (isCharEvent is true), respectively.

  • Platform/spi/ios/UIKitSPI.h: Add more SPI.
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interpretKeyEvent:isCharEvent:]):

Source/WebKitLegacy/ios:

Add stubs for SPI.

  • DefaultDelegates/WebDefaultUIKitDelegate.m:

(-[WebDefaultUIKitDelegate handleKeyTextCommandForCurrentEvent]): Added.
(-[WebDefaultUIKitDelegate handleKeyAppCommandForCurrentEvent]): Added.
(-[WebDefaultUIKitDelegate handleKeyCommandForCurrentEvent]): Deleted.

  • WebView/WebUIKitDelegate.h:

Source/WebKitLegacy/mac:

Adopt SPI to interpret text key commands and app key commands independently on keydown (isCharEvent
is false) and keypress (isCharEvent is true), respectively.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _handleEditingKeyEvent:]):

12:58 PM Changeset in webkit [240284] by Alan Coon
  • 24 edits
    2 deletes in branches/safari-607-branch

Revert r240258. rdar://problem/47099573

12:58 PM Changeset in webkit [240283] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Revert r240259. rdar://problem/47099573

12:58 PM Changeset in webkit [240282] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source

Revert r240260. rdar://problem/47099573

12:58 PM Changeset in webkit [240281] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WTF

Revert r240261. rdar://problem/47099573

12:58 PM Changeset in webkit [240280] by Alan Coon
  • 24 edits
    2 adds in branches/safari-607-branch

Revert r240262. rdar://problem/47099573

12:58 PM Changeset in webkit [240279] by Alan Coon
  • 55 edits
    2 deletes in branches/safari-607-branch

Revert r240263. rdar://problem/47099573

12:57 PM Changeset in webkit [240278] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Revert r240264. rdar://problem/47099573

12:52 PM Changeset in webkit [240277] by Devin Rousso
  • 7 edits in trunk

Web Inspector: Audit: provide a way to get related Accessibility nodes for a given node
https://bugs.webkit.org/show_bug.cgi?id=193225
<rdar://problem/46799956>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/audit/run-accessibility.html

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

(WebCore::InspectorAuditAccessibilityObject::getActiveDescendant): Added.
(WebCore::addChildren): Added.
(WebCore::InspectorAuditAccessibilityObject::getChildNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getControlledNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getFlowedNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getMouseEventNode): Added.
(WebCore::InspectorAuditAccessibilityObject::getOwnedNodes): Added.
(WebCore::InspectorAuditAccessibilityObject::getParentNode): Added.
(WebCore::InspectorAuditAccessibilityObject::getSelectedChildNodes): Added.

LayoutTests:

  • inspector/audit/run-accessibility.html:
  • inspector/audit/run-accessibility-expected.txt:
12:51 PM Changeset in webkit [240276] by Kocsen Chung
  • 7 edits in tags/Safari-607.1.22.1/Source

Versioning.

12:49 PM Changeset in webkit [240275] by ddkilzer@apple.com
  • 7 edits
    1 copy in trunk/Source/WebKit

C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
<https://webkit.org/b/193607>
<rdar://problem/47334613>

Reviewed by Alex Christensen.

  • Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:

(WebKit::AuthenticationManager::initializeConnection):

  • UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:

(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):

  • Update name of constants.
  • Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.
  • Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:
  • Put constant values in a namespace, and move values to ClientCertificateAuthenticationXPCConstants.cpp.
  • SourcesCocoa.txt:
  • UnifiedSources-input.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
  • Add ClientCertificateAuthenticationXPCConstants.cpp.
12:41 PM Changeset in webkit [240274] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.22.1

New tag.

12:33 PM Changeset in webkit [240273] by ysuzuki@apple.com
  • 17 edits in trunk/Source/JavaScriptCore

[JSC] Intl constructors should fit in sizeof(InternalFunction)
https://bugs.webkit.org/show_bug.cgi?id=193661

Reviewed by Mark Lam.

Previously all the Intl constructors have their own subspace. This is because these constructors have different size from InternalFunction.
But it is too costly approach in terms of the memory usage since these constructors are only one per JSGlobalObject. This patch attempts to
reduce the memory size consumed by these Intl objects by holding instance structures in IntlObject instead of in each Intl constructors.
So that we can make sizeof(Intl constructors) == sizeof(InternalFunction) and drop costly subspaces. Since this patch drops subspaces in VM,
it also significantly reduces the sizeof(VM), from 76696 to 74680.

This patch also includes the preparation for making Intl properties lazy. But currently it is not possible since @Collator reference exists
in builtin code.

  • CMakeLists.txt:
  • DerivedSources.make:
  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructor::create):
(JSC::IntlCollatorConstructor::finishCreation):
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::IntlCollatorConstructor::visitChildren): Deleted.

  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::create):
(JSC::IntlDateTimeFormatConstructor::finishCreation):
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructor::visitChildren): Deleted.

  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::create):
(JSC::IntlNumberFormatConstructor::finishCreation):
(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
(JSC::IntlNumberFormatConstructor::visitChildren): Deleted.

  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlObject.cpp:

(JSC::createCollatorConstructor):
(JSC::createNumberFormatConstructor):
(JSC::createDateTimeFormatConstructor):
(JSC::createPluralRulesConstructor):
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation):
(JSC::IntlObject::visitChildren):

  • runtime/IntlObject.h:
  • runtime/IntlPluralRulesConstructor.cpp:

(JSC::IntlPluralRulesConstructor::create):
(JSC::IntlPluralRulesConstructor::finishCreation):
(JSC::constructIntlPluralRules):
(JSC::IntlPluralRulesConstructor::visitChildren): Deleted.

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

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

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::intlObject const):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
12:12 PM Changeset in webkit [240272] by ddkilzer@apple.com
  • 12 edits
    2 moves in trunk/Source

Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
<https://webkit.org/b/193654>
<rdar://problem/47430290>

Reviewed by Alex Christensen.

  • Moves QuickLookSoftLink.{h,mm} to PAL.
  • Adds soft-link to 3 classes to consolidate QuickLook.framework soft-linking.
  • Updates existing source to work with above changes.

Source/WebCore:

  • SourcesCocoa.txt:
  • UnifiedSources-input.xcfilelist:
  • WebCore.xcodeproj/project.pbxproj:
  • Remove QuickLookSoftLink.{h,mm} due to move to PAL.
  • platform/ios/QuickLook.mm:

(WebCore::QLPreviewGetSupportedMIMETypesSet):
(WebCore::registerQLPreviewConverterIfNeeded):

  • Update for QuickLookSoftLink.{h,mm} move to PAL.
  • platform/network/ios/PreviewConverter.mm:

(WebCore::optionsWithPassword):
(WebCore::PreviewConverter::PreviewConverter):

  • Switch to using QuickLookSoftLink.{h,mm} in PAL.
  • platform/network/ios/WebCoreURLResponseIOS.mm:

(WebCore::adjustMIMETypeIfNecessary):

  • Update for QuickLookSoftLink.{h,mm} move to PAL.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • Add QuickLookSoftLink.{h,mm} due to move from WebCore.
  • pal/ios/QuickLookSoftLink.h: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.h.
  • pal/ios/QuickLookSoftLink.mm: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.mm.
  • Add 3 classes for soft-linking.
  • Change namespace from WebCore to PAL.

Source/WebKit:

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:

(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
(WebKit::SystemPreviewController::start):

  • UIProcess/ios/WKSystemPreviewView.mm:

(-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]):

  • Switch to using QuickLookSoftLink.{h,mm} in PAL.
11:55 AM Changeset in webkit [240271] by Simon Fraser
  • 3 edits
    2 adds in trunk

Fix the position of layers nested inside of composited overflow-scroll
https://bugs.webkit.org/show_bug.cgi?id=193642

Reviewed by Antti Koivisto and Sam Weinig.
Source/WebCore:

Remove an iOS #ifdef so that layers inside composited overflow gets the correct
positions on macOS too.

Test: compositing/geometry/fixed-inside-overflow-scroll.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):

LayoutTests:

Ref test. Black bar obscures the area that's different because of overlay/non-overlay
scrollbar differences between macOS and iOS.

  • compositing/geometry/fixed-inside-overflow-scroll-expected.html: Added.
  • compositing/geometry/fixed-inside-overflow-scroll.html: Added.
11:54 AM Changeset in webkit [240270] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
https://bugs.webkit.org/show_bug.cgi?id=193675
<rdar://problem/46628680>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/AuditTestGroupContentView.js:

(WI.AuditTestGroupContentView.prototype.layout):

  • Localizations/en.lproj/localizedStrings.js:
11:41 AM Changeset in webkit [240269] by sbarati@apple.com
  • 4 edits
    2 deletes in trunk

Unreviewed. Rollout r240223. It regressed JetStream2 by 1%.

JSTests:

  • stress/arith-abs-to-arith-negate-range-optimizaton.js:

(testUncheckedBetweenIntMinInclusiveAndZeroExclusive):
(testUncheckedLessThanZero):
(testUncheckedLessThanOrEqualZero):

  • stress/movhint-backwards-propagation-must-merge-use-as-value-add.js: Removed.
  • stress/movhint-backwards-propagation-must-merge-use-as-value.js: Removed.

Source/JavaScriptCore:

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

11:06 AM Changeset in webkit [240268] by Claudio Saavedra
  • 2 edits in trunk/Source/WebCore

[GTK] Build fix for Ubuntu LTS 16.04
https://bugs.webkit.org/show_bug.cgi?id=193672

Unreviewed build fix.

  • html/canvas/CanvasStyle.h: Add default copy constructor for

CMYKAColor struct.

11:03 AM Changeset in webkit [240267] by Alan Coon
  • 7 edits in tags/Safari-608.1.1.1/Source

Versioning.

10:54 AM Changeset in webkit [240266] by Alan Coon
  • 1 copy in tags/Safari-608.1.1.1

New tag.

10:42 AM Changeset in webkit [240265] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

10:34 AM Changeset in webkit [240264] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r240055. rdar://problem/47099573

Regression(r240046) Several API tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=193509

Reviewed by Geoffrey Garen.

The crashes would happen because loadRequestShared() would take a WebProcessProxy& in parameter but
then call reattachToWebProcess() if the page is not valid, which would replace m_process and invalidate
our process reference.

To address the issue, move the reattachToWebProcess() call to loadRequest(), before calling
loadRequestShared(). Also, update *Shared() methods to take a Ref<WebProcessProxy>&& instead
of a WebProcessProxy& in parameter. Since we call client delegates, we need to make sure
our process stays alive.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::loadDataWithNavigationShared): (WebKit::WebPageProxy::didPerformDragControllerAction): (WebKit::WebPageProxy::findPlugin): (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didCreateSubframe): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): (WebKit::WebPageProxy::willPerformClientRedirectForFrame): (WebKit::WebPageProxy::didCancelClientRedirectForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): (WebKit::WebPageProxy::didRunInsecureContentForFrame): (WebKit::WebPageProxy::frameDidBecomeFrameSet): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsync): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNavigationActionSync): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::decidePolicyForResponseShared): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::willSubmitForm): (WebKit::WebPageProxy::didNavigateWithNavigationData): (WebKit::WebPageProxy::didNavigateWithNavigationDataShared): (WebKit::WebPageProxy::didPerformClientRedirect): (WebKit::WebPageProxy::didPerformClientRedirectShared): (WebKit::WebPageProxy::didPerformServerRedirect): (WebKit::WebPageProxy::didUpdateHistoryTitle): (WebKit::WebPageProxy::createNewPage): (WebKit::WebPageProxy::runJavaScriptAlert): (WebKit::WebPageProxy::runJavaScriptConfirm): (WebKit::WebPageProxy::runJavaScriptPrompt): (WebKit::WebPageProxy::unavailablePluginButtonClicked): (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): (WebKit::WebPageProxy::runOpenPanel): (WebKit::WebPageProxy::printFrame): (WebKit::WebPageProxy::backForwardGoToItem): (WebKit::WebPageProxy::backForwardGoToItemShared): (WebKit::WebPageProxy::learnWord): (WebKit::WebPageProxy::ignoreWord): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::editingRangeCallback): (WebKit::WebPageProxy::rectForCharacterRangeCallback): (WebKit::WebPageProxy::focusedFrameChanged): (WebKit::WebPageProxy::frameSetLargestFrameChanged): (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): (WebKit::WebPageProxy::enumerateMediaDevicesForFrame): (WebKit::WebPageProxy::startURLSchemeTask): (WebKit::WebPageProxy::startURLSchemeTaskShared): (WebKit::WebPageProxy::stopURLSchemeTask): (WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
  • UIProcess/WebPageProxy.h:

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

10:34 AM Changeset in webkit [240263] by Alan Coon
  • 55 edits
    2 adds in branches/safari-607-branch

Cherry-pick r240046. rdar://problem/47099573

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): When restoring from PageCache, make sure we notify the client that the load was committed *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h: Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to delay attaching the drawing area in case of a process-swap, no matter what now that the previous process is kept alive until the provisional load is committed in the new process.
  • Shared/WebPolicyAction.h: Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of process-swap, we now tell the previous process to simply ignore the load, while we create a ProvisionalPageProxy to do the new load in a new process. Suspension of the previous page in the old process, happens later, when a load is actually committed in the new process.
  • Sources.txt: Add new ProvisionalPageProxy file.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _killWebContentProcessAndResetState]): When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current process and the provisional one, to maintain previous behavior in our API tests.
  • UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/AcceleratedDrawingAreaProxy.cpp: (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy): (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing): (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createDrawingAreaProxy):
  • UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): (WebKit::DrawingAreaProxy::~DrawingAreaProxy): (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
  • UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::process):
  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::update):
  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd): (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay): (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm: (-[WKContentView _createDrawingAreaProxy:]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState): (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy):
  • UIProcess/win/PageClientImpl.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Pass the drawing area's associated process when constructing it and store it as a member in addition to the page. This is necessary now that a page can be associated with 2 WebProcesses at a time, each having its own drawing area.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Pass the process.
  • UIProcess/ProvisionalPageProxy.cpp: Added. (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::processDidTerminate): (WebKit::ProvisionalPageProxy::takeDrawingArea): (WebKit::ProvisionalPageProxy::cancel): (WebKit::ProvisionalPageProxy::processDidFinishLaunching): (WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::loadData): (WebKit::ProvisionalPageProxy::loadRequest): (WebKit::ProvisionalPageProxy::goToBackForwardItem): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didPerformClientRedirect): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): (WebKit::ProvisionalPageProxy::didNavigateWithNavigationData): (WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame): (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync): (WebKit::ProvisionalPageProxy::decidePolicyForResponse): (WebKit::ProvisionalPageProxy::startURLSchemeTask): (WebKit::ProvisionalPageProxy::backForwardGoToItem): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
  • UIProcess/ProvisionalPageProxy.h: Added. (WebKit::ProvisionalPageProxy::page): (WebKit::ProvisionalPageProxy::mainFrame const): (WebKit::ProvisionalPageProxy::process): (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const): (WebKit::ProvisionalPageProxy::navigationID const): (WebKit::ProvisionalPageProxy::drawingArea const): New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from the provisional process.
  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::unsuspend): (WebKit::SuspendedPageProxy::didProcessRequestToSuspend): Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy which tries to register itself as an IPC message receiver for the same pageID when a process-swap occurs and we're switching to a suspended page.
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isMainFrame const): WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame. Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's m_mainFrame to maintain previous behavior.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::provisionalDrawingArea const): Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.

(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy. This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):

(WebKit::WebPageProxy::provisionalProcessDidTerminate):
Cancel the provisiona load and destroy the ProvisionalPageProxy if
the provisional process crashes.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):

  • Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have more than one call site. This was just some bad factoring.
  • Take the process in parameter now that we page can be associated with several processes at a time.

(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::visitedLinkStore): (WebKit::WebPageProxy::provisionalPageProxy const):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::hasProvisionalPageWithID const): (WebKit::WebProcessProxy::updateBackForwardItem): (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch): (WebKit::WebProcessProxy::didFinishLaunching): (WebKit::WebProcessProxy::canTerminateChildProcess):
  • UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::addProvisionalPageProxy): (WebKit::WebProcessProxy::removeProvisionalPageProxy): Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID associated with this process yet, because it is still a ProvisionalPageProxy.
  • UIProcess/WebURLSchemeHandler.cpp: (WebKit::WebURLSchemeHandler::startTask):
  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp: (WebKit::WebURLSchemeTask::create): (WebKit::WebURLSchemeTask::WebURLSchemeTask): (WebKit::WebURLSchemeTask::didPerformRedirection): (WebKit::WebURLSchemeTask::didReceiveResponse): (WebKit::WebURLSchemeTask::didReceiveData): (WebKit::WebURLSchemeTask::didComplete): (WebKit::WebURLSchemeTask::pageDestroyed):
  • UIProcess/WebURLSchemeTask.h: Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
  • UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::endSwipeGesture): Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently associated with the page in case of process swap.
  • WebKit.xcodeproj/project.pbxproj: Add ProvisionalPageProxy class.
  • WebProcess/WebPage/WebFrame.cpp: (WebKit::toPolicyAction): (WebKit::WebFrame::didReceivePolicyDecision):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldAttachDrawingAreaOnPageTransition): (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didReceivePolicyDecision): Stop dealing with WebPolicyAction::Suspend as it no longer exists.

(WebKit::WebPage::didCompletePageTransition):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/WebPage.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:

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

10:34 AM Changeset in webkit [240262] by Alan Coon
  • 24 edits
    2 deletes in branches/safari-607-branch

Cherry-pick r240015. rdar://problem/47099573

Unreviewed, rolling out r239993, r239995, r239997, and
r239999.

Caused assertions under
ViewGestureController::disconnectFromProcess()

Reverted changesets:

"Regression(PSON) View becomes blank after click a cross-site
download link"
https://bugs.webkit.org/show_bug.cgi?id=193361
https://trac.webkit.org/changeset/239993

"Unreviewed iOS build fix after r239993."
https://trac.webkit.org/changeset/239995

"Fix iOS build after r239993"
https://bugs.webkit.org/show_bug.cgi?id=193361
https://trac.webkit.org/changeset/239997

"Unreviewed, revert part of r239997 as it is not needed to fix
the build."
https://trac.webkit.org/changeset/239999

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

10:34 AM Changeset in webkit [240261] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WTF

Cherry-pick r239999. rdar://problem/47099573

Unreviewed, revert part of r239997 as it is not needed to fix the build.

  • wtf/RefCounter.h:

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

10:34 AM Changeset in webkit [240260] by Alan Coon
  • 5 edits in branches/safari-607-branch/Source

Cherry-pick r239997. rdar://problem/47099573

Fix iOS build after r239993
https://bugs.webkit.org/show_bug.cgi?id=193361

Source/WebKit:

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/SuspendedPageProxy.h:

Source/WTF:

  • wtf/RefCounter.h:

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

10:34 AM Changeset in webkit [240259] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239995. rdar://problem/47099573

Unreviewed iOS build fix after r239993.

  • UIProcess/SuspendedPageProxy.h:

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

10:34 AM Changeset in webkit [240258] by Alan Coon
  • 24 edits
    2 adds in branches/safari-607-branch

Cherry-pick r239993. rdar://problem/47099573

Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>

Reviewed by Geoff Garen.

Source/WebCore:

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): When restoring from PageCache, make sure we notify the client that the load was committed *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy logic in the UIProcess.

Source/WebKit:

The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.

To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h: Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to delay attaching the drawing area in case of a process-swap, no matter what now that the previous process is kept alive until the provisional load is committed in the new process.
  • Shared/WebPolicyAction.h: Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of process-swap, we now tell the previous process to simply ignore the load, while we create a ProvisionalPageProxy to do the new load in a new process. Suspension of the previous page in the old process, happens later, when a load is actually committed in the new process.
  • Sources.txt: Add new ProvisionalPageProxy file.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _killWebContentProcessAndResetState]): When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current process and the provisional one, to maintain previous behavior in our API tests.
  • UIProcess/PageClient.h: Tiny build fix.
  • UIProcess/ProvisionalPageProxy.cpp: Added. (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::takeDrawingArea): (WebKit::ProvisionalPageProxy::cancel): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::loadDataWithNavigation): (WebKit::ProvisionalPageProxy::loadRequestWithNavigation): (WebKit::ProvisionalPageProxy::goToBackForwardItem): (WebKit::ProvisionalPageProxy::didCreateMainFrame): (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
  • UIProcess/ProvisionalPageProxy.h: Added. (WebKit::ProvisionalPageProxy::page): (WebKit::ProvisionalPageProxy::mainFrame const): (WebKit::ProvisionalPageProxy::process): (WebKit::ProvisionalPageProxy::processSwapRequestedByClient const): (WebKit::ProvisionalPageProxy::navigationID const): Add new ProvisionalPageProxy class to wrap the provisional load in the new process after a swap. The provisional page is owned by the WebPageProxy and we only commit the provisional page when the load is committed. Until then, the WebPageProxy keeps using the old process and displaying the current content.
  • UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::unsuspend): (WebKit::SuspendedPageProxy::didProcessRequestToSuspend): Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy which tries to register itself as an IPC message receiver for the same pageID when a process-swap occurs and we're switching to a suspended page.
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isMainFrame const): WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame. Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's m_mainFrame to maintain previous behavior.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::swapToWebProcess): swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess() later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs to initialize some data members such as the drawing area and the main frame as it is transferring them over from the ProvisionalPageProxy which started the provisional load.

(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.

(WebKit::WebPageProxy::initializeWebPage):

  • We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been committed in the provisional process.
  • Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().

(WebKit::WebPageProxy::loadRequestWithNavigation):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.

(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:

  • Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
  • Suspending the current page.
  • Letting the client know the load is comitted
  • Destroy the ProvisionalPageProxy. This work used to happen earlier in continueNavigationInNewProcess().

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.

(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.

(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Moved some PSON logic to the ProvisionalPageProxy instead.

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.

(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForResponse):
Capture the process in the lambda, to make sure we send the policy decision to the same process that
asked for it, so as to not get confused by process swaps.

(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.

(WebKit::WebPageProxy::creationParameters):
Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
more than one call site. This was just some bad factoring.

(WebKit::WebPageProxy::PageProcessOverride::PageProcessOverride):
(WebKit::WebPageProxy::PageProcessOverride::~PageProcessOverride):

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::temporarilyOverrideProcess): Add utility class to temporarily override the WebPageProxy's m_process with the provisional one when the ProvisionalPageProxy interacts with the WebPageProxy.
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::hasProvisionalPageWithID const): (WebKit::WebProcessProxy::updateBackForwardItem): Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID associated with this process yet, because it is still a ProvisionalPageProxy.

(WebKit::WebProcessProxy::canTerminateChildProcess):
Do not terminate the WebProcess if there are ProvisionalPageProxy objects using it.

  • UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::addProvisionalPageProxy): (WebKit::WebProcessProxy::removeProvisionalPageProxy):
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebFrame.cpp: (WebKit::toPolicyAction): (WebKit::WebFrame::didReceivePolicyDecision): Stop dealing with WebPolicyAction::Suspend as it no longer exists.
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::reinitializeWebPage): (WebKit::WebPage::didReceivePolicyDecision):

(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

LayoutTests:

Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.

  • platform/wk2/TestExpectations:

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

10:33 AM Changeset in webkit [240257] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, restore bytecode cache-related JSC options deleted in r240254
https://bugs.webkit.org/show_bug.cgi?id=192782

The JSC options were committed as part of r240210, which got rolled out in
r240224. However, the options got re-landed in r240248 and then deleted
again in 240254 (immediately before the caching code code landed in 240255)

  • runtime/Options.h:
10:15 AM Changeset in webkit [240256] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193673>
<rdar://problem/47448241>

Reviewed by Dean Jackson.

  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:

(WebCore::appendArgumentToArray): Use adoptNS() to fix the leak.

10:00 AM Changeset in webkit [240255] by Tadeu Zagallo
  • 38 edits
    1 copy
    2 adds in trunk

Cache bytecode to disk
https://bugs.webkit.org/show_bug.cgi?id=192782
<rdar://problem/46084932>

Reviewed by Keith Miller.

Source/JavaScriptCore:

Add the logic to serialize and deserialize the new JSC bytecode. For now,
the cache is only used for tests.

Each class that can be serialized has a counterpart in CachedTypes, which
handles the decoding and encoding. When decoding, the cached objects are
mmap'd from disk, but only used for creating instances of the respective
in-memory version of each object. Ideally, the mmap'd objects should be
used at runtime in the future.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.cpp:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinNames.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setConstantIdentifierSetRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/HandlerInfo.h:

(JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo):

  • bytecode/InstructionStream.h:
  • bytecode/UnlinkedCodeBlock.h:

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

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecode/UnlinkedFunctionCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/UnlinkedGlobalCodeBlock.h:

(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):

  • bytecode/UnlinkedMetadataTable.h:
  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecode/UnlinkedProgramCodeBlock.h:
  • interpreter/Interpreter.cpp:
  • jsc.cpp:

(functionQuit):
(runJSC):

  • parser/SourceCode.h:
  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::operator!= const):

  • parser/UnlinkedSourceCode.h:
  • parser/VariableEnvironment.h:
  • runtime/CachedTypes.cpp: Added.

(JSC::Encoder::Allocation::buffer const):
(JSC::Encoder::Allocation::offset const):
(JSC::Encoder::Allocation::Allocation):
(JSC::Encoder::Encoder):
(JSC::Encoder::vm):
(JSC::Encoder::malloc):
(JSC::Encoder::offsetOf):
(JSC::Encoder::cachePtr):
(JSC::Encoder::offsetForPtr):
(JSC::Encoder::release):
(JSC::Encoder::Page::Page):
(JSC::Encoder::Page::malloc):
(JSC::Encoder::Page::buffer const):
(JSC::Encoder::Page::size const):
(JSC::Encoder::Page::getOffset const):
(JSC::Encoder::allocateNewPage):
(JSC::Decoder::Decoder):
(JSC::Decoder::~Decoder):
(JSC::Decoder::vm):
(JSC::Decoder::offsetOf):
(JSC::Decoder::cacheOffset):
(JSC::Decoder::addFinalizer):
(JSC::encode):
(JSC::decode):
(JSC::VariableLengthObject::buffer const):
(JSC::VariableLengthObject::allocate):
(JSC::CachedPtr::encode):
(JSC::CachedPtr::decode const):
(JSC::CachedPtr::operator-> const):
(JSC::CachedPtr::get const):
(JSC::CachedRefPtr::encode):
(JSC::CachedRefPtr::decode const):
(JSC::CachedWriteBarrier::encode):
(JSC::CachedWriteBarrier::decode const):
(JSC::CachedVector::encode):
(JSC::CachedVector::decode const):
(JSC::CachedPair::encode):
(JSC::CachedPair::decode const):
(JSC::CachedHashMap::encode):
(JSC::CachedHashMap::decode const):
(JSC::CachedUniquedStringImpl::encode):
(JSC::CachedUniquedStringImpl::decode const):
(JSC::CachedStringImpl::encode):
(JSC::CachedStringImpl::decode const):
(JSC::CachedString::encode):
(JSC::CachedString::decode const):
(JSC::CachedIdentifier::encode):
(JSC::CachedIdentifier::decode const):
(JSC::CachedOptional::encode):
(JSC::CachedOptional::decode const):
(JSC::CachedOptional::decodeAsPtr const):
(JSC::CachedSimpleJumpTable::encode):
(JSC::CachedSimpleJumpTable::decode const):
(JSC::CachedStringJumpTable::encode):
(JSC::CachedStringJumpTable::decode const):
(JSC::CachedCodeBlockRareData::encode):
(JSC::CachedCodeBlockRareData::decode const):
(JSC::CachedBitVector::encode):
(JSC::CachedBitVector::decode const):
(JSC::CachedHashSet::encode):
(JSC::CachedHashSet::decode const):
(JSC::CachedConstantIdentifierSetEntry::encode):
(JSC::CachedConstantIdentifierSetEntry::decode const):
(JSC::CachedVariableEnvironment::encode):
(JSC::CachedVariableEnvironment::decode const):
(JSC::CachedArray::encode):
(JSC::CachedArray::decode const):
(JSC::CachedScopedArgumentsTable::encode):
(JSC::CachedScopedArgumentsTable::decode const):
(JSC::CachedSymbolTableEntry::encode):
(JSC::CachedSymbolTableEntry::decode const):
(JSC::CachedSymbolTable::encode):
(JSC::CachedSymbolTable::decode const):
(JSC::CachedImmutableButterfly::encode):
(JSC::CachedImmutableButterfly::decode const):
(JSC::CachedRegExp::encode):
(JSC::CachedRegExp::decode const):
(JSC::CachedTemplateObjectDescriptor::encode):
(JSC::CachedTemplateObjectDescriptor::decode const):
(JSC::CachedBigInt::encode):
(JSC::CachedBigInt::decode const):
(JSC::CachedJSValue::encode):
(JSC::CachedJSValue::decode const):
(JSC::CachedInstructionStream::encode):
(JSC::CachedInstructionStream::decode const):
(JSC::CachedMetadataTable::encode):
(JSC::CachedMetadataTable::decode const):
(JSC::CachedSourceOrigin::encode):
(JSC::CachedSourceOrigin::decode const):
(JSC::CachedTextPosition::encode):
(JSC::CachedTextPosition::decode const):
(JSC::CachedSourceProviderShape::encode):
(JSC::CachedSourceProviderShape::decode const):
(JSC::CachedStringSourceProvider::encode):
(JSC::CachedStringSourceProvider::decode const):
(JSC::CachedWebAssemblySourceProvider::encode):
(JSC::CachedWebAssemblySourceProvider::decode const):
(JSC::CachedSourceProvider::encode):
(JSC::CachedSourceProvider::decode const):
(JSC::CachedUnlinkedSourceCodeShape::encode):
(JSC::CachedUnlinkedSourceCodeShape::decode const):
(JSC::CachedSourceCode::encode):
(JSC::CachedSourceCode::decode const):
(JSC::CachedFunctionExecutable::firstLineOffset const):
(JSC::CachedFunctionExecutable::lineCount const):
(JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const):
(JSC::CachedFunctionExecutable::unlinkedBodyStartColumn const):
(JSC::CachedFunctionExecutable::unlinkedBodyEndColumn const):
(JSC::CachedFunctionExecutable::startOffset const):
(JSC::CachedFunctionExecutable::sourceLength const):
(JSC::CachedFunctionExecutable::parametersStartOffset const):
(JSC::CachedFunctionExecutable::typeProfilingStartOffset const):
(JSC::CachedFunctionExecutable::typeProfilingEndOffset const):
(JSC::CachedFunctionExecutable::parameterCount const):
(JSC::CachedFunctionExecutable::features const):
(JSC::CachedFunctionExecutable::sourceParseMode const):
(JSC::CachedFunctionExecutable::isInStrictContext const):
(JSC::CachedFunctionExecutable::hasCapturedVariables const):
(JSC::CachedFunctionExecutable::isBuiltinFunction const):
(JSC::CachedFunctionExecutable::isBuiltinDefaultClassConstructor const):
(JSC::CachedFunctionExecutable::constructAbility const):
(JSC::CachedFunctionExecutable::constructorKind const):
(JSC::CachedFunctionExecutable::functionMode const):
(JSC::CachedFunctionExecutable::scriptMode const):
(JSC::CachedFunctionExecutable::superBinding const):
(JSC::CachedFunctionExecutable::derivedContextType const):
(JSC::CachedFunctionExecutable::name const):
(JSC::CachedFunctionExecutable::ecmaName const):
(JSC::CachedFunctionExecutable::inferredName const):
(JSC::CachedCodeBlock::instructions const):
(JSC::CachedCodeBlock::thisRegister const):
(JSC::CachedCodeBlock::scopeRegister const):
(JSC::CachedCodeBlock::globalObjectRegister const):
(JSC::CachedCodeBlock::sourceURLDirective const):
(JSC::CachedCodeBlock::sourceMappingURLDirective const):
(JSC::CachedCodeBlock::usesEval const):
(JSC::CachedCodeBlock::isStrictMode const):
(JSC::CachedCodeBlock::isConstructor const):
(JSC::CachedCodeBlock::hasCapturedVariables const):
(JSC::CachedCodeBlock::isBuiltinFunction const):
(JSC::CachedCodeBlock::superBinding const):
(JSC::CachedCodeBlock::scriptMode const):
(JSC::CachedCodeBlock::isArrowFunctionContext const):
(JSC::CachedCodeBlock::isClassContext const):
(JSC::CachedCodeBlock::wasCompiledWithDebuggingOpcodes const):
(JSC::CachedCodeBlock::constructorKind const):
(JSC::CachedCodeBlock::derivedContextType const):
(JSC::CachedCodeBlock::evalContextType const):
(JSC::CachedCodeBlock::hasTailCalls const):
(JSC::CachedCodeBlock::lineCount const):
(JSC::CachedCodeBlock::endColumn const):
(JSC::CachedCodeBlock::numVars const):
(JSC::CachedCodeBlock::numCalleeLocals const):
(JSC::CachedCodeBlock::numParameters const):
(JSC::CachedCodeBlock::features const):
(JSC::CachedCodeBlock::parseMode const):
(JSC::CachedCodeBlock::codeType const):
(JSC::CachedCodeBlock::rareData const):
(JSC::CachedProgramCodeBlock::encode):
(JSC::CachedProgramCodeBlock::decode const):
(JSC::CachedModuleCodeBlock::encode):
(JSC::CachedModuleCodeBlock::decode const):
(JSC::CachedEvalCodeBlock::encode):
(JSC::CachedEvalCodeBlock::decode const):
(JSC::CachedFunctionCodeBlock::encode):
(JSC::CachedFunctionCodeBlock::decode const):
(JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::decode const):
(JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock):
(JSC::UnlinkedModuleProgramCodeBlock::UnlinkedModuleProgramCodeBlock):
(JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock):
(JSC::CachedFunctionExecutable::encode):
(JSC::CachedFunctionExecutable::decode const):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedSourceCodeKey::encode):
(JSC::CachedSourceCodeKey::decode const):
(JSC::CacheEntry::encode):
(JSC::CacheEntry:: const):
(JSC:: const):
(JSC::encodeCodeBlock):
(JSC::decodeCodeBlockImpl):

  • runtime/CachedTypes.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedGlobalCodeBlock.h.

(JSC::decodeCodeBlock):

  • runtime/CodeCache.cpp:

(JSC::CodeCacheMap::pruneSlowCase):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
(JSC::CodeCache::write):

  • runtime/CodeCache.h:

(JSC::CodeCacheMap::begin):
(JSC::CodeCacheMap::end):
(JSC::CodeCacheMap::fetchFromDiskImpl):
(JSC::CodeCacheMap::findCacheAndUpdateAge):
(JSC::writeCodeBlock):

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

(JSC::recomputeDependentOptions):

  • runtime/RegExp.h:
  • runtime/ScopedArgumentsTable.h:
  • runtime/StackFrame.h:
  • runtime/StructureInlines.h:
  • runtime/SymbolTable.h:

Source/WTF:

BitVectors have to be friends with JSC::CacheBitVector to allow
serializing its buffer as part of the bytecode cache encoding.

  • wtf/BitVector.h:

Tools:

Add test helper to execute bytecode-cache tests: it executes each test
twice, the first with JSC_diskCachePath set to a temporary directory
and second with JSC_forceDiskCache=true (in addition to the cache path)
to guarantee that only the disk cache is being used and no new
UnlinkedCodeBlocks are being created.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh: Added.
  • Scripts/run-jsc-stress-tests:
9:48 AM Changeset in webkit [240254] by commit-queue@webkit.org
  • 23 edits
    3 adds in trunk

[JSC] Invalidate old scope operations using global lexical binding epoch
https://bugs.webkit.org/show_bug.cgi?id=193603
<rdar://problem/47380869>

Patch by Yusuke Suzuki <ysuzuki@apple.com> on 2019-01-22
Reviewed by Saam Barati.

JSTests:

  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js:
  • stress/scope-operation-cache-global-property-before-deleting.js: Added.

(shouldThrow):
(bar):

  • stress/scope-operation-cache-global-property-bump-counter.js: Added.

(shouldBe):
(get1):
(get2):
(get1If):
(get2If):

  • stress/scope-operation-cache-global-property-even-if-it-fails.js: Added.

(shouldThrow):
(foo):

Source/JavaScriptCore:

Even if the global lexical binding does not shadow the global property at that time, we need to clear the cached information in
scope related operations since we may have a global property previously. Consider the following example,

foo = 0;
function get() { return foo; }
print(get()); 0
print(get());
0
delete globalThis.foo;
$.evalScript(const foo = 42;);
print(get()); Should be 42, but it returns 0 if the cached information in get() is not cleared.

To invalidate the cache easily, we introduce global lexical binding epoch. It is bumped every time we introduce a new lexical binding
into JSGlobalLexicalEnvironment, since that name could shadow the global property name previously. In op_resolve_scope, we first check
the epoch stored in the metadata, and go to slow path if it is not equal to the current epoch. Our slow path code convert the scope
operation to the appropriate one even if the resolve type is not UnresolvedProperty type. After updating the resolve type of the bytecode,
we update the cached epoch to the current one, so that we can use the cached information as long as we stay in the same epoch.

In op_get_from_scope and op_put_to_scope, we do not use this epoch since Structure check can do the same thing instead. If op_resolve_type
is updated by the epoch, and if it starts returning JSGlobalLexicalEnvironment instead JSGlobalObject, obviously the structure check fails.
And in the slow path, we update op_get_from_scope and op_put_to_scope appropriately.

So, the metadata for scope related bytecodes are eventually updated to the appropriate one. In DFG and FTL, we use the watchpoint based approach.
In DFG and FTL, we concurrently attempt to get the watchpoint for the lexical binding and look into it by using isStillValid() to avoid
infinite compile-and-fail loop.

When the global lexical binding epoch overflows we iterate all the live CodeBlock and update the op_resolve_scope's epoch. Even if the shadowing
happens, it is OK if we bump the epoch, since op_resolve_scope will return JSGlobalLexicalEnvironment instead of JSGlobalObject, and following
structure check in op_put_to_scope and op_get_from_scope fail. We do not need to update op_get_from_scope and op_put_to_scope because of the same
reason.

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::notifyLexicalBindingShadowing): Deleted.

  • bytecode/CodeBlock.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGDesiredGlobalProperties.cpp:

(JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread):

  • dfg/DFGDesiredGlobalProperties.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::watchGlobalProperty):

  • dfg/DFGGraph.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::isStillValidOnMainThread):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::bumpGlobalLexicalBindingEpoch):
(JSC::JSGlobalObject::getReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::notifyLexicalBindingShadowing): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::globalLexicalBindingEpoch const):
(JSC::JSGlobalObject::globalLexicalBindingEpochOffset):
(JSC::JSGlobalObject::addressOfGlobalLexicalBindingEpoch):

  • runtime/Options.cpp:

(JSC::correctOptions):
(JSC::Options::initialize):
(JSC::Options::setOptions):
(JSC::Options::setOptionWithoutAlias):

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

(JSC::ProgramExecutable::initializeGlobalProperties):

9:25 AM Changeset in webkit [240253] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Floats] Decouple clearance computation and margin collapsing reset.
https://bugs.webkit.org/show_bug.cgi?id=193670

Reviewed by Antti Koivisto.

Move margin collapsing reset logic from FloatingContext to BlockFormattingContext. It's the BlockFormattingContext's job to do.
This is also in preparation for adding clear to static position.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::mapTopToAncestor):
(WebCore::Layout::FormattingContext::mapTopLeftToAncestor): Deleted.

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

(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/floats/FloatingContext.h:
8:59 AM Changeset in webkit [240252] by fred.wang@free.fr
  • 2 edits in trunk/Source/WebCore

Minor refactoring of the scrolling code
https://bugs.webkit.org/show_bug.cgi?id=192398

Unreviewed build fix.

Patch by Frederic Wang <fwang@igalia.com> on 2019-01-22

  • page/scrolling/ScrollingTreeScrollingNode.cpp: Add missing header.
1:52 AM Changeset in webkit [240251] by commit-queue@webkit.org
  • 43 edits
    4 adds in trunk

[css-logical] Implement flow-relative margin, padding and border shorthands
https://bugs.webkit.org/show_bug.cgi?id=188697

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-22
Reviewed by Simon Fraser and Antti Koivisto.

LayoutTests/imported/w3c:

Import tests from the WPT test suite for CSS Logical Properties and Values,
and enable the CSSLogicalEnabled runtime flag for them.

They still have some failures because sideways writing modes have not been
implemented yet (https://bugs.webkit.org/show_bug.cgi?id=166941).

  • web-platform-tests/css/css-logical/logical-box-border-color-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-color.html:
  • web-platform-tests/css/css-logical/logical-box-border-shorthands-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-shorthands.html:
  • web-platform-tests/css/css-logical/logical-box-border-style-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-style.html:
  • web-platform-tests/css/css-logical/logical-box-border-width-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-width.html:
  • web-platform-tests/css/css-logical/logical-box-inset-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-inset.html:
  • web-platform-tests/css/css-logical/logical-box-margin-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-margin.html:
  • web-platform-tests/css/css-logical/logical-box-padding-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-padding.html:
  • web-platform-tests/css/css-logical/logical-box-size.html:
  • web-platform-tests/css/css-logical/resources/test-box-properties.js:

(export.createBoxPropertyGroup):
(export.createSizingPropertyGroup):
(export.runTests.set test):
(export.runTests):

  • web-platform-tests/css/css-logical/resources/test-shared.js: Added.

(export.testCSSValues):
(export.testComputedValues):
(export.makeDeclaration):

  • web-platform-tests/css/css-logical/resources/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color.html

imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
webexposed/css-properties-behind-flags.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
Allow the new properties to serialize their computed value.

(WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor2SidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor4SidesShorthand):

  • css/CSSComputedStyleDeclaration.h:

Rename getCSSPropertyValuesForSidesShorthand to getCSSPropertyValuesFor4SidesShorthand,
and add analogous getCSSPropertyValuesFor2SidesShorthand for serializing 2-sided
shorthands.

  • css/CSSProperties.json:

Add the new properties behind the CSSLogicalEnabled runtime flag.

  • css/CSSStyleDeclaration.cpp:

(WebCore::CSSStyleDeclaration::supportedPropertyNames const):
Prevent CSS properties disabled behind a runtime flag from being exposed in
style declarations.

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
Allow the new properties to serialize their specified value.

(WebCore::StyleProperties::get2Values const):
Add get2Values, analogous to get4Values, for serializing 2-sided shorthands.

(WebCore::StyleProperties::borderPropertyValue const):
Allow borderPropertyValue to serialize arbitrary multi-sided border shorthands
corresponding to width, style and color.

(WebCore::MutableStyleProperties::setProperty):
Prevent CSS properties disabled behind a runtime flag from being set a value.

(WebCore::StyleProperties::asText const):
Allow the new properties to be serialized in cssText.
Prevent CSS shorthands disabled behind a runtime flag from appearing in cssText,
and serialize the longhands instead. Note that there could be another shorthand
available which is enabled, but a proper solution would require bug 190496.

  • css/StyleProperties.h:

Update declarations of borderPropertyValue and get2Values.

  • css/makeprop.pl:

(addProperty):
Add isEnabledCSSProperty function for checking that a CSS property is not
disabled behind a runtime flag.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::cssPropertyID):
Prevent CSS properties disabled behind a runtime flag from being exposed in
computed styles.

(WebCore::CSSPropertyParser::addProperty):
Prevent CSS properties disabled behind a runtime flag from being set a value.

(WebCore::CSSPropertyParser::consumeBorder):
Change consumeBorder to provide the caller with the parsed values instead of
setting properties. Then the caller can decide to which properties the values
should be set, and whether border-image should be reset or not.

(WebCore::CSSPropertyParser::consume2ValueShorthand):
(WebCore::CSSPropertyParser::consume4ValueShorthand):
Rename consume4Values to consume4ValueShorthand, and add analogous
consume2ValueShorthand for parsing shorthands with two longhands.

(WebCore::CSSPropertyParser::parseShorthand):
Allow the new properties to be parsed.

  • css/parser/CSSPropertyParser.h:

Update declarations of consumeBorder, consume2ValueShorthand and
consume4ValueShorthand.

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
Prevent CSS properties disabled behind a runtime flag from being exposed in
the CSS inspector tool.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCSSLogicalEnabled):
(WebCore::RuntimeEnabledFeatures::cssLogicalEnabled const):
Add the CSSLogicalEnabled runtime flag.

Source/WebKit:

Add a CSSLogicalEnabled runtime flag.

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

Add CSSLogicalEnabled runtime flag.

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

(+[WebPreferences initialize]):
(-[WebPreferences cssLogicalEnabled]):
(-[WebPreferences setCSSLogicalEnabled:]):

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

(-[WebView _preferencesChanged:]):

Tools:

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

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

(setWebPreferencesForTestOptions):
Allow tests to enable the CSSLogicalEnabled flag in WK1.

  • Scripts/webkitpy/style/checkers/jsonchecker.py:

(JSONCSSPropertiesChecker.check_codegen_properties):
Allow CSS property definitions to have a 'runtime-flag' parameter which
disables the property when the specified runtime flag is disabled.

LayoutTests:

Add tests checking that CSS properties disabled behind runtime flags
are not exposed.

  • webexposed/css-properties-behind-flags-expected.txt: Added.
  • webexposed/css-properties-behind-flags.html: Added.
1:07 AM Changeset in webkit [240250] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Enable CSSOMViewScrollingAPI
https://bugs.webkit.org/show_bug.cgi?id=189472

Patch by Frederic Wang <fwang@igalia.com> on 2019-01-22
Reviewed by Simon Fraser.

This patch enables the CSSOMViewScrollingAPI option by default. This feature has already been
enabled in tests since r235855. Basically, this change fixes an old compatibility issue
regarding which scrolling element correspond to the viewport in standard mode (WebKit uses
document.body while Gecko/Edge/Chromium use document.documentElement as described in the
CSSOM View specification). WebKit developers writing tests can use document.scrollingElement
for that purpose, so that they work independently of whether the option is enabled.

[1] https://lists.webkit.org/pipermail/webkit-dev/2018-January/029857.html

  • Shared/WebPreferences.yaml: Enable by default and remove "experimental" category in

accordance with the new policy. Instead, keep an internal flag only for developers.

Jan 21, 2019:

10:50 PM Changeset in webkit [240249] by Antti Koivisto
  • 7 edits
    2 adds in trunk

[iOS] Handle hit testing for subframes
https://bugs.webkit.org/show_bug.cgi?id=192303

Reviewed by Frédéric Wang.

Source/WebCore:

Don't set delegatesScrolling bit for subframes on iOS. It is meant for top level application
controlled scrolling. This fixes coordinate conversions for subframes and makes events work.

Test by Frederic Wang.

Test: fast/scrolling/ios/hit-testing-iframe.html

  • platform/ScrollView.cpp:

(WebCore::ScrollView::managesScrollbars const):

Add a function that tells if the scrollview should deal with scrollbars at all
This is always false on iOS and not connected to delegatesScrolling bit.

(WebCore::ScrollView::updateScrollbars):

  • platform/ScrollView.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):

Only set delegatesScrolling for the main frame.

LayoutTests:

Test by Frederic Wang.

  • fast/scrolling/ios/hit-testing-iframe-expected.html: Added.
  • fast/scrolling/ios/hit-testing-iframe.html: Added.
9:28 PM Changeset in webkit [240248] by yusukesuzuki@slowstart.org
  • 23 edits
    3 deletes in trunk

Unreviewed, roll out r240220 due to date-format-xparb regression
https://bugs.webkit.org/show_bug.cgi?id=193603

JSTests:

  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js:
  • stress/scope-operation-cache-global-property-before-deleting.js: Removed.
  • stress/scope-operation-cache-global-property-bump-counter.js: Removed.
  • stress/scope-operation-cache-global-property-even-if-it-fails.js: Removed.

Source/JavaScriptCore:

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::notifyLexicalBindingShadowing):
(JSC::CodeBlock::notifyLexicalBindingUpdate): Deleted.

  • bytecode/CodeBlock.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGDesiredGlobalProperties.cpp:

(JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread):

  • dfg/DFGDesiredGlobalProperties.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::watchGlobalProperty): Deleted.

  • dfg/DFGGraph.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::isStillValidOnMainThread):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::notifyLexicalBindingShadowing):
(JSC::JSGlobalObject::getReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::bumpGlobalLexicalBindingEpoch): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::globalLexicalBindingEpoch const): Deleted.
(JSC::JSGlobalObject::globalLexicalBindingEpochOffset): Deleted.
(JSC::JSGlobalObject::addressOfGlobalLexicalBindingEpoch): Deleted.

  • runtime/Options.cpp:

(JSC::Options::initialize):
(JSC::Options::setOptions):
(JSC::Options::setOptionWithoutAlias):
(JSC::correctOptions): Deleted.

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

(JSC::ProgramExecutable::initializeGlobalProperties):

5:55 PM Changeset in webkit [240247] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Unreviewed test fix after r240243
Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
<rdar://problem/47433602>

The new ResourceLoadStatistics section of 'removeData' was incrementing the
pending callback count before deciding whether to send a message to delete
data. This left the count out-of-balance leading to the operation never
completing.

This patch also prevents sending a second message to the NetworkProcess
requesting data be deleted if the message was already sent in an earlier
section of the method (e.g., as typically happens when all website data
is being deleted).

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

5:30 PM Changeset in webkit [240246] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] StrictModeTypeErrorFunction is no longer used
https://bugs.webkit.org/show_bug.cgi?id=193662

Patch by Yusuke Suzuki <ysuzuki@apple.com> on 2019-01-21
Reviewed by Mark Lam.

StrictModeTypeErrorFunction is no longer used. This patch drops it. Furthermore, it also allows us to drop
strictModeTypeErrorFunctionSpace from VM.

  • runtime/Error.cpp:

(JSC::StrictModeTypeErrorFunction::destroy): Deleted.

  • runtime/Error.h:

(): Deleted.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
5:18 PM Changeset in webkit [240245] by Fujii Hironori
  • 3 edits in trunk/Tools

[GTK][WPE] libgcrypt-1.7.6 can't be compiled on Ubuntu 18.10
https://bugs.webkit.org/show_bug.cgi?id=193643

Reviewed by Michael Catanzaro.

  • gtk/jhbuild.modules: Bumped to libgcrypt-1.8.4.
  • wpe/jhbuild.modules: Ditto.
3:57 PM Changeset in webkit [240244] by Caio Lima
  • 3 edits
    1 add in trunk

DoesGC rule is wrong for nodes with BigIntUse
https://bugs.webkit.org/show_bug.cgi?id=193652

Reviewed by Saam Barati.

JSTests:

  • stress/big-int-value-op-update-gc-rules.js: Added.

(assert):
(doesGCAdd):
(doesGCSub):
(doesGCDiv):
(doesGCMul):
(doesGCBitAnd):
(doesGCBitOr):
(doesGCBitXor):

Source/JavaScriptCore:

Former rule was that ValueOp does not GC. However this is wrong, since
these operations can trigger GC and mess up memory management. In the end, this
will generate wrong code because we will have wrong GC epoch value during
Store Barrier Insertion phase.
We changed this to consider BigIntUse for such nodes and properly return true when
they are BigIntUse.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

2:28 PM Changeset in webkit [240243] by Brent Fulgham
  • 39 edits in trunk/Source

Implement message handlers for NetworkProcess-based ResourceLoadStatistics
https://bugs.webkit.org/show_bug.cgi?id=193556
<rdar://problem/47368501>

Reviewed by Alex Christensen.

Source/WebCore:

This patch adds a new observer callback used to message the NetworkProcess when
user interaction events are received. This is needed when the ResourceLoadStatistics
data is not being managed by the UIProcess.

Tested by existing ResourceLoadStatistics and storageAccess tests.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setLogUserInteractionNotificationCallback):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

  • loader/ResourceLoadObserver.h:
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::setCookiesFromDOM):

Source/WebKit:

This patch adds a number of sibling methods for tracking ResourceLoadStatistics when the
observations are being handled in the NetworkProcess, rather than the UIProcess. The
original versions of these methods will be removed as part of Bug 193303.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords):
(WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:

(WebKit::ResourceLoadStatisticsMemoryStore::store const):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
(WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing):
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setLastSeen):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder):
(WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder):
(WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
(WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
(WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
(WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
(WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):

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

(WebKit::submitTopList):
(WebKit::submitTopLists):
(WebKit::notifyPages):
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
(WebKit::nonEphemeralWebPageProxy): Deleted.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::logUserInteraction):

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

(WebKit::NetworkProcess::dumpResourceLoadStatistics):
(WebKit::NetworkProcess::isGrandfathered):
(WebKit::NetworkProcess::isPrevalentResource):
(WebKit::NetworkProcess::isVeryPrevalentResource):
(WebKit::NetworkProcess::setGrandfathered):
(WebKit::NetworkProcess::setPrevalentResource):
(WebKit::NetworkProcess::setPrevalentResourceForDebugMode):
(WebKit::NetworkProcess::setVeryPrevalentResource):
(WebKit::NetworkProcess::clearPrevalentResource):
(WebKit::NetworkProcess::submitTelemetry):
(WebKit::NetworkProcess::scheduleCookieBlockingUpdate):
(WebKit::NetworkProcess::scheduleClearInMemoryAndPersistent):
(WebKit::NetworkProcess::resetParametersToDefaultValues):
(WebKit::NetworkProcess::scheduleStatisticsAndDataRecordsProcessing):
(WebKit::NetworkProcess::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::NetworkProcess::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::NetworkProcess::setSubframeUnderTopFrameOrigin):
(WebKit::NetworkProcess::isRegisteredAsRedirectingTo):
(WebKit::NetworkProcess::isRegisteredAsSubFrameUnder):
(WebKit::NetworkProcess::setSubresourceUnderTopFrameOrigin):
(WebKit::NetworkProcess::setSubresourceUniqueRedirectTo):
(WebKit::NetworkProcess::setSubresourceUniqueRedirectFrom):
(WebKit::NetworkProcess::isRegisteredAsSubresourceUnder):
(WebKit::NetworkProcess::setTopFrameUniqueRedirectTo):
(WebKit::NetworkProcess::setTopFrameUniqueRedirectFrom):
(WebKit::NetworkProcess::setLastSeen):
(WebKit::NetworkProcess::hasStorageAccess):
(WebKit::NetworkProcess::requestStorageAccess):
(WebKit::NetworkProcess::grantStorageAccess):
(WebKit::NetworkProcess::logUserInteraction):
(WebKit::NetworkProcess::hadUserInteraction):
(WebKit::NetworkProcess::clearUserInteraction):
(WebKit::NetworkProcess::setGrandfatheringTime):
(WebKit::NetworkProcess::setMaxStatisticsEntries):
(WebKit::NetworkProcess::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::NetworkProcess::setPruneEntriesDownTo):
(WebKit::NetworkProcess::setTimeToLiveUserInteraction):
(WebKit::NetworkProcess::setShouldClassifyResourcesBeforeDataRecordsRemoval):
(WebKit::NetworkProcess::setResourceLoadStatisticsEnabled):
(WebKit::NetworkProcess::setResourceLoadStatisticsDebugMode):
(WebKit::NetworkProcess::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::filterForTopLevelDomains):
(WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
(WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData):

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

(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
(WebKit::NetworkSession::notifyResourceLoadStatisticsProcessed):
(WebKit::NetworkSession::logDiagnosticMessageWithValue):
(WebKit::NetworkSession::notifyPageStatisticsTelemetryFinished):
(WebKit::NetworkSession::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
(WebKit::NetworkSession::topPrivatelyControlledDomainsWithWebsiteData):
(WebKit::NetworkSession::enableResourceLoadStatistics): Deleted.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
(WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
(WKWebsiteDataStoreSetStatisticsLastSeen):
(WKWebsiteDataStoreSetStatisticsPrevalentResource):
(WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreDumpResourceLoadStatistics):
(WKWebsiteDataStoreIsStatisticsPrevalentResource):
(WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
(WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreSetStatisticsGrandfathered):
(WKWebsiteDataStoreIsStatisticsGrandfathered):
(WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
(WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
(WKWebsiteDataStoreStatisticsUpdateCookieBlocking):
(WKWebsiteDataStoreStatisticsSubmitTelemetry):
(WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned):
(WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured):
(WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
(WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
(WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::clearCallbackStates):
(WebKit::NetworkProcessProxy::didClose):
(WebKit::nonEphemeralWebPageProxy):
(WebKit::NetworkProcessProxy::logGlobalDiagnosticMessageWithValue):
(WebKit::NetworkProcessProxy::dumpResourceLoadStatistics):
(WebKit::NetworkProcessProxy::didDumpResourceLoadStatistics):
(WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcessProxy::didUpdateBlockCookies):
(WebKit::NetworkProcessProxy::isPrevalentResource):
(WebKit::NetworkProcessProxy::isPrevalentResourceResult):
(WebKit::NetworkProcessProxy::isVeryPrevalentResource):
(WebKit::NetworkProcessProxy::setPrevalentResource):
(WebKit::NetworkProcessProxy::setPrevalentResourceForDebugMode):
(WebKit::NetworkProcessProxy::setVeryPrevalentResource):
(WebKit::NetworkProcessProxy::didSetResourceLoadStatisticData):
(WebKit::NetworkProcessProxy::setLastSeen):
(WebKit::NetworkProcessProxy::clearPrevalentResource):
(WebKit::NetworkProcessProxy::scheduleCookieBlockingUpdate):
(WebKit::NetworkProcessProxy::didScheduleCookieBlockingUpdate):
(WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent):
(WebKit::NetworkProcessProxy::didScheduleStatisticsProcessing):
(WebKit::NetworkProcessProxy::scheduleStatisticsAndDataRecordsProcessing):
(WebKit::NetworkProcessProxy::logUserInteraction):
(WebKit::NetworkProcessProxy::hasHadUserInteraction):
(WebKit::NetworkProcessProxy::didHaveUserInteraction):
(WebKit::NetworkProcessProxy::clearUserInteraction):
(WebKit::NetworkProcessProxy::setAgeCapForClientSideCookies):
(WebKit::NetworkProcessProxy::didSetAgeCapForClientSideCookies):
(WebKit::NetworkProcessProxy::setTimeToLiveUserInteraction):
(WebKit::NetworkProcessProxy::didUpdateRuntimeSettings):
(WebKit::NetworkProcessProxy::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::NetworkProcessProxy::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::NetworkProcessProxy::setSubframeUnderTopFrameOrigin):
(WebKit::NetworkProcessProxy::isRegisteredAsRedirectingTo):
(WebKit::NetworkProcessProxy::didIsRegisteredAsRedirectingTo):
(WebKit::NetworkProcessProxy::isRegisteredAsSubFrameUnder):
(WebKit::NetworkProcessProxy::didIsRegisteredAsSubFrameUnder):
(WebKit::NetworkProcessProxy::setSubresourceUnderTopFrameOrigin):
(WebKit::NetworkProcessProxy::isRegisteredAsSubresourceUnder):
(WebKit::NetworkProcessProxy::didIsRegisteredAsSubresourceUnder):
(WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectTo):
(WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectFrom):
(WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectTo):
(WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectFrom):
(WebKit::NetworkProcessProxy::isGrandfathered):
(WebKit::NetworkProcessProxy::didIsGrandfathered):
(WebKit::NetworkProcessProxy::setGrandfathered):
(WebKit::NetworkProcessProxy::hasStorageAccess):
(WebKit::NetworkProcessProxy::requestStorageAccess):
(WebKit::NetworkProcessProxy::grantStorageAccess):
(WebKit::NetworkProcessProxy::storageAccessRequestResult):
(WebKit::NetworkProcessProxy::storageAccessOperationResult):
(WebKit::NetworkProcessProxy::didRemoveAllStorageAccess):
(WebKit::NetworkProcessProxy::didSetCacheMaxAgeCapForPrevalentResources):
(WebKit::NetworkProcessProxy::setCacheMaxAgeCap):
(WebKit::NetworkProcessProxy::setGrandfatheringTime):
(WebKit::NetworkProcessProxy::setMaxStatisticsEntries):
(WebKit::NetworkProcessProxy::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::NetworkProcessProxy::setPruneEntriesDownTo):
(WebKit::NetworkProcessProxy::setShouldClassifyResourcesBeforeDataRecordsRemoval):
(WebKit::NetworkProcessProxy::setResourceLoadStatisticsDebugMode):
(WebKit::NetworkProcessProxy::resetParametersToDefaultValues):
(WebKit::NetworkProcessProxy::submitTelemetry):
(WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsProcessed):
(WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):
(WebKit::NetworkProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
(WebKit::NetworkProcessProxy::notifyResourceLoadStatisticsTelemetryFinished):
(WebKit::NetworkProcessProxy::didLogUserInteraction): Deleted.
(WebKit::NetworkProcessProxy::didResetCacheMaxAgeCapForPrevalentResources): Deleted.

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

(WebKit::WebPageProxy::nonEphemeralWebPageProxy):

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

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished):
(WebKit::WebProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setMaxStatisticsEntries):
(WebKit::WebsiteDataStore::setPruneEntriesDownTo):
(WebKit::WebsiteDataStore::setGrandfatheringTime):
(WebKit::WebsiteDataStore::setCacheMaxAgeCap):
(WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
(WebKit::WebsiteDataStore::isPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
(WebKit::WebsiteDataStore::isVeryPrevalentResource):
(WebKit::WebsiteDataStore::setVeryPrevalentResource):
(WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
(WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
(WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
(WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
(WebKit::WebsiteDataStore::clearPrevalentResource):
(WebKit::WebsiteDataStore::resetParametersToDefaultValues):
(WebKit::WebsiteDataStore::submitTelemetry):
(WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
(WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
(WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
(WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::WebsiteDataStore::setAgeCapForClientSideCookies):
(WebKit::WebsiteDataStore::setLastSeen):
(WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler):
(WebKit::WebsiteDataStore::getAllStorageAccessEntries):
(WebKit::WebsiteDataStore::grantStorageAccessHandler):
(WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
(WebKit::WebsiteDataStore::removePrevalentDomains):
(WebKit::WebsiteDataStore::hasStorageAccess):
(WebKit::WebsiteDataStore::requestStorageAccess):
(WebKit::WebsiteDataStore::grantStorageAccess):
(WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
(WebKit::WebsiteDataStore::logUserInteraction):
(WebKit::WebsiteDataStore::hasHadUserInteraction):
(WebKit::WebsiteDataStore::clearUserInteraction):
(WebKit::WebsiteDataStore::isGrandfathered):
(WebKit::WebsiteDataStore::setGrandfathered):
(WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
(WebKit::WebsiteDataStore::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::WebsiteDataStore::webPageWasAdded):
(WebKit::WebsiteDataStore::webPageWasInvalidated):
(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
(WebKit::WebsiteDataStore::webPageWillOpenConnection):
(WebKit::WebsiteDataStore::webPageDidCloseConnection):
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):
(WebKit::WebsiteDataStore::isAssociatedProcessPool const):
(WebKit::WebsiteDataStore::processPools const):
(WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled const):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
(WebKit::WebsiteDataStore::logTestingEvent):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::setStatisticsTestingCallback):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

2:01 PM Changeset in webkit [240242] by yusukesuzuki@slowstart.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Lazily initialize JSModuleLoader
https://bugs.webkit.org/show_bug.cgi?id=193646

Reviewed by Keith Miller and Saam Barati.

Lazily initialize JSModuleLoader so that we do not need to initialize it until we need modules.

  • runtime/JSGlobalObject.cpp:

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

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::moduleLoader const):

12:50 PM Changeset in webkit [240241] by yusukesuzuki@slowstart.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] sub op with 0 should be optimized
https://bugs.webkit.org/show_bug.cgi?id=190751

Reviewed by Mark Lam.

LLInt sometimes emit subp 0, %rxx. For example, maxFrameExtentForSlowPathCall is 0 in X86_64, ARM64, and ARM64E.
So subp maxFrameExtentForSlowPathCall sp becomes subp 0, %rsp. While addp 0, %rsp is removed in offlineasm,
sub operation does not have such an optimization. This patch applies the same optimization to sub operation already
done in add operation. Since the CPU flags changed in offlineasm's these operations are not considered (if these flags
are required, we use special branch operations instead), this optimization is sane.

One problem is that zero-extension of the 32bit register in 64bit architecture. If the instruction emission is skipped,
this won't be happen. Currently, we align our sub to add operation: we skip emission in this case.

  • offlineasm/arm64.rb:
  • offlineasm/x86.rb:
12:15 PM Changeset in webkit [240240] by Alan Bujtas
  • 8 edits
    2 adds in trunk

[LFC][Floats] Take float top position into account when computing containing block height.
https://bugs.webkit.org/show_bug.cgi?id=193655

Reviewed by Antti Koivisto.

Source/WebCore:

When computing the containing block height, we take the first in-flow child's top position and use it as the base position.
However when the first in-flow child clears a previous sibling, its vertical position is not necessarily the correct base for
computing the containing block's height. Let's take the relevant floats into account as well.

Test: fast/block/float/float-first-child-and-clear-sibling.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::contentHeightForFormattingContextRoot):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::top const):

  • layout/floats/FloatingState.h:

Tools:

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

LayoutTests:

  • fast/block/float/float-first-child-and-clear-sibling-expected.html: Added.
  • fast/block/float/float-first-child-and-clear-sibling.html: Added.
11:51 AM Changeset in webkit [240239] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r240237): Revert changes to WebCore Xcode project

  • WebCore.xcodeproj/project.pbxproj: Revert changes that were

fixed in r240135. Darin's patch must have been made prior to
r240135.

11:23 AM Changeset in webkit [240238] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r240201): Add a POINTER_EVENTS feature flag
https://bugs.webkit.org/show_bug.cgi?id=193577
<rdar://problem/47408511>

  • dom/ios/PointerEventIOS.cpp: Add ENABLE(POINTER_EVENTS) macro

to fix tvOS & watchOS builds.

11:01 AM Changeset in webkit [240237] by Darin Adler
  • 117 edits in trunk/Source

Use references rather than pointers for register/unregister functions, and more
https://bugs.webkit.org/show_bug.cgi?id=175028

Reviewed by Daniel Bates.

Source/WebCore:

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::begin): Pass a reference.
(WebCore::ApplePaySession::completePayment): Ditto.
(WebCore::ApplePaySession::didReachFinalState): Ditto.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::retrieveRecords): Ditto.
(WebCore::DOMCache::batchDeleteOperation): Ditto.
(WebCore::DOMCache::batchPutOperation): Ditto.

  • Modules/cache/DOMCacheStorage.cpp:

(WebCore::DOMCacheStorage::match): Ditto.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::loadBlob): Ditto.
(WebCore::FetchBodyOwner::finishBlobLoading): Ditto.

  • Modules/fetch/FetchBodySource.cpp:

(WebCore::FetchBodySource::setActive): Ditto.
(WebCore::FetchBodySource::setInactive): Ditto.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::BodyLoader): Ditto.
(WebCore::FetchResponse::BodyLoader::~BodyLoader): Ditto.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::addedToRegistry): Ditto.
(WebCore::MediaSource::removedFromRegistry): Ditto.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::~MediaStream): Ditto.
(WebCore::MediaStream::startProducingData): Ditto.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::MediaStreamTrack): Ditto.
(WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create): Ditto.
(WebCore::RTCDataChannel::close): Ditto.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::create): Use auto.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::show): Pass a reference.
(WebCore::Notification::finalize): Ditto.

  • Modules/webaudio/AudioBasicInspectorNode.cpp:

(WebCore::AudioBasicInspectorNode::updatePullStatus): Ditto.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::constructCommon): Ditto.
(WebCore::AudioContext::lazyInitialize): Ditto.
(WebCore::AudioContext::clear): Ditto.
(WebCore::AudioContext::uninitialize): Ditto.
(WebCore::AudioContext::markForDeletion): Take a reference.
(WebCore::AudioContext::addAutomaticPullNode): Ditto.
(WebCore::AudioContext::removeAutomaticPullNode): Ditto.
(WebCore::AudioContext::willBeginPlayback): Pass a reference.
(WebCore::AudioContext::willPausePlayback): Ditto.

  • Modules/webaudio/AudioContext.h: Update above functions to take

references rather than pointers.

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::finishDeref): Pass a reference.

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Ditto.
(WebCore::WebSocket::stop): Ditto.
(WebCore::WebSocket::didClose): Ditto.

  • WebCore.xcodeproj/project.pbxproj: Allowed Xcode to update this file.
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::moduleLoaderResolve): Update since
moduleLoader is now a reference.
(WebCore::JSDOMWindowBase::moduleLoaderFetch): Ditto.
(WebCore::JSDOMWindowBase::moduleLoaderEvaluate): Ditto.
(WebCore::JSDOMWindowBase::moduleLoaderImportModule): Ditto.
(WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties): Ditto.

  • dom/ActiveDOMObject.h:

(WebCore::ActiveDOMObject::setPendingActivity): Take a reference.
(WebCore::ActiveDOMObject::unsetPendingActivity): Ditto.

  • dom/CharacterData.cpp:

(WebCore::CharacterData::setData): Pass a reference.
(WebCore::CharacterData::insertData): Ditto.
(WebCore::CharacterData::deleteData): Ditto.
(WebCore::CharacterData::replaceData): Ditto.

  • dom/Document.cpp:

(WebCore::Document::getElementByAccessKey): Pass a reference.
(WebCore::Document::buildAccessKeyMap): Take a reference.
(WebCore::Document::registerForVisibilityStateChangedCallbacks): Ditto.
(WebCore::Document::unregisterForVisibilityStateChangedCallbacks): Ditto.
(WebCore::Document::addAudioProducer): Ditto.
(WebCore::Document::removeAudioProducer): Ditto.
(WebCore::Document::hoveredElementDidDetach): Ditto.
(WebCore::Document::elementInActiveChainDidDetach): Ditto.
(WebCore::Document::attachNodeIterator): Ditto.
(WebCore::Document::detachNodeIterator): Ditto.
(WebCore::Document::moveNodeIteratorsToNewDocumentSlowCase): Pass
a reference.
(WebCore::Document::nodeChildrenWillBeRemoved): Ditto.
(WebCore::Document::nodeWillBeRemoved): Ditto.
(WebCore::Document::textInserted): Take a reference.
(WebCore::Document::textRemoved): Ditto.
(WebCore::Document::textNodesMerged): Ditto.
(WebCore::Document::textNodeSplit): Ditto.
(WebCore::Document::takeDOMWindowFrom): Ditto.
(WebCore::Document::registerForDocumentSuspensionCallbacks): Ditto.
(WebCore::Document::unregisterForDocumentSuspensionCallbacks): Ditto.
(WebCore::Document::registerForMediaVolumeCallbacks): Ditto.
(WebCore::Document::unregisterForMediaVolumeCallbacks): Ditto.
(WebCore::Document::registerForPrivateBrowsingStateChangedCallbacks): Ditto.
(WebCore::Document::unregisterForPrivateBrowsingStateChangedCallbacks): Ditto.
(WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::Document::registerForPageScaleFactorChangedCallbacks): Ditto.
(WebCore::Document::unregisterForPageScaleFactorChangedCallbacks): Ditto.
(WebCore::Document::finishedParsing): Use a reference.
(WebCore::Document::attachRange): Take a reference.
(WebCore::Document::detachRange): Ditto.
(WebCore::Document::suspendScheduledTasks): Use a reference.
(WebCore::Document::resumeScheduledTasks): Ditto.
(WebCore::Document::addMediaCanStartListener): Take a reference.
(WebCore::Document::removeMediaCanStartListener): Ditto.
(WebCore::Document::deviceMotionController const): Return a reference.
(WebCore::Document::deviceOrientationController const): Ditto.
(WebCore::Document::simulateDeviceOrientationChange): Use a reference.
(WebCore::Document::fullScreenIsAllowedForElement const): Take a reference.
(WebCore::Document::requestFullScreenForElement): Pass a reference.
(WebCore::Document::webkitExitFullscreen): Ditto.
(WebCore::Document::webkitWillEnterFullScreen): Renamed to remove the
"ForElement" from the function name. Take a reference rather than a pointer.
(WebCore::Document::webkitDidEnterFullScreen): Renamed to remove the
"ForElement" from the function name and removed the unused element argument.
(WebCore::Document::webkitWillExitFullScreen): Ditto.
(WebCore::Document::webkitDidExitFullScreen): Ditto.
(WebCore::Document::pushFullscreenElementStack): Take a reference.
(WebCore::Document::addDocumentToFullScreenChangeEventQueue): Ditto.
(WebCore::DocumentParserYieldToken::DocumentParserYieldToken): Use a reference.
(WebCore::DocumentParserYieldToken::~DocumentParserYieldToken): Ditto.
(WebCore::Document::updateHoverActiveState): Updated name of isInActiveChain.

  • dom/Document.h: Updated argument types as described above. Changed a couple

of inline functions to return references.

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::addMarker): Take a reference.
(WebCore::DocumentMarkerController::addMarkerToNode): Ditto.
(WebCore::DocumentMarkerController::addTextMatchMarker): Ditto.
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker): Ditto.
(WebCore::DocumentMarkerController::addDictationResultMarker): Ditto.
(WebCore::DocumentMarkerController::addDraggedContentMarker): Ditto.
(WebCore::DocumentMarkerController::removeMarkers): Ditto.
(WebCore::DocumentMarkerController::copyMarkers): Ditto.
(WebCore::DocumentMarkerController::shiftMarkers): Ditto.
(WebCore::DocumentMarkerController::setMarkersActive): DItto.

  • dom/DocumentMarkerController.h: Updated argument types as described above.
  • dom/Element.cpp:

(WebCore::Element::~Element): Pass a reference.
(WebCore::Element::isUserActionElementInActiveChain const): Updated name of
isInActiveChain.
(WebCore::Element::hasEquivalentAttributes const): Take a reference.
(WebCore::Element::removedFromAncestor): Pass a reference.
(WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
Pass a reference and updated name of isInActiveChain.

  • dom/Element.h: Renamed inActiveChain to isInActiveChain, updated argument

types to be references, and removed unneeded friend declaration and made
SynchronizationOfLazyAttribute private.

  • dom/Node.cpp:

(WebCore::Node::normalize): Pass a reference.
(WebCore::Node::isEqualNode const): Ditto.

  • dom/NodeIterator.cpp:

(WebCore::NodeIterator::NodeIterator): Ditto.
(WebCore::NodeIterator::~NodeIterator): Ditto.

  • dom/RadioButtonGroups.cpp:

(WebCore::RadioButtonGroup::add): Take a reference.
(WebCore::RadioButtonGroup::updateCheckedState): Ditto.
(WebCore::RadioButtonGroup::remove): Ditto.
(WebCore::RadioButtonGroup::contains const): Ditto.
(WebCore::RadioButtonGroups::addButton): Ditto.
(WebCore::RadioButtonGroups::updateCheckedState): Ditto.
(WebCore::RadioButtonGroups::hasCheckedButton const): Ditto.
(WebCore::RadioButtonGroups::isInRequiredGroup const): Ditto.
(WebCore::RadioButtonGroups::removeButton): Ditto.

  • dom/RadioButtonGroups.h: Updated argument types.
  • dom/Range.cpp:

(WebCore::Range::Range): Pass a reference.
(WebCore::Range::~Range): Ditto.
(WebCore::Range::setDocument): Ditto.
(WebCore::Range::createContextualFragment): Ditto.
(WebCore::boundaryTextInserted): Ditto.
(WebCore::Range::textInserted): Ditto.
(WebCore::boundaryTextRemoved): Ditto.
(WebCore::Range::textRemoved): Ditto.
(WebCore::boundaryTextNodesSplit): Ditto.
(WebCore::Range::textNodeSplit): Ditto.

  • dom/Range.h: Take references instead of pointers.
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::prepareScript): Use reference.

  • dom/Text.cpp:

(WebCore::Text::splitText): Pass reference.

  • dom/UserActionElementSet.h: Renamed inActiveChain to isInActiveChain to

match the naming scheme of the other similar functions, like isActive.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::applyAlternativeTextToRange):
Pass a reference.
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): Ditto.
(WebCore::AlternativeTextController::handleAlternativeTextUIResult): Ditto.
(WebCore::AlternativeTextController::respondToUnappliedEditing): Ditto.
(WebCore::AlternativeTextController::markReversed): Ditto.
(WebCore::AlternativeTextController::markCorrection): Ditto.
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection): Ditto.
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand): Ditto.

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers): Ditto.

  • editing/DictationCommand.cpp: Ditto.
  • editing/Editing.cpp:

(WebCore::areIdenticalElements): Ditto.

  • editing/Editor.cpp:

(WebCore::Editor::ignoreSpelling): Ditto.
(WebCore::Editor::learnSpelling): Ditto.
(WebCore::Editor::advanceToNextMisspelling): Ditto.
(WebCore::Editor::clearMisspellingsAndBadGrammar): Ditto.
(WebCore::Editor::markMisspellingsAfterTypingToWord): Ditto.
(WebCore::Editor::markAndReplaceFor): Ditto.
(WebCore::Editor::changeBackToReplacedString): Ditto.
(WebCore::Editor::updateMarkersForWordsAffectedByEditing): Ditto.
(WebCore::Editor::countMatchesForText): Ditto.
(WebCore::Editor::scanRangeForTelephoneNumbers): Ditto.
(WebCore::Editor::editorUIUpdateTimerFired): Ditto.
(WebCore::Editor::handleAcceptedCandidate): Ditto.

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::doApply): Pass a reference.

  • editing/InsertTextCommand.h: Take a reference.
  • editing/SpellChecker.cpp:

(WebCore::SpellChecker::didCheckSucceed): Pass a reference.

  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::doApply): Ditto.
(WebCore::SplitTextNodeCommand::doUnapply): Ditto.

  • editing/TextCheckingHelper.cpp:

(WebCore::TextCheckingHelper::findFirstMisspelling): Pass a reference.
(WebCore::TextCheckingHelper::findFirstGrammarDetail const): Ditto.

  • editing/ios/DictationCommandIOS.cpp:

(WebCore::DictationCommandIOS::doApply): Ditto.
Also added a comment about a possible missing null check; behavior should
be no different than before, but using a reference helps make clear there
was never any null check.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto.

  • fileapi/FileReader.cpp:

(WebCore::FileReader::readInternal): Ditto.
(WebCore::FileReader::abort): Ditto.
(WebCore::FileReader::didFinishLoading): Ditto.
(WebCore::FileReader::didFail): Ditto.

  • html/HTMLAppletElement.cpp: Removed unneeded include of HTMLDocument.h.

There's very little left that is truly specific to HTMLDocument vs. Document.

  • html/HTMLDocument.h:

(WebCore::HTMLDocument::create): Take a reference.
(WebCore::HTMLDocument::createSynthesizedDocument): Ditto.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::~HTMLFormElement): Pass a reference.
(WebCore::HTMLFormElement::parseAttribute): Ditto.
(WebCore::HTMLFormElement::didMoveToNewDocument): Ditto.

  • html/HTMLIFrameElement.cpp: Removed unneeded include of HTMLDocument.h.
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::~HTMLInputElement): Pass a reference.
(WebCore::HTMLInputElement::setChecked): Ditto.
(WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded): Ditto.
(WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded): Ditto.
(WebCore::HTMLInputElement::didMoveToNewDocument): Ditto.
(WebCore::HTMLInputElement::isInRequiredRadioButtonGroup): Ditto.
(WebCore::HTMLInputElement::addToRadioButtonGroup): Ditto.
(WebCore::HTMLInputElement::removeFromRadioButtonGroup): Ditto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::registerWithDocument): Ditto.
(WebCore::HTMLMediaElement::unregisterWithDocument): Ditto.
(WebCore::HTMLMediaElement::selectMediaResource): Ditto.
(WebCore::HTMLMediaElement::addTextTrack): Ditto.
(WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
(WebCore::HTMLMediaElement::resume): Ditto.
(WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Ditto.

  • html/HTMLNameCollection.cpp: Removed unneeded include of HTMLDocument.h.
  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Pass a reference.
(WebCore::HTMLPlugInImageElement::createElementRenderer): Ditto.
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Ditto.

  • html/HTMLSourceElement.cpp: Removed unneeded include of HTMLDocument.h.
  • html/HTMLTemplateElement.cpp: Ditto.
  • html/RadioInputType.cpp:

(WebCore::RadioInputType::matchesIndeterminatePseudoClass const):
Pass a reference.

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin): Ditto.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener): Ditto.
(WebCore::DOMWindow::removeEventListener): Ditto.
(WebCore::DOMWindow::removeAllEventListeners): Ditto.

  • page/EventHandler.cpp:

(WebCore::EventHandler::didStartDrag): Use a reference.

  • page/EventSource.cpp:

(WebCore::EventSource::create): Pass reference.
(WebCore::EventSource::networkRequestEnded): Ditto.
(WebCore::EventSource::close): Ditto.
(WebCore::EventSource::abortConnectionAttempt): Ditto.

  • page/Frame.cpp: Removed unneeded include of HTMLDocument.h.
  • page/FrameView.cpp: Ditto.

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty const): Use reference.

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::updateStateMachine): Pass reference.

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStyle): Take reference.
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStyle): Ditto.
(WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse): Ditto.
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse): Ditto.
(WebCore::CSSAnimationControllerPrivate::animationWillBeRemoved): Ditto.

  • page/animation/CSSAnimationControllerPrivate.h: Ditto.
  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::clearElement): Pass reference.
(WebCore::CompositeAnimation::updateTransitions): Ditto.
(WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::initWithSimpleHTMLDocument): Ditto.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::layerContentsFormat): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END so
I can continue to compile with latest headers.

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::buildReferenceFilter): Pass reference, small coding style
tweaks as well.

  • rendering/svg/RenderSVGResource.cpp:

(WebCore::removeFromCacheAndInvalidateDependencies): Pass reference.

  • rendering/svg/RenderSVGResourceContainer.cpp:

(WebCore::RenderSVGResourceContainer::registerResource): Ditto.

  • rendering/svg/SVGResources.cpp:

(WebCore::registerPendingResource): Ditto.

  • rendering/svg/SVGResourcesCache.cpp:

(WebCore::SVGResourcesCache::resourceDestroyed): Ditto.

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::addTimeContainer): Take reference.
(WebCore::SVGDocumentExtensions::removeTimeContainer): Ditto.
(WebCore::SVGDocumentExtensions::addResource): Ditto.
(WebCore::SVGDocumentExtensions::addPendingResource): Ditto.
(WebCore::SVGDocumentExtensions::isElementWithPendingResources const): Ditto.
(WebCore::SVGDocumentExtensions::isPendingResource const): Ditto.
(WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible): Ditto.
(WebCore::SVGDocumentExtensions::removeElementFromPendingResources): Ditto.
(WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget): Ditto.
(WebCore::SVGDocumentExtensions::addElementReferencingTarget): Ditto.
(WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Ditto.
(WebCore::SVGDocumentExtensions::clearTargetDependencies): Ditto.
(WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Ditto.
(WebCore::SVGDocumentExtensions::registerSVGFontFaceElement): Ditto.
(WebCore::SVGDocumentExtensions::unregisterSVGFontFaceElement): Ditto.

  • svg/SVGDocumentExtensions.h: Ditto.
  • svg/SVGElement.cpp:

(WebCore::SVGElement::~SVGElement): Pass reference.
(WebCore::SVGElement::removedFromAncestor): Ditto.
(WebCore::SVGElement::buildPendingResourcesIfNeeded): Ditto.

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::clearResourceReferences): Ditto.
(WebCore::SVGFEImageElement::buildPendingResource): Ditto.

  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::insertedIntoAncestor): Ditto.
(WebCore::SVGFontFaceElement::removedFromAncestor): Ditto.

  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::buildPendingResource): Ditto.
(WebCore::SVGMPathElement::clearResourceReferences): Ditto.

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::invalidateMPathDependencies): Ditto.

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::SVGSVGElement): Ditto.
(WebCore::SVGSVGElement::~SVGSVGElement): Ditto.
(WebCore::SVGSVGElement::didMoveToNewDocument): Ditto.
(WebCore::SVGSVGElement::insertedIntoAncestor): Ditto.
(WebCore::SVGSVGElement::removedFromAncestor): Ditto.

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::detachTarget): Ditto.
(WebCore::SVGTRefElement::buildPendingResource): Ditto.

  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::clearResourceReferences): Ditto.
(WebCore::SVGTextPathElement::buildPendingResource): Ditto.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::updateShadowTree): Ditto.

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::clearResourceReferences): Ditto.
(WebCore::SVGSMILElement::buildPendingResource): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::addTextMatchMarker): Ditto.
(WebCore::Internals::webkitWillEnterFullScreenForElement): Ditto.
(WebCore::Internals::webkitDidEnterFullScreenForElement): Ditto.
(WebCore::Internals::webkitWillExitFullScreenForElement): Ditto.
(WebCore::Internals::webkitDidExitFullScreenForElement): Ditto.

  • workers/Worker.cpp:

(WebCore::Worker::create): Ditto.
(WebCore::Worker::notifyFinished): Ditto.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::scheduleJob): Ditto.
(WebCore::ServiceWorkerContainer::jobDidFinish): Ditto.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::prepareToSend): Ditto.
(WebCore::XMLHttpRequest::createRequest): Ditto.
(WebCore::XMLHttpRequest::internalAbort): Ditto.
(WebCore::XMLHttpRequest::networkErrorTimerFired): Ditto.
(WebCore::XMLHttpRequest::didFail): Ditto.
(WebCore::XMLHttpRequest::didFinishLoading): Ditto.

  • xml/XPathStep.cpp: Removed unneeded include of HTMLDocument.h.

(WebCore::XPath::nodeMatchesBasicTest): Changed code to call isHTMLDocument
rather than is<HTMLDocument> since this is not a type check for a downcast,
but rather a behavioral difference that does not depend on any of the data
stored in an HTMLDocument or the use of a distinct C++ class for it.

  • xml/XSLTProcessor.cpp:

(WebCore::XSLTProcessor::createDocumentFromSource): Pass a reference.

Source/WebKit:

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::willEnterFullScreen): Update for change to the
functions in Document; pass a reference.
(WebKit::WebFullScreenManager::didEnterFullScreen): Ditto, don't pass the element.
(WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
(WebKit::WebFullScreenManager::didExitFullScreen): Ditto.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Pass a reference.
(WebKit::UserMediaPermissionRequestManager::mediaCanStart): Ditto.
(WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps): Ditto.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::~PluginView): Ditto.
(WebKit::PluginView::initializePlugin): Ditto.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj: Let Xcode update this project.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebKitFullScreenListener.mm:

(-[WebKitFullScreenListener webkitWillEnterFullScreen]): Update for change to the
functions in Document; pass a reference.
(-[WebKitFullScreenListener webkitDidEnterFullScreen]): Ditto, don't pass the element.
(-[WebKitFullScreenListener webkitWillExitFullScreen]): Ditto.
(-[WebKitFullScreenListener webkitDidExitFullScreen]): Ditto.

  • WebView/WebFullScreenController.mm:

(-[WebFullScreenController enterFullScreen:]): Ditto.
(-[WebFullScreenController finishedEnterFullScreenAnimation:]): Ditto.
(-[WebFullScreenController exitFullScreen]): Ditto.
(-[WebFullScreenController finishedExitFullScreenAnimation:]): Ditto.

  • WebView/WebFullScreenController.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]): Pass a reference.

Source/WebKitLegacy/win:

  • Plugins/PluginView.cpp:

(WebCore::PluginView::startOrAddToUnstartedList): Pass a reference.
(WebCore::PluginView::~PluginView): Ditto.

  • WebView.cpp:

(WebView::fullScreenClientWillEnterFullScreen): Ditto.
(WebView::fullScreenClientDidEnterFullScreen): Ditto.
(WebView::fullScreenClientDidExitFullScreen): Ditto.

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

Sort PAL Xcode project file

  • PAL.xcodeproj/project.pbxproj:
9:22 AM Changeset in webkit [240235] by ddkilzer@apple.com
  • 7 edits in trunk

Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h}
<https://webkit.org/b/193645>
<rdar://problem/47421574>

Reviewed by Alex Christensen.

Source/WebCore:

  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • Move soft-linking of VTPixelBufferConformer* functions from PixelBufferConformerCV.cpp to here.
  • platform/graphics/cv/PixelBufferConformerCV.cpp:
  • Remove local soft-linking of VideoToolbox.framework and switch to VideoToolboxSoftLink.h.

Tools:

  • Now checks for local soft-linking of all frameworks that have their own *SoftLinking.{cpp,h,mm} files.
  • Changes softlink/uikit warning to softlink/framework.
  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language):
(CppChecker):

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest):

5:32 AM Changeset in webkit [240234] by Claudio Saavedra
  • 2 edits in trunk/Source/WTF

[GTK] Speculative build fix for Ubuntu LTS
https://bugs.webkit.org/show_bug.cgi?id=193651

Unreviewed build fix.

  • wtf/Assertions.h: Add missing <cstdlib> include.
4:37 AM Changeset in webkit [240233] by commit-queue@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Add a basic test for scrollable iframe on iOS
https://bugs.webkit.org/show_bug.cgi?id=193650

Patch by Frederic Wang <fwang@igalia.com> on 2019-01-21
Reviewed by Antti Koivisto.

  • fast/scrolling/ios/scroll-iframe-expected.html: Added.
  • fast/scrolling/ios/scroll-iframe.html: Added.
4:27 AM Changeset in webkit [240232] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

Move delegatesScrolling() tests to lower level conversion function in ScrollView
https://bugs.webkit.org/show_bug.cgi?id=193649

Reviewed by Frédéric Wang.

This reduces places where these tests are needed and helps avoid mistakes.

  • dom/Document.cpp:

(WebCore::computeIntersectionState):

  • page/FrameView.cpp:

(WebCore::FrameView::convertFromRendererToContainingView const):
(WebCore::FrameView::convertFromContainingViewToRenderer const):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::viewToContents const):
(WebCore::ScrollView::contentsToView const):
(WebCore::ScrollView::contentsToContainingViewContents const):
(WebCore::ScrollView::rootViewToContents const):
(WebCore::ScrollView::contentsToRootView const):
(WebCore::ScrollView::windowToContents const):
(WebCore::ScrollView::contentsToWindow const):

2:14 AM Changeset in webkit [240231] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

REGRESSION(r239915): about 130 test failures on WPE
https://bugs.webkit.org/show_bug.cgi?id=193395

Reviewed by Žan Doberšek.

Since r239915 we are only overriding the characters with Default_Ignorable unicode property when the font
doesn't support the code point. If the font happens to provide a glyph for the character, it's later ignored by
harfbuzz when shaping, but the simple text code path doesn't ignore them unless there isn't a glyph.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal): Always ignore characters with Default_Ignorable unicode property.
(WebCore::characterMustDrawSomething): Moved to CharacterProperties.h and renamed as isDefaultIgnorableCodePoint().

  • platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:

(WebCore::GlyphPage::fill): Use isDefaultIgnorableCodePoint().

  • platform/text/CharacterProperties.h:

(WebCore::isDefaultIgnorableCodePoint): Return whether the character has Default_Ignorable unicode property.

1:34 AM WebKitGTK/2.22.x edited by Philippe Normand
(diff)

Jan 20, 2019:

11:31 PM Changeset in webkit [240230] by mmaxfield@apple.com
  • 14 edits
    7 copies
    6 adds in trunk/Source/WebCore

[WHLSL] Implement Metal code generation
https://bugs.webkit.org/show_bug.cgi?id=193531

Reviewed by Dean Jackson.

This implements the majority of the metal code generation piece. There are still a few pieces missing,
that I'll add in follow up patches. There's still enough complexity here that this is worth reviewing
on its own, though.

This patch includes a few pieces:

  • Metal typedefs for every WHLSL type. This analysis is actually pretty interesting, because complex

types depend on their inner types, and the inner types need to be emitted first. Therefore,
this patch implements a topological sort when emitting types. Also, WHLSL types need to be de-
duped because array references are implemented in MSL as structs, and if you have two structs
in MSL with the same contents, those two structs are not equal and cannot be assigned to each
other. So, this patch creates a trie to de-dup all the UnnamedTypes, and implements a
dependency graph which includes both nodes in the trie as well as NamedTypes which don't appear
in the trie.

  • WHLSL enumeration code generation
  • A name mangler, which ensures that no text from the source program is contained within the result

program

  • Full support for expressions. An expression like "y = *x + 7;" would be converted to something like

Type1 variable1 = *x;
Type2 variable2 = 7;
Type3 variable3 = variable1 + variable2;
y = variable3;

  • Mostly complete support for control flow. This is tricky because of how we transform WHLSL

expressions into C++ statements. Therefore, things like "for ( ; *x + 7; )" is difficult to
compile, because we can't put the "*x + 7" generated statements into the for loop itself.
Instead, we have to emit this code inside the loop, in all the places that would implicitly run
it. This patch doesn't fully handle this, see below. (If MSL supported lambdas, we could put
the statements into a lambda and do something like "for ( ; theLambda(); )" but MSL doesn't
support lambdas.)

Missing pieces:

  • Entry point pack / unpack code
  • Support for "continue" (See above regarding control flow)
  • Knowing whether or not a switch case should end with break or fallthrough
  • Trapping
  • Zero filling variables
  • Code generation for compiler-generated native functions (this patch supports native functions in the

standard library), texture functions, and HLSL's half <-> int functions.

No new tests because it isn't hooked up yet. As soon as we can do entry point packing and unpacking,
I'll start porting the test suite.

  • Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:

(WebCore::WHLSL::AST::BuiltInSemantic::targetIndex):

  • Modules/webgpu/WHLSL/AST/WHLSLExpression.h:

(WebCore::WHLSL::AST::Expression::resolvedType):
(WebCore::WHLSL::AST::Expression::type): Deleted.

  • Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:

(WebCore::WHLSL::AST::FunctionDeclaration::name):

  • Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:

(WebCore::WHLSL::AST::StructureDefinition::find):

  • Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Added.

(WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding):
(WebCore::WHLSL::Metal::EntryPointScaffolding::helperTypes):
(WebCore::WHLSL::Metal::EntryPointScaffolding::signature):
(WebCore::WHLSL::Metal::EntryPointScaffolding::unpack):
(WebCore::WHLSL::Metal::EntryPointScaffolding::pack):

  • Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Added.

(WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter):
(WebCore::WHLSL::Metal::FunctionDeclarationWriter::toString):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::toString):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::generateNextVariableName):
(WebCore::WHLSL::Metal::metalFunctions):

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
  • Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h.

(WebCore::WHLSL::Metal::generateMetalCode):

  • Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Added.

(WebCore::WHLSL::Metal::getNativeName):
(WebCore::WHLSL::Metal::mapFunctionName):
(WebCore::WHLSL::Metal::convertAddressSpace):
(WebCore::WHLSL::Metal::writeNativeFunction):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
  • Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: Added.

(WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
(WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
(WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
(WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
(WebCore::WHLSL::Metal::BaseTypeNameNode::isReferenceTypeNameNode const):
(WebCore::WHLSL::Metal::BaseTypeNameNode::children):
(WebCore::WHLSL::Metal::BaseTypeNameNode::append):
(WebCore::WHLSL::Metal::BaseTypeNameNode::parent):
(WebCore::WHLSL::Metal::BaseTypeNameNode::mangledName const):
(WebCore::WHLSL::Metal::ArrayTypeNameNode::ArrayTypeNameNode):
(WebCore::WHLSL::Metal::ArrayTypeNameNode::numElements const):
(WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::ArrayReferenceTypeNameNode):
(WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::addressSpace const):
(WebCore::WHLSL::Metal::PointerTypeNameNode::PointerTypeNameNode):
(WebCore::WHLSL::Metal::PointerTypeNameNode::addressSpace const):
(WebCore::WHLSL::Metal::ReferenceTypeNameNode::ReferenceTypeNameNode):
(WebCore::WHLSL::Metal::ReferenceTypeNameNode::namedType):
(WebCore::WHLSL::Metal::TypeNamer::TypeNamer):
(WebCore::WHLSL::Metal::TypeNamer::visit):
(WebCore::WHLSL::Metal::findInVector):
(WebCore::WHLSL::Metal::find):
(WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
(WebCore::WHLSL::Metal::TypeNamer::createNameNode):
(WebCore::WHLSL::Metal::TypeNamer::insert):
(WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter):
(WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::toString):
(WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::visit):
(WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations):
(WebCore::WHLSL::Metal::toString):
(WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
(WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
(WebCore::WHLSL::Metal::TypeNamer::metalTypeDefinitions):
(WebCore::WHLSL::Metal::TypeNamer::mangledNameForEnumerationMember):
(WebCore::WHLSL::Metal::TypeNamer::mangledNameForStructureElement):
(WebCore::WHLSL::Metal::TypeNamer::metalTypes):

  • Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h: Added.

(WebCore::WHLSL::Metal::TypeNamer::generateNextTypeName):
(WebCore::WHLSL::Metal::TypeNamer::generateNextStructureElementName):
(WebCore::WHLSL::Metal::TypeNamer::generateNextEnumerationMemberName):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::checkSemantics):
(WebCore::WHLSL::Checker::visit):

  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:

(WebCore::WHLSL::Gatherer::visit):

  • Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:

(WebCore::WHLSL::EntryPointItem::EntryPointItem):

  • Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp: Removed.
  • Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp: Added.

(WebCore::WHLSL::StatementBehaviorChecker::takeFunctionBehavior):
(WebCore::WHLSL::checkStatementBehavior):

  • Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
10:13 PM Changeset in webkit [240229] by sbarati@apple.com
  • 3 edits
    2 adds in trunk

DFG: When inlining DataView set* intrinsics we need to set undefined as our result
https://bugs.webkit.org/show_bug.cgi?id=193644
<rdar://problem/46209745>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/data-view-set-intrinsic-undefined-result-2.js: Added.

(foo):

  • stress/data-view-set-intrinsic-undefined-result.js: Added.

(foo):
(bar):

Source/JavaScriptCore:

This patch also makes it so we fail fast when we make this mistake.
I've made this mistake more than once.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

9:49 PM Changeset in webkit [240228] by yusukesuzuki@slowstart.org
  • 16 edits in trunk/Source/JavaScriptCore

[JSC] Reduce size of SourceProvider
https://bugs.webkit.org/show_bug.cgi?id=193544

Reviewed by Saam Barati.

This patch attempts to reduce the dirty memory footprint by the following 3 optimizations.

  1. Reordering the members of SourceProvider to reduce the size. This affects on JSC, and CachedScriptSourceProvider used in WebCore.
  1. Create one SourceProvider for all the builtin code and use substring to create builtin JS functions. This reduces # of SourceProvider created for builtins.
  1. Drop m_validated flag in SourceProvider since nobody uses it. It also deletes dead code in Parser.cpp.

Unfortunately, MSVC does not accept super long C string literal. So instead, we construct combined string in a form of C array.

  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result:
  • Scripts/wkbuiltins/builtins_generate_combined_header.py:

(BuiltinsCombinedHeaderGenerator.generate_output):

  • Scripts/wkbuiltins/builtins_generate_combined_implementation.py:

(BuiltinsCombinedImplementationGenerator.generate_output):

  • Scripts/wkbuiltins/builtins_generate_separate_implementation.py:

(BuiltinsSeparateImplementationGenerator.generate_output):

  • Scripts/wkbuiltins/builtins_generator.py:

(BuiltinsGenerator.generate_embedded_code_data_for_function):
(BuiltinsGenerator.generate_embedded_code_string_section_for_data):
(BuiltinsGenerator.generate_embedded_code_string_section_for_function): Deleted.

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::BuiltinExecutables):
(JSC::JSC_FOREACH_BUILTIN_CODE):
(JSC::BuiltinExecutables::createExecutable):

  • builtins/BuiltinExecutables.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
(JSC::Parser<LexerType>::shouldCheckPropertyForUnderscoreProtoDuplicate):
(JSC::Parser<LexerType>::parseObjectLiteral):
(JSC::Parser<LexerType>::parseUnaryExpression):

  • parser/Parser.h:
  • parser/SourceCode.h:
  • parser/SourceProvider.cpp:

(JSC::SourceProvider::SourceProvider):

  • parser/SourceProvider.h:

(JSC::SourceProvider::isValid const): Deleted.
(JSC::SourceProvider::setValid): Deleted.

  • runtime/CachedTypes.cpp:

(JSC::CachedSourceProviderShape::encode):
(JSC::CachedSourceProviderShape::decode const):

9:40 PM Changeset in webkit [240227] by mmaxfield@apple.com
  • 3 edits
    1 move
    1 add
    1 delete in trunk/Source/WebCore

[WHLSL] Add the statement behavior checker
https://bugs.webkit.org/show_bug.cgi?id=193487

Reviewed by Dean Jackson.

This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Spec/source/index.rst#typing-statements
into C++. It is meant to replace the ReturnChecker and UnreachableCodeChecker in the reference implementation.

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

  • Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp: Removed. StatementBehaviorChecker does everything that LoopChecker

does.

  • Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp: Added.

(WebCore::WHLSL::StatementBehaviorChecker::takeFunctionBehavior):
(WebCore::WHLSL::checkStatementBehavior):

  • Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
9:09 PM Changeset in webkit [240226] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix -Wreturn-type warning
https://bugs.webkit.org/show_bug.cgi?id=193333
<rdar://problem/45649489>

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::toProtocol):

9:04 PM Changeset in webkit [240225] by Michael Catanzaro
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix -Wint-in-bool-context warning
https://bugs.webkit.org/show_bug.cgi?id=193483
<rdar://problem/47280522>

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::addCheckStructureForOriginalStringObjectUse):

8:37 PM Changeset in webkit [240224] by sbarati@apple.com
  • 39 edits
    3 deletes in trunk

Rollout r240210: It broke tests on iOS
https://bugs.webkit.org/show_bug.cgi?id=193640

Source/JavaScriptCore:

Unreviewed. ~2650 tests are failing on iOS.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.cpp:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinNames.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setConstantIdentifierSetRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/HandlerInfo.h:
  • bytecode/InstructionStream.h:
  • bytecode/UnlinkedCodeBlock.h:

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

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecode/UnlinkedFunctionCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/UnlinkedGlobalCodeBlock.h:

(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):

  • bytecode/UnlinkedMetadataTable.h:
  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecode/UnlinkedProgramCodeBlock.h:
  • interpreter/Interpreter.cpp:
  • jsc.cpp:

(functionQuit):
(runJSC):

  • parser/SourceCode.h:
  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::operator!= const): Deleted.

  • parser/UnlinkedSourceCode.h:
  • parser/VariableEnvironment.h:
  • runtime/CachedTypes.cpp:

(): Deleted.
(JSC::Encoder::Allocation::buffer const): Deleted.
(JSC::Encoder::Allocation::offset const): Deleted.
(JSC::Encoder::Allocation::Allocation): Deleted.
(JSC::Encoder::Encoder): Deleted.
(JSC::Encoder::vm): Deleted.
(JSC::Encoder::malloc): Deleted.
(JSC::Encoder::offsetOf): Deleted.
(JSC::Encoder::cachePtr): Deleted.
(JSC::Encoder::offsetForPtr): Deleted.
(JSC::Encoder::release): Deleted.
(JSC::Encoder::Page::Page): Deleted.
(JSC::Encoder::Page::malloc): Deleted.
(JSC::Encoder::Page::buffer const): Deleted.
(JSC::Encoder::Page::size const): Deleted.
(JSC::Encoder::Page::getOffset const): Deleted.
(JSC::Encoder::allocateNewPage): Deleted.
(JSC::Decoder::Decoder): Deleted.
(JSC::Decoder::~Decoder): Deleted.
(JSC::Decoder::vm): Deleted.
(JSC::Decoder::offsetOf): Deleted.
(JSC::Decoder::cacheOffset): Deleted.
(JSC::Decoder::addFinalizer): Deleted.
(JSC::encode): Deleted.
(JSC::decode): Deleted.
(JSC::VariableLengthObject::buffer const): Deleted.
(JSC::VariableLengthObject::allocate): Deleted.
(JSC::CachedPtr::encode): Deleted.
(JSC::CachedPtr::decode const): Deleted.
(JSC::CachedPtr::operator-> const): Deleted.
(JSC::CachedPtr::get const): Deleted.
(JSC::CachedRefPtr::encode): Deleted.
(JSC::CachedRefPtr::decode const): Deleted.
(JSC::CachedWriteBarrier::encode): Deleted.
(JSC::CachedWriteBarrier::decode const): Deleted.
(JSC::CachedVector::encode): Deleted.
(JSC::CachedVector::decode const): Deleted.
(JSC::CachedPair::encode): Deleted.
(JSC::CachedPair::decode const): Deleted.
(JSC::CachedHashMap::encode): Deleted.
(JSC::CachedHashMap::decode const): Deleted.
(JSC::CachedUniquedStringImpl::encode): Deleted.
(JSC::CachedUniquedStringImpl::decode const): Deleted.
(JSC::CachedStringImpl::encode): Deleted.
(JSC::CachedStringImpl::decode const): Deleted.
(JSC::CachedString::encode): Deleted.
(JSC::CachedString::decode const): Deleted.
(JSC::CachedIdentifier::encode): Deleted.
(JSC::CachedIdentifier::decode const): Deleted.
(JSC::CachedOptional::encode): Deleted.
(JSC::CachedOptional::decode const): Deleted.
(JSC::CachedOptional::decodeAsPtr const): Deleted.
(JSC::CachedSimpleJumpTable::encode): Deleted.
(JSC::CachedSimpleJumpTable::decode const): Deleted.
(JSC::CachedStringJumpTable::encode): Deleted.
(JSC::CachedStringJumpTable::decode const): Deleted.
(JSC::CachedCodeBlockRareData::encode): Deleted.
(JSC::CachedCodeBlockRareData::decode const): Deleted.
(JSC::CachedBitVector::encode): Deleted.
(JSC::CachedBitVector::decode const): Deleted.
(JSC::CachedHashSet::encode): Deleted.
(JSC::CachedHashSet::decode const): Deleted.
(JSC::CachedConstantIdentifierSetEntry::encode): Deleted.
(JSC::CachedConstantIdentifierSetEntry::decode const): Deleted.
(JSC::CachedVariableEnvironment::encode): Deleted.
(JSC::CachedVariableEnvironment::decode const): Deleted.
(JSC::CachedArray::encode): Deleted.
(JSC::CachedArray::decode const): Deleted.
(JSC::CachedScopedArgumentsTable::encode): Deleted.
(JSC::CachedScopedArgumentsTable::decode const): Deleted.
(JSC::CachedSymbolTableEntry::encode): Deleted.
(JSC::CachedSymbolTableEntry::decode const): Deleted.
(JSC::CachedSymbolTable::encode): Deleted.
(JSC::CachedSymbolTable::decode const): Deleted.
(JSC::CachedImmutableButterfly::encode): Deleted.
(JSC::CachedImmutableButterfly::decode const): Deleted.
(JSC::CachedRegExp::encode): Deleted.
(JSC::CachedRegExp::decode const): Deleted.
(JSC::CachedTemplateObjectDescriptor::encode): Deleted.
(JSC::CachedTemplateObjectDescriptor::decode const): Deleted.
(JSC::CachedBigInt::encode): Deleted.
(JSC::CachedBigInt::decode const): Deleted.
(JSC::CachedJSValue::encode): Deleted.
(JSC::CachedJSValue::decode const): Deleted.
(JSC::CachedInstructionStream::encode): Deleted.
(JSC::CachedInstructionStream::decode const): Deleted.
(JSC::CachedMetadataTable::encode): Deleted.
(JSC::CachedMetadataTable::decode const): Deleted.
(JSC::CachedSourceOrigin::encode): Deleted.
(JSC::CachedSourceOrigin::decode const): Deleted.
(JSC::CachedTextPosition::encode): Deleted.
(JSC::CachedTextPosition::decode const): Deleted.
(JSC::CachedSourceProviderShape::encode): Deleted.
(JSC::CachedSourceProviderShape::decode const): Deleted.
(JSC::CachedStringSourceProvider::encode): Deleted.
(JSC::CachedStringSourceProvider::decode const): Deleted.
(JSC::CachedWebAssemblySourceProvider::encode): Deleted.
(JSC::CachedWebAssemblySourceProvider::decode const): Deleted.
(JSC::CachedSourceProvider::encode): Deleted.
(JSC::CachedSourceProvider::decode const): Deleted.
(JSC::CachedUnlinkedSourceCodeShape::encode): Deleted.
(JSC::CachedUnlinkedSourceCodeShape::decode const): Deleted.
(JSC::CachedSourceCode::encode): Deleted.
(JSC::CachedSourceCode::decode const): Deleted.
(JSC::CachedFunctionExecutable::firstLineOffset const): Deleted.
(JSC::CachedFunctionExecutable::lineCount const): Deleted.
(JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const): Deleted.
(JSC::CachedFunctionExecutable::unlinkedBodyStartColumn const): Deleted.
(JSC::CachedFunctionExecutable::unlinkedBodyEndColumn const): Deleted.
(JSC::CachedFunctionExecutable::startOffset const): Deleted.
(JSC::CachedFunctionExecutable::sourceLength const): Deleted.
(JSC::CachedFunctionExecutable::parametersStartOffset const): Deleted.
(JSC::CachedFunctionExecutable::typeProfilingStartOffset const): Deleted.
(JSC::CachedFunctionExecutable::typeProfilingEndOffset const): Deleted.
(JSC::CachedFunctionExecutable::parameterCount const): Deleted.
(JSC::CachedFunctionExecutable::features const): Deleted.
(JSC::CachedFunctionExecutable::sourceParseMode const): Deleted.
(JSC::CachedFunctionExecutable::isInStrictContext const): Deleted.
(JSC::CachedFunctionExecutable::hasCapturedVariables const): Deleted.
(JSC::CachedFunctionExecutable::isBuiltinFunction const): Deleted.
(JSC::CachedFunctionExecutable::isBuiltinDefaultClassConstructor const): Deleted.
(JSC::CachedFunctionExecutable::constructAbility const): Deleted.
(JSC::CachedFunctionExecutable::constructorKind const): Deleted.
(JSC::CachedFunctionExecutable::functionMode const): Deleted.
(JSC::CachedFunctionExecutable::scriptMode const): Deleted.
(JSC::CachedFunctionExecutable::superBinding const): Deleted.
(JSC::CachedFunctionExecutable::derivedContextType const): Deleted.
(JSC::CachedFunctionExecutable::name const): Deleted.
(JSC::CachedFunctionExecutable::ecmaName const): Deleted.
(JSC::CachedFunctionExecutable::inferredName const): Deleted.
(JSC::CachedCodeBlock::instructions const): Deleted.
(JSC::CachedCodeBlock::thisRegister const): Deleted.
(JSC::CachedCodeBlock::scopeRegister const): Deleted.
(JSC::CachedCodeBlock::globalObjectRegister const): Deleted.
(JSC::CachedCodeBlock::sourceURLDirective const): Deleted.
(JSC::CachedCodeBlock::sourceMappingURLDirective const): Deleted.
(JSC::CachedCodeBlock::usesEval const): Deleted.
(JSC::CachedCodeBlock::isStrictMode const): Deleted.
(JSC::CachedCodeBlock::isConstructor const): Deleted.
(JSC::CachedCodeBlock::hasCapturedVariables const): Deleted.
(JSC::CachedCodeBlock::isBuiltinFunction const): Deleted.
(JSC::CachedCodeBlock::superBinding const): Deleted.
(JSC::CachedCodeBlock::scriptMode const): Deleted.
(JSC::CachedCodeBlock::isArrowFunctionContext const): Deleted.
(JSC::CachedCodeBlock::isClassContext const): Deleted.
(JSC::CachedCodeBlock::wasCompiledWithDebuggingOpcodes const): Deleted.
(JSC::CachedCodeBlock::constructorKind const): Deleted.
(JSC::CachedCodeBlock::derivedContextType const): Deleted.
(JSC::CachedCodeBlock::evalContextType const): Deleted.
(JSC::CachedCodeBlock::hasTailCalls const): Deleted.
(JSC::CachedCodeBlock::lineCount const): Deleted.
(JSC::CachedCodeBlock::endColumn const): Deleted.
(JSC::CachedCodeBlock::numVars const): Deleted.
(JSC::CachedCodeBlock::numCalleeLocals const): Deleted.
(JSC::CachedCodeBlock::numParameters const): Deleted.
(JSC::CachedCodeBlock::features const): Deleted.
(JSC::CachedCodeBlock::parseMode const): Deleted.
(JSC::CachedCodeBlock::codeType const): Deleted.
(JSC::CachedCodeBlock::rareData const): Deleted.
(JSC::CachedProgramCodeBlock::encode): Deleted.
(JSC::CachedProgramCodeBlock::decode const): Deleted.
(JSC::CachedModuleCodeBlock::encode): Deleted.
(JSC::CachedModuleCodeBlock::decode const): Deleted.
(JSC::CachedEvalCodeBlock::encode): Deleted.
(JSC::CachedEvalCodeBlock::decode const): Deleted.
(JSC::CachedFunctionCodeBlock::encode): Deleted.
(JSC::CachedFunctionCodeBlock::decode const): Deleted.
(JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock): Deleted.
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
(JSC::CachedCodeBlock<CodeBlockType>::decode const): Deleted.
(JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::UnlinkedModuleProgramCodeBlock): Deleted.
(JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock): Deleted.
(JSC::CachedFunctionExecutable::encode): Deleted.
(JSC::CachedFunctionExecutable::decode const): Deleted.
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): Deleted.
(JSC::CachedCodeBlock<CodeBlockType>::encode): Deleted.
(JSC::CachedSourceCodeKey::encode): Deleted.
(JSC::CachedSourceCodeKey::decode const): Deleted.
(JSC::CacheEntry::encode): Deleted.
(JSC::CacheEntry:: const): Deleted.
(JSC:: const): Deleted.
(JSC::encodeCodeBlock): Deleted.
(JSC::decodeCodeBlockImpl): Deleted.

  • runtime/CachedTypes.h:

(JSC::decodeCodeBlock): Deleted.

  • runtime/CodeCache.cpp:

(JSC::CodeCacheMap::pruneSlowCase):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
(JSC::CodeCache::write): Deleted.

  • runtime/CodeCache.h:

(JSC::CodeCacheMap::findCacheAndUpdateAge):
(JSC::CodeCache::clear):
(JSC::CodeCacheMap::begin): Deleted.
(JSC::CodeCacheMap::end): Deleted.
(JSC::CodeCacheMap::fetchFromDiskImpl): Deleted.
(): Deleted.
(JSC::writeCodeBlock): Deleted.

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::offsetOfData):
(JSC::JSBigInt::dataStorage):

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

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/RegExp.h:
  • runtime/ScopedArgumentsTable.h:
  • runtime/StackFrame.h:
  • runtime/StructureInlines.h:
  • runtime/SymbolTable.h:

Source/WTF:

Unreviewed.

  • wtf/BitVector.h:

Tools:

Unreviewed.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper:
  • Scripts/run-jsc-stress-tests:
7:54 PM Changeset in webkit [240223] by sbarati@apple.com
  • 4 edits
    2 adds in trunk

JSTests:
MovHint must merge NodeBytecodeUsesAsValue for its child
https://bugs.webkit.org/show_bug.cgi?id=186916
<rdar://problem/41396612>

Reviewed by Yusuke Suzuki.

  • stress/arith-abs-to-arith-negate-range-optimizaton.js:
  • stress/movhint-backwards-propagation-must-merge-use-as-value.js: Added.

Source/JavaScriptCore:
MovHint must merge NodeBytecodeUsesAsValue for its child in backwards propagation
https://bugs.webkit.org/show_bug.cgi?id=186916
<rdar://problem/41396612>

Reviewed by Yusuke Suzuki.

Otherwise, we may not think we care about the non-integral part in
a division (or perhaps overflow in an add, etc). Consider a program
like this:

return a / b

That gets compiled to:
`
a: ArithDiv We don't check that the remainder is zero here.
b: MovHint(@a)
c: ForceOSRExit
d: Unreachable
`

If we don't inform @a that we care about its result in full number
accuracy, it will choose to ignore its non-integral remainder. This
makes sense if *everybody* that all uses of the Div only cared about
the integral part. However, OSR exit is not one of those users. OSR
exit cares about the fractional bits in such a Div.

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

7:33 PM Changeset in webkit [240222] by Michael Catanzaro
  • 4 edits
    1 add
    1 delete in trunk/LayoutTests

Unreviewed GTK test gardening

  • accessibility/gtk/xml-roles-exposed-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt: Removed.
  • platform/gtk/inspector/css/shadow-scoped-style-expected.txt: Added.
  • platform/gtk/svg/text/font-size-below-point-five-expected.txt:
7:25 PM Changeset in webkit [240221] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

REGRESSION(r240174): Wrong preprocessor guards in RenderImage::paintAreaElementFocusRing
https://bugs.webkit.org/show_bug.cgi?id=193630

Reviewed by Daniel Bates.

r240174 inadvertently disabled this function on non-Apple platforms.

This fixes layout test fast/images/image-map-outline-in-positioned-container.html.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintAreaElementFocusRing):

5:39 PM Changeset in webkit [240220] by commit-queue@webkit.org
  • 23 edits
    3 adds in trunk

[JSC] Invalidate old scope operations using global lexical binding epoch
https://bugs.webkit.org/show_bug.cgi?id=193603
<rdar://problem/47380869>

Patch by Yusuke Suzuki <ysuzuki@apple.com> on 2019-01-20
Reviewed by Saam Barati.

JSTests:

  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js:
  • stress/scope-operation-cache-global-property-before-deleting.js: Added.

(shouldThrow):
(bar):

  • stress/scope-operation-cache-global-property-bump-counter.js: Added.

(shouldBe):
(get1):
(get2):
(get1If):
(get2If):

  • stress/scope-operation-cache-global-property-even-if-it-fails.js: Added.

(shouldThrow):
(foo):

Source/JavaScriptCore:

Even if the global lexical binding does not shadow the global property at that time, we need to clear the cached information in
scope related operations since we may have a global property previously. Consider the following example,

foo = 0;
function get() { return foo; }
print(get()); 0
print(get());
0
delete globalThis.foo;
$.evalScript(const foo = 42;);
print(get()); Should be 42, but it returns 0 if the cached information in get() is not cleared.

To invalidate the cache easily, we introduce global lexical binding epoch. It is bumped every time we introduce a new lexical binding
into JSGlobalLexicalEnvironment, since that name could shadow the global property name previously. In op_resolve_scope, we first check
the epoch stored in the metadata, and go to slow path if it is not equal to the current epoch. Our slow path code convert the scope
operation to the appropriate one even if the resolve type is not UnresolvedProperty type. After updating the resolve type of the bytecode,
we update the cached epoch to the current one, so that we can use the cached information as long as we stay in the same epoch.

In op_get_from_scope and op_put_to_scope, we do not use this epoch since Structure check can do the same thing instead. If op_resolve_type
is updated by the epoch, and if it starts returning JSGlobalLexicalEnvironment instead JSGlobalObject, obviously the structure check fails.
And in the slow path, we update op_get_from_scope and op_put_to_scope appropriately.

So, the metadata for scope related bytecodes are eventually updated to the appropriate one. In DFG and FTL, we use the watchpoint based approach.
In DFG and FTL, we concurrently attempt to get the watchpoint for the lexical binding and look into it by using isStillValid() to avoid
infinite compile-and-fail loop.

When the global lexical binding epoch overflows we iterate all the live CodeBlock and update the op_resolve_scope's epoch. Even if the shadowing
happens, it is OK if we bump the epoch, since op_resolve_scope will return JSGlobalLexicalEnvironment instead of JSGlobalObject, and following
structure check in op_put_to_scope and op_get_from_scope fail. We do not need to update op_get_from_scope and op_put_to_scope because of the same
reason.

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::notifyLexicalBindingShadowing): Deleted.

  • bytecode/CodeBlock.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGDesiredGlobalProperties.cpp:

(JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread):

  • dfg/DFGDesiredGlobalProperties.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::watchGlobalProperty):

  • dfg/DFGGraph.h:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::isStillValidOnMainThread):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::bumpGlobalLexicalBindingEpoch):
(JSC::JSGlobalObject::getReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::notifyLexicalBindingShadowing): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::globalLexicalBindingEpoch const):
(JSC::JSGlobalObject::globalLexicalBindingEpochOffset):
(JSC::JSGlobalObject::addressOfGlobalLexicalBindingEpoch):

  • runtime/Options.cpp:

(JSC::correctOptions):
(JSC::Options::initialize):
(JSC::Options::setOptions):
(JSC::Options::setOptionWithoutAlias):

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

(JSC::ProgramExecutable::initializeGlobalProperties):

5:26 PM Changeset in webkit [240219] by Chris Fleizach
  • 21 edits
    2 adds in trunk

AX: Support returning relative frames for accessibility
https://bugs.webkit.org/show_bug.cgi?id=193414
<rdar://problem/47268501>

Reviewed by Zalan Bujtas.

Source/WebCore:

Create a way for assistive technologies to retrieve a frame in page space that can be transformed to its final screen space by having the AT message the UI process separately.

Consolidate rect/point conversion methods for macOS and iOS.
This is only needed on WebKit2, where we have to reach back across to the hosting process to get the final frame, so we can skip this test on WK1.

Tests: accessibility/mac/relative-frame.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityConvertPointToViewSpace:]):
(-[WebAccessibilityObjectWrapper _accessibilityRelativeFrame]):
(-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
(-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
(-[WebAccessibilityObjectWrapper accessibilityFrame]):
(-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
(-[WebAccessibilityObjectWrapper rectsForSelectionRects:]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]): Deleted.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertPathToScreenSpaceFunction):
(-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]):
(-[WebAccessibilityObjectWrapperBase convertPointToScreenSpace:]): Deleted.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
(-[WebAccessibilityObjectWrapper position]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView accessibilityAttributeValue:forParameter:]):
(-[WKWebView IGNORE_WARNINGS_END]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView accessibilityAttributeValue:forParameter:]):
(-[WKView IGNORE_WARNINGS_END]):

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::accessibilityAttributeValue):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView accessibilityConvertRelativeFrameFromPage:]):

Tools:

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

(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::attributesOfElement):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):

LayoutTests:

  • accessibility/mac/relative-frame-expected.txt: Added.
  • accessibility/mac/relative-frame.html: Added.
  • platform/mac-wk1/TestExpectations:
5:06 PM Changeset in webkit [240218] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

On RenderBox, make client sizing be derived from padding box sizing
https://bugs.webkit.org/show_bug.cgi?id=193621

Reviewed by Daniel Bates.

I never liked how clientWidth/Height, an IE-originated term, was used as the basis
for various RenderBox geometry functions.

Fix by adding some functions which return the dimensions of the padding box (which
is the inside of the border and any scrollbar), and define clientWidth/Height in
terms of them.

Also add paddingBoxRectIncludingScrollbar() function that is used by compositing code.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::clientWidth const):
(WebCore::RenderBox::clientHeight const):

  • rendering/RenderBox.h:

(WebCore::RenderBox::borderBoxRect const):
(WebCore::RenderBox::computedCSSContentBoxRect const):
(WebCore::RenderBox::contentWidth const):
(WebCore::RenderBox::contentHeight const):
(WebCore::RenderBox::paddingBoxWidth const):
(WebCore::RenderBox::paddingBoxHeight const):
(WebCore::RenderBox::paddingBoxRect const):
(WebCore::RenderBox::paddingBoxRectIncludingScrollbar const):
(WebCore::RenderBox::hasHorizontalOverflow const):
(WebCore::RenderBox::hasVerticalOverflow const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
(WebCore::RenderLayerBacking::updateGeometry):

1:15 PM Changeset in webkit [240217] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Tools

Unreviewed, add my new email address

  • Scripts/webkitpy/common/config/contributors.json:
12:39 PM Changeset in webkit [240216] by yusukesuzuki@slowstart.org
  • 18 edits in trunk/Source/JavaScriptCore

[JSC] Shrink data structure size in JSC/heap
https://bugs.webkit.org/show_bug.cgi?id=193612

Reviewed by Saam Barati.

This patch reduces the size of data structures in JSC/heap. Basically, we reorder the members to remove paddings.

For Subspace, we drop CellAttributes m_attributes. Instead, we use heapCellType->attributes(). And we use
FreeList::cellSize() instead of holding m_cellSize in LocalAllocator.

This change reduces the size of JSC::VM too since it includes JSC::Heap. The size of VM becomes from 78208 to 76696.

  • heap/BlockDirectory.cpp:
  • heap/BlockDirectory.h:
  • heap/CollectionScope.h:
  • heap/CompleteSubspace.cpp:

(JSC::CompleteSubspace::allocatorForSlow):

  • heap/FreeList.h:

(JSC::FreeList::offsetOfCellSize):
(JSC::FreeList::cellSize const):

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::runBeginPhase):
(JSC::Heap::willStartCollection):
(JSC::Heap::pruneStaleEntriesFromWeakGCMaps):
(JSC::Heap::deleteSourceProviderCaches):
(JSC::Heap::notifyIncrementalSweeper):
(JSC::Heap::updateAllocationLimits):

  • heap/Heap.h:
  • heap/IsoAlignedMemoryAllocator.h:
  • heap/LargeAllocation.cpp:
  • heap/LocalAllocator.cpp:

(JSC::LocalAllocator::LocalAllocator):

  • heap/LocalAllocator.h:

(JSC::LocalAllocator::cellSize const):
(JSC::LocalAllocator::offsetOfCellSize):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::MarkedSpace):

  • heap/MarkedSpace.h:
  • heap/MarkingConstraint.h:
  • heap/Subspace.cpp:

(JSC::Subspace::initialize):

  • heap/Subspace.h:

(JSC::Subspace::attributes const): Deleted.

  • heap/SubspaceInlines.h:

(JSC::Subspace::forEachMarkedCell):
(JSC::Subspace::forEachMarkedCellInParallel):
(JSC::Subspace::forEachLiveCell):
(JSC::Subspace::attributes const):

12:37 PM Changeset in webkit [240215] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r238275.

Regressed css3/shapes/shape-outside/shape-image/shape-
image-025.html

Reverted changeset:

"ScalableImageDecoder: don't forcefully decode image data when
querying frame completeness, duration"
https://bugs.webkit.org/show_bug.cgi?id=191354
https://trac.webkit.org/changeset/238275

11:22 AM Changeset in webkit [240214] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed gardening, add failure expectation for js/intl-numberformat.html

This test requires an old version of ICU to pass.

  • platform/gtk/TestExpectations:
11:17 AM Changeset in webkit [240213] by Alan Bujtas
  • 4 edits in trunk

[LFC][BFC] <body>'s overflow property value is propagated to viewport
https://bugs.webkit.org/show_bug.cgi?id=193617

Reviewed by Antti Koivisto.

Source/WebCore:

When the root element is an HTML "HTML" element or an XHTML "html" element, and that element has an HTML "BODY" element
or an XHTML "body" element as a child, user agents must instead apply the 'overflow' property from the first such child element to the viewport,
if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'.
The element from which the value is propagated must have a used value for 'overflow' of 'visible'.

This also has impact on layout since <body style="overflow: hidden"> would establish a block formatting context.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isOverflowVisible const):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
10:37 AM Changeset in webkit [240212] by Michael Catanzaro
  • 18 edits
    2 deletes in trunk

Unreviewed, rolling out r240209.

Broke GTK/WPE injected bundle

Reverted changeset:

"AX: Support returning relative frames for accessibility"
https://bugs.webkit.org/show_bug.cgi?id=193414
https://trac.webkit.org/changeset/240209

10:02 AM Changeset in webkit [240211] by mitz@apple.com
  • 49 edits in trunk

[Cocoa] Avoid importing directly from subumbrella frameworks
https://bugs.webkit.org/show_bug.cgi?id=186016
<rdar://problem/40591038>

Reviewed by Sam Weinig.

Source/WebCore:

  • Configurations/WebCore.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • editing/mac/DictionaryLookupLegacy.mm: Import Quartz.h instead of a PDFKit header.
  • platform/mac/PlatformEventFactoryMac.mm: Import Carbon.h instead of HIToolbox headers.
  • platform/text/mac/TextEncodingRegistryMac.mm: Import Carbon.h instead of CarbonCore.h.

Source/WebCore/PAL:

  • Configurations/PAL.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • pal/spi/cg/CoreGraphicsSPI.h: Import ApplicationServices.h instead of ColorSync.h when using SDKs earlier than 10.13.
  • pal/spi/mac/HIToolboxSPI.h: Import CarbonPriv.h instead of HIToolboxPriv.h.
  • pal/spi/mac/QuickLookMacSPI.h: Import Quartz.h instead of a QuickLookUI header.

Source/WebKit:

  • Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm: Import Carbon.h instead of an HIToolbox header.
  • UIProcess/Cocoa/WebViewImpl.mm: Ditto.
  • UIProcess/mac/WKPrintingView.mm: Import Quartz.h instead of a PDFKit header.
  • UIProcess/mac/WKTextInputWindowController.mm: Import Carbon.h instead of an HIToolbox header.
  • WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Import Quartz.h instead of a PDFKit header.
  • WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: Ditto.
  • WebProcess/Plugins/PDF/PDFPlugin.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Ditto.
  • WebProcess/WebPage/mac/WebPageMac.mm: Ditto.

Source/WebKitLegacy/mac:

  • Carbon/CarbonWindowAdapter.h: Import Carbon.h instead of HIToolbox headers.
  • Carbon/CarbonWindowAdapter.mm: Ditto.
  • Carbon/CarbonWindowFrame.m: Ditto.
  • Carbon/HIViewAdapter.h: Ditto.
  • Configurations/WebKitLegacy.xcconfig: Removed -iframework options from OTHER_CFLAGS_COCOA_TOUCH_NO.
  • Plugins/WebNetscapePluginEventHandlerCarbon.mm: Import Carbon.h instead of CarbonEvents.h.
  • WebView/WebPDFDocumentExtras.mm: Import Quartz.h instead of a PDFKit header.
  • WebView/WebPDFView.h: Ditto.

Tools:

  • DumpRenderTree/cg/PixelDumpSupportCG.cpp: Include CoreServices.h instead of a LaunchServices header.
  • DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • DumpRenderTree/mac/LayoutTestHelper.m: Import ApplicationServices.h instead of ColorSync.h when using SDKs earlier than 10.13.
  • TestWebKitAPI/Configurations/Base.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • WebKitTestRunner/Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • WebKitTestRunner/cg/TestInvocationCG.cpp: Include CoreServices.h instead of a LaunchServices header.
3:20 AM Changeset in webkit [240210] by Tadeu Zagallo
  • 39 edits
    1 copy
    2 adds in trunk

Cache bytecode to disk
https://bugs.webkit.org/show_bug.cgi?id=192782
<rdar://problem/46084932>

Reviewed by Keith Miller.

Source/JavaScriptCore:

Add the logic to serialize and deserialize the new JSC bytecode. For now,
the cache is only used for tests.

Each class that can be serialized has a counterpart in CachedTypes, which
handles the decoding and encoding. When decoding, the cached objects are
mmap'd from disk, but only used for creating instances of the respective
in-memory version of each object. Ideally, the mmap'd objects should be
used at runtime in the future.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.cpp:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinNames.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setConstantIdentifierSetRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/HandlerInfo.h:

(JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo):

  • bytecode/InstructionStream.h:
  • bytecode/UnlinkedCodeBlock.h:

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

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecode/UnlinkedFunctionCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/UnlinkedGlobalCodeBlock.h:

(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):

  • bytecode/UnlinkedMetadataTable.h:
  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecode/UnlinkedProgramCodeBlock.h:
  • interpreter/Interpreter.cpp:
  • jsc.cpp:

(functionQuit):
(runJSC):

  • parser/SourceCode.h:
  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::operator!= const):

  • parser/UnlinkedSourceCode.h:
  • parser/VariableEnvironment.h:
  • runtime/CachedTypes.cpp: Added.

(JSC::Encoder::Allocation::buffer const):
(JSC::Encoder::Allocation::offset const):
(JSC::Encoder::Allocation::Allocation):
(JSC::Encoder::Encoder):
(JSC::Encoder::vm):
(JSC::Encoder::malloc):
(JSC::Encoder::offsetOf):
(JSC::Encoder::cachePtr):
(JSC::Encoder::offsetForPtr):
(JSC::Encoder::release):
(JSC::Encoder::Page::Page):
(JSC::Encoder::Page::malloc):
(JSC::Encoder::Page::buffer const):
(JSC::Encoder::Page::size const):
(JSC::Encoder::Page::getOffset const):
(JSC::Encoder::allocateNewPage):
(JSC::Decoder::Decoder):
(JSC::Decoder::~Decoder):
(JSC::Decoder::vm):
(JSC::Decoder::offsetOf):
(JSC::Decoder::cacheOffset):
(JSC::Decoder::addFinalizer):
(JSC::encode):
(JSC::decode):
(JSC::VariableLengthObject::buffer const):
(JSC::VariableLengthObject::allocate):
(JSC::CachedPtr::encode):
(JSC::CachedPtr::decode const):
(JSC::CachedPtr::operator-> const):
(JSC::CachedPtr::get const):
(JSC::CachedRefPtr::encode):
(JSC::CachedRefPtr::decode const):
(JSC::CachedWriteBarrier::encode):
(JSC::CachedWriteBarrier::decode const):
(JSC::CachedVector::encode):
(JSC::CachedVector::decode const):
(JSC::CachedPair::encode):
(JSC::CachedPair::decode const):
(JSC::CachedHashMap::encode):
(JSC::CachedHashMap::decode const):
(JSC::CachedUniquedStringImpl::encode):
(JSC::CachedUniquedStringImpl::decode const):
(JSC::CachedStringImpl::encode):
(JSC::CachedStringImpl::decode const):
(JSC::CachedString::encode):
(JSC::CachedString::decode const):
(JSC::CachedIdentifier::encode):
(JSC::CachedIdentifier::decode const):
(JSC::CachedOptional::encode):
(JSC::CachedOptional::decode const):
(JSC::CachedOptional::decodeAsPtr const):
(JSC::CachedSimpleJumpTable::encode):
(JSC::CachedSimpleJumpTable::decode const):
(JSC::CachedStringJumpTable::encode):
(JSC::CachedStringJumpTable::decode const):
(JSC::CachedCodeBlockRareData::encode):
(JSC::CachedCodeBlockRareData::decode const):
(JSC::CachedBitVector::encode):
(JSC::CachedBitVector::decode const):
(JSC::CachedHashSet::encode):
(JSC::CachedHashSet::decode const):
(JSC::CachedConstantIdentifierSetEntry::encode):
(JSC::CachedConstantIdentifierSetEntry::decode const):
(JSC::CachedVariableEnvironment::encode):
(JSC::CachedVariableEnvironment::decode const):
(JSC::CachedArray::encode):
(JSC::CachedArray::decode const):
(JSC::CachedScopedArgumentsTable::encode):
(JSC::CachedScopedArgumentsTable::decode const):
(JSC::CachedSymbolTableEntry::encode):
(JSC::CachedSymbolTableEntry::decode const):
(JSC::CachedSymbolTable::encode):
(JSC::CachedSymbolTable::decode const):
(JSC::CachedImmutableButterfly::encode):
(JSC::CachedImmutableButterfly::decode const):
(JSC::CachedRegExp::encode):
(JSC::CachedRegExp::decode const):
(JSC::CachedTemplateObjectDescriptor::encode):
(JSC::CachedTemplateObjectDescriptor::decode const):
(JSC::CachedBigInt::encode):
(JSC::CachedBigInt::decode const):
(JSC::CachedJSValue::encode):
(JSC::CachedJSValue::decode const):
(JSC::CachedInstructionStream::encode):
(JSC::CachedInstructionStream::decode const):
(JSC::CachedMetadataTable::encode):
(JSC::CachedMetadataTable::decode const):
(JSC::CachedSourceOrigin::encode):
(JSC::CachedSourceOrigin::decode const):
(JSC::CachedTextPosition::encode):
(JSC::CachedTextPosition::decode const):
(JSC::CachedSourceProviderShape::encode):
(JSC::CachedSourceProviderShape::decode const):
(JSC::CachedStringSourceProvider::encode):
(JSC::CachedStringSourceProvider::decode const):
(JSC::CachedWebAssemblySourceProvider::encode):
(JSC::CachedWebAssemblySourceProvider::decode const):
(JSC::CachedSourceProvider::encode):
(JSC::CachedSourceProvider::decode const):
(JSC::CachedUnlinkedSourceCodeShape::encode):
(JSC::CachedUnlinkedSourceCodeShape::decode const):
(JSC::CachedSourceCode::encode):
(JSC::CachedSourceCode::decode const):
(JSC::CachedFunctionExecutable::firstLineOffset const):
(JSC::CachedFunctionExecutable::lineCount const):
(JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const):
(JSC::CachedFunctionExecutable::unlinkedBodyStartColumn const):
(JSC::CachedFunctionExecutable::unlinkedBodyEndColumn const):
(JSC::CachedFunctionExecutable::startOffset const):
(JSC::CachedFunctionExecutable::sourceLength const):
(JSC::CachedFunctionExecutable::parametersStartOffset const):
(JSC::CachedFunctionExecutable::typeProfilingStartOffset const):
(JSC::CachedFunctionExecutable::typeProfilingEndOffset const):
(JSC::CachedFunctionExecutable::parameterCount const):
(JSC::CachedFunctionExecutable::features const):
(JSC::CachedFunctionExecutable::sourceParseMode const):
(JSC::CachedFunctionExecutable::isInStrictContext const):
(JSC::CachedFunctionExecutable::hasCapturedVariables const):
(JSC::CachedFunctionExecutable::isBuiltinFunction const):
(JSC::CachedFunctionExecutable::isBuiltinDefaultClassConstructor const):
(JSC::CachedFunctionExecutable::constructAbility const):
(JSC::CachedFunctionExecutable::constructorKind const):
(JSC::CachedFunctionExecutable::functionMode const):
(JSC::CachedFunctionExecutable::scriptMode const):
(JSC::CachedFunctionExecutable::superBinding const):
(JSC::CachedFunctionExecutable::derivedContextType const):
(JSC::CachedFunctionExecutable::name const):
(JSC::CachedFunctionExecutable::ecmaName const):
(JSC::CachedFunctionExecutable::inferredName const):
(JSC::CachedCodeBlock::instructions const):
(JSC::CachedCodeBlock::thisRegister const):
(JSC::CachedCodeBlock::scopeRegister const):
(JSC::CachedCodeBlock::globalObjectRegister const):
(JSC::CachedCodeBlock::sourceURLDirective const):
(JSC::CachedCodeBlock::sourceMappingURLDirective const):
(JSC::CachedCodeBlock::usesEval const):
(JSC::CachedCodeBlock::isStrictMode const):
(JSC::CachedCodeBlock::isConstructor const):
(JSC::CachedCodeBlock::hasCapturedVariables const):
(JSC::CachedCodeBlock::isBuiltinFunction const):
(JSC::CachedCodeBlock::superBinding const):
(JSC::CachedCodeBlock::scriptMode const):
(JSC::CachedCodeBlock::isArrowFunctionContext const):
(JSC::CachedCodeBlock::isClassContext const):
(JSC::CachedCodeBlock::wasCompiledWithDebuggingOpcodes const):
(JSC::CachedCodeBlock::constructorKind const):
(JSC::CachedCodeBlock::derivedContextType const):
(JSC::CachedCodeBlock::evalContextType const):
(JSC::CachedCodeBlock::hasTailCalls const):
(JSC::CachedCodeBlock::lineCount const):
(JSC::CachedCodeBlock::endColumn const):
(JSC::CachedCodeBlock::numVars const):
(JSC::CachedCodeBlock::numCalleeLocals const):
(JSC::CachedCodeBlock::numParameters const):
(JSC::CachedCodeBlock::features const):
(JSC::CachedCodeBlock::parseMode const):
(JSC::CachedCodeBlock::codeType const):
(JSC::CachedCodeBlock::rareData const):
(JSC::CachedProgramCodeBlock::encode):
(JSC::CachedProgramCodeBlock::decode const):
(JSC::CachedModuleCodeBlock::encode):
(JSC::CachedModuleCodeBlock::decode const):
(JSC::CachedEvalCodeBlock::encode):
(JSC::CachedEvalCodeBlock::decode const):
(JSC::CachedFunctionCodeBlock::encode):
(JSC::CachedFunctionCodeBlock::decode const):
(JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::decode const):
(JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock):
(JSC::UnlinkedModuleProgramCodeBlock::UnlinkedModuleProgramCodeBlock):
(JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock):
(JSC::CachedFunctionExecutable::encode):
(JSC::CachedFunctionExecutable::decode const):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedSourceCodeKey::encode):
(JSC::CachedSourceCodeKey::decode const):
(JSC::CacheEntry::encode):
(JSC::CacheEntry:: const):
(JSC:: const):
(JSC::encodeCodeBlock):
(JSC::decodeCodeBlockImpl):

  • runtime/CachedTypes.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedGlobalCodeBlock.h.

(JSC::decodeCodeBlock):

  • runtime/CodeCache.cpp:

(JSC::CodeCacheMap::pruneSlowCase):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
(JSC::CodeCache::write):

  • runtime/CodeCache.h:

(JSC::CodeCacheMap::begin):
(JSC::CodeCacheMap::end):
(JSC::CodeCacheMap::fetchFromDiskImpl):
(JSC::CodeCacheMap::findCacheAndUpdateAge):
(JSC::writeCodeBlock):

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

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/RegExp.h:
  • runtime/ScopedArgumentsTable.h:
  • runtime/StackFrame.h:
  • runtime/StructureInlines.h:
  • runtime/SymbolTable.h:

Source/WTF:

BitVectors have to be friends with JSC::CacheBitVector to allow
serializing its buffer as part of the bytecode cache encoding.

  • wtf/BitVector.h:

Tools:

Add test helper to execute bytecode-cache tests: it executes each test
twice, the first with JSC_diskCachePath set to a temporary directory
and second with JSC_forceDiskCache=true (in addition to the cache path)
to guarantee that only the disk cache is being used and no new
UnlinkedCodeBlocks are being created.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper: Added.
  • Scripts/run-jsc-stress-tests:
1:18 AM Changeset in webkit [240209] by Chris Fleizach
  • 18 edits
    2 adds in trunk

AX: Support returning relative frames for accessibility
https://bugs.webkit.org/show_bug.cgi?id=193414
<rdar://problem/47268501>

Reviewed by Zalan Bujtas.

Source/WebCore:

Create a way for assistive technologies to retrieve a frame in page space that can be transformed to its final screen space by having the AT message the UI process separately.

Consolidate rect/point conversion methods for macOS and iOS.
This is only needed on WebKit2, where we have to reach back across to the hosting process to get the final frame, so we can skip this test on WK1.

Tests: accessibility/mac/relative-frame.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityConvertPointToViewSpace:]):
(-[WebAccessibilityObjectWrapper _accessibilityRelativeFrame]):
(-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
(-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
(-[WebAccessibilityObjectWrapper accessibilityFrame]):
(-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
(-[WebAccessibilityObjectWrapper rectsForSelectionRects:]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]): Deleted.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertPathToScreenSpaceFunction):
(-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]):
(-[WebAccessibilityObjectWrapperBase convertPointToScreenSpace:]): Deleted.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
(-[WebAccessibilityObjectWrapper position]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView accessibilityAttributeValue:forParameter:]):
(-[WKWebView IGNORE_WARNINGS_END]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView accessibilityAttributeValue:forParameter:]):
(-[WKView IGNORE_WARNINGS_END]):

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::accessibilityAttributeValue):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView accessibilityConvertRelativeFrameFromPage:]):

Tools:

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

(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::attributesOfElement):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):

LayoutTests:

  • accessibility/mac/relative-frame-expected.txt: Added.
  • accessibility/mac/relative-frame.html: Added.
  • platform/mac-wk1/TestExpectations:
12:52 AM Changeset in webkit [240208] by graouts@webkit.org
  • 12 edits in trunk

Add a POINTER_EVENTS feature flag
https://bugs.webkit.org/show_bug.cgi?id=193577
<rdar://problem/47408511>

Unreviewed. Also enable Pointer Events for iosmac.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Jan 19, 2019:

9:26 PM Changeset in webkit [240207] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.
https://bugs.webkit.org/show_bug.cgi?id=193613

Reviewed by Antti Koivisto.

Source/WebCore:

Float items in m_floats list should stay in horizontal position order (left/right edge).

When adding a new float item to floating state list, we have to ensure that it is definitely the left(right)-most item.
Normally it is, but negative horizontal margins can push the float box beyond another float box.

<div style="float: left; height: 10px; width: 10px;"></div>
<div style="float: left; height: 10px; width: 10px; margin-left: -80px;"></div>

The second float's right edge beyond the first float' left edge. THe second float is not the right(inner)-most float anymore.

Test: fast/block/float/floats-with-negative-horizontal-margin.html

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::areFloatsHorizontallySorted):
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForFloatAvoiding const):
(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::append):

Tools:

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

LayoutTests:

  • fast/block/float/floats-with-negative-horizontal-margin-expected.html: Added.
  • fast/block/float/floats-with-negative-horizontal-margin.html: Added.
4:28 PM Changeset in webkit [240206] by youenn@apple.com
  • 5 edits in trunk

getUserMedia with a deviceId exact constraint with an empty string value should succeed
https://bugs.webkit.org/show_bug.cgi?id=193541
<rdar://problem/47357218>

Reviewed by Eric Carlson.

If there is a deviceId constraint, remove any empty string from ideal/exact string list.
This will make the device selection be solely based on other constraints.
An improvement might be for 'exact' constraint to pick the default device.
There is currently no such notion of a default device.
Picking the best fitting device seems a good tradeoff.
Covered by updated test.

  • platform/mediastream/MediaConstraints.cpp:

(WebCore::MediaTrackConstraintSetMap::set):

  • platform/mediastream/MediaConstraints.h:

(WebCore::StringConstraint::removeEmptyStringConstraint):

3:31 PM Changeset in webkit [240205] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

AXSelected attribute on RadioButton should not be settable.
https://bugs.webkit.org/show_bug.cgi?id=193371

Patch by Eric Liang <ericliang@apple.com> on 2019-01-19
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/set-selected-editable.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canSetSelectedAttribute const):

LayoutTests:

This change make RadioButton AXSelected attribute no-settable. If this attribute is not writable, then the trackpad should work correctly.

  • accessibility/set-selected-editable-expected.txt: Added.
  • accessibility/set-selected-editable.html: Added.
3:15 PM Changeset in webkit [240204] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Reorder JSSegmentedVariableObject member for preparation of JSGlobalObject memory reduction
https://bugs.webkit.org/show_bug.cgi?id=193609

Reviewed by Sam Weinig.

Basically, we should order the members in large => small order not to add paddings.

  • runtime/JSSegmentedVariableObject.h:
9:38 AM Changeset in webkit [240203] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Follow-up: iOS: Updating input mode should update the software keyboard
<https://bugs.webkit.org/show_bug.cgi?id=193565>
<rdar://problem/47376334>

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedElementDidChangeInputMode): Fix iOS
Debug builds after r240199 by downcasting element to
HTMLElement before calling canonicalInputMode().

9:38 AM Changeset in webkit [240202] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Sort WebKit Xcode project file

  • WebKit.xcodeproj/project.pbxproj:
4:24 AM Changeset in webkit [240201] by commit-queue@webkit.org
  • 16 edits in trunk

Add a POINTER_EVENTS feature flag
https://bugs.webkit.org/show_bug.cgi?id=193577

Patch by Antoine Quint <Antoine Quint> on 2019-01-19
Reviewed by Dean Jackson.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Only expose the PointerEvent interface if the POINTER_EVENTS feature is enabled.

  • Configurations/FeatureDefines.xcconfig:
  • dom/EventNames.in:
  • dom/PointerEvent.cpp:
  • dom/PointerEvent.h:
  • dom/PointerEvent.idl:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1:08 AM Changeset in webkit [240200] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Updating commit in OSBuildFetcher should respect revision range in config.
https://bugs.webkit.org/show_bug.cgi?id=193558

Reviewed by Ryosuke Niwa.

OSBuildFetcher._fetchAvailableBuilds should filter out commits those are not in
revision range specified by cofnig.

  • server-tests/tools-os-build-fetcher-tests.js: Added a unit test for this change.
  • tools/js/os-build-fetcher.js:

(prototype.async._fetchAvailableBuilds): Filter out commits from update list if commit
revision is out of range.

Jan 18, 2019:

11:53 PM Changeset in webkit [240199] by rniwa@webkit.org
  • 19 edits
    2 adds in trunk

iOS: Updating input mode should update the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=193565
<rdar://problem/47376334>

Reviewed by Wenson Hsieh.

Source/WebCore:

Let the chrome client know that the focused element's inputmode had changed.

Test: fast/forms/ios/inputmode-none-removed.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::parseAttribute):

  • page/ChromeClient.h:

Source/WebKit:

Update the software keyboard when the inputmode content attribute on the focused element had been mutated.

  • Scripts/webkit/messages.py:
  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::focusedElementDidChangeInputMode):

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

(-[WKContentView _didUpdateInputMode:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::focusedElementDidChangeInputMode):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::focusedElementDidChangeInputMode):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedElementDidChangeInputMode):

  • WebProcess/WebPage/WebPage.h:

LayoutTests:

Added a regression test for removing inputmode content attribute with the value of "none".

The test methodology is different between testRunner and in-browser since we don't force
software keyboard while running layout tests inside simulator which can elimiate
the visual viewport difference inside the test runner, and in-browser testing obviously
doesn't have access to the internal keyboard metrics.

  • fast/forms/ios/inputmode-none-removed-expected.txt: Added.
  • fast/forms/ios/inputmode-none-removed.html: Added.
9:42 PM Changeset in webkit [240198] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Adjust WKDrawingView protocol method name
https://bugs.webkit.org/show_bug.cgi?id=193604

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKDrawingView.mm:

(-[WKDrawingView canvasViewDrawingDidChange:]):
(-[WKDrawingView drawingDidChange:]): Deleted.

9:28 PM Changeset in webkit [240197] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[WebKit] Change Xcode folders to map to folders on disk

  • WebKit.xcodeproj/project.pbxproj: Update these folders:
  • Shared/Authentication
  • Shared/Authentication/cocoa
9:28 PM Changeset in webkit [240196] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

[PAL] Change Xcode folders to map to folders on disk

Found by tidy-Xcode-project-file script (see Bug 188754).

  • PAL.xcodeproj/project.pbxproj: Update these folders:
  • pal/avfoundation
  • pal/crypto/commoncrypto
  • pal/ios
8:22 PM Changeset in webkit [240195] by BJ Burg
  • 8 edits in trunk/Source

Automation.computeElementLayout should return visual viewport-aware coordinates
https://bugs.webkit.org/show_bug.cgi?id=193598
<rdar://problem/35325644>

Reviewed by Simon Fraser.

Source/WebCore:

  • page/FrameView.h: export symbol to be usable from WebKit.
  • page/FrameView.cpp:

(WebCore::FrameView::clientToLayoutViewportRect const): Added.
Do the same thing as clientToLayoutViewportPoint with a rect instead.

Source/WebKit:

Previously I added CoordinateSystem::VisualViewport to stub out this for iOS.
But I think that it's a mistake for safaridriver to care about VisualViewport
being enabled or not, because it is a runtime-switchable setting.

This patch removes CoordinateSystem::VisualViewport. Make the existing
CoordinateSystem::LayoutViewport use visual viewport semantics if needed.

This is tested by WebDriver element clicking tests. There should not be any
difference in behavior until it is possible to zoom with gestures via WebDriver.

  • Shared/CoordinateSystem.h:
  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::protocolStringToCoordinateSystem):

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout):

7:35 PM Changeset in webkit [240194] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

JSScript API should only take ascii files.
https://bugs.webkit.org/show_bug.cgi?id=193420

Reviewed by Saam Barati.

This patch leaves the UTF8 method for binary compatablity, which
will be removed later.

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

(fillBufferWithContentsOfFile):
(+[JSScript scriptFromASCIIFile:inVirtualMachine:withCodeSigning:andBytecodeCache:]):
(+[JSScript scriptFromUTF8File:inVirtualMachine:withCodeSigning:andBytecodeCache:]):

  • API/tests/testapi.mm:

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

7:27 PM Changeset in webkit [240193] by keith_miller@apple.com
  • 4 edits in trunk/Source/bmalloc

gigacage slide should randomize both start and end
https://bugs.webkit.org/show_bug.cgi?id=193601

Reviewed by Yusuke Suzuki.

This patch makes it so that the gigacade slide has an arbitrary
distance from the end as well as the start. This is done by
picking a random size then based on that size picking an random
starting offset.

  • bmalloc/Gigacage.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

7:05 PM Changeset in webkit [240192] by sbarati@apple.com
  • 3 edits in trunk/PerformanceTests

Use scores everywhere in JetStream2's UI
https://bugs.webkit.org/show_bug.cgi?id=193593

Reviewed by Keith Miller.

  • JetStream2/JetStreamDriver.js:

(DefaultBenchmark.prototype.processResults):
(DefaultBenchmark.prototype.get score):
(DefaultBenchmark.scoreDescription):
(WSLBenchmark.prototype.processResults):
(WSLBenchmark.prototype.get score):
(WSLBenchmark.scoreDescription):
(WasmBenchmark.prototype.processResults):
(WasmBenchmark.prototype.get score):
(WasmBenchmark.scoreDescription):

  • JetStream2/index.html:
5:06 PM Changeset in webkit [240191] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Disable the run-jsc-stress-test remote host key check [second round].
https://bugs.webkit.org/show_bug.cgi?id=192988

Patch by Zhifei FANG <zhifei_fang@apple.com> on 2019-01-18
Reviewed by Dewei Zhu.

  • Scripts/run-jsc-stress-tests:
4:22 PM Changeset in webkit [240190] by eric.carlson@apple.com
  • 7 edits
    4 adds in trunk/Source

Revert r238815, it broke WK1 video fullscreen on Mac
https://bugs.webkit.org/show_bug.cgi?id=193586
<rdar://problem/47358941>

Reviewed by Jer Noble.

Source/WebCore:

  • PlatformMac.cmake:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • WebView/WebVideoFullscreenController.h: Added.
  • WebView/WebVideoFullscreenController.mm: Added.

(SOFT_LINK_CLASS):
(-[WebVideoFullscreenController init]):
(-[WebVideoFullscreenController dealloc]):
(-[WebVideoFullscreenController fullscreenWindow]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController videoElement]):
(-[WebVideoFullscreenController setVideoElement:]):
(-[WebVideoFullscreenController clearFadeAnimation]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):
(-[WebVideoFullscreenController windowDidEnterFullscreen]):
(-[WebVideoFullscreenController videoElementRect]):
(-[WebVideoFullscreenController applicationDidResignActive:]):
(frameExpandedToRatioOfFrame):
(createBackgroundFullscreenWindow):
(-[WebVideoFullscreenController setupFadeAnimationIfNeededAndFadeIn:]):
(-[WebVideoFullscreenController enterFullscreen:]):
(-[WebVideoFullscreenController exitFullscreen]):
(-[WebVideoFullscreenController applicationDidChangeScreenParameters:]):
(-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
(-[WebVideoFullscreenController _requestExit]):
(-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]):
(-[WebVideoFullscreenController requestExitFullscreen]):
(-[WebVideoFullscreenController fadeHUDIn]):
(-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
(-[WebVideoFullscreenController rateChanged:]):
(-[WebVideoFullscreenWindow initWithContentRect:styleMask:backing:defer:]):
(-[WebVideoFullscreenWindow dealloc]):
(-[WebVideoFullscreenWindow resignFirstResponder]):
(-[WebVideoFullscreenWindow canBecomeKeyWindow]):
(-[WebVideoFullscreenWindow mouseDown:]):
(-[WebVideoFullscreenWindow cancelOperation:]):
(-[WebVideoFullscreenWindow animatedResizeDidEnd]):
(-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
(-[WebVideoFullscreenWindow animationDidEnd:]):
(-[WebVideoFullscreenWindow mouseMoved:]):

  • WebView/WebVideoFullscreenHUDWindowController.h: Added.
  • WebView/WebVideoFullscreenHUDWindowController.mm: Added.

(-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
(-[WebVideoFullscreenHUDWindow canBecomeKeyWindow]):
(-[WebVideoFullscreenHUDWindow cancelOperation:]):
(-[WebVideoFullscreenHUDWindow center]):
(-[WebVideoFullscreenHUDWindow keyDown:]):
(-[WebVideoFullscreenHUDWindow resignFirstResponder]):
(-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
(-[WebVideoFullscreenHUDWindowController init]):
(-[WebVideoFullscreenHUDWindowController dealloc]):
(-[WebVideoFullscreenHUDWindowController setArea:]):
(-[WebVideoFullscreenHUDWindowController keyDown:]):
(-[WebVideoFullscreenHUDWindowController delegate]):
(-[WebVideoFullscreenHUDWindowController setDelegate:]):
(-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]):
(-[WebVideoFullscreenHUDWindowController unscheduleTimeUpdate]):
(-[WebVideoFullscreenHUDWindowController fadeWindowIn]):
(-[WebVideoFullscreenHUDWindowController fadeWindowOut]):
(-[WebVideoFullscreenHUDWindowController closeWindow]):
(createMediaUIControl):
(createControlWithMediaUIControlType):
(createTimeTextField):
(createMediaUIBackgroundView):
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
(-[WebVideoFullscreenHUDWindowController updateVolume]):
(-[WebVideoFullscreenHUDWindowController updateTime]):
(-[WebVideoFullscreenHUDWindowController endScrubbing]):
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
(-[WebVideoFullscreenHUDWindowController currentTime]):
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
(-[WebVideoFullscreenHUDWindowController duration]):
(-[WebVideoFullscreenHUDWindowController maxVolume]):
(-[WebVideoFullscreenHUDWindowController volumeChanged:]):
(-[WebVideoFullscreenHUDWindowController setVolumeToZero:]):
(-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]):
(-[WebVideoFullscreenHUDWindowController decrementVolume]):
(-[WebVideoFullscreenHUDWindowController incrementVolume]):
(-[WebVideoFullscreenHUDWindowController volume]):
(-[WebVideoFullscreenHUDWindowController setVolume:]):
(-[WebVideoFullscreenHUDWindowController updatePlayButton]):
(-[WebVideoFullscreenHUDWindowController updateRate]):
(-[WebVideoFullscreenHUDWindowController togglePlaying:]):
(-[WebVideoFullscreenHUDWindowController playing]):
(-[WebVideoFullscreenHUDWindowController setPlaying:]):
(timeToString):
(-[WebVideoFullscreenHUDWindowController remainingTimeText]):
(-[WebVideoFullscreenHUDWindowController elapsedTimeText]):
(-[WebVideoFullscreenHUDWindowController mouseEntered:]):
(-[WebVideoFullscreenHUDWindowController mouseExited:]):
(-[WebVideoFullscreenHUDWindowController rewind:]):
(-[WebVideoFullscreenHUDWindowController fastForward:]):
(-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
(-[WebVideoFullscreenHUDWindowController windowDidExpose:]):
(-[WebVideoFullscreenHUDWindowController windowDidClose:]):

  • WebView/WebView.mm:

(-[WebView _enterVideoFullscreenForVideoElement:mode:]):
(-[WebView _exitVideoFullscreen]):

4:18 PM Changeset in webkit [240189] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] unit-test failure Builder GTK Linux 32-bit Release doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=193597

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
4:13 PM Changeset in webkit [240188] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

Web Inspector: Audit: don't keep the injected sub-objects alive between runs
https://bugs.webkit.org/show_bug.cgi?id=193594
<rdar://problem/47398091>

Reviewed by Joseph Pecoraro.

Rather than save the InspectorAuditAccessibilityObject and InspectorAuditDOMObject
between individual Audit.setup invocations, we should only keep them alive so long as the
injected WebInspectorAudit object is alive (e.g. from Audit.setup to Audit.teardown).

This change fixes inspector/audit/run-accessibility.html.

  • inspector/agents/page/PageAuditAgent.h:
  • inspector/agents/page/PageAuditAgent.cpp:

(WebCore::PageAuditAgent::populateAuditObject):

4:10 PM Changeset in webkit [240187] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[build.webkit.org] api tests failures are incorrectly named as unit test failures
https://bugs.webkit.org/show_bug.cgi?id=193595

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/build.webkit.org-config/factories.py: Renamed RunUnitTests to RunAPITests.
  • BuildSlaveSupport/build.webkit.org-config/steps.py: Ditto.
  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.
4:08 PM Changeset in webkit [240186] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Follow-up: Gigacages should start allocations from a slide
<https://bugs.webkit.org/show_bug.cgi?id=193523>
<rdar://problem/44958707>

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged): Add UNUSED_PARAM(kind) to
fix the build.

3:45 PM Changeset in webkit [240185] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Another attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
(https://bugs.webkit.org/show_bug.cgi?id=193583)

Substitute ENABLE(FULL_KEYBOARD_ACCESS) for PLATFORM(MAC). On Mac, we always build with
ENABLE(FULL_KEYBOARD_ACCESS) enabled.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing):

3:44 PM Changeset in webkit [240184] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

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

Discussed with John Wilander.

  • pal/spi/cf/CFNetworkSPI.h: Declare new SPI for the internal

macOS 10.12 Sierra SDK since it will never appear in those
headers. This fixes the build for trunk WebKit on Sierra.

3:34 PM Changeset in webkit [240183] by dbates@webkit.org
  • 5 edits in trunk/Source

Fix some build issues.

Source/WebCore:

Including UIKitSoftLinking.h is not compatible with unified builds.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

Include missing header WKDrawingCoordinator.

  • UIProcess/ios/WKInkPickerView.mm:
3:26 PM Changeset in webkit [240182] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Test group results notification should not say a build request to build had failed even when it had successfully completed.
https://bugs.webkit.org/show_bug.cgi?id=193064

Reviewed by Ryosuke Niwa.

Should show 'Build completed' or 'Build failed' for build type build requests.

  • browser-tests/test-group-result-page-tests.js: Added a unit test to guard this bug.
  • tools/js/test-group-result-page.js: Show 'Build completed' or 'Build failed' for build type build requests.
3:15 PM Changeset in webkit [240181] by timothy_horton@apple.com
  • 10 edits in trunk/Source

Get rid of ADVANCED_SPELL_CHECKING
https://bugs.webkit.org/show_bug.cgi?id=193592

Reviewed by Wenson Hsieh.

Source/WebCore/PAL:

  • pal/spi/mac/NSSpellCheckerSPI.h:

It's always true on macOS, and all but one use of it is already inside PLATFORM(MAC)

Source/WebKit:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
(WebKit::WebViewImpl::insertText):

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.mm:

(insertionPointFromCurrentSelection):
(WebEditorClient::checkTextOfParagraph):
(WebEditorClient::getGuessesForWord):
(WebEditorClient::requestCandidatesForSelection):
(WebEditorClient::requestCheckingOfString):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView insertText:]):

Source/WTF:

  • wtf/Platform.h:
3:09 PM Changeset in webkit [240180] by Justin Fan
  • 19 edits
    2 adds in trunk

(WIP) [WebGPU] WebGPUProgrammablePassEncoder::setBindGroup prototype
https://bugs.webkit.org/show_bug.cgi?id=193457
<rdar://problem/47296678>

Reviewed by Dean Jackson.

Source/WebCore:

Enable WebGPU developers to assign buffer bind groups and access them via render pipeline.

Test: webgpu/buffer-resource-triangles.html

  • Modules/webgpu/WebGPUBindGroup.h:

(WebCore::WebGPUBindGroup::bindGroup const): Added getter.

  • Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:

(WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Added. Delegates call to GPUProgrammablePassEncoder.

  • Modules/webgpu/WebGPUProgrammablePassEncoder.h: Enable setBindGroup.
  • Modules/webgpu/WebGPUProgrammablePassEncoder.idl: ditto.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPUBindGroup.h:

(WebCore::GPUBindGroup::layout const): Added getter.
(WebCore::GPUBindGroup::bindings const): ditto.

  • platform/graphics/gpu/GPUBindGroupLayout.h: Added ArgumentEncoderBuffer struct to retain ptr to both MTLArgumentEncoders and their argument MTLBuffers.

(WebCore::GPUBindGroupLayout::ArgumentEncoderBuffer::operator! const):
(WebCore::GPUBindGroupLayout::vertexArguments const): Added. Getter.
(WebCore::GPUBindGroupLayout::fragmentArguments const): ditto.
(WebCore::GPUBindGroupLayout::computeArguments const): ditto.

  • platform/graphics/gpu/GPUDevice.cpp: Refactored unnecessary header include.
  • platform/graphics/gpu/GPUDevice.h: ditto.
  • platform/graphics/gpu/GPUProgrammablePassEncoder.h:

(WebCore::GPUProgrammablePassEncoder::setVertexBuffer): Added. Delegates to MTLCommandEncoder call.
(WebCore::GPUProgrammablePassEncoder::setFragmentBuffer): ditto.

  • platform/graphics/gpu/GPURenderPassEncoder.h:
  • platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:

(WebCore::tryCreateArgumentEncoderAndBuffer): Replace newEncoder(). Now create an ArgumentEncoderBuffer object from an array of MTLArgumentDescriptors, if able.
(WebCore::GPUBindGroupLayout::tryCreate): Refactor to support ArgumentEncoderBuffers, and allocate MTLBuffers for argument encoders.
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout): Support ArgumentEncoderBuffers.
(WebCore::newEncoder): Deleted.

  • platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:

(WebCore::GPUCommandBuffer::GPUCommandBuffer):

  • platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:

(WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Set a buffer resource on the MTLArgumentEncoder, and call useResource on the command encoder.
(WebCore::GPUProgrammablePassEncoder::setBindGroup): Parses the bind group to assign each resource on its matching MTLArgumentEncoder.

  • platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:

(WebCore::GPURenderPassEncoder::useResource): Resolves call from GPUProgrammablePassEncoder to call on MTLRenderCommandEncoder.
(WebCore::GPURenderPassEncoder::setVertexBuffer): ditto.
(WebCore::GPURenderPassEncoder::setFragmentBuffer): ditto.

LayoutTests:

Draw 3 triangles via WebGPU to create a green square canvas, with reference.
Each vertex is stored in its own WebGPUBuffer and they are mix/matched per bind group.
This tests multiple resource bindings in one bind group as well as setting multiple
bind groups per draw call and per command encoder.

  • webgpu/buffer-resource-triangles-expected.html: Added. Reference generated using 2D canvas.
  • webgpu/buffer-resource-triangles.html: Added.

1) Draw top two triangles using two bind groups in one draw call.
2) Swap first bind group and issue second draw call to draw middle triangle.

  • webgpu/js/webgpu-functions.js:

(createBasicPipeline): Now handles new primitive topologies.

3:05 PM Changeset in webkit [240179] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Another attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
(https://bugs.webkit.org/show_bug.cgi?id=193583)

Only override RenderTheme::platformFocusRingColor() when building with ENABLE(FULL_KEYBOARD_ACCESS)
enabled.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:
3:02 PM Changeset in webkit [240178] by Chris Dumez
  • 4 edits in trunk

Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
https://bugs.webkit.org/show_bug.cgi?id=193588
<rdar://problem/47131566>

Reviewed by Alex Christensen.

Source/WebKit:

When the WebPageProxy needs to create initialization parameters for its WebPage in the
WebContent process, it calls WebProcessProxy::addWebUserContentControllerProxy()
which calls WebUserContentControllerProxy::addProcess(). This last call is supposed to
register the WebProcessProxy with the WebUserContentControllerProxy and adding the
contentRuleLists to the WebPageCreationParameters. The issue is that if the
WebUserContentControllerProxy already knows about this WebProcessProxy, it would return
early and not populate the WebPageCreationParameters.

In PSON world, when navigating back to a page that failed to enter page cache, we reuse
the process where we previously loaded the page but re-create a new WebPage on the
WebContent process site. When this happens, WebUserContentControllerProxy would not
add the contentRuleLists to the WebPageCreationParameters and the new WebPage in the
previously-suspended process would be missing them.

  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::addProcess):

Tools:

Add layout test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2:55 PM Changeset in webkit [240177] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
(https://bugs.webkit.org/show_bug.cgi?id=193583)

Namespace qualify call to getUIColorClass().

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::platformFocusRingColor const):

2:53 PM Changeset in webkit [240176] by jer.noble@apple.com
  • 39 edits
    22 adds in trunk

SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
https://bugs.webkit.org/show_bug.cgi?id=189553

Reviewed by Tim Horton.

.:

  • Makefile.shared:

PerformanceTests:

  • MediaTime/Configurations/Base.xcconfig:
  • MediaTime/Configurations/SDKVariant.xcconfig: Added.

Source/bmalloc:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/ThirdParty/ANGLE:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/ThirdParty/libwebrtc:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebCore:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.
  • Configurations/WebCore.xcconfig:

Source/WebCore/PAL:

  • Configurations/Base.xcconfig:
  • Configurations/PAL.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebKit:

  • Configurations/Base.xcconfig:
  • Configurations/BaseTarget.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Source/WebKitLegacy/mac:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.
  • Configurations/WebKitLegacy.xcconfig:

Source/WTF:

  • Configurations/Base.xcconfig:
  • Configurations/SDKVariant.xcconfig: Added.

Tools:

Add a check-webkit-style check that ensures all SDKVariant.xcconfig files match.

  • ContentExtensionTester/Configurations/Base.xcconfig:
  • ContentExtensionTester/Configurations/SDKVariant.xcconfig: Added.
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/SDKVariant.xcconfig: Added.
  • ImageDiff/cg/Configurations/Base.xcconfig:
  • ImageDiff/cg/Configurations/SDKVariant.xcconfig: Added.
  • MiniBrowser/Configurations/Base.xcconfig:
  • MiniBrowser/Configurations/SDKVariant.xcconfig: Added.
  • MobileMiniBrowser/Configurations/Base.xcconfig:
  • MobileMiniBrowser/Configurations/SDKVariant.xcconfig: Added.
  • Scripts/webkitpy/style/checker.py:

(_all_categories):
(FileType):
(CheckerDispatcher._file_type):
(CheckerDispatcher._create_checker):

  • Scripts/webkitpy/style/checkers/sdkvariant.py: Added.

(SDKVariantChecker):
(SDKVariantChecker.init):
(SDKVariantChecker.check):

  • TestWebKitAPI/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/SDKVariant.xcconfig: Added.
  • WebEditingTester/Configurations/Base.xcconfig:
  • WebEditingTester/Configurations/SDKVariant.xcconfig: Added.
  • WebKitLauncher/Configurations/SDKVariant.xcconfig: Added.
  • WebKitTestRunner/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/SDKVariant.xcconfig: Added.
  • lldb/lldbWebKitTester/Configurations/Base.xcconfig:
  • lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig: Added.
2:48 PM Changeset in webkit [240175] by keith_miller@apple.com
  • 11 edits in trunk/Source

Gigacages should start allocations from a slide
https://bugs.webkit.org/show_bug.cgi?id=193523

Reviewed by Mark Lam.

Source/bmalloc:

This patch makes it so that Gigacage Heaps slide the start of the
cage by some random amount. We still ensure that there is always
at least 4/2GB, on MacOS/iOS respectively, of VA space available
for allocation.

Also, this patch changes some macros into constants since macros
are the devil.

  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::protectGigacageBasePtrs):
(Gigacage::bmalloc::unprotectGigacageBasePtrs):
(Gigacage::bmalloc::runwaySize):
(Gigacage::ensureGigacage):
(Gigacage::shouldBeEnabled):

  • bmalloc/Gigacage.h:

(Gigacage::name):
(Gigacage::gigacageSizeToMask):
(Gigacage::size):
(Gigacage::mask):
(Gigacage::basePtr):
(Gigacage::ensureGigacage):
(Gigacage::wasEnabled):
(Gigacage::isCaged):
(Gigacage::isEnabled):
(Gigacage::caged):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled):
(Gigacage::canPrimitiveGigacageBeDisabled):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Sizes.h:

(bmalloc::Sizes::maskSizeClass):
(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::logSizeClass):
(bmalloc::Sizes::logObjectSize):
(bmalloc::Sizes::sizeClass):
(bmalloc::Sizes::objectSize):
(bmalloc::Sizes::pageSize):

Source/JavaScriptCore:

This patch changes some macros into constants since macros are the
devil.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

This patch changes some macros into constants since macros are the
devil.

  • wtf/Gigacage.cpp:
  • wtf/Gigacage.h:
2:26 PM Changeset in webkit [240174] by dbates@webkit.org
  • 11 edits
    2 adds in trunk/Source/WebCore

CSS auto focus-ring outlines don't render on iOS
https://bugs.webkit.org/show_bug.cgi?id=193583
<rdar://problem/6508697>

Reviewed by Simon Fraser.

Source/WebCore:

Implement support for drawing focus rings on iOS when built with ENABLE(FULL_KEYBOARD_ACCESS)
enabled.

For now the focus ring drawing for iOS is tangled up into the Mac-specific code to draw
animated focus rings. I will fix this in <https://bugs.webkit.org/show_bug.cgi?id=193591>.

  • SourcesCocoa.txt: Add file ColorIOS.mm.
  • WebCore.xcodeproj/project.pbxproj: Add files ColorIOS.{h, mm}.
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::drawFocusRingAtTime):
(WebCore::GraphicsContext::drawFocusRing):
Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
This is always enabled on Mac.

  • platform/ios/ColorIOS.h: Added.
  • platform/ios/ColorIOS.mm: Added.

(WebCore::colorFromUIColor): Convert a UIColor to a WebCore::Color.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintFocusRing):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintAreaElementFocusRing):
Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
This is always enabled on Mac.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::platformFocusRingColor const): Implement this override for iOS.
(WebCore::RenderThemeIOS::supportsFocusRing const): Implement this override for iOS to always
return false - the iOS theme code does not support painting focus rings. By returning false we
will use the platform-independent, non-theme code path to draw focus rings.

Source/WebCore/PAL:

Forward declare some IPI.

  • pal/spi/ios/UIKitSPI.h:
2:21 PM Changeset in webkit [240173] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
https://bugs.webkit.org/show_bug.cgi?id=193589

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.get supportsSave):
(WI.NetworkTableContentView.prototype._HARResources):

1:33 PM Changeset in webkit [240172] by Kocsen Chung
  • 1 copy in tags/Safari-607.1.25

Tag Safari-607.1.25.

1:32 PM Changeset in webkit [240171] by Matt Lewis
  • 10 edits in trunk/Source

Unreviewed, rolling out r240160.

This broke multiple internal builds.

Reverted changeset:

"Gigacages should start allocations from a slide"
https://bugs.webkit.org/show_bug.cgi?id=193523
https://trac.webkit.org/changeset/240160

1:30 PM Changeset in webkit [240170] by Kocsen Chung
  • 2 edits in branches/safari-607-branch

Cherry-pick r240118. rdar://problem/47394122

[Win] gperf command not found
https://bugs.webkit.org/show_bug.cgi?id=193538
<rdar://problem/47250549>

Reviewed by Brent Fulgham.

CMake only searches for gperf if ENABLE_WEBCORE is on. ENABLE_WEBCORE needs to be set to ON.

  • Source/cmake/OptionsAppleWin.cmake:

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

1:16 PM Changeset in webkit [240169] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Follow-up: Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
<https://webkit.org/b/193568>
<rdar://problem/47381130>

  • editing/cocoa/DictionaryLookup.mm:

(-[WebRevealHighlight drawHighlightContentForItem:context:]):
Fix the build by changing getUIApplicationClass() to
PAL::getUIApplicationClass().

12:41 PM Changeset in webkit [240168] by ddkilzer@apple.com
  • 30 edits in trunk

Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
<https://webkit.org/b/193568>
<rdar://problem/47381130>

Reviewed by Alex Christensen.

Source/WebCore:

This does the following:

  • Removes local soft-linking of UIKit.
  • Switches to using PAL functions for soft-linking.
  • SourcesCocoa.txt: Add 4 source files to UnifiedSources.
  • WebCore.xcodeproj/project.pbxproj: Remove 4 sources files

from WebCore target now that they are in UnifiedSources.

  • editing/cocoa/DictionaryLookup.mm:
  • editing/cocoa/HTMLConverter.mm: Move SPI to UIKitSPI.h. Remove

declarations in public headers.
(_fontForNameAndSize): Change use of getUIFontClass() to
PlatformFontClass.
(HTMLConverter::_processElement): Add cast here since compiler
finds the wrong selector for +clearColor and thinks it returns a
CIColor * object. The same cast already exists in
VideoFullscreenInterfaceAVKit.mm.

  • page/cocoa/SettingsBaseCocoa.mm:

(WebCore::SettingsBase::defaultTextAutosizingEnabled):

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(-[WebMediaSessionHelper initWithCallback:]):

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

(WebCore::exernalDeviceDisplayNameForPlayer):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showLetterpressedGlyphsWithAdvances):

  • platform/ios/DragImageIOS.mm:

(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):
(WebCore::cascadeForSystemFont):
(WebCore::createDragImageForLink):
(WebCore::createDragImageForSelection):
(WebCore::createDragImageForRange):
(WebCore::createDragImageForColor):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::PlatformPasteboard):
(WebCore::PlatformPasteboard::color):
(WebCore::registerItemToPasteboard):
(WebCore::PlatformPasteboard::setColor):

  • platform/ios/ThemeIOS.mm:

(WebCore::ThemeIOS::userPrefersReducedMotion const):

  • platform/ios/UserAgentIOS.mm:

(WebCore::isClassic):
(WebCore::isClassicPad):
(WebCore::isClassicPhone):

  • platform/ios/ValidationBubbleIOS.mm:

(-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::show):
(WebCore::fallbackViewController):

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(clearUIColor):
(allocWebAVPictureInPicturePlayerLayerViewInstance):
(WebAVPlayerLayerView_videoView):
(fallbackViewController):
(VideoFullscreenInterfaceAVKit::doSetup):

  • platform/ios/WebEvent.mm:

(+[WebEvent modifierFlags]):

  • platform/ios/WebItemProviderPasteboard.mm:

(allLoadableClasses):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::setUpFullscreen):

  • platform/network/mac/WebCoreURLResponse.mm: Add missing header

after unified sources were updated.

  • rendering/RenderThemeIOS.mm:

(WebCore::contentSizeCategoryDidChange):
(WebCore::RenderThemeIOS::RenderThemeIOS):
(WebCore::RenderThemeIOS::contentSizeCategory):
(WebCore::RenderThemeIOS::systemColor const):
(WebCore::attachmentActionColor):
(WebCore::attachmentTitleColor):
(WebCore::attachmentSubtitleColor):
(WebCore::iconForAttachment):

  • testing/Internals.mm:

(WebCore::Internals::userPrefersReducedMotion const):

Source/WebCore/PAL:

  • pal/ios/UIKitSoftLink.h:
  • pal/ios/UIKitSoftLink.mm:
  • Add constants, classes and functions that were previously soft-linked in separate source files.
  • UIAccessibilityAnnouncementNotification is declared as a variable because this constant is not marked as const in UIKit.
  • pal/spi/ios/UIKitSPI.h:
  • Move SPI declarations from HTMLConverter.mm to here.

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:
  • Remove unused soft-linking macros.

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
(-[WebUITextIndicatorData initWithImage:scale:]):

  • Update to use exported PAL functions.

Tools:

Make sure no one re-introduces UIKit soft-linking by adding a
style rule.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language): Add softlink/uikit check.
(CppChecker): Enable softlink/uikit check.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest): Add test for softlink/uikit.

12:39 PM Changeset in webkit [240167] by commit-queue@webkit.org
  • 24 edits in trunk/Websites/bugs.webkit.org

Update Bugzilla running on bugs.webkit.org and bugs.webkit-uat.org to version 5.0.4
https://bugs.webkit.org/show_bug.cgi?id=193477
<rdar://problem/37618737>

Patch by Ling Ho <lingho@apple.com> on 2019-01-18
Reviewed by Lucas Forschler.

  • Bugzilla/Config.pm:

(write_params):
(read_param_file):

  • Bugzilla/Constants.pm:
  • Bugzilla/DB/Sqlite.pm:

(sql_date_format):

  • Bugzilla/Install/Filesystem.pm:

(update_filesystem):
(_update_old_mining_filenames):

  • Bugzilla/Install/Requirements.pm:

(REQUIRED_MODULES):

  • Bugzilla/JobQueue.pm:

(subprocess_worker):
(kill_worker):

  • Bugzilla/Migrate.pm:

(parse_date):

  • Bugzilla/Template.pm:

(_concatenate_css):
(_concatenate_js):

  • Bugzilla/Util.pm:

(read_text):
(write_text):
(datetime_from):

  • contrib/jb2bz.py:

(process_reply_file):
(maybe_add_attachment):
(process_text_plain):
(process_multi_part):
(process_jitterbug):
(process_mime_body): Deleted.

  • docs/en/rst/conf.py:
  • docs/en/rst/installing/linux.rst:
  • docs/en/rst/installing/mac-os-x.rst:
  • docs/en/rst/installing/migrating-from-2.inc.rst:
  • docs/en/rst/installing/migrating.rst:
  • docs/en/rst/installing/quick-start.rst:
  • docs/en/rst/installing/upgrading-with-git.rst:
  • docs/en/rst/installing/windows.rst:
  • docs/en/rst/integrating/extensions.rst:
  • docs/en/rst/integrating/skins.rst:
  • editflagtypes.cgi:

(get_products_and_components):

  • taskgraph.json:
  • template/en/default/pages/release-notes.html.tmpl:
12:39 PM Changeset in webkit [240166] by timothy_horton@apple.com
  • 8 edits
    2 deletes in branches/safari-607-branch/Source/WebKit

REGRESSION (r236935): Holding down arrow key does not cause repeated DOM keydown events on device
https://bugs.webkit.org/show_bug.cgi?id=191408
<rdar://problem/45895135>

Rubber-stamped by Simon Fraser.

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _scrollByContentOffset:]):

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

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView scrollViewWillStartPanOrPinchGesture]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView keyCommands]):
(-[WKContentView _arrowKeyForWebView:]):
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
(-[WKContentView _scrollOffsetForEvent:]):
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]): Deleted.
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]): Deleted.
(-[WKContentView keyboardScrollViewAnimatorWillScroll:]): Deleted.
(-[WKContentView keyboardScrollViewAnimatorDidFinishScrolling:]): Deleted.

  • UIProcess/ios/WKKeyboardScrollingAnimator.h: Removed.
  • UIProcess/ios/WKKeyboardScrollingAnimator.mm: Removed.
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView dealloc]):
(-[WKPDFView web_handleKeyEvent:]):
(-[WKPDFView web_initWithFrame:webView:mimeType:]):

  • WebKit.xcodeproj/project.pbxproj:

Revert WKKeyboardScrollingAnimator.

12:38 PM Changeset in webkit [240165] by jdiggs@igalia.com
  • 2 edits in trunk/Tools

[GTK] install-dependencies tool looks for libunistring-dev for dnf
https://bugs.webkit.org/show_bug.cgi?id=193584

Change "-dev" to "-devel".

Reviewed by Michael Catanzaro.

  • gtk/install-dependencies:
12:28 PM Changeset in webkit [240164] by Michael Catanzaro
  • 5 edits in releases/WebKitGTK/webkit-2.22

Merge r240158 - FetchResponse::url should return the empty string for tainted responses
https://bugs.webkit.org/show_bug.cgi?id=193553

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js:

(fetchNoCors):

Source/WebCore:

Check whether the response is tainted in FetchResponse::url, to match
the behavior described in https://fetch.spec.whatwg.org/#concept-filtered-response-opaque.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::url const):

LayoutTests:

  • http/wpt/fetch/response-opaque-clone.html:
12:12 PM Changeset in webkit [240163] by Jonathan Bedard
  • 4 edits in trunk/Tools

webkitpy: Add iPhone and iPad ports
https://bugs.webkit.org/show_bug.cgi?id=193537
<rdar://problem/47353390>

Reviewed by Lucas Forschler.

Add --iphone-simulator and --ipad-simulator commands to run-webkit-tests which separate iPhone and iPad into separate
ports. Note that this separation is optional, the --ios-simulator command remains.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_device_type_test_division): Drive-by fix.
(RunTest.test_device_type_specific_listing): Ditto.
(RunTest.test_ipad_test_division):
(RunTest):
(RunTest.test_ipad_listing):

  • Scripts/webkitpy/port/factory.py:

(platform_options): Add --iphone-simulator and --ipad-simulator flags.
(PortFactory):

  • Scripts/webkitpy/port/ios_simulator.py:

(IPhoneSimulatorPort):
(IPadSimulatorPort):

12:07 PM Changeset in webkit [240162] by Antti Koivisto
  • 12 edits
    2 adds in trunk

Implement asynchronous frame scrolling for iOS
https://bugs.webkit.org/show_bug.cgi?id=193539
<rdar://problem/47379873>

Reviewed by Simon Fraser.

Source/WebCore:

This patch implements UIScrollView based frame scrolling on iOS, enabled by the "Async Frame Scrolling"
internal setting (still off by default).

  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer const): Deleted.

  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition):

Export ScrollingTreeFrameScrollingNodeIOS.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateScrollLayerClipping):

If we don't have a separate clip layer, just resize and position the scroll layer.

(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

Use GraphicsLayer::Type::Scrolling as the scroll layer type when async frame scrolling is enabled.
Don't create a separate clip layer since the scroll layer will handle clipping.

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Add a scrolling node type that can handle UIScrollView backed frames.
It basically just instantiates and forwards to the existing ScrollingTreeScrollingNodeDelegateIOS.

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::createScrollingTreeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h: Added.
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: Added.

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::create):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::~ScrollingTreeFrameScrollingNodeRemoteIOS):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition const):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll):

  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

  • platform/ios-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt:
11:47 AM Changeset in webkit [240161] by Chris Dumez
  • 9 edits in trunk

Regression(PSON) Scroll position is not always restored properly when navigating back
https://bugs.webkit.org/show_bug.cgi?id=193578
<rdar://problem/47386331>

Reviewed by Tim Horton.

Source/WebKit:

Fix issues causing the scroll position to not be restored at all (or incorrectly) when
navigating back cross-site with PSON enabled. Also make sure that the swipe gesture
snapshot really stays up until we've restored the scroll position.

Note that even after those changes, I can still sometimes reproduce a white flash when
swiping back to Google search results (scroll position being correct now). This is
tracked by <rdar://problem/47071684> and happens even if I disable PSON entirely.

  • Shared/SessionState.cpp:

(WebKit::FrameState::encode const):
(WebKit::FrameState::decode):

  • Shared/SessionState.h:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFrameState):
(WebKit::applyFrameState):
obscuredInsets is present on the HistoryItem in the WebProcess but was never passed to
or stored by the UIProcess on the WebBackForwardListItem. obscuredInsets is needed to
properly restore the scrollPosition (position was 70px off on my iPad without this).
With PSON enabled, if you swipe back cross-process and the previous page was not put
into PageCache, then the HistoryItem is gone on the WebProcess side. What happens is
that the UIProcess sends its WebBackForwardListItem to the WebProcess, which restores
the HistoryItem there, and then asks it to load it. The obscuredInsets was getting lost
in the process since the UIProcess never knew about it.

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
Drop logic that was causing the ViewGestureController to not wait for the scroll position
to be restored before taking down the snapshot, when UI-side compositing is enabled.
If you look at the comment above the code, you'll see that the code in question was meant
to impact only the non-UI side compositing code path. As a matter of fact, when the code
was reviewed at https://bugs.webkit.org/show_bug.cgi?id=151224, it was protected by a
#if PLATFORM(MAC), before getting modified the wrong way before landing. In practice, we
would have often restored the scroll position by the time the load is finished so it would
not cause a flash in most cases. However, with PSON enabled and the layer tree freezing we
do on process-swap, the first post-scroll restoration layer tree commit may now occur a
little bit later and we would lose the race more often.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::updateBackForwardItem):

  • UIProcess/WebProcessProxy.h:

When adding PageCache support to PSON, we used to navigate the "suspended" page to
about:blank. This would lead to unwanted WebProcessProxy::updateBackForwardItem()
calls from the WebProcess which we wanted to ignore. We thus added logic to ignore
updateBackForwardItem() IPC from the old WebProcess after a swap. The issue with this
is that we sometimes miss/ignore legit updates to the HistoryItem from the old process,
in particular with regards to the scroll position and the pageScaleFactor. So if you
swiped and then quickly enough did a cross-site navigation, the UIProcess'
WebBackForwardList would not get updated with the latest scroll position and we would
thus fail to restore it later on. To address the issue, we now stop ignoring updates
from the old WebProcess after a swap. This logic is no longer needed since we no longer
navigate the old page to about:blank after a swap, we merely suspend it "in place".

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:38 AM Changeset in webkit [240160] by keith_miller@apple.com
  • 10 edits in trunk/Source

Gigacages should start allocations from a slide
https://bugs.webkit.org/show_bug.cgi?id=193523

Reviewed by Mark Lam.

Source/bmalloc:

This patch makes it so that Gigacage Heaps slide the start of the
cage by some random amount. We still ensure that there is always
at least 4/2GB, on MacOS/iOS respectively, of VA space available
for allocation.

Also, this patch changes some macros into constants since macros
are the devil.

  • bmalloc/Gigacage.cpp:

(Gigacage::bmalloc::protectGigacageBasePtrs):
(Gigacage::bmalloc::unprotectGigacageBasePtrs):
(Gigacage::bmalloc::runwaySize):
(Gigacage::ensureGigacage):
(Gigacage::shouldBeEnabled):

  • bmalloc/Gigacage.h:

(Gigacage::name):
(Gigacage::gigacageSizeToMask):
(Gigacage::size):
(Gigacage::mask):
(Gigacage::basePtr):
(Gigacage::ensureGigacage):
(Gigacage::wasEnabled):
(Gigacage::isCaged):
(Gigacage::caged):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Sizes.h:

(bmalloc::Sizes::maskSizeClass):
(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::logSizeClass):
(bmalloc::Sizes::logObjectSize):
(bmalloc::Sizes::sizeClass):
(bmalloc::Sizes::objectSize):
(bmalloc::Sizes::pageSize):

Source/JavaScriptCore:

This patch changes some macros into constants since macros are the
devil.

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

This patch changes some macros into constants since macros are the
devil.

  • wtf/Gigacage.cpp:
  • wtf/Gigacage.h:
11:10 AM Changeset in webkit [240159] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

Remove some last vestiges of assisted node terminology in WebKit
https://bugs.webkit.org/show_bug.cgi?id=193572

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView _showKeyboard]):
(-[WKContentView _hideKeyboard]):

Add a FIXME about invoking -reloadInputViews on watchOS when the focused element is blurred.

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView updateCurrentFocusedElementInformation:]):
(-[WKContentView _startAssistingKeyboard]): Deleted.
(-[WKContentView _stopAssistingKeyboard]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getFocusedElementInformation):

10:44 AM Changeset in webkit [240158] by ajuma@chromium.org
  • 6 edits in trunk

FetchResponse::url should return the empty string for tainted responses
https://bugs.webkit.org/show_bug.cgi?id=193553

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js:

(fetchNoCors):

Source/WebCore:

Check whether the response is tainted in FetchResponse::url, to match
the behavior described in https://fetch.spec.whatwg.org/#concept-filtered-response-opaque.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::url const):

LayoutTests:

  • http/wpt/fetch/response-opaque-clone.html:
10:37 AM Changeset in webkit [240157] by Jonathan Bedard
  • 1 edit
    1 delete in trunk/LayoutTests

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

Unreviewed test gardening.

  • tiled-drawing/ios/iphone7: Removed.
10:19 AM Changeset in webkit [240156] by youenn@apple.com
  • 19 edits
    4 copies in trunk

Add a new SPI to request for cache storage quota increase
https://bugs.webkit.org/show_bug.cgi?id=193323

Reviewed by Alex Christensen.

Source/WebKit:

Add a delegate on the WebSiteDataStore for WebKit to ask for quota update.
The current SPI is currently CacheStorage specific but future work should
make it so that other storage like IDB use the same mechanism.
By default, quota remains unchanged if delegate is not implemented.

  • NetworkProcess/NetworkProcess.cpp:
  • UIProcess/API/Cocoa/WKStorageQuotaDelegatePrivate.h: Added.
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(WebsiteDataStoreQuotaManager::WebsiteDataStoreQuotaManager):
(-[WKWebsiteDataStore _quotaDelegate]):
(-[WKWebsiteDataStore set_quotaDelegate:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::requestCacheStorageSpace):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::quotaManager):
(WebKit::WebsiteDataStore::setQuotaManager):

  • UIProcess/WebsiteData/WebsiteDataStoreQuotaManager.h: Added.

(WebKit::WebsiteDataStoreQuotaManager::~WebsiteDataStoreQuotaManager):
(WebKit::WebsiteDataStoreQuotaManager::requestCacheStorageSpace):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Implement WebsiteDataStore quota delegate to handle quota requests.
By default, do not update quota.
Update quota if test calls the new testRunner.allowCacheStorageQuotaIncrease method.

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

(WTR::TestRunner::allowCacheStorageQuotaIncrease):

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

(WTR::TestController::allowCacheStorageQuotaIncrease):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(-[CacheStorageQuotaManager init]):
(-[CacheStorageQuotaManager _requestCacheStorageSpace:frameOrigin:quota:currentSize:spaceRequired:decisionHandler:]):
(WTR::initializeWebViewConfiguration):
(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::allowCacheStorageQuotaIncrease):

LayoutTests:

Use new testRunner method to bump the cache quota and verify adding a
cache entry works when bumping the cache quota.

  • http/wpt/cache-storage/cache-quota.any.js:

(promise_test):

10:16 AM Changeset in webkit [240155] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Pass owner to the triggered builds
https://bugs.webkit.org/show_bug.cgi?id=193574

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py:

(BuildFactory.propertiesToPassToTriggers):

10:14 AM Changeset in webkit [240154] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Send patch author as a build property
https://bugs.webkit.org/show_bug.cgi?id=193560

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(BugzillaPatchFetcher.fetch):

9:54 AM Changeset in webkit [240153] by Jonathan Bedard
  • 2 edits in trunk/Tools

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

Unreviewed infrastructure fix.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run): Don't boot a device if no tests are available to run on it.

9:19 AM Changeset in webkit [240152] by youenn@apple.com
  • 5 edits
    2 adds in trunk

A track source should be unmuted whenever reenabled after setDirection changes
https://bugs.webkit.org/show_bug.cgi?id=193554
<rdar://problem/47366196>

Reviewed by Eric Carlson.

Source/WebCore:

Ensure that track gets unmuted after being fired as part of track event.
Test is triggering some existing issues with MediaPlayerPrivateMediaStreamAVFObjC.
Given the enqueuing of samples happens in a different frame than the thread used to update media stream and the active video track,
some enqueued samples might not be from the right active video track or there might be no active video track.

Test: webrtc/video-setDirection.html

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::fireTrackEvent):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData):

LayoutTests:

  • webrtc/video-setDirection-expected.txt: Added.
  • webrtc/video-setDirection.html: Added.
8:54 AM Changeset in webkit [240151] by Jonathan Bedard
  • 2 edits in trunk/Tools

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

Unreviewed infrastructure fix.

  • Scripts/webkitpy/api_tests/manager.py:

(Manager._initialize_devices): Use DEVICE_TYPE when running API tests.

8:37 AM Changeset in webkit [240150] by Jonathan Bedard
  • 24 edits
    62 adds
    43 deletes in trunk

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

Rubber-stamped by Aakash Jain.

Tools:

This change uses device_type to select a different set of TestExpectation files based on the type of device running
tests. This requires multiple baseline search paths to be used in a single instantiation of run-webkit-tests. Note
that while multiple baseline search paths are used, any single test will only ever be run on a single device type.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:

(LayoutTestFinder.find_tests): Pass device_type through.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py:

(LayoutTestFinderTests.test_touched_but_skipped_test): Allow device_type to be passed in.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.init): Make _expectations an OrderedDict indexed by device_type, add current_device_type.
(Manager._collect_tests): Pass device type to test finder.
(Manager._needs_web_platform_test):
(Manager._prepare_lists): Index _expectations by device type.
(Manager._test_input_for_file):
(Manager._test_is_slow): Ditto.
(Manager._test_should_dump_jsconsolelog_in_stderr):
(Manager._test_should_dump_jsconsolelog_in_stderr): Ditto.
(Manager._get_test_inputs):
(Manager._update_worker_count):
(Manager._set_up_run): Use current_device_type instead of passing device_type in.
(Manager.run): Re-write function to gather and parse expectations from multiple baseline search paths. In the event
that a test can be run on multiple device types, the first device in the device type list which is eligible will be
the one which runs the test.
(Manager._run_test_subset):
(Manager._run_tests): Index _expectations by current_device_type.
(Manager._print_expectation_line_for_test): Ditto.
(Manager._print_expectations_for_subset): Ditto.
(Manager.print_expectations): Re-write function to gather and parse expectations from multiple baseline search paths.
Unlike run, this function will behave the same regardless of what devices are available.
(Manager._custom_device_for_test): Deleted.

  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:

(ManagerTest.test_uses_custom_device): Deleted.
(ManagerTest.test_uses_custom_device.get_manager): Deleted.

  • Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:

(JSONLayoutResultsGenerator.init): Pass expectations as a dictionary indexed by device type.
(JSONLayoutResultsGenerator._insert_failure_summaries): The number of fixable tests must take into consideration
all of the expectations.

  • Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py:

(FakePort.skipped_layout_tests): Allow device_type to be passed in.

  • Scripts/webkitpy/layout_tests/models/test_expectations.py:

(TestExpectations.init): Allow device_type to be passed through.
(TestExpectations.parse_all_expectations): Pick expectations_dict by device type.

  • Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: Allow device_type to be passed in.
  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(summarize_results):

  • Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:

(summarized_results): Expectations are stored in a dictionary indexed by device_type. When determining the expectation
a test ran with, one must check all expectations to find the first non-skip expectation.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_device_type_test_division):
(RunTest):
(RunTest.test_device_type_specific_listing):

  • Scripts/webkitpy/port/base.py:

(Port): Add default values for DEVICE_TYPE and DEFAULT_DEVICE_TYPES.
(Port.supported_device_types): The result of this function will change based on what devices are available.

  • Scripts/webkitpy/port/device_port.py:

(DevicePort._device_type_with_version): Replace DEFAULT_DEVICE_TYPE with DEVICE_TYPE.
(DevicePort.default_child_processes): DEVICE_TYPE is a general type, so the built-in comparison of the DeviceType object
can be used.
(DevicePort.supported_device_types): Generates a list of device types determined by the available devices, if there are
any, or the DEFAULT_DEVICE_TYPES of the port.

  • Scripts/webkitpy/port/ios.py:

(IOSPort): Change DEFAULT_DEVICE_TYPE to DEVICE_TYPE.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort): Set the DEFAULT_DEVICE_TYPES to the devices currently used to run layout tests.

  • Scripts/webkitpy/port/watch.py:

(WatchPort): Change DEFAULT_DEVICE_TYPE to DEVICE_TYPE.

  • Scripts/webkitpy/port/watch_simulator.py:

(WatchSimulatorPort): Set the DEFAULT_DEVICE_TYPES to the device currently used to run layout tests.

  • Scripts/webkitpy/xcode/device_type.py:

(DeviceType):
(DeviceType.hash): Allow DeviceType to be used as a dictionary index.

LayoutTests:

Move iPad and iPhone 7 tests to their respective platform specific directories.

  • TestExpectations:
  • fast/events/touch/ios/iphone7: Removed.
  • fast/forms/ios/ipad: Removed.
  • fast/text-autosizing/ios/ipad: Removed.
  • fast/viewport/ios/ipad: Removed.
  • media/controls/ipad: Removed.
  • media/modern-media-controls/media-documents/ipad: Removed.
  • media/modern-media-controls/pip-support/ipad: Removed.
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/ipad: Added.
  • platform/ipad/fast: Added.
  • platform/ipad/fast/forms: Added.
  • platform/ipad/fast/forms/choose-select-option-expected.txt: Added.
  • platform/ipad/fast/forms/choose-select-option.html: Added.
  • platform/ipad/fast/forms/focus-input-via-button-expected.txt: Added.
  • platform/ipad/fast/forms/focus-input-via-button.html: Added.
  • platform/ipad/fast/forms/multiple-select-updates-renderer-expected.txt: Added.
  • platform/ipad/fast/forms/multiple-select-updates-renderer.html: Added.
  • platform/ipad/fast/forms/select-form-run-twice-expected.txt: Added.
  • platform/ipad/fast/forms/select-form-run-twice.html: Added.
  • platform/ipad/fast/forms/select-with-title-expected.txt: Added.
  • platform/ipad/fast/forms/select-with-title.html: Added.
  • platform/ipad/fast/forms/unfocus-inside-fixed-hittest-expected.txt: Added.
  • platform/ipad/fast/forms/unfocus-inside-fixed-hittest.html: Added.
  • platform/ipad/fast/text-autosizing: Added.
  • platform/ipad/fast/text-autosizing/programmatic-text-size-adjust-expected.txt: Added.
  • platform/ipad/fast/text-autosizing/programmatic-text-size-adjust.html: Added.
  • platform/ipad/fast/text-autosizing/text-size-adjust-inline-style-expected.html: Added.
  • platform/ipad/fast/text-autosizing/text-size-adjust-inline-style.html: Added.
  • platform/ipad/fast/viewport: Added.
  • platform/ipad/fast/viewport/empty-meta-expected.txt: Added.
  • platform/ipad/fast/viewport/empty-meta.html: Added.
  • platform/ipad/fast/viewport/meta-viewport-ignored-expected.txt: Added.
  • platform/ipad/fast/viewport/meta-viewport-ignored.html: Added.
  • platform/ipad/fast/viewport/viewport-overriden-by-minimum-effective-width-if-ignore-meta-viewport-expected.txt: Added.
  • platform/ipad/fast/viewport/viewport-overriden-by-minimum-effective-width-if-ignore-meta-viewport.html: Added.
  • platform/ipad/fast/viewport/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport-expected.txt: Added.
  • platform/ipad/fast/viewport/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport.html: Added.
  • platform/ipad/fast/viewport/width-is-device-width-expected.txt: Added.
  • platform/ipad/fast/viewport/width-is-device-width.html: Added.
  • platform/ipad/media: Added.
  • platform/ipad/media/controls: Added.
  • platform/ipad/media/controls/close-page-with-picture-in-picture-video-assertion-failure-expected.txt: Added.
  • platform/ipad/media/controls/close-page-with-picture-in-picture-video-assertion-failure.html: Added.
  • platform/ipad/media/controls/resources: Added.
  • platform/ipad/media/controls/resources/picture-in-picture.html: Added.
  • platform/ipad/media/modern-media-controls: Added.
  • platform/ipad/media/modern-media-controls/media-documents: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html: Added.
  • platform/ipad/media/modern-media-controls/pip-support: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-enabled-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-enabled.html: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-tap-expected.txt: Added.
  • platform/ipad/media/modern-media-controls/pip-support/pip-support-tap.html: Added.
  • platform/iphone-7: Added.
  • platform/iphone-7/fast: Added.
  • platform/iphone-7/fast/events: Added.
  • platform/iphone-7/fast/events/touch: Added.
  • platform/iphone-7/fast/events/touch/force-press-event-expected.txt: Added.
  • platform/iphone-7/fast/events/touch/force-press-event.html: Added.
  • platform/iphone-7/fast/events/touch/force-press-on-link-expected.txt: Added.
  • platform/iphone-7/fast/events/touch/force-press-on-link.html: Added.
  • platform/iphone-7/fast/events/touch/prevent-default-touchmove-prevents-scrolling-expected.txt: Added.
  • platform/iphone-7/fast/events/touch/prevent-default-touchmove-prevents-scrolling.html: Added.
  • platform/iphone-7/tiled-drawing: Added.
  • platform/iphone-7/tiled-drawing/compositing-layers-deep-color-expected.txt: Added.
  • platform/iphone-7/tiled-drawing/compositing-layers-deep-color.html: Added.
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • tiled-drawing/ios: Removed.
8:12 AM Changeset in webkit [240149] by Philippe Normand
  • 2 edits in trunk/Tools

[WPE] run-qt-wpe-minibrowser needlessly expects a --wpe argument
https://bugs.webkit.org/show_bug.cgi?id=193575

Reviewed by Michael Catanzaro.

Allow the script to run without explicit port argument because
it's specific to the WPE port anyway.

  • Scripts/run-qt-wpe-minibrowser: Manually insert --wpe in argv

and simplify the rest of the code accordingly.

7:59 AM Changeset in webkit [240148] by cturner@igalia.com
  • 11 edits in trunk

[GStreamer][EME][ClearKey] Request keys from CDMInstance rather than passing via bus messages
https://bugs.webkit.org/show_bug.cgi?id=192229

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Covered by existing tests.

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::parseLicenseFormat): There is a defect in some C++11
compiles where they will copy this return value since the type
doesn't exactly match. Force a move with WTFMove.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
Deleted. No longer used by anything.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Ditto.
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

Rename these methods to avoid "namespacing names".
(webkit_media_clear_key_decrypt_class_init):
(finalize):
(handleKeyResponse): This is a temporary fix, we need some more
reorganisation to be full driven by CDMInstance APIs for decryption.
(findAndSetKey):
(decrypt):
(webKitMediaClearKeyDecryptorFinalize): Deleted.
(webKitMediaClearKeyDecryptorHandleKeyResponse): Deleted.
(webKitMediaClearKeyDecryptorFindAndSetKey): Deleted.
(webKitMediaClearKeyDecryptorDecrypt): Deleted.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: Ditto.

(webkit_media_common_encryption_decrypt_class_init):
(finalize):
(transformCaps):
(transformInPlace):
(isCDMInstanceAvailable):
(sinkEventHandler):
(queryHandler):
(changeState):
(setContext):
(webKitMediaCommonEncryptionDecryptorFinalize): Deleted.
(webkitMediaCommonEncryptionDecryptTransformCaps): Deleted.
(webkitMediaCommonEncryptionDecryptTransformInPlace): Deleted.
(webkitMediaCommonEncryptionDecryptIsCDMInstanceAvailable): Deleted.
(webkitMediaCommonEncryptionDecryptSinkEventHandler): Deleted.
(webkitMediaCommonEncryptionDecryptorQueryHandler): Deleted.
(webKitMediaCommonEncryptionDecryptorChangeState): Deleted.
(webKitMediaCommonEncryptionDecryptorSetContext): Deleted.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithLocalInstance):
Deleted. No longer passing key information over bus messages.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

Tools:

  • MiniBrowser/wpe/main.cpp:

(main): Enable encrypted-media by default.

7:40 AM Changeset in webkit [240147] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak] Missing KeyboardInterrupt exception handler
https://bugs.webkit.org/show_bug.cgi?id=193570

Reviewed by Michael Catanzaro.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Basic KeyboardInterrupt handling.

6:42 AM Changeset in webkit [240146] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][BFC][MarginCollapsing] Collapsing through should not ignore floats.
https://bugs.webkit.org/show_bug.cgi?id=193564

Reviewed by Antti Koivisto.

Source/WebCore:

Float boxes prevent collapsing through.

Test: fast/block/float/float-in-descendant-formatting-context.html

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):

Tools:

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

LayoutTests:

  • fast/block/float/float-in-descendant-formatting-context-expected.txt: Added.
  • fast/block/float/float-in-descendant-formatting-context.html: Added.
6:39 AM Changeset in webkit [240145] by Alan Bujtas
  • 5 edits in trunk

[LFC] Do not skip float boxes that are not part of the current formatting context when computing bottom.
https://bugs.webkit.org/show_bug.cgi?id=193562

Reviewed by Antti Koivisto.

Source/WebCore:

The current floating context's (float) boxes could belong to descendant formatting contexts.
We need to include them as well when computing height (bottom) (we essentially need to skip ancestor floats only).

<div id=container style="overflow: hidden"><div>foo<div style="float: left">bar</div></div></div>
While computing the height for "container", the float box needs to be taken into account even though
it is part of another (descendant) formatting context (the inline formatting context established by its parent div).

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::bottom const):

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
(WebCore::Layout::FloatingState::FloatItem::inFormattingContext const): Deleted.

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
6:25 AM Changeset in webkit [240144] by Alan Bujtas
  • 5 edits in trunk

[LFC][BFC] Check for inflow children while computing height for block formatting context roots.
https://bugs.webkit.org/show_bug.cgi?id=193555

Reviewed by Antti Koivisto.

Source/WebCore:

This patch also extends areEssentiallyEqual to 0.125px to be able to match (essentially equal) inline runs.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::contentHeightForFormattingContextRoot):

  • layout/Verification.cpp:

(WebCore::Layout::areEssentiallyEqual):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
6:12 AM Changeset in webkit [240143] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WebAudio] Release the AudioDestination when uninitializing DefaultAudioDestinationNode
https://bugs.webkit.org/show_bug.cgi?id=192590

Patch by Yacine Bandou <yacine.bandou@softathome.com> on 2019-01-18
Reviewed by Philippe Normand.

When we uninitialize DefaultAudioDestinationNode, the AudioDestination is stopped but not destroyed.

On some platforms the resources are allocated and released with the AudioDestination, thus when we uninitialize
DefaultAudioDestinationNode we don't release resources because the AudioDestination is not destroyed.

  • Modules/webaudio/DefaultAudioDestinationNode.cpp:

(WebCore::DefaultAudioDestinationNode::uninitialize):

5:46 AM Changeset in webkit [240142] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WebAudio] Call AudioContext::uninitialize() immediately when the AudioContext is stopped
https://bugs.webkit.org/show_bug.cgi?id=192586

Patch by Yacine Bandou <yacine.bandou@softathome.com> on 2019-01-18
Reviewed by Philippe Normand.

When WebProcess is killed, AudioContext::uninitialize() is not called immediately in the stop so
the AudioDestinationNode is not destroyed.

In my case, I have a resource device manager, the output audio device is reserved when AudioDestinationNode
is instantiated and it is released when AudioDestinationNode is destroyed, thus when the webprocess is killed,
the resources leak.

AudioContext::uninitialize() is not called immediately since r94608.
This modification can now be reverted without regression in WebAudio tests.

Test: webaudio/mediaelementaudiosourcenode-gc.html

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::stop):

5:07 AM Changeset in webkit [240141] by Philippe Normand
  • 15 edits
    1 copy
    24 adds in trunk

[WPE] Add Qt extension
https://bugs.webkit.org/show_bug.cgi?id=191464

Reviewed by Carlos Garcia Campos.

.:

  • Source/cmake/OptionsWPE.cmake: Add ENABLE_WPE_QT_API CMake option. Disabled by default.

Source/WebKit:

This new extension is a QML plugin embedding a WPE ViewBackend
implementation. It provides a public API very similar to Qt's
WebView module. It comes with a simple mini-browser implemented in
QML.

QtWPE is known to work with the Wayland-EGL (in GNOME and Weston
compositors) and EGLFS QPAs.

  • PlatformWPE.cmake:
  • UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.cpp: Added.

(WPEQmlExtensionPlugin::registerTypes):

  • UIProcess/API/wpe/qt/WPEQmlExtensionPlugin.h: Added.
  • UIProcess/API/wpe/qt/WPEQtView.cpp: Added.

(WPEQtView::WPEQtView):
(WPEQtView::~WPEQtView):
(WPEQtView::geometryChanged):
(WPEQtView::configureWindow):
(WPEQtView::createOffscreen):
(WPEQtView::backendCreated):
(WPEQtView::notifyUrlChangedCallback):
(WPEQtView::notifyTitleChangedCallback):
(WPEQtView::notifyLoadProgressCallback):
(WPEQtView::notifyLoadChangedCallback):
(WPEQtView::notifyLoadFailedCallback):
(WPEQtView::updatePaintNode):
(WPEQtView::url const):
(WPEQtView::setUrl):
(WPEQtView::loadProgress const):
(WPEQtView::title const):
(WPEQtView::canGoBack const):
(WPEQtView::isLoading const):
(WPEQtView::canGoForward const):
(WPEQtView::goBack):
(WPEQtView::goForward):
(WPEQtView::reload):
(WPEQtView::stop):
(WPEQtView::loadHtml):
(WPEQtView::jsAsyncReadyCallback):
(WPEQtView::handleJsResult):
(WPEQtView::runJavaScript):
(WPEQtView::mousePressEvent):
(WPEQtView::mouseReleaseEvent):
(WPEQtView::hoverEnterEvent):
(WPEQtView::hoverLeaveEvent):
(WPEQtView::hoverMoveEvent):
(WPEQtView::wheelEvent):
(WPEQtView::keyPressEvent):
(WPEQtView::keyReleaseEvent):
(WPEQtView::touchEvent):

  • UIProcess/API/wpe/qt/WPEQtView.h: Added.
  • UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: Added.

(configureCallback):
(WPEQtViewBackend::WPEQtViewBackend):
(WPEQtViewBackend::~WPEQtViewBackend):
(WPEQtViewBackend::configureGlibEglDisplay):
(WPEQtViewBackend::configureEglDisplay):
(WPEQtViewBackend::initialize):
(WPEQtViewBackend::backend const):
(WPEQtViewBackend::resize):
(WPEQtViewBackend::getTexture):
(WPEQtViewBackend::initSurface):
(WPEQtViewBackend::displayImage):
(WPEQtViewBackend::modifiers const):
(WPEQtViewBackend::dispatchHoverEnterEvent):
(WPEQtViewBackend::dispatchHoverLeaveEvent):
(WPEQtViewBackend::dispatchHoverMoveEvent):
(WPEQtViewBackend::dispatchMousePressEvent):
(WPEQtViewBackend::dispatchMouseReleaseEvent):
(WPEQtViewBackend::dispatchWheelEvent):
(WPEQtViewBackend::dispatchKeyEvent):
(WPEQtViewBackend::dispatchTouchEvent):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.h: Added.
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.cpp: Added.

(WPEQtViewLoadRequest::WPEQtViewLoadRequest):
(WPEQtViewLoadRequest::~WPEQtViewLoadRequest):
(WPEQtViewLoadRequest::url const):
(WPEQtViewLoadRequest::status const):
(WPEQtViewLoadRequest::errorString const):

  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h: Added.
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequestPrivate.h: Added.

(WPEQtViewLoadRequestPrivate::WPEQtViewLoadRequestPrivate):
(WPEQtViewLoadRequestPrivate::~WPEQtViewLoadRequestPrivate):

  • UIProcess/API/wpe/qt/qmldir: Added.

Tools:

MiniBrowser and API tests for the WPE Qt API. To run the
MiniBrowser a new script is introduced. Example invocation:

$ run-qt-wpe-minibrowser -platform wayland https://webkit.org

Also note-worthy is the introduction of the python2-subprocess32
dependency to run the GLib API tests.

  • MiniBrowser/wpe/CMakeLists.txt:
  • MiniBrowser/wpe/qt/CMakeLists.txt: Added.
  • MiniBrowser/wpe/qt/main.cpp: Added.

(main):

  • MiniBrowser/wpe/qt/main.qml: Added.
  • MiniBrowser/wpe/qt/qml.qrc: Added.
  • Scripts/run-gtk-tests:

(GtkTestRunner.is_google_test):
(GtkTestRunner):
(GtkTestRunner.is_qt_test):

  • Scripts/run-qt-wpe-minibrowser: Added.
  • Scripts/run-wpe-tests:

(WPETestRunner):
(WPETestRunner.is_google_test):
(WPETestRunner.is_qt_test):

  • TestWebKitAPI/Tests/WPEQt/TestLoad.cpp: Added.

(TestLoad::main):

  • TestWebKitAPI/Tests/WPEQt/TestLoadHtml.cpp: Added.

(TestLoadHtml::main):

  • TestWebKitAPI/Tests/WPEQt/TestLoadRequest.cpp: Added.

(TestLoadRequest::main):

  • TestWebKitAPI/Tests/WPEQt/TestRunJavaScript.cpp: Added.

(TestRunJavaScript::main):

  • TestWebKitAPI/Tests/WPEQt/WPEQtTest.cpp: Added.

(waitForSignal):

  • TestWebKitAPI/Tests/WPEQt/WPEQtTest.h: Added.

(LoadSpy::LoadSpy):
(LoadSpy::~LoadSpy):
(LoadSpy::onLoadingChanged):
(LoadStartedCatcher::LoadStartedCatcher):
(LoadStartedCatcher::~LoadStartedCatcher):
(LoadStartedCatcher::onLoadingChanged):
(waitForLoadSucceeded):
(waitForLoadFailed):

  • TestWebKitAPI/glib/CMakeLists.txt:
  • flatpak/flatpakutils.py:

(WebkitFlatpak.load_from_args):
(WebkitFlatpak.init):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):

  • flatpak/org.webkit.CommonModules.yaml:
  • flatpak/org.webkit.WPE.yaml:
  • flatpak/org.webkit.WPEModules.yaml:
  • flatpak/org.webkit.WPEQT.yaml: Copied from Tools/flatpak/org.webkit.WebKit.yaml.
  • flatpak/org.webkit.WebKit.yaml:
  • glib/api_test_runner.py:

(TestRunner._run_test_qt):
(TestRunner.is_qt_test):
(TestRunner._run_test):

12:07 AM Changeset in webkit [240140] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

ScrollingCoordinator::scrollableAreaScrollLayerDidChange() can be removed
https://bugs.webkit.org/show_bug.cgi?id=193559

Reviewed by Antti Koivisto.

ScrollingCoordinator::scrollableAreaScrollLayerDidChange() existed for CoordinatedGraphics,
but the code that used it was removed in webkit.org/r229318 so we can remove it and
code that calls it.

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::willDestroyScrollableArea):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
(WebCore::RenderLayerCompositor::scrollingLayerDidChange): Deleted.

  • rendering/RenderLayerCompositor.h:
Note: See TracTimeline for information about the timeline view.