WebKit.git
5 months agoCustom analysis task page should allow schedule any triggerable accepted tests.
dewei_zhu@apple.com [Fri, 6 Dec 2019 22:49:02 +0000 (22:49 +0000)]
Custom analysis task page should allow schedule any triggerable accepted tests.
https://bugs.webkit.org/show_bug.cgi?id=204925

Reviewed by Ryosuke Niwa.

Fix a bug that subtest will not show on custom analysis task page if both itself and parent test are
accepted by triggerable.
Order test list in alphabetical order.

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests):

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

5 months agoPython 3: Add support in webkitpy.test
jbedard@apple.com [Fri, 6 Dec 2019 22:45:38 +0000 (22:45 +0000)]
Python 3: Add support in webkitpy.test
https://bugs.webkit.org/show_bug.cgi?id=204952

Reviewed by Stephanie Lewis.

Source/WebKit:

Tested by test-webkitpy.

* Scripts/webkit/messages_unittest.py: Use Python 2/3 compatible StringIO.

Tools:

* Scripts/test-webkitpy-python3: Add webkitpy.tool.
* Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py: Use Python 2/3
compatible StringIO objects.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: Ditto.
* Scripts/webkitpy/performance_tests/perftest_unittest.py: Ditto.
* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: Ditto.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: Ditto.
* Scripts/webkitpy/test/finder.py:
(Finder._exclude): Convert filter to list.
* Scripts/webkitpy/test/main.py:
(Tester._log_exception): Use Python 2/3 compatible StringIO object.
(_Loader.getTestCaseNames): Convert filter to list.
* Scripts/webkitpy/test/main_unittest.py:
(TesterTest.test_no_tests_found): Use Python 2/3 compatible StringIO.
(TesterTest.test_integration_tests_are_found): Sort serial tests before comparing.
* Scripts/webkitpy/test/printer.py: Use Python 2/3 compatible StringIO.
* Scripts/webkitpy/test/runner_unittest.py: Ditto.
* Scripts/webkitpy/test/skip.py:
(_skipped_method._skip): Fix class inspection on instance method.
* Scripts/webkitpy/test/skip_unittest.py: Use Python 2/3 compatible StringIO.
* Scripts/webkitpy/w3c/test_converter.py: Use Python 2/3 compatible HTMLParser.
* Scripts/webkitpy/w3c/wpt_runner.py:
(main): Fix Python 3 syntax errors.
* lldb/dump_class_layout_unittest.py:
(TestDumpClassLayout.setUpClass): Fix Python 3 syntax errors.

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

5 months agoRemove various .order files.
keith_miller@apple.com [Fri, 6 Dec 2019 22:43:55 +0000 (22:43 +0000)]
Remove various .order files.
https://bugs.webkit.org/show_bug.cgi?id=204959

Reviewed by Yusuke Suzuki.

These files are all super out of date and likely don't do anything anymore.
The signatures of the functions have changed thus the mangled name has changed.

Source/JavaScriptCore:

* JavaScriptCore.order: Removed.

Source/WebCore:

* WebCore.order: Removed.

Source/WebKit:

* mac/WebKit2.order: Removed.

Source/WebKitLegacy/mac:

* WebKit.order: Removed.

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

5 months agoRestrict libANGLE to link only with WebCore
dino@apple.com [Fri, 6 Dec 2019 22:22:53 +0000 (22:22 +0000)]
Restrict libANGLE to link only with WebCore
https://bugs.webkit.org/show_bug.cgi?id=204957
<rdar://problem/57708644>

Reviewed by Brian Burg.

Restrict to WebCore and WebCoreTestSupport.

* Configurations/ANGLE.xcconfig:

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

5 months agoAddress <https://bugs.webkit.org/show_bug.cgi?id=189222#c3>
mitz@apple.com [Fri, 6 Dec 2019 22:07:54 +0000 (22:07 +0000)]
Address <https://bugs.webkit.org/show_bug.cgi?id=189222#c3>

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView valueForUndefinedKey:]): Added a newline.

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

5 months agoUnreviewed, rolling out r253148.
jbedard@apple.com [Fri, 6 Dec 2019 21:45:48 +0000 (21:45 +0000)]
Unreviewed, rolling out r253148.

This caused fast/mediastream/stream-switch.html to timeout on
Mac.

Reverted changeset:

"WPT test MediaStream-MediaElement-srcObject.https.html times
out"
https://bugs.webkit.org/show_bug.cgi?id=204762
https://trac.webkit.org/changeset/253148

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

5 months ago[LFC][IFC] Paint partial trailing run with hyphen when needed
zalan@apple.com [Fri, 6 Dec 2019 21:42:19 +0000 (21:42 +0000)]
[LFC][IFC] Paint partial trailing run with hyphen when needed
https://bugs.webkit.org/show_bug.cgi?id=204953
<rdar://problem/57705169>

Reviewed by Antti Koivisto.

When LineBreaker comes back with a partial content that needs hyphen, we need to make sure this information
ends up in the final Display::Run so that the rendered content includes the hyphen string. Note that this only needs to
be done when the content does _not_ have the hyphen already (opportunity vs. oppor-tunity).
(This patch also renames trailingPartial to partialTrailing because the fact that it is partial run is more important than that it is trailing run.)

* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::TextContext::TextContext):
(WebCore::Display::Run::TextContext::needsHyphen const):
(WebCore::Display::Run::TextContext::setNeedsHyphen):
(WebCore::Display::Run::textContext):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
* layout/inlineformatting/InlineLineBreaker.cpp:
(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
* layout/inlineformatting/InlineLineBreaker.h:
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::processUncommittedContent):
* layout/inlineformatting/LineLayoutContext.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):

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

5 months agoPrevent synchronous XHR in beforeunload / unload event handlers
cdumez@apple.com [Fri, 6 Dec 2019 21:05:12 +0000 (21:05 +0000)]
Prevent synchronous XHR in beforeunload / unload event handlers
https://bugs.webkit.org/show_bug.cgi?id=204912
<rdar://problem/57676394>

Reviewed by Darin Adler.

Source/WebCore:

Prevent synchronous XHR in beforeunload / unload event handlers. They are terrible for performance
and the Beacon API (or Fetch keepalive) are more efficient & supported alternatives.

In particular, this would cause hangs when trying to navigate away from a site or when closing
attempt, which would result in terrible user experience.

Chrome and Edge have expressed public support for this. Chrome has actually been testing this behavior
for a while now:
https://www.chromestatus.com/feature/4664843055398912

I added this new behavior behind an experimental feature flag, enabled by default.

Tests: http/tests/xmlhttprequest/sync-xhr-in-beforeunload.html
       http/tests/xmlhttprequest/sync-xhr-in-unload.html

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
* loader/FrameLoader.cpp:
(WebCore::PageLevelForbidScope::PageLevelForbidScope):
(WebCore::ForbidPromptsScope::ForbidPromptsScope):
(WebCore::ForbidPromptsScope::~ForbidPromptsScope):
(WebCore::ForbidSynchronousLoadsScope::ForbidSynchronousLoadsScope):
(WebCore::ForbidSynchronousLoadsScope::~ForbidSynchronousLoadsScope):
(WebCore::FrameLoader::dispatchUnloadEvents):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):
* page/Page.cpp:
(WebCore::Page::forbidSynchronousLoads):
(WebCore::Page::allowSynchronousLoads):
(WebCore::Page::areSynchronousLoadsAllowed):
* page/Page.h:

LayoutTests:

Add layout test coverage.

* http/tests/xmlhttprequest/resources/sync-xhr-in-beforeunload-window.html: Added.
* http/tests/xmlhttprequest/resources/sync-xhr-in-unload-window.html: Added.
* http/tests/xmlhttprequest/sync-xhr-in-beforeunload-expected.txt: Added.
* http/tests/xmlhttprequest/sync-xhr-in-beforeunload.html: Added.
* http/tests/xmlhttprequest/sync-xhr-in-unload-expected.txt: Added.
* http/tests/xmlhttprequest/sync-xhr-in-unload.html: Added.

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

5 months agoDrop support for NSURLCache callbacks in NetworkProcess
commit-queue@webkit.org [Fri, 6 Dec 2019 21:03:50 +0000 (21:03 +0000)]
Drop support for NSURLCache callbacks in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=203344

Patch by Benjamin Nham <nham@apple.com> on 2019-12-06
Reviewed by Alex Christensen.

Remove the NSURLSession caching policy callback in NetworkProcess. It's no longer necessary since
we don't use NSURLCache in NetworkProcess (https://bugs.webkit.org/show_bug.cgi?id=185990).

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Deleted.

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

5 months agoWeb Inspector: TabActivity diagnostic event should sample the active tab uniformly
bburg@apple.com [Fri, 6 Dec 2019 19:34:39 +0000 (19:34 +0000)]
Web Inspector: TabActivity diagnostic event should sample the active tab uniformly
https://bugs.webkit.org/show_bug.cgi?id=204531

Reviewed by Devin Rousso.

Rewrite this class to use a uniform sampling approach. Every n seconds, a timer fires and
samples what the current tab is. If the last user interaction happened up to n seconds ago,
report a TabActivity diagnostic event. Keeping with the previous implementation, samples
are taken every n=60 seconds.

To account for bias in the initial sample when Web Inspector is open, wait m seconds for
the first sample. This accounts for the time between opening Web Inspector and choosing the
desired tab. In my testing, m=10 is enough time to load Web Inspector and switch
immediately to a different tab. In that case, the initial tab would not be sampled as the
active tab even if the last user interaction (clicking tab bar) happened while the initial
tab was displayed. If the recorder's setup() method is called some time after Web Inspector is
opened, then the initial delay will shrink to ensure at least 10s has elapsed since the frontend
finished loading.

* UserInterface/Base/Main.js:
(WI.contentLoaded): Keep a timestamp of when the frontend finished loading.

* UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js:
(WI.TabActivityDiagnosticEventRecorder):
(WI.TabActivityDiagnosticEventRecorder.prototype.setup):
(WI.TabActivityDiagnosticEventRecorder.prototype.teardown):
(WI.TabActivityDiagnosticEventRecorder.prototype._startInitialDelayBeforeSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._stopInitialDelayBeforeSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._startEventSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._stopEventSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._sampleCurrentTabActivity):
(WI.TabActivityDiagnosticEventRecorder.prototype._didObserveUserInteraction):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowFocus):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowBlur):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowKeyDown):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowMouseDown):
(WI.TabActivityDiagnosticEventRecorder.prototype._didInteractWithTabContent): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._clearTabActivityTimeout): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._beginTabActivityTimeout): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._stopTrackingTabActivity): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._handleTabBrowserSelectedTabContentViewDidChange): Deleted.

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

5 months agoSupport for resolving highlight pseudo element style
antti@apple.com [Fri, 6 Dec 2019 19:18:16 +0000 (19:18 +0000)]
Support for resolving highlight pseudo element style
https://bugs.webkit.org/show_bug.cgi?id=204937

Reviewed by Simon Fraser.

Source/WebCore:

Test: highlight/highlight-pseudo-element-style.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):

Returns always true when checked without pseudoId, so it gets added to the set of seen pseudo elements.
Match argument with the provided highlight name otherwise.

* css/SelectorChecker.h:
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumePseudo):
* rendering/style/RenderStyle.h:
* style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::ruleMatches):
* style/ElementRuleCollector.h:
(WebCore::Style::PseudoElementRequest::PseudoElementRequest):

Add the requested highlight name.

* style/StyleResolver.h:
* style/StyleScope.h:
* testing/Internals.cpp:
(WebCore::Internals::highlightPseudoElementColor):

Testing support.

* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* highlight/highlight-pseudo-element-style-expected.txt: Added.
* highlight/highlight-pseudo-element-style.html: Added.

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

5 months ago[LFC][Integration] Fix DisplayRunPath offsets
antti@apple.com [Fri, 6 Dec 2019 18:08:03 +0000 (18:08 +0000)]
[LFC][Integration] Fix DisplayRunPath offsets
https://bugs.webkit.org/show_bug.cgi?id=204949

Reviewed by Zalan Bujtas.

Fixes output of tests like fast/text/system-font-zero-size.html with LFC integration enabled.

* rendering/line/LineLayoutTraversalDisplayRunPath.h:
(WebCore::LineLayoutTraversal::DisplayRunPath::DisplayRunPath):
(WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):

Display::Run offsets are already local.

(WebCore::LineLayoutTraversal::DisplayRunPath::length const):
(WebCore::LineLayoutTraversal::DisplayRunPath::runs const):
(WebCore::LineLayoutTraversal::DisplayRunPath::firstRun const): Deleted.

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

5 months agoUnreviewed. Revert r253207 because it causes compile error in Mac and ios build.
jh718.park@samsung.com [Fri, 6 Dec 2019 17:15:40 +0000 (17:15 +0000)]
Unreviewed. Revert r253207 because it causes compile error in Mac and ios build.

* runtime/PredictionFileCreatingFuzzerAgent.cpp:
(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):

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

5 months agoUnreviewed. Remove build warning below since r252978.
jh718.park@samsung.com [Fri, 6 Dec 2019 17:08:25 +0000 (17:08 +0000)]
Unreviewed. Remove build warning below since r252978.

warning: format ‘%llx’ expects argument of type ‘long long unsigned int’,
but argument 3 has type ‘JSC::SpeculatedType {aka long unsigned int}’ [-Wformat=]

* runtime/PredictionFileCreatingFuzzerAgent.cpp:
(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):

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

5 months agoStop using reserveCapacity() / reserveInitialCapacity() in IPC decoders
cdumez@apple.com [Fri, 6 Dec 2019 16:06:12 +0000 (16:06 +0000)]
Stop using reserveCapacity() / reserveInitialCapacity() in IPC decoders
https://bugs.webkit.org/show_bug.cgi?id=204930
<rdar://problem/57682737>

Reviewed by Ryosuke Niwa.

This is IPC hardening since the size we use to reserve the capacity is encoded over IPC
and cannot be trusted in some cases.

Source/WebCore:

* page/csp/ContentSecurityPolicyResponseHeaders.h:
(WebCore::ContentSecurityPolicyResponseHeaders::decode):

Source/WebKit:

* Platform/IPC/ArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Vector<RefPtr<SecurityOrigin>>>::decode):

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

5 months ago[LFC][Integration] Wire line counting functions in RenderBlockFlow
antti@apple.com [Fri, 6 Dec 2019 14:37:43 +0000 (14:37 +0000)]
[LFC][Integration] Wire line counting functions in RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=204943

