Timeline



Aug 24, 2019: Today

7:14 PM Changeset in webkit [249091] by simon.fraser@apple.com
  • 3 edits in trunk/Source/WebCore

Have RenderLayer::calculateClipRects() use offsetFromAncestor() when possible
https://bugs.webkit.org/show_bug.cgi?id=201066

Reviewed by Dean Jackson.

offsetFromAncestor() is a layer tree walk, so faster than localToContainerPoint(),
but we can't use it when there are transforms on the layer and intermediates up
to the ancestor.

canUseConvertToLayerCoords() was trying to answer the question about whether it's
OK to use offsetFromAncestor() (which calls convertToLayerCoords() internally), but
it has insufficient information to make a determination. Leave this issue alone, but
at least rename canUseConvertToLayerCoords().

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:
2:42 PM Changeset in webkit [249090] by simon.fraser@apple.com
  • 3 edits
    2 adds in trunk

Page crashes under CGPathAddUnevenCornersRoundedRect
https://bugs.webkit.org/show_bug.cgi?id=201117

Reviewed by Dean Jackson.
Source/WebCore:

Fix crash on https://onehtmlpagechallenge.com/entries/pure-css-still-life-water-lemon.html
We were passing CG radius values where the sum of two radii was greater than the height or
width, caused by rounding when converting from floats to doubles.

Test: fast/borders/renderable-uneven-rounded-rects.html

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::platformAddPathForRoundedRect):

LayoutTests:

  • fast/borders/renderable-uneven-rounded-rects-expected.txt: Added.
  • fast/borders/renderable-uneven-rounded-rects.html: Added.
11:21 AM Changeset in webkit [249089] by Devin Rousso
  • 5 edits in trunk

Web Inspector: "Copy Rule" menu item does not propagate comments properly
https://bugs.webkit.org/show_bug.cgi?id=201095

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.commentOut):
(WI.CSSProperty.prototype.get formattedText):
Wrap the text in /* ${text} */ if the WI.CSSProperty isn't enabled (e.g. commented out).

LayoutTests:

  • inspector/css/generateCSSRuleString.html:
  • inspector/css/generateCSSRuleString-expected.txt:
10:35 AM Changeset in webkit [249088] by simon.fraser@apple.com
  • 3 edits in trunk/Source/WebCore

RenderLayer::updateLayerPositions() doesn't propagate the ancestor flags correctly
https://bugs.webkit.org/show_bug.cgi?id=201115

Reviewed by Zalan Bujtas.

When an updateLayerPositions() traversal starts at a non-root layer, we failed to populate
the ancestor-related UpdateLayerPositionsFlag flags, leaving layers with missing flags
(e.g. the m_hasTransformedAncestor flag). This is detected by the patch in bug 201066.

Fix by having updateLayerPositionsAfterStyleChange() and updateLayerPositionsAfterLayout()
initialize the flags from the parent layer.

This is a behavior change not detected by any existing test, but will be exercised once
the patch from bug 201066 lands.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::flagsForUpdateLayerPositions):
(WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::outputPaintOrderTreeLegend):
(WebCore::outputPaintOrderTreeRecursive): Log hasTransformedAncestor().

  • rendering/RenderLayer.h:
9:02 AM Changeset in webkit [249087] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Make CacheStorageEngineCaches's decodeCachesNames() more robust against bad input data
https://bugs.webkit.org/show_bug.cgi?id=201102

Reviewed by Antti Koivisto.

Use Vector::tryReserveCapacity() instead of Vector::reserveInitialCapacity() in CacheStorage::decodeCachesNames()
since the size is read from disk and thus cannot be trusted. If the size is too large, reserveInitialCapacity()
would end up crashing the network process. Now, we merely discard the data if tryReserveCapacity() fails because
the size is too large.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::decodeCachesNames):

6:36 AM Changeset in webkit [249086] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Add section renderers to the layout tree (THEAD/TBODY/TFOOT)
https://bugs.webkit.org/show_bug.cgi?id=201114
<rdar://problem/54664992>

Reviewed by Antti Koivisto.

Section renderers (THEAD/TBODY/TFOOT) are direct children of the RenderTable. Let's include them in the layout tree as well.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createTableStructure):
(WebCore::Layout::outputInlineRuns):

6:34 AM Changeset in webkit [249085] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Box::isAnonymous() can not rely on the lack of ElementType.
https://bugs.webkit.org/show_bug.cgi?id=201106
<rdar://problem/54660287>

Reviewed by Antti Koivisto.

Add bool m_isAnonymous member to mark anonymous layout boxes. Anonymous boxes are not rare enough to include this variable in RareData.

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::setIsAnonymous):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

6:31 AM Changeset in webkit [249084] by Antti Koivisto
  • 4 edits
    2 adds in trunk/Source/WebCore

Implement layout system independent text box iterator
https://bugs.webkit.org/show_bug.cgi?id=201076

Reviewed by Zalan Bujtas.

Add a generic way to traverse line layout without caring about the details of the underlying layout system.

This patch adds basic support for traversing text boxes and uses it to remove layout path specific branches in RenderTreeAsText.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeTextBox):
(WebCore::write):
(WebCore::writeTextRun): Deleted.
(WebCore::writeSimpleLine): Deleted.

  • rendering/line/LineLayoutInterfaceTextBoxes.cpp: Added.

(WebCore::LineLayoutInterface::TextBox::rect const):
(WebCore::LineLayoutInterface::TextBox::logicalRect const):
(WebCore::LineLayoutInterface::TextBox::hasHyphen const):
(WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
(WebCore::LineLayoutInterface::TextBox::dirOverride const):
(WebCore::LineLayoutInterface::TextBox::text const):
(WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutInterface::TextBoxIterator::traverseNext):
(WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
(WebCore::LineLayoutInterface::simpleLineRunResolverForText):
(WebCore::LineLayoutInterface::rangeForText):
(WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange):
(WebCore::LineLayoutInterface::textBoxes):

  • rendering/line/LineLayoutInterfaceTextBoxes.h: Added.

(WebCore::LineLayoutInterface::TextBox::TextBox):
(WebCore::LineLayoutInterface::TextBoxIterator::operator++):
(WebCore::LineLayoutInterface::TextBoxIterator::operator!= const):
(WebCore::LineLayoutInterface::TextBoxIterator::operator* const):
(WebCore::LineLayoutInterface::TextBoxRange::begin const):
(WebCore::LineLayoutInterface::TextBoxRange::end const):

6:24 AM Changeset in webkit [249083] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][BFC] Non-inline formatting context(table, grid etc) root container should not collapse through.
https://bugs.webkit.org/show_bug.cgi?id=201099
<rdar://problem/54658946>

Reviewed by Antti Koivisto.

I didn't manage to find it in the spec, but surely formatting contexts like table, grid and flex should behave like
block so that their vertical margins are not adjoining, when they have at least one inflow child.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):

6:17 AM Changeset in webkit [249082] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Add THEAD/TBODY/TFOOT output to Layout::showLayoutTree
https://bugs.webkit.org/show_bug.cgi?id=201113
<rdar://problem/54664134>

Reviewed by Antti Koivisto.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputLayoutBox):

6:16 AM Changeset in webkit [249081] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Remove redundant Layout::Box::ElementType::TableRowGroup
https://bugs.webkit.org/show_bug.cgi?id=201112
<rdar://problem/54663833>

Reviewed by Antti Koivisto.

Use Layout::Box::ElementType::TableBodyGroup instead.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isPaddingApplicable const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

Aug 23, 2019: Yesterday

8:31 PM Changeset in webkit [249080] by simon.fraser@apple.com
  • 5 edits in trunk/Source/WebCore

RenderLayerModelObject should not call private RenderLayer functions
https://bugs.webkit.org/show_bug.cgi?id=201111

Reviewed by Zalan Bujtas.

Make RenderLayerModelObject no longer a friend class of RenderLayer, giving it a public
willRemoveChildWithBlendMode() function to call. Also make the UpdateLayerPositionsFlag
enum private, providing a updateLayerPositionsAfterStyleChange() for RenderLayerModelObject,
and changing the arguments of updateLayerPositionsAfterLayout() for FrameView.

No behavior change.

  • page/FrameView.cpp:

(WebCore::FrameView::didLayout):
(WebCore::updateLayerPositionFlags): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::RenderLayer::willRemoveChildWithBlendMode):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::styleDidChange):

7:22 PM Changeset in webkit [249079] by rniwa@webkit.org
  • 6 edits
    2 adds in trunk

Implement StaticRange constructor
https://bugs.webkit.org/show_bug.cgi?id=201055

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

Added a test from https://github.com/web-platform-tests/wpt/pull/18619
with my review comment addressed.

  • web-platform-tests/dom/interfaces-expected.txt: Rebaselined.
  • web-platform-tests/dom/ranges/StaticRange-constructor-expected.txt: Added.
  • web-platform-tests/dom/ranges/StaticRange-constructor.html: Added.

Source/WebCore:

Added the constructor to StaticRange per https://github.com/whatwg/dom/pull/778.

Test: imported/w3c/web-platform-tests/dom/ranges/StaticRange-constructor.html

  • dom/StaticRange.cpp:

(WebCore::isDocumentTypeOrAttr):
(WebCore::StaticRange::create):

  • dom/StaticRange.h:
  • dom/StaticRange.idl:
5:46 PM Changeset in webkit [249078] by Devin Rousso
  • 10 edits in trunk

Web Inspector: create additional command line api functions for other console methods
https://bugs.webkit.org/show_bug.cgi?id=200971

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • inspector/InjectedScriptModule.cpp:

(Inspector::InjectedScriptModule::ensureInjected):

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype.inspectObject):
(InjectedScript.prototype.addCommandLineAPIGetter): Added.
(InjectedScript.prototype.addCommandLineAPIMethod): Added.
(InjectedScript.prototype.hasInjectedModule): Added.
(InjectedScript.prototype.injectModule):
(InjectedScript.prototype._evaluateOn):
(InjectedScript.CommandLineAPI): Added.
(InjectedScript.prototype.module): Deleted.
(InjectedScript.prototype._savedResult): Deleted.
(bind): Deleted.
(BasicCommandLineAPI): Deleted.
(clear): Deleted.
(table): Deleted.
(profile): Deleted.
(profileEnd): Deleted.
(keys): Deleted.
(values): Deleted.
(queryInstances): Deleted.
(queryObjects): Deleted.
(queryHolders): Deleted.

Source/WebCore:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • inspector/CommandLineAPIModuleSource.js:

(injectedScript._inspectObject): Added.
(normalizeEventTypes): Added.
(logEvent): Added.
(canQuerySelectorOnNode): Added.
(bind): Deleted.
(value): Deleted.
(this.method.toString): Deleted.
(CommandLineAPI): Deleted.
(CommandLineAPIImpl): Deleted.
(CommandLineAPIImpl.prototype): Deleted.
(CommandLineAPIImpl.prototype._canQuerySelectorOnNode): Deleted.
(CommandLineAPIImpl.prototype.x): Deleted.
(CommandLineAPIImpl.prototype.dir): Deleted.
(CommandLineAPIImpl.prototype.dirxml): Deleted.
(CommandLineAPIImpl.prototype.keys): Deleted.
(CommandLineAPIImpl.prototype.values): Deleted.
(CommandLineAPIImpl.prototype.profile): Deleted.
(CommandLineAPIImpl.prototype.profileEnd): Deleted.
(CommandLineAPIImpl.prototype.table): Deleted.
(CommandLineAPIImpl.prototype.screenshot): Deleted.
(CommandLineAPIImpl.prototype.monitorEvents): Deleted.
(CommandLineAPIImpl.prototype.unmonitorEvents): Deleted.
(CommandLineAPIImpl.prototype.inspect): Deleted.
(CommandLineAPIImpl.prototype.queryInstances): Deleted.
(CommandLineAPIImpl.prototype.queryObjects): Deleted.
(CommandLineAPIImpl.prototype.queryHolders): Deleted.
(CommandLineAPIImpl.prototype.copy): Deleted.
(CommandLineAPIImpl.prototype.clear): Deleted.
(CommandLineAPIImpl.prototype.getEventListeners): Deleted.
(CommandLineAPIImpl.prototype._inspectedObject): Deleted.
(CommandLineAPIImpl.prototype._normalizeEventTypes): Deleted.
(CommandLineAPIImpl.prototype._logEvent): Deleted.
(CommandLineAPIImpl.prototype._inspect): Deleted.

Source/WebInspectorUI:

Expose all console.* functions in the command line API, since they're all already able to
be referenced via the console object.

Provide a simpler interface for other injected scripts to modify the command line API.

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

(WI.JavaScriptRuntimeCompletionProvider.prototype.get _commandLineAPIKeys): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.updateLastPropertyNames):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):

LayoutTests:

  • http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt:
  • inspector/console/command-line-api-expected.txt:
5:24 PM Changeset in webkit [249077] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under TimerBase::setNextFireTime() in the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=201097
<rdar://problem/54658339>

Reviewed by Ryosuke Niwa.

NetworkStateNotifier is a WebCore/platform class used by both WebKitLegacy and WebKit2 in the NetworkProcess.
On iOS, the lambda in the implementation of NetworkStateNotifier::startObserving() may get called by the
underlying framework on a non-main thread and we therefore want to go back to the main thread before calling
NetworkStateNotifier::singleton().updateStateSoon(). This is important because updateStateSoon() will schedule
a WebCore::Timer. The issue is that the code was using WebThreadRun() to go back the the main thread. While
this works fine in iOS WK1, it does not do what we want in WebKit2 in the network process. Indeed, before there
is no WebThread in the network process, WebThreadRun() will simply run the block on whatever thread we're one.
This would lead to crashes when trying to schedule the Timer in updateStateSoon(). To address the issue, we now
use callOnMainThread().

  • platform/network/ios/NetworkStateNotifierIOS.mm:

(WebCore::NetworkStateNotifier::startObserving):

5:20 PM Changeset in webkit [249076] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (r248807): Objects stored in ElementRareData are leaked
https://bugs.webkit.org/show_bug.cgi?id=200954

Reviewed by David Kilzer.

NodeRareData didn't have a virtual destructor. As a result, member variables
of ElementRareData did not get destructed properly.

  • dom/NodeRareData.cpp:
  • dom/NodeRareData.h:

(WebCore::NodeRareData::~NodeRareData):

4:08 PM Changeset in webkit [249075] by tzagallo@apple.com
  • 23 edits
    2 deletes in trunk

Remove MaximalFlushInsertionPhase
https://bugs.webkit.org/show_bug.cgi?id=201036

Reviewed by Saam Barati.

JSTests:

Remove all the references to maximal flush

  • stress/arith-ceil-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-floor-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-negate-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-round-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/arith-trunc-on-various-types.js:

(checkCompileCountForUselessNegativeZero):

  • stress/dfg-compare-eq-via-nonSpeculativeNonPeepholeCompareNullOrUndefined.js:
  • stress/has-indexed-property-should-accept-non-int32.js:
  • stress/has-indexed-property-with-worsening-array-mode.js:
  • stress/known-int32-cant-be-used-across-bytecode-boundary.js:
  • stress/read-dead-bytecode-locals-in-must-handle-values1.js:
  • stress/read-dead-bytecode-locals-in-must-handle-values2.js:
  • stress/rest-parameter-many-arguments.js:
  • stress/set-argument-maybe-maximal-flush-should-not-extend-liveness-2.js:
  • stress/set-argument-maybe-maximal-flush-should-not-extend-liveness.js:
  • stress/to-index-string-should-not-assume-incoming-value-is-uint32.js:

Source/JavaScriptCore:

Maximal flush has found too many false positives recently, so we decided it's finally time
to remove it instead of hacking it to fix the most recent false positive.

The most recent false positive was caused by a LoadVarargs followed by a SetArgumentDefinitely
for the argument count that was being flushed in a much later block. Now, since that block was
the head of a loop, and there was a SetLocal in the same block to the same variable, this
generated a Phi of both values, which then led to the unification of their VariableAccessData
in the unification phase. This caused AI to assign the Int52 type to argument count, which
broke the AI’s assumption that it should always be an Int32.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleVarargsInlining):

  • dfg/DFGMaximalFlushInsertionPhase.cpp: Removed.
  • dfg/DFGMaximalFlushInsertionPhase.h: Removed.
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
4:00 PM Changeset in webkit [249074] by wenson_hsieh@apple.com
  • 6 edits
    2 adds in trunk

[iOS] [WebKit2] Tapping on the “I’m” text suggestion after typing “i’” does nothing
https://bugs.webkit.org/show_bug.cgi?id=201085
<rdar://problem/53056118>

Reviewed by Tim Horton.

Source/WebCore:

Exposes an existing quote folding function as a helper on TextIterator, and also adjusts foldQuoteMarks to take
a const String& rather than a String. See WebKit ChangeLog for more details.

  • editing/TextIterator.cpp:

(WebCore::foldQuoteMarks):
(WebCore::SearchBuffer::SearchBuffer):

  • editing/TextIterator.h:

Source/WebKit:

Currently, logic in applyAutocorrectionInternal only selects the range to autocorrect if the text of the range
matches the string to replace (delivered to us from UIKit). In the case of changing "I’" to "I’m", the string to
replace is "I'" (with a straight quote rather than an apostrophe), even though the DOM contains an apostrophe.

This is because kbd believes that the document context contains straight quotes (rather than apostrophes). For
native text views, this works out because UIKit uses relative UITextPositions to determine the replacement
range rather than by checking against the contents of the document. However, WKWebView does not have the ability
to synchronously compute and reason about arbitrary UITextPositions relative to the selection, so we instead
search for the string near the current selection when applying autocorrections.

Of course, this doesn't work in this scenario because the replacement string contains a straight quote, yet the
text node contains an apostrophe, so we bail and don't end up replacing any text. To address this, we repurpose
TextIterator helpers currently used to allow find-in-page to match straight quotes against apostrophes; instead
of matching the replacement string exactly, we instead match the quote-folded versions of these strings when
finding the range to replace.

Test: fast/events/ios/autocorrect-with-apostrophe.html

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applyAutocorrectionInternal):

LayoutTests:

Add a new layout test to verify that "I’" can be autocorrected to "I’m".

  • fast/events/ios/autocorrect-with-apostrophe-expected.txt: Added.
  • fast/events/ios/autocorrect-with-apostrophe.html: Added.
3:56 PM Changeset in webkit [249073] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed WinCairo build fix following r249058.

  • API/tests/testapi.cpp:

(TestAPI::callFunction):
WinCairo chokes on JSValueRef args[sizeof...(arguments)] when there are no arguments, but AppleWin does not...
MSVC must have changed somehow.

3:54 PM Changeset in webkit [249072] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r248974): fast/events/ios/key-command-delete-to-end-of-paragraph.html is timing out on iOS
https://bugs.webkit.org/show_bug.cgi?id=201091
<rdar://problem/54647731>

Reviewed by Megan Gardner.

  • fast/events/ios/key-command-delete-to-end-of-paragraph.html:

The test as-written doesn't actually wait for the tap to complete before
continuing on with the test - it starts immediately when the focus event
fires. This results in the selection being changed by the single click
handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

3:17 PM Changeset in webkit [249071] by kocsen_chung@apple.com
  • 1 copy in tags/Safari-608.2.9

Tag Safari-608.2.9.

2:37 PM Changeset in webkit [249070] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Remove IDBDatabaseIdentifier::m_mainFrameOrigin
https://bugs.webkit.org/show_bug.cgi?id=201078

Reviewed by Darin Adler.

No change of behavior.

  • Modules/indexeddb/IDBDatabaseIdentifier.h:
2:33 PM Changeset in webkit [249069] by justin_michaud@apple.com
  • 4 edits in trunk

[WASM-References] Do not overwrite argument registers in jsCallEntrypoint
https://bugs.webkit.org/show_bug.cgi?id=200952

Reviewed by Saam Barati.

JSTests:

  • wasm/references/func_ref.js:

(assert.throws):

Source/JavaScriptCore:

The c call that we emitted was incorrect. If we had an int argument that was supposed to be placed in GPR0 by this loop,
we would clobber it while making the call (among many other possible registers). To fix this, we just inline the call
to isWebassemblyHostFunction.

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

2:21 PM Changeset in webkit [249068] by jiewen_tan@apple.com
  • 4 edits in trunk/Source

Unreviewed, build fix after r249059

Source/WebKit:

  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:

(WebKit::NfcConnection::NfcConnection):
Remove the HAVE() macro.

Source/WTF:

  • wtf/Platform.h:

Make HAVE_NEAR_FIELD available only on iOS 13+ and macOS Catalina+.

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

Increase log level for watchlist result
https://bugs.webkit.org/show_bug.cgi?id=201081

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/tool/steps/applywatchlist.py: Increased log level.
  • Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: Updated unit-tests.
  • Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: Ditto.
1:58 PM Changeset in webkit [249066] by Chris Dumez
  • 57 edits
    1 copy
    7 moves
    2 adds
    1 delete in trunk

[geolocation] Rename interfaces and remove [NoInterfaceObject]
https://bugs.webkit.org/show_bug.cgi?id=200885

Reviewed by Alex Christensen.

Source/WebCore:

Rename Geolocation interfaces and expose them on the global Window object to match the
latest specification:

Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/geolocation/GeoNotifier.cpp:

(WebCore::GeoNotifier::setFatalError):
(WebCore::GeoNotifier::runSuccessCallback):
(WebCore::GeoNotifier::runErrorCallback):
(WebCore::GeoNotifier::timerFired):

  • Modules/geolocation/GeoNotifier.h:
  • Modules/geolocation/Geolocation.cpp:

(WebCore::createGeolocationPosition):
(WebCore::createGeolocationPositionError):
(WebCore::Geolocation::lastPosition):
(WebCore::Geolocation::startRequest):
(WebCore::Geolocation::requestUsesCachedPosition):
(WebCore::Geolocation::makeCachedPositionCallbacks):
(WebCore::Geolocation::haveSuitableCachedPosition):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::sendError):
(WebCore::Geolocation::sendPosition):
(WebCore::Geolocation::cancelRequests):
(WebCore::Geolocation::handleError):
(WebCore::Geolocation::makeSuccessCallbacks):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
(WebCore::Geolocation::handlePendingPermissionNotifiers):

  • Modules/geolocation/Geolocation.h:
  • Modules/geolocation/Geolocation.idl:
  • Modules/geolocation/GeolocationClient.h:
  • Modules/geolocation/GeolocationController.cpp:

(WebCore::GeolocationController::positionChanged):
(WebCore::GeolocationController::lastPosition):

  • Modules/geolocation/GeolocationController.h:
  • Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp.

(WebCore::GeolocationCoordinates::GeolocationCoordinates):

  • Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h.

(WebCore::GeolocationCoordinates::create):
(WebCore::GeolocationCoordinates::isolatedCopy const):

  • Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl.
  • Modules/geolocation/GeolocationPosition.h:

(WebCore::GeolocationPosition::create):
(WebCore::GeolocationPosition::isolatedCopy const):
(WebCore::GeolocationPosition::timestamp const):
(WebCore::GeolocationPosition::coords const):
(WebCore::GeolocationPosition::GeolocationPosition):

  • Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl.
  • Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h.

(WebCore::GeolocationPositionData::GeolocationPositionData):
(WebCore::GeolocationPositionData::encode const):
(WebCore::GeolocationPositionData::decode):
(WebCore::GeolocationPositionData::isValid const):

  • Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h.

(WebCore::GeolocationPositionError::create):
(WebCore::GeolocationPositionError::GeolocationPositionError):

  • Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl.
  • Modules/geolocation/Geoposition.h: Removed.
  • Modules/geolocation/PositionCallback.h:
  • Modules/geolocation/PositionCallback.idl:
  • Modules/geolocation/PositionErrorCallback.h:
  • Modules/geolocation/PositionErrorCallback.idl:
  • Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm.

(WebCore::GeolocationPositionData::GeolocationPositionData):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mock/GeolocationClientMock.cpp:

(WebCore::GeolocationClientMock::setPosition):
(WebCore::GeolocationClientMock::lastPosition):

  • platform/mock/GeolocationClientMock.h:

Source/WebKit:

  • Shared/WebGeolocationPosition.cpp:

(WebKit::WebGeolocationPosition::create):

  • Shared/WebGeolocationPosition.h:

(WebKit::WebGeolocationPosition::corePosition const):
(WebKit::WebGeolocationPosition::WebGeolocationPosition):

  • UIProcess/API/C/WKGeolocationPosition.cpp:

(WKGeolocationPositionCreate_c):

  • UIProcess/WebGeolocationManagerProxy.h:

(WebKit::WebGeolocationManagerProxy::lastPosition const):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKLegacyCoreLocationProvider positionChanged:]):

  • WebProcess/Geolocation/WebGeolocationManager.cpp:

(WebKit::WebGeolocationManager::didChangePosition):

  • WebProcess/Geolocation/WebGeolocationManager.h:
  • WebProcess/Geolocation/WebGeolocationManager.messages.in:
  • WebProcess/WebCoreSupport/WebGeolocationClient.cpp:

(WebKit::WebGeolocationClient::lastPosition):

  • WebProcess/WebCoreSupport/WebGeolocationClient.h:

Source/WebKitLegacy/ios:

  • Misc/WebGeolocationCoreLocationProvider.h:
  • Misc/WebGeolocationCoreLocationProvider.mm:

(-[WebGeolocationCoreLocationProvider sendLocation:]):

  • Misc/WebGeolocationProviderIOS.mm:

(-[_WebCoreLocationUpdateThreadingProxy positionChanged:]):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebGeolocationClient.h:
  • WebCoreSupport/WebGeolocationClient.mm:

(WebGeolocationClient::lastPosition):

  • WebView/WebGeolocationPosition.mm:

(-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
(core):
(-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
(-[WebGeolocationPosition initWithGeolocationPosition:]):

  • WebView/WebGeolocationPositionInternal.h:

Tools:

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::setMockGeolocationPosition):

LayoutTests:

Add layout test coverage.

  • fast/dom/Geolocation/exposed-geolocation-interfaces-expected.txt: Added.
  • fast/dom/Geolocation/exposed-geolocation-interfaces.html: Added.
  • fast/dom/Geolocation/position-string-expected.txt:
  • fast/dom/Geolocation/position-string.html:
1:55 PM Changeset in webkit [249065] by mark.lam@apple.com
  • 6 edits in trunk/Source/bmalloc

Undo disabling of IsoHeaps when Gigacage is off.
https://bugs.webkit.org/show_bug.cgi?id=201061
<rdar://problem/54622500>

Reviewed by Saam Barati and Michael Saboff.

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

(bmalloc::IsoTLS::determineMallocFallbackState):

  • bmalloc/PerThread.cpp: Removed.
  • bmalloc/PerThread.h:
1:31 PM Changeset in webkit [249064] by Chris Dumez
  • 5 edits in trunk/Source/WTF

Regression(r248533) Assertion hit in isMainThread() for some clients using WTF because the main thread is not initialized
https://bugs.webkit.org/show_bug.cgi?id=201083

Reviewed by Alex Christensen.

An assertion is hit in isMainThread() for some clients using WTF because the main thread is not initialized, since r248533.
Clients can work around this by calling WTF::initializeMainThread() before using WTF but it seems unfortunate to force them
to do so. I propose we disable the assertion until the main thread is initialized.

  • wtf/MainThread.h:
  • wtf/RefCounted.h:

(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):

  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::isMainThreadInitialized):

  • wtf/generic/MainThreadGeneric.cpp:

(WTF::isMainThreadInitialized):

1:23 PM Changeset in webkit [249063] by Ryan Haddad
  • 34 edits
    5 deletes in trunk

Unreviewed, rolling out r249001.

Caused one layout test to fail on all configurations and
another to time out on Catalina / iOS 13.

Reverted changeset:

"Add a WebsiteDataStore delegate to handle
AuthenticationChallenge that do not come from pages"
https://bugs.webkit.org/show_bug.cgi?id=196870
https://trac.webkit.org/changeset/249001

12:35 PM Changeset in webkit [249062] by Brian Burg
  • 5 edits in trunk/Source/WebKit

REGRESSION(r248713): WebDriver commands which target the implicit main frame now hit an ASSERT
https://bugs.webkit.org/show_bug.cgi?id=200793
<rdar://problem/54516988>

Reviewed by Chris Dumez.

SimulatedInputDispatcher and its callers need to support Optional<FrameIdentifier>
and WTF::nullopt as an encoding for the implicit main frame.

  • UIProcess/Automation/SimulatedInputDispatcher.h:
  • UIProcess/Automation/SimulatedInputDispatcher.cpp:

(WebKit::SimulatedInputDispatcher::resolveLocation):
(WebKit::SimulatedInputDispatcher::run):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
(WebKit::WebAutomationSession::performInteractionSequence):
(WebKit::WebAutomationSession::cancelInteractionSequence):

12:25 PM Changeset in webkit [249061] by jbedard@apple.com
  • 3 edits in trunk/Tools

results.webkit.org: Escape html in changelog
https://bugs.webkit.org/show_bug.cgi?id=201025
<rdar://problem/54564837>

Reviewed by Darin Adler.

  • resultsdbpy/resultsdbpy/view/commit_view.py:

(CommitView.commit): Output a dictionary instead of a JSON encoded string.

  • resultsdbpy/resultsdbpy/view/templates/commit.html: Unpack commits dictionary

directly into a JavaScript dictionary.

12:21 PM Changeset in webkit [249060] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION: fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=201075
<rdar://problem/54491246>

Patch by Antoine Quint <Antoine Quint> on 2019-08-23
Reviewed by Daniel Bates.

This test was written very early on in the process of implementing Pointer Events and assumed events would keep
firing when scrolling occured. We need to add "touch-action: none" to ensure we get pointermove and pointerup
events. We also need to ensure that the interaction occurs over content otherwise events won't fire. Finally, we
pretty up the test a bit.

  • fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt:
  • fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html:
11:56 AM Changeset in webkit [249059] by jiewen_tan@apple.com
  • 31 edits
    9 copies
    16 adds in trunk

[WebAuthn] Support NFC authenticators for iOS
https://bugs.webkit.org/show_bug.cgi?id=188624
<rdar://problem/43354214>

Reviewed by Chris Dumez.

Source/WebCore:

Tests: http/wpt/webauthn/ctap-nfc-failure.https.html

http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html
http/wpt/webauthn/public-key-credential-create-success-nfc.https.html
http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html
http/wpt/webauthn/public-key-credential-get-success-nfc.https.html

  • Modules/webauthn/apdu/ApduResponse.h:

Adds a new method to support moving m_data.

  • Modules/webauthn/fido/FidoConstants.h:

Adds constants for NFC applet selection.

Source/WebKit:

This patch implements support for NFC authenticators including both FIDO2 and U2F ones. It utilizes a private
framework called NearField instead of CoreNFC to be able to supply a custom UI later if necessary.

The patch follows almost the same flow as previous HID and Local authenticator support.
1) Discovery is via NfcService which will invoke NFHardwareManager to start a generic NFC reader session.
2) Once a reader session is established, a NfcConnection is created to start the polling and register the WKNFReaderSessionDelegate
to wait for 'didDetectTags'.
3) When tags are detected, NfcConnection will determine if it meets our requriements: { type, connectability, fido applet availability }.
The first tag that meets all requirement will then be returned for WebAuthn operations.
4) The first WebAuthn operation is to send authenticatorGetInfo command to determine the supported protocol, and then initialize corresponding
authenticators. Noted, the sending/receiving of this command is now abstracted into FidoService which will be shared across HidService and NfcService.
5) From then, the actual WebAuthn request, either makeCredential or getAssertion will be sent.

For testing, this patch follows the same flow as well.
1) MockNfcService overrides NfcService to mock the behavior of NFC Tags discovery.
2) The same class also swizzles methods from NFReaderSession to mock tag connection and communication.

  • Platform/spi/Cocoa/NearFieldSPI.h: Added.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManagerInternal::collectTransports):

  • UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:

(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):

  • UIProcess/WebAuthentication/Cocoa/HidService.h:
  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::HidService):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo): Deleted.

  • UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: Added.

(WebKit::fido::compareVersion):
(WebKit::NfcConnection::NfcConnection):
(WebKit::NfcConnection::~NfcConnection):
(WebKit::NfcConnection::transact const):
(WebKit::NfcConnection::didDetectTags const):

  • UIProcess/WebAuthentication/Cocoa/NfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/NfcService.mm: Added.

(WebKit::NfcService::NfcService):
(WebKit::NfcService::~NfcService):
(WebKit::NfcService::didConnectTag):
(WebKit::NfcService::startDiscoveryInternal):
(WebKit::NfcService::platformStartDiscovery):

  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.

(-[WKNFReaderSessionDelegate initWithConnection:]):
(-[WKNFReaderSessionDelegate readerSession:didDetectTags:]):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::shouldContinueFeedReports):

  • UIProcess/WebAuthentication/Mock/MockNfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/Mock/MockNfcService.mm: Added.

(-[WKMockNFTag type]):
(-[WKMockNFTag initWithNFTag:]):
(-[WKMockNFTag description]):
(-[WKMockNFTag isEqualToNFTag:]):
(-[WKMockNFTag initWithType:]):
(WebKit::MockNfcService::MockNfcService):
(WebKit::MockNfcService::transceive):
(WebKit::MockNfcService::platformStartDiscovery):
(WebKit::MockNfcService::detectTags const):

  • UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
  • UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp: Added.

(WebKit::CtapNfcDriver::CtapNfcDriver):
(WebKit::CtapNfcDriver::transact):
(WebKit::CtapNfcDriver::respondAsync const):

  • UIProcess/WebAuthentication/fido/CtapNfcDriver.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/fido/FidoService.cpp: Added.

(WebKit::FidoService::FidoService):
(WebKit::FidoService::getInfo):
(WebKit::FidoService::continueAfterGetInfo):

  • UIProcess/WebAuthentication/fido/FidoService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h.
  • UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:
  • UIProcess/WebAuthentication/fido/U2fAuthenticator.h:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/Platform.h:

Add a feature flag for NearField.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setWebAuthenticationMockConfiguration):
Setup NFC mock testing configuration.

LayoutTests:

  • http/wpt/webauthn/ctap-nfc-failure.https-expected.txt: Added.
  • http/wpt/webauthn/ctap-nfc-failure.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:

This patch replaces the "local" keyword with "hid".

  • http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https.html: Added.
  • http/wpt/webauthn/resources/util.js:
  • platform/ios-simulator-wk2/TestExpectations:

Skip NFC tests for simulators.

11:51 AM Changeset in webkit [249058] by Ross Kirsling
  • 11 edits in trunk/Source

JSC should have public API for unhandled promise rejections
https://bugs.webkit.org/show_bug.cgi?id=197172

Reviewed by Keith Miller.

Source/JavaScriptCore:

This patch makes it possible to register a unhandled promise rejection callback via the JSC API.
Since there is no event loop in such an environment, this callback fires off of the microtask queue.
The callback receives the promise and rejection reason as arguments and its return value is ignored.

  • API/JSContextRef.cpp:

(JSGlobalContextSetUnhandledRejectionCallback): Added.

  • API/JSContextRefPrivate.h:

Add new C++ API call.

  • API/tests/testapi.cpp:

(TestAPI::promiseResolveTrue): Clean up test output.
(TestAPI::promiseRejectTrue): Clean up test output.
(TestAPI::promiseUnhandledRejection): Added.
(TestAPI::promiseUnhandledRejectionFromUnhandledRejectionCallback): Added.
(TestAPI::promiseEarlyHandledRejections): Added.
(testCAPIViaCpp):
Add new C++ API test.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionSetUnhandledRejectionCallback): Added.
Add corresponding global to JSC shell.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::setUnhandledRejectionCallback): Added.
(JSC::JSGlobalObject::unhandledRejectionCallback const): Added.
Keep a strong reference to the callback.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncHostPromiseRejectionTracker):
Add default behavior.

  • runtime/VM.cpp:

(JSC::VM::callPromiseRejectionCallback): Added.
(JSC::VM::didExhaustMicrotaskQueue): Added.
(JSC::VM::promiseRejected): Added.
(JSC::VM::drainMicrotasks):
When microtask queue is exhausted, deal with any pending unhandled rejections
(in a manner based on RejectedPromiseTracker's reportUnhandledRejections),
then make sure this didn't cause any new microtasks to be added to the queue.

  • runtime/VM.h:

Store unhandled rejections.
(This collection will always be empty in the presence of WebCore.)

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::promiseRejectionTracker):
Move JSInternalPromise early-out to JSC side.

11:29 AM Changeset in webkit [249057] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: transparency checkerboard is too bright in dark mode
https://bugs.webkit.org/show_bug.cgi?id=201067

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/Main.css:

(@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):

  • UserInterface/Views/ConsoleMessageView.css:

(.console-message-body > .show-grid):

11:14 AM Changeset in webkit [249056] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Support ITP on a per-session basis (198923)
https://bugs.webkit.org/show_bug.cgi?id=198923

Patch by Kate Cheney <katherine_cheney@apple.com> on 2019-08-23
Reviewed by Chris Dumez.

Source/WebCore:

This patch updated the data structure used to collect resource load
statistics in order to support ITP data collection on a per session
basis. Each sessionID is stored as a key-value pair with its own map
of ResourceLoadStatistics.

It also updated the statisticsForURL function call to perform lookups
of URL data based on sessionID.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
(WebCore::ResourceLoadObserver::shouldLog const):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):
(WebCore::ResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebCore::ResourceLoadObserver::statisticsForURL):
(WebCore::ResourceLoadObserver::takeStatistics):
(WebCore::ResourceLoadObserver::clearState):

  • loader/ResourceLoadObserver.h:
  • testing/Internals.cpp:

(WebCore::Internals::resourceLoadStatisticsForURL):

Source/WebKit:

The original implementation of resourceLoadStatisticsUpdated
did not allow for ITP on a per session basis due to the sessionID
not being passed to the resourceLoadStatisticsUpdated function.
This patch allows access of the correct networkSession by passing
all resourceLoadStatistics in a new data structure of key-value
pairs, where the sessionID is the key.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • WebProcess/WebProcess.cpp:
10:53 AM Changeset in webkit [249055] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248969. rdar://problem/54643450

Crash under StringImpl::~StringImpl() in IDBServer::computeSpaceUsedForOrigin()
https://bugs.webkit.org/show_bug.cgi?id=200989
<rdar://problem/54565546>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on IDBServer::m_databaseDirectoryPath before using it from
background threads.

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion): (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
  • Modules/indexeddb/server/IDBServer.h: (WebCore::IDBServer::IDBServer::databaseDirectoryPath const):

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

10:53 AM Changeset in webkit [249054] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248971. rdar://problem/54643440

Crash under StringImpl::endsWith() in SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade()
https://bugs.webkit.org/show_bug.cgi?id=200990
<rdar://problem/54566439>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on SQLiteIDBBackingStore::m_databaseRootDirectory before using
it from background threads.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade): (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
  • Modules/indexeddb/server/SQLiteIDBBackingStore.h: (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectory const):

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

10:53 AM Changeset in webkit [249053] by Alan Coon
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248967. rdar://problem/54643456

Crash under StringImpl::endsWith() in RegistrationDatabase::openSQLiteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=200991
<rdar://problem/54566689>

Reviewed by Geoffrey Garen.

Make sure we call isolatedCopy() on RegistrationDatabase::m_databaseDirectory before using
it from background threads.

  • workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): (WebCore::RegistrationDatabase::clearAll):
  • workers/service/server/RegistrationDatabase.h: (WebCore::RegistrationDatabase::databaseDirectory const):

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

10:21 AM Changeset in webkit [249052] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

VirtualRegister::dump() can use more informative CallFrame header slot names.
https://bugs.webkit.org/show_bug.cgi?id=201062

Reviewed by Tadeu Zagallo.

For example, it currently dumps head3 instead of callee. This patch changes the
dump as follows (for 64-bit addressing):

head0 => callerFrame
head1 => returnPC
head2 => codeBlock
head3 => callee
head4 => argumentCount

Now, one might be wondering when would bytecode ever access callerFrame and
returnPC? The answer is never. However, I don't think its the role of the
dumper to catch a bug where these header slots are being used. The dumper's role
is to clearly report them so that we can see that these unexpected values are
being used.

  • bytecode/VirtualRegister.cpp:

(JSC::VirtualRegister::dump const):

10:15 AM Changeset in webkit [249051] by Russell Epstein
  • 12 edits
    7 deletes in trunk

Unreviewed, rolling out r249031.

Causes multiple test failures on iOS simulator

Reverted changeset:

"[iOS] Should show input view when became first responder if
keyboard was showing when the view was resigned"
https://bugs.webkit.org/show_bug.cgi?id=200902
https://trac.webkit.org/changeset/249031

10:06 AM Changeset in webkit [249050] by Ryan Haddad
  • 6 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249042. rdar://problem/54622280

Revert delete-in-input-in-iframe.html and typing-in-input-in-iframe.html to original behaviour after r248977 and make associated test autoscroll-input-when-very-zoomed.html more stable
https://bugs.webkit.org/show_bug.cgi?id=201058

Reviewed by Simon Fraser.

delete-in-input-in-iframe and typing-in-input-in-iframe were changed when scrolling was made to work differently in r244141.
They actually did find a bug, and that bug was fixed in r248977, so we put the tests back to test that scolls do not happen.
Also update autoscroll-input-when-very-zoomed which was added to test r248977 to be more robust.

  • fast/forms/ios/delete-in-input-in-iframe-expected.txt:
  • fast/forms/ios/delete-in-input-in-iframe.html:
  • fast/forms/ios/typing-in-input-in-iframe-expected.txt:
  • fast/forms/ios/typing-in-input-in-iframe.html:
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html:

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

10:06 AM Changeset in webkit [249049] by Ryan Haddad
  • 2 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249028. rdar://problem/54614691

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html: The test as-written doesn't actually wait for the tap to complete before continuing on with the test - it starts immediately when the focus event fires. This results in the selection being changed by the single click handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

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

10:06 AM Changeset in webkit [249048] by Ryan Haddad
  • 4 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r249017. rdar://problem/54564878

Rebaseline some editing tests after r248974
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

  • platform/ios/editing/deleting/smart-delete-003-expected.txt:
  • platform/ios/editing/deleting/smart-delete-004-expected.txt:
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt:

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

9:53 AM Changeset in webkit [249047] by simon.fraser@apple.com
  • 2 edits in trunk/Source/WebCore

Remove unnecessary call to enclosingClippingScopes()
https://bugs.webkit.org/show_bug.cgi?id=201063

Reviewed by Zalan Bujtas.

This line of code did nothing, and was left in by mistake. Remove it.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateOverlapMap const):

8:47 AM Changeset in webkit [249046] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

[ews] Enable Style queue on new EWS
https://bugs.webkit.org/show_bug.cgi?id=201071

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json: Enabled the scheduler for Style queue.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Enabled style queue bubble on new EWS.
  • QueueStatusServer/config/queues.py: Removed style queue from old EWS.
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer): Removed style queue from bot-watcher's dashboard.

8:31 AM Changeset in webkit [249045] by simon.fraser@apple.com
  • 3 edits in trunk/Source/WebCore

Cache hasCompositedScrollableOverflow as a bit on RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=201065

Reviewed by Zalan Bujtas.

hasCompositedScrollableOverflow() is pretty hot on some compositing-related code paths, and isn't
super cheap, as it checks a Setting and calls into renderer code. Optimize by computing it in
computeScrollDimensions().

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::hasCompositedScrollableOverflow const):
(WebCore::RenderLayer::computeScrollDimensions):

  • rendering/RenderLayer.h:
8:14 AM Changeset in webkit [249044] by simon.fraser@apple.com
  • 2 edits in trunk/Source/WebCore

Don't call clipCrossesPaintingBoundary() when not necessary
https://bugs.webkit.org/show_bug.cgi?id=201064

Reviewed by Zalan Bujtas.

clipCrossesPaintingBoundary() does some RenderLayer ancestor walks, so avoid
calling it when we already know that the clip rects are TemporaryClipRects.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

3:53 AM Changeset in webkit [249043] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Hole-punch build is broken
https://bugs.webkit.org/show_bug.cgi?id=200972

Reviewed by Žan Doberšek.

This patch fixes link issues when building with
USE_GSTREAMER_HOLEPUNCH enabled, the hole punch client destructor
was missing.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

Remove FAST_ALLOCATED annotation, because:

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

it's now in the base class, along with a default destructor.

12:25 AM Changeset in webkit [249042] by megan_gardner@apple.com
  • 6 edits in trunk/LayoutTests

Revert delete-in-input-in-iframe.html and typing-in-input-in-iframe.html to original behaviour after r248977 and make associated test autoscroll-input-when-very-zoomed.html more stable
https://bugs.webkit.org/show_bug.cgi?id=201058

Reviewed by Simon Fraser.

delete-in-input-in-iframe and typing-in-input-in-iframe were changed when scrolling was made to work differently in r244141.
They actually did find a bug, and that bug was fixed in r248977, so we put the tests back to test that scolls do not happen.
Also update autoscroll-input-when-very-zoomed which was added to test r248977 to be more robust.

  • fast/forms/ios/delete-in-input-in-iframe-expected.txt:
  • fast/forms/ios/delete-in-input-in-iframe.html:
  • fast/forms/ios/typing-in-input-in-iframe-expected.txt:
  • fast/forms/ios/typing-in-input-in-iframe.html:
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html:

Aug 22, 2019:

9:34 PM Changeset in webkit [249041] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

7:06 PM Changeset in webkit [249040] by Fujii Hironori
  • 3 edits
    4 adds in trunk

[SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
https://bugs.webkit.org/show_bug.cgi?id=201030

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg

svg/clip-path/clip-path-invalid-reference-001.svg
svg/clip-path/clip-path-invalid-reference-002-expected.svg
svg/clip-path/clip-path-invalid-reference-002.svg

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertClipPath): Use
SVGURIReference::fragmentIdentifierFromIRIString to get fragment
identifier from -webkit-clip-path.

LayoutTests:

  • svg/clip-path/clip-path-invalid-reference-001-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-001.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002.svg: Added.
6:59 PM Changeset in webkit [249039] by Fujii Hironori
  • 11 edits in trunk/Tools

[Win][MiniBrowser] URL bar should be updated for in-page navigations
https://bugs.webkit.org/show_bug.cgi?id=201032

Reviewed by Darin Adler.

  • MiniBrowser/win/BrowserWindow.h: Added activeURLChanged to BrowserWindowClient interface.
  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::init):
(MainWindow::activeURLChanged): Added.

  • MiniBrowser/win/MainWindow.h:
  • MiniBrowser/win/MiniBrowserWebHost.cpp:

(MiniBrowserWebHost::didCommitLoadForFrame):
(MiniBrowserWebHost::didChangeLocationWithinPageForFrame): Added.
(MiniBrowserWebHost::updateAddressBar): Deleted.
(MiniBrowserWebHost::loadURL): Deleted.

  • MiniBrowser/win/MiniBrowserWebHost.h:

(MiniBrowserWebHost::MiniBrowserWebHost):
(MiniBrowserWebHost::didCommitLoadForFrame): Deleted.
(MiniBrowserWebHost::didChangeLocationWithinPageForFrame): Deleted.

  • MiniBrowser/win/PrintWebUIDelegate.cpp:
  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::didChangeIsLoading): Removed an unused variable.
(WebKitBrowserWindow::didChangeActiveURL): Added.
(WebKitBrowserWindow::createNewPage):
(WebKitBrowserWindow::didCommitNavigation): Deleted.

  • MiniBrowser/win/WebKitBrowserWindow.h: Removed m_urlBarWnd.
  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(WebKitLegacyBrowserWindow::create):
(WebKitLegacyBrowserWindow::WebKitLegacyBrowserWindow):
(WebKitLegacyBrowserWindow::init):
(WebKitLegacyBrowserWindow::navigateToHistory):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.h: Removed m_urlBarWnd.
6:43 PM Changeset in webkit [249038] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Console: automatically select the "Evaluations" filter whenever running commands
https://bugs.webkit.org/show_bug.cgi?id=201060

Reviewed by Timothy Hatcher.