Reviewed by Zalan Bujtas.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::lineCount const):
* layout/integration/LayoutIntegrationLineLayout.h:
* rendering/ComplexLineLayout.cpp:
(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
(WebCore::ComplexLineLayout::lineCount const):
(WebCore::ComplexLineLayout::lineCountUntil const):

Move complex path specific code to ComplexLineLayout.

* rendering/ComplexLineLayout.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::lineCount const):
(WebCore::RenderBlockFlow::hasLines const):

Support all paths.

* rendering/RenderBlockFlow.h:

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

5 months ago[LFC][Integration] Support isLineBreak() in iterator
antti@apple.com [Fri, 6 Dec 2019 14:34:22 +0000 (14:34 +0000)]
[LFC][Integration] Support isLineBreak() in iterator
https://bugs.webkit.org/show_bug.cgi?id=204941

Reviewed by Zalan Bujtas.

* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::isLineBreak const):
* rendering/line/LineLayoutTraversalDisplayRunPath.h:
(WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
(WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):

Also remove unneeded skipping of runs without text context. All runs generated from text nodes now have them.

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

6 months agoProtect WebRTC network monitoring to wait forever in edge cases
youenn@apple.com [Fri, 6 Dec 2019 09:25:22 +0000 (09:25 +0000)]
Protect WebRTC network monitoring to wait forever in edge cases
https://bugs.webkit.org/show_bug.cgi?id=204846
Source/WebKit:

Reviewed by Eric Carlson.

We were limiting the number of IPC message sent to network process by only sending the start monitoring event for the first client.
The issue is that, if network process crashes for instance while having not yet given the list of networks, all clients will be hanging
waiting for the completion of network list.
We are now sending an IPC message for every client and the network process will ignore the ones that are not useful.
In addition, in case of network process crash, we send a signal that network list has changed to make sure clients will never hang.
They might still fail connecting, which is ok since network process crashed.

Test: webrtc/datachannel/gather-candidates-networkprocess-crash.html

* NetworkProcess/webrtc/NetworkRTCMonitor.cpp:
(WebKit::NetworkRTCMonitor::startUpdatingIfNeeded):
* NetworkProcess/webrtc/NetworkRTCMonitor.h:
* NetworkProcess/webrtc/NetworkRTCMonitor.messages.in:
* WebProcess/Network/webrtc/LibWebRTCNetwork.h:
(WebKit::LibWebRTCNetwork::networkProcessCrashed):
* WebProcess/Network/webrtc/WebRTCMonitor.cpp:
(WebKit::WebRTCMonitor::StartUpdating):
(WebKit::WebRTCMonitor::StopUpdating):
(WebKit::WebRTCMonitor::networksChanged):
(WebKit::WebRTCMonitor::networkProcessCrashed):
* WebProcess/Network/webrtc/WebRTCMonitor.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed):

LayoutTests:

<rdar://problem/57618773>

Reviewed by Eric Carlson.

* webrtc/datachannel/gather-candidates-networkprocess-crash-expected.txt: Added.
* webrtc/datachannel/gather-candidates-networkprocess-crash.html: Added.

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

6 months agoOutput libwebrtc logging from Network Process as release logging
youenn@apple.com [Fri, 6 Dec 2019 09:24:40 +0000 (09:24 +0000)]
Output libwebrtc logging from Network Process as release logging
https://bugs.webkit.org/show_bug.cgi?id=204853

Reviewed by Eric Carlson.

This will help debugging WebRTC networking issues.
No observable change of behavior.

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::doReleaseLogging):
(WebKit::NetworkRTCProvider::NetworkRTCProvider):

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

6 months agoget_by_id ICs should have a structure history used to indicate when we should skip...
sbarati@apple.com [Fri, 6 Dec 2019 07:33:04 +0000 (07:33 +0000)]
get_by_id ICs should have a structure history used to indicate when we should skip generating an IC
https://bugs.webkit.org/show_bug.cgi?id=204904
<rdar://problem/57631437>

Reviewed by Yusuke Suzuki and Tadeu Zagallo.

I implemented a similar policy for get_by_val for the number of unique seen
identifiers. This allows us to create a heuristic to directly call the slow
path when profiling information tells us if inline caching might not be
profitable. This patch implements a similar policy for get_by_id where we
profile the seen base value structures. If the LLInt observes enough
unique structures, we omit emitting the inline cache in the upper
tiers.

The goal here was to try to speed up Speedometer2. Local testing showed
this patch to repeatedly be 0.5% faster, but all the P values I got were
insignificant. So it appears it's either neutral or slightly faster.

This patch also adjusts the policy of seeing a non-identifier inside
the PointerHistory data structure. Instead of increasing it to reach the
limit when we see a non-identifier, we just treat each execution with
a non-identifier to increment the count by 1.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.rb:
* bytecode/GetByValHistory.h: Removed.
* bytecode/PointerHistory.h: Copied from Source/JavaScriptCore/bytecode/GetByValHistory.h.
(JSC::PointerHistory::observe):
(JSC::PointerHistory::observeNull):
(JSC::GetByValHistory::observeNonUID): Deleted.
(JSC::GetByValHistory::observe): Deleted.
(JSC::GetByValHistory::count const): Deleted.
(JSC::GetByValHistory::filter const): Deleted.
(JSC::GetByValHistory::update): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGGraph.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetById):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
* generator/DSL.rb:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/OptionsList.h:

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

6 months ago[LFC][IFC] Fix css1/basic/containment.html
zalan@apple.com [Fri, 6 Dec 2019 03:46:23 +0000 (03:46 +0000)]
[LFC][IFC] Fix css1/basic/containment.html
https://bugs.webkit.org/show_bug.cgi?id=204931
<rdar://problem/57682871>

Reviewed by Simon Fraser.

moveToNextBreakablePosition jumped over all the positions that came back as the current position.
e.g --- <- first 2 breakable positions are at: 1 2 but we skipped over the first one.

* layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::moveToNextBreakablePosition):

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

6 months ago[WinCairo] Improve Inspectable Target Page to adapt a long title and URL
yousuke.kimoto@sony.com [Fri, 6 Dec 2019 02:14:11 +0000 (02:14 +0000)]
[WinCairo] Improve Inspectable Target Page to adapt a long title and URL
https://bugs.webkit.org/show_bug.cgi?id=204874

Reviewed by Fujii Hironori.

Add some CSS atributes to make such long titles and URLs fit the width
of a window size. Then "Inspector" button is shown at the visible area.
No new tests, since there is no change in behavior.

* UIProcess/socket/RemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::platformStartTask):

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

6 months ago[WebKit] Fix compilation warnings for MSVC
Hironori.Fujii@sony.com [Fri, 6 Dec 2019 01:58:21 +0000 (01:58 +0000)]
[WebKit] Fix compilation warnings for MSVC
https://bugs.webkit.org/show_bug.cgi?id=204661

Reviewed by Don Olmstead.

No behavior changes.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
* NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::makeDescription):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
* NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toDiagnosticLoggingResultType):
* UIProcess/WebURLSchemeTask.cpp:
(WebKit::WebURLSchemeTask::didReceiveData):
* WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::registerAttachmentIdentifier):

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

6 months agoFinish ANGLE update
commit-queue@webkit.org [Fri, 6 Dec 2019 01:33:31 +0000 (01:33 +0000)]
Finish ANGLE update
https://bugs.webkit.org/show_bug.cgi?id=204911

The last ANGLE update patch didn't include all the changed files.
This patch updates the rest of the files.

Patch by James Darpinian <jdarpinian@chromium.org> on 2019-12-05
Reviewed by Alex Christensen.

* src/tests: Lots of changed files from upstream ANGLE.
* src/third_party/compiler/README.chromium:
* third_party/VK-GL-CTS/README.angle: Added.
* third_party/deqp/README.angle: Removed.
* third_party/googletest/README.angle: Removed.
* third_party/libpng/BUILD.gn:
* third_party/spirv-cross/README.angle: Added.
* util/OSWindow.h:
* util/egl_loader_autogen.cpp:
(angle::LoadEGL):
* util/egl_loader_autogen.h:
* util/fuchsia/ScenicWindow.cpp:
(ScenicWindow::resetNativeWindow):
* util/fuchsia/ScenicWindow.h:
* util/gles_loader_autogen.cpp:
(angle::LoadGLES):
* util/gles_loader_autogen.h:
* util/osx/OSXWindow.h:
* util/osx/OSXWindow.mm:
(OSXWindow::initialize):
* util/ozone/OzoneWindow.h:
* util/posix/crash_handler_posix.cpp:
(angle::InitCrashHandler):
* util/posix/test_utils_posix.cpp:
(angle::GetTempDir):
(angle::CreateTemporaryFileInDir):
(angle::DeleteFile):
(angle::LaunchProcess):
(angle::NumberOfProcessors):
* util/shader_utils.cpp:
(CompileShaderFromFile):
(CompileProgramFromFiles):
* util/test_utils.cpp: Added.
(angle::CreateTemporaryFile):
(angle::GetFileSize):
(angle::ReadEntireFileToString):
(angle::ProcessHandle::ProcessHandle):
(angle::ProcessHandle::~ProcessHandle):
(angle::ProcessHandle::operator=):
(angle::ProcessHandle::reset):
* util/test_utils.h:
* util/test_utils_unittest.cpp: Added.
(angle::NormalizeNewLines):
(angle::TEST):
* util/test_utils_unittest_helper.cpp: Added.
(main):
* util/test_utils_unittest_helper.h: Added.
* util/util.gni:
* util/windows/WGLWindow.cpp:
* util/windows/test_utils_win.cpp:
(angle::InitCrashHandler):
(angle::TerminateCrashHandler):
(angle::LaunchProcess):
(angle::GetTempDir):
(angle::CreateTemporaryFileInDir):
(angle::DeleteFile):
(angle::NumberOfProcessors):
* util/windows/win32/Win32Window.cpp:
(Win32Window::initialize):
* util/windows/win32/test_utils_win32.cpp:
(angle::StabilizeCPUForBenchmarking):
* util/x11/X11Window.h:

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

6 months agoMove member variable that should be private
megan_gardner@apple.com [Fri, 6 Dec 2019 01:27:30 +0000 (01:27 +0000)]
Move member variable that should be private
https://bugs.webkit.org/show_bug.cgi?id=204913

Reviewed by Wenson Hsieh.

These member variables should be in the correct section.

No changing functionality, no tests needed.

* page/EventHandler.h:

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

6 months ago[Cocoa] _WKInspector uses wrong WKWebView in -setDiagnosticLoggingDelegate:
bburg@apple.com [Fri, 6 Dec 2019 01:12:15 +0000 (01:12 +0000)]
[Cocoa] _WKInspector uses wrong WKWebView in -setDiagnosticLoggingDelegate:
https://bugs.webkit.org/show_bug.cgi?id=204928

Reviewed by Timothy Hatcher.

I feel like I've made this mistake before. To make the right thing more obvious,
add a property named inspectorWebView that returns the Inspector WKWebView.

* UIProcess/API/Cocoa/_WKInspector.mm:
(-[_WKInspector inspectorWebView]):
(-[_WKInspector _setDiagnosticLoggingDelegate:]):
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::inspectorPage const):

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

6 months ago[WebAssembly] Fix LLIntCallee's ownership
tzagallo@apple.com [Fri, 6 Dec 2019 01:08:57 +0000 (01:08 +0000)]
[WebAssembly] Fix LLIntCallee's ownership
https://bugs.webkit.org/show_bug.cgi?id=204929

Reviewed by Saam Barati.

Currently, after the LLIntPlan finished generating bytecode, the Module takes ownership of the Vector
of LLIntCallee's and passes a pointer to the Vector's storage to the CodeBlock. However, while we're
tiering up, the module might be destroyed and we'll try to access the LLIntCallee after we finish
compiling through the pointer held by the CodeBlock, which is now stale, since the Vector was owned
by the Module. In order to fix this, we move the Vector into a reference counted wrapper class, LLIntCallees,
and both the Module and the CodeBlock hold references to the wrapper.

* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::work):
* wasm/WasmCallee.h:
(JSC::Wasm::LLIntCallees::create):
(JSC::Wasm::LLIntCallees::at const):
(JSC::Wasm::LLIntCallees::data const):
(JSC::Wasm::LLIntCallees::LLIntCallees):
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):
* wasm/WasmCodeBlock.h:
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
* wasm/WasmModule.cpp:
(JSC::Wasm::Module::Module):
(JSC::Wasm::Module::getOrCreateCodeBlock):
* wasm/WasmModule.h:
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):

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

6 months agoUse sendWithAsyncReply() for WebPage::TryClose IPC
cdumez@apple.com [Fri, 6 Dec 2019 00:35:40 +0000 (00:35 +0000)]
Use sendWithAsyncReply() for WebPage::TryClose IPC
https://bugs.webkit.org/show_bug.cgi?id=204926

Reviewed by Alex Christensen.

Use sendWithAsyncReply() for WebPage::TryClose IPC, instead of 2 separate IPCs.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::closeBrowsingContext):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::closePage):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::tryClose):
(WebKit::WebPage::sendClose):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 months ago[IPC] Fail ObjectIdentifier decoding if the decoded integer is not a valid ID
cdumez@apple.com [Fri, 6 Dec 2019 00:34:15 +0000 (00:34 +0000)]
[IPC] Fail ObjectIdentifier decoding if the decoded integer is not a valid ID
https://bugs.webkit.org/show_bug.cgi?id=204921
<rdar://problem/57677747>

Reviewed by Ryosuke Niwa.

* wtf/ObjectIdentifier.h:
(WTF::ObjectIdentifier::decode):

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

6 months agoResource Load Statistics (experimental): Add fast mode for non-cookie website data...
wilander@apple.com [Fri, 6 Dec 2019 00:26:09 +0000 (00:26 +0000)]
Resource Load Statistics (experimental): Add fast mode for non-cookie website data deletion
https://bugs.webkit.org/show_bug.cgi?id=204858
<rdar://problem/57639851>

Reviewed by Alex Christensen.

Source/WebCore:

This change adds two internal flags:
- "Live-On Testing" with a one hour timeout instead of seven days.
- "Repro Testing" with an instant timeout (bar ITP's regular delays) instead of seven days.

These internal flags should be removed once testing is complete: <rdar://problem/57673418>

No new tests. This change just adds new opt-in settings for manual testing.

* page/Settings.yaml:
* platform/network/NetworkStorageSession.h:
    The FirstPartyWebsiteDataRemovalMode enum now has two new values:
    - AllButCookiesLiveOnTestingTimeout
    - AllButCookiesReproTestingTimeout

Source/WebKit:

The purpose of this change is to allow for dedicated testing of the change in
https://trac.webkit.org/changeset/253082/webkit. Waiting seven days just isn't a good
starting point.

This change adds two internal flags:
- "Live-On Testing" with a one hour timeout instead of seven days.
- "Repro Testing" with an instant timeout (bar ITP's regular delays) instead of seven days.

The change also makes sure that hasHadUnexpiredRecentUserInteraction() in
ResourceLoadStatisticsDatabaseStore and ResourceLoadStatisticsMemoryStore only
age out the user interaction timestamp if the OperatingDatesWindow is Long so
that we don't age out timestamps early with the shorter OperatingDatesWindows.

This change changes the default value of IsFirstPartyWebsiteDataRemovalEnabled to true.

These internal flags should be removed once testing is complete: <rdar://problem/57673418>

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::hasHadUnexpiredRecentUserInteraction const):
(WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveAllButCookiesFor const):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::setFirstPartyWebsiteDataRemovalMode):
* NetworkProcess/NetworkProcess.messages.in:
* Shared/WebPreferences.yaml:
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):

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

6 months agoPython 3: Add support to webkitpy.browserperfdash
jbedard@apple.com [Fri, 6 Dec 2019 00:01:32 +0000 (00:01 +0000)]
Python 3: Add support to webkitpy.browserperfdash
https://bugs.webkit.org/show_bug.cgi?id=204887

Reviewed by Stephanie Lewis.

* Scripts/test-webkitpy-python3: Add webkitpy.browserperfdash.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Remove urlparse dependency.
* Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py: Use explicit import.
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
(WebServerBenchmarkRunner._run_one_test): Use Python 2/3 compatible urljoin.

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

6 months agoOptimize IPC::Connection::SyncMessageState methods
cdumez@apple.com [Thu, 5 Dec 2019 23:56:12 +0000 (23:56 +0000)]
Optimize IPC::Connection::SyncMessageState methods
https://bugs.webkit.org/show_bug.cgi?id=204890

Reviewed by Alex Christensen.

Optimize IPC::Connection::SyncMessageState methods. We are seeing lock contention on some (app launch)
benchmarks, resulting in the main thread yielding for 10ms.

* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState): Make constructor private since this is a singleton class.
(IPC::Connection::ConnectionAndIncomingMessage): Add convenience dispatch() method.

(IPC::Connection::SyncMessageState::processIncomingMessage):
Drop the lock as early as possible, *before* calling RunLoop::main().dispatch().

(IPC::Connection::SyncMessageState::dispatchMessages):
Drop allowedConnection parameter and simplify the code a lot as a result. Only dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection()
needed the pass an allowedConnection but having dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() call dispatchMessages() was
inefficient since it would cause us to grab the lock in dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() to update
m_didScheduleDispatchMessagesWorkSet, then release it, then grab the lock again in dispatchMessages() for m_messagesToDispatchWhileWaitingForSyncReply.

(IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection):
Grab the lock only once to update m_didScheduleDispatchMessagesWorkSet and m_messagesToDispatchWhileWaitingForSyncReply, instead of doing it in 2
separate steps, each one taking the lock.

(IPC::Connection::waitForMessage):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::dispatchSyncMessage):
stop passing a null allowedConnection when calling dispatchMessages().

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

6 months agoPageConfiguration::dragClient should use a smart pointer
cdumez@apple.com [Thu, 5 Dec 2019 23:55:10 +0000 (23:55 +0000)]
PageConfiguration::dragClient should use a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=204816

Reviewed by Alex Christensen.

Source/WebCore:

* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* page/DragClient.h:
* page/DragController.cpp:
(WebCore::DragController::DragController):
(WebCore::DragController::~DragController):
(WebCore::DragController::dragEnded):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::delegateDragSourceAction):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):
(WebCore::DragController::beginDrag):
(WebCore::DragController::doSystemDrag):
* page/DragController.h:
(WebCore::DragController::client const):
* page/Page.cpp:
(WebCore::Page::Page):
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:
* page/mac/DragControllerMac.mm:
(WebCore::DragController::declareAndWriteDragImage):

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_overriddenMediaType):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::initWithFrame):

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

6 months ago[IPC] Fail BackForwardItemIdentifier decoding if the decoded integer is not a valid ID
cdumez@apple.com [Thu, 5 Dec 2019 23:53:18 +0000 (23:53 +0000)]
[IPC] Fail BackForwardItemIdentifier decoding if the decoded integer is not a valid ID
https://bugs.webkit.org/show_bug.cgi?id=204920
<rdar://problem/57677453>

Reviewed by Ryosuke Niwa.

Source/WebCore:

* history/BackForwardItemIdentifier.h:
(WebCore::BackForwardItemIdentifier::decode):

Source/WebKit:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::updateBackForwardItem):

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

6 months ago[IPC] Fail PAL::SessionID decoding if the decoded integer is not a valid session ID
cdumez@apple.com [Thu, 5 Dec 2019 23:52:01 +0000 (23:52 +0000)]
[IPC] Fail PAL::SessionID decoding if the decoded integer is not a valid session ID
https://bugs.webkit.org/show_bug.cgi?id=204917
<rdar://problem/53418119>

Reviewed by Ryosuke Niwa.

Fail PAL::SessionID IPC decoding if the decoded integer is not a valid session ID.
This makes our IPC more robust to bad input and makes sure we don't try to lookup
an invalid sessionID from a HashMap as a result of a bad IPC.

* pal/SessionID.h:
(PAL::SessionID::decode):

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

6 months agoWeb Inspector: http/tests/inspector/target/pause-on-inline-debugger-statement.html...
yurys@chromium.org [Thu, 5 Dec 2019 23:48:40 +0000 (23:48 +0000)]
Web Inspector: http/tests/inspector/target/pause-on-inline-debugger-statement.html is crashing in debug
https://bugs.webkit.org/show_bug.cgi?id=204901

Reviewed by Devin Rousso.

Restructured the test to avoid inadvertent alert() when navigating to a new
process. New logs are printed after inspected page has navigated.

* http/tests/inspector/target/pause-on-inline-debugger-statement-expected.txt:
* http/tests/inspector/target/pause-on-inline-debugger-statement.html:

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

6 months agoMove InProcessIDBServer to WebKitLegacy
sihui_liu@apple.com [Thu, 5 Dec 2019 23:40:47 +0000 (23:40 +0000)]
Move InProcessIDBServer to WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=204896

Reviewed by Brady Eidson.

Source/WebCore:

We only use InProcessIDBServer in WebKitLegacy now.

No behavior change.

* Headers.cmake:
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/shared/IDBRequestData.h:
* Modules/indexeddb/shared/IDBTransactionInfo.h:
* Modules/indexeddb/shared/InProcessIDBServer.h: Removed.
* Modules/mediastream/MediaStreamTrack.cpp:
* Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
* page/Page.cpp:

Source/WebKit:

* WebProcess/Databases/WebDatabaseProvider.h:

Source/WebKitLegacy:

* CMakeLists.txt:
* Storage/InProcessIDBServer.cpp: Renamed from Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp.
(InProcessIDBServer::create):
(InProcessIDBServer::quotaManager):
(storageQuotaManagerSpaceRequester):
(InProcessIDBServer::InProcessIDBServer):
(InProcessIDBServer::identifier const):
(InProcessIDBServer::connectionToServer const):
(InProcessIDBServer::connectionToClient const):
(InProcessIDBServer::deleteDatabase):
(InProcessIDBServer::didDeleteDatabase):
(InProcessIDBServer::openDatabase):
(InProcessIDBServer::didOpenDatabase):
(InProcessIDBServer::didAbortTransaction):
(InProcessIDBServer::didCommitTransaction):
(InProcessIDBServer::didCreateObjectStore):
(InProcessIDBServer::didDeleteObjectStore):
(InProcessIDBServer::didRenameObjectStore):
(InProcessIDBServer::didClearObjectStore):
(InProcessIDBServer::didCreateIndex):
(InProcessIDBServer::didDeleteIndex):
(InProcessIDBServer::didRenameIndex):
(InProcessIDBServer::didPutOrAdd):
(InProcessIDBServer::didGetRecord):
(InProcessIDBServer::didGetAllRecords):
(InProcessIDBServer::didGetCount):
(InProcessIDBServer::didDeleteRecord):
(InProcessIDBServer::didOpenCursor):
(InProcessIDBServer::didIterateCursor):
(InProcessIDBServer::abortTransaction):
(InProcessIDBServer::commitTransaction):
(InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
(InProcessIDBServer::createObjectStore):
(InProcessIDBServer::deleteObjectStore):
(InProcessIDBServer::renameObjectStore):
(InProcessIDBServer::clearObjectStore):
(InProcessIDBServer::createIndex):
(InProcessIDBServer::deleteIndex):
(InProcessIDBServer::renameIndex):
(InProcessIDBServer::putOrAdd):
(InProcessIDBServer::getRecord):
(InProcessIDBServer::getAllRecords):
(InProcessIDBServer::getCount):
(InProcessIDBServer::deleteRecord):
(InProcessIDBServer::openCursor):
(InProcessIDBServer::iterateCursor):
(InProcessIDBServer::establishTransaction):
(InProcessIDBServer::fireVersionChangeEvent):
(InProcessIDBServer::didStartTransaction):
(InProcessIDBServer::didCloseFromServer):
(InProcessIDBServer::notifyOpenDBRequestBlocked):
(InProcessIDBServer::databaseConnectionPendingClose):
(InProcessIDBServer::databaseConnectionClosed):
(InProcessIDBServer::abortOpenAndUpgradeNeeded):
(InProcessIDBServer::didFireVersionChangeEvent):
(InProcessIDBServer::openDBRequestCancelled):
(InProcessIDBServer::confirmDidCloseFromServer):
(InProcessIDBServer::getAllDatabaseNames):
(InProcessIDBServer::didGetAllDatabaseNames):
* Storage/InProcessIDBServer.h: Added.
* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::idbConnectionToServerForSession):
(WebDatabaseProvider::deleteAllDatabases):
* Storage/WebDatabaseProvider.h:
* WebKitLegacy.xcodeproj/project.pbxproj:

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

6 months agoAdd ThreadMessageReceiver to IPC::Connection
sihui_liu@apple.com [Thu, 5 Dec 2019 23:28:53 +0000 (23:28 +0000)]
Add ThreadMessageReceiver to IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=204908

Reviewed by Brady Eidson.

ThreadMesageReceiver is similar to WorkQueueMessageReceiver, but it should handle messages (dispatched from IPC
thread) on a specific thread, while WorkQueueMessageReceiver may handle messages on different threads.

* Platform/IPC/Connection.cpp:
(IPC::Connection::addThreadMessageReceiver):
(IPC::Connection::removeThreadMessageReceiver):
(IPC::Connection::dispatchThreadMessageReceiverMessage):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::dispatchMessageToThreadReceiver):
* Platform/IPC/Connection.h:
(IPC::Connection::ThreadMessageReceiver::dispatchToThread):

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

6 months agoFix inspector/css test assertions after r253158
simon.fraser@apple.com [Thu, 5 Dec 2019 23:28:37 +0000 (23:28 +0000)]
Fix inspector/css test assertions after r253158
https://bugs.webkit.org/show_bug.cgi?id=204924

Reviewed by Devin Rousso.
Source/JavaScriptCore:

Teach the inspector protocol about the ::highlight pseudoelement.

* inspector/protocol/CSS.json:

Source/WebCore:

* inspector/agents/InspectorCSSAgent.cpp:
(WebCore::protocolValueForPseudoId):

Source/WebInspectorUI:

* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.displayNameForPseudoId):

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

6 months agoRename IDBDatabaseIdentifier::debugString to IDBDatabaseIdentifier::loggingString
sihui_liu@apple.com [Thu, 5 Dec 2019 23:06:58 +0000 (23:06 +0000)]
Rename IDBDatabaseIdentifier::debugString to IDBDatabaseIdentifier::loggingString
https://bugs.webkit.org/show_bug.cgi?id=204898

Reviewed by Brady Eidson.

We use loggingString everywhere in IDB code but IDBDatabaseIdentifier, so rename it for consistency.

No behavior change.

* Modules/indexeddb/IDBDatabaseIdentifier.cpp:
(WebCore::IDBDatabaseIdentifier::loggingString const):
(WebCore::IDBDatabaseIdentifier::debugString const): Deleted.
* Modules/indexeddb/IDBDatabaseIdentifier.h:
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
(WebCore::IDBClient::IDBConnectionToServer::openDatabase):
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::deleteDatabase):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):

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

6 months agoWeb Inspector: REGRESSION(r242604): Console: unread indicator overlaps selection...
drousso@apple.com [Thu, 5 Dec 2019 22:55:48 +0000 (22:55 +0000)]
Web Inspector: REGRESSION(r242604): Console: unread indicator overlaps selection background of previous scope bar item
https://bugs.webkit.org/show_bug.cgi?id=204630

Reviewed by Timothy Hatcher.

When a new message is added that is immediately filtered, such as from an existing filter or
previously selected scope bar items, rather than show a blinking circle next to the level of
the new message in the scope bar (which doesn't cover the case where there's a filter and
was often hard to notice), add a dismissable warning banner explaning that the message had
been filtered with a button to clear all filters.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
(WI.LogContentView.prototype.didAppendConsoleMessageView):
(WI.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WI.LogContentView.prototype._logCleared):
(WI.LogContentView.prototype._messageSourceBarSelectionDidChange):
(WI.LogContentView.prototype._scopeBarSelectionDidChange):
(WI.LogContentView.prototype._filterMessageElements):
(WI.LogContentView.prototype._showHiddenMessagesBannerIfNeeded): Added.
(WI.LogContentView.prototype._markScopeBarItemUnread): Deleted.
(WI.LogContentView.prototype._markScopeBarItemForMessageLevelUnread): Deleted.
* UserInterface/Views/LogContentView.css:
(.content-view.log):
(.content-view.log > .hidden-messages-banner): Added.
(.content-view.log > .hidden-messages-banner > button): Added.
(.content-view.log > .hidden-messages-banner > .dismiss): Added.
(body[dir=ltr] .content-view.log > .hidden-messages-banner > .dismiss): Added.
(body[dir=rtl] .content-view.log > .hidden-messages-banner > .dismiss): Added.
(.console-messages):
(.log-scope-bar > li:not(.unread) > .indicator): Deleted.
(.log-scope-bar > li.unread > .indicator): Deleted.
(.log-scope-bar > li.unread:hover > .indicator): Deleted.
(.log-scope-bar > li.unread.evaluations > .indicator): Deleted.
(.log-scope-bar > li.unread.errors > .indicator): Deleted.
(.log-scope-bar > li.unread.warnings > .indicator): Deleted.
(.log-scope-bar > li.unread.logs > .indicator): Deleted.
(@keyframes unread-background-pulse): Deleted.