If the Console is actively being filtered (e.g. not "All"), it can be confusing to run a
command, only to not see any results. We should automatically enable the "Evaluations"
filter in addition to any other existing filters in these cases.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.didAppendConsoleMessageView):

  • UserInterface/Views/ScopeBarItem.js:

(WI.ScopeBarItem.prototype.set selected):
(WI.ScopeBarItem.prototype.toggle): Added.

6:07 PM Changeset in webkit [249037] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r248485): stack overflow when viewing a source map generated from inline content
https://bugs.webkit.org/show_bug.cgi?id=201042
<rdar://problem/54509750>

Reviewed by Antoine Quint.

In r248485, WI.ResourceClusterContentView was changed to requestContent whenever the
given resource finished loading (by listening for WI.Resource.Event.LoadingDidFinish).

Even though retrieving a source map's contents uses Promises, in the case that the content
was inlined in the "original" source code, the code path would mark the source map as being
finished (which would fire a WI.Resource.Event.LoadingDidFinish) _before_ it could return
a Promise, which would've been cached (WI.SourceCode.prototype.requestContent) and
preventend any reentrancy.

Wrapping the inline code path in a Promise.resolve() gives the WI.SourceCode a chance to
cache the Promise before any events are fired.

  • UserInterface/Models/SourceMapResource.js:

(WI.SourceMapResource.prototype.requestContentFromBackend):

4:54 PM Changeset in webkit [249036] by aestes@apple.com
  • 14 edits in trunk

[watchOS] Disable Content Filtering in the simulator build
https://bugs.webkit.org/show_bug.cgi?id=201047

Reviewed by Tim Horton.

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:

Source/WTF:

  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:28 PM Changeset in webkit [249035] by Chris Dumez
  • 5 edits
    1 add in trunk

Try to recover nicely when getting an unexpected schema in the service workers database
https://bugs.webkit.org/show_bug.cgi?id=201002
<rdar://problem/54574991>

Reviewed by Youenn Fablet.

Source/WebCore:

Try to recover nicely when getting an unexpected schema in the service workers database instead
of crashing the network process. To recover, we delete the database file and re-create it.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::openSQLiteDatabase):
(WebCore::RegistrationDatabase::ensureValidRecordsTable):

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4:17 PM Changeset in webkit [249034] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: console.dir should expand objects
https://bugs.webkit.org/show_bug.cgi?id=152039
<rdar://problem/23816853>

Reviewed by Joseph Pecoraro.

Expand objects logged by console.dir but keep them collapsed when logged by console.log.

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype.render):

3:51 PM Changeset in webkit [249033] by krollin@apple.com
  • 8 edits in trunk

Remove support for tvOS < 13.0
https://bugs.webkit.org/show_bug.cgi?id=200963
<rdar://problem/54541355>

Reviewed by Tim Horton.

Update conditionals that reference TV_OS_VERSION_MIN_REQUIRED and
TV_OS_VERSION_MAX_ALLOWED, assuming that they both have values >=

  1. This means that expressions like "TV_OS_VERSION_MIN_REQUIRED

< 130000" are always False and "TV_OS_VERSION_MIN_REQUIRED >=
130000" are always True.

Source/WebCore/PAL:

  • pal/spi/cocoa/NSKeyedArchiverSPI.h:
  • pal/spi/cocoa/NSProgressSPI.h:

Source/WTF:

  • wtf/FeatureDefines.h:
  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:

(TestWebKitAPI::TEST):

3:27 PM Changeset in webkit [249032] by Alan Coon
  • 1 copy in tags/Safari-608.2.8

Tag Safari-608.2.8.

3:22 PM Changeset in webkit [249031] by dbates@webkit.org
  • 12 edits
    7 adds in trunk

[iOS] Should show input view when became first responder if keyboard was showing when the view was resigned
https://bugs.webkit.org/show_bug.cgi?id=200902
<rdar://problem/54231756>

Reviewed by Wenson Hsieh.

Source/WebKit:

When resigning first responder save whether the peripheral host has an input view on screen,
including the software keyboard, so that we show the input view(s) again when the WKWebView
is made first responder. In Safari, this avoids the need for a person to explicitly focus an
editable element again to bring up the keyboard when returning to a tab they were previously
typing in. It also makes the behavior of switching tabs in Safari with a software keyboard
match the behavior of doing the same thing when a hardware keyboard attached.

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

(WebKit::PageClientImpl::focusedElementDidChangeInputMode):
Pass a diff of the activity state from the web process to the UI process so that we can
differentiate between an inputmode change as a result of page deactivation vs a change
caused by some other means. We need to differentiate these cases because we want to
ignore a page that sets inputmode "none" (i.e. a request to hide the keyboard) from inside
a focus event handler if the handler was called as part of the process of page activation
(i.e. switching to the tab). Google Docs is one example of a web site that sets inputmode
to "none" as a result of the page activation process.

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

(-[WKContentView cleanupInteraction]): Clear out state.
(-[WKContentView resignFirstResponderForWebView]): Save whether the peripheral host is on screen
into a local before ending the editing session. We then copy the local into the ivar if we
actually will resign. This ordering is explicitly done because:

  1. Ending the editing session may dismiss the keyboard => we need to query the peripheral host first.
  2. If the view is being resigned as a result of a keyboard dismissal (i.e. a person pressed the hide keyboard button on iPad) then the user has indicated that they are finished with the keyboard and we do not want to show the keyboard on page re-activation => we do not want to copy the local to the ivar.
  3. If the view refuses to resign itself then it does not make sense to save the keyboard state as responder status hasn't changed.

(-[WKContentView shouldShowAutomaticKeyboardUI]): Ignore inputmode="none", if needed.
(-[WKContentView _didCommitLoadForMainFrame]): Clear out state.
(-[WKContentView isFirstResponderOrBecomingFirstResponder]): Added.
(-[WKContentView shouldShowInputViewOnPageActivation:]): Added.
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
Update ivar if this element is being focused as a result of page activation.
(-[WKContentView _didUpdateInputMode:activityStateChanges:]): Modified to take the activity state
diff. If the input mode was changed as a result of page activation then we want to update our ivar
so that when we call -reloadInputViews and UIKit calls us back in -shouldShowAutomaticKeyboardUI we
will know to ignore inputmode set to "none" when determining whether to show the automatic keyboard UI.
Note that we do not need to check/track whether an earlier -_elementDidFocus actually started an
input session as part of updating the value of our ivar because if an input session was not started,
say the embedding client disallowed it, then we would not have a focused element => we early return from
this function. Also remove duplication and improve code readbility by making use of the convenience function
hasFocusedElement() instead of duplicating what it does.
(-[WKContentView _didUpdateInputMode:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::focusedElementDidChangeInputMode): Modified to take the activity state diff
and pass it through.
(WebKit::WebPageProxy::didReleaseAllTouchPoints): Pass the empty set for the activity state diff to
keep our current behavior.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedElementDidChangeInputMode): Send the activity state diff to the UI process.

LayoutTests:

Add tests to ensure that we show the keyboard when becoming first responder if the view resigned with the
keyboard on screen. Also add a test to ensure that we keep our current behavior and do NOT show the keyboard
for an autofocused text field when the view becomes first responder.

  • fast/events/ios/resources/check-keyboard-on-screen.js: Added.

(async.checkKeyboardOnScreen):
(async.checkKeyboardNotOnScreen):

  • fast/events/ios/should-not-show-keyboard-for-autofocused-field-when-becoming-first-responder-after-navigation-expected.txt: Added.
  • fast/events/ios/should-not-show-keyboard-for-autofocused-field-when-becoming-first-responder-after-navigation.html: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-despite-inputmode-none-expected.txt: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-despite-inputmode-none.html: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder-expected.txt: Added.
  • fast/events/ios/show-keyboard-when-becoming-first-responder.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.waitForKeyboardToShow.return.new.Promise): Added.
(window.UIHelper.waitForKeyboardToShow): Added.
(window.UIHelper.becomeFirstResponder): Added.

3:06 PM Changeset in webkit [249030] by dbates@webkit.org
  • 3 edits in trunk/Tools

[lldb-webkit] OptionSet summary shows size 0 sometimes for non-empty set
https://bugs.webkit.org/show_bug.cgi?id=200742

Reviewed by Simon Fraser.

The OptionSet synthetic provider must respond to requests for the value of m_storage
(i.e. GetChildMemberWithName('m_storage')) to avoid interfering with the computation
of the type summary.

Synthetic providers substitute alternative debug information (children) for the default
information for a variable. The OptionSet type summary is implemented in terms of the
OptionSet synthetic provider to maximize code reuse. If LLDB instantiates the provider
before invoking the type summary handler then evaluating GetChildMemberWithName() on
the SBValue passed to the type summary handler will access the substitute information
instead of the original debug information. As a result OptionSet's synthetic provider's
get_child_index('m_storage') returns None hence SBValue.GetChildMemberWithName('m_storage')
returned an invalid value; => WTFOptionSetProvider._bitmask() returns 0; => the size
reported in the type summary for the OptionSet is 0. Instead get_child_index('m_storage')
should return a valid value.

  • lldb/lldb_webkit.py:

(FlagEnumerationProvider.init):
(FlagEnumerationProvider):
(FlagEnumerationProvider._get_child_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider._get_child_at_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider.size): Added.
(FlagEnumerationProvider.get_child_index): Modified to call _get_child_index().
(FlagEnumerationProvider.get_child_at_index): Modified to call _get_child_at_index().
(FlagEnumerationProvider.update): Moved initialization of self._elements to the constructor
and removed self.size. For the latter we can just expose a getter that returns the size of
the list self._elements.
(WTFOptionSetProvider._get_child_index): Added. Return the index for LLDB to query for the
value of m_storage.
(WTFOptionSetProvider):
(WTFOptionSetProvider._get_child_at_index): Added. Return the value for m_storage if it
matches the specified index.

  • lldb/lldb_webkit_unittest.py:

(TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Update expected result now
that we return the value of m_storage as the last synthetic child.

2:43 PM Changeset in webkit [249029] by krollin@apple.com
  • 2 edits in trunk/Source/WebKit

Remove logging that contains a URL
https://bugs.webkit.org/show_bug.cgi?id=201052
<rdar://problem/54613204>

Reviewed by Chris Dumez.

checkURLReceivedFromWebProcess in WebProcessProxy.cpp contains an old
logging line that logs a URL. We don't log URLs any more for privacy
reasons, so remove this.

A search for WTFLogAlways.*url turns up other matches, but those are
either false positives or cases where the URLs are logged only on
demand by the developer as part of debugging.
checkURLReceivedFromWebProcess is the only place where a URL is logged
as a matter of course.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):

2:30 PM Changeset in webkit [249028] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r248974): fast/events/ios/select-all-with-existing-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=201050

Reviewed by Wenson Hsieh.

  • fast/events/ios/select-all-with-existing-selection.html:

The test as-written doesn't actually wait for the tap to complete before
continuing on with the test - it starts immediately when the focus event
fires. This results in the selection being changed by the single click
handler *after* focusing the field.

Rewrite the test to await completion of the tap before moving forward
instead of waiting for focus.

2:28 PM Changeset in webkit [249027] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Logging in FileSystem::deleteFile should avoid logging unsurprising errors
https://bugs.webkit.org/show_bug.cgi?id=200831

Patch by Kate Cheney <katherine_cheney@apple.com> on 2019-08-22
Reviewed by Chris Dumez.

To avoid overlogging unnecessary information, added a check to avoid logging
ENOENT (file not found) errors.

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::deleteFile):

2:13 PM Changeset in webkit [249026] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

Crash may happen when an SVG <feImage> element references the root <svg> element
https://bugs.webkit.org/show_bug.cgi?id=201014

Reviewed by Ryosuke Niwa.

Source/WebCore:

When an <feImage> references an <svg> element as its target image but
this <svg> element is also one of the ancestors of the <feImage>, the
parent <filter> should not be applied.

Test: svg/filters/filter-image-ref-root.html

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::build const):

LayoutTests:

Ensure the cyclic reference between the <feImage> renderer and its
ancestor <svg> root renderer is broken.

  • svg/filters/filter-image-ref-root-expected.txt: Added.
  • svg/filters/filter-image-ref-root.html: Added.
12:25 PM Changeset in webkit [249025] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Make ImageBuffer and SVG's FilterData isoheap'ed
https://bugs.webkit.org/show_bug.cgi?id=201029

Reviewed by Simon Fraser.

Made ImageBuffer and RenderSVGResourceFilter use IsoHeap.

  • platform/graphics/ImageBuffer.cpp:
  • platform/graphics/ImageBuffer.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/RenderSVGResourceFilter.h:
12:09 PM Changeset in webkit [249024] by jbedard@apple.com
  • 2 edits in trunk/Tools

results.webkit.org: Remove branch and repository information from commit tooltip
https://bugs.webkit.org/show_bug.cgi?id=201035

Reviewed by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(xAxisFromScale): Remove branch and repository information from tooltip.

12:04 PM Changeset in webkit [249023] by jbedard@apple.com
  • 4 edits in trunk/Tools

run-webkit-tests: Use -noBulkSymbolication when calling spindump
https://bugs.webkit.org/show_bug.cgi?id=201000
<rdar://problem/53778938>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Attempt to symbolicate with -noBulkSymbolication first.

  • Scripts/webkitpy/port/darwin_testcase.py:

(DarwinTest.test_tailspin):
(DarwinTest.test_get_crash_log): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_tailspin):

11:54 AM Changeset in webkit [249022] by Adrian Perez de Castro
  • 8 edits in trunk/Source

[GTK][WPE] Fixes for non-unified builds after r248547
https://bugs.webkit.org/show_bug.cgi?id=201044

Reviewed by Philippe Normand.

Source/JavaScriptCore:

  • b3/B3ReduceLoopStrength.cpp: Add missing inclusions of B3BasicBlockInlines.h,

B3InsertionSet.h, and B3NaturalLoops.h

  • wasm/WasmOMGForOSREntryPlan.h: Include WasmCallee.h instead of forward-declaring

BBQCallee in order to avoid build failure due to incomplete definition on template
expansions.

Source/WebCore:

  • platform/audio/AudioResamplerKernel.h: Add missing inclusion of wtf/Noncopyable.h

Source/WebKit:

  • NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Add missing inclusion of

the wtf/CrossThreadCopier.h header.

  • WebProcess/WebStorage/StorageNamespaceImpl.h: Add missing inclusion of the

WebCore/PageIdentifier.h header.

11:50 AM Changeset in webkit [249021] by zhifei_fang@apple.com
  • 5 edits in trunk/Tools

[results.webkit.org Webkit.css] Change input's disable style
The disable input style will always show the label like it has a value
https://bugs.webkit.org/show_bug.cgi?id=200998

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/css/docs.yaml: Adding a new example for disabled input that already has a value

*resultsdbpy/resultsdbpy/view/static/library/css/generate-webkit-css-docs:

  • resultsdbpy/resultsdbpy/view/static/library/css/index.html:
  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.input>input[type="text"][required][disabled],.input>input[type="number"][required][disabled],):When disabling a text input element even without a value, the style should match the style of a text input element with a value
(.input>input[type="text"][required][disabled]~label, .input>input[type="number"][required][disabled]~label,):
(@media (prefers-color-scheme: dark)):

11:18 AM Changeset in webkit [249020] by justin_michaud@apple.com
  • 3 edits
    1 add in trunk

Add missing exception check in canonicalizeLocaleList
https://bugs.webkit.org/show_bug.cgi?id=201021

Reviewed by Mark Lam.

JSTests:

  • stress/missing-exception-check-in-canonicalizeLocaleList.js: Added.

(catch):

Source/JavaScriptCore:

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLocaleList):

11:13 AM Changeset in webkit [249019] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Disable legacy TLS versions and add a temporary default to re-enable it
https://bugs.webkit.org/show_bug.cgi?id=200945

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-22
Reviewed by Brady Eidson.

Source/WebKit:

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

Source/WTF:

  • wtf/Platform.h:
11:01 AM Changeset in webkit [249018] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Make MediaStreamTrackPrivate WeakPtrFactoryInitialization::Eager
https://bugs.webkit.org/show_bug.cgi?id=201037

Reviewed by Darin Adler.

No change of behavior, replacing m_weakThis by the more convenient Eager.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:
10:35 AM Changeset in webkit [249017] by timothy_horton@apple.com
  • 4 edits in trunk/LayoutTests

Rebaseline some editing tests after r248974
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

  • platform/ios/editing/deleting/smart-delete-003-expected.txt:
  • platform/ios/editing/deleting/smart-delete-004-expected.txt:
  • platform/ios/editing/pasteboard/smart-paste-008-expected.txt:
10:23 AM Changeset in webkit [249016] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Cleanup some unused code
https://bugs.webkit.org/show_bug.cgi?id=201041

Reviewed by Alex Christensen.

  • UserInterface/Views/CPUUsageCombinedView.css:

(.cpu-usage-combined-view > .graph > .stacked-area-chart):

  • UserInterface/Views/CPUUsageCombinedView.js:

(WI.CPUUsageCombinedView):

  • UserInterface/Views/MediaTimelineOverviewGraph.js:

(WI.MediaTimelineOverviewGraph):

9:50 AM Changeset in webkit [249015] by Darin Adler
  • 3 edits in trunk/Source/WTF

Rename StringBuilder functions to avoid unclear "append uninitialized" terminology
https://bugs.webkit.org/show_bug.cgi?id=201020

Reviewed by Alex Christensen.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::allocateBuffer): Use std::memcpy instead of just memcpy.
(WTF::StringBuilder::extendBufferForAppending): Renamed.
(WTF::StringBuilder::extendBufferForAppendingWithoutOverflowCheck): Ditto.
(WTF::StringBuilder::extendBufferForAppending8): Ditto.
(WTF::StringBuilder::extendBufferForAppending16): Ditto.
(WTF::StringBuilder::extendBufferForAppendingSlowPath): Ditto.
(WTF::StringBuilder::appendCharacters): Updated for new names.

  • wtf/text/StringBuilder.h: Updated for new names.
9:42 AM Changeset in webkit [249014] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Provide an engineering option to log protocol traffic as text
https://bugs.webkit.org/show_bug.cgi?id=200969

Reviewed by Devin Rousso.

  • UserInterface/Base/Setting.js:
  • UserInterface/Protocol/LoggingProtocolTracer.js:

(WI.LoggingProtocolTracer.prototype._processEntry):
(WI.LoggingProtocolTracer):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createDebugSettingsView):

9:26 AM Changeset in webkit [249013] by Darin Adler
  • 41 edits in trunk

Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends
https://bugs.webkit.org/show_bug.cgi?id=200862

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError): Got rid of unnecessary local variable.
(JSC::notAFunctionSourceAppender): Use single append instead of multiple.
Eliminate unneeded and unconventional use of makeString on a single string literal.
(JSC::invalidParameterInstanceofNotFunctionSourceAppender): Ditto.
(JSC::invalidParameterInstanceofhasInstanceValueNotFunctionSourceAppender): Ditto.
(JSC::createInvalidFunctionApplyParameterError): Ditto.
(JSC::createInvalidInParameterError): Ditto.
(JSC::createInvalidInstanceofParameterErrorNotFunction): Ditto.
(JSC::createInvalidInstanceofParameterErrorHasInstanceValueNotFunction): Ditto.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck): Use single append instead of multiple.

  • runtime/Options.cpp:

(JSC::Options::dumpOption): Ditto.

  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::typeInformationForExpressionAtOffset): Ditto.

  • runtime/TypeSet.cpp:

(JSC::StructureShape::stringRepresentation): Ditto. Also use a modern for loop.

Source/WebCore:

  • Modules/indexeddb/shared/IDBDatabaseInfo.cpp:

(WebCore::IDBDatabaseInfo::loggingString const): Use one append instead of multiple.

  • Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:

(WebCore::IDBObjectStoreInfo::loggingString const): Ditto.

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCCodecParameters): Ditto.

  • Modules/plugins/YouTubePluginReplacement.cpp:

(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Ditto.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::generateDatabaseFileName): Ditto.

  • Modules/websockets/WebSocketExtensionDispatcher.cpp:

(WebCore::WebSocketExtensionDispatcher::createHeaderValue const): Ditto.
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto.

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::clientLocation const): Use makeString instead of
StringBuilder.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::appendArgumentMustBe): Use one append instead of multiple.
(WebCore::throwArgumentMustBeEnumError): Ditto.
(WebCore::throwArgumentTypeError): Ditto.

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::recursivePrint): Ditto.

  • css/CSSBasicShapes.cpp:

(WebCore::buildCircleString): Ditto.
(WebCore::buildEllipseString): Ditto.
(WebCore::buildPolygonString): Ditto.
(WebCore::buildInsetString): Ditto.

  • css/CSSCalculationValue.cpp:

(WebCore::buildCssText): Deleted.
(WebCore::CSSCalcValue::customCSSText const): Use makeString.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::cssText const): Use one append instead of multiple.

  • css/CSSCrossfadeValue.cpp:

(WebCore::CSSCrossfadeValue::customCSSText const): Use makeString.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::customCSSText const): Ditto.

  • css/CSSFontFaceRule.cpp:

(WebCore::CSSFontFaceRule::cssText const): Ditto.

  • css/CSSFontFaceSrcValue.cpp:

(WebCore::CSSFontFaceSrcValue::customCSSText const): Ditto.

  • css/CSSGradientValue.cpp:

(WebCore::appendGradientStops): Moved code here from CSSLinearGradientValue::customCSSText
so it can be shared with CSSRadialGradientValue::customCSSText. Use one append per stop.
(WebCore::CSSLinearGradientValue::customCSSText const): Use one append instead of multiple.
(WebCore::CSSRadialGradientValue::customCSSText const): Ditto.
(WebCore::CSSConicGradientValue::customCSSText const): Ditto.

  • css/CSSMediaRule.cpp:

(WebCore::CSSMediaRule::cssText const): Ditto.

  • css/CSSNamespaceRule.cpp:

(WebCore::CSSNamespaceRule::cssText const): Ditto.

  • css/CSSPageRule.cpp:

(WebCore::CSSPageRule::selectorText const): Use makeString.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
Use one append instead of multiple.

  • css/CSSPropertySourceData.cpp:

(WebCore::CSSPropertySourceData::CSSPropertySourceData): Initialize in the
structure definition instead of the constructor.
(WebCore::CSSPropertySourceData::toString const): Use makeString.

  • css/CSSPropertySourceData.h: Initialize in the structure definition.
  • css/CSSStyleRule.cpp:

(WebCore::CSSStyleRule::cssText const): Use makeString.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFontFaceDescriptor): Use makeString.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::font const): Use one append instead of multiple.

Source/WebKit:

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::setAndSerializeSandboxParameters): Use one append instead of multiple.

Source/WTF:

  • wtf/DateMath.cpp:

(WTF::makeRFC2822DateString): Use one append instead of multiple.

  • wtf/JSONValues.cpp:

(WTF::appendDoubleQuotedString): Ditto.

Tools:

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsDidRunTelemetryCallback): Use makeString.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::findAndDumpWebKitProcessIdentifiers): Ditto.
(WTR::TestController::downloadDidReceiveServerRedirectToURL): Ditto.
(WTR::TestController::downloadDidFail): Ditto.

9:20 AM Changeset in webkit [249012] by Alan Coon
  • 16 edits
    2 adds in branches/safari-608-branch

Cherry-pick r249006. rdar://problem/54600921

Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
https://bugs.webkit.org/show_bug.cgi?id=201023
<rdar://problem/54294794>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
WebKit ChangeLog for more details.

Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects const):

Source/WebKit:

After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
Microsoft Word online.

However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
input context changes when moving between the title and body fields, or when tapping to change selection. This
is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
and used to "play back" editing in the main visible content area.

Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
changed input contexts.

Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
text in the title field.

To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
messages we would've sent in previous releases).

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
moves away from and immediately returns to a hidden editable element.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):

Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.

  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::elementDidFocus):

In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
element, we should still notify the UI process so that it can synchronize state between the application process
and kbd. See above for more details.