* UserInterface/Views/FindBanner.js:
(WI.FindBanner):
(WI.FindBanner.prototype.clearAndBlur): Added.
(WI.FindBanner.prototype._clearAndBlur): Deleted.
Expose a public way to clear the find banner.

* Localizations/en.lproj/localizedStrings.js:

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

6 months agoWeb Inspector: add WI.EngineeringSetting and WI.DebugSetting to avoid callsite checking
drousso@apple.com [Thu, 5 Dec 2019 22:48:49 +0000 (22:48 +0000)]
Web Inspector: add WI.EngineeringSetting and WI.DebugSetting to avoid callsite checking
https://bugs.webkit.org/show_bug.cgi?id=204785

Reviewed by Timothy Hatcher.

* UserInterface/Base/Setting.js:
(WI.Setting.prototype.get defaultValue): Added.
(WI.EngineeringSetting.prototype.get value): Added.
(WI.EngineeringSetting.prototype.set value): Added.
(WI.DebugSetting.prototype.get value): Added.
(WI.DebugSetting.prototype.set value): Added.
(WI.Setting.prototype.get valueRespectingDebugUIAvailability): Deleted.
Only get/set the `_value` if the `WI.isEngineeringBuild`/`WI.isDebugUIEnabled()`.

* UserInterface/Base/Main.js:
(WI.resolvedLayoutDirection):
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype._updateOwnerStyleText):
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.update):
* UserInterface/Proxies/HeapSnapshotEdgeProxy.js:
(WI.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol):
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.supportsEditingUserAgentShadowTrees):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.get knownNonResourceScripts):
(WI.DebuggerManager.prototype.debuggerDidPause):
(WI.DebuggerManager.prototype.scriptDidParse):
* UserInterface/Controllers/DiagnosticController.js:
(WI.DiagnosticController):
(WI.DiagnosticController.prototype._debugAutoLogDiagnosticEventsSettingDidChange):
(WI.DiagnosticController.prototype._updateRecorderStates):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._appendLocationLink):
* UserInterface/Views/HeapSnapshotDataGridTree.js:
(WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._addScriptsForTarget):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor):
* UserInterface/Views/StackTraceView.js:
(WI.StackTraceView):
* UserInterface/Views/View.js:
(WI.View.prototype._layoutSubtree):
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleUncaughtExceptionRecord):

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

6 months agoREGRESSION(r253140): Wasm::FunctionParser needs to bounds check in SetLocal/TeeLocal
tzagallo@apple.com [Thu, 5 Dec 2019 22:32:55 +0000 (22:32 +0000)]
REGRESSION(r253140): Wasm::FunctionParser needs to bounds check in SetLocal/TeeLocal
https://bugs.webkit.org/show_bug.cgi?id=204909

Reviewed by Keith Miller.

When moving the code from WasmValidate.cpp to WasmFunctionParser.h, I missed that SetLocal and
TeeLocal used to call Wasm::Validate::getLocal, which would perform the bounds check. I just
added back the checks to the parser before accessing the local's type from m_locals.

* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):

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

6 months ago[LFC][IFC] Introduce InlineSoftLineBreakItem
zalan@apple.com [Thu, 5 Dec 2019 21:22:48 +0000 (21:22 +0000)]
[LFC][IFC] Introduce InlineSoftLineBreakItem
https://bugs.webkit.org/show_bug.cgi?id=204905
<rdar://problem/57672472>

Reviewed by Antti Koivisto.

Preserved line breaks apparently require text-line inline boxes with position information.
This patch provides this position information by introducing InlineSoftLineBreakItem.
InlineSoftLineBreakItem is a non-text like subclass of InlineItem which is created when
the text content has a preserved line break.

<pre>text content
</pre>
-> [InlineTextItem(text)][InlineTextItem( )][InlineTextItem(content)][InlineSoftLineBreakItem]

* WebCore.xcodeproj/project.pbxproj:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
* layout/inlineformatting/InlineFormattingContextQuirks.cpp:
(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
* layout/inlineformatting/InlineItem.cpp:
* layout/inlineformatting/InlineItem.h:
(WebCore::Layout::InlineItem::isLineBreak const):
(WebCore::Layout::InlineItem::isSoftLineBreak const):
(WebCore::Layout::InlineItem::isHardLineBreak const):
(WebCore::Layout::InlineItem::isForcedLineBreak const): Deleted.
* layout/inlineformatting/InlineLineBreaker.cpp:
(WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
(WebCore::Layout::LineBreaker::Content::append):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::append):
(WebCore::Layout::LineBuilder::appendLineBreak):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
(WebCore::Layout::LineBuilder::runContentHeight const):
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):
* layout/inlineformatting/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::Run::isLineBreak const):
(WebCore::Layout::LineBuilder::InlineItemRun::isLineBreak const):
(WebCore::Layout::LineBuilder::Run::isForcedLineBreak const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isForcedLineBreak const): Deleted.
* layout/inlineformatting/InlineSoftLineBreakItem.h: Copied from Source/WebCore/layout/inlineformatting/InlineItem.cpp.
(WebCore::Layout::InlineSoftLineBreakItem::position const):
(WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem):
(WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem):
* layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::InlineTextItem::createSegmentBreakItem): Deleted.
* layout/inlineformatting/InlineTextItem.h:
(WebCore::Layout::InlineTextItem::isWhitespace const):
(WebCore::Layout::InlineTextItem::isCollapsible const):
(WebCore::Layout::InlineTextItem::isSegmentBreak const): Deleted.
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::LineLayoutContext::placeInlineItem):

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

6 months agoWeb Inspector: Console: copying an evaluation result shouldn't include the saved...
drousso@apple.com [Thu, 5 Dec 2019 21:18:59 +0000 (21:18 +0000)]
Web Inspector: Console: copying an evaluation result shouldn't include the saved variable index
https://bugs.webkit.org/show_bug.cgi?id=204906

Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.toClipboardString):

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

6 months ago[WebAssembly] Fix bad assertion in LLIntPlan
tzagallo@apple.com [Thu, 5 Dec 2019 21:05:45 +0000 (21:05 +0000)]
[WebAssembly] Fix bad assertion in LLIntPlan
https://bugs.webkit.org/show_bug.cgi?id=204893

Reviewed by Mark Lam.

Before landing r253140 I introduced an assertion in Wasm::LLIntPlan that the pointer to previously
compiled callees must be non-null. However, it's perfectly valid for the pointer to be null when the
module has no functions.

* wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::LLIntPlan):

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

6 months agoWeb Inspector: Elements: the Classes toggle is drawn on top of other content with...
drousso@apple.com [Thu, 5 Dec 2019 21:03:17 +0000 (21:03 +0000)]
Web Inspector: Elements: the Classes toggle is drawn on top of other content with no other way of scrolling to it
https://bugs.webkit.org/show_bug.cgi?id=204690

Reviewed by Timothy Hatcher.

Use a vertical flexbox for the contents of sidebar panels instead of absolute positioning so
that the variable height Classes "drawer" can have it's own scroll area and doesn't take up
any space from the rest of the panel's contents.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content):
(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
(.sidebar > .panel.details.css-style > .content ~ .options-container):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
(.sidebar > .panel.details.css-style > .content.has-filter-bar): Deleted.

* UserInterface/Views/Sidebar.css:
(.sidebar > .panel):
(.sidebar > .panel.selected): Deleted.

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

6 months agoWeb Inspector: Avoid using Runtime.executionContextCreated to figure out the iframe...
yurys@chromium.org [Thu, 5 Dec 2019 20:35:24 +0000 (20:35 +0000)]
Web Inspector: Avoid using Runtime.executionContextCreated to figure out the iframe's contentDocument node.
https://bugs.webkit.org/show_bug.cgi?id=122764
<rdar://problem/15222136>

Reviewed by Devin Rousso.

Source/WebCore:

Force execution context creation on frame navigation similar to what inspector already
does for all known contexts when Runtime.enable is called. This is a prerequisite for
the injected script to work.

Test: inspector/runtime/execution-context-in-scriptless-page.html

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/agents/page/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::frameNavigated):
* inspector/agents/page/PageRuntimeAgent.h:

LayoutTests:

Test that execution context is created and reported for pages without JavaScript.

* inspector/runtime/execution-context-in-scriptless-page-expected.txt: Added.
* inspector/runtime/execution-context-in-scriptless-page.html: Added.

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

6 months agoWeb Inspector: Search: there should be some default content when there is no search...
drousso@apple.com [Thu, 5 Dec 2019 20:33:09 +0000 (20:33 +0000)]
Web Inspector: Search: there should be some default content when there is no search string
https://bugs.webkit.org/show_bug.cgi?id=204631

Reviewed by Timothy Hatcher.

It's very odd to switch to the Search Tab and find it completely empty, especially if you've
never used it before.

Add basic "No Search String" and "No Search Results" text with a clickable help navigation
item that reveals and focuses the sidebar search input.

* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.showDefaultContentView): Added.
(WI.SearchSidebarPanel.prototype.performSearch):
(WI.SearchSidebarPanel.prototype._handleDefaultContentViewSearchNavigationItemClicked): Added.

* Localizations/en.lproj/localizedStrings.js:

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

6 months agocomputeIfUsingFuzzerAgent() is called before parsing command line arguments.
mark.lam@apple.com [Thu, 5 Dec 2019 20:23:32 +0000 (20:23 +0000)]
computeIfUsingFuzzerAgent() is called before parsing command line arguments.
https://bugs.webkit.org/show_bug.cgi?id=204886

Reviewed by Saam Barati.

Rolling out r253015 which introduced computeIfUsingFuzzerAgent().

* runtime/Options.cpp:
(JSC::Options::initialize):
(JSC::computeIfUsingFuzzerAgent): Deleted.
* runtime/Options.h:
(JSC::Options::isUsingFuzzerAgent): Deleted.
* runtime/OptionsList.h:
(JSC::OptionRange::operator bool const): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):

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

6 months agoMESSAGE_CHECK BackForwardItemIdentifier on incoming IPC from the WebProcess
cdumez@apple.com [Thu, 5 Dec 2019 20:20:48 +0000 (20:20 +0000)]
MESSAGE_CHECK BackForwardItemIdentifier on incoming IPC from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=204899

Reviewed by Ryosuke Niwa.

Source/WebCore:

* Sources.txt:
* history/BackForwardItemIdentifier.cpp: Added.
(WebCore::BackForwardItemIdentifier::isValid const):
* history/BackForwardItemIdentifier.h:
(WebCore::operator!=):

Source/WebKit:

MESSAGE_CHECK BackForwardItemIdentifier on incoming IPC from the WebProcess. This is important since we use this identifier
to look up the WebBackForwardListItem in a HashMap, and looking up a bad ID could corrupt said HashMap.

* Shared/WebBackForwardListItem.cpp:
Make sure the WebBackForwardListItem is always constructed and destroyed on the main thread, to avoid corrupting
the allItems() HashMap.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::updateBackForwardItem):

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

6 months agoWeb Inspector: move the "Add Breakpoint" context menu to be next to the blackboxing...
drousso@apple.com [Thu, 5 Dec 2019 20:18:42 +0000 (20:18 +0000)]
Web Inspector: move the "Add Breakpoint" context menu to be next to the blackboxing context menu item
https://bugs.webkit.org/show_bug.cgi?id=204833

Reviewed by Timothy Hatcher.

Both items are related to JavaScript debugging, so they should be closer together.

* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):

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

6 months agoWeb Inspector: Support search on IndexedDB stores and indexes
drousso@apple.com [Thu, 5 Dec 2019 20:16:45 +0000 (20:16 +0000)]
Web Inspector: Support search on IndexedDB stores and indexes
https://bugs.webkit.org/show_bug.cgi?id=129208
<rdar://problem/16142046>

Reviewed by Timothy Hatcher.

Add filter bars to the navigation bars for `IndexedDB`, `LocalStorage`, and `SessionStorage`.

* UserInterface/Views/StorageTabContentView.js:
(WI.StorageTabContentView.prototype.get canHandleFindEvent): Added.
(WI.StorageTabContentView.prototype.handleFindEvent): Added.

* UserInterface/Views/DOMStorageContentView.js:
(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype.get navigationItems): Added.
(WI.DOMStorageContentView.prototype.get canFocusFilterBar): Added.
(WI.DOMStorageContentView.prototype.focusFilterBar): Added.
(WI.DOMStorageContentView.prototype._handleFilterBarFilterDidChange): Added.

* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WI.IndexedDatabaseObjectStoreContentView):
(WI.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
(WI.IndexedDatabaseObjectStoreContentView.prototype.get canFocusFilterBar): Added.
(WI.IndexedDatabaseObjectStoreContentView.prototype.focusFilterBar): Added.
(WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added.
(WI.IndexedDatabaseObjectStoreContentView.prototype._handleFilterBarFilterDidChange): Added.
Check against the `textContent` of each cell for a given `WI.DataGridNode` to see if it
matches the filter text as all of the pieces of data are `WI.RemoteObject`s.

* UserInterface/Views/FilterBar.css:
(.filter-bar):
* UserInterface/Views/NetworkTableContentView.css:
(.content-view.network .navigation-bar .filter-bar): Deleted.
Remove the `background-color` to let it match the background content.

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

6 months agoWeb Inspector: Network: pressing ⌘F when no network item is selected should focus...
drousso@apple.com [Thu, 5 Dec 2019 19:55:03 +0000 (19:55 +0000)]
Web Inspector: Network: pressing ⌘F when no network item is selected should focus the filter bar
https://bugs.webkit.org/show_bug.cgi?id=204862

Reviewed by Timothy Hatcher.

* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView.prototype.get canHandleFindEvent): Added.
(WI.NetworkTabContentView.prototype.handleFindEvent): Added.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype.get canFocusFilterBar): Added.
(WI.NetworkTableContentView.prototype.focusFilterBar): Added.

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

6 months agoWeb Inspector: Quick Console: pressing ⌘F shows a second find banner
drousso@apple.com [Thu, 5 Dec 2019 19:53:17 +0000 (19:53 +0000)]
Web Inspector: Quick Console: pressing ⌘F shows a second find banner
https://bugs.webkit.org/show_bug.cgi?id=204861

Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.get supportsCustomFindBanner):

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

6 months agoAdd CSS parser support for the highlight pseudoelement
simon.fraser@apple.com [Thu, 5 Dec 2019 19:26:32 +0000 (19:26 +0000)]
Add CSS parser support for the highlight pseudoelement
https://bugs.webkit.org/show_bug.cgi?id=204902

Reviewed by Antti Koivisto.

Add basic CSS parsing support for ::highlight(), per
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md

* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::parsePseudoElementType):
* css/CSSSelector.h:
* css/SelectorPseudoElementTypeMap.in:
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumePseudo):
* rendering/style/RenderStyleConstants.h:

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

6 months agoMinor RemoteLayerTree logging cleanup
simon.fraser@apple.com [Thu, 5 Dec 2019 19:26:29 +0000 (19:26 +0000)]
Minor RemoteLayerTree logging cleanup
https://bugs.webkit.org/show_bug.cgi?id=204865

Reviewed by Tim Horton.

Have the ::description() methods return Strings like everything else does.
Use LOG_WITH_STREAM() so we don't call description() unless the log channel is on.

* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::dump const):
(WebKit::RemoteLayerTreeTransaction::description const):
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::description const):
(WebKit::RemoteScrollingCoordinatorTransaction::dump const):
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

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

6 months agoFix a Typo in IndexedDBInPageCache.html
sihui_liu@apple.com [Thu, 5 Dec 2019 18:56:26 +0000 (18:56 +0000)]
Fix a Typo in IndexedDBInPageCache.html
https://bugs.webkit.org/show_bug.cgi?id=204897

Reviewed by Chris Dumez.

* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBInPageCache.html:

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

6 months ago[MSVC] WebResourceLoadStatisticsStore.h is reporting warning C4804: '/': unsafe use...
katherine_cheney@apple.com [Thu, 5 Dec 2019 18:29:15 +0000 (18:29 +0000)]
[MSVC] WebResourceLoadStatisticsStore.h is reporting warning C4804: '/': unsafe use of type 'bool' in operation
https://bugs.webkit.org/show_bug.cgi?id=204870

Reviewed by Darin Adler.

This patch converts storageAccessGranted to a char since makeString()
does not explicitly accept bool types.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
(WebKit::ThirdPartyDataForSpecificFirstParty::toString const):

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

6 months ago[LFC][IFC] Trim trailing letter-spacing at inline container boundary
zalan@apple.com [Thu, 5 Dec 2019 18:10:02 +0000 (18:10 +0000)]
[LFC][IFC] Trim trailing letter-spacing at inline container boundary
https://bugs.webkit.org/show_bug.cgi?id=204895
<rdar://problem/57666898>

Reviewed by Antti Koivisto.

According to https://www.w3.org/TR/css-text-3/#letter-spacing-property, "An inline box only
includes letter spacing between characters completely contained within that element".
This patch enables this behavior by trimming the trailing letter spacing at [container end].

<div>1<span style="letter-spacing: 100px;">2</span>3</div> ->
[1][container start][2][container end][3]
vs.
[1][container start][2<-----100px----->][container end][3]

* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendInlineContainerEnd):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):
(WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
* layout/inlineformatting/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunPartiallyTrimmable const):

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

6 months agomaplike should define a set method
youenn@apple.com [Thu, 5 Dec 2019 17:44:06 +0000 (17:44 +0000)]
maplike should define a set method
https://bugs.webkit.org/show_bug.cgi?id=204877

Reviewed by Chris Dumez.

Source/WebCore:

maplike implementation was defining an add method instead of a set method.
Update implementation to define and use a set method.
Add an InternalsMapLike to allow testing.

Test: js/dom/maplike.html

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/highlight/HighlightMap.cpp:
(WebCore::HighlightMap::addFromMapLike):
* Modules/highlight/HighlightMap.h:
* Modules/highlight/HighlightMap.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMMapLike.h:
(WebCore::DOMMapLike::set):
(WebCore::forwardSetToMapLike):
* bindings/scripts/IDLParser.pm:
(parseMapLikeProperties):
* bindings/scripts/test/JS/JSMapLike.cpp:
(WebCore::jsMapLikePrototypeFunctionSetBody):
(WebCore::jsMapLikePrototypeFunctionSet):
(WebCore::jsMapLikePrototypeFunctionAddBody): Deleted.
(WebCore::jsMapLikePrototypeFunctionAdd): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::createInternalsMapLike):
* testing/Internals.h:
* testing/Internals.idl:
* testing/InternalsMapLike.cpp: Added.
* testing/InternalsMapLike.h: Added.
* testing/InternalsMapLike.idl: Added.

LayoutTests:

* highlight/highlight-interfaces-expected.txt:
* highlight/highlight-interfaces.html:
* js/dom/maplike-expected.txt: Added.
* js/dom/maplike.html: Added.

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

6 months ago[LFC][Integration] Disable LFC when floats are present for now
antti@apple.com [Thu, 5 Dec 2019 17:26:51 +0000 (17:26 +0000)]
[LFC][Integration] Disable LFC when floats are present for now
https://bugs.webkit.org/show_bug.cgi?id=204892

Reviewed by Zalan Bujtas.

Diasable until we start synthesizing the required structures.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::canUseFor):

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

6 months ago[LFC][IFC] Many render tree dump tests show 1px too narrow runs
antti@apple.com [Thu, 5 Dec 2019 17:11:19 +0000 (17:11 +0000)]
[LFC][IFC] Many render tree dump tests show 1px too narrow runs
https://bugs.webkit.org/show_bug.cgi?id=204885

Reviewed by Zalan Bujtas.

Width measurement is currently clamping the measured (float) text widths to layout units. Use rounding instead.

This doesn't solve the fundamental problem of loss of precision but it allows many more render tree dump
based layout tests to pass.

* layout/inlineformatting/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::fixedPitchWidth):

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

6 months ago[GLib] Display GStreamer version in about:gpu page
philn@webkit.org [Thu, 5 Dec 2019 15:33:54 +0000 (15:33 +0000)]
[GLib] Display GStreamer version in about:gpu page

Rubber-stamped by Carlos Garcia Campos.

* UIProcess/API/glib/WebKitProtocolHandler.cpp:
(WebKit::WebKitProtocolHandler::handleGPU):

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

6 months agoinspector/page/overrideSetting-MockCaptureDevicesEnabled.html is failing after remova...
youenn@apple.com [Thu, 5 Dec 2019 15:24:13 +0000 (15:24 +0000)]
inspector/page/overrideSetting-MockCaptureDevicesEnabled.html is failing after removal of internals.setMockMediaCaptureDevicesEnabled API
https://bugs.webkit.org/show_bug.cgi?id=204849

Reviewed by Eric Carlson.

Source/WebCore:

Add API and internals to check which center is used in WebProcess.
Covered by updated test.

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::mockRealtimeMediaSourceCenterEnabled):
* platform/mock/MockRealtimeMediaSourceCenter.h:
* testing/Internals.cpp:
(WebCore::Internals::isMockRealtimeMediaSourceCenterEnabled):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Synchronize the center with the preferences when the value might be updated.
Add API to check which center is used in UIProcess.

* UIProcess/API/C/WKPage.cpp:
(WKPageIsMockRealtimeMediaSourceCenterEnabled):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaPermissionRequestManagerProxy::setMockCaptureDevicesEnabledOverride):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
(WebKit::UserMediaPermissionRequestManagerProxy::setMockCaptureDevicesEnabledOverride): Deleted.

Tools:

Add test runner API to check which center (mock or not) is used in UIProcess side.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::isMockRealtimeMediaSourceCenterEnabled const):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Update test to use center state getters.

* inspector/page/overrideSetting-MockCaptureDevicesEnabled-expected.txt:
* inspector/page/overrideSetting-MockCaptureDevicesEnabled.html:

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

6 months agoWPT test MediaStream-MediaElement-srcObject.https.html times out
eric.carlson@apple.com [Thu, 5 Dec 2019 14:27:30 +0000 (14:27 +0000)]
WPT test MediaStream-MediaElement-srcObject.https.html times out
https://bugs.webkit.org/show_bug.cgi?id=204762
<rdar://problem/57567671>

Reviewed by youenn fablet.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-firstframe.https-expected.txt:
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt:
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html:

Source/WebCore:

No new tests, these changes fix existing tests.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad): Check hasMediaStreamSrcObject() instead of
m_mediaStreamSrcObject so we behave correctly when a MediaStream is cleared by setting srcObject to null.
(WebCore::HTMLMediaElement::loadResource): Ditto.
(WebCore::HTMLMediaElement::seekWithTolerance): Return early if seeking isn't allowed.
(WebCore::HTMLMediaElement::defaultPlaybackRate const): Check hasMediaStreamSrcObject() instead
of m_mediaStreamSrcObject.
(WebCore::HTMLMediaElement::setDefaultPlaybackRate): Ditto.
(WebCore::HTMLMediaElement::playbackRate const): Ditto.
(WebCore::HTMLMediaElement::setPlaybackRate): Ditto.
(WebCore::HTMLMediaElement::ended const): Ditto.
(WebCore::HTMLMediaElement::preload const): Ditto.
(WebCore::HTMLMediaElement::setPreload): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't send an 'ended' event for a MediaStream.
(WebCore::HTMLMediaElement::clearMediaPlayer): Don't check m_settingMediaStreamSrcObject, it
is never set.
* html/HTMLMediaElement.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Add m_lastReportedTime.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::durationMediaTime const): Return last reported
time after the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime const): Ditto. Set m_lastReportedTime.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Don't return HaveNothing
for an inactive stream. Return HaveMetadata for an stream that has either ended or is waiting
for the first video frame.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Send duration changed when
a stream ends.

LayoutTests:

* TestExpectations: Mark imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html
as expected to fail because the failure message logs media times as floats, so the values
logged are always different.

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

6 months ago[LFC][IFC] Move trailing trimming logic to LineBuilder::TrimmableContent
zalan@apple.com [Thu, 5 Dec 2019 14:11:05 +0000 (14:11 +0000)]
[LFC][IFC] Move trailing trimming logic to LineBuilder::TrimmableContent
https://bugs.webkit.org/show_bug.cgi?id=204872
<rdar://problem/57652365>

Reviewed by Antti Koivisto.

Source/WebCore:

Move trimming logic from LineBuilder::removeTrailingTrimmableContent to inside TrimmableContent.
This is also in preparation for adding partial trimming at inline container boundary.

* layout/inlineformatting/InlineLineBreaker.cpp:
(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
* layout/inlineformatting/InlineLineBreaker.h:
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
(WebCore::Layout::LineBuilder::TrimmableContent::TrimmableContent):
(WebCore::Layout::LineBuilder::TrimmableContent::append):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):
* layout/inlineformatting/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableContent::reset):
(WebCore::Layout::LineBuilder::isTrailingContentFullyTrimmable const): Deleted.
(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingContentFullyTrimmable const): Deleted.
(WebCore::Layout::LineBuilder::TrimmableContent::clear): Deleted.
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::processUncommittedContent):

Tools:

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

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

6 months agogetStats() promise never rejects nor resolves when peer connection state is closed.
youenn@apple.com [Thu, 5 Dec 2019 12:56:19 +0000 (12:56 +0000)]
getStats() promise never rejects nor resolves when peer connection state is closed.
https://bugs.webkit.org/show_bug.cgi?id=204842
<rdar://problem/57617107>

Reviewed by Eric Carlson.

Source/WebCore:

Instead of closing and nulling the backend when closing the peer connection,
we only close it. This allows calling getStats to retrieve the last gathered stats from the backend.
Covered by updated test.

* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::stop):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::close):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::close):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

* webrtc/video-stats-expected.txt:
* webrtc/video-stats.html:

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

6 months agoUnreviewed. Remove build warnings below since r253025.
jh718.park@samsung.com [Thu, 5 Dec 2019 07:17:34 +0000 (07:17 +0000)]
Unreviewed. Remove build warnings below since r253025.
warning: unused variable ‘iter’ [-Wunused-variable]
warning: unused variable ‘isNewEntry’ [-Wunused-variable]

No new tests, no new behavioral changes.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-12-04

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::addSessionStorageQuotaManager):
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::SessionStorageQuotaManager::ensureOriginStorageQuotaManager):

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

6 months ago[JSC] AI should convert IsCellWithType to constant when Structure set is finite
ysuzuki@apple.com [Thu, 5 Dec 2019 06:26:06 +0000 (06:26 +0000)]
[JSC] AI should convert IsCellWithType to constant when Structure set is finite
https://bugs.webkit.org/show_bug.cgi?id=204141

Reviewed by Mark Lam.

JSTests:

* stress/generator-cell-with-type.js: Added.
(shouldBe):
(shouldThrow):
(test):
(i.shouldThrow):
* stress/is-cell-with-type-should-check-non-cell-cases.js: Added.
(getter):
(foo):

Source/JavaScriptCore:

We should fold IsCellWithType if Structure set is finite since we have a chance to know what JSType is.
The difference from the last patch is that we have `if (!(child.m_type & ~SpecCell))` check. Even if
structures meet the requirement, this structures do not guarantee that non cell types never come. We
should ensure it by using proven type.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

6 months ago[JSC] Put TypedArrays in IsoSubspace
ysuzuki@apple.com [Thu, 5 Dec 2019 06:19:20 +0000 (06:19 +0000)]
[JSC] Put TypedArrays in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204867

Reviewed by Mark Lam.

This patch puts TypedArrays in IsoSubspace.

    - JSArrayBuffer
    - JSDataView
    - JSInt8Array
    - JSInt16Array
    - JSInt32Array
    - JSUint8Array
    - JSUint8ClampedArray
    - JSUint16Array
    - JSUint32Array
    - JSFloat32Array
    - JSFloat64Array

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.h:
(JSC::JSArrayBufferView::subspaceFor):
* runtime/JSDataView.h:
* runtime/JSGenericTypedArrayView.h:
* runtime/JSTypedArrays.h:
* runtime/TypedArrayAdaptors.h:
* runtime/VM.cpp:
* runtime/VM.h:

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

6 months agorun-javascriptcore-tests is failing to run testmasm of 64bit AppleWin on Buildbot
Hironori.Fujii@sony.com [Thu, 5 Dec 2019 05:02:51 +0000 (05:02 +0000)]
run-javascriptcore-tests is failing to run testmasm of 64bit AppleWin on Buildbot
https://bugs.webkit.org/show_bug.cgi?id=204869

Reviewed by Per Arne Vollan.

testmasm is compiled only when DEVELOPER_MODE.
Enable DEVELOPER_MODE for all 64bit Windows builds.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Replaced "isFTW() || isWinCairo()" with isWin64()
in the condition of enabling DEVELOPER_MODE.

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

6 months agoRemove DocumentEventQueue and WorkerEventQueue
rniwa@webkit.org [Thu, 5 Dec 2019 04:51:02 +0000 (04:51 +0000)]
Remove DocumentEventQueue and WorkerEventQueue
https://bugs.webkit.org/show_bug.cgi?id=204841