(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

LayoutTests:

Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an
empty, borderless subframe.

  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added.
  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added.

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

8:47 AM Changeset in webkit [249011] by kocsen_chung@apple.com
  • 4 edits
    2 adds in branches/safari-608-branch

Cherry-pick r248977. rdar://problem/54599960

Do not adjust viewport if editing selection is already visible
https://bugs.webkit.org/show_bug.cgi?id=200907
<rdar://problem/53903417>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html

Currently due to scrolling being mostly handled by integers, we are getting
issues with rounding errors when trying to adjust the viewport while
editing text when we are significantly zoomed in. The real fix would be to
start dealing with scrolling with floats/doubles, but until such time,
we should early out of adjusting selections that we are certain are currently
visible.

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible):

LayoutTests:

  • fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added.
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added.
  • resources/ui-helper.js: (window.UIHelper.immediateZoomToScale):

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

8:45 AM Changeset in webkit [249010] by kocsen_chung@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248997. rdar://problem/54579627

Unreviewed build fix; add a 'final' declaration on shouldOverridePauseDuringRouteChange().

  • Modules/mediastream/MediaStream.h:

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

8:45 AM Changeset in webkit [249009] by kocsen_chung@apple.com
  • 3 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248978. rdar://problem/54579627

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

Follow-up to r248962: When the active audio route changes, and the
system instructs us to pause, only pause the currently audible sessions.

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange): (-[WebMediaSessionHelper activeAudioRouteDidChange:]): (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.

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

8:45 AM Changeset in webkit [249008] by kocsen_chung@apple.com
  • 6 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248962. rdar://problem/54579627

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

When the system notifies us that the active audio route has changed in such a way
that necessitates pausing, pause all media sessions, exempting those that are
associated with WebRTC, since "pausing" an active audio conference isn't really
possible.

  • Modules/mediastream/MediaStream.h:
  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const):
  • platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const):
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::activeRouteDidChange): (-[WebMediaSessionHelper initWithCallback:]): (-[WebMediaSessionHelper activeAudioRouteDidChange:]):

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

8:34 AM Changeset in webkit [249007] by commit-queue@webkit.org
  • 7 edits in trunk

Pass conformance/attribs WebGL conformance tests
https://bugs.webkit.org/show_bug.cgi?id=200901

Patch by Kai Ninomiya <kainino@chromium.org> on 2019-08-22
Reviewed by Alex Christensen.