Reviewed by Sam Weinig.

Delete DocumentEventQueue and WorkerEventQueue since we don't use them after r252824.

* Headers.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.h:
* dom/DocumentEventQueue.cpp: Removed.
* dom/DocumentEventQueue.h: Removed.
* page/VisualViewport.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderListBox.cpp:
* workers/WorkerEventQueue.cpp: Removed.
* workers/WorkerEventQueue.h: Removed.
* worklets/WorkletGlobalScope.h:

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

6 months ago[WebAssembly] Validate and generate bytecode in one pass
tzagallo@apple.com [Thu, 5 Dec 2019 04:41:51 +0000 (04:41 +0000)]
[WebAssembly] Validate and generate bytecode in one pass
https://bugs.webkit.org/show_bug.cgi?id=204474

Reviewed by Saam Barati.

Currently, we traverse the WebAssembly code twice:
- a first serial pass that validates all functions
- a second concurrent pass that compiles all functions.
In this patch, we move the validation into the parser and update the LLIntPlan so that we no longer have
the first pass. Instead, we now validate concurrently at the same time we generate bytecode.

As a result, when we call WebAssembly.validate, we'll still generate bytecode for the module, but it will
be thrown away. If the module is constructed with new WebAssembly.Module, we'll also eagerly generate
bytecode, but in this case the bytecode is kept and shared across all instantiations of this module.

This is a 1.5x speedup when compiling the ZenGarden demo.

* DerivedSources.make:
* wasm/WasmAirIRGenerator.cpp:
(JSC::Wasm::AirIRGenerator::ControlData::ControlData):
(JSC::Wasm::AirIRGenerator::ControlData::isIf):
(JSC::Wasm::AirIRGenerator::ControlData::isTopLevel):
(JSC::Wasm::AirIRGenerator::ControlData::branchTargetArity const):
(JSC::Wasm::AirIRGenerator::ControlData::branchTargetType const):
(JSC::Wasm::AirIRGenerator::emptyExpression):
(JSC::Wasm::AirIRGenerator::emitCallPatchpoint):
(JSC::Wasm::AirIRGenerator::tmpsForSignature):
(JSC::Wasm::AirIRGenerator::emitPatchpoint):
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addRefIsNull):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addLoop):
(JSC::Wasm::AirIRGenerator::addBlock):
(JSC::Wasm::AirIRGenerator::addIf):
(JSC::Wasm::AirIRGenerator::addReturn):
(JSC::Wasm::AirIRGenerator::addEndToUnreachable):
(JSC::Wasm::AirIRGenerator::addCall):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::AirIRGenerator::unify):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::AirIRGenerator::dump):
(JSC::Wasm::parseAndCompileAir):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF32>):
* wasm/WasmAirIRGenerator.h:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::isIf):
(JSC::Wasm::B3IRGenerator::ControlData::isTopLevel):
(JSC::Wasm::B3IRGenerator::ControlData::signature const):
(JSC::Wasm::B3IRGenerator::ControlData::hasNonVoidresult const):
(JSC::Wasm::B3IRGenerator::ControlData::branchTargetArity const):
(JSC::Wasm::B3IRGenerator::ControlData::branchTargetType const):
(JSC::Wasm::B3IRGenerator::emptyExpression):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addRefIsNull):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::B3IRGenerator::addIf):
(JSC::Wasm::B3IRGenerator::addReturn):
(JSC::Wasm::B3IRGenerator::endBlock):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::B3IRGenerator::dump):
(JSC::Wasm::parseAndCompile):
* wasm/WasmB3IRGenerator.h:
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::initializeCallees):
(JSC::Wasm::BBQPlan::didReceiveFunctionData):
* wasm/WasmBBQPlan.h:
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):
* wasm/WasmCodeBlock.h:
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
* wasm/WasmEntryPlan.cpp:
(JSC::Wasm::EntryPlan::EntryPlan):
(JSC::Wasm::EntryPlan::parseAndValidateModule):
(JSC::Wasm::EntryPlan::prepare):
(JSC::Wasm::EntryPlan::compileFunctions):
(JSC::Wasm::EntryPlan::complete):
* wasm/WasmEntryPlan.h:
* wasm/WasmFunctionParser.h:
(JSC::Wasm::splitStack):
(JSC::Wasm::FunctionParser::TypedExpression::TypedExpression):
(JSC::Wasm::FunctionParser::TypedExpression::type const):
(JSC::Wasm::FunctionParser::TypedExpression::value const):
(JSC::Wasm::FunctionParser::TypedExpression::operator ExpressionType const):
(JSC::Wasm::FunctionParser::TypedExpression::operator-> const):
(JSC::Wasm::FunctionParser::controlStack):
(JSC::Wasm::FunctionParser::validationFail const):
(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::binaryCase):
(JSC::Wasm::FunctionParser<Context>::unaryCase):
(JSC::Wasm::FunctionParser<Context>::load):
(JSC::Wasm::FunctionParser<Context>::store):
(JSC::Wasm::FunctionParser<Context>::checkBranchTarget):
(JSC::Wasm::FunctionParser<Context>::unify):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::ControlType::topLevel):
(JSC::Wasm::LLIntGenerator::ControlType::loop):
(JSC::Wasm::LLIntGenerator::ControlType::isIf):
(JSC::Wasm::LLIntGenerator::ControlType::isTopLevel):
(JSC::Wasm::LLIntGenerator::ControlType::stackSize const):
(JSC::Wasm::LLIntGenerator::ControlType::signature const):
(JSC::Wasm::LLIntGenerator::ControlType::branchTargetArity const):
(JSC::Wasm::LLIntGenerator::ControlType::branchTargetType const):
(JSC::Wasm::LLIntGenerator::emptyExpression):
(JSC::Wasm::LLIntGenerator::dump):
(JSC::Wasm::LLIntGenerator::getDropKeepCount):
(JSC::Wasm::LLIntGenerator::materializeConstantsAndLocals):
(JSC::Wasm::LLIntGenerator::splitStack):
(JSC::Wasm::parseAndCompileBytecode):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::addLocal):
(JSC::Wasm::LLIntGenerator::setLocal):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addBlock):
(JSC::Wasm::LLIntGenerator::addIf):
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):
(JSC::Wasm::LLIntGenerator::addCall):
(JSC::Wasm::LLIntGenerator::addCallIndirect):
* wasm/WasmLLIntGenerator.h:
* wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::LLIntPlan):
(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
(JSC::Wasm::LLIntPlan::work):
(JSC::Wasm::LLIntPlan::didReceiveFunctionData):
* wasm/WasmLLIntPlan.h:
* wasm/WasmModule.cpp:
(JSC::Wasm::Module::Module):
(JSC::Wasm::makeValidationResult):
(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::compileAsync):
* wasm/WasmModule.h:
(JSC::Wasm::Module::create):
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::Plan):
* wasm/WasmPlan.h:
(JSC::Wasm::Plan::dontFinalize):
* wasm/WasmSlowPaths.cpp:
(JSC::LLInt::slow_path_wasm_throw_exception):
* wasm/WasmThunks.cpp:
(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
* wasm/WasmThunks.h:
* wasm/WasmValidate.cpp:
(JSC::Wasm::Validate::ControlData::isIf):
(JSC::Wasm::Validate::ControlData::isTopLevel):
(JSC::Wasm::Validate::ControlData::blockType const):
(JSC::Wasm::Validate::ControlData::signature const):
(JSC::Wasm::Validate::ControlData::branchTargetArity const):
(JSC::Wasm::Validate::ControlData::branchTargetType const):
(JSC::Wasm::Validate::emptyExpression):
(JSC::Wasm::Validate::addConstant):
(JSC::Wasm::Validate::Validate):
(JSC::Wasm::Validate::addArguments):
(JSC::Wasm::Validate::addTableGet):
(JSC::Wasm::Validate::addTableSet):
(JSC::Wasm::Validate::addTableSize):
(JSC::Wasm::Validate::addTableGrow):
(JSC::Wasm::Validate::addTableFill):
(JSC::Wasm::Validate::addRefIsNull):
(JSC::Wasm::Validate::addRefFunc):
(JSC::Wasm::Validate::addLocal):
(JSC::Wasm::Validate::getLocal):
(JSC::Wasm::Validate::setLocal):
(JSC::Wasm::Validate::getGlobal):
(JSC::Wasm::Validate::setGlobal):
(JSC::Wasm::Validate::addBlock):
(JSC::Wasm::Validate::addLoop):
(JSC::Wasm::Validate::addSelect):
(JSC::Wasm::Validate::addIf):
(JSC::Wasm::Validate::addElse):
(JSC::Wasm::Validate::addElseToUnreachable):
(JSC::Wasm::Validate::addReturn):
(JSC::Wasm::Validate::addBranch):
(JSC::Wasm::Validate::addSwitch):
(JSC::Wasm::Validate::addGrowMemory):
(JSC::Wasm::Validate::addCurrentMemory):
(JSC::Wasm::Validate::endBlock):
(JSC::Wasm::Validate::addEndToUnreachable):
(JSC::Wasm::Validate::addCall):
(JSC::Wasm::Validate::addCallIndirect):
(JSC::Wasm::Validate::load):
(JSC::Wasm::Validate::store):
(JSC::Wasm::Validate::addOp):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::Validate::dump):
(JSC::Wasm::validateFunction):
* wasm/WasmWorklist.cpp:
(JSC::Wasm::Worklist::enqueue):
* wasm/generateWasmOpsHeader.py:
(cppType):
(cppMacro):
(opcodeMacroizer):
(opcodeWithTypesMacroizer):
(opcodeWithTypesMacroizer.modifier):
(memoryLoadMacroizer):
(memoryLoadMacroizer.modifier):
(memoryStoreMacroizer):
(memoryStoreMacroizer.modifier):
* wasm/generateWasmValidateInlinesHeader.py: Removed.
* wasm/js/JSWebAssembly.cpp:
(JSC::instantiate):
(JSC::webAssemblyValidateFunc):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):

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

6 months agoNullptr crash in RenderLayoutState::pageLogicalHeight const via RenderGrid::computeIn...
commit-queue@webkit.org [Thu, 5 Dec 2019 04:29:03 +0000 (04:29 +0000)]
Nullptr crash in RenderLayoutState::pageLogicalHeight const via RenderGrid::computeIntrinsicLogicalWidths inside RenderMarquee::updateMarqueePosition
https://bugs.webkit.org/show_bug.cgi?id=204527

Patch by Jack Lee <shihchieh_lee@apple.com> on 2019-12-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/table/crash-empty-layoutStateStack.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):

LayoutTests:

* fast/table/crash-empty-layoutStateStack-expected.txt: Added.
* fast/table/crash-empty-layoutStateStack.html: Added.

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

6 months agoIPC messages may get processed out of order in some cases
cdumez@apple.com [Thu, 5 Dec 2019 04:13:18 +0000 (04:13 +0000)]
IPC messages may get processed out of order in some cases
https://bugs.webkit.org/show_bug.cgi?id=204864

Reviewed by Ryosuke Niwa.

IPC messages may get processed out of order in some cases. Connection::SyncMessageState::dispatchMessages()
puts messages it did not process back at the end of the queue, instead of the beginning. This means that
messages added to the queue while Connection::SyncMessageState::dispatchMessages() was running will
incorrectly run *before* the ones dispatchMessages() did not process.

* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::dispatchMessages):

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

6 months agoFix missing exception check in ArrayPrototype's fastJoin().
mark.lam@apple.com [Thu, 5 Dec 2019 03:20:16 +0000 (03:20 +0000)]
Fix missing exception check in ArrayPrototype's fastJoin().
https://bugs.webkit.org/show_bug.cgi?id=204868
<rdar://problem/57516684>

Reviewed by Saam Barati.

JSTests:

* stress/missing-exception-check-in-array-prototype-fastJoin.js: Added.

Source/JavaScriptCore:

* runtime/ArrayPrototype.cpp:
(JSC::fastJoin):

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

6 months agoFix a broken assertion in GetByStatus::computeForStubInfoWithoutExitSiteFeedback().
mark.lam@apple.com [Thu, 5 Dec 2019 01:37:01 +0000 (01:37 +0000)]
Fix a broken assertion in GetByStatus::computeForStubInfoWithoutExitSiteFeedback().
https://bugs.webkit.org/show_bug.cgi?id=204866

Reviewed by Saam Barati.

The assertion wrong assumes that access.offset() cannot be invalid unless the
access.type() is a Miss.  However, if the AccessCase is a Custom value or accessor,
the offset is always invalid.  This patch fixes this assertion.

* bytecode/AccessCase.h:
(JSC::AccessCase::isCustom const):
* bytecode/GetByStatus.cpp:
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

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

6 months agoPageConfiguration::progressTrackerClient should use a smart pointer
cdumez@apple.com [Thu, 5 Dec 2019 01:24:22 +0000 (01:24 +0000)]
PageConfiguration::progressTrackerClient should use a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=204854

Reviewed by Alex Christensen.

Source/WebCore:

* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::~ProgressTracker): Deleted.
* loader/ProgressTracker.h:
(WebCore::ProgressTracker::client):
* loader/ProgressTrackerClient.h:
(WebCore::ProgressTrackerClient::progressTrackerDestroyed): Deleted.
* page/Page.cpp:
(WebCore::Page::Page):
* page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* page/PageConfiguration.h:

Source/WebKit:

* WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
(WebKit::WebProgressTrackerClient::progressTrackerDestroyed): Deleted.
* WebProcess/WebCoreSupport/WebProgressTrackerClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_overriddenMediaType):

Source/WebKitLegacy:

* PlatformWin.cmake:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebProgressTrackerClient.h:
* WebCoreSupport/WebProgressTrackerClient.mm:
(WebProgressTrackerClient::progressTrackerDestroyed): Deleted.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::progressStarted): Deleted.
(WebFrameLoaderClient::progressEstimateChanged): Deleted.
(WebFrameLoaderClient::progressFinished): Deleted.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebProgressTrackerClient.cpp: Added.
(WebProgressTrackerClient::progressStarted):
(WebProgressTrackerClient::progressEstimateChanged):
(WebProgressTrackerClient::progressFinished):
* WebCoreSupport/WebProgressTrackerClient.h: Added.
* WebView.cpp:
(WebView::initWithFrame):

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

6 months agoresults.webkit.org: Decrease ttl for archives
jbedard@apple.com [Thu, 5 Dec 2019 01:19:34 +0000 (01:19 +0000)]
results.webkit.org: Decrease ttl for archives
https://bugs.webkit.org/show_bug.cgi?id=204806
<rdar://problem/57527644>

Unreviewed infrastructure fix.

* resultsdbpy/resultsdbpy/controller/archive_controller_unittest.py:
(ArchiveControllerUnittest.setup_webserver): Disable time-to-live.
* resultsdbpy/resultsdbpy/model/mock_model_factory.py:
(MockModelFactory.create): Ensure time-to-live is longer than the oldest commit.

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

6 months agoMake MediaPlayer::client() private
eric.carlson@apple.com [Thu, 5 Dec 2019 00:48:42 +0000 (00:48 +0000)]
Make MediaPlayer::client() private
https://bugs.webkit.org/show_bug.cgi?id=204856
<rdar://problem/57633186>

Reviewed by Jer Noble.

Make MediaPlayer::client private and create accessors for all of the client methods
that were being accessed directly. Also remove the MediaPlayer* parameters from
the client methods since none of them were used.

No new tests, no behavioral change.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerActiveSourceBuffersChanged):
(WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
(WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
(WebCore::HTMLMediaElement::mediaPlayerMuteChanged):
(WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
(WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
(WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
(WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
(WebCore::HTMLMediaElement::mediaPlayerRepaint):
(WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
(WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
(WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
(WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
(WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::graphicsDeviceAdapter const):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
(WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
(WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
(WebCore::MediaPlayerClient::mediaPlayerMuteChanged):
(WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
(WebCore::MediaPlayerClient::mediaPlayerDurationChanged):
(WebCore::MediaPlayerClient::mediaPlayerRateChanged):
(WebCore::MediaPlayerClient::mediaPlayerPlaybackStateChanged):
(WebCore::MediaPlayerClient::mediaPlayerSawUnsupportedTracks):
(WebCore::MediaPlayerClient::mediaPlayerResourceNotSupported):
(WebCore::MediaPlayerClient::mediaPlayerRepaint):
(WebCore::MediaPlayerClient::mediaPlayerSizeChanged):
(WebCore::MediaPlayerClient::mediaPlayerEngineUpdated):
(WebCore::MediaPlayerClient::mediaPlayerFirstVideoFrameAvailable):
(WebCore::MediaPlayerClient::mediaPlayerCharacteristicChanged):
(WebCore::MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated):
(WebCore::MediaPlayerClient::mediaPlayerRenderingModeChanged):
(WebCore::MediaPlayerClient::mediaPlayerActiveSourceBuffersChanged):
(WebCore::MediaPlayerClient::mediaPlayerGraphicsDeviceAdapter const):
(WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
(WebCore::MediaPlayerClient::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::renderingCanBeAccelerated const):
(WebCore::MediaPlayer::renderingModeChanged const):
(WebCore::MediaPlayer::acceleratedCompositingEnabled):
(WebCore::MediaPlayer::activeSourceBuffersChanged):
(WebCore::MediaPlayer::playerContentBoxRect const):
(WebCore::MediaPlayer::playerContentsScale const):
(WebCore::MediaPlayer::shouldUsePersistentCache const):
(WebCore::MediaPlayer::mediaCacheDirectory const):
(WebCore::MediaPlayer::isVideoPlayer const):
(WebCore::MediaPlayer::mediaEngineUpdated):
(WebCore::MediaPlayer::isLooping const):
(WebCore::MediaPlayer::requestInstallMissingPlugins):
(WebCore::MediaPlayer::client const):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const):
(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::notifyActiveSourceBuffersChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::acceleratedRenderingStateChanged):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::MediaPlayerPrivateGStreamer::acceleratedRenderingStateChanged):

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

6 months agoresults.webkit.org: Handle duplicate archives
jbedard@apple.com [Thu, 5 Dec 2019 00:39:11 +0000 (00:39 +0000)]
results.webkit.org: Handle duplicate archives
https://bugs.webkit.org/show_bug.cgi?id=204860

Reviewed by Stephanie Lewis.

* resultsdbpy/resultsdbpy/controller/archive_controller.py:
(ArchiveController): Pass test time to ArchiveContext, de-duplicate any
identical archives.
* resultsdbpy/resultsdbpy/model/archive_context.py:
(ArchiveContext): Only upack identical archives once, pass digest to caller.

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

6 months agoFix the iOS build
timothy_horton@apple.com [Thu, 5 Dec 2019 00:35:35 +0000 (00:35 +0000)]
Fix the iOS build

* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: Added.
* WebKit.xcodeproj/project.pbxproj:

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

6 months agoUnreviewed fix for failure to create sandbox extension on macOS after r253011. This...
pvollan@apple.com [Thu, 5 Dec 2019 00:27:49 +0000 (00:27 +0000)]
Unreviewed fix for failure to create sandbox extension on macOS after r253011. This should be iOS only.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

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

6 months agoPython 3: Add support in webkitpy.benchmark_runner
jbedard@apple.com [Thu, 5 Dec 2019 00:23:59 +0000 (00:23 +0000)]
Python 3: Add support in webkitpy.benchmark_runner
https://bugs.webkit.org/show_bug.cgi?id=204784

Reviewed by Stephanie Lewis.

* Scripts/test-webkitpy-python3: Add webkitpy.benchmark_runner.
* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults): Arithmetic aggregator should use integer division.
(BenchmarkResults._format_values): Convert map to list.
(BenchmarkResults._aggregate_results): Ditto.
(BenchmarkResults._aggregate_results_for_test): Use Python 2/3 compatible iteritems.
(BenchmarkResults._subtest_values_by_config_iteration): Ditto.
(BenchmarkResults._lint_subtest_results): Ditto.
(BenchmarkResults._lint_configuration): Ditto.
* Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py: Use explicit imports.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/__init__.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_chrome_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_cog_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_epiphany_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_firefox_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowsergtk_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowserwpe_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/http_server_driver/__init__.py: Ditto.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Ditto.
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Ditto.
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Ditto.

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

6 months agoPython 3: Add support in webkitpy.tool
jbedard@apple.com [Thu, 5 Dec 2019 00:10:42 +0000 (00:10 +0000)]
Python 3: Add support in webkitpy.tool
https://bugs.webkit.org/show_bug.cgi?id=204838

Reviewed by Stephanie Lewis.

* Scripts/test-webkitpy-python3: Add webkitpy.tool.
* Scripts/webkit-patch: Remove version check.
* Scripts/webkitpy/common/net/bugzilla/bug.py:
(Bug.reviewed_patches): Convert filter to list.
(Bug.commit_queued_patches): Ditto.
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzillaQueries.fetch_bug_ids_from_commit_queue): Convert map to list.
(MockBugzillaQueries.fetch_attachment_ids_from_review_queue): Ditto.
(MockBugzillaQueries.fetch_bug_ids_from_pending_commit_list): Ditto.
(MockBugzilla.post_comment_to_bug): Sort cc list before printing.
* Scripts/webkitpy/common/net/statusserver.py:
(StatusServer.set_api_key): Convert filter to list.
* Scripts/webkitpy/common/net/web.py:
(Web.get_binary): Use Python 2/3 compatible urlopen.
(Web.request): Use Python 2/3 compatible Request.
* Scripts/webkitpy/common/prettypatch.py:
(PrettyPatch.pretty_diff_file): Encode diff before printing.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.run_and_throw_if_fail): Sort environment before printing.
(MockExecutive.run_command): Convert input to string before printing.
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
(FailingTestCommitQueue.test_results): Convert map to list.
(MockSimpleTestPlanCommitQueue.test_results): Ditto.
* Scripts/webkitpy/tool/bot/feeders.py:
(CommitQueueFeeder.feed): Use Python 2/3 compatible sort.
(CommitQueueFeeder._patch_cmp): Deleted.
* Scripts/webkitpy/tool/bot/flakytestreporter.py:
(FlakyTestReporter._lookup_bug_for_flaky_test): Convert filter to list.
* Scripts/webkitpy/tool/bot/irc_command.py:
(Whois.execute): Convert map to list.
* Scripts/webkitpy/tool/bot/retrylogic_unittest.py:
(JSCEarlyWarningSystemTest._create_task): Convert map to list.
* Scripts/webkitpy/tool/bot/sheriff.py:
* Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: Use sorted lists
Instead of sets.
* Scripts/webkitpy/tool/commands/download.py:
(AbstractPatchSequencingCommand.__init__): Use Python 2/3 compatible sort.
* Scripts/webkitpy/tool/commands/download_unittest.py: Sort environment.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.load_ews_classes): str.translate differs between Python 2
and Python 3.
* Scripts/webkitpy/tool/commands/newcommitbot.py:
(NewCommitBot._summarize_commit_log): Convert filter to list.
* Scripts/webkitpy/tool/commands/queues.py:
(AbstractQueue.should_continue_work_queue): Handle case where iterations is a MagicMock.
(AbstractQueue._log_from_script_error_for_upload): Explicitly use BytesIO
* Scripts/webkitpy/tool/commands/queues_unittest.py: Use explicit import paths.
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Sort lists before comparing them.
* Scripts/webkitpy/tool/commands/stepsequence.py:
(StepSequence.options): Use Python 2/3 compatible sort.
* Scripts/webkitpy/tool/commands/suggestnominations.py:
(AbstractCommitLogCommand.__init__): Use Python 2/3 compatible sort.
(SuggestNominations._print_nominations): Ditto.
(SuggestNominations._print_counts): Ditto.
(SuggestNominations._print_nominations.nomination_cmp): Deleted.
(SuggestNominations._print_counts.counter_cmp): Deleted.
* Scripts/webkitpy/tool/mocktool_unittest.py: Use explicit import paths.
* Scripts/webkitpy/tool/multicommandtool.py:
(HelpCommand._help_epilog): Convert filter to list, use Python 2/3 compatible sort.
(MultiCommandTool._find_all_commands): Use Python 2/3 compatible sort.
* Scripts/webkitpy/tool/servers/gardeningserver.py:
(GardeningHTTPServer): Use Python 2/3 compatible HTTPServers.
* Scripts/webkitpy/tool/servers/rebaselineserver.py:
(get_test_baselines.AllPlatformsPort.baseline_search_path): Use list instead of utterable keys.
(RebaselineHTTPServer): Use Python 2/3 compatible HTTPServers.
(RebaselineHTTPServer.__init__): Ditto.
* Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py:
(GetActualResultFilesTest.test): Use assertEqual instead of assertItemsEqual.
* Scripts/webkitpy/tool/servers/reflectionhandler.py:
(ReflectionHandler): Use Python 2/3 compatible HTTPServers.
* Scripts/webkitpy/tool/steps/applywatchlist.py:
(ApplyWatchList.run): Sort cc_emails before printing.
* Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: Print sorted list instead
of set.
* Scripts/webkitpy/tool/steps/confirmdiff.py:
(ConfirmDiff._show_pretty_diff): Use Python 2/3 compatible pathname2url.
* Scripts/webkitpy/tool/steps/haslanded.py:
(HasLanded.convert_to_svn): Use Python 2/3 compatible StringIO.
(HasLanded.strip_change_log): Ditto.
* Scripts/webkitpy/tool/steps/preparechangelog.py:
(PrepareChangeLog._resolve_existing_entry): Convert zip object to list.
* Scripts/webkitpy/tool/steps/promptforbugortitle.py: Use Python 2/3 compatible urlparse.
* Scripts/webkitpy/tool/steps/steps_unittest.py: Sort environment.
* Scripts/webkitpy/w3c/test_exporter.py: Use Python 2/3 compatible HTTPError.
* Scripts/webkitpy/w3c/wpt_github.py:
(WPTGitHub.remove_label): Use Python 2/3 compatible urllib.quote.
(WPTGitHub.is_pr_merged): Use Python 2/3 compatible HTTPError.
(WPTGitHub.merge_pr): Ditto.
(JSONResponse.__init__):

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

6 months ago[iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerSer...
pvollan@apple.com [Thu, 5 Dec 2019 00:07:39 +0000 (00:07 +0000)]
[iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerService"
https://bugs.webkit.org/show_bug.cgi?id=203915

Reviewed by Brent Fulgham.

Only a few iPad models need access to "com.apple.AGXCompilerService” in the WebContent process.
The UI process should issue this mach extension for these iPad models.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::deviceHasAGXCompilerService):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

6 months agoUnreviewed, rolling out r252416, vimeo does not work
ysuzuki@apple.com [Wed, 4 Dec 2019 23:01:57 +0000 (23:01 +0000)]
Unreviewed, rolling out r252416, vimeo does not work
https://bugs.webkit.org/show_bug.cgi?id=204141

JSTests:

* stress/generator-cell-with-type.js: Removed.

Source/JavaScriptCore:

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

6 months agoNon-callable "handleEvent" property is silently ignored
commit-queue@webkit.org [Wed, 4 Dec 2019 22:24:24 +0000 (22:24 +0000)]
Non-callable "handleEvent" property is silently ignored
https://bugs.webkit.org/show_bug.cgi?id=200066

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-12-04
Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt:
* web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt:
* web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt:
* web-platform-tests/dom/events/EventListener-handleEvent-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-handleEvent-ignored-expected.txt:
* web-platform-tests/websockets/interfaces/WebSocket/events/013-expected.txt:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.worker-expected.txt:

Source/WebCore:

This patch prevents "handleEvent" property from being looked up on event handlers
and also reports TypeError exception if "handleEvent" value is not callable.
Web IDL spec: https://heycam.github.io/webidl/#call-a-user-objects-operation (step 10.4)

Tests: fast/dom/exception-getting-event-handler.html
       imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html
       imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
       imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
       imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-handleEvent-ignored.html
       imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/013.html
       imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.worker.html

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):

LayoutTests:

* fast/dom/exception-getting-event-handler-expected.txt:

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

6 months agoVersioning.
alancoon@apple.com [Wed, 4 Dec 2019 22:19:27 +0000 (22:19 +0000)]
Versioning.

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

6 months ago[JSC] JSWebAssemblyGlobal creation should have exception check
ysuzuki@apple.com [Wed, 4 Dec 2019 21:50:59 +0000 (21:50 +0000)]
[JSC] JSWebAssemblyGlobal creation should have exception check
https://bugs.webkit.org/show_bug.cgi?id=204857
<rdar://problem/57618579>

Reviewed by Mark Lam.

JSTests:

* wasm/regress/wasm-global-creation-can-throw-an-exception.js: Added.

Source/JavaScriptCore:

Each WebAssembly cells have a path throwing an exception if WebAssembly is disabled. We lack exception checking after calling JSWebAssemblyGlobal::create
in WebAssemblyModuleRecord linking phase. While exception is never thrown in this place since this happens only when WebAssembly is enabled, we should put
`scope.assertNoException()` to satisfy exception verifier requirement. We also rename factory function of Wasm cells from "create" to "tryCreate" since it
can fail potentially.

* wasm/js/JSWebAssembly.cpp:
(JSC::instantiate):
* wasm/js/JSWebAssemblyGlobal.cpp:
(JSC::JSWebAssemblyGlobal::tryCreate):
(JSC::JSWebAssemblyGlobal::create): Deleted.
* wasm/js/JSWebAssemblyGlobal.h:
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::tryCreate):
(JSC::JSWebAssemblyInstance::create): Deleted.
* wasm/js/JSWebAssemblyInstance.h:
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::tryCreate):
(JSC::JSWebAssemblyMemory::create): Deleted.
* wasm/js/JSWebAssemblyMemory.h:
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::tryCreate):
(JSC::JSWebAssemblyTable::create): Deleted.
* wasm/js/JSWebAssemblyTable.h:
* wasm/js/WebAssemblyGlobalConstructor.cpp:
(JSC::constructJSWebAssemblyGlobal):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyMemoryConstructor.cpp:
(JSC::constructJSWebAssemblyMemory):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
* wasm/js/WebAssemblyTableConstructor.cpp:
(JSC::constructJSWebAssemblyTable):

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

6 months agoAdopt UIHelper in a few more layout tests in fast/events
wenson_hsieh@apple.com [Wed, 4 Dec 2019 21:50:14 +0000 (21:50 +0000)]
Adopt UIHelper in a few more layout tests in fast/events
https://bugs.webkit.org/show_bug.cgi?id=204855

Reviewed by Darin Adler.

Fixes and cleans up some more layout tests; see below for details.

* fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html:

Use async-await here, as well as UIHelper.dragFromPointToPoint.

* fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt:
* fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html:

This test sometimes times out when run in rapid succession, due to touches being dispatched while the test is
finishing. Fix this (and also simplify the test) by using UIHelper instead to synthesize taps, and only finish
the layout test after the expected number of clicks have been observed and all tap gestures have been sent.

* fast/events/touch/ios/passive-by-default-overridden-on-document-and-window-expected.txt:
* fast/events/touch/ios/passive-by-default-overridden-on-document-and-window.html:

This test currently fails due to finishing too early, before the touchend event is observed; fix this by waiting
for touchend events before finishing the test.

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

6 months agoimported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html is a flakey...
ysuzuki@apple.com [Wed, 4 Dec 2019 20:28:08 +0000 (20:28 +0000)]
imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html is a flakey failure, WebAssembly.Global is not implemented
https://bugs.webkit.org/show_bug.cgi?id=200258

Reviewed by Saam Barati.

We implemented WebAssembly.Global now. So let's unmark it.

* platform/mac/TestExpectations:

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

6 months agoExpose basic ITP data from the database for future API/SPI use
katherine_cheney@apple.com [Wed, 4 Dec 2019 20:06:26 +0000 (20:06 +0000)]
Expose basic ITP data from the database for future API/SPI use
https://bugs.webkit.org/show_bug.cgi?id=203432
<rdar://problem/56085040>

Reviewed John Wilander.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html
       http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html
       http/tests/storageAccess/user-interface-data-with-storage-access-database.html
       http/tests/storageAccess/user-interface-data-with-storage-access.html

Updated the toString() to report only if mostRecentUserInteractionTime
was in the last 24 hours as opposed to reporting an actual time since
mostRecentUserInteractionTime changes with each test run.

* loader/ResourceLoadStatistics.cpp:
(WebCore::hasHadRecentUserInteraction):
(WebCore::ResourceLoadStatistics::toString const):

Source/WebKit:

Tests: http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html
       http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html
       http/tests/storageAccess/user-interface-data-with-storage-access-database.html
       http/tests/storageAccess/user-interface-data-with-storage-access.html

Adds the ability to collect sorted ITP data for displaying in a
user interface.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements):
Added new queries to the database store to check for storage access in
the database and aggregate topFrames with the same
subframe/subresource so easily create the struct for collecting data
for the UI.

(WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const):
Fixed an incorrect function name in the error message.

(WebKit::ResourceLoadStatisticsDatabaseStore::joinSubStatisticsForSorting):
Renamed unclear SQL variable names and added a bind parameter to
specify whether resource is prevalent or not, which allows
this function to be used to collect sorted ITP data
for the UI.

(WebKit::ResourceLoadStatisticsDatabaseStore::getFirstPartyDataForDomain const):
(WebKit::ResourceLoadStatisticsDatabaseStore::gatherDataForUserInterface const):

(WebKit::buildQueryStartAndEnd):
(WebKit::getMedianOfPrevalentResourcesWithUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::getTopPrevelentResourceDaysSinceUI const):
(WebKit::getMedianOfPrevalentResourceWithoutUserInteraction):
(WebKit::getNumberOfPrevalentResourcesInTopResources):
Changed sql query variable names to make them more clear and added a
new bind parameter to allow for more general use of substatistic
sorting query.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess const):
(WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics const):
Combined UI data with dumpResourceLoadStatistics() data to keep the testing aspect
of this patch simpler.

(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const):
Since mostRecentUserInteractionTime changes with each test run, I
updated the dumping to report only if it was in the last 24 hours as
opposed to reporting an actual time.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ensureFirstPartyStatistic):
(WebKit::getFirstPartyDataForDomain):
(WebKit::hasBeenThirdParty):
(WebKit::ResourceLoadStatisticsMemoryStore::gatherDataForUserInterface const):
(WebKit::ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics):
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::gatherDataForUserInterface):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
(WebKit::FirstPartyData::toString const):
(WebKit::FirstPartyData::operator== const):
(WebKit::ThirdPartyData::toString const):
(WebKit::ThirdPartyData::operator< const):
The toString methods allow the structs to be printed for testing
purposes. The equals methods allow the return vectors to use
appendIfNotContains.

LayoutTests:

Added new tests to check if basic ITP data is properly
collected and sorted for both the database store and the memory store.
Also edited any tests which use dumpResourceLoadStatistics() to also
expect the new aggregated data to be displayed.

* http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database-expected.txt:
* http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-expected.txt:
* http/tests/resourceLoadStatistics/count-third-party-script-loads-database-expected.txt:
* http/tests/resourceLoadStatistics/count-third-party-script-loads-expected.txt:
* http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database-expected.txt:
* http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-expected.txt:
* http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database-expected.txt: Added.
* http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html: Added.
* http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-expected.txt: Added.
* http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html: Added.
* http/tests/storageAccess/user-interface-data-with-storage-access-database-expected.txt: Added.
* http/tests/storageAccess/user-interface-data-with-storage-access-database.html: Added.
* http/tests/storageAccess/user-interface-data-with-storage-access-expected.txt: Added.
* http/tests/storageAccess/user-interface-data-with-storage-access.html: Added.

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

6 months agoUnreviewed, rolling out r253069.
jbedard@apple.com [Wed, 4 Dec 2019 19:02:37 +0000 (19:02 +0000)]
Unreviewed, rolling out r253069.

requests not handling certificate chain correctly in Catalina

Reverted changeset:

"results.webkit.org: Sort out certificates on Catalina"
https://bugs.webkit.org/show_bug.cgi?id=202837
https://trac.webkit.org/changeset/253069

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

6 months ago[JSC] Put more cells into IsoSubspace
ysuzuki@apple.com [Wed, 4 Dec 2019 18:49:12 +0000 (18:49 +0000)]
[JSC] Put more cells into IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204845

Reviewed by Saam Barati.

This patch puts following cells in IsoSubspace.

    - ClonedArguments
    - JSMap
    - JSSet
    - RegExpObject

* runtime/ClonedArguments.h:
* runtime/JSMap.h:
* runtime/JSSet.h:
* runtime/RegExpObject.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* runtime/WeakMapImpl.h:
(JSC::WeakMapImpl::subspaceFor):

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

6 months ago[JSC] Update Wasm spec-tests
ysuzuki@apple.com [Wed, 4 Dec 2019 18:46:01 +0000 (18:46 +0000)]
[JSC] Update Wasm spec-tests
https://bugs.webkit.org/show_bug.cgi?id=204844

Reviewed by Keith Miller.

To get broader coverage, we update Wasm spec-tests to the latest one[1].

[1]: 3e5fdc6b51ca2cde537bb8ecb1ba25c1ee366833

* wasm.yaml:
* wasm/spec-tests/address.wast.js:
* wasm/spec-tests/align.wast.js:
* wasm/spec-tests/binary-leb128.wast.js: Added.
* wasm/spec-tests/binary.wast.js:
* wasm/spec-tests/block.wast.js:
* wasm/spec-tests/br.wast.js:
* wasm/spec-tests/br_if.wast.js:
* wasm/spec-tests/br_table.wast.js:
* wasm/spec-tests/call_indirect.wast.js:
* wasm/spec-tests/const.wast.js:
* wasm/spec-tests/conversions.wast.js:
* wasm/spec-tests/custom.wast.js: Added.
* wasm/spec-tests/data.wast.js: Added.
* wasm/spec-tests/elem.wast.js: Added.
* wasm/spec-tests/endianness.wast.js:
* wasm/spec-tests/f32.wast.js:
* wasm/spec-tests/f32_bitwise.wast.js:
* wasm/spec-tests/f32_cmp.wast.js:
* wasm/spec-tests/f64.wast.js:
* wasm/spec-tests/f64_bitwise.wast.js:
* wasm/spec-tests/f64_cmp.wast.js:
* wasm/spec-tests/fac.wast.js:
* wasm/spec-tests/float_exprs.wast.js:
* wasm/spec-tests/float_literals.wast.js:
* wasm/spec-tests/float_memory.wast.js:
* wasm/spec-tests/func.wast.js:
* wasm/spec-tests/func_ptrs.wast.js:
* wasm/spec-tests/i32.wast.js:
* wasm/spec-tests/i64.wast.js:
* wasm/spec-tests/imports.wast.js:
* wasm/spec-tests/int_exprs.wast.js:
* wasm/spec-tests/int_literals.wast.js:
* wasm/spec-tests/labels.wast.js:
* wasm/spec-tests/left-to-right.wast.js:
* wasm/spec-tests/load.wast.js: Added.
* wasm/spec-tests/local_get.wast.js: Added.
* wasm/spec-tests/local_set.wast.js: Added.
* wasm/spec-tests/local_tee.wast.js: Added.
* wasm/spec-tests/loop.wast.js:
* wasm/spec-tests/memory_grow.wast.js: Added.
* wasm/spec-tests/memory_size.wast.js: Added.
* wasm/spec-tests/memory_trap.wast.js:
* wasm/spec-tests/names.wast.js:
* wasm/spec-tests/nop.wast.js:
* wasm/spec-tests/return.wast.js:
* wasm/spec-tests/select.wast.js:
* wasm/spec-tests/stack.wast.js:
* wasm/spec-tests/start.wast.js:
* wasm/spec-tests/store.wast.js: Added.
* wasm/spec-tests/switch.wast.js:
* wasm/spec-tests/traps.wast.js:
* wasm/spec-tests/type.wast.js:
* wasm/spec-tests/unreachable.wast.js:
* wasm/spec-tests/unreached-invalid.wast.js:
* wasm/spec-tests/unwind.wast.js:
* wasm/spec-tests/utf8-custom-section-id.wast.js:
* wasm/spec-tests/utf8-import-field.wast.js:
* wasm/spec-tests/utf8-import-module.wast.js:
* wasm/spec-tests/utf8-invalid-encoding.wast.js: Added.

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

6 months ago[JSC] Remove m_sharingMode field from JSArrayBufferPrototype and make it plain object
ysuzuki@apple.com [Wed, 4 Dec 2019 18:39:29 +0000 (18:39 +0000)]
[JSC] Remove m_sharingMode field from JSArrayBufferPrototype and make it plain object
https://bugs.webkit.org/show_bug.cgi?id=204832

Reviewed by Saam Barati.

m_sharingMode field is not necessary. Just remove it and make JSArrayBufferPrototype a plain object.

* runtime/JSArrayBufferPrototype.cpp:
(JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
(JSC::JSArrayBufferPrototype::finishCreation):
(JSC::JSArrayBufferPrototype::create):
* runtime/JSArrayBufferPrototype.h:

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

6 months agoAdd exclusion rule for text manipulation SPI to exclude based on element class
commit-queue@webkit.org [Wed, 4 Dec 2019 18:36:15 +0000 (18:36 +0000)]
Add exclusion rule for text manipulation SPI to exclude based on element class
https://bugs.webkit.org/show_bug.cgi?id=204754
<rdar://problem/57398802>

Patch by Louie Livon-Bemel <llivonbemel@apple.com> on 2019-12-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests:  TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForClass
        TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForClassAndAttribute

* editing/TextManipulationController.cpp:
(WebCore::TextManipulationController::ExclusionRule::match const):
    When matching a ClassRule, check that the element has at least one class, and that the classList contains
    the rule's class name. Checking it this way rather than checking if the ClassList contains the rule allows
    us to avoid mutating the element in this function.
* editing/TextManipulationController.h:
    Add a new rule type for a ClassRule.
(WebCore::TextManipulationController::ExclusionRule::ClassRule::encode const):
(WebCore::TextManipulationController::ExclusionRule::ClassRule::decode):

Source/WebKit:

Give clients another option for adding an exclusion for text manipulation; allow them to exclude based on an
element having a certain class.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _startTextManipulationsWithConfiguration:completion:]):
    If the rule doesn't have an attribute but does have a class name, treat it as a ClassRule exclusion.
* UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.h:
    Add an initializer for excluding based on a class name. Also add a getter for the className.
* UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.mm:
(-[_WKTextManipulationExclusionRule initExclusion:forClass:]):
(-[_WKTextManipulationExclusionRule className]):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
(TestWebKitAPI::TEST):
    - When matching a class, it should work even with other class names on the element.
    - All children elements should get the same exclusion rule, unless overridden by another rule.

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

6 months agoEnable WebGL's ASTC extension all the time
dino@apple.com [Wed, 4 Dec 2019 18:04:19 +0000 (18:04 +0000)]
Enable WebGL's ASTC extension all the time
https://bugs.webkit.org/show_bug.cgi?id=202836
<rdar://problem/57627592>

Patch by Kenneth Russell <kbr@chromium.org> on 2019-12-04
Reviewed by Dean Jackson.

Remove the run-time flag - no longer necessary.

Source/WebCore:

* html/canvas/WebGLCompressedTextureASTC.cpp:
(WebCore::WebGLCompressedTextureASTC::supported):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::extensionIsEnabled):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebGLCompressedTextureASTCSupportEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webGLCompressedTextureASTCSupportEnabled const): Deleted.

Source/WebKit:

* Shared/WebPreferences.yaml:

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