Tested by
LayoutTests/webgl/*/conformance/attribs/gl-vertexattribpointer.html,
LayoutTests/webgl/2.0.0/conformance/more/functions/vertexAttribPointerBadArgs.html,
and other conformance/attribs/* tests not included in LayoutTests.
LayoutTests/webgl/1.0.2/conformance/more/functions/vertexAttribPointerBadArgs.html
fails as expected because it is an old snapshot of an incorrect test.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::validateVertexAttributes):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):

  • html/canvas/WebGLVertexArrayObjectBase.cpp:

(WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):

  • html/canvas/WebGLVertexArrayObjectBase.h:
8:09 AM Changeset in webkit [249006] by wenson_hsieh@apple.com
  • 16 edits
    2 adds in trunk

Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
https://bugs.webkit.org/show_bug.cgi?id=201023
<rdar://problem/54294794>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
WebKit ChangeLog for more details.

Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

Source/WebKit:

After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element
was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due
to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on
Microsoft Word online.

However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform
input context changes when moving between the title and body fields, or when tapping to change selection. This
is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more
detail here). While text is never directly inserted into this hidden contenteditable, the events are observed
and used to "play back" editing in the main visible content area.

Thus, when moving between the title and body fields (or when changing selection within either), the only hint we
get is that the hidden editable element is blurred and immediately refocused. Since we no longer send
ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively
changed input contexts.

Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text
that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters
into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected
text in the title field.

To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately
refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input
context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious
for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden
editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused
element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a
single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus
messages we would've sent in previous releases).

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus
moves away from and immediately returns to a hidden editable element.

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

(WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement):

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

(-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]):

Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new
autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request
would've still happened anyways in the case where we would previously have sent an ElementDidFocus message.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidFocus):

In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same
element, we should still notify the UI process so that it can synchronize state between the application process
and kbd. See above for more details.

(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

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

(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

LayoutTests:

Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an
empty, borderless subframe.

  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added.
  • editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added.
6:42 AM Changeset in webkit [249005] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview/Safari Technology Preview 90

Added a tag for Safari Technology Preview release 90.

4:41 AM Changeset in webkit [249004] by clopez@igalia.com
  • 3 edits in trunk/Tools

[GTK][WPE] Support for command "--version" on the MiniBrowser (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=200978

Unreviewed follow-up fix.

Update the string format specifier for unsigned it.

Patch by clopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> on 2019-08-22

  • MiniBrowser/gtk/main.c:

(main):

  • MiniBrowser/wpe/main.cpp:

(main):

4:18 AM Changeset in webkit [249003] by clopez@igalia.com
  • 3 edits in trunk/Tools

[GTK][WPE] Support for command "--version" on the MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=200978

Reviewed by Žan Doberšek.

Printing the engine version used from the MiniBrowser is useful.
For example, the test scripts on WPT can use this info to better
tag the generated results.

  • MiniBrowser/gtk/main.c: Print the engine version when called with --version or -v.

(main):

  • MiniBrowser/wpe/main.cpp: Ditto.

(main):

4:05 AM Changeset in webkit [249002] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

CaptureDeviceManager does not need to be CanMakeWeakPtr
https://bugs.webkit.org/show_bug.cgi?id=200936

Reviewed by Alex Christensen.

CaptureDeviceManager does not need to create a weak pointer in deviceChanged
since it directly calls RealtimeMediaSourceCenter singleton.

CoreAudioCaptureDeviceManager does not need to create a weak pointer since its only
instance is NeverDestroyed.
No change of behavior.

  • platform/mediastream/CaptureDeviceManager.cpp:

(WebCore::CaptureDeviceManager::deviceChanged):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::createAudioObjectPropertyListenerBlock):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
4:05 AM Changeset in webkit [249001] by youenn@apple.com
  • 34 edits
    2 copies
    3 adds in trunk

Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
https://bugs.webkit.org/show_bug.cgi?id=196870

Reviewed by Alex Christensen.

Source/WebKit:

Make NetworkProcess provide the session ID for any authentication challenge.
In case there is no associated page for the authentication challenge or this is related to a service worker,
ask the website data store to take a decision.
Add website data store delegate to allow applications to make the decision.
Restrict using the delegate to server trust evaluation only.

Make ping loads reuse the same mechanism.

Covered by service worker tests and updated beacon test.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::sessionID const):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

  • NetworkProcess/NetworkLoadChecker.h:

(WebKit::NetworkLoadChecker::networkProcess):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h: Copied from Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h.
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: Copied from Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h.

(WebKit::toAuthenticationChallengeDisposition):

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(WebsiteDataStoreClient::WebsiteDataStoreClient):

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

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

(WebKit::WebProcessPool::isServiceWorkerPageID const):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStoreClient.h:

(WebKit::WebsiteDataStoreClient::didReceiveAuthenticationChallenge):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Implement the new delegate by respecting the value set by testRunner.setAllowsAnySSLCertificate
Accept any server certificate by default.

  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::setAllowsAnySSLCertificate):

  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:

(-[TestWebsiteDataStoreDelegate didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestWebsiteDataStoreDelegate setAllowAnySSLCertificate:]):

LayoutTests:

Add tests to validate that the delegate decision is respected for beacons and service worker loads.

  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt:
  • http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html:
  • http/wpt/beacon/resources/beacon-preflight.py:

(main):

  • http/wpt/service-workers/resources/lengthy-pass.py:

(main):

  • http/wpt/service-workers/server-trust-evaluation.https-expected.txt: Added.
  • http/wpt/service-workers/server-trust-evaluation.https.html: Added.
  • http/wpt/service-workers/server-trust-worker.js: Added.
2:41 AM Changeset in webkit [249000] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Fix unsafe usage of MediaStreamTrackPrivate from background thread in MediaStreamTrackPrivate::audioSamplesAvailable()
https://bugs.webkit.org/show_bug.cgi?id=200924

Reviewed by Youenn Fablet.

MediaStreamTrackPrivate is constructed / destructed on the main thread but its MediaStreamTrackPrivate::audioSamplesAvailable()
gets called on a background thread. The audioSamplesAvailable() method may get called until the MediaStreamTrackPrivate
destructor unregisters |this| as an observer from m_source. Event though MediaStreamTrackPrivate subclasses ThreadSafeRefCounted,
ref'ing |this| on the background thread inside audioSamplesAvailable() is still unsafe as the destructor may already be running
on the main thread.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):

  • platform/mediastream/MediaStreamTrackPrivate.h:
2:40 AM Changeset in webkit [248999] by Claudio Saavedra
  • 2 edits in trunk/Source/WebKit

[SOUP] NetworkProcessSoup does not initialize CacheOptions correctly
https://bugs.webkit.org/show_bug.cgi?id=200886

Reviewed by Philippe Normand.

r247567 wrongly initializes CacheOptions in a local variable that is never used
instead of using NetworkProcess's member variable, that is later used by the
NetworkSession to initialize the cache.

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):

2:12 AM Changeset in webkit [248998] by Fujii Hironori
  • 9 edits in trunk/Source/WebCore

Remove the dead code of ScalableImageDecoder for scaling
https://bugs.webkit.org/show_bug.cgi?id=200498

Reviewed by Daniel Bates.

No ports are using the down scaling feature of
ScalableImageDecoder now. Removed it.

No behavior change.

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::prepareScaleDataIfNecessary): Deleted.
(WebCore::ScalableImageDecoder::upperBoundScaledX): Deleted.
(WebCore::ScalableImageDecoder::lowerBoundScaledX): Deleted.
(WebCore::ScalableImageDecoder::upperBoundScaledY): Deleted.
(WebCore::ScalableImageDecoder::lowerBoundScaledY): Deleted.
(WebCore::ScalableImageDecoder::scaledY): Deleted.

  • platform/image-decoders/ScalableImageDecoder.h:

(WebCore::ScalableImageDecoder::scaledSize): Deleted.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::setSize):
(WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::frameComplete):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::setSize): Deleted.

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:

(WebCore::JPEG2000ImageDecoder::decode):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::PNGImageDecoder::frameComplete):
(WebCore::PNGImageDecoder::setSize): Deleted.

  • platform/image-decoders/png/PNGImageDecoder.h:

Aug 21, 2019:

11:16 PM Changeset in webkit [248997] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix; add a 'final' declaration on shouldOverridePauseDuringRouteChange().

  • Modules/mediastream/MediaStream.h:
10:51 PM Changeset in webkit [248996] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test perf/clone-with-focus.html is a Flaky Failure
https://bugs.webkit.org/show_bug.cgi?id=201012

Reviewed by Antti Koivisto.

The flakiness was observed when the time to clone elements without focus is 0ms
but the time to clone elements with focus is 1ms or greater.

The test tries to make sure the time to clone elements with foucs is less than 2x
of the time to clone elements without focus. When the time to clone without focus
is 0ms, any difference is always more than 2x larger.

Fixed the test by increasing the number of elements until the time to clone without
focus takes at least 5ms.

  • perf/clone-with-focus.html:
10:33 PM Changeset in webkit [248995] by jbedard@apple.com
  • 4 edits in trunk/Tools

results.webkit.org: Fix drawer style
https://bugs.webkit.org/show_bug.cgi?id=200988

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/drawer.js:

(Drawer): Nothing in the drawer should be selectable.
(ConfigurationSelectors): Standardize text size, remove underscore from expanders.

  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.action:hover): Disable underline on 'links' which are actually actions
(.unselectable): Make a div unselectable.

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

(Timeline.ExpandableSeriesWithHeaderExpanderComponent): Remove underscore from expanders.

7:55 PM Changeset in webkit [248994] by sbarati@apple.com
  • 3 edits in trunk/Source/WebCore

[WHLSL] Improve default constructor and emit fewer pointers in metal codegen
https://bugs.webkit.org/show_bug.cgi?id=200995

Reviewed by Myles C. Maxfield.

This patch makes it so that we:

  1. Emit less code for copy constructors by omitting an unused variable.
  2. Emit ternary expressions instead of if statements for conditional assignments.
  3. Don't copy pointers for producing an lvalue from DereferenceExpression.
  4. Lazily produce lvalues for GlobalVariableReference.
  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::inlineNativeFunction):

7:50 PM Changeset in webkit [248993] by mmaxfield@apple.com
  • 30 edits
    1 copy
    55 adds in trunk

[WHLSL] Vertex shader and fragment shader need to be able to come from two different programs
https://bugs.webkit.org/show_bug.cgi?id=195446

Reviewed by Saam Barati.

Source/WebCore:

When an author configures WebGPU to render things, the author provides a vertex shader and a fragment
shader, and they both execute within the same draw call. It's common for authors coming from WebGL to
put the two shaders in distinct files. Until this patch, WHLSL was unable to process two shaders from
different sources which were meant to be hooked together.

The first thing this patch does is add the notion of a "shader module" to the WHLSL compiler. This
represents the source code containing one or more shaders. When the author wants to actually compile
their source, they supply one or more shader modules to the compiler. The compiler then looks in the
first module for the vertex shader and the second module for the fragment shader. The two modules are
passed by reference, so they may refer to the same underlying object, which is supported.

Shader modules have this interesting behavior where, within a shader module, funtion / type names may
refer to each other, but may not refer to any other name within any other shader module. They behave
as if all the names inside the module are not exported. So, it would seem that the most natural way to
support this would be to run the WHLSL compiler and the MSL compiler twice independently, once for each
module. However, this means that our compile times would double, which would be unfortunate. Instead,
a more performant option would be to make the WHLSL compiler smart enough to handle multiple shader
modules at once, and to produce a single merged output program that contains everything. It does this
by parsing all the shader modules into a single Program object, but remembering which items in the
Program came from which places.

This is implemented by teaching the WHLSL compiler about "namespaces." There are three namespaces: one
for each shader module, and an additional one for the standard library. Every global object (e.g.
named types and functions) knows which namespace it lives inside. The NameResolver has been educated
to understand namespaces, so when you ask it for a name in a particular namespace, it will look up
all the names both in that namespace and in the standard library's namespace, and it will union the
results together.

Function overload resolution doesn't actually go through the name resolver; instead, it's handled by
sorting all functions into buckets such that any CallExpression only has to look in a single bucket
to find all its potential overloads. These buckets can't be educated about namespaces (consider a
function which has overloads in all 3 namespaces that is called from both shader modules - all the
overloads must end up in the same bucket). Therefore, this logic is moved into
resolveFunctionOverload(), which will now disregard candidate functions if they are in an inaccessible
namespace.

Tests: webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html

webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html
webgpu/whlsl/separate-shader-modules/separate-shader-modules.html

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

(WebCore::WHLSL::AST::FunctionDeclaration::nameSpace const):
(WebCore::WHLSL::AST::FunctionDeclaration::setNameSpace):

  • Modules/webgpu/WHLSL/AST/WHLSLNameSpace.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h.
  • Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:

(WebCore::WHLSL::AST::NamedType::nameSpace const):
(WebCore::WHLSL::AST::NamedType::setNameSpace):

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

(WebCore::WHLSL::Metal::emitMetalFunctions):

  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:

(WebCore::WHLSL::DuplicateFunctionKey::operator== const):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::FunctionKey::operator== const):
(WebCore::WHLSL::checkOperatorOverload):
(WebCore::WHLSL::Checker::checkShaderType):
(WebCore::WHLSL::Checker::visit):
(WebCore::WHLSL::Checker::resolveFunction):

  • Modules/webgpu/WHLSL/WHLSLLexer.cpp:
  • Modules/webgpu/WHLSL/WHLSLNameContext.cpp:

(WebCore::WHLSL::NameContext::add):
(WebCore::WHLSL::NameContext::getTypes):
(WebCore::WHLSL::NameContext::getFunctions):
(WebCore::WHLSL::NameContext::searchTypes const):
(WebCore::WHLSL::NameContext::searchFunctions const):
(WebCore::WHLSL::NameContext::globalExists const):
(WebCore::WHLSL::NameContext::localExists const):
(WebCore::WHLSL::NameContext::exists): Deleted.

  • Modules/webgpu/WHLSL/WHLSLNameContext.h:

(WebCore::WHLSL::NameContext::setCurrentNameSpace):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:

(WebCore::WHLSL::NameResolver::NameResolver):
(WebCore::WHLSL::NameResolver::visit):
(WebCore::WHLSL::resolveNamesInTypes):
(WebCore::WHLSL::resolveTypeNamesInFunctions):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h:

(WebCore::WHLSL::NameResolver::setCurrentNameSpace):

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::parse):
(WebCore::WHLSL::Parser::fail):
(WebCore::WHLSL::Parser::consumeIntegralLiteral):
(WebCore::WHLSL::Parser::consumeNonNegativeIntegralLiteral):
(WebCore::WHLSL::Parser::parseConstantExpression):
(WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
(WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
(WebCore::WHLSL::Parser::parseBuiltInSemantic):
(WebCore::WHLSL::Parser::parseResourceSemantic):
(WebCore::WHLSL::Parser::parseStageInOutSemantic):
(WebCore::WHLSL::Parser::parseEnumerationDefinition):
(WebCore::WHLSL::Parser::parseEnumerationMember):
(WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
(WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
(WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
(WebCore::WHLSL::Parser::parseSwitchCase):
(WebCore::WHLSL::Parser::parseForLoop):
(WebCore::WHLSL::Parser::parseVariableDeclarations):
(WebCore::WHLSL::Parser::completeAssignment):
(WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
(WebCore::WHLSL::Parser::parseTerm):

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

(WebCore::WHLSL::ShaderModule::ShaderModule):
(WebCore::WHLSL::createShaderModule):
(WebCore::WHLSL::ShaderModuleDeleter::operator()):
(WebCore::WHLSL::prepareShared):
(WebCore::WHLSL::prepare):

  • Modules/webgpu/WHLSL/WHLSLPrepare.h:
  • Modules/webgpu/WHLSL/WHLSLProgram.h:

(WebCore::WHLSL::Program::append):

  • Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:

(WebCore::WHLSL::resolveFunctionOverloadImpl):
(WebCore::WHLSL::resolveFunctionOverload):

  • Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
  • Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:

(WebCore::WHLSL::matchSemantics):
(WebCore::WHLSL::findEntryPoint): Deleted.

  • Modules/webgpu/WHLSL/WHLSLSemanticMatcher.h:
  • Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:

(WebCore::WHLSL::includeStandardLibrary):

  • Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPUShaderModule.h:

(WebCore::GPUShaderModule::platformShaderModule const):
(WebCore::GPUShaderModule::whlslModule const):
(WebCore::GPUShaderModule::whlslSource const): Deleted.

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

(WebCore::trySetFunctions):
(WebCore::convertComputePipelineDescriptor):

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

(WebCore::trySetMetalFunctions):
(WebCore::trySetFunctions):
(WebCore::convertRenderPipelineDescriptor):

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

(WebCore::GPUShaderModule::tryCreate):
(WebCore::GPUShaderModule::GPUShaderModule):

LayoutTests:

  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-10-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-11-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-12-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-13-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-14-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-15-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-16-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-17-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-18-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-19-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-2-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-20-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-21-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-22-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-23-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-24-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-25-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-26-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-27-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-3-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-4-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-5-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-6-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-7-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-8-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-9-expected.txt: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules-expected.html: Added.
  • webgpu/whlsl/separate-shader-modules/separate-shader-modules.html: Added.
7:44 PM Changeset in webkit [248992] by mark.lam@apple.com
  • 3 edits in trunk/Source/WTF

Fix infinite recursion in WTFCrashWithInfo() after r248930.
https://bugs.webkit.org/show_bug.cgi?id=201022

Reviewed by Saam Barati.

  • wtf/Assertions.cpp:

(WTFCrashWithInfoImpl):
(WTFCrashWithInfo): Deleted.

  • wtf/Assertions.h:

(WTFCrashWithInfo):

7:33 PM Changeset in webkit [248991] by Nikita Vasilyev
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: DOM outline in Elements tab should be LTR
https://bugs.webkit.org/show_bug.cgi?id=200601

Reviewed by Timothy Hatcher.

Make DOM outlines in Console and Elements tab always LTR,
and unsure that Left and Right arrow keys continue working correctly.

  • UserInterface/Base/Main.js:

(WI.resolveLayoutDirectionForElement): Added.
The existing WI.resolvedLayoutDirection function returns the value of the root DOM element.
The newly added resolveLayoutDirectionForElement function returns the correct value for any element,
including elements with dir=ltr inside of <body dir=rtl>.

  • UserInterface/Views/DOMTreeOutline.css:

(.tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
(.tree-outline.dom li:not(.editing)):
(.tree-outline.dom li.editing):
(.tree-outline.dom li .pseudo-class-indicator):
(.tree-outline.dom.single-node li):
(.tree-outline.dom li.parent):
(.tree-outline.dom li .html-tag.close):
(.tree-outline.dom li.parent::before):
(.tree-outline.dom li.parent.shadow::after):
Remove RTL logic.

  • UserInterface/Views/DOMTreeOutline.js:
  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype._treeKeyDown):
Make Left and Right arrow keys work correctly for LTR DOM outlines inside of the global RTL.

6:49 PM Changeset in webkit [248990] by Fujii Hironori
  • 10 edits in trunk/Tools

[Win][MiniBrowser] Add a progress indicator to the main window
https://bugs.webkit.org/show_bug.cgi?id=200970

Reviewed by Alex Christensen.

  • MiniBrowser/win/BrowserWindow.h: Added BrowserWindowClient class.
  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::init):
(MainWindow::resizeSubViews):
(MainWindow::progressChanged):
(MainWindow::progressFinished):

  • MiniBrowser/win/MainWindow.h: Inherited BrowserWindowClient.

Added m_hProgressIndicator.
(MainWindow::hwnd const): Deleted.
(MainWindow::browserWindow const): Deleted.
(): Deleted.

  • MiniBrowser/win/MiniBrowserWebHost.cpp:

(MiniBrowserWebHost::onNotify):

  • MiniBrowser/win/MiniBrowserWebHost.h:
  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::didChangeIsLoading):
(WebKitBrowserWindow::didChangeEstimatedProgress):
(WebKitBrowserWindow::createNewPage):

  • MiniBrowser/win/WebKitBrowserWindow.h:
  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(WebKitLegacyBrowserWindow::create):
(WebKitLegacyBrowserWindow::WebKitLegacyBrowserWindow):
(WebKitLegacyBrowserWindow::init):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.h:
6:42 PM Changeset in webkit [248989] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Wasm::FunctionParser is failing to enforce maxFunctionLocals.
https://bugs.webkit.org/show_bug.cgi?id=201016
<rdar://problem/54579911>

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/stress/too-many-locals.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.catch):

Source/JavaScriptCore:

Currently, Wasm::FunctionParser is allowing

maxFunctionParams + maxFunctionLocals * maxFunctionLocals

... locals, which is 0x9502FCE8. It should be enforcing max locals of
maxFunctionLocals instead.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parse):

6:25 PM Changeset in webkit [248988] by kocsen_chung@apple.com
  • 11 edits
    2 adds in branches/safari-608-branch

Cherry-pick r248974. rdar://problem/54579634

[Mail] Tapping top of message scrolls back to copied text instead of top of the message
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

Reviewed by Wenson Hsieh.

Source/WebCore:

Test: editing/selection/ios/change-selection-by-tapping-with-existing-selection.html

  • page/EditorClient.h: (WebCore::EditorClient::shouldAllowSingleClickToChangeSelection const):
  • page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): Instead of encoding platform behaviors in EventHandler, defer to EditorClient.

Source/WebKit:

In the case where you have a WebCore selection but are not first responder,
when you tap the WKWebView to become first responder, EventHandler would
bail from setting the selection, assuming UIKit was going to do it. This
behavior was introduced in r233311.

However, since we are not first responder, UIKit does not change the
selection, since it considers the view to not be editable.

Fix this by letting WebCore set the selection in this case, as it used to.

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm: (WebKit::WebEditorClient::shouldAllowSingleClickToChangeSelection const):
  • WebProcess/WebPage/WebPage.h: (WebKit::WebPage::isShowingInputViewForFocusedElement const): Copy the logic from EventHandler, with the added caveat (which fixes the aforementioned behavior) that we will allow EventHandler to change the selection if we don't have a focused node in the UIKit sense, because we know that the platform text interaction code will *not* change the selection if that is the case, so it's up to us.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm: (WebEditorClient::shouldAllowSingleClickToChangeSelection const): Copy the existing behavior from EventHandler. We do not fix the bug in WebKitLegacy for a multitude of reasons, primarily because we do not know of any user impact.

LayoutTests:

  • editing/selection/ios/change-selection-by-tapping-with-existing-selection-expected.txt: Added.
  • editing/selection/ios/change-selection-by-tapping-with-existing-selection.html: Added.

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

6:25 PM Changeset in webkit [248987] by kocsen_chung@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r248959. rdar://problem/54579630

Crash under StringImpl::~StringImpl() in NetworkProcess::deleteWebsiteDataForRegistrableDomains()
https://bugs.webkit.org/show_bug.cgi?id=200986
<rdar://problem/32850192>

Reviewed by Brent Fulgham.

Code was calling postStorageTask() with a lambda that captures Strings that are not isolated copied.
The lambda would get executed on another thread so this is not safe. The CrossThreadTask constructor
does not take care of this for you, despite its name (the createCrossThreadTask() function does though).

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): (WebKit::NetworkProcess::registrableDomainsWithWebsiteData):

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

6:25 PM Changeset in webkit [248986] by kocsen_chung@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248952. rdar://problem/54579626

[iOS] HLS streams disappear from Now Playing when paused on the lock screen
https://bugs.webkit.org/show_bug.cgi?id=200951
<rdar://problem/54534301>

Reviewed by Eric Carlson.

The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
changing buffering policy) which can result in a player which no longer reports
that it has audio, which in turn results in Now Playing no longer considering
the web page to be an eligable now playing application. Bridge this gap by also
taking AVPlayerItem.hasEnabledAudio into account when determining whether the
player has audio.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):

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

6:25 PM Changeset in webkit [248985] by kocsen_chung@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebCore

Cherry-pick r248944. rdar://problem/54579628

REGRESSION: naver.com - Multiple taps are required to open email
https://bugs.webkit.org/show_bug.cgi?id=200979
<rdar://problem/54295239>

Patch by Antoine Quint <Antoine Quint> on 2019-08-21
Reviewed by Dean Jackson.

The "click" events on subjects in the message list are prevented by preventDefault() being called from a "mouseup" event listener.
This shouldn't actually happen, but due to how simulated mouse events are implemented, there is no current distinction between
"touchend" and "mouseup" events. It is safe however to opt mail.naver.com out of simulated mouse events altogether.

  • page/Quirks.cpp: (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

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

5:40 PM Changeset in webkit [248984] by kocsen_chung@apple.com
  • 7 edits in branches/safari-608-branch/Source

Versioning.

5:34 PM Changeset in webkit [248983] by rniwa@webkit.org
  • 11 edits in trunk

SVG element should become focusable when focus and key event listeners are added
https://bugs.webkit.org/show_bug.cgi?id=200997

Reviewed by Said Abou-Hallawa.

Source/WebCore:

This patch removes the odd behavior WebKit (and Blink) browsers had to make SVG elements
with key or focus event listeners focusable. New behavior matches the behavior of Firefox
as well as the SVG 2.0 specification: https://www.w3.org/TR/SVG2/interact.html#Focus

Test: svg/custom/tabindex-order.html

  • svg/SVGAElement.cpp:

(WebCore::SVGAElement::supportsFocus const):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::hasFocusEventListeners const): Deleted.
(WebCore::SVGElement::isMouseFocusable const): Deleted.

  • svg/SVGElement.h:
  • svg/SVGGraphicsElement.h:

LayoutTests:

Updated existing tests to set tabIndex where appropriate, and added SVG elements
without tabindex content attribute to tabindex-order.html so that the test would
skip those elements when sequentially focus navigating across them.

  • svg/custom/add-event-listener-shadow-tree-element.html:
  • svg/custom/resources/focus-event-handling-keyboard.js:
  • svg/custom/resources/focus-event-handling.js:
  • svg/custom/tabindex-order-expected.txt:
  • svg/custom/tabindex-order.html: Added test cases without tabindex.
5:24 PM Changeset in webkit [248982] by Ryan Haddad
  • 3 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r248964. rdar://problem/54561673

Unreviewed test gardening, land test expectations for rdar://54561673.

  • platform/ios/TestExpectations:
  • platform/ios-12/TestExpectations:

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

5:24 PM Changeset in webkit [248981] by Ryan Haddad
  • 4 edits in branches/safari-608-branch/LayoutTests

Cherry-pick r248917. rdar://problem/53829560

Updating Expectations for Multiple Newly Passing Tests.

Unreviewed Test Gardening.

  • platform/ios-12/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:

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

5:23 PM Changeset in webkit [248980] by Ryan Haddad
  • 2 edits in trunk/Tools

Unreviewed, rolling out r248970.

Caused
lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_empty
to fail.

Reverted changeset:

"[lldb-webkit] OptionSet summary shows size 0 sometimes for
non-empty set"
https://bugs.webkit.org/show_bug.cgi?id=200742
https://trac.webkit.org/changeset/248970

5:21 PM Changeset in webkit [248979] by jbedard@apple.com
  • 3 edits
    2 adds in trunk/Tools

results.webkit.org: Add database table to save zip archives to
https://bugs.webkit.org/show_bug.cgi?id=200718

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/model/archive_context.py: Added.

(ArchiveContext):
(ArchiveContext.ArchivesByCommit): Store archives to be retrieved by commit and configuration.
(ArchiveContext.ArchivesByCommit.unpack):
(ArchiveContext.assert_zipfile):
(ArchiveContext.open_zipfile):
(ArchiveContext.init):
(ArchiveContext.enter):
(ArchiveContext.exit):
(ArchiveContext.register): Save the provided archive to Cassandra.
(ArchiveContext.find_archive): Find all archives matching the specified criteria.
(ArchiveContext._files_for_archive):
(ArchiveContext.ls): List all files in the matching archives.
(ArchiveContext.file): Extract a file from the matching archives.

  • resultsdbpy/resultsdbpy/model/archive_context_unittest.py: Added.

(ArchiveContextTest):

  • resultsdbpy/resultsdbpy/model/mock_model_factory.py:

(MockModelFactory):
(MockModelFactory.process_results):
(MockModelFactory.add_mock_archives):

  • resultsdbpy/resultsdbpy/model/model.py:

(Model.init): Add an ArchiveContext to the model.

5:11 PM Changeset in webkit [248978] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

Follow-up to r248962: When the active audio route changes, and the
system instructs us to pause, only pause the currently audible sessions.

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
(-[WebMediaSessionHelper activeAudioRouteDidChange:]):
(WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.

5:06 PM Changeset in webkit [248977] by megan_gardner@apple.com
  • 4 edits
    2 adds in trunk

Do not adjust viewport if editing selection is already visible
https://bugs.webkit.org/show_bug.cgi?id=200907
<rdar://problem/53903417>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html

Currently due to scrolling being mostly handled by integers, we are getting
issues with rounding errors when trying to adjust the viewport while
editing text when we are significantly zoomed in. The real fix would be to
start dealing with scrolling with floats/doubles, but until such time,
we should early out of adjusting selections that we are certain are currently
visible.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):

LayoutTests:

  • fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added.
  • fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.immediateZoomToScale):

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

[ews-build] view layout test results option should be displayed next to layout-test build step
https://bugs.webkit.org/show_bug.cgi?id=200048

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ExtractTestResults.getLastBuildStepByName): Method to return the last build-step matching the step name.
(ExtractTestResults.addCustomURLs): Add urls to corresponding layout-test step.

4:51 PM Changeset in webkit [248975] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Fix capitalization in Found x new Test failure message
https://bugs.webkit.org/show_bug.cgi?id=201004

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeLayoutTestsResults.report_failure):
(AnalyzeAPITestsResults.analyzeResults):

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.
4:05 PM Changeset in webkit [248974] by timothy_horton@apple.com
  • 11 edits
    2 adds in trunk

[Mail] Tapping top of message scrolls back to copied text instead of top of the message
https://bugs.webkit.org/show_bug.cgi?id=200999
<rdar://problem/54564878>

Reviewed by Wenson Hsieh.

Source/WebCore:

Test: editing/selection/ios/change-selection-by-tapping-with-existing-selection.html

  • page/EditorClient.h:

(WebCore::EditorClient::shouldAllowSingleClickToChangeSelection const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEventSingleClick):
Instead of encoding platform behaviors in EventHandler, defer to EditorClient.

Source/WebKit:

In the case where you have a WebCore selection but are not first responder,
when you tap the WKWebView to become first responder, EventHandler would
bail from setting the selection, assuming UIKit was going to do it. This
behavior was introduced in r233311.

However, since we are not first responder, UIKit does not change the
selection, since it considers the view to not be editable.

Fix this by letting WebCore set the selection in this case, as it used to.

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:

(WebKit::WebEditorClient::shouldAllowSingleClickToChangeSelection const):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::isShowingInputViewForFocusedElement const):
Copy the logic from EventHandler, with the added caveat (which fixes the
aforementioned behavior) that we will allow EventHandler to change the
selection if we don't have a focused node in the UIKit sense, because
we know that the platform text interaction code will *not* change the
selection if that is the case, so it's up to us.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::shouldAllowSingleClickToChangeSelection const):
Copy the existing behavior from EventHandler.
We do not fix the bug in WebKitLegacy for a multitude of reasons, primarily
because we do not know of any user impact.

LayoutTests:

  • editing/selection/ios/change-selection-by-tapping-with-existing-selection-expected.txt: Added.
  • editing/selection/ios/change-selection-by-tapping-with-existing-selection.html: Added.
4:01 PM Changeset in webkit [248973] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Crash under NetworkCache::Data::mapToFile()
https://bugs.webkit.org/show_bug.cgi?id=200996
<rdar://problem/54570421>

Reviewed by Geoffrey Garen.

Make sure NetworkCache::Data::mapToFile() calls makeSafeToUseMemoryMapForPath() between
creating the file and calling mmap().

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::add):

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::Data::mapToFile const):

3:48 PM Changeset in webkit [248972] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Assign ews117 to EWS High-Sierra Debug queues
https://bugs.webkit.org/show_bug.cgi?id=200993

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json:
3:45 PM Changeset in webkit [248971] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Crash under StringImpl::endsWith() in SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade()
https://bugs.webkit.org/show_bug.cgi?id=200990
<rdar://problem/54566439>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on SQLiteIDBBackingStore::m_databaseRootDirectory before using
it from background threads.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
(WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:

(WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectory const):

3:42 PM Changeset in webkit [248970] by dbates@webkit.org
  • 2 edits in trunk/Tools

[lldb-webkit] OptionSet summary shows size 0 sometimes for non-empty set
https://bugs.webkit.org/show_bug.cgi?id=200742

Reviewed by Simon Fraser.

The OptionSet synthetic provider must respond to requests for the value of m_storage
(i.e. GetChildMemberWithName('m_storage')) to avoid interfering with the computation
of the type summary.

Synthetic providers substitute alternative debug information (children) for the default
information for a variable. The OptionSet type summary is implemented in terms of the
OptionSet synthetic provider to maximize code reuse. If LLDB instantiates the provider
before invoking the type summary handler then evaluating GetChildMemberWithName() on
the SBValue passed to the type summary handler will access the substitute information
instead of the original debug information. As a result OptionSet's synthetic provider's
get_child_index('m_storage') returns None hence SBValue.GetChildMemberWithName('m_storage')
returned an invalid value; => WTFOptionSetProvider._bitmask() returns 0; => the size
reported in the type summary for the OptionSet is 0. Instead get_child_index('m_storage')
should return a valid value.

  • lldb/lldb_webkit.py:

(FlagEnumerationProvider.init):
(FlagEnumerationProvider):
(FlagEnumerationProvider._get_child_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider._get_child_at_index): Added. WTFOptionSetProvider will override.
(FlagEnumerationProvider.size): Added.
(FlagEnumerationProvider.get_child_index): Modified to call _get_child_index().
(FlagEnumerationProvider.get_child_at_index): Modified to call _get_child_at_index().
(FlagEnumerationProvider.update): Moved initialization of self._elements to the constructor
and removed self.size. For the latter we can just expose a getter that returns the size of
the list self._elements.
(WTFOptionSetProvider._get_child_index): Added. Return the index for LLDB to query for the
value of m_storage.
(WTFOptionSetProvider):
(WTFOptionSetProvider._get_child_at_index): Added. Return the value for m_storage if it
matches the specified index.

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

Crash under StringImpl::~StringImpl() in IDBServer::computeSpaceUsedForOrigin()
https://bugs.webkit.org/show_bug.cgi?id=200989
<rdar://problem/54565546>

Reviewed by Alex Christensen.

Make sure we call isolatedCopy() on IDBServer::m_databaseDirectoryPath before using it from
background threads.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::createBackingStore):
(WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
(WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
(WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
(WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
(WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
(WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
(WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):

  • Modules/indexeddb/server/IDBServer.h:

(WebCore::IDBServer::IDBServer::databaseDirectoryPath const):

3:27 PM Changeset in webkit [248968] by Alan Coon
  • 1 copy in tags/Safari-608.2.7

Tag Safari-608.2.7.

3:17 PM Changeset in webkit [248967] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Crash under StringImpl::endsWith() in RegistrationDatabase::openSQLiteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=200991
<rdar://problem/54566689>

Reviewed by Geoffrey Garen.

Make sure we call isolatedCopy() on RegistrationDatabase::m_databaseDirectory before using
it from background threads.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::openSQLiteDatabase):
(WebCore::RegistrationDatabase::clearAll):

  • workers/service/server/RegistrationDatabase.h:

(WebCore::RegistrationDatabase::databaseDirectory const):

3:03 PM Changeset in webkit [248966] by achristensen@apple.com
  • 6 edits
    1 add in trunk

Disabling text autosizing should prevent text autosizing
https://bugs.webkit.org/show_bug.cgi?id=200955
<rdar://problem/48095374>

Reviewed by Simon Fraser.

Source/WebCore:

Before this change there was no way to reliably change the text size on iOS when a -webkit-text-size-adjust:none style was applied
because it would ignore the WKPreferences value for _textAutosizingEnabled. Now that value has the desired effect when laying out.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::checkForTextSizeAdjust):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/TextSize.mm: Added.

(TEST):

LayoutTests:

  • fast/text-autosizing/ios/text-size-adjust-inline-style.html:

The comment was incorrect because we call WKPreferencesSetTextAutosizingEnabled(preferences, false) in TestController::platformResetPreferencesToConsistentValues.
In order to test the effect of text autosizing in this test, we need to explicitly turn it on. The disabling of text autosizing didn't do anything before this
patch, so it wasn't needed before now.

2:49 PM Changeset in webkit [248965] by Adrian Perez de Castro
  • 2 edits in trunk/Tools

[GTK][WPE] Make debug-test-runner work
https://bugs.webkit.org/show_bug.cgi?id=193576

Reviewed by Michael Catanzaro.

  • Scripts/webkitdirs.pm:

(wrapperPrefixIfNeeded): Only add the wrapper prefix when not running inside a Flatpak sandbox.
(setupUnixWebKitEnvironment): Added, sets TEST_RUNNER_INJECTED_BUNDLE_FILENAME and
TEST_RUNNER_TEST_PLUGIN_PATH in the environment.
(execUnixAppForDebugging): Added.
(debugWebKitTestRunner): Alternatively, use execUnixAppForDebugging() for the WPE and GTK+ ports.

2:38 PM Changeset in webkit [248964] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening, land test expectations for rdar://54561673.

  • platform/ios/TestExpectations:
  • platform/ios-12/TestExpectations:
2:30 PM Changeset in webkit [248963] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Have NetworkCache::store() null check its completion handler before calling it
https://bugs.webkit.org/show_bug.cgi?id=200994

Reviewed by Geoffrey Garen.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::retrieveCacheEntry):
Stop passing nullptr for the completion handler now that the parameter has a default value.
Note that passing nullptr here was likely wrong since the NetworkCache::store() implementation
did not null-check the completion handler before calling it.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::store):
Have NetworkCache::store() null check its completion handler before calling it as calling
a null WTF::Function crashes.

  • NetworkProcess/cache/NetworkCache.h:

Use nullptr as default parameter value for the completion handler.

2:29 PM Changeset in webkit [248962] by jer.noble@apple.com
  • 6 edits in trunk/Source/WebCore

Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=200992
<rdar://problem/54408993>

Reviewed by Eric Carlson.

When the system notifies us that the active audio route has changed in such a way
that necessitates pausing, pause all media sessions, exempting those that are
associated with WebRTC, since "pausing" an active audio conference isn't really
possible.

  • Modules/mediastream/MediaStream.h:
  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const):

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::activeRouteDidChange):
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper activeAudioRouteDidChange:]):

1:26 PM Changeset in webkit [248961] by commit-queue@webkit.org
  • 6 edits
    5 adds in trunk

Verify Prefetch and credential behavior
https://bugs.webkit.org/show_bug.cgi?id=200000

Patch by Rob Buis <rbuis@igalia.com> on 2019-08-21
Reviewed by Youenn Fablet.

Source/WebKit:

Cancel cross-origin prefetches for Vary: Cookie.

Test: http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::didReceiveResponse):

  • NetworkProcess/cache/PrefetchCache.cpp:

(WebKit::PrefetchCache::take):

LayoutTests:

Add a test to verify that navigating to a prefetched main resource
that sets Vary: Cookie does send cookies.

  • http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie-expected.txt: Added.
  • http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html: Added.
  • http/wpt/prefetch/resources/main-resource-cross-origin-set-cookie.py: Added.

(main):

  • http/wpt/prefetch/resources/main-resource-cross-origin-vary-cookie.py: Added.

(main):

  • http/wpt/prefetch/resources/navigate-cross-origin-vary-cookie.html: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
1:25 PM Changeset in webkit [248960] by rniwa@webkit.org
  • 101 edits in trunk

Put keygen element behind a runtime flag and disable it by default
https://bugs.webkit.org/show_bug.cgi?id=200850

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Re-sycned htmlformcontrolscollection.html as of ffc0fba7d4063f0fb063b9a215dd9ef7fedefebd.

  • web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt:

Rebaselined due to the whitespace change due to the keygen element rendering differently.

  • web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt:

Ditto.

  • web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt:
  • web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html:
  • web-platform-tests/html/semantics/forms/the-label-element/labelable-elements-expected.txt: Rebaselined now that the test for keygen is passing.

Source/WebCore:

The HTML keygen element has been removed from Chrome, Firefox, and the HTML specification in 2017.
This patch disables the keygen element by default by adding a runtime enabled flag which is disabled by default.

  • bindings/js/WebCoreBuiltinNames.h:
  • html/HTMLKeygenElement.idl:
  • html/HTMLTagNames.in:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setKeygenElementEnabled):
(WebCore::RuntimeEnabledFeatures::keygenElementEnabled const):

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetKeygenElementEnabled):
(WKPreferencesGetKeygenElementEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

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

(-[WebPreferences keygenElementEnabled]):
(-[WebPreferences setKeygenElementEnabled:]):

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

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

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

(WebPreferences::keygenElementEnabled):
(WebPreferences::setKeygenElementEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

Added the support for enableKeygenElement test runner option, which enables keygen element in layout tests.

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

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

(setWebPreferencesForTestOptions):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(setWebPreferencesForTestOptions):

  • WebKitTestRunner/TestController.cpp:

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

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Deployed enableKeygenElement test runner option to keep the layout tests running.

  • accessibility/content-changed-notification-causes-crash.html:
  • accessibility/contenteditable-table-check-causes-crash.html:
  • accessibility/duplicate-axrenderobject-crash.html:
  • fast/block/float/float-not-removed-from-first-letter.html:
  • fast/block/float/split-inline-sibling-of-float-crash.html:
  • fast/css/pseudo-required-optional-unapplied.html:
  • fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html:
  • fast/dom/HTMLKeygenElement/keygen-keytype.html:
  • fast/dom/HTMLKeygenElement/keygen.html:
  • fast/dom/adopt-node-crash-2.html:
  • fast/dom/attribute-set-before-element-in-tree.html:
  • fast/dom/domstring-attribute-reflection.html:
  • fast/dom/set-custom-validity-with-too-few-arguments.html:
  • fast/dom/tabindex-defaults.html:
  • fast/dom/wrapper-classes.html:
  • fast/dynamic/insertAdjacentHTML-allowed-parents.html:
  • fast/flexbox/crash-button-keygen.html:
  • fast/forms/ValidityState-001.html:
  • fast/forms/autofocus-keygen.html:
  • fast/forms/checkValidity-001.html:
  • fast/forms/fieldset/fieldset-elements-htmlcollection.html:
  • fast/forms/fieldset/fieldset-elements.html:
  • fast/forms/form-associated-element-crash3.html:
  • fast/forms/form-attribute.html:
  • fast/forms/form-collection-elements-order.html:
  • fast/forms/form-collection-elements.html:
  • fast/forms/form-collection-radio-node-list.html:
  • fast/forms/label/labelable-elements.html:
  • fast/forms/label/labels-add-htmlFor-label.html:
  • fast/forms/label/labels-add-parent-label.html:
  • fast/forms/label/labels-change-htmlFor-attribute.html:
  • fast/forms/label/labels-multiple-sibling-labels.html:
  • fast/forms/label/labels-parent-and-sibling-labels.html:
  • fast/forms/label/labels-remove-htmlFor-attribute.html:
  • fast/forms/label/labels-remove-htmlFor-label.html:
  • fast/forms/label/labels-remove-parent-label.html:
  • fast/forms/label/labels-set-htmlFor-attribute.html:
  • fast/forms/large-parts.html:
  • fast/forms/scrollheight-with-mutation-crash.html:
  • fast/forms/setCustomValidity-arguments.html:
  • fast/forms/setCustomValidity-existence.html:
  • fast/forms/setCustomValidity-null-parameter.html:
  • fast/forms/state-restore-skip-stateless.html:
  • fast/forms/update-form-owner-in-moved-subtree-assertion-failure.html:
  • fast/forms/validationMessage.html:
  • fast/forms/willvalidate.html:
  • fast/html/clone-keygen.html:
  • fast/html/keygen.html:
  • fast/html/marquee-reparent-check.html:
  • fast/invalid/residual-style-expected.html:
  • fast/invalid/residual-style.html:
  • fast/multicol/span/positioned-child-not-removed-crash.html:
  • fast/ruby/float-object-doesnt-crash.html:
  • fast/shadow-dom/keygen-shadow-manipulation.html:
  • fast/table/crash-splitColumn-2.html:
  • fast/table/multiple-captions-crash3-expected.html:
  • fast/table/multiple-captions-crash3.html:
  • http/tests/misc/resources/check-keygen-post.php:
  • http/tests/misc/submit-post-keygen.html:
  • imported/blink/fast/dom/shadow/shadowdom-for-keygen-only-shadow-expected.html:
  • imported/blink/fast/dom/shadow/shadowdom-for-keygen-only-shadow.html:
  • imported/blink/fast/text/international-iteration-simple-text.html:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt: Rebaselined

now that the test case for keygen is passing.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt: Ditto.
  • svg/dom/css-animate-input-foucs-crash.html:
1:02 PM Changeset in webkit [248959] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Crash under StringImpl::~StringImpl() in NetworkProcess::deleteWebsiteDataForRegistrableDomains()
https://bugs.webkit.org/show_bug.cgi?id=200986
<rdar://problem/32850192>

Reviewed by Brent Fulgham.

Code was calling postStorageTask() with a lambda that captures Strings that are not isolated copied.
The lambda would get executed on another thread so this is not safe. The CrossThreadTask constructor
does not take care of this for you, despite its name (the createCrossThreadTask() function does though).

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):

12:50 PM Changeset in webkit [248958] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

Get rid of m_weakThis data members now that we have a safe way to call makeWeakPtr() from various threads
https://bugs.webkit.org/show_bug.cgi?id=200981

Reviewed by Alex Christensen.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
(WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
  • platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp:

(WebCore::LibWebRTCDTMFSenderBackend::LibWebRTCDTMFSenderBackend):
(WebCore::LibWebRTCDTMFSenderBackend::OnToneChange):

  • platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/cocoa/CookieStorageObserver.mm:

(WebCore::CookieStorageObserver::CookieStorageObserver):
(WebCore::CookieStorageObserver::cookiesDidChange):

12:36 PM Changeset in webkit [248957] by Chris Dumez
  • 10 edits in trunk

Add internal setting to disable SecureContext checks
https://bugs.webkit.org/show_bug.cgi?id=200980
<rdar://problem/54438512>

Reviewed by Alex Christensen.

Source/WebCore:

Add internal setting to disable SecureContext checks, in order to facilitate development
for features like Service workers or device orientation / motion.

  • dom/Document.cpp:

(WebCore::Document::isSecureContext const):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::secureContextChecksEnabled const):
(WebCore::RuntimeEnabledFeatures::setSecureContextChecksEnabled):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::isSecureContext const):

Source/WebKit:

Add internal setting to disable SecureContext checks, in order to facilitate development
for features like Service workers or device orientation / motion.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _secureContextChecksEnabled]):
(-[WKPreferences _setSecureContextChecksEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:

(log):
(requestPermission):

12:24 PM Changeset in webkit [248956] by Chris Dumez
  • 15 edits in trunk/Source

registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap
https://bugs.webkit.org/show_bug.cgi?id=200985

Reviewed by John Wilander.

Source/WebKit:

registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap. It is more
efficient to simply return a Vector since we never need to look up keys.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToRemoveWebsiteDataFor):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToRemoveWebsiteDataFor):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::domainsToString):

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

(WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomains):

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

(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::deleteCookiesForTesting):

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

(WebKit::NetworkSession::deleteWebsiteDataForRegistrableDomains):

  • NetworkProcess/NetworkSession.h:

Source/WTF:

Allow calling crossThreadCopy() on a std::pair<>.

  • wtf/CrossThreadCopier.h:
12:17 PM Changeset in webkit [248955] by Ross Kirsling
  • 2 edits in trunk/JSTests

JSTests/stress/optional-chaining should not call shouldThrowTypeError in a loop
https://bugs.webkit.org/show_bug.cgi?id=200965

Reviewed by Saam Barati.

This has nothing to do with ?. in particular, but throwing >1M type errors takes 100s in Debug on my machine.
The main idea here was to JITify the simple success cases, so let's not run the simple failures so many times.

  • stress/optional-chaining.js:
11:58 AM Changeset in webkit [248954] by Adrian Perez de Castro
  • 2 edits in trunk

[GTK][WPE] Gtk-Doc fails with build options which need cooperation between CFLAGS and LDFLAGS
https://bugs.webkit.org/show_bug.cgi?id=200987

Reviewed by Philippe Normand.

Only CFLAGS was being set before trying to generate the documentation
but not LDFLAGS, which could cause errors when gtk-doc tries to link
a generated program when the compiler flags would also require usage
of certain linker flags later on.

  • Source/cmake/GtkDoc.cmake: Also set LDFLAGS in the environment when

invoking Tools/gtkdoc/generate-gtkdoc.

11:47 AM Changeset in webkit [248953] by Russell Epstein
  • 6 edits
    5 deletes in trunk

Unreviewed, rolling out r248942.

Causes multiple layout test crashes on MacOS Bots

Reverted changeset:

"Verify Prefetch and credential behavior"
https://bugs.webkit.org/show_bug.cgi?id=200000
https://trac.webkit.org/changeset/248942

11:19 AM Changeset in webkit [248952] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] HLS streams disappear from Now Playing when paused on the lock screen
https://bugs.webkit.org/show_bug.cgi?id=200951
<rdar://problem/54534301>

Reviewed by Eric Carlson.

The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
changing buffering policy) which can result in a player which no longer reports
that it has audio, which in turn results in Now Playing no longer considering
the web page to be an eligable now playing application. Bridge this gap by also
taking AVPlayerItem.hasEnabledAudio into account when determining whether the
player has audio.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):

11:08 AM Changeset in webkit [248951] by msaboff@apple.com
  • 5 edits
    1 add in trunk

[JSC] incorrent JIT lead to StackOverflow
https://bugs.webkit.org/show_bug.cgi?id=197823

Reviewed by Tadeu Zagallo.

JSTests:

New test.

  • stress/bound-function-stack-overflow.js: Added.

(foo):
(catch):

Source/JavaScriptCore:

Added stack overflow check to the bound function thunk generator. Added a new C++ operation
throwStackOverflowErrorFromThunk() to throw the error.

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/ThunkGenerators.cpp:

(JSC::boundThisNoArgsFunctionCallGenerator):

11:02 AM Changeset in webkit [248950] by krollin@apple.com
  • 11 edits in trunk

Remove support for watchOS < 6.0
https://bugs.webkit.org/show_bug.cgi?id=200937
<rdar://problem/54524009>

Reviewed by Darin Adler.

Update conditionals that reference WATCH_OS_VERSION_MIN_REQUIRED and
WATCH_OS_VERSION_MAX_ALLOWED, assuming that they both have values >=

  1. This means that expressions like

"WATCH_OS_VERSION_MIN_REQUIRED < 60000" are always False and
"
WATCH_OS_VERSION_MIN_REQUIRED >= 60000" are always True.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:
  • pal/spi/cocoa/NSKeyedArchiverSPI.h:
  • pal/spi/cocoa/NSProgressSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

Source/WTF:

  • wtf/FeatureDefines.h:
  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:

(TestWebKitAPI::TEST):

10:49 AM Changeset in webkit [248949] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source

Cherry-pick r248902. rdar://problem/54543355
Build fix.

Unsafe usage of CookieStorageObserver from a background thread
https://bugs.webkit.org/show_bug.cgi?id=200920

Reviewed by Alex Christensen.

Source/WebCore:

Unsafe usage of CookieStorageObserver from a background thread. CookieStorageObserver gets
constructed / destructed on the main thread. However, CookieStorageObserver::cookiesDidChange()
gets called on a background thread and tries to ref |this|. Even though CookieStorageObserver
is ThreadSafeRefCounted, this is still unsafe because the CookieStorageObserver destructor may
already be running on the main thread when CookieStorageObserver::cookiesDidChange() gets called
on the background thread.

  • platform/network/NetworkStorageSession.h:
  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/cocoa/CookieStorageObserver.mm: (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::cookiesDidChange): (WebCore::CookieStorageObserver::create): Deleted.
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieStorageObserver const):

Source/WebKit:

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):

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

10:23 AM Changeset in webkit [248948] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[GTK] Build failure due to unwieldy definition of “None” from X11 headers
https://bugs.webkit.org/show_bug.cgi?id=200984

Reviewed by Carlos Alberto Lopez Perez.

  • SourcesGTK.txt: Mark AcceleratedBackingStore.cpp with @no-unify

because it includes AcceleratedSurfaceX11.h when building with
ENABLE_X11_TARGET=ON, which in turn will include the X11 headers.
It is just lucky that most of the time the order of the generated
#include statements in the unified sources has been masking this
problem.

10:21 AM Changeset in webkit [248947] by sihui_liu@apple.com
  • 2 edits
    16 copies
    9 moves
    2 adds in trunk/PerformanceTests

Add some IDB performance tests
https://bugs.webkit.org/show_bug.cgi?id=200906

Reviewed by Geoffrey Garen.

Add test coverage for IDB performance, and organize IDB tests into two categories.

  • IndexedDB/basic/index-count-key.html: Added.
  • IndexedDB/basic/index-count.html: Added.
  • IndexedDB/basic/index-cursor-advance.html: Added.
  • IndexedDB/basic/index-cursor-continue.html: Added.
  • IndexedDB/basic/index-cursor-continuePrimaryKey.html: Added.
  • IndexedDB/basic/index-cursor-delete.html: Added.
  • IndexedDB/basic/index-cursor-update.html: Added.
  • IndexedDB/basic/index-get.html: Added.
  • IndexedDB/basic/index-multientry.html: Renamed from PerformanceTests/IndexedDB/index-multientry.html.
  • IndexedDB/basic/objectstore-add.html: Added.
  • IndexedDB/basic/objectstore-clear.html: Added.
  • IndexedDB/basic/objectstore-count.html: Added.
  • IndexedDB/basic/objectstore-cursor-advance.html: Added.
  • IndexedDB/basic/objectstore-cursor-continue.html: Added.
  • IndexedDB/basic/objectstore-cursor-delete.html: Added.
  • IndexedDB/basic/objectstore-cursor-update.html: Added.
  • IndexedDB/basic/objectstore-cursor.html: Renamed from PerformanceTests/IndexedDB/objectstore-cursor.html.
  • IndexedDB/basic/objectstore-delete.html: Renamed from PerformanceTests/IndexedDB/index-get.html.
  • IndexedDB/basic/objectstore-get.html: Added.
  • IndexedDB/basic/objectstore-put.html: Renamed from PerformanceTests/IndexedDB/objectstore-get.html.
  • IndexedDB/stress/large-array-keys.html: Renamed from PerformanceTests/IndexedDB/large-array-keys.html.
  • IndexedDB/stress/large-binary-keys.html: Renamed from PerformanceTests/IndexedDB/large-binary-keys.html.
  • IndexedDB/stress/large-number-of-inserts-responsiveness.html: Renamed from PerformanceTests/IndexedDB/large-number-of-inserts-responsiveness.html.
  • IndexedDB/stress/large-number-of-inserts.html: Renamed from PerformanceTests/IndexedDB/large-number-of-inserts.html.
  • IndexedDB/stress/large-string-keys.html: Renamed from PerformanceTests/IndexedDB/large-string-keys.html.
  • Skipped:
10:08 AM Changeset in webkit [248946] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

[GStreamer] Clang warns about mismatched type tag in declarations for ImageOrientation
https://bugs.webkit.org/show_bug.cgi?id=200982

Reviewed by Carlos Alberto Lopez Perez.

No new tests needed.

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Change

type tag in the forward declaration to "struct", hence matching the
actual type definition.

10:05 AM Changeset in webkit [248945] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: !s_isInvalidatingStyleWithRuleSets in com.apple.WebCore: WebCore::DocumentRuleSets::collectFeatures const
https://bugs.webkit.org/show_bug.cgi?id=200919
<rdar://problem/53413013>

Reviewed by Zalan Bujtas.

Bots show that in some timing-dependent cases we may end up constructing a style resolver in the middle the class change invalidation.

This happens flakily on Pad bots in

media/track/track-node-add-remove.html
media/W3C/video/events/event_loadstart_manual.html
media/W3C/video/readyState/readyState_initial.html

and also reproes locally with lots of runs over these tests.

  • style/StyleInvalidationFunctions.h:

(WebCore::Style::traverseRuleFeatures):

Ensure that for elements in shadow tree the host resolver is also always constructed before starting rule-based invalidation.

9:52 AM Changeset in webkit [248944] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION: naver.com - Multiple taps are required to open email
https://bugs.webkit.org/show_bug.cgi?id=200979
<rdar://problem/54295239>

Patch by Antoine Quint <Antoine Quint> on 2019-08-21
Reviewed by Dean Jackson.

The "click" events on subjects in the message list are prevented by preventDefault() being called from a "mouseup" event listener.
This shouldn't actually happen, but due to how simulated mouse events are implemented, there is no current distinction between
"touchend" and "mouseup" events. It is safe however to opt mail.naver.com out of simulated mouse events altogether.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

9:50 AM Changeset in webkit [248943] by Devin Rousso
  • 23 edits in trunk

Web Inspector: Page: re-add enable/disable after r248454
https://bugs.webkit.org/show_bug.cgi?id=200947

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

We shouldn't design the agent system with only Web Inspector in mind. Other clients may want
to have different functionality, not being told about frames creation/updates/destruction.
In these cases, we should have graceful error message failures for other agents that rely on
the Page agent.

  • inspector/protocol/Page.json:

Source/WebCore:

We shouldn't design the agent system with only Web Inspector in mind. Other clients may want
to have different functionality, not being told about frames creation/updates/destruction.
In these cases, we should have graceful error message failures for other agents that rely on
the Page agent.

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

(WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorPageAgent::enable): Added.
(WebCore::InspectorPageAgent::disable): Added.

  • inspector/agents/InspectorApplicationCacheAgent.cpp:

(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::createStyleSheet):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::highlightSelector):
(WebCore::InspectorDOMAgent::highlightFrame):
(WebCore::InspectorDOMAgent::buildObjectForNode):

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::setFrameIdentifier):

  • inspector/agents/page/PageNetworkAgent.cpp:

(WebCore::PageNetworkAgent::loaderIdentifier):
(WebCore::PageNetworkAgent::frameIdentifier):
(WebCore::PageNetworkAgent::scriptExecutionContext):

  • inspector/agents/page/PageRuntimeAgent.cpp:

(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):

Source/WebInspectorUI:

We shouldn't design the agent system with only Web Inspector in mind. Other clients may want
to have different functionality, not being told about frames creation/updates/destruction.
In these cases, we should have graceful error message failures for other agents that rely on
the Page agent.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager.prototype.initializeTarget):

LayoutTests:

  • http/tests/inspector/page/loading-iframe-document-node.html:
  • inspector/css/getMatchedStylesForNode.html:
  • inspector/css/getMatchedStylesForNode-expected.txt:
  • inspector/page/archive.html:
  • inspector/page/frameScheduledNavigation.html:
  • inspector/page/frameScheduledNavigation-async-delegates.html:
  • inspector/page/frameStartedLoading.html:
  • inspector/page/media-query-list-listener-exception.html:
  • inspector/timeline/line-column.html:
8:15 AM Changeset in webkit [248942] by commit-queue@webkit.org
  • 6 edits
    5 adds in trunk

Verify Prefetch and credential behavior
https://bugs.webkit.org/show_bug.cgi?id=200000

Patch by Rob Buis <rbuis@igalia.com> on 2019-08-21
Reviewed by Youenn Fablet.

Source/WebKit:

Cancel cross-origin prefetches for Vary: Cookie.

Test: http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::didReceiveResponse):

  • NetworkProcess/cache/PrefetchCache.cpp:

(WebKit::PrefetchCache::take):

LayoutTests:

Add a test to verify that navigating to a prefetched main resource
that sets Vary: Cookie does send cookies.

  • http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie-expected.txt: Added.
  • http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html: Added.
  • http/wpt/prefetch/resources/main-resource-cross-origin-set-cookie.py: Added.

(main):

  • http/wpt/prefetch/resources/main-resource-cross-origin-vary-cookie.py: Added.

(main):

  • http/wpt/prefetch/resources/navigate-cross-origin-vary-cookie.html: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
7:39 AM Changeset in webkit [248941] by Pablo Saavedra
  • 4 edits in trunk/Source/WebKit

[WPE] Build failure after r248846 ([WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part)
https://bugs.webkit.org/show_bug.cgi?id=200973

WPE fails to build with -DENABLE_WPE_QT_API=ON after changes done by r248846 in:

Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp
Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp

; to forces FastMalloc use.

Related to:

https://bugs.webkit.org/show_bug.cgi?id=200611
https://bugs.webkit.org/show_bug.cgi?id=200620

This patch puts WPEQt... classes into FastMalloc in the same way it
was done by many others in r248603.

Reviewed by Philippe Normand.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::runJavaScript):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.h:
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:
3:30 AM Changeset in webkit [248940] by Devin Rousso
  • 8 edits
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: Sources: increase the filter bar's width when it's focused if a resource type filter is active
https://bugs.webkit.org/show_bug.cgi?id=200940

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/FilterBar.js:

(WI.FilterBar.prototype._handleFilterChanged):
(WI.FilterBar.prototype.get indicatingProgress): Deleted.
(WI.FilterBar.prototype.set indicatingProgress): Deleted.
(WI.FilterBar.prototype.get indicatingActive): Deleted.
(WI.FilterBar.prototype.set indicatingActive): Deleted.
If escape is pressed when the <input> is empty, unfocus (blur) the <input>.
Drive-by: remove unused/unnecessary functions.

  • UserInterface/Views/FilterBar.css:

(.filter-bar > input[type="search"]):
(:matches(.filter-bar, .search-bar) > input[type="search"]): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:matches(:focus, :not(:placeholder-shown))): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-decoration): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-results-button): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]::placeholder): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:matches(:not(:focus), :placeholder-shown)::-webkit-search-cancel-button): Added.
(:matches(.filter-bar, .search-bar) > .navigation-bar + input[type="search"]): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:focus): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"] + :empty): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:focus ~ *): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Added.
(.filter-bar > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Deleted.
(.filter-bar > .navigation-bar + input[type="search"]): Deleted.
(.filter-bar > input[type="search"]::placeholder): Deleted.
(.filter-bar > input[type="search"]:focus): Deleted.
(.filter-bar > input[type="search"]::-webkit-search-decoration): Deleted.
(.filter-bar.active > input[type="search"]::-webkit-search-decoration): Deleted.
(.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration): Deleted.
(.filter-bar > input[type="search"] + .navigation-bar:empty): Deleted.
When the <input> is :focus, hide the following WI.NavigationBar (if it's being used) so
that there's more room to show the filter text.
Drive-by: fix background, border, and text color styling when :focus.

  • UserInterface/Views/SearchBar.css:

(.search-bar > input[type="search"]):
(.search-bar > input[type="search"]::placeholder): Deleted.
(.search-bar > input[type="search"]:focus): Deleted.
(.search-bar > input[type="search"]:not(:placeholder-shown)): Deleted.
(.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Deleted.
(@media (prefers-color-scheme: dark)): Deleted.
(:matches(.search-bar, .filter-bar) > input[type="search"],): Deleted.
(:matches(.search-bar, .filter-bar) > input[type="search"]::placeholder): Deleted.
(:matches(.search-bar, .filter-bar) > input[type="search"]:focus): Deleted.

  • UserInterface/Views/SearchSidebarPanel.css:

(.sidebar > .panel.navigation.search > .search-bar):
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
(.sidebar > .panel.navigation.search > .search-bar > .search-settings): Added.
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.

  • UserInterface/Views/Toolbar.css:

(.toolbar .search-bar > input[type="search"]::-webkit-textfield-decoration-container): Deleted.
Move shared styles to FilterBar.css as WI.FilterBar are more common.

  • UserInterface/Views/Variables.css:

(:root):
(@media (prefers-color-scheme: dark) :root):
Expose some CSS variables in light mode that were previously only defined in dark mode.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._updateURLFilterActiveIndicator): Deleted.

  • UserInterface/Images/FilterFieldActiveGlyph.svg: Removed.
3:17 AM Changeset in webkit [248939] by Joseph Pecoraro
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove unnecessary properties on SVGs
https://bugs.webkit.org/show_bug.cgi?id=200968

Reviewed by Devin Rousso.

  • UserInterface/Images/EventPause.svg:
  • UserInterface/Images/EventPlay.svg:
  • UserInterface/Images/EventProcessing.svg:
  • UserInterface/Images/EventStop.svg:
  • UserInterface/Images/MediaInstrument.svg:

Aug 20, 2019:

11:30 PM Changeset in webkit [248938] by justin_michaud@apple.com
  • 8 edits
    12 adds in trunk

Identify memcpy loops in b3
https://bugs.webkit.org/show_bug.cgi?id=200181

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/memcpy-loop.js: Added.

(doTest):
(let.arr1):

  • microbenchmarks/memcpy-typed-loop-large.js: Added.

(doTest):
(let.arr1.new.Int32Array.1000000.let.arr2.new.Int32Array.1000000):
(arr2):

  • microbenchmarks/memcpy-typed-loop-small.js: Added.

(doTest):
(16.let.arr1.new.Int32Array.size.let.arr2.new.Int32Array.size):
(16.arr2):

  • microbenchmarks/memcpy-typed-loop-speculative.js: Added.

(doTest):
(let.arr1.new.Int32Array.10.let.arr2.new.Int32Array.10):
(arr2):

  • microbenchmarks/memcpy-wasm-large.js: Added.

(typeof.WebAssembly.string_appeared_here.eq):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):

  • microbenchmarks/memcpy-wasm-medium.js: Added.

(typeof.WebAssembly.string_appeared_here.eq):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):

  • microbenchmarks/memcpy-wasm-small.js: Added.

(typeof.WebAssembly.string_appeared_here.eq):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):

  • microbenchmarks/memcpy-wasm.js: Added.

(typeof.WebAssembly.string_appeared_here.eq):
(typeof.WebAssembly.string_appeared_here.const.1.new.WebAssembly.Instance.new.WebAssembly.Module.new.Uint8Array):

  • stress/memcpy-typed-loops.js: Added.

(noLoop):
(invalidStart):
(const.size.10.let.arr1.new.Int32Array.size.let.arr2.new.Int32Array.size):
(arr2):

  • wasm/function-tests/memcpy-wasm-loop.js: Added.

(0.GetLocal.3.I32Const.1.I32Add.SetLocal.3.Br.1.End.End.End.WebAssembly):
(string_appeared_here):

Source/JavaScriptCore:

Add a new pass in B3 to identify one type of forward byte copy loop and replace it with a call to a custom version of memcpy
that will not cause GC tearing and have the correct behaviour when overlapping regions are passed in.

Microbenchmarks show memcpy-typed-loop-large is about 6x faster, and everything else is neutral. The optimization is disabled
on arm for now, until we add a memcpy implementation for it.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3ReduceLoopStrength.cpp: Added.

(JSC::B3::fastForwardCopy32):
(JSC::B3::ReduceLoopStrength::AddrInfo::appendAddr):
(JSC::B3::ReduceLoopStrength::ReduceLoopStrength):
(JSC::B3::ReduceLoopStrength::reduceByteCopyLoopsToMemcpy):
(JSC::B3::ReduceLoopStrength::hoistValue):
(JSC::B3::ReduceLoopStrength::run):
(JSC::B3::reduceLoopStrength):

  • b3/B3ReduceLoopStrength.h: Added.
  • b3/testb3.h:
  • b3/testb3_1.cpp:

(run):

  • b3/testb3_8.cpp:

(testFastForwardCopy32):
(testByteCopyLoop):
(testByteCopyLoopStartIsLoopDependent):
(testByteCopyLoopBoundIsLoopDependent):
(addCopyTests):

11:00 PM Changeset in webkit [248937] by bshafiei@apple.com
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r248928. rdar://problem/54543351

[iOS] REGRESSION (248501): gmail.com images are still not shown on some versions of iPhone iOS13
https://bugs.webkit.org/show_bug.cgi?id=200948

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-20
Reviewed by Tim Horton.

Apply the gmail.com quirk for all iPhone iOS versions till the gmail.com
bug is fixed.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::platformUserAgent const):

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

11:00 PM Changeset in webkit [248936] by bshafiei@apple.com
  • 3 edits
    4 adds in branches/safari-608-branch

Cherry-pick r248909. rdar://problem/54543354

Clicking the search icon on ae.com hangs the web content process
https://bugs.webkit.org/show_bug.cgi?id=200889
<rdar://problem/54359330>

Reviewed by Ryosuke Niwa.

Source/WebCore:

The hang occurs under FrameSelection::selectionAtSentenceStart, while computing an EditorState to send to the UI
process. This act of determining whether the given positon is at the start of sentence entails moving backwards
from the start of the current visible selection until the start of a paragraph or sentence is found, using
VisiblePosition::previous to iterate backwards through VisiblePositions.

However, on this website, VisiblePosition::previous ends up just returning the current position, and we loop
infinitely as a result because we never actually move backwards. This happens because VisiblePosition::previous
first uses previousVisuallyDistinctCandidate to find a candidate Position before the current position, but when
the position is canonicalized to create a VisiblePosition, it is moved back to its original Position as the deep
equivalent.

In the attached test case (which is representative of the relevant part of the DOM on ae.com), we try to find
the previous VisiblePosition from (#c, 0). The previous visually distinct candidate we initially find is
(#b, 0), since:

  1. The enclosing renderer is a RenderBlock with a non-zero height.
  2. The enclosing renderer has no rendered children.
  3. The position is at the first editing position in the node (i.e. the span element).

However, when canonicalizing the position, we find that neither the upstream nor the downstream position is a
candidate because both the upstream and downstream nodes end up well outside of the span (the upstream node ends
up being at the start of the body element, and the downstream position ends up right before the start of #c's
container). The downstream position is at the end of a text node with a leading newline, it's not a candidate
because its last caret offset is less than the length of the text node.

As a result, even though the given position (#b, 0) is a candidate itself, its downstream and upstream positions
are not. Thus, VisiblePosition::canonicalPosition expands the scope of its candidate positions to the next
closest candidate positions; the next candidate position is (#c, 0). Both of these candidates are outside of the
containing block, so we (somewhat arbitrarily) break the tie by choosing the next visible position, bringing us
back to (#c, 0).

There are several ways to fix this, one of which involves fixing the downstream/upstream positions of (#b, 0) so
that they no longer jump out of the containing block of #b and cause (#b, 0) to be an invalid visible position
despite being a candidate position. This can be achieved by adjusting the heuristic in
endsOfNodeAreVisuallyDistinctPositions (used when moving upstream or downstream). Currently, this helper
function returns false for #b because they contain a single (non-rendered) whitespace character. Removing this
extraneous whitespace character actually causes the problem to stop reproducing, since #b and #c no longer
contain any child nodes. This is important because the heuristic in Position::downstream attempts to keep the
downstream position within the confines of the enclosing visual boundary, which (currently) ends up being the
entire body element because endsOfNodeAreVisuallyDistinctPositions returns false for #b.

To avoid this scenario, we teach endsOfNodeAreVisuallyDistinctPositions to treat inline-block containers that
are empty (that is, contain no rendered content) but may have children for editing in the same way as inline-
block containers that don't have any children; in both scenarios, they may contain a candidate position, so we
should treat the ends of the container node as being visually distinct.

Doing so causes the downstream position of (#b, 0) to be kept within the immediate containing span element,
which then allows (#b, 0) to be a canonical VisiblePosition.

Tests: fast/events/focus-anchor-with-tabindex-hang.html

editing/selection/modify-backward-inline-block-containers.html

  • editing/VisiblePosition.cpp: (WebCore::VisiblePosition::previous const):

LayoutTests:

  • editing/selection/modify-backward-inline-block-containers-expected.txt: Added.
  • editing/selection/modify-backward-inline-block-containers.html: Added.

Add a layout test to ensure that the selection may be moved through empty inline-block containers that span the
width of the page.

  • fast/events/focus-anchor-with-tabindex-hang-expected.txt: Added.
  • fast/events/focus-anchor-with-tabindex-hang.html: Added.

Add a layout test to ensure that clicking an empty span under a focusable anchor element moves focus to the
anchor element instead of hanging the web content process or hitting a debug assertion.

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

10:59 PM Changeset in webkit [248935] by bshafiei@apple.com
  • 8 edits in branches/safari-608-branch/Source

Cherry-pick r248902. rdar://problem/54543355

Unsafe usage of CookieStorageObserver from a background thread
https://bugs.webkit.org/show_bug.cgi?id=200920

Reviewed by Alex Christensen.

Source/WebCore:

Unsafe usage of CookieStorageObserver from a background thread. CookieStorageObserver gets
constructed / destructed on the main thread. However, CookieStorageObserver::cookiesDidChange()
gets called on a background thread and tries to ref |this|. Even though CookieStorageObserver
is ThreadSafeRefCounted, this is still unsafe because the CookieStorageObserver destructor may
already be running on the main thread when CookieStorageObserver::cookiesDidChange() gets called
on the background thread.

  • platform/network/NetworkStorageSession.h:
  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/cocoa/CookieStorageObserver.mm: (WebCore::CookieStorageObserver::CookieStorageObserver): (WebCore::CookieStorageObserver::cookiesDidChange): (WebCore::CookieStorageObserver::create): Deleted.
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::cookieStorageObserver const):

Source/WebKit:

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: (API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):

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

10:59 PM Changeset in webkit [248934] by bshafiei@apple.com
  • 3 edits in branches/safari-608-branch/Source/WebInspectorUI

Cherry-pick r247867. rdar://problem/54543378

Web Inspector: AXI: Audit: Typo of "some" as "somee"
https://bugs.webkit.org/show_bug.cgi?id=200166

Patch by Greg Doolittle <gr3g@apple.com> on 2019-07-26
Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/AuditManager.js: (WI.AuditManager.prototype._addDefaultTests): (WI.AuditManager):

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

10:25 PM Changeset in webkit [248933] by Devin Rousso
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, speculative build fix for High Sierra after r248925

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::HeapHolderFinder::dump):

6:41 PM Changeset in webkit [248932] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

nextElementWithGreaterTabIndex should use shadowAdjustedTabIndex
https://bugs.webkit.org/show_bug.cgi?id=200943

Reviewed by Wenson Hsieh.

Use shadowAdjustedTabIndex instead of tabIndexForElement in nextElementWithGreaterTabIndex.

Because nextElementWithGreaterTabIndex is only called to find an element with a tab index
set to a greater value than the argument tabIndex, which is always a positive integer,
whether we call shadowAdjustedTabIndex or tabIndexForElement has no effect on an element
with a shadow root or on a slot element. Furthermore, none of the elements with
an isKeyboardFocusable override can have a author defined shadow root attached either.

As a result, this refactoring will have no observable behavioral change.

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

  • page/FocusController.cpp:

(WebCore::tabIndexForElement): Merged into shadowAdjustedTabIndex.
(WebCore::shadowAdjustedTabIndex):
(WebCore::nextElementWithGreaterTabIndex):

6:39 PM Changeset in webkit [248931] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove MathMLElement::defaultTabIndex()
https://bugs.webkit.org/show_bug.cgi?id=200944

Reviewed by Frédéric Wang.

Removed MathMLElement::defaultTabIndex since it doesn't have any observable effect since
MathMLElement doesn't expose tabIndex IDL attribute, and sequential (tab key) focus navigation
checks MathMLElement::isKeyboardFocusable, which doesn't rely on defaultTabIndex, anyway.

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::defaultTabIndex const): Deleted.

  • mathml/MathMLElement.h:
6:36 PM Changeset in webkit [248930] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

Make it easier to pass pointers to WTFCrashWithInfo.
https://bugs.webkit.org/show_bug.cgi?id=200960

Reviewed by Saam Barati and Yusuke Suzuki.

Now, we don't have to explicitly cast them to uint64_ts first. The template
wrappers will take care of it for us.

  • wtf/Assertions.h:

(wtfCrashArg):
(WTFCrashWithInfo):
(WTF::isIntegralOrPointerType):
(WTF::isIntegralType): Deleted.

6:13 PM Changeset in webkit [248929] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Remove superfluous size argument to allocateCell() for fixed size objects.
https://bugs.webkit.org/show_bug.cgi?id=200958

Reviewed by Yusuke Suzuki.

The size is already automatically computed by the allocateCell() template's default
arguments. Removing these superfluous arguments will make it easier for us to
grep for cases where we do allocate variable size cells (for later analysis work).

  • jsc.cpp:

(JSC::Masquerader::create):
(JSCMemoryFootprint::create):

  • tools/JSDollarVM.cpp:

(JSC::JSDollarVMCallFrame::create):
(JSC::Element::create):
(JSC::Root::create):
(JSC::SimpleObject::create):
(JSC::ImpureGetter::create):
(JSC::CustomGetter::create):
(JSC::DOMJITNode::create):
(JSC::DOMJITGetter::create):
(JSC::DOMJITGetterComplex::create):
(JSC::DOMJITFunctionObject::create):
(JSC::DOMJITCheckSubClassObject::create):
(JSC::DOMJITGetterBaseJSObject::create):
(JSC::JSTestCustomGetterSetter::create):
(JSC::WasmStreamingParser::create):

5:54 PM Changeset in webkit [248928] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[iOS] REGRESSION (248501): gmail.com images are still not shown on some versions of iPhone iOS13
https://bugs.webkit.org/show_bug.cgi?id=200948

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-20
Reviewed by Tim Horton.

Apply the gmail.com quirk for all iPhone iOS versions till the gmail.com
bug is fixed.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::platformUserAgent const):

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

JSBigInt::m_length should be immutable.
https://bugs.webkit.org/show_bug.cgi?id=200956

Reviewed by Yusuke Suzuki.

This is because the JSBigInt cell size is allocated with that length. Changing
the length after construction does not change the size of the cell, and hence,
makes no sense.

This patch removes the setLength() method, and decorates the m_length field with
const to enforce that it is immutable after construction.

  • runtime/JSBigInt.h:
5:26 PM Changeset in webkit [248926] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

[results.webkit.org Webkit.css] Add right sidebar
https://bugs.webkit.org/show_bug.cgi?id=200946

Reviewed by Jonathan Bedard.

  • resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(@media screen and (min-width: 600px) and (orientation: landscape)):
(.main.left):
(@media screen and (min-width: 768px) and (orientation: landscape)):
(.sidebar.right):

5:24 PM Changeset in webkit [248925] by Devin Rousso
  • 165 edits
    1 copy
    2 adds in trunk

Web Inspector: Implement queryHolders Command Line API
https://bugs.webkit.org/show_bug.cgi?id=200458

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Call queryHolders(object) from the Console to return an array of objects that strongly
reference the given object. This could be very useful for finding JavaScript "leaks".

  • inspector/InjectedScriptSource.js:

(queryHolders): Added.

  • inspector/JSInjectedScriptHost.h:
  • inspector/JSInjectedScriptHost.cpp:

(Inspector::HeapHolderFinder::HeapHolderFinder): Added.
(Inspector::HeapHolderFinder::holders): Added.
(Inspector::HeapHolderFinder::analyzeEdge): Added.
(Inspector::HeapHolderFinder::analyzePropertyNameEdge): Added.
(Inspector::HeapHolderFinder::analyzeVariableNameEdge): Added.
(Inspector::HeapHolderFinder::analyzeIndexEdge): Added.
(Inspector::HeapHolderFinder::analyzeNode): Added.
(Inspector::HeapHolderFinder::setOpaqueRootReachabilityReasonForCell): Added.
(Inspector::HeapHolderFinder::setWrappedObjectForCell): Added.
(Inspector::HeapHolderFinder::setLabelForCell): Added.
(Inspector::HeapHolderFinder::dump): Added.
(Inspector::JSInjectedScriptHost::queryHolders): Added.

  • inspector/JSInjectedScriptHostPrototype.cpp:

(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionQueryHolders): Added.

  • heap/HeapAnalyzer.h: Added.

Create an abstract base class for analyzing the Heap during a GC. Rather than create an
entire HeapSnapshot for queryHolders, the HeapHolderFinder can just walk the Heap and
only save the information it needs to determine the holders of the given object.

  • heap/Heap.h:
  • heap/Heap.cpp:

(JSC::Heap::isAnalyzingHeap const): Added.
(JSC::GatherExtraHeapData::GatherExtraHeapData): Added.
(JSC::GatherExtraHeapData::operator() const): Added.
(JSC::Heap::gatherExtraHeapData): Added.
(JSC::Heap::didFinishCollection): Added.
(JSC::Heap::isHeapSnapshotting const): Deleted.
(JSC::GatherHeapSnapshotData::GatherHeapSnapshotData): Deleted.
(JSC::GatherHeapSnapshotData::operator() const): Deleted.
(JSC::Heap::gatherExtraHeapSnapshotData): Deleted.

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::isAnalyzingHeap const): Added.
(JSC::SlotVisitor::heapAnalyzer const): Added.
(JSC::SlotVisitor::isBuildingHeapSnapshot const): Deleted.
(JSC::SlotVisitor::heapSnapshotBuilder const): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::appendSlow):
(JSC::SlotVisitor::visitChildren):

  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::appendUnbarriered):

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::specializedVisit):

  • runtime/Structure.cpp:

(JSC::Structure::visitChildren):
Rename HeapAnalyzer functions to be less specific to building a HeapSnapshot.

  • heap/HeapProfiler.h:

(JSC::HeapProfiler::activeHeapAnalyzer const): Added.
(JSC::HeapProfiler::activeSnapshotBuilder const): Deleted.

  • heap/HeapProfiler.cpp:

(JSC::HeapProfiler::setActiveHeapAnalyzer): Added.
(JSC::HeapProfiler::setActiveSnapshotBuilder): Deleted.

  • heap/HeapSnapshotBuilder.h:
  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::HeapSnapshotBuilder):
(JSC::HeapSnapshotBuilder::buildSnapshot):
(JSC::HeapSnapshotBuilder::analyzeNode): Added.
(JSC::HeapSnapshotBuilder::analyzeEdge): Added.
(JSC::HeapSnapshotBuilder::analyzePropertyNameEdge): Added.
(JSC::HeapSnapshotBuilder::analyzeVariableNameEdge): Added.
(JSC::HeapSnapshotBuilder::analyzeIndexEdge): Added.
(JSC::HeapSnapshotBuilder::appendNode): Deleted.
(JSC::HeapSnapshotBuilder::appendEdge): Deleted.
(JSC::HeapSnapshotBuilder::appendPropertyNameEdge): Deleted.
(JSC::HeapSnapshotBuilder::appendVariableNameEdge): Deleted.
(JSC::HeapSnapshotBuilder::appendIndexEdge): Deleted.

  • inspector/InjectedScriptManager.h:
  • inspector/agents/InspectorRuntimeAgent.cpp:
  • runtime/ClassInfo.h:
  • runtime/JSCell.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::analyzeHeap): Added.
(JSC::JSCell::heapSnapshot): Deleted.

  • runtime/JSLexicalEnvironment.h:
  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::analyzeHeap): Added.
(JSC::JSLexicalEnvironment::heapSnapshot): Deleted.

  • runtime/JSObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::analyzeHeap): Added.
(JSC::JSObject::heapSnapshot): Deleted.

  • runtime/JSSegmentedVariableObject.h:
  • runtime/JSSegmentedVariableObject.cpp:

(JSC::JSSegmentedVariableObject::analyzeHeap): Added.
(JSC::JSSegmentedVariableObject::heapSnapshot): Deleted.
Rename heapSnapshot to analyzeHeap.

Source/WebCore:

Call queryHolders(object) from the Console to return an array of objects that strongly
reference the given object. This could be very useful for finding JavaScript "leaks".

Test: inspector/console/queryHolders.html

  • inspector/CommandLineAPIModuleSource.js:

(CommandLineAPIImpl.prototype.queryHolders): Added.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/js/DOMGCOutputConstraint.cpp:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::analyzeHeap): Added.
(WebCore::JSDOMWindow::heapSnapshot): Deleted.

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::analyzeHeap): Added.
(WebCore::JSDocument::heapSnapshot): Deleted.

  • bindings/scripts/test/JS/*:

Rename heapSnapshot to analyzeHeap to match JavaScriptCore changes.

Source/WebInspectorUI:

Call queryHolders(object) from the Console to return an array of objects that strongly
reference the given object. This could be very useful for finding JavaScript "leaks".

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

LayoutTests:

  • inspector/console/queryHolders.html: Added.
  • inspector/console/queryHolders-expected.txt: Added.
  • http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt:
  • TestExpectations:
  • platform/mac-wk1/TestExpectations:
5:10 PM Changeset in webkit [248924] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests/imported/w3c

Revert the unintended test change in r248914.

  • web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html:
4:47 PM Changeset in webkit [248923] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Address a few Esprima issues preventing pretty printing of resources
https://bugs.webkit.org/show_bug.cgi?id=200935

Reviewed by Timothy Hatcher.

Address a few Esprima issues:

Issue #1991 - Failure to parse template literal with destructuring assignment expression
https://github.com/jquery/esprima/issues/1991

Issue #1920 - Invalid Left Hand Side in for-in
https://github.com/jquery/esprima/issues/1920

  • UserInterface/External/Esprima/esprima.js:
4:44 PM Changeset in webkit [248922] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Update CodeMirror to support numeric separators in JavaScript numbers
https://bugs.webkit.org/show_bug.cgi?id=200942

Cherry-pick a few CodeMirror changes:

[javascript mode] Support numeric separators
https://github.com/codemirror/CodeMirror/commit/beab8ed123683416bfec934df73d13401ec086b5#diff-9812850bb71d31e8dd60b476abb2bae8

[javascript mode] fix tokenizing of underscore properties
https://github.com/codemirror/CodeMirror/commit/463ea2c34ab442c0cae1d9732305219ca9b04dfe#diff-9812850bb71d31e8dd60b476abb2bae8

Reviewed by Timothy Hatcher.

  • UserInterface/External/CodeMirror/javascript.js:
4:13 PM Changeset in webkit [248921] by Adrian Perez de Castro
  • 6 edits
    1 add in releases/WebKitGTK/webkit-2.24

Merged r248410 - Do not allow navigations of frames about to get replaced by the result of evaluating javascript: URLs
<rdar://problem/53788893> and https://bugs.webkit.org/show_bug.cgi?id=198786

Reviewed by Geoff Garen.

Source/WebCore:

Covered by API Test

Add a "willReplaceWithResultOfExecutingJavascriptURL" flag which is respected inside FrameLoader::isNavigationAllowed

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeIfJavaScriptURL):

  • bindings/js/ScriptController.h:

(WebCore::ScriptController::willReplaceWithResultOfExecutingJavascriptURL const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::isNavigationAllowed const):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/JavascriptURLNavigation.mm: Added.
4:11 PM Changeset in webkit [248920] by sbarati@apple.com
  • 3 edits
    2 adds in trunk

[WHLSL] We need to null check when emitting native code for operator&.<field-name>
https://bugs.webkit.org/show_bug.cgi?id=200846

Reviewed by Myles C. Maxfield.

Source/WebCore:

Test: webgpu/whlsl/structure-field-access-on-null.html

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::inlineNativeFunction):

LayoutTests:

  • webgpu/whlsl/structure-field-access-on-null-expected.txt: Added.
  • webgpu/whlsl/structure-field-access-on-null.html: Added.
3:35 PM Changeset in webkit [248919] by justin_michaud@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[WASM-References] Enable by default
https://bugs.webkit.org/show_bug.cgi?id=200931

Reviewed by Saam Barati.

  • runtime/Options.h:
3:18 PM Changeset in webkit [248918] by Chris Dumez
  • 5 edits in trunk/Source

WebSQLiteDatabaseTracker does not ensure it is still alive after dispatching to the main thread
https://bugs.webkit.org/show_bug.cgi?id=200925

Reviewed by Geoffrey Garen.

WebSQLiteDatabaseTracker does not ensure it is still alive after dispatching to the main thread,
which is not safe. Use WeakPtr to address the issue.

  • Shared/WebSQLiteDatabaseTracker.cpp:

(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
(WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
(WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):

  • Shared/WebSQLiteDatabaseTracker.h:
2:33 PM Changeset in webkit [248917] by Russell Epstein
  • 4 edits in trunk/LayoutTests

Updating Expectations for Multiple Newly Passing Tests.

Unreviewed Test Gardening.

  • platform/ios-12/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
2:11 PM Changeset in webkit [248916] by Devin Rousso
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: move the resource type scope bar to be next to the filter
https://bugs.webkit.org/show_bug.cgi?id=200891

Reviewed by Joseph Pecoraro.

It's odd to have UI for controlling the active filters in two different places. Move the
resource type WI.ScopeBar to the filter bar area, and "promote" the resource grouping mode
items from a context menu to an always visible WI.ScopeBar in the space left by the
resource type WI.ScopeBar (switching between grouping modes quickly is a useful workflow).

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeScopeBarSelectionChanged): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
(WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu.addOption): Deleted.
(WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Deleted.

  • UserInterface/Views/SourcesNavigationSidebarPanel.css:

(.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:not(:hover)): Added.
(.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:hover): Added.

  • UserInterface/Views/FilterBar.js:

(WI.FilterBar.prototype.addFilterNavigationItem): Added.
(WI.FilterBar.prototype.addFilterBarButton):

  • UserInterface/Views/FilterBar.css:

(.filter-bar > .navigation-bar > .item):
(.filter-bar > .navigation-bar > .item.button): Added.
(.filter-bar > .navigation-bar > .item.scope-bar): Added.
(.filter-bar > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Added.
Provide a way to add arbitrary WI.NavigationItem to the contained WI.NavigationBar.
Slightly adjust the spacing of the items (depending on their type) in the WI.NavigationBar
so they are all centered.

  • UserInterface/Views/ScopeBar.css:

(.scope-bar):
(.scope-bar > li):
(.scope-bar > li::after):
(.scope-bar > li:not(.selected):hover): Added.
(body[dir=ltr] .scope-bar > li.multiple > select):
(body[dir=rtl] .scope-bar > li.multiple > select):
(.scope-bar > li:not(.selected):hover::after): Added.
Introduce CSS variables for margin, padding, and opacity that callers can override to
customize the appearance of the WI.ScopeBar.

  • Localizations/en.lproj/localizedStrings.js:
1:40 PM Changeset in webkit [248915] by justin_fan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed comment follow-up for https://bugs.webkit.org/show_bug.cgi?id=200752.

  • html/canvas/GPUBasedCanvasRenderingContext.h:
12:59 PM Changeset in webkit [248914] by rniwa@webkit.org
  • 17 edits in trunk

The default tab index of output and fieldset should be -1
https://bugs.webkit.org/show_bug.cgi?id=200834

Reviewed by Alex Christensen.

Source/WebCore:

This patch updates the default tab index of output and fieldset to -1 to match the behavior of
Chrome and Firefox as well as the latest HTML specification:
https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute

To do that, this patch replaces HTMLFormControlElement::defaultTabIndex with defaultTabIndex
implementation in each one of its concrete subclass such as HTMLButtonElement to mirror
the language of the specification as follows:

HTMLFormControlElement

HTMLButtonElement -> 0
HTMLFieldSetElement -> -1
HTMLFormControlElementWithState

HTMLKeygenElement -> 0 - Not specified anywhere but preserving the existing behavior.
HTMLSelectElement -> 0
HTMLTextFormControlElement

HTMLInputElement -> 0
HTMLTextAreaElement -> 0

HTMLOutputElement -> -1

Even though Element::shouldBeIgnoredInSequentialFocusNavigation() checks the value of
defaultTabIndex, this patch does not affect the actual sequential (tab) focus navigation:
Beacuse HTMLOutputElement and HTMLFieldSetElement have supportsFocus overrides to call
HTMLElement::supportsFocus instead of HTMLFormControlElement::supportsFocus, these two
elements are focusable only when tabindex is set or it's a root content editable element.
But all root editable elements are focusable anyway and the default tab index does not
matter when tabindex is set.

Test: fast/dom/tabindex-defaults.html

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultTabIndex const): Added.

  • html/HTMLButtonElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::defaultTabIndex const): Deleted.

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

(WebCore::HTMLInputElement::defaultTabIndex const): Added.

  • html/HTMLKeygenElement.h:
  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::defaultTabIndex const): Added.

  • html/HTMLKeygenElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::defaultTabIndex const): Added.

  • html/HTMLSelectElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::defaultTabIndex const): Added.

  • html/HTMLTextAreaElement.h:

LayoutTests:

Added test cases for output, fieldset, and keygen.

  • fast/dom/tabindex-defaults-expected.txt:
  • fast/dom/tabindex-defaults.html:
12:45 PM Changeset in webkit [248913] by sbarati@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed. Followup to r248903. It's not valid to remove
hasOverflowed() checks from appendCharacters.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::appendCharacters):

12:17 PM Changeset in webkit [248912] by Joseph Pecoraro
  • 4 edits
    1 copy
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Sources: Give Origins their own icon in the Sources sidebar
https://bugs.webkit.org/show_bug.cgi?id=200683
<rdar://problem/54269044>

Reviewed by Devin Rousso.

  • UserInterface/Images/Origin.svg: Added.
  • UserInterface/Main.html:

New resources.

  • UserInterface/Views/FolderIcon.css:

(.origin-icon .icon):
Light and Dark appearances for Origin icons.

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/OriginTreeElement.js:

(WI.OriginTreeElement):
Very much like a folder with different classes.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
Use OriginTreeElement in a few places.

11:58 AM Changeset in webkit [248911] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[ContentChangeObserver] isConsideredClickable should be able to process elements with no renderers
https://bugs.webkit.org/show_bug.cgi?id=200926
<rdar://problem/54519579>

Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes the crash when the visible->hidden change triggers an isConsideredClickable() call with a 'display: none' element.

Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden-crash.html

  • page/ios/ContentChangeObserver.cpp:

(WebCore::isConsideredClickable):

LayoutTests:

  • fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden-crash-expected.txt: Added.
  • fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden-crash.html: Added.
11:55 AM Changeset in webkit [248910] by jbedard@apple.com
  • 6 edits
    2 adds in trunk/Tools

results.webkit.org: Add ToolTips
https://bugs.webkit.org/show_bug.cgi?id=200801

Rubber-stamped by Aakash Jain.

When dots or scale labels are hovered over, we should display a tool tip with additional information about
The specific element.

  • resultsdbpy/resultsdbpy/view/static/css/tooltip.css: Added.

(.tooltip): Add class for ToolTip text box.
(.tooltip-arrow-up): Add class for ToolTip arrow pointing up.
(.tooltip-arrow-down): Add class for ToolTip arrow pointing down.

  • resultsdbpy/resultsdbpy/view/static/js/commit.js:

(_CommitBank.prototype.commitsDuringUuid): Return a list of commits which were the trunk of their respective
repositories at a given time.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(xAxisFromScale): Add callbacks triggered when the mouse enters or leaves elements in the scale canvas.
(TimelineFromEndpoint.render): Add callbacks triggered when the mouse enters or leaves dot elements.

  • resultsdbpy/resultsdbpy/view/static/js/tooltip.js: Added.

(isPointInElement): Given an element and a point, return true if that point is within the bounds of the element.
(_ToolTip):
(_ToolTip.prototype.set): Set the content and location of the ToolTip.
(_ToolTip.prototype.toString): Return the html needed to render the ToolTip.
(_ToolTip.prototype.unset): Clear and hide the ToolTip.
(_ToolTip.prototype.isIn): Check if a given point is contained within the ToolTip.

  • resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:

(Timeline.CanvasSeriesComponent): Convert onHover events to onEnter/onLeave events. Add toolTips points to both
dot and scale elements.

  • resultsdbpy/resultsdbpy/view/templates/search.html: Add ToolTip.
  • resultsdbpy/resultsdbpy/view/templates/suite_results.html: Ditto.
11:46 AM Changeset in webkit [248909] by wenson_hsieh@apple.com
  • 3 edits
    4 adds in trunk

Clicking the search icon on ae.com hangs the web content process
https://bugs.webkit.org/show_bug.cgi?id=200889
<rdar://problem/54359330>

Reviewed by Ryosuke Niwa.

Source/WebCore:

The hang occurs under FrameSelection::selectionAtSentenceStart, while computing an EditorState to send to the UI
process. This act of determining whether the given positon is at the start of sentence entails moving backwards
from the start of the current visible selection until the start of a paragraph or sentence is found, using
VisiblePosition::previous to iterate backwards through VisiblePositions.

However, on this website, VisiblePosition::previous ends up just returning the current position, and we loop
infinitely as a result because we never actually move backwards. This happens because VisiblePosition::previous
first uses previousVisuallyDistinctCandidate to find a candidate Position before the current position, but when
the position is canonicalized to create a VisiblePosition, it is moved back to its original Position as the deep
equivalent.

In the attached test case (which is representative of the relevant part of the DOM on ae.com), we try to find
the previous VisiblePosition from (#c, 0). The previous visually distinct candidate we initially find is
(#b, 0), since:

  1. The enclosing renderer is a RenderBlock with a non-zero height.
  2. The enclosing renderer has no rendered children.
  3. The position is at the first editing position in the node (i.e. the span element).

However, when canonicalizing the position, we find that neither the upstream nor the downstream position is a
candidate because both the upstream and downstream nodes end up well outside of the span (the upstream node ends
up being at the start of the body element, and the downstream position ends up right before the start of #c's
container). The downstream position is at the end of a text node with a leading newline, it's not a candidate
because its last caret offset is less than the length of the text node.

As a result, even though the given position (#b, 0) is a candidate itself, its downstream and upstream positions
are not. Thus, VisiblePosition::canonicalPosition expands the scope of its candidate positions to the next
closest candidate positions; the next candidate position is (#c, 0). Both of these candidates are outside of the
containing block, so we (somewhat arbitrarily) break the tie by choosing the next visible position, bringing us
back to (#c, 0).

There are several ways to fix this, one of which involves fixing the downstream/upstream positions of (#b, 0) so
that they no longer jump out of the containing block of #b and cause (#b, 0) to be an invalid visible position
despite being a candidate position. This can be achieved by adjusting the heuristic in
endsOfNodeAreVisuallyDistinctPositions (used when moving upstream or downstream). Currently, this helper
function returns false for #b because they contain a single (non-rendered) whitespace character. Removing this
extraneous whitespace character actually causes the problem to stop reproducing, since #b and #c no longer
contain any child nodes. This is important because the heuristic in Position::downstream attempts to keep the
downstream position within the confines of the enclosing visual boundary, which (currently) ends up being the
entire body element because endsOfNodeAreVisuallyDistinctPositions returns false for #b.

To avoid this scenario, we teach endsOfNodeAreVisuallyDistinctPositions to treat inline-block containers that
are empty (that is, contain no rendered content) but may have children for editing in the same way as inline-
block containers that don't have any children; in both scenarios, they may contain a candidate position, so we
should treat the ends of the container node as being visually distinct.

Doing so causes the downstream position of (#b, 0) to be kept within the immediate containing span element,
which then allows (#b, 0) to be a canonical VisiblePosition.

Tests: fast/events/focus-anchor-with-tabindex-hang.html

editing/selection/modify-backward-inline-block-containers.html

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::previous const):

LayoutTests:

  • editing/selection/modify-backward-inline-block-containers-expected.txt: Added.
  • editing/selection/modify-backward-inline-block-containers.html: Added.

Add a layout test to ensure that the selection may be moved through empty inline-block containers that span the
width of the page.

  • fast/events/focus-anchor-with-tabindex-hang-expected.txt: Added.
  • fast/events/focus-anchor-with-tabindex-hang.html: Added.

Add a layout test to ensure that clicking an empty span under a focusable anchor element moves focus to the
anchor element instead of hanging the web content process or hitting a debug assertion.

10:54 AM Changeset in webkit [248908] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Web Inspector: Support for JavaScript BigInt
https://bugs.webkit.org/show_bug.cgi?id=180731

Unreviewed test gardening.

  • inspector/timeline/line-column-expected.txt: Rebaseline test.
10:50 AM Changeset in webkit [248907] by bfulgham@apple.com
  • 16 edits in trunk/Source

[FTW] Fix scrolling in modern WebKit views
https://bugs.webkit.org/show_bug.cgi?id=200923

Reviewed by Don Olmstead.

The initial implementation of scrolling in Direct2D had errors that
caused hilarious rendering glitches. This patch corrects the logic
so that page scroll is correct.
Source/WebCore:

  • platform/graphics/win/BackingStoreBackendDirect2D.h:
  • platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:

(WebCore::BackingStoreBackendDirect2DImpl::scroll):
(WebCore::BackingStoreBackendDirect2DImpl::bitmapBrush):

  • platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
  • platform/graphics/win/Direct2DOperations.cpp:

(WebCore::Direct2D::drawNativeImage):

  • platform/graphics/win/Direct2DUtilities.cpp:

(WebCore::Direct2D::copyRectFromOneSurfaceToAnother):
(WebCore::Direct2D::writeImageToDiskAsPNG): Added diagnostic utility to
dump textures to disk for review.

  • platform/graphics/win/Direct2DUtilities.h:
  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoderDirect2D::systemImagingFactory): Switch to more
recent factory with additional features.

  • platform/graphics/win/ImageDecoderDirect2D.h:

Source/WebKit:

This patch also fixes a bug that would trigger when resizing windows.

  • Shared/win/ShareableBitmapDirect2D.cpp:

(WebKit::ShareableBitmap::paint):

  • UIProcess/BackingStore.h:

(WebKit::BackingStore::renderTarget): Deleted.

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:

(WebKit::DrawingAreaProxyCoordinatedGraphics::sizeDidChange):
(WebKit::DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange):

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
  • UIProcess/win/BackingStoreDirect2D.cpp:

(WebKit::BackingStore::paint):
(WebKit::BackingStore::incorporateUpdate):
(WebKit::BackingStore::scroll):

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::paint):
(WebKit::WebView::onSizeEvent):

10:37 AM Changeset in webkit [248906] by ysuzuki@apple.com
  • 8 edits
    1 add in trunk

[JSC] Array.prototype.toString should not get "join" function each time
https://bugs.webkit.org/show_bug.cgi?id=200905

Reviewed by Mark Lam.

JSTests:

  • stress/array-prototype-join-change.js: Added.

(shouldBe):
(array2.join):
(DerivedArray):
(DerivedArray.prototype.join):
(array3.proto.join):
(Array.prototype.join):

Source/JavaScriptCore:

We avoid looking up join every time Array#toString is called. This patch implements the most profitable and easy
case first as we are doing optimization for Array#slice: non-modified original Array. Configuring watchpoint for
Array.prototype.join change and use this information and structure information to determine whether join lookup
in Array.prototype.toString is unnecessary. This improves JetStream2/3d-raytrace-SP score by 1.6%

ToT: 363.56
Patched: 369.26

This patch also renames InlineWatchpointSet fields from Watchpoint to WatchpointSet since they are not Watchpoint.

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::isWatchingArrayIteratorProtocolWatchpoint):
(JSC::DFG::Graph::isWatchingNumberToStringWatchpoint):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):
(JSC::canUseDefaultArrayJoinForToString):
(JSC::arrayProtoFuncToString):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::mapIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::setIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::stringIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::mapSetWatchpointSet):
(JSC::JSGlobalObject::setAddWatchpointSet):
(JSC::JSGlobalObject::arraySpeciesWatchpointSet):
(JSC::JSGlobalObject::arrayJoinWatchpointSet):
(JSC::JSGlobalObject::numberToStringWatchpointSet):
(JSC::JSGlobalObject::arrayIteratorProtocolWatchpoint): Deleted.
(JSC::JSGlobalObject::mapIteratorProtocolWatchpoint): Deleted.
(JSC::JSGlobalObject::setIteratorProtocolWatchpoint): Deleted.
(JSC::JSGlobalObject::stringIteratorProtocolWatchpoint): Deleted.
(JSC::JSGlobalObject::mapSetWatchpoint): Deleted.
(JSC::JSGlobalObject::setAddWatchpoint): Deleted.
(JSC::JSGlobalObject::arraySpeciesWatchpoint): Deleted.
(JSC::JSGlobalObject::numberToStringWatchpoint): Deleted.

  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable):
(JSC::JSGlobalObject::isMapPrototypeIteratorProtocolFastAndNonObservable):
(JSC::JSGlobalObject::isSetPrototypeIteratorProtocolFastAndNonObservable):
(JSC::JSGlobalObject::isStringPrototypeIteratorProtocolFastAndNonObservable):
(JSC::JSGlobalObject::isMapPrototypeSetFastAndNonObservable):
(JSC::JSGlobalObject::isSetPrototypeAddFastAndNonObservable):

10:35 AM Changeset in webkit [248905] by justin_michaud@apple.com
  • 5 edits in trunk

Fix InBounds speculation of typed array PutByVal and add extra step to integer range optimization to search for equality relationships on the RHS value
https://bugs.webkit.org/show_bug.cgi?id=200782

Reviewed by Saam Barati.

JSTests:

Skip long memcpy test on debug, and try to fix flakiness for recompilation count tests by disabling cjit.

  • microbenchmarks/memcpy-typed-loop.js:
  • stress/int8-repeat-in-then-out-of-bounds.js:

Tools:

  • Scripts/run-jsc-stress-tests:
10:19 AM Changeset in webkit [248904] by sbarati@apple.com
  • 3 edits in trunk/Source/WebCore

[WHLSL] Only take the pointer of a variable or global variable reference if it is used
https://bugs.webkit.org/show_bug.cgi?id=200908

Reviewed by Dean Jackson.

Previously, we would always emit Metal code to produce an lvalue pointer
even when it wasn't used. This patch adds a mechanism to lazily generate
such pointers when they're actually needed, since we often don't use them.
This is a 7% Metal compile time speedup on compute_boids with a p value of
0.0001.

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

  • Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h:

(WebCore::WHLSL::Metal::MangledVariableName::operator bool const):

10:14 AM Changeset in webkit [248903] by Darin Adler
  • 5 edits in trunk

Variadic StringBuilder::append does not handle upconverting from 8-bit to 16-bit correctly
https://bugs.webkit.org/show_bug.cgi?id=200921

Reviewed by Saam Barati.

Source/WTF:

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::appendUninitialized8): Renamed from
appendUninitializedWithoutOverflowCheckForLChar and moved the length overflow
check in here to cut down on unnecessary inlining and code size.
(WTF::StringBuilder::appendUninitialized16): Renamed from
appendUninitializedWithoutOverflowCheckForUChar, moved the length overflow check
in here, and moved the necessary upconversion code from the const UChar* overload of
the appendCharacters function.
(WTF::StringBuilder::appendCharacters): Removed unneeded "length has already overflowed"
check at the start of the function since the code in the function already handles that
case correctly. Refactored the const UChar* overload to use the new appendCharacters16
function so it can share more code with StringBuilder::appendFromAdapters.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::appendFromAdapters): Updated the function names for the
two appendUninitialized functions, which now do a bit more than before. Removed the
overflow check since the appendUninitialized8/16 functions now handle that; better to
not make the inlined code larger to handle a failure case.

Tools:

  • TestWebKitAPI/Tests/WTF/StringBuilder.cpp:

Changed tests to use EXPECT macros instead of ASSERT macros since we don't
need to abort after the first failure. Added three new tests to the VariadicAppend
test to cover various cases of upconverting from 8-bit to 16-bit strings.

9:53 AM Changeset in webkit [248902] by Chris Dumez
  • 8 edits in trunk/Source

Unsafe usage of CookieStorageObserver from a background thread
https://bugs.webkit.org/show_bug.cgi?id=200920

Reviewed by Alex Christensen.

Source/WebCore:

Unsafe usage of CookieStorageObserver from a background thread. CookieStorageObserver gets
constructed / destructed on the main thread. However, CookieStorageObserver::cookiesDidChange()
gets called on a background thread and tries to ref |this|. Even though CookieStorageObserver
is ThreadSafeRefCounted, this is still unsafe because the CookieStorageObserver destructor may
already be running on the main thread when CookieStorageObserver::cookiesDidChange() gets called
on the background thread.

  • platform/network/NetworkStorageSession.h:
  • platform/network/cocoa/CookieStorageObserver.h:
  • platform/network/cocoa/CookieStorageObserver.mm:

(WebCore::CookieStorageObserver::CookieStorageObserver):
(WebCore::CookieStorageObserver::cookiesDidChange):
(WebCore::CookieStorageObserver::create): Deleted.

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::cookieStorageObserver const):

Source/WebKit:

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

(API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore):

9:34 AM Changeset in webkit [248901] by Chris Dumez
  • 21 edits
    1 copy in trunk/Source

Use a strongly typed identifier for StorageNamespace's identifier
https://bugs.webkit.org/show_bug.cgi?id=200895

Reviewed by Alex Christensen and Youenn Fablet.

Source/WebCore:

  • storage/StorageNamespace.h:

Source/WebKit:

Use a strongly typed identifier for StorageNamespace's identifier instead of uint64_t, to
avoid type confusion.

  • NetworkProcess/WebStorage/LocalStorageNamespace.cpp:

(WebKit::LocalStorageNamespace::LocalStorageNamespace):

  • NetworkProcess/WebStorage/LocalStorageNamespace.h:
  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::destroySessionStorageNamespace):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::createLocalStorageArea):
(WebKit::StorageManager::createTransientLocalStorageArea):
(WebKit::StorageManager::createSessionStorageArea):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateSessionStorageNamespace):

  • NetworkProcess/WebStorage/StorageManager.h:
  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::connectToLocalStorageArea):
(WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
(WebKit::StorageManagerSet::connectToSessionStorageArea):
(WebKit::StorageManagerSet::cloneSessionStorageNamespace):

  • NetworkProcess/WebStorage/StorageManagerSet.h:
  • NetworkProcess/WebStorage/StorageManagerSet.messages.in:
  • Scripts/webkit/messages.py:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_textAutoSizingAdjustmentTimer):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::sessionStorageNamespaceIdentifier const):

  • WebProcess/WebPage/WebPageGroupProxy.h:

(WebKit::WebPageGroupProxy::localStorageNamespaceIdentifier const):

  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):

  • WebProcess/WebStorage/StorageNamespaceIdentifier.h: Copied from Source/WebKit/WebProcess/WebStorage/WebStorageNamespaceProvider.h.
  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::sessionStoragePageID const):
(WebKit::StorageNamespaceImpl::pageGroupID const):

  • WebProcess/WebStorage/StorageNamespaceImpl.h:

(WebKit::StorageNamespaceImpl::storageNamespaceID const):

  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::getOrCreate):
(WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
(WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):

  • WebProcess/WebStorage/WebStorageNamespaceProvider.h:
9:10 AM Changeset in webkit [248900] by dino@apple.com
  • 5 edits in trunk

REGRESSION: Open in New Tab is missing from context menu
https://bugs.webkit.org/show_bug.cgi?id=200909
<rdar://problem/54476169>

Reviewed by Simon Fraser.

Source/WebKit:

Don't assume the new API if webView:contextMenuWillPresentForElement:
is implemented.

  • UIProcess/ios/WKContentViewInteraction.mm:

(needsDeprecatedPreviewAPI):

Tools:

Add a new test that runs through the legacy context menu
flow, and verifies that it will be called if there aren't
appropriate delegates for the new API.

  • TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:

(contextMenuWebViewDriver):
(-[TestContextMenuUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(TEST):
(-[LegacyPreviewViewController previewActionItems]):
(-[LegacyContextMenuUIDelegate webView:shouldPreviewElement:]):
(-[LegacyContextMenuUIDelegate webView:previewingViewControllerForElement:defaultActions:]):
(-[LegacyContextMenuUIDelegate webView:contextMenuWillPresentForElement:]):
(-[LegacyContextMenuUIDelegate _webView:contextMenuDidEndForElement:]):

  • TestWebKitAPI/cocoa/TestContextMenuDriver.h:
6:26 AM Changeset in webkit [248899] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Make IDB quota check lambdas take a weak of UniqueIDBDatabaseTransaction instead of a ref
https://bugs.webkit.org/show_bug.cgi?id=196696

Reviewed by Alex Christensen.

Refing the transaction in the lambdas extend their lifetime.
Taking a weak pointer of them is better as this will not extend their lifetime.
In particular, if the database is deleted, the corresponding transactions might be deleted.
This makes quota checks less intrusive in IDB lifetime management.
Covered by existing tests.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3:41 AM Changeset in webkit [248898] by Joseph Pecoraro
  • 32 edits
    1 add in trunk

Web Inspector: Support for JavaScript BigInt
https://bugs.webkit.org/show_bug.cgi?id=180731
<rdar://problem/36298748>

Source/JavaScriptCore:

Reviewed by Devin Rousso.

  • inspector/InjectedScriptSource.js:

(toStringDescription):
(isSymbol):
(isBigInt):
(let.InjectedScript.prototype._fallbackWrapper):
(let.RemoteObject):
(let.RemoteObject.subtype):
(let.RemoteObject.describe):
(let.RemoteObject.prototype._appendPropertyPreviews):
(let.RemoteObject.set _isPreviewableObjectInternal):
(let.RemoteObject.prototype._isPreviewableObject.set add):

  • inspector/protocol/Runtime.json:

New RemoteObject type and preview support.

  • runtime/RuntimeType.cpp:

(JSC::runtimeTypeForValue):
(JSC::runtimeTypeAsString):

  • runtime/RuntimeType.h:
  • runtime/TypeSet.cpp:

(JSC::TypeSet::displayName const):
(JSC::TypeSet::inspectorTypeSet const):
New type for the type profiler.

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json):

  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::getPreview):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::toString):
(JSC::JSBigInt::tryGetString):
(JSC::JSBigInt::toStringBasePowerOfTwo):
(JSC::JSBigInt::toStringGeneric):

  • runtime/JSBigInt.h:

BigInts are not tied to a GlobalObject, so provide a way to get a
String for HeapSnapshot previews that are not tied to an ExecState.

Source/WebInspectorUI:

Reviewed by Devin Rousso.

  • UserInterface/External/CodeMirror/javascript.js:

(expressionAllowed):
Cherry-pick BigInt JavaScript mode support from CodeMirror:
https://github.com/codemirror/CodeMirror/pull/5411

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

(:root):
(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CodeMirrorAdditions.js:
  • UserInterface/Views/SyntaxHighlightingDefaultTheme.css:

(.cm-s-default .cm-number.cm-bigint,):

  • UserInterface/Views/ObjectTreePropertyTreeElement.css:

(.object-tree-property.bigint > .icon):

  • UserInterface/Views/HeapSnapshotInstancesContentView.css:

(.heap-snapshot .icon.bigint):
Style BigInt similiar but different from numbers but with
a [B] icon instead of [N].

  • UserInterface/Views/FormattedValue.css:

(.formatted-bigint):

  • UserInterface/Views/FormattedValue.js:

(WI.FormattedValue.hasSimpleDisplay):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
(WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
Simple value formatting for the new type.

  • UserInterface/Models/TypeSet.js:

(WI.TypeSet):
(WI.TypeSet.prototype.get primitiveTypeNames):

  • UserInterface/Views/TypeTokenView.css:

(.type-token-bigint):

  • UserInterface/Views/TypeTokenView.js:

(WI.TypeTokenView.prototype._displayTypeName):
(WI.TypeTokenView):
New type handling for the Type profiler.

  • UserInterface/Protocol/RemoteObject.js:

(WI.RemoteObject):
(WI.RemoteObject.createBigIntFromDescriptionString):

  • UserInterface/Views/HeapSnapshotClusterContentView.js:

(WI.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WI.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
BigInt values are not tied to a GlobalObject, so do some special casing
in the Heap output (like Strings) so we get a preview.

Source/WebKit:

Reviewed by Devin Rousso.

  • WebProcess/WebPage/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::WebInspectorUI):
Enable BigInt in the Web Inspector process. It only makes use of
globalThis.BigInt(...) to hold the value.

LayoutTests:

Reviewed by Devin Rousso.

  • inspector/model/remote-object-expected.txt:
  • inspector/model/remote-object.html:
  • inspector/model/resources/remote-object-utilities.js:

Include simple tests for a BigInt value and preview.

2:48 AM Changeset in webkit [248897] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Remove DeferredPromise::sessionID()
https://bugs.webkit.org/show_bug.cgi?id=200616

Reviewed by Alex Christensen.

Calling sessionID() on DeferredPromise is valid if the DeferredPromise is not suspended.
Since this might not always be true in call sites, add a resolve promise that is passed a function that returns
the value to resolve.
This function is taking a ScriptExecutionContext from which the session ID can be retrieved.
This is safe since the function will only be called if the DeferredPromise is not suspended.
Update call sites accordingly.
No change of behavior.

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::resolve):

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::blob):

  • bindings/js/JSDOMPromiseDeferred.h:

(WebCore::DeferredPromise::resolveCallbackValueWithNewlyCreated):
(WebCore::DeferredPromise::sessionID const): Deleted.

2:39 AM Changeset in webkit [248896] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

PendingActivationMediaStream does not need to be refcounted
https://bugs.webkit.org/show_bug.cgi?id=200879

Reviewed by Alex Christensen.

No observable change of behavior.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::allow):
(WebCore::UserMediaRequest::mediaStreamDidFail):
No need to asynchronously remove the observer since MediaStreamPrivate handles that properply now.

  • Modules/mediastream/UserMediaRequest.h:
12:04 AM Changeset in webkit [248895] by Devin Rousso
  • 5 edits in trunk

Web Inspector: Use URL constructor to better handle all kinds of URLs
https://bugs.webkit.org/show_bug.cgi?id=165155

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Base/URLUtilities.js:

(parseURL):

LayoutTests:

  • inspector/unit-tests/url-utilities.html:
  • inspector/unit-tests/url-utilities-expected.txt:
Note: See TracTimeline for information about the timeline view.