WebKit-https.git
7 months ago[iOS] Regression(PSON) Scroll position is no longer restored when navigating back...
cdumez@apple.com [Tue, 26 Feb 2019 20:34:36 +0000 (20:34 +0000)]
[iOS] Regression(PSON) Scroll position is no longer restored when navigating back to reddit.com
https://bugs.webkit.org/show_bug.cgi?id=195054
<rdar://problem/48330549>

Reviewed by Geoff Garen.

Source/WebCore:

Add MaintainMemoryCache flag to indicate that the memory cache should not get purged.

* page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):
(WebCore::releaseCriticalMemory):
(WebCore::releaseMemory):
* page/MemoryRelease.h:

Source/WebKit:

We attempt to restore the scroll position twice, on first layout and then on load completion.
Before PSON, the scroll position would fail to get restored on first layout but would succeed
on load completion because the view is tall enough by then. With PSON however, we would
fail to restore the scroll position on load completion because the view would not be tall
enough yet by this point. The reason is that the dynamic resources would not be in the memory cache
and would then get reloaded abd finish loading *after* the load event.

To address the issue, we now make sure to not purge the memory cache on process suspension on
iOS if there is currently a SuspendedPageProxy in the UIProcess for this process.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::incrementSuspendedPageCount):
(WebKit::WebProcessProxy::decrementSuspendedPageCount):
* UIProcess/WebProcessProxy.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setHasSuspendedPageProxy):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

7 months ago[iOS] REGRESSION(r238490?): Safari sometimes shows blank page until a cross site...
rniwa@webkit.org [Tue, 26 Feb 2019 20:24:43 +0000 (20:24 +0000)]
[iOS] REGRESSION(r238490?): Safari sometimes shows blank page until a cross site navigation or re-opening the tab
https://bugs.webkit.org/show_bug.cgi?id=195037
<rdar://problem/48154508>

Reviewed by Antti Koivisto.

Restore the pre-r238490 behavior of WebPage::didCompletePageTransition clearing LayerTreeFreezeReason::ProcessSuspended
as this has been an issue when I was able to reproduce the issue locally.

Also added release logging to help diagnose the issue in the future.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::freezeLayerTree):
(WebKit::WebPage::unfreezeLayerTree):
(WebKit::WebPage::didCompletePageTransition):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::freezeAllLayerTrees):
(WebKit::WebProcess::unfreezeAllLayerTrees):

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

7 months agoCreate WebPageProxy::m_userMediaPermissionRequestManager only when needed
youenn@apple.com [Tue, 26 Feb 2019 19:47:38 +0000 (19:47 +0000)]
Create WebPageProxy::m_userMediaPermissionRequestManager only when needed
https://bugs.webkit.org/show_bug.cgi?id=195051

Reviewed by Eric Carlson.

Before the patch, WebPageProxy::m_userMediaPermissionRequestManager was created
in some methods to reset its state when main document is changing, view is becoming visible...
This code is unnecessary if the page did not create it already using JS APIs such as getUserMedia/enumerateDevices/ondevicechange.
This patch skips processing in the other cases if WebPageProxy::m_userMediaPermissionRequestManager is null.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): No need to nullify it since it will be done in resetState shortly after.
(WebKit::WebPageProxy::didChangeMainDocument):
(WebKit::WebPageProxy::viewIsBecomingVisible):
(WebKit::WebPageProxy::clearUserMediaState):
(WebKit::WebPageProxy::updatePlayingMediaDidChange): m_userMediaPermissionRequestManager should not be null here
since there is or was some capturing done for the page.

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

7 months ago[Re-landing] Add some randomness into the StructureID.
mark.lam@apple.com [Tue, 26 Feb 2019 19:41:21 +0000 (19:41 +0000)]
[Re-landing] Add some randomness into the StructureID.
https://bugs.webkit.org/show_bug.cgi?id=194989
<rdar://problem/47975563>

Reviewed by Yusuke Suzuki.

1. On 64-bit, the StructureID will now be encoded as:

    ----------------------------------------------------------------
    | 1 Nuke Bit | 24 StructureIDTable index bits | 7 entropy bits |
    ----------------------------------------------------------------

   The entropy bits are chosen at random and assigned when a StructureID is
   allocated.

2. Instead of Structure pointers, the StructureIDTable will now contain
   encodedStructureBits, which is encoded as such:

    ----------------------------------------------------------------
    | 7 entropy bits |                   57 structure pointer bits |
    ----------------------------------------------------------------

   The entropy bits here are the same 7 bits used in the encoding of the
   StructureID for this structure entry in the StructureIDTable.

3. Retrieval of the structure pointer given a StructureID is now computed as
   follows:

        index = structureID >> 7; // with arithmetic shift.
        encodedStructureBits = structureIDTable[index];
        structure = encodedStructureBits ^ (structureID << 57);

    We use an arithmetic shift for the right shift because that will preserve
    the nuke bit in the high bit of the index if the StructureID was not
    decontaminated before use as expected.

4. Remove unused function loadArgumentWithSpecificClass() in SpecializedThunkJIT.

5. Define StructureIDTable::m_size to be the number of allocated StructureIDs
   instead of always being the same as m_capacity.

6. Change StructureIDTable::s_unusedID's value to 0.

   Its previous value of unusedPointer i.e. 0xd1e7beef, does not make sense for
   StructureID on 64-bit.  Also, there was never any code that initializes unused
   IDs to the s_unusedID.  The only meaningful value for s_unusedID is 0, which
   is the ID we'll get when the freelist is empty, prompting a resize of the
   structureIDTable.

This patch appears to be perf neutral on JetStream 2 run via the cli on a
11" MacBook Air, 13" MacBook Pro, iPhone 6S, and iPhone XR.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::loadStructure):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendJSCellOrAuxiliary):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitLoadStructure):
* jit/AssemblyHelpers.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::loadArgumentWithSpecificClass): Deleted.
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/StructureIDTable.cpp:
(JSC::StructureIDTable::StructureIDTable):
(JSC::StructureIDTable::makeFreeListFromRange):
(JSC::StructureIDTable::resize):
(JSC::StructureIDTable::allocateID):
(JSC::StructureIDTable::deallocateID):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::decode):
(JSC::StructureIDTable::encode):
(JSC::StructureIDTable::get):
(JSC::StructureIDTable::isValid):

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

7 months agoUnreviewed, rolling out r241970.
commit-queue@webkit.org [Tue, 26 Feb 2019 19:23:11 +0000 (19:23 +0000)]
Unreviewed, rolling out r241970.
https://bugs.webkit.org/show_bug.cgi?id=195057

made the QuickLook.LegacyQuickLookContent API test flakey
(Requested by estes on #webkit).

Reverted changeset:

"[iOS] Break a reference cycle between PreviewLoader and
ResourceLoader"
https://bugs.webkit.org/show_bug.cgi?id=194964
https://trac.webkit.org/changeset/241970

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

7 months ago[ContentChangeObserver] Simplify content observation API by removing explicit DOMTime...
zalan@apple.com [Tue, 26 Feb 2019 18:37:09 +0000 (18:37 +0000)]
[ContentChangeObserver] Simplify content observation API by removing explicit DOMTimer observation.
https://bugs.webkit.org/show_bug.cgi?id=195023
<rdar://problem/48381885>

Reviewed by Tim Horton.

Source/WebCore:

In the future we might decide that certain activities don't require DOMTimer observation, but that should
be internal to ContentChangeObserver.

* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::ContentChangeObserver::startObservingContentChanges):
(WebCore::ContentChangeObserver::stopObservingContentChanges):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::mouseMoved):

Source/WebKit:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):

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

7 months ago[ContentChangeObserver] Move observing logic from Document::updateStyleIfNeeded to...
zalan@apple.com [Tue, 26 Feb 2019 18:28:42 +0000 (18:28 +0000)]
[ContentChangeObserver] Move observing logic from Document::updateStyleIfNeeded to ContentChangeObserver
https://bugs.webkit.org/show_bug.cgi?id=195032
<rdar://problem/48388063>

Reviewed by Tim Horton.

This might eventually turn into a regular start/stop content observing call.

* dom/Document.cpp:
(WebCore::Document::updateStyleIfNeeded):
* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::ContentChangeObserver::startObservingStyleResolve):
(WebCore::ContentChangeObserver::stopObservingStyleResolve):

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

7 months ago[Curl] Load HTTP body of 401 response when AuthenticationChange is cancelled.
commit-queue@webkit.org [Tue, 26 Feb 2019 18:24:41 +0000 (18:24 +0000)]
[Curl] Load HTTP body of 401 response when AuthenticationChange is cancelled.
https://bugs.webkit.org/show_bug.cgi?id=191652

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-02-26
Reviewed by Alex Christensen.

Source/WebKit:

Test: http/tests/security/401-logout/401-logout.php

* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
(WebKit::NetworkDataTaskCurl::tryProxyAuthentication):
* NetworkProcess/curl/NetworkDataTaskCurl.h:

Tools:

Fix WinCairo MiniBrowser behavior of authentication dialog.

* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::didReceiveAuthenticationChallenge):

LayoutTests:

Added appropriate expected results for WebKit/WebKitLegacy of WinCairo port.

* platform/wincairo-wk1/http/tests/security/401-logout/401-logout-expected.txt: Added.
* platform/wincairo/TestExpectations:
* platform/wincairo/http/tests/security/401-logout/401-logout-expected.txt: Added.

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

7 months ago[ContentChangeObserver] Move CheckForVisibilityChange to ContentChangeObserver class
zalan@apple.com [Tue, 26 Feb 2019 18:20:33 +0000 (18:20 +0000)]
[ContentChangeObserver] Move CheckForVisibilityChange to ContentChangeObserver class
https://bugs.webkit.org/show_bug.cgi?id=195035
<rdar://problem/48389123>

Reviewed by Tim Horton.

Visibility checking logic belongs to ContentChangeObserver.

* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::elementImplicitVisibility):
(WebCore::ContentChangeObserver::StyleChange::StyleChange):
(WebCore::ContentChangeObserver::StyleChange::~StyleChange):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::elementImplicitVisibility): Deleted.
(WebCore::CheckForVisibilityChange::CheckForVisibilityChange): Deleted.
(WebCore::CheckForVisibilityChange::~CheckForVisibilityChange): Deleted.

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

7 months agoSplit tests programmatic-scroll-iframe and scroll-iframe
commit-queue@webkit.org [Tue, 26 Feb 2019 18:14:45 +0000 (18:14 +0000)]
Split tests programmatic-scroll-iframe and scroll-iframe
https://bugs.webkit.org/show_bug.cgi?id=195050

This patch splits some iOS frame scrolling tests into separate tests in order to make debugging
and test expectations easier to manage.

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

* fast/scrolling/ios/programmatic-scroll-iframe-001-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-001.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-002-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-002.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-003-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-003.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-004-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-004.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-005-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-005.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-006-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-006.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-007-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-007.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-008-expected.html: Copied from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-008.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe-009-expected.html: Renamed from LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-expected.html.
* fast/scrolling/ios/programmatic-scroll-iframe-009.html: Added.
* fast/scrolling/ios/programmatic-scroll-iframe.html: Removed.
* fast/scrolling/ios/scroll-iframe-001-expected.html: Added.
* fast/scrolling/ios/scroll-iframe-001.html: Added.
* fast/scrolling/ios/scroll-iframe-002-expected.html: Added.
* fast/scrolling/ios/scroll-iframe-002.html: Added.
* fast/scrolling/ios/scroll-iframe-003-expected.html: Added.
* fast/scrolling/ios/scroll-iframe-003.html: Added.
* fast/scrolling/ios/scroll-iframe-004-expected.html: Added.
* fast/scrolling/ios/scroll-iframe-004.html: Added.
* fast/scrolling/ios/scroll-iframe-expected.html: Removed.
* fast/scrolling/ios/scroll-iframe.html: Removed.

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

7 months agoWebPageProxy should nullify m_userMediaPermissionRequestManager after resetting the...
youenn@apple.com [Tue, 26 Feb 2019 18:09:19 +0000 (18:09 +0000)]
WebPageProxy should nullify m_userMediaPermissionRequestManager after resetting the media state
https://bugs.webkit.org/show_bug.cgi?id=195028
<rdar://problem/48243733>

Reviewed by Eric Carlson.

Source/WebKit:

Covered by API test.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

7 months agoVersioning.
kocsen_chung@apple.com [Tue, 26 Feb 2019 18:01:57 +0000 (18:01 +0000)]
Versioning.

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

7 months agoUnreviewed, rolling out r242071.
ryanhaddad@apple.com [Tue, 26 Feb 2019 17:13:14 +0000 (17:13 +0000)]
Unreviewed, rolling out r242071.

Breaks internal builds.

Reverted changeset:

"Add some randomness into the StructureID."
https://bugs.webkit.org/show_bug.cgi?id=194989
https://trac.webkit.org/changeset/242071

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

7 months agoSynchronize MathML WPT tests
commit-queue@webkit.org [Tue, 26 Feb 2019 16:28:39 +0000 (16:28 +0000)]
Synchronize MathML WPT tests
https://bugs.webkit.org/show_bug.cgi?id=195048

This imports changes to the documentation and spec references for MathML.
It also imports a new test for href currently disabled due to bug 187039.

Patch by Frederic Wang <fwang@igalia.com> on 2019-02-26
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

* web-platform-tests/mathml/README.md:
* web-platform-tests/mathml/presentation-markup/fractions/frac-1.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-001.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-001.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-002.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-003.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-mrow-001.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-numalign-denomalign-001.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-visibility-001.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html:
* web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-2.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-3.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-4.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-5.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-2.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html:
* web-platform-tests/mathml/presentation-markup/spaces/space-1.html:
* web-platform-tests/mathml/presentation-markup/spaces/space-2.html:
* web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html:
* web-platform-tests/mathml/relations/css-styling/color-1.html:
* web-platform-tests/mathml/relations/css-styling/display-1.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-1.html:
* web-platform-tests/mathml/relations/css-styling/lengths-1.html:
* web-platform-tests/mathml/relations/css-styling/lengths-2.html:
* web-platform-tests/mathml/relations/css-styling/lengths-3.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-script.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-fraktur.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-initial.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-looped.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-monospace.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-script.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-stretched.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-tailed.html:
* web-platform-tests/mathml/relations/css-styling/visibility-1.html:
* web-platform-tests/mathml/relations/html5-tree/class-1.html:
* web-platform-tests/mathml/relations/html5-tree/class-2.html:
* web-platform-tests/mathml/relations/html5-tree/color-attributes-1.html:
* web-platform-tests/mathml/relations/html5-tree/display-1.html:
* web-platform-tests/mathml/relations/html5-tree/dynamic-1.html:
* web-platform-tests/mathml/relations/html5-tree/href-click-1.html:
* web-platform-tests/mathml/relations/html5-tree/href-click-2.html:
* web-platform-tests/mathml/relations/html5-tree/href-click-3.html: Added.
* web-platform-tests/mathml/relations/html5-tree/integration-point-1.html:
* web-platform-tests/mathml/relations/html5-tree/integration-point-2.html:
* web-platform-tests/mathml/relations/html5-tree/integration-point-3.html:
* web-platform-tests/mathml/relations/html5-tree/required-extensions-1.html:
* web-platform-tests/mathml/relations/html5-tree/required-extensions-2.html:
* web-platform-tests/mathml/relations/html5-tree/unique-identifier-1.html:
* web-platform-tests/mathml/relations/html5-tree/unique-identifier-2.html:
* web-platform-tests/mathml/relations/html5-tree/unique-identifier-3.html:
* web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
* web-platform-tests/mathml/relations/text-and-math/use-typo-metrics-1.html:
* web-platform-tests/mathml/tools/mathvariant-transforms.py:
* web-platform-tests/mathml/tools/utils/w3c-import.log:

LayoutTests:

* TestExpectations: Disable the new href test since testdriver.js is not supported.

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

7 months agoExport MathML fraction tests to WPT
fred.wang@free.fr [Tue, 26 Feb 2019 15:29:40 +0000 (15:29 +0000)]
Export MathML fraction tests to WPT
https://bugs.webkit.org/show_bug.cgi?id=194436

LayoutTests/imported/w3c:

This is just an import of the current MathML WPT tests. It includes fraction tests from
WebKit that were exported in [1]. Some test results have whitespace change, due to [2].

[1] https://github.com/web-platform-tests/wpt/pull/15301
[2] https://github.com/web-platform-tests/wpt/commit/e2dd57c3f273468b3c6a087978c531dcd00933de

Patch by Frederic Wang <fwang@igalia.com> on 2019-02-26
Reviewed by Manuel Rego Casasnovas.

* resources/resource-files.json:
* web-platform-tests/mathml/META.yml: Added.
* web-platform-tests/mathml/OWNERS: Removed.
* web-platform-tests/mathml/README.md:
* web-platform-tests/mathml/presentation-markup/fractions/frac-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/fractions/frac-1.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-001-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-001.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-001-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-001-notref.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-001.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-002-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-color-002.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-003-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-003-notref.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-003.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-mrow-001-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-mrow-001.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-numalign-denomalign-001-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-numalign-denomalign-001.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2-expected.txt:
* web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-visibility-001-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-visibility-001.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html:
* web-platform-tests/mathml/presentation-markup/operators/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/radicals/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-2.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-3.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-4.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-5.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-2.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2-expected.txt:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3-expected.txt:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4-expected.txt:
* web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html:
* web-platform-tests/mathml/presentation-markup/scripts/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt:
* web-platform-tests/mathml/presentation-markup/spaces/space-1.html:
* web-platform-tests/mathml/presentation-markup/spaces/space-2.html:
* web-platform-tests/mathml/presentation-markup/spaces/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/tables/table-axis-height-expected.txt:
* web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html:
* web-platform-tests/mathml/presentation-markup/tables/w3c-import.log:
* web-platform-tests/mathml/relations/css-styling/display-1.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-1-expected.txt:
* web-platform-tests/mathml/relations/css-styling/displaystyle-1.html:
* web-platform-tests/mathml/relations/css-styling/lengths-3-expected.txt:
* web-platform-tests/mathml/relations/css-styling/lengths-3.html:
* web-platform-tests/mathml/relations/css-styling/w3c-import.log:
* web-platform-tests/mathml/relations/html5-tree/class-2.html:
* web-platform-tests/mathml/relations/html5-tree/display-1-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/display-1.html:
* web-platform-tests/mathml/relations/html5-tree/href-click-1.html:
* web-platform-tests/mathml/relations/html5-tree/href-click-2.html:
* web-platform-tests/mathml/relations/html5-tree/unique-identifier-2.html:
* web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
* web-platform-tests/mathml/relations/text-and-math/w3c-import.log:
* web-platform-tests/mathml/tools/utils/w3c-import.log:
* web-platform-tests/mathml/tools/w3c-import.log:
* web-platform-tests/mathml/w3c-import.log:

LayoutTests:

We removed some fraction tests that have equivalent WPT tests.
Some of them were actually exported from WebKit to WPT in [1]
We also move tests for crashes/asserts/hangs to the top mathml/ directory.

[1] https://github.com/web-platform-tests/wpt/pull/15301

Patch by Frederic Wang <fwang@igalia.com> on 2019-02-26
Reviewed by Manuel Rego Casasnovas.

* mathml/fractions-invalid-expected.html: Moved to parent directory.
* mathml/fractions-invalid.html: Ditto.
* mathml/mfrac-nested-expected.txt: Ditto.
* mathml/mfrac-nested.html:  Ditto.
* mathml/presentation/fractions-box-expected.html: Removed. This is better tested by WPT
tests frac-parameters-1.html, frac-parameters-2.html, frac-1.html.
* mathml/presentation/fractions-box.html: Removed. Ditto.
* mathml/presentation/fractions-color-expected-mismatch.html: Removed. This is exported as
frac-color-001.html.
* mathml/presentation/fractions-color.html: Removed. Ditto.
* mathml/presentation/fractions-linethickness-expected.html: Removed. Covered by WPT tests
frac-linethickness-*.html.
* mathml/presentation/fractions-linethickness.html: Removed. Ditto.
* mathml/presentation/mfrac-linethickness1-expected-mismatch.html: Removed. Ditto.
* mathml/presentation/mfrac-linethickness1.html: Removed. Ditto.
* mathml/presentation/mfrac-linethickness2-expected.html: Removed. Ditto.
* mathml/presentation/mfrac-linethickness2.html: Removed. Ditto.
* mathml/presentation/mfrac-linethickness3-expected-mismatch.html: Removed. Ditto.
* mathml/presentation/mfrac-linethickness3.html: Removed. Ditto.
* mathml/presentation/fractions-mrow-expected.html: Removed. Exported as frac-mrow-001.html.
* mathml/presentation/fractions-mrow.html: Removed. Ditto.
* mathml/presentation/fractions-numalign-denomalign-expected.html: Removed. Exported as
frac-numalign-denomalign-001.html.
* mathml/presentation/fractions-numalign-denomalign.html: Removed. Ditto.
* mathml/presentation/fractions-vertical-alignment-expected.html: Removed. This is better
tests by WPT tests frac-parameters-1.html, frac-parameters-2.html, frac-1.html.
* mathml/presentation/fractions-vertical-alignment.html: Removed. Ditto.

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

7 months ago[EGL] Runtime support for RGB565 pixel layout
philn@webkit.org [Tue, 26 Feb 2019 15:11:29 +0000 (15:11 +0000)]
[EGL] Runtime support for RGB565 pixel layout
https://bugs.webkit.org/show_bug.cgi?id=194817

Reviewed by Carlos Garcia Campos.

Currently our graphics pipeline always relies on a ARGB8888 (32
bpp) pixel configuration. On some low-end (old) embedded platforms
the graphics driver is sometimes optimized for 16 bpp
configurations, such as RGB565. On those platforms the application
can now set the WEBKIT_EGL_PIXEL_LAYOUT environment variable to
"RGB565" to adjust to the best pixel configuration supported by
the screen and graphics driver.

* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::getEGLConfig):

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

7 months ago[JSC] Fix compilation on 32-bit platforms after r242071
guijemont@igalia.com [Tue, 26 Feb 2019 10:28:42 +0000 (10:28 +0000)]
[JSC] Fix compilation on 32-bit platforms after r242071
https://bugs.webkit.org/show_bug.cgi?id=195042

Reviewed by Carlos Garcia Campos.

* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitLoadStructure):

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

7 months ago[WPE] Add API for webview background color configuration
carlosgc@webkit.org [Tue, 26 Feb 2019 09:55:42 +0000 (09:55 +0000)]
[WPE] Add API for webview background color configuration
https://bugs.webkit.org/show_bug.cgi?id=192305

Source/WebCore:

Reviewed by Michael Catanzaro.

Adapt the FrameView API to allow a default non-white background color.

* page/Frame.cpp:
(WebCore::Frame::createView): Replace isTransparent argument with a background color one.
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::recalculateBaseBackgroundColor): Use Color::transparent if m_isTransparent is true.
(WebCore::FrameView::updateBackgroundRecursively): Allow the fallback background color to be non-white, this is
used only in non-dark-mode-css build configurations.
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::setViewIsTransparent): Use Color::transparent if transparent is true.

Source/WebKit:

Reviewed by Michael Catanzaro.

In the case of WPE we need to send the background color to the web process to be used as the background color of
the page. This patch adapts the GTK+ implementation to do the same, since it's a lot simpler. The patch also
removes the SetDrawsBackground message in favor of the new SetBackgroundColor message that receives an optional
color.

* PlatformWPE.cmake: Add new WPE API for WebKitColor boxed type.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): Remove background rendering and opacity handling.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::renderLayerTree): Remove drawsBakground and always clear the context with
transparent color.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const): Replace drawsBackground with backgroundColor.
(WebKit::WebPageCreationParameters::decode): Ditto.
* Shared/WebPageCreationParameters.h:
* SourcesWPE.txt:
* UIProcess/API/glib/WebKitWebView.cpp:
* UIProcess/API/gtk/WebKitWebViewGtk.cpp:
(webkit_web_view_set_background_color):
(webkit_web_view_get_background_color):
* UIProcess/API/wpe/WebKitColor.cpp: Added.
(webkit_color_copy):
(webkit_color_free):
(webkitColorToWebCoreColor):
(webkitColorFillFromWebCoreColor):
(webkit_color_parse):
* UIProcess/API/wpe/WebKitColor.h: Added.
* UIProcess/API/wpe/WebKitColorPrivate.h: Added.
* UIProcess/API/wpe/WebKitWebView.h: Implement webkit_web_view_set_background_color API.
* UIProcess/API/wpe/WebKitWebViewWPE.cpp: Ditto.
(webkit_web_view_set_background_color):
(webkit_web_view_get_background_color):
* UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Add new symbols.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setDrawsBackground): Set a transparent background color when false is passed.
(WebKit::WebPageProxy::setBackgroundColor): Send background color to the WebProcess.
(WebKit::WebPageProxy::creationParameters): Replace drawsBackground with backgroundColor.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::drawsBackground const):
(WebKit::WebPageProxy::backgroundColor const):
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate): Remove GTK+ code to handle background color.
* UIProcess/gtk/AcceleratedBackingStore.cpp:
* UIProcess/gtk/AcceleratedBackingStore.h: Make paint() pure virtual and remove the implementation.
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::paint): Dot not call AcceleratedBackingStore::paint() now that is pure virtual.
* UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
(WebKit::AcceleratedBackingStoreX11::paint): Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Use background color as provided by the
UIProcess when creating the FrameView.
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
* WebProcess/WebPage/AcceleratedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::setIsDiscardable):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display): Remove special case for transparent background.
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setBackgroundColor): New API for background color configuration. Proxies to FrameView and DrawingArea.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::backgroundColor const): Read-only access to the current background color.
* WebProcess/WebPage/WebPage.messages.in: Replace SetDrawsBackground message with SetBackgroundColor.

Source/WebKitLegacy/win:

Patch by Philippe Normand <pnormand@igalia.com> on 2019-02-26
Reviewed by Michael Catanzaro.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::transitionToCommittedForNewPage): Create
FrameView with background color.

Tools:

Patch by Philippe Normand <pnormand@igalia.com> on 2019-02-26
Reviewed by Michael Catanzaro.

* MiniBrowser/wpe/main.cpp:
(main): Add a new option to configure the webview background
color. Example: --bg-color=transparent.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewBackgroundColor): Enable background color API tests for WPE.
(beforeAll): Ditto.

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

7 months ago[JSC] Repeat string created from Array.prototype.join() take too much memory
guijemont@igalia.com [Tue, 26 Feb 2019 08:50:48 +0000 (08:50 +0000)]
[JSC] Repeat string created from Array.prototype.join() take too much memory
https://bugs.webkit.org/show_bug.cgi?id=193912

Reviewed by Saam Barati.

JSTests:

Added a test and a microbenchmark for corner cases of
Array.prototype.join() with an uninitialized array.

* microbenchmarks/array-prototype-join-uninitialized.js: Added.
* stress/array-prototype-join-uninitialized.js: Added.
(testArray):
(testABC):
(B):
(C):

Source/JavaScriptCore:

Added a fast case in Array.prototype.join when the array is
uninitialized.

* runtime/ArrayPrototype.cpp:
(JSC::canUseFastJoin):
(JSC::fastJoin):
* runtime/JSStringInlines.h:
(JSC::repeatCharacter): moved from StringPrototype.cpp
* runtime/StringPrototype.cpp:

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

7 months agoWeb Inspector: navigation sidebar says "No Search Results" when a slow search is...
drousso@apple.com [Tue, 26 Feb 2019 08:14:57 +0000 (08:14 +0000)]
Web Inspector: navigation sidebar says "No Search Results" when a slow search is in progress
https://bugs.webkit.org/show_bug.cgi?id=170631
<rdar://problem/29473874>

Reviewed by Joseph Pecoraro.

Keep a count of all the backend commands (increment when firing, decrement when a result is
sent back to the frontend). Once the count comes back to `0`, attempt to show the "No Results"
placeholder, since we will have finished searching at that point. Since commands can be called
as a result of other commands, using `Promise.all` isn't possible.

* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
(WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
(WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
Drive-by: replace `bind` calls with arrow functions, and use for-of loops.
* Localizations/en.lproj/localizedStrings.js:

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

7 months agoWeb Inspector: Canvas: if no auto-capture value is specified, don't force the input...
drousso@apple.com [Tue, 26 Feb 2019 08:11:37 +0000 (08:11 +0000)]
Web Inspector: Canvas: if no auto-capture value is specified, don't force the input to have "0" as the value
https://bugs.webkit.org/show_bug.cgi?id=194950
<rdar://problem/48276798>

Reviewed by Joseph Pecoraro.

Create a getter/setter for the value of the auto-capture frame count <input> so that all
code follows the same path.

If the <input> currently has no content and the frame count is 0, only set the placeholder.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
(WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
(WI.CanvasOverviewContentView.prototype.get _recordingAutoCaptureFrameCountInputElementValue): Added.
(WI.CanvasOverviewContentView.prototype.set _recordingAutoCaptureFrameCountInputElementValue): Added.
(WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
(WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):

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

7 months agoWeb Inspector: Console: dragging a selection outside the selected element clears...
drousso@apple.com [Tue, 26 Feb 2019 08:00:26 +0000 (08:00 +0000)]
Web Inspector: Console: dragging a selection outside the selected element clears the selection
https://bugs.webkit.org/show_bug.cgi?id=194660
<rdar://problem/46719239>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._mousemove):
Don't clear the selection if the target of the "mousemove" is outside of the view.

(WI.LogContentView.prototype._updateMessagesSelection):
Drive-by: clear the saved selected messages when we're just selecting a single message.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242078 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 months agoWeb Inspector: Rename LineChart to AreaChart
joepeck@webkit.org [Tue, 26 Feb 2019 07:38:55 +0000 (07:38 +0000)]
Web Inspector: Rename LineChart to AreaChart
https://bugs.webkit.org/show_bug.cgi?id=195038

Rubber-stamped by Matt Baker.

* UserInterface/Main.html:
New file names.

* UserInterface/Views/AreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LineChart.js.
* UserInterface/Views/StackedAreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js.
Renamed.

* UserInterface/Views/CPUTimelineView.css:
* UserInterface/Views/CPUUsageStackedView.css:
* UserInterface/Views/CPUUsageStackedView.js:
* UserInterface/Views/CPUUsageView.css:
* UserInterface/Views/CPUUsageView.js:
* UserInterface/Views/LegacyCPUTimelineView.css:
* UserInterface/Views/MemoryCategoryView.css:
* UserInterface/Views/MemoryCategoryView.js:
* UserInterface/Views/MemoryTimelineOverviewGraph.css:
Update references.

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

7 months agoWeb Inspector: hovering a node inside an object preview should highlight it
drousso@apple.com [Tue, 26 Feb 2019 07:36:29 +0000 (07:36 +0000)]
Web Inspector: hovering a node inside an object preview should highlight it
https://bugs.webkit.org/show_bug.cgi?id=194862
<rdar://problem/48246433>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/FormattedValue.js:
(WI.FormattedValue.createElementForNodePreview):
When provided a way to access the `WI.RemoteObject` for the given preview, add various mouse
event listeners that highlight the corresponding DOM node.

* UserInterface/Views/ObjectPreviewView.js:
(WI.ObjectPreviewView):
(WI.ObjectPreviewView.prototype._initTitleElement):
(WI.ObjectPreviewView.prototype._appendPropertyPreviews):
(WI.ObjectPreviewView.prototype._appendValuePreview):
Implement various ways of getting the `WI.RemoteObject` for a given preview.
 - When the preview is for the actual `WI.RemoteObject`, simply return it
 - If the preview is a property of the main object, get the `WI.RemoteObject` for that property

* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WI.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
Pass the `WI.RemoteObject` to the preview so that it can utilize it.

* UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager):
(WI.ConsoleManager.prototype.releaseRemoteObjectWithConsoleClear): Added.
(WI.ConsoleManager.prototype.messagesCleared): Added.

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

7 months agoFix WTFLogVerbose variadic parameters forwarding
calvaris@igalia.com [Tue, 26 Feb 2019 06:44:06 +0000 (06:44 +0000)]
Fix WTFLogVerbose variadic parameters forwarding
https://bugs.webkit.org/show_bug.cgi?id=194920

Reviewed by Alex Christensen.

WTFLogVerbose was passing the va_list to WTFLog but this function
also used variadic parameters and this is not allowed in C (that
part of the code is extern "C").

* wtf/Assertions.cpp:
(WTF::WTFLogVaList): Created to take a va_list argument instead of
variadic parameters.
(WTF::WTFLog): Kept with variadic parameters, which are
transformed to va_list and passed to WTFLogVaList.
(WTF::WTFLogVerbose): Use WTFLogVaList instead of WTFLog.

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

7 months agoWeb Inspector: CPU Usage Timeline - Thread Breakdown
joepeck@webkit.org [Tue, 26 Feb 2019 06:36:34 +0000 (06:36 +0000)]
Web Inspector: CPU Usage Timeline - Thread Breakdown
https://bugs.webkit.org/show_bug.cgi?id=194788

Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and files.

* UserInterface/Views/Variables.css:
(:root):
New colors for cpu threads / activity breakdown.

* UserInterface/Models/CPUTimelineRecord.js:
(WI.CPUTimelineRecord.prototype.get workers):
(WI.CPUTimelineRecord):
Distinguish the workers in a CPU timeline record.

* UserInterface/Views/CPUTimelineOverviewGraph.js:
(WI.CPUTimelineOverviewGraph):
(WI.CPUTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/CPUTimelineOverviewGraph.css:
(.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect):
(.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
(.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
(.timeline-overview-graph.cpu > .column-chart > svg > rect):
Stacked column chart for CPU in the overview graph.

* UserInterface/Views/CPUTimelineView.css:
(.timeline-view.cpu > .content > .overview):
(.timeline-view.cpu > .content > .details > .subtitle.threads):
(.timeline-view.cpu > .content > .overview > .chart):
(.timeline-view.cpu > .content > .overview > .chart > .subtitle):
(.timeline-view.cpu > .content > .overview > .chart > .container):
(.timeline-view.cpu > .content > .overview .samples,):
(.timeline-view.cpu .legend):
(.timeline-view.cpu .legend .row):
(.timeline-view.cpu .legend .row + .row):
(.timeline-view.cpu .legend .swatch):
(.timeline-view.cpu .legend > .row > .swatch.sample-type-idle):
(.timeline-view.cpu .legend > .row > .swatch.sample-type-script):
(.timeline-view.cpu .legend > .row > .swatch.sample-type-style):
(.timeline-view.cpu .legend > .row > .swatch.sample-type-layout):
(.timeline-view.cpu .legend > .row > .swatch.sample-type-paint):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-idle):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-style):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-layout):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-paint):
(.timeline-view.cpu svg > path):
(.timeline-view.cpu .main-thread svg > path,):
(.timeline-view.cpu .worker-thread svg > path,):
(.timeline-view.cpu .cpu-usage-view.empty):
(.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers):
(.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div):
(.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div > .label):
(.timeline-view.cpu > .content): Deleted.
(.cpu-usage-view .line-chart > svg > path): Deleted.
(.timeline-view.cpu .legend > .row > .swatch.current): Deleted.
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView):
(WI.CPUTimelineView.displayNameForSampleType):
(WI.CPUTimelineView.prototype.shown):
(WI.CPUTimelineView.prototype.clear.clearUsageView):
(WI.CPUTimelineView.prototype.clear):
(WI.CPUTimelineView.prototype.initialLayout.createChartContainer):
(WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
(WI.CPUTimelineView.prototype.initialLayout):
(WI.CPUTimelineView.prototype.layout.removeGreaterThan):
(WI.CPUTimelineView.prototype.layout):
(WI.CPUTimelineView.prototype.layout.layoutView):
(WI.CPUTimelineView.prototype.layout.yScale):
(WI.CPUTimelineView.prototype._computeSamplingData.markRecordEntries):
(WI.CPUTimelineView.prototype._computeSamplingData):
(WI.CPUTimelineView.prototype._removeWorkerThreadViews):
(WI.CPUTimelineView.prototype._clearBreakdownLegend):
(WI.CPUTimelineView.prototype.layout.xScale): Deleted.
Line charts and Circle Chart for threads and breakdowns.

* UserInterface/Views/CPUUsageStackedView.css:
(.cpu-usage-stacked-view):
(.cpu-usage-stacked-view > .details):
(body[dir=ltr] .cpu-usage-stacked-view > .details):
(body[dir=rtl] .cpu-usage-stacked-view > .details):
(.cpu-usage-stacked-view > .details > .name):
(body[dir=rtl] .cpu-usage-stacked-view > .graph):
(.cpu-usage-stacked-view > .graph):
(.cpu-usage-stacked-view > .graph,):
* UserInterface/Views/CPUUsageStackedView.js:
(WI.CPUUsageStackedView):
(WI.CPUUsageStackedView.prototype.get chart):
(WI.CPUUsageStackedView.prototype.clear):
(WI.CPUUsageStackedView.prototype.updateChart):
(WI.CPUUsageStackedView.prototype._updateDetails):
Same as CPUUsageView except Stacked for the total.

* UserInterface/Views/CPUUsageView.css:
(.cpu-usage-view):
(.cpu-usage-view > .details):
(.cpu-usage-view > .details > .name):
(.cpu-usage-view > .graph):
* UserInterface/Views/CPUUsageView.js:
(WI.CPUUsageView):
(WI.CPUUsageView.prototype.get chart):
(WI.CPUUsageView.prototype.clear):
(WI.CPUUsageView.prototype.updateChart):
(WI.CPUUsageView.prototype._updateDetails):
Slight modifications for the new UI.

* UserInterface/Views/LegacyCPUTimelineView.css:
(.timeline-view.legacy-cpu .cpu-usage-view .line-chart > svg > path):
* UserInterface/Views/LegacyCPUTimelineView.js:
(WI.LegacyCPUTimelineView.prototype.layout):
Update API calls in the legacy view for minor changes.

* UserInterface/Views/MemoryCategoryView.css:
(.memory-category-view > .details):
(.memory-category-view > .details > .name):
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WI.MemoryTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/MemoryTimelineView.css:
(body .timeline-view.memory):
(.timeline-view.memory): Deleted.
Improvements ported from the CPU timeline views.

* UserInterface/Views/StackedColumnChart.js: Added.
(WI.StackedColumnChart):
(WI.StackedColumnChart.prototype.get size):
(WI.StackedColumnChart.prototype.set size):
(WI.StackedColumnChart.prototype.initializeSections):
(WI.StackedColumnChart.prototype.addColumnSet):
(WI.StackedColumnChart.prototype.clear):
(WI.StackedColumnChart.prototype.layout):
A stacked column chart implementation.

* UserInterface/Views/View.js:
(WI.View.prototype.removeUnparentedSubview):
Add a way to remove a subview that had its `element` moved
someplace other than a direct child of our element.

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

7 months agoWeb Inspector: Dark Mode: Network Overview Graph segments have distracting white...
joepeck@webkit.org [Tue, 26 Feb 2019 06:36:28 +0000 (06:36 +0000)]
Web Inspector: Dark Mode: Network Overview Graph segments have distracting white box shadow
https://bugs.webkit.org/show_bug.cgi?id=194966

Reviewed by Devin Rousso.

* UserInterface/Views/Variables.css:
(@media (prefers-color-scheme: dark)):
Make global timeline even/odd colors where odd is the default content background
color and even is slightly different. These were used in multiple places.

* UserInterface/Views/CPUTimelineOverviewGraph.css:
(.timeline-overview-graph.cpu > .legend):
(.timeline-overview-graph.cpu:nth-child(even) > .legend):
(@media (prefers-color-scheme: dark)): Deleted.
* UserInterface/Views/MemoryTimelineOverviewGraph.css:
(.timeline-overview-graph.memory > .legend):
(.timeline-overview-graph.memory:nth-child(even) > .legend):
(@media (prefers-color-scheme: dark)): Deleted.
* UserInterface/Views/NetworkTimelineOverviewGraph.css:
(.timeline-overview-graph.network > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
(.timeline-overview-graph.network:nth-child(even) > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
Use the variable colors now and eliminate dark mode blocks.

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

7 months agoAdd some randomness into the StructureID.
mark.lam@apple.com [Tue, 26 Feb 2019 05:54:22 +0000 (05:54 +0000)]
Add some randomness into the StructureID.
https://bugs.webkit.org/show_bug.cgi?id=194989
<rdar://problem/47975563>

Reviewed by Yusuke Suzuki.

1. On 64-bit, the StructureID will now be encoded as:

    ----------------------------------------------------------------
    | 1 Nuke Bit | 24 StructureIDTable index bits | 7 entropy bits |
    ----------------------------------------------------------------

   The entropy bits are chosen at random and assigned when a StructureID is
   allocated.

2. Instead of Structure pointers, the StructureIDTable will now contain
   encodedStructureBits, which is encoded as such:

    ----------------------------------------------------------------
    | 7 entropy bits |                   57 structure pointer bits |
    ----------------------------------------------------------------

   The entropy bits here are the same 7 bits used in the encoding of the
   StructureID for this structure entry in the StructureIDTable.

3. Retrieval of the structure pointer given a StructureID is now computed as
   follows:

        index = structureID >> 7; // with arithmetic shift.
        encodedStructureBits = structureIDTable[index];
        structure = encodedStructureBits ^ (structureID << 57);

    We use an arithmetic shift for the right shift because that will preserve
    the nuke bit in the high bit of the index if the StructureID was not
    decontaminated before use as expected.

4. Remove unused function loadArgumentWithSpecificClass() in SpecializedThunkJIT.

5. Define StructureIDTable::m_size to be the number of allocated StructureIDs
   instead of always being the same as m_capacity.

6. Change StructureIDTable::s_unusedID's value to 0.

   Its previous value of unusedPointer i.e. 0xd1e7beef, does not make sense for
   StructureID on 64-bit.  Also, there was never any code that initializes unused
   IDs to the s_unusedID.  The only meaningful value for s_unusedID is 0, which
   is the ID we'll get when the freelist is empty, prompting a resize of the
   structureIDTable.

This patch appears to be perf neutral on JetStream 2 run via the cli on a
11" MacBook Air, 13" MacBook Pro, iPhone 6S, and iPhone XR.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::loadStructure):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendJSCellOrAuxiliary):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitLoadStructure):
* jit/AssemblyHelpers.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::loadArgumentWithSpecificClass): Deleted.
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/StructureIDTable.cpp:
(JSC::StructureIDTable::StructureIDTable):
(JSC::StructureIDTable::makeFreeListFromRange):
(JSC::StructureIDTable::resize):
(JSC::StructureIDTable::allocateID):
(JSC::StructureIDTable::deallocateID):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::decode):
(JSC::StructureIDTable::encode):
(JSC::StructureIDTable::get):
(JSC::StructureIDTable::isValid):

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

7 months ago[JSC] Revert r226885 to make SlotVisitor creation lazy
ysuzuki@apple.com [Tue, 26 Feb 2019 05:37:52 +0000 (05:37 +0000)]
[JSC] Revert r226885 to make SlotVisitor creation lazy
https://bugs.webkit.org/show_bug.cgi?id=195013

Reviewed by Saam Barati.

We once changed SlotVisitor creation apriori to drop the lock. Also, it turns out that SlotVisitor is memory-consuming.
We should defer SlotVisitor creation until it is actually required. This patch reverts r226885. Even with this patch,
we still hold many SlotVisitors after we execute many parallel markers at least once. But recovering the feature of
dynamically allocating SlotVisitors helps further memory optimizations in this area.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::runBeginPhase):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::forEachSlotVisitor):
(JSC::Heap::numberOfSlotVisitors):
* heap/MarkingConstraintSolver.cpp:
(JSC::MarkingConstraintSolver::didVisitSomething const):
* heap/SlotVisitor.h:

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

7 months agoscalableNativeWebpageParameters() is not preserved on new page navigation.
commit-queue@webkit.org [Tue, 26 Feb 2019 04:37:59 +0000 (04:37 +0000)]
scalableNativeWebpageParameters() is not preserved on new page navigation.
https://bugs.webkit.org/show_bug.cgi?id=194892
<rdar://problem/47538280>

Source/WebCore:

If a page's current default viewport configuration is scalableNativeWebpageParameters due to
the fact that m_canIgnoreScalingConstraints is true, loading a new page should preserve this
configuration until we derive the right values from viewport meta-tag.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-02-25
Reviewed by Wenson Hsieh.

Test: fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::canOverrideConfigurationParameters const): Use fixedNativeWebpageParameters().
(WebCore::ViewportConfiguration::updateDefaultConfiguration): Use nativeWebpageParameters.
(WebCore::ViewportConfiguration::nativeWebpageParameters): Return the appropriate default configuration
    based on m_canIgnoreScalingConstraints and shouldIgnoreMinimumEffectiveDeviceWidth().
(WebCore::ViewportConfiguration::fixedNativeWebpageParameters): Renamed from nativeWebpageParameters()
(WebCore::ViewportConfiguration::scalableNativeWebpageParameters): Use fixedNativeWebpageParameters.
* page/ViewportConfiguration.h: Make nativeWebpageParameters() an instance method and change the old
    static method to fixedNativeWebpageParameters which better reflects the actual behavior.

Source/WebKit:

If a page's current default viewport configuration is scalableNativeWebpageParameters due to
the fact that m_canIgnoreScalingConstraints is true, loading a new page should preserve this
configuration until we derive the right values from viewport meta-tag.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-02-25
Reviewed by Wenson Hsieh.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::resetViewportDefaultConfiguration): Use nativeWebpageParameters() instance method to
    get the appropriate default configuration.

Tools:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-02-25
Reviewed by Wenson Hsieh.

Allow UIScriptController to set WKWebView's _allowsViewportShrinkToFit property with a new `setAllowsViewportShrinkToFit` method.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setAllowsViewportShrinkToFit):
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::allowsViewportShrinkToFit):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setAllowsViewportShrinkToFit):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/UIScriptControllerCocoa.mm:
(WTR::UIScriptController::setAllowsViewportShrinkToFit):

LayoutTests:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-02-25
Reviewed by Wenson Hsieh.

* fast/viewport/ios/resources/go-back.html: Added.
* fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation-expected.txt: Added.
* fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html: Added.
* fast/viewport/ios/minimum-scale-after-changing-view-scale.html: When shouldIgnoreMetaViewport
    setting is on, for pages don't have viewport meta-tag, the default configuration is now
    changed to scalableNativeWebpageParameters(). The original test was under the assumption
    that the default configuration is always fixedNativeWebpageParameters(). To keep the test
    still valid, add a viewport meta-tag to it.
* resources/ui-helper.js:
(window.UIHelper.setAllowsViewportShrinkToFit):

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

7 months agotestb3 and testair should test O0/O1/O2
sbarati@apple.com [Tue, 26 Feb 2019 03:16:44 +0000 (03:16 +0000)]
testb3 and testair should test O0/O1/O2
https://bugs.webkit.org/show_bug.cgi?id=194637

Reviewed by Mark Lam.

This patch makes it so that we run all tests in testair and testb3
in O0, O1, and O2. However, some tests are invalid for O0 and O1.
This patch makes it so we only run those tests in O2. These are
often tests that assert certain optimizations have occurred. There
are also a class of tests that rely on using patchpoints to stress
the register allocator into only a single valid allocation. The
O0, and sometimes O1, register allocators are not always good enough
to allocate such programs. To make these valid allocators to use, we rely
on the FTL and Wasm to not emit such patchpoints.

* b3/air/testair.cpp:
(main):
* b3/testb3.cpp:
(JSC::B3::compileProc):
(JSC::B3::testAddLoadTwice):
(JSC::B3::testMulLoadTwice):
(JSC::B3::testSimplePatchpointWithOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersFPArgs):
(JSC::B3::testPatchpointWithEarlyClobber):
(JSC::B3::testSimpleCheck):
(JSC::B3::testCheckFalse):
(JSC::B3::testCheckTrue):
(JSC::B3::testCheckLessThan):
(JSC::B3::testCheckMegaCombo):
(JSC::B3::testCheckTrickyMegaCombo):
(JSC::B3::testCheckTwoMegaCombos):
(JSC::B3::testCheckTwoNonRedundantMegaCombos):
(JSC::B3::testCheckAddImm):
(JSC::B3::testCheckAddImmCommute):
(JSC::B3::testCheckAddImmSomeRegister):
(JSC::B3::testCheckAdd):
(JSC::B3::testCheckAdd64):
(JSC::B3::testCheckAddFold):
(JSC::B3::testCheckAddFoldFail):
(JSC::B3::testCheckAddSelfOverflow64):
(JSC::B3::testCheckAddSelfOverflow32):
(JSC::B3::testCheckSubImm):
(JSC::B3::testCheckSubBadImm):
(JSC::B3::testCheckSub):
(JSC::B3::testCheckSub64):
(JSC::B3::testCheckSubFold):
(JSC::B3::testCheckSubFoldFail):
(JSC::B3::testCheckNeg):
(JSC::B3::testCheckNeg64):
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul2):
(JSC::B3::testCheckMul64):
(JSC::B3::testCheckMulFold):
(JSC::B3::testCheckMulFoldFail):
(JSC::B3::testCheckMul64SShr):
(JSC::B3::testLinearScanWithCalleeOnStack):
(JSC::B3::testCheckSelect):
(JSC::B3::testCheckSelectCheckSelect):
(JSC::B3::testCheckSelectAndCSE):
(JSC::B3::testLateRegister):
(JSC::B3::testReduceStrengthCheckBottomUseInAnotherBlock):
(JSC::B3::testSomeEarlyRegister):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled2):
(JSC::B3::testPinRegisters):
(JSC::B3::testX86LeaAddAddShlLeft):
(JSC::B3::testX86LeaAddAddShlRight):
(JSC::B3::testX86LeaAddAdd):
(JSC::B3::testX86LeaAddShlRight):
(JSC::B3::testX86LeaAddShlLeftScale1):
(JSC::B3::testX86LeaAddShlLeftScale2):
(JSC::B3::testX86LeaAddShlLeftScale4):
(JSC::B3::testX86LeaAddShlLeftScale8):
(JSC::B3::testLoadBaseIndexShift2):
(JSC::B3::testOptimizeMaterialization):
(JSC::B3::testLICMPure):
(JSC::B3::testLICMPureSideExits):
(JSC::B3::testLICMPureWritesPinned):
(JSC::B3::testLICMPureWrites):
(JSC::B3::testLICMReadsPinned):
(JSC::B3::testLICMReads):
(JSC::B3::testLICMPureNotBackwardsDominant):
(JSC::B3::testLICMPureNotBackwardsDominantFoiledByChild):
(JSC::B3::testLICMControlDependent):
(JSC::B3::testLICMControlDependentNotBackwardsDominant):
(JSC::B3::testLICMReadsWritesDifferentHeaps):
(JSC::B3::testWasmBoundsCheck):
(JSC::B3::run):
(main):

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

7 months ago[JSC] stress/function-constructor-reading-from-global-lexical-environment.js fails...
ysuzuki@apple.com [Tue, 26 Feb 2019 02:59:47 +0000 (02:59 +0000)]
[JSC] stress/function-constructor-reading-from-global-lexical-environment.js fails in 32bit arch
https://bugs.webkit.org/show_bug.cgi?id=195030
<rdar://problem/48385088>

Reviewed by Saam Barati.

While LLInt64 has checkTDZInGlobalPutToScopeIfNecessary for op_put_to_scope GlobalLexicalVar to check the value in the variable slot is not empty,
this check is missing in LLInt32_64. Previously, this check was subsumed accidentally by the WatchpointSet check in GlobalLexicalVar in `notifyWrite`:
because no "put" attempt succeeds here, the status WatchpointSet was ClearWatchpoint, we always go to the slow path, and we always throw the TDZ error
before configuring the WatchpointSet in the slow path. But after r241862, WatchpointSet is not used under non-JIT configuration. This skips WatchpointSet
check and LLInt32_64 starts failing tests because of lack of checkTDZInGlobalPutToScopeIfNecessary. This patch adds checkTDZInGlobalPutToScopeIfNecessary
in LLInt32_64 too. This patch fixes the following four failing tests.

    stress/function-constructor-reading-from-global-lexical-environment.js.bytecode-cache
    stress/function-constructor-reading-from-global-lexical-environment.js.default
    stress/global-lexical-variable-tdz.js.bytecode-cache
    stress/global-lexical-variable-tdz.js.default

* llint/LowLevelInterpreter32_64.asm:

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

7 months ago[ews-app] Add model for handling multiple Buildbot instances
aakash_jain@apple.com [Tue, 26 Feb 2019 02:55:03 +0000 (02:55 +0000)]
[ews-app] Add model for handling multiple Buildbot instances
https://bugs.webkit.org/show_bug.cgi?id=194863

Reviewed by Stephanie Lewis.

* BuildSlaveSupport/ews-app/ews/models/buildbotinstance.py: Added.

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

7 months ago[ews-app] Remove BuilderMapping table
aakash_jain@apple.com [Tue, 26 Feb 2019 02:52:33 +0000 (02:52 +0000)]
[ews-app] Remove BuilderMapping table
https://bugs.webkit.org/show_bug.cgi?id=194961

Reviewed by Stephanie Lewis.

Store builder name directly in build table, instead of having a separate
table for it.

* BuildSlaveSupport/ews-app/ews/models/__init__.py:
* BuildSlaveSupport/ews-app/ews/models/build.py:
* BuildSlaveSupport/ews-app/ews/models/buildermapping.py: Removed.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

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

7 months ago[JSC] Make Intl fields lazily-allocated
ysuzuki@apple.com [Tue, 26 Feb 2019 02:13:10 +0000 (02:13 +0000)]
[JSC] Make Intl fields lazily-allocated
https://bugs.webkit.org/show_bug.cgi?id=195022

Reviewed by Mark Lam.

This patch makes the following memory footprint optimization in IntlObject.

1. Make IntlObject fields including Intl.Collator lazily-allocated because we already removed direct references from JS builtins to these constructors (@Collator etc.).

2. Move LazyProperty<IntlObject, Structure> structures from IntlObject to JSGlobalObject. This makes sizeof(IntlObject) the same to the other ones of usual runtime Objects,
   and drop one MarkedBlock.

* runtime/IntlCollatorConstructor.h:
* runtime/IntlDateTimeFormatConstructor.h:
* runtime/IntlNumberFormatConstructor.h:
* runtime/IntlObject.cpp:
(JSC::createCollatorConstructor):
(JSC::createNumberFormatConstructor):
(JSC::createDateTimeFormatConstructor):
(JSC::createPluralRulesConstructor):
(JSC::IntlObject::finishCreation):
(JSC::IntlObject::visitChildren): Deleted.
* runtime/IntlObject.h:
* runtime/IntlPluralRulesConstructor.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
(JSC::JSGlobalObject::defaultCollator):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::collatorStructure):
(JSC::JSGlobalObject::numberFormatStructure):
(JSC::JSGlobalObject::dateTimeFormatStructure):
(JSC::JSGlobalObject::pluralRulesStructure):
(JSC::JSGlobalObject::intlObject const): Deleted.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncDateTimeFormat):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToLocaleString):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncLocaleCompare):

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

7 months agoWeb Inspector: Styles: Command-/ should toggle edited property
nvasilyev@apple.com [Tue, 26 Feb 2019 01:50:44 +0000 (01:50 +0000)]
Web Inspector: Styles: Command-/ should toggle edited property
https://bugs.webkit.org/show_bug.cgi?id=194967
<rdar://problem/48329852>

Reviewed by Devin Rousso.

* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.commentOut):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype._toggle):
(WI.SpreadsheetStyleProperty.prototype._select):

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

7 months agoWeb Inspector: REGRESSION(r242018): Timelines shows no results
drousso@apple.com [Tue, 26 Feb 2019 01:06:40 +0000 (01:06 +0000)]
Web Inspector: REGRESSION(r242018): Timelines shows no results
https://bugs.webkit.org/show_bug.cgi?id=195017

Reviewed by Joseph Pecoraro.

`simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.

* UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.prototype.regExpForString):
Add assertions that the provided search query is a valid non-empty string.

* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._updateFilter):
If the search query is empty, don't attempt to create a `RegExp` for it.

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

7 months ago[ContentChangeObserver] Move observing logic from DOMWindow::clearTimeout to ContentC...
zalan@apple.com [Tue, 26 Feb 2019 00:20:55 +0000 (00:20 +0000)]
[ContentChangeObserver] Move observing logic from DOMWindow::clearTimeout to ContentChangeObserver
https://bugs.webkit.org/show_bug.cgi?id=194988
<rdar://problem/48343040>

Reviewed by Tim Horton.

ContentChangeObserver::removeDOMTimer takes care of the canceled timer removal.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::clearTimeout):
* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::ContentChangeObserver::startObservingDOMTimer):
(WebCore::ContentChangeObserver::stopObservingDOMTimer):
(WebCore::ContentChangeObserver::removeDOMTimer):

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

7 months ago[iOS] Adjust initial scale zooming heuristics when changing view scale
wenson_hsieh@apple.com [Tue, 26 Feb 2019 00:19:49 +0000 (00:19 +0000)]
[iOS] Adjust initial scale zooming heuristics when changing view scale
https://bugs.webkit.org/show_bug.cgi?id=194995

Reviewed by Tim Horton.

Source/WebKit:

Currently, we only zoom to the new initial scale iff we're exactly at initial scale before changing the view
scale. This was done so that if a user zoomed in really far and then increased the view scale, we wouldn't end
up zooming out as a result. However, this leads to confusing behavior in the case where the user has manually
changed the zoom scale to something close to (but not exactly) initial scale, and then attempts to zoom in
further using view scale. In this case, we'll end up keeping page scale the same, so it looks like nothing is
happening.

To fix this, we tweak our heuristics for determining whether to jump to initial scale; if the view scale is
increasing and the new initial scale is greater than the current scale, zoom to initial scale. Likewise, if the
view scale is decreasing and the new initial scale is less than the current scale, zoom to initial scale.

Test: fast/viewport/ios/initial-scale-after-changing-view-scale.html

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationViewLayoutSize):

LayoutTests:

Rebaseline and adjust an existing layout test.

* fast/viewport/ios/initial-scale-after-changing-view-scale-expected.txt:
* fast/viewport/ios/initial-scale-after-changing-view-scale.html:
* platform/ipad/fast/viewport/ios/initial-scale-after-changing-view-scale-expected.txt: Removed.

Removed an iPad-specific test expectation, since initial scale zooming behavior should be the same now at both
device dimensions.

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

7 months ago[ContentChangeObserver] Move observing logic from DOMTimer to ContentChangeObserver
zalan@apple.com [Mon, 25 Feb 2019 23:11:19 +0000 (23:11 +0000)]
[ContentChangeObserver] Move observing logic from DOMTimer to ContentChangeObserver
https://bugs.webkit.org/show_bug.cgi?id=194987
<rdar://problem/48342910>

Reviewed by Tim Horton.

Content obvservation logic should all move to the ContentChangeObserver class.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::contentChangeObserver):
* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::ContentChangeObserver::ContentChangeObserver):
(WebCore::ContentChangeObserver::registerDOMTimerForContentObservationIfNeeded):
(WebCore::ContentChangeObserver::startObservingDOMTimer):
(WebCore::ContentChangeObserver::stopObservingDOMTimer):
(WebCore::ContentChangeObserver::containsObservedDOMTimer):
(WebCore::ContentChangeObserver::addObservedDOMTimer):
(WebCore::ContentChangeObserver::removeObservedDOMTimer):

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

7 months agoWeb Inspector: REGRESSION: TreeElement or Table row selected using the keyboard shoul...
mattbaker@apple.com [Mon, 25 Feb 2019 22:22:56 +0000 (22:22 +0000)]
Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
https://bugs.webkit.org/show_bug.cgi?id=194918
<rdar://problem/48289314>

Reviewed by Devin Rousso.

* UserInterface/Views/Table.js:
(WI.Table.prototype.selectionControllerSelectionDidChange):

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._treeKeyDown):

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

7 months agoIntroduce and adopt new class RegistrableDomain for eTLD+1
wilander@apple.com [Mon, 25 Feb 2019 21:52:56 +0000 (21:52 +0000)]
Introduce and adopt new class RegistrableDomain for eTLD+1
https://bugs.webkit.org/show_bug.cgi?id=194791
<rdar://problem/48179240>

Reviewed by Alex Christensen, Fujii Hironori, and Brent Fulgham.

Source/WebCore:

A new API test was added. Plenty of existing layout tests under
http/tests/resourceLoadStatistics/ and http/tests/storageAccess/ test the code.

This patch introduces and adopts a new class called WebCore::RegistrableDomain
which represents a domain's eTLD+1 (effective top level domain plus one) and is
the basis for the term "site," as in same-site. Other popular names include
high-level domain, primary domain, and top privately controlled/owned domain.
Effective top level domains are enumerated on the Public Suffix List
(https://publicsuffix.org).

This class just uses the full domain for when the Public Suffix List cannot help
finding the registrable domain and for WebKit ports that haven't enabled
PUBLIC_SUFFIX_LIST. It also uses the string "nullOrigin" as a representation
for the null or unique origin (this matches how these origins were handled
before).

The implementation is a wrapper around a String and the functions and class
members that now make use of this new class used to handle regular String
objects which didn't help much in terms of type safety or guarantees that the
string had already been converted to an eTLD+1.

We've at least two bad bugs in the Storage Access API because of confusion
between a URL's eTLD+1 and its host. The usage of WebCore::RegistrableDomain
will prohibit such bugs in the future.

Partitioning in WebKit also uses eTLD+1 to a large extent. I plan to adopt
WebCore::RegistrableDomain for partitioning in a later patch.

This patch also enhances parameter naming by:
- Removing parts that refer to "primary" as in primaryDomain.
- Replacing references to "TopPrivatelyControlledDomain" with "RegistrableDomain."
- Replacing references to "TopPrivatelyOwnedDomain" with "RegistrableDomain."
- Using the term "domain" consistently instead of e.g. "host."

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::hasRequestedPageSpecificStorageAccessWithUserInteraction):
(WebCore::Document::setHasRequestedPageSpecificStorageAccessWithUserInteraction):
* dom/Document.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAdClickAttribution const):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaSessionTitle const):
* loader/AdClickAttribution.cpp:
(WebCore::AdClickAttribution::url const):
(WebCore::AdClickAttribution::referrer const):
(WebCore::AdClickAttribution::toString const):
* loader/AdClickAttribution.h:
(WebCore::AdClickAttribution::Source::Source):
(WebCore::AdClickAttribution::Source::matches const):
(WebCore::AdClickAttribution::Source::deleteValue):
(WebCore::AdClickAttribution::Destination::Destination):
(WebCore::AdClickAttribution::Destination::matches const):
(WebCore::AdClickAttribution::Destination::deleteValue):
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
(WebCore::ResourceLoadObserver::setLogUserInteractionNotificationCallback):
(WebCore::ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback):
(WebCore::ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback):
(WebCore::ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):
(WebCore::ResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebCore::ResourceLoadObserver::statisticsForOrigin):
(WebCore::primaryDomain): Deleted.
(WebCore::ResourceLoadObserver::ensureResourceStatisticsForPrimaryDomain): Deleted.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::encode const):
(WebCore::ResourceLoadStatistics::decode):
(WebCore::ResourceLoadStatistics::toString const):
(WebCore::ResourceLoadStatistics::merge):
(WebCore::ResourceLoadStatistics::primaryDomain): Deleted.
* loader/ResourceLoadStatistics.h:
(WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
* page/Page.cpp:
(WebCore::Page::logNavigation):
(WebCore::Page::mainFrameLoadStarted):
* page/Page.h:
* page/PerformanceMonitor.cpp:
(WebCore::reportPageOverPostLoadResourceThreshold):
* platform/RegistrableDomain.h: Added.
(WebCore::RegistrableDomain::RegistrableDomain):
(WebCore::RegistrableDomain::isEmpty const):
(WebCore::RegistrableDomain::string const):
(WebCore::RegistrableDomain::operator!= const):
(WebCore::RegistrableDomain::operator== const):
(WebCore::RegistrableDomain::matches const):
(WebCore::RegistrableDomain::isolatedCopy const):
(WebCore::RegistrableDomain::isHashTableDeletedValue const):
(WebCore::RegistrableDomain::hash const):
(WebCore::RegistrableDomain::RegistrableDomainHash::hash):
(WebCore::RegistrableDomain::RegistrableDomainHash::equal):
(WebCore::RegistrableDomain::encode const):
(WebCore::RegistrableDomain::decode):
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor):
(WebCore::NetworkStorageSession::removePrevalentDomains):
(WebCore::NetworkStorageSession::hasStorageAccess const):
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const):
(WebCore::NetworkStorageSession::grantStorageAccess):
(WebCore::getPartitioningDomain): Deleted.
* platform/network/NetworkStorageSession.h:

Source/WebKit:

A new API test was added. Plenty of existing layout tests under
http/tests/resourceLoadStatistics/ and http/tests/storageAccess/ test the code.

This patch introduces and adopts a new class called WebCore::RegistrableDomain
which represents a domain's eTLD+1 (effective top level domain plus one) and is
the basis for the term "site," as in same-site. Other popular names include
high-level domain, primary domain, and top privately controlled/owned domain.
Effective top level domains are enumerated on the Public Suffix List
(https://publicsuffix.org).

This class just uses the full domain for when the Public Suffix List cannot help
finding the registrable domain and for WebKit ports that haven't enabled
PUBLIC_SUFFIX_LIST. It also uses the string "nullOrigin" as a representation
for the null or unique origin (this matches how these origins were handled
before).

The implementation is a wrapper around a String and the functions and class
members that now make use of this new class used to handle regular String
objects which didn't help much in terms of type safety or guarantees that the
string had already been converted to an eTLD+1.

We've at least two bad bugs in the Storage Access API because of confusion
between a URL's eTLD+1 and its host. The usage of WebCore::RegistrableDomain
will prohibit such bugs in the future.

Partitioning in WebKit also uses eTLD+1 to a large extent. I plan to adopt
WebCore::RegistrableDomain for partitioning in a later patch.

This patch also enhances parameter naming by:
- Removing parts that refer to "primary" as in primaryDomain.
- Replacing references to "TopPrivatelyControlledDomain" with "RegistrableDomain."
- Replacing references to "TopPrivatelyOwnedDomain" with "RegistrableDomain."
- Using the term "domain" consistently instead of e.g. "host."

A follow-up patch will continue backwards in call chains to create
WebCore::RegistrableDomain objects as early as possible instead of using strings.
I did not do that work here in the interest of patch size.

* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::domainsToString):
(WebKit::pruneResources):
(WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain const):
(WebKit::ResourceLoadStatisticsMemoryStore::markAsPrevalentIfHasRedirectedToPrevalent):
(WebKit::ResourceLoadStatisticsMemoryStore::isPrevalentDueToDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal):
(WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):
(WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation):
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading):
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect):
(WebKit::ResourceLoadStatisticsMemoryStore::logUserInteraction):
(WebKit::ResourceLoadStatisticsMemoryStore::clearUserInteraction):
(WebKit::ResourceLoadStatisticsMemoryStore::hasHadUserInteraction):
(WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResource):
(WebKit::ResourceLoadStatisticsMemoryStore::isPrevalentResource const):
(WebKit::ResourceLoadStatisticsMemoryStore::isVeryPrevalentResource const):
(WebKit::ResourceLoadStatisticsMemoryStore::isRegisteredAsSubresourceUnder const):
(WebKit::ResourceLoadStatisticsMemoryStore::isRegisteredAsSubFrameUnder const):
(WebKit::ResourceLoadStatisticsMemoryStore::isRegisteredAsRedirectingTo const):
(WebKit::ResourceLoadStatisticsMemoryStore::clearPrevalentResource):
(WebKit::ResourceLoadStatisticsMemoryStore::setGrandfathered):
(WebKit::ResourceLoadStatisticsMemoryStore::isGrandfathered const):
(WebKit::ResourceLoadStatisticsMemoryStore::setSubframeUnderTopFrameOrigin):
(WebKit::ResourceLoadStatisticsMemoryStore::setSubresourceUnderTopFrameOrigin):
(WebKit::ResourceLoadStatisticsMemoryStore::setSubresourceUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsMemoryStore::setSubresourceUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsMemoryStore::setTopFrameUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsMemoryStore::setTopFrameUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsMemoryStore::ensureResourceStatisticsForRegistrableDomain):
(WebKit::ResourceLoadStatisticsMemoryStore::mergeStatistics):
(WebKit::ResourceLoadStatisticsMemoryStore::hasUserGrantedStorageAccessThroughPrompt):
(WebKit::debugLogDomainsInBatches):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlockingForDomains):
(WebKit::ResourceLoadStatisticsMemoryStore::clearBlockingStateForDomains):
(WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToRemoveWebsiteDataFor):
(WebKit::ResourceLoadStatisticsMemoryStore::pruneStatisticsIfNeeded):
(WebKit::ResourceLoadStatisticsMemoryStore::setLastSeen):
(WebKit::ResourceLoadStatisticsMemoryStore::setVeryPrevalentResource):
(WebKit::ResourceLoadStatisticsMemoryStore::ensureResourceStatisticsForPrimaryDomain): Deleted.
(WebKit::ResourceLoadStatisticsMemoryStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor): Deleted.
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
(WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
(WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading):
(WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading):
(WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect):
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setLastSeen):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder):
(WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder):
(WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
(WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains):
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
(WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):
(WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):
(WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForRegistrableDomainsInAllPersistentDataStores):
(WebKit::WebResourceLoadStatisticsStore::registrableDomainsWithWebsiteData):
(WebKit::isolatedPrimaryDomain): Deleted.
(WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
(WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::logUserInteraction):
(WebKit::NetworkConnectionToWebProcess::logWebSocketLoading):
(WebKit::NetworkConnectionToWebProcess::logSubresourceLoading):
(WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect):
(WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
(WebKit::NetworkConnectionToWebProcess::requestStorageAccess):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcess::isGrandfathered):
(WebKit::NetworkProcess::isPrevalentResource):
(WebKit::NetworkProcess::isVeryPrevalentResource):
(WebKit::NetworkProcess::setGrandfathered):
(WebKit::NetworkProcess::setPrevalentResource):
(WebKit::NetworkProcess::setPrevalentResourceForDebugMode):
(WebKit::NetworkProcess::setVeryPrevalentResource):
(WebKit::NetworkProcess::clearPrevalentResource):
(WebKit::NetworkProcess::setSubframeUnderTopFrameOrigin):
(WebKit::NetworkProcess::isRegisteredAsRedirectingTo):
(WebKit::NetworkProcess::isRegisteredAsSubFrameUnder):
(WebKit::NetworkProcess::setSubresourceUnderTopFrameOrigin):
(WebKit::NetworkProcess::setSubresourceUniqueRedirectTo):
(WebKit::NetworkProcess::setSubresourceUniqueRedirectFrom):
(WebKit::NetworkProcess::isRegisteredAsSubresourceUnder):
(WebKit::NetworkProcess::setTopFrameUniqueRedirectTo):
(WebKit::NetworkProcess::setTopFrameUniqueRedirectFrom):
(WebKit::NetworkProcess::setLastSeen):
(WebKit::NetworkProcess::hasStorageAccessForFrame):
(WebKit::NetworkProcess::hasStorageAccess):
(WebKit::NetworkProcess::requestStorageAccess):
(WebKit::NetworkProcess::requestStorageAccessGranted):
(WebKit::NetworkProcess::grantStorageAccess):
(WebKit::NetworkProcess::logFrameNavigation):
(WebKit::NetworkProcess::logUserInteraction):
(WebKit::NetworkProcess::hadUserInteraction):
(WebKit::NetworkProcess::clearUserInteraction):
(WebKit::NetworkProcess::removePrevalentDomains):
(WebKit::filterForRegistrableDomains):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomainsInAllPersistentDataStores):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::filterForTopLevelDomains): Deleted.
(WebKit::NetworkProcess::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
(WebKit::NetworkProcess::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::logCookieInformationInternal):
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::deleteWebsiteDataForRegistrableDomainsInAllPersistentDataStores):
(WebKit::NetworkSession::registrableDomainsWithWebsiteData):
(WebKit::NetworkSession::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
(WebKit::NetworkSession::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
* NetworkProcess/NetworkSession.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
* UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm:
(WebKit::ResourceLoadStatisticsMemoryStore::registerUserDefaultsIfNeeded):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::NetworkProcessProxy::isPrevalentResource):
(WebKit::NetworkProcessProxy::isVeryPrevalentResource):
(WebKit::NetworkProcessProxy::setPrevalentResource):
(WebKit::NetworkProcessProxy::setPrevalentResourceForDebugMode):
(WebKit::NetworkProcessProxy::setVeryPrevalentResource):
(WebKit::NetworkProcessProxy::setLastSeen):
(WebKit::NetworkProcessProxy::clearPrevalentResource):
(WebKit::NetworkProcessProxy::logUserInteraction):
(WebKit::NetworkProcessProxy::hasHadUserInteraction):
(WebKit::NetworkProcessProxy::clearUserInteraction):
(WebKit::NetworkProcessProxy::setSubframeUnderTopFrameOrigin):
(WebKit::NetworkProcessProxy::isRegisteredAsRedirectingTo):
(WebKit::NetworkProcessProxy::isRegisteredAsSubFrameUnder):
(WebKit::NetworkProcessProxy::setSubresourceUnderTopFrameOrigin):
(WebKit::NetworkProcessProxy::isRegisteredAsSubresourceUnder):
(WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectTo):
(WebKit::NetworkProcessProxy::setSubresourceUniqueRedirectFrom):
(WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectTo):
(WebKit::NetworkProcessProxy::setTopFrameUniqueRedirectFrom):
(WebKit::NetworkProcessProxy::isGrandfathered):
(WebKit::NetworkProcessProxy::setGrandfathered):
(WebKit::NetworkProcessProxy::hasStorageAccessForFrame):
(WebKit::NetworkProcessProxy::hasStorageAccess):
(WebKit::NetworkProcessProxy::requestStorageAccess):
(WebKit::NetworkProcessProxy::grantStorageAccess):
(WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForRegistrableDomainsFinished):
(WebKit::NetworkProcessProxy::notifyWebsiteDataScanForRegistrableDomainsFinished):
(WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished): Deleted.
(WebKit::NetworkProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logFrameNavigation):
(WebKit::WebPageProxy::requestStorageAccessConfirm):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed):
(WebKit::WebProcessProxy::notifyWebsiteDataScanForRegistrableDomainsFinished):
(WebKit::WebProcessProxy::notifyWebsiteDataDeletionForRegistrableDomainsFinished):
(WebKit::WebProcessProxy::notifyWebsiteDataScanForTopPrivatelyControlledDomainsFinished): Deleted.
(WebKit::WebProcessProxy::notifyWebsiteDataDeletionForTopPrivatelyOwnedDomainsFinished): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebResourceLoadStatisticsStore.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::isPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
(WebKit::WebsiteDataStore::isVeryPrevalentResource):
(WebKit::WebsiteDataStore::setVeryPrevalentResource):
(WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
(WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
(WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
(WebKit::WebsiteDataStore::clearPrevalentResource):
(WebKit::WebsiteDataStore::setLastSeen):
(WebKit::WebsiteDataStore::hasStorageAccess):
(WebKit::WebsiteDataStore::requestStorageAccess):
(WebKit::WebsiteDataStore::grantStorageAccess):
(WebKit::WebsiteDataStore::logUserInteraction):
(WebKit::WebsiteDataStore::hasHadUserInteraction):
(WebKit::WebsiteDataStore::clearUserInteraction):
(WebKit::WebsiteDataStore::setGrandfathered):
(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hasStorageAccess):
(WebKit::WebPage::requestStorageAccess):
* WebProcess/WebProcess.cpp:
(WebKit::m_nonVisibleProcessCleanupTimer):
(WebKit::WebProcess::initializeWebProcess):

Tools:

This patch adds an API test and replaces two instances of
"TopPrivatelyOwnedDomains" with "RegistrableDomains" in message names.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp:
(TestWebKitAPI::TEST):
    Changed two strings to make sure the registrable domains are still considered
    invalid and pass the test.
* TestWebKitAPI/Tests/WebCore/RegistrableDomain.cpp: Added.
(TestWebKitAPI::TEST):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):

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

7 months ago[WPE] Bump WPEBackend-fdo requirement to API version 1.0
aperez@igalia.com [Mon, 25 Feb 2019 21:48:24 +0000 (21:48 +0000)]
[WPE] Bump WPEBackend-fdo requirement to API version 1.0
https://bugs.webkit.org/show_bug.cgi?id=195001

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/FindWPEBackend-fdo.cmake: Use WPEBackend-fdo-1.0.
* Source/cmake/OptionsWPE.cmake: Ditto.

Source/WebKit:

API version 1.0 always includes the functionality previously guarded with
WPE_BACKEND_CHECK_VERSION(): remove the guards and always use the new functions
unconditionally.

* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::View): Remove usage of WPE_BACKEND_CHECK_VERSION().
(WKWPE::m_backend): Ditto.
* UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
(WPEQtViewBackend::WPEQtViewBackend): Use libWPEBackend-fdo-1.0 as
library name, remove call to wpe_fdo_initialize_for_egl_display().
(WPEQtViewBackend::create): Call wpe_fdo_initialize_for_egl_display()
here, to bail out early in case initialization fails.
* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Remove usage of
WPE_BACKEND_CHECK_VERSION().

Tools:

API version 1.0 always includes the functionality previously guarded with
WPE_BACKEND_CHECK_VERSION(): remove the guards and always use the new functions
unconditionally.

* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::createWebViewBackend): Remove usage of WPE_BACKEND_CHECK_VERSION().
* TestWebKitAPI/glib/WebKitGLib/wpe/WebViewTestWPE.cpp:
(WebViewTest::showInWindow): Ditto.
(WebViewTest::hideView): Ditto.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): Ditto.
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::ViewBackend): Use libWPEBackend-fdo-1.0 as library name.
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::WindowViewBackend): Remove usage of
WPE_BACKEND_CHECK_VERSION().
* wpe/jhbuild.modules: Build a version WPEBackend-fdo with the updated API version.

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

7 months agoAvoid hashing CompactVariableEnvironment when decoding CompactVariableMap::Handle
tzagallo@apple.com [Mon, 25 Feb 2019 20:15:53 +0000 (20:15 +0000)]
Avoid hashing CompactVariableEnvironment when decoding CompactVariableMap::Handle
https://bugs.webkit.org/show_bug.cgi?id=194937

Reviewed by Saam Barati.

Hashing the CompactVariableEnvironment is expensive and we could avoid it
when decoding multiple handles to the same environment. This is sound because
a pointer to the same CompactVariableEnvironment will hash the same.

* runtime/CachedTypes.cpp:
(JSC::Decoder::handleForEnvironment const):
(JSC::Decoder::setHandleForEnvironment):
(JSC::CachedCompactVariableMapHandle::decode const):

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

7 months agoRemove unnecessary WTF:: prefixes in CachedTypes
tzagallo@apple.com [Mon, 25 Feb 2019 20:13:01 +0000 (20:13 +0000)]
Remove unnecessary WTF:: prefixes in CachedTypes
https://bugs.webkit.org/show_bug.cgi?id=194936

Reviewed by Saam Barati.

Cleanup unnecessary prefixes from Optional, roundUpToMultipleOf and
pageSize.

* runtime/CachedTypes.cpp:
(JSC::Encoder::cachedOffsetForPtr):
(JSC::Encoder::Page::malloc):
(JSC::Encoder::allocateNewPage):
(JSC::CachedPtr::encode):
(JSC::CachedPtr::decode const):
(JSC::CachedOptional::encode):
(JSC::CachedOptional::decode const):

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

7 months agoSplit iOS tests for hit testing in iframes
commit-queue@webkit.org [Mon, 25 Feb 2019 19:22:15 +0000 (19:22 +0000)]
Split iOS tests for hit testing in iframes
https://bugs.webkit.org/show_bug.cgi?id=195003

This patch splits hit-testing-iframe.html into smaller tests to faciliate
debugging and handling of test expectations. It also adds a new test
for programmatic scrolling which was fixed after bug 194886.

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

* fast/scrolling/ios/hit-testing-iframe-001-expected.html: Copied from LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html.
* fast/scrolling/ios/hit-testing-iframe-001.html: Added.
* fast/scrolling/ios/hit-testing-iframe-002-expected.html: Copied from LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html.
* fast/scrolling/ios/hit-testing-iframe-002.html: Added.
* fast/scrolling/ios/hit-testing-iframe-003-expected.html: Copied from LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html.
* fast/scrolling/ios/hit-testing-iframe-003.html: Added.
* fast/scrolling/ios/hit-testing-iframe-004-expected.html: Copied from LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html.
* fast/scrolling/ios/hit-testing-iframe-004.html: Added.
* fast/scrolling/ios/hit-testing-iframe-005-expected.html: Copied from LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html.
* fast/scrolling/ios/hit-testing-iframe-005.html: Added.
* fast/scrolling/ios/hit-testing-iframe-006-expected.html: Renamed from LayoutTests/fast/scrolling/ios/hit-testing-iframe-expected.html.
* fast/scrolling/ios/hit-testing-iframe-006.html: Added.
* fast/scrolling/ios/hit-testing-iframe.html: Removed.
* platform/ios-wk2/TestExpectations: Set failure to the corresponding extracted test.

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

7 months agoAX: <footer> HTML5 tag not reading as ARIA Landmark to VoiceOver
cfleizach@apple.com [Mon, 25 Feb 2019 19:15:23 +0000 (19:15 +0000)]
AX: <footer> HTML5 tag not reading as ARIA Landmark to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=190138
<rdar://problem/44907695>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Make sure that footer elements use the right role depending on their context.
If scoped to body, they become contentinfo. Otherwise they are just delineated by
a footer subrole.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isLandmark const):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::isDescendantOfElementType const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

* accessibility/mac/footer-expected.txt:
* accessibility/mac/footer-roledescription-expected.txt:
* accessibility/mac/footer-roledescription.html:
* accessibility/mac/footer.html:
* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:
* platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

7 months agoA prewarmed Web process should have a process assertion.
pvollan@apple.com [Mon, 25 Feb 2019 19:11:57 +0000 (19:11 +0000)]
A prewarmed Web process should have a process assertion.
https://bugs.webkit.org/show_bug.cgi?id=195006

Reviewed by Geoffrey Garen.

To make sure the prewarm message is handled in the Web process before the process is suspended,
the process should have a process assertion. This can be fixed by sending the prewarm message
inside WebProcessPool::initializeNewWebProcess, since all message sent inside this method are
guaranteed to be handled before the WebContent process is suspended.

This patch is based on Chris Dumez' idea and obervation of the issue.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessPool.h:

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

7 months agoWeb Inspector: [META] Merge Resources and Debugger into a single Sources tab
drousso@apple.com [Mon, 25 Feb 2019 19:09:05 +0000 (19:09 +0000)]
Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
https://bugs.webkit.org/show_bug.cgi?id=183420

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
(WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
(WI.SourcesNavigationSidebarPanel.prototype.closed):
(WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
(WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addTarget):
(WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
(WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
(WI.SourcesNavigationSidebarPanel.prototype._addScript):
(WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
(WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
(WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
(WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addIssue):
(WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
(WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
(WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
(WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
(WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
(WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
(WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
* UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
(.sidebar > .panel.navigation.sources > .content):
(.sidebar > .panel.navigation.sources > .navigation-bar):
(.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
(.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
(.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
(.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > .details-section):
(.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
(.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
(.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
(.sidebar > .panel.navigation.sources > .content > .navigation-bar):
(.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
(.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
(@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):

* UserInterface/Views/SourcesTabContentView.js: Added.
(WI.SourcesTabContentView):
(WI.SourcesTabContentView.tabInfo):
(WI.SourcesTabContentView.isTabAllowed):
(WI.SourcesTabContentView.prototype.get type):
(WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
(WI.SourcesTabContentView.prototype.canShowRepresentedObject):
(WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
(WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
(WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):

* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
Rework `createContentTreeOutline` to allow for additional symbols.
Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showResources):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForURL):
* UserInterface/Views/DefaultDashboardView.js:
(WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):

* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):

* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.showSourcesTab): Added.
(WI.isShowingSourcesTab): Added.
(WI.tabContentViewClassForRepresentedObject):
(WI._debuggerDidPause):

* UserInterface/Views/DebuggerTabContentView.js:
(WI.DebuggerTabContentView.isTabAllowed):
* UserInterface/Views/ResourcesTabContentView.js:
(WI.ResourcesTabContentView.isTabAllowed):

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

* UserInterface/Main.html:
* UserInterface/Images/Sources.svg: Added.
* Localizations/en.lproj/localizedStrings.js:

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

7 months agoUpdate double-conversion to the latest version
commit-queue@webkit.org [Mon, 25 Feb 2019 18:59:01 +0000 (18:59 +0000)]
Update double-conversion to the latest version
https://bugs.webkit.org/show_bug.cgi?id=194994

Import the latest version of the double-conversion library based on
https://github.com/google/double-conversion/commit/990c44707c70832dc1ce1578048c2198bafd3307

In additon to importing the code, the following changes were applied (or re-applied) to maintain
parity with what we had previously:
     - Add #include "config.h" to each cpp file.
     - Put everything inside the WTF namespace.
     - Changed all in library includes to be of the form #include <wtf/dtoa/FILE.h>.
     - Renamed double_conversion::Vector<> to double_conversion::BufferReference<>.
     - Replaced duplicated functions with ASCIICType.h variants
     - Made CachedPower table a constexpr.
     - Exported (via WTF_EXPORT_PRIVATE) several functions in double-conversion.h.
     - Made substantial changes to StringToDoubleConverter to avoid unnecessary overhead of
       parameterization, as we only ever want one configuration. Instead of constructing a
       configured class and calling StringToDouble on it, StringToDouble is now a static
       function. This allows a bunch of now dead code (hex support, octal support, etc.) to
       be eliminated. As StringToDoubleConverter now supports single precision floats, some
       additional templating of StringToIeee was added to avoid extra unnecessary branching.
     - Added RemoveCharacters function to double_conversion::StringBuilder.

Patch by Sam Weinig <sam@webkit.org> on 2019-02-25
Reviewed by Darin Adler.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/dtoa/AUTHORS: Added.
* wtf/dtoa/README: Removed.
* wtf/dtoa/README.md: Added.
* wtf/dtoa/bignum-dtoa.cc:
* wtf/dtoa/bignum-dtoa.h:
* wtf/dtoa/bignum.cc:
* wtf/dtoa/bignum.h:
(WTF::double_conversion::Bignum::Times10):
(WTF::double_conversion::Bignum::Equal):
(WTF::double_conversion::Bignum::LessEqual):
(WTF::double_conversion::Bignum::Less):
(WTF::double_conversion::Bignum::PlusEqual):
(WTF::double_conversion::Bignum::PlusLessEqual):
(WTF::double_conversion::Bignum::PlusLess):
(WTF::double_conversion::Bignum::EnsureCapacity):
(WTF::double_conversion::Bignum::BigitLength const):
* wtf/dtoa/cached-powers.cc:
* wtf/dtoa/cached-powers.h:
* wtf/dtoa/diy-fp.cc:
* wtf/dtoa/diy-fp.h:
(WTF::double_conversion::DiyFp::DiyFp):
(WTF::double_conversion::DiyFp::Subtract):
(WTF::double_conversion::DiyFp::Minus):
(WTF::double_conversion::DiyFp::Times):
(WTF::double_conversion::DiyFp::Normalize):
(WTF::double_conversion::DiyFp::f const):
(WTF::double_conversion::DiyFp::e const):
(WTF::double_conversion::DiyFp::set_f):
(WTF::double_conversion::DiyFp::set_e):
* wtf/dtoa/double-conversion.cc:
* wtf/dtoa/double-conversion.h:
(WTF::double_conversion::DoubleToStringConverter::DoubleToStringConverter):
(WTF::double_conversion::DoubleToStringConverter::ToShortest const):
(WTF::double_conversion::DoubleToStringConverter::ToShortestSingle const):
(WTF::double_conversion::StringToDoubleConverter::StringToDoubleConverter):
* wtf/dtoa/double.h: Removed.
* wtf/dtoa/fast-dtoa.cc:
* wtf/dtoa/fast-dtoa.h:
* wtf/dtoa/fixed-dtoa.cc:
* wtf/dtoa/fixed-dtoa.h:
* wtf/dtoa/ieee.h: Added.
(WTF::double_conversion::double_to_uint64):
(WTF::double_conversion::uint64_to_double):
(WTF::double_conversion::float_to_uint32):
(WTF::double_conversion::uint32_to_float):
(WTF::double_conversion::Double::Double):
(WTF::double_conversion::Double::AsDiyFp const):
(WTF::double_conversion::Double::AsNormalizedDiyFp const):
(WTF::double_conversion::Double::AsUint64 const):
(WTF::double_conversion::Double::NextDouble const):
(WTF::double_conversion::Double::PreviousDouble const):
(WTF::double_conversion::Double::Exponent const):
(WTF::double_conversion::Double::Significand const):
(WTF::double_conversion::Double::IsDenormal const):
(WTF::double_conversion::Double::IsSpecial const):
(WTF::double_conversion::Double::IsNan const):
(WTF::double_conversion::Double::IsInfinite const):
(WTF::double_conversion::Double::Sign const):
(WTF::double_conversion::Double::UpperBoundary const):
(WTF::double_conversion::Double::NormalizedBoundaries const):
(WTF::double_conversion::Double::LowerBoundaryIsCloser const):
(WTF::double_conversion::Double::value const):
(WTF::double_conversion::Double::SignificandSizeForOrderOfMagnitude):
(WTF::double_conversion::Double::Infinity):
(WTF::double_conversion::Double::NaN):
(WTF::double_conversion::Double::DiyFpToUint64):
(WTF::double_conversion::Single::Single):
(WTF::double_conversion::Single::AsDiyFp const):
(WTF::double_conversion::Single::AsUint32 const):
(WTF::double_conversion::Single::Exponent const):
(WTF::double_conversion::Single::Significand const):
(WTF::double_conversion::Single::IsDenormal const):
(WTF::double_conversion::Single::IsSpecial const):
(WTF::double_conversion::Single::IsNan const):
(WTF::double_conversion::Single::IsInfinite const):
(WTF::double_conversion::Single::Sign const):
(WTF::double_conversion::Single::NormalizedBoundaries const):
(WTF::double_conversion::Single::UpperBoundary const):
(WTF::double_conversion::Single::LowerBoundaryIsCloser const):
(WTF::double_conversion::Single::value const):
(WTF::double_conversion::Single::Infinity):
(WTF::double_conversion::Single::NaN):
* wtf/dtoa/strtod.cc:
* wtf/dtoa/strtod.h:
* wtf/dtoa/utils.h:
(abort_noreturn):
(WTF::double_conversion::Max):
(WTF::double_conversion::Min):
(WTF::double_conversion::StrLength):
(WTF::double_conversion::BufferReference::BufferReference):
(WTF::double_conversion::BufferReference::SubVector):
(WTF::double_conversion::BufferReference::length const):
(WTF::double_conversion::BufferReference::is_empty const):
(WTF::double_conversion::BufferReference::start const):
(WTF::double_conversion::BufferReference::operator[] const):
(WTF::double_conversion::BufferReference::first):
(WTF::double_conversion::BufferReference::last):
(WTF::double_conversion::StringBuilder::StringBuilder):
(WTF::double_conversion::StringBuilder::~StringBuilder):
(WTF::double_conversion::StringBuilder::size const):
(WTF::double_conversion::StringBuilder::position const):
(WTF::double_conversion::StringBuilder::Reset):
(WTF::double_conversion::StringBuilder::AddCharacter):
(WTF::double_conversion::StringBuilder::AddString):
(WTF::double_conversion::StringBuilder::AddSubstring):
(WTF::double_conversion::StringBuilder::AddPadding):
(WTF::double_conversion::StringBuilder::RemoveCharacters):
(WTF::double_conversion::StringBuilder::Finalize):
(WTF::double_conversion::StringBuilder::is_finalized const):
(WTF::double_conversion::BitCast):
(WTF::double_conversion::BufferReference::SubBufferReference): Deleted.
(WTF::double_conversion::StringBuilder::SetPosition): Deleted.

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

7 months ago[JSC] Drop direct references to Intl constructors by rewriting Intl JS builtins in C++
ysuzuki@apple.com [Mon, 25 Feb 2019 18:32:18 +0000 (18:32 +0000)]
[JSC] Drop direct references to Intl constructors by rewriting Intl JS builtins in C++
https://bugs.webkit.org/show_bug.cgi?id=194976

Reviewed by Michael Saboff.

This patch paves the way to making IntlObject allocation lazy by removing direct references
to Intl constructors (Intl.Collator etc.) from builtin JS. To achieve that,

1. We implement String.prototype.toLocaleCompare and Number.prototype.toLocaleString in C++
   instead of JS builtins. Since these functions end up calling ICU C++ runtime, writing them in
   JS does not offer performance improvement.

2. We remove @DateTimeFormat constructor reference, and instead, exposing @dateTimeFormat function,
   which returns formatted string directly. We still have JS builtins for DateTimeFormat things
   because the initialization of its "options" JSObject involves many get_by_id / put_by_id things,
   which are efficient in JS. But we avoid exposing @DateTimeFormat directly, so that Intl constructors
   can be lazily allocated.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinNames.h:
* builtins/DatePrototype.js:
(toLocaleString):
(toLocaleDateString):
(toLocaleTimeString):
* builtins/NumberPrototype.js: Removed.
* builtins/StringPrototype.js:
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(globalPrivate.getDefaultCollator): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
(JSC::JSGlobalObject::defaultCollator):
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncDateTimeFormat):
* runtime/JSGlobalObjectFunctions.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::finishCreation):
(JSC::throwVMToThisNumberError):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncLocaleCompare):

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

7 months agoAdd tests mixing programmatic and user frame scrolling on iOS
commit-queue@webkit.org [Mon, 25 Feb 2019 18:26:09 +0000 (18:26 +0000)]
Add tests mixing programmatic and user frame scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=194900

This patch adds tests initially written for bug 182868 but eventually
fixed by bug 194886. They involve mixing user and programmatic
scrolling.

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

* fast/scrolling/ios/mixing-user-and-programmatic-scroll-001-expected.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-001.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-002-expected.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-002.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-003-expected.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-003.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-004-expected.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-004.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-005-expected.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-005.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-006-expected.html: Added.
* fast/scrolling/ios/mixing-user-and-programmatic-scroll-006.html: Added.

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

7 months ago[GTK] Enable PSON
mcatanzaro@igalia.com [Mon, 25 Feb 2019 18:04:07 +0000 (18:04 +0000)]
[GTK] Enable PSON
https://bugs.webkit.org/show_bug.cgi?id=194979

Reviewed by Žan Doberšek.

It is expected that this may introduce unexpected regressions, so it's appropriate to do
this at the start of a new release cycle.

* Shared/WebPreferencesDefaultValues.h:

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

7 months agofast/mediastream/MediaStream-video-element.html is flaky after r241821, marking as...
tsavell@apple.com [Mon, 25 Feb 2019 17:04:01 +0000 (17:04 +0000)]
fast/mediastream/MediaStream-video-element.html is flaky after r241821, marking as failure while waiting for fix.
https://bugs.webkit.org/show_bug.cgi?id=194916

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

7 months agoIndexedDB: IDBDatabase and IDBTransaction are leaked in layout tests
sihui_liu@apple.com [Mon, 25 Feb 2019 16:50:20 +0000 (16:50 +0000)]
IndexedDB: IDBDatabase and IDBTransaction are leaked in layout tests
https://bugs.webkit.org/show_bug.cgi?id=194709

Reviewed by Geoffrey Garen.

Source/WebCore:

When connection to IDB server is closed, IDBTransaction would abort without notifying IDBDatabase, so
IDBDatabase didn't clear its reference to IDBTransaction which created a reference cycle.

Also IDBTransaction didn't clear its reference to IDBRequest in this case and it led to another reference cycle
between IDBOpenDBRequest and IDBTransaction.

Test: storage/indexeddb/IDBObject-leak.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::connectionToServerLost):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::~IDBTransaction):
(WebCore::IDBTransaction::connectionClosedFromServer):
* Modules/indexeddb/IDBTransaction.h:
* testing/Internals.cpp:
(WebCore::Internals::numberOfIDBTransactions const):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* TestExpectations:
* platform/wk2/TestExpectations:
* storage/indexeddb/IDBObject-leak-expected.txt: Added.
* storage/indexeddb/IDBObject-leak.html: Added.

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

7 months ago[WPE][GTK] Clean up handling of WEBKIT_FORCE_COMPLEX_TEXT
mcatanzaro@igalia.com [Mon, 25 Feb 2019 16:10:31 +0000 (16:10 +0000)]
[WPE][GTK] Clean up handling of WEBKIT_FORCE_COMPLEX_TEXT
https://bugs.webkit.org/show_bug.cgi?id=194614

Reviewed by Carlos Garcia Campos.

This environment variable is now enabled for WPE, not just for GTK.

It is now possible to use this environment variable to enable complex text, not just to
disable it.

WebProcessPool::setAlwaysUsesComplexTextCodePath is fixed to be respected even when this
environment variable is set, although WPE and GTK will never do so.

* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformInitializeWebProcess):

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

7 months agoAdd missing stream parameter. Unreviewed.
zalan@apple.com [Mon, 25 Feb 2019 15:50:23 +0000 (15:50 +0000)]
Add missing stream parameter. Unreviewed.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::fired):

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

7 months ago[Flatpak] Add support for flatpak > 1.1.2
commit-queue@webkit.org [Mon, 25 Feb 2019 15:46:24 +0000 (15:46 +0000)]
[Flatpak] Add support for flatpak > 1.1.2
https://bugs.webkit.org/show_bug.cgi?id=194088

Flatpak 1.2 is now out so we need to support that
version now.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-02-25
Reviewed by Michael Catanzaro.

* flatpak/flatpakutils.py:
(check_flatpak):
(FlatpakPackages.__init__):
(FlatpakPackages.__detect_packages):
(FlatpakPackages.__detect_packages.in):
(FlatpakRepos.update):

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

7 months agoUnreviewed build fix after r242032.
zalan@apple.com [Mon, 25 Feb 2019 15:07:35 +0000 (15:07 +0000)]
Unreviewed build fix after r242032.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):

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

7 months agoIncorrect use of String::foldCase for font family names
darin@apple.com [Mon, 25 Feb 2019 14:39:10 +0000 (14:39 +0000)]
Incorrect use of String::foldCase for font family names
https://bugs.webkit.org/show_bug.cgi?id=194895

Reviewed by Myles C. Maxfield.

* platform/graphics/FontCascadeDescription.cpp:
(WebCore::FontCascadeDescription::familiesEqualForTextAutoSizing): Use
familyNamesAreEqual instead of calling convertToASCIILowercase directly.
(WebCore::FontCascadeDescription::familyNamesAreEqual): Use AtomicString's
operator== when we want case sensitive family name comparisons. This is a special
case to accomodate CoreText, which uses "."-prefix names for internal fonts that
are treated case sensitively. (Ideally webpages would not use these fonts at all.)
(WebCore::FontCascadeDescription::familyNameHash): Use AtomicString's existingHash
when we want case sensitive family name hashing.
(WebCore::FontCascadeDescription::foldedFamilyName): Take a String instead of an
AtomicString so we can use this at an additional call site. Converting from an
AtomicString to a String if free and automatic at the existing call sites. Use
convertToASCIILowercase instead of foldCase for three reasons: 1) Other functions
here are folding only ASCII case by using ASCIICaseInsensitiveHash, and this one
must be consistent. 2) this is considerably faster, and 3) font family names don't
need arbitrary Unicode case folding, it's only A-Z that should be folded.
* platform/graphics/FontCascadeDescription.h: Take a String instead of AtomicString
in the foldedFamilyName function.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::collectionForFamily): Instead of calling foldCase, use
FontCascadeDescription::foldedFamilyName to correctly fold font family names.

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

7 months agoUnreviewed WPE gardening. Adding a few failure expectations as well
zandobersek@gmail.com [Mon, 25 Feb 2019 13:06:03 +0000 (13:06 +0000)]
Unreviewed WPE gardening. Adding a few failure expectations as well
as updating a couple of port-specific test baselines.

* platform/wpe/TestExpectations:
* platform/wpe/fast/css/apple-system-colors-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.https-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt:

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

7 months ago[WPE] Bump WPEBackend-fdo Jhbuild package to latest changes
zandobersek@gmail.com [Mon, 25 Feb 2019 11:55:14 +0000 (11:55 +0000)]
[WPE] Bump WPEBackend-fdo Jhbuild package to latest changes
https://bugs.webkit.org/show_bug.cgi?id=194998

Reviewed by Carlos Garcia Campos.

* wpe/jhbuild.modules: Bump the WPEBackend-fdo package, converting it
to a Git checkout and using the latest commit containing various fixes
and improvements.

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

7 months ago[EME][GStreamer] Replace caps field loop with gst_structure_remove_fields
cturner@igalia.com [Mon, 25 Feb 2019 10:15:31 +0000 (10:15 +0000)]
[EME][GStreamer] Replace caps field loop with gst_structure_remove_fields
https://bugs.webkit.org/show_bug.cgi?id=194992

Reviewed by Xabier Rodriguez-Calvar.

Refactoring, no new tests.

* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(transformCaps): Simplify the code a little. The idea to use this
utility function came from a review upstream here:
https://gitlab.freedesktop.org/gstreamer/gst-devtools/merge_requests/67

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

7 months ago[MSE][GStreamer] Batch player duration updates
aboya@igalia.com [Mon, 25 Feb 2019 10:11:57 +0000 (10:11 +0000)]
[MSE][GStreamer] Batch player duration updates
https://bugs.webkit.org/show_bug.cgi?id=194220

Reviewed by Xabier Rodriguez-Calvar.

This saves up a ton of CPU cycles doing layout unnecessarily when all
the appended frames extend the duration of the movie, like in
YTTV 2018 59.DASHLatencyVP9.

This patch is an optimization that introduces no new behavior.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::consumeAppsinkAvailableSamples):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::blockDurationChanges):
(WebCore::MediaPlayerPrivateGStreamerMSE::unblockDurationChanges):
(WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

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

7 months ago[WPE] Add support for holepunch using an external video player
magomez@igalia.com [Mon, 25 Feb 2019 09:20:01 +0000 (09:20 +0000)]
[WPE] Add support for holepunch using an external video player
https://bugs.webkit.org/show_bug.cgi?id=194899

Reviewed by Xabier Rodriguez-Calvar.

.:

Add EXTERNAL_HOLEPUNCH option to the WPE port. Add a manual test to check the
feature. Rename and update the test for GStreamer holepunch to avoid confusion.

* ManualTests/wpe/video-player-holepunch-external.html: Added.
* ManualTests/wpe/video-player-holepunch-gstreamer.html: Renamed from ManualTests/wpe/video-player-holepunch.html.
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Implement the holepunch feature to allow playback using an external player. This creates
a new dummy MediaPlayerPrivateHolePunch that accepts only the type "video/holepunch", and
whose goal is to just draw a transparent rectangle in the position where the video should be.
This can be used to allow a player placed on a lower plane than the browser to become visible.

Added ManualTest wpe/video-player-holepunch-external.html to test the feature.

* PlatformWPE.cmake:
* platform/HolePunch.cmake: Added.
* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector):
* platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: Added.
(WebCore::MediaPlayerPrivateHolePunch::MediaPlayerPrivateHolePunch):
(WebCore::MediaPlayerPrivateHolePunch::~MediaPlayerPrivateHolePunch):
(WebCore::MediaPlayerPrivateHolePunch::platformLayer const):
(WebCore::MediaPlayerPrivateHolePunch::naturalSize const):
(WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer):
(WebCore::MediaPlayerPrivateHolePunch::swapBuffersIfNeeded):
(WebCore::MediaPlayerPrivateHolePunch::proxy const):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateHolePunch::getSupportedTypes):
(WebCore::MediaPlayerPrivateHolePunch::supportsType):
(WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine):
(WebCore::MediaPlayerPrivateHolePunch::notifyReadyState):
* platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):

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

7 months agoIntroduce ContentChangeObserver class
zalan@apple.com [Mon, 25 Feb 2019 06:04:20 +0000 (06:04 +0000)]
Introduce ContentChangeObserver class
https://bugs.webkit.org/show_bug.cgi?id=194977
<rdar://problem/48338115>

Reviewed by Simon Fraser.

Source/WebCore:

This patch is about piping through all the related WK* calls.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::platformSuspendOrStopActiveDOMObjects):
* loader/FrameLoader.cpp:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::clearTimeout):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):
* page/Page.h:
(WebCore::Page::contentChangeObserver):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::mouseMoved):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
(WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):

Source/WebKit:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):

Source/WebKitLegacy/ios:

* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::observedContentChange):
(WebChromeClientIOS::clearContentChangeObservers):

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

7 months agoMigrate from "fixedPositionRect" to "layoutViewport" in the scrolling tree
simon.fraser@apple.com [Mon, 25 Feb 2019 06:03:22 +0000 (06:03 +0000)]
Migrate from "fixedPositionRect" to "layoutViewport" in the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=194984

Reviewed by Sam Weinig.

Rename "fixedPositionRect" to "layoutViewport" in scrolling tree code.

Remove ScrollingTree::fixedPositionRect() which was only used on iOS, to fetch the
current layout viewport rect. Instead, set the layout viewport on the root
node in ScrollingTree::mainFrameViewportChangedViaDelegatedScrolling().
Source/WebCore:

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::mainFrameViewportChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling): Deleted.
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeFrameHostingNode.cpp:
(WebCore::ScrollingTreeFrameHostingNode::updateLayersAfterAncestorChange):
* page/scrolling/ScrollingTreeFrameHostingNode.h:
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/cocoa/ScrollingTreeFixedNode.h:
* page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
* page/scrolling/cocoa/ScrollingTreeStickyNode.h:
* page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterAncestorChange):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):

Source/WebKit:

Add a WK2 Scrolling log channel.

* Platform/Logging.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::fixedPositionRect): Deleted.
* UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::currentLayoutViewport const):
(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect const): Deleted.
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateChildNodesAfterScroll):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterViewportChange):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateLayersAfterAncestorChange):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

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

7 months agoWeb Inspector: Change the InspectorOverlay to use native rather than canvas
drousso@apple.com [Mon, 25 Feb 2019 04:41:53 +0000 (04:41 +0000)]
Web Inspector: Change the InspectorOverlay to use native rather than canvas
https://bugs.webkit.org/show_bug.cgi?id=105023
<rdar://problem/13443692>

Reviewed by Brian Burg.

.:

* ManualTests/inspector/overlay-nodes.html: Added.
* ManualTests/inspector/overlay-rulers.html: Added.

Source/JavaScriptCore:

* inspector/protocol/OverlayTypes.json: Removed.
Now that the overlay is entirely generated in C++, we no longer need the special prototol
types for transferring data to a JavaScript context.

* inspector/protocol/Debugger.json:
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::setOverlayMessage): Deleted.
Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.

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

Source/WebCore:

Should be no change in observed functionality.

* inspector/InspectorOverlay.h:
* inspector/InspectorOverlay.cpp:
(WebCore::truncateWithEllipsis): Added.
(WebCore::localPointToRootPoint): Added.
(WebCore::contentsQuadToCoordinateSystem):
(WebCore::effectiveElementForNode): Added.
(WebCore::quadToPath): Added.
(WebCore::drawOutlinedQuadWithClip): Added.
(WebCore::drawOutlinedQuad): Added.
(WebCore::drawFragmentHighlight): Added.
(WebCore::drawShapeHighlight): Added.
(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::setIndicating):
(WebCore::InspectorOverlay::shouldShowOverlay const):
(WebCore::InspectorOverlay::update):
(WebCore::InspectorOverlay::setShowPaintRects): Added.
(WebCore::InspectorOverlay::showPaintRect):
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
(WebCore::InspectorOverlay::drawNodeHighlight):
(WebCore::InspectorOverlay::drawQuadHighlight):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::InspectorOverlay::drawBounds): Added.
(WebCore::InspectorOverlay::drawRulers):
(WebCore::InspectorOverlay::drawElementTitle): Added.
(WebCore::contentsQuadToPage): Deleted.
(WebCore::InspectorOverlay::setPausedInDebuggerMessage): Deleted.
(WebCore::buildObjectForPoint): Deleted.
(WebCore::buildObjectForRect): Deleted.
(WebCore::buildArrayForQuad): Deleted.
(WebCore::buildObjectForHighlight): Deleted.
(WebCore::buildObjectForSize): Deleted.
(WebCore::InspectorOverlay::setShowingPaintRects): Deleted.
(WebCore::buildArrayForRendererFragments): Deleted.
(WebCore::localPointToRoot): Deleted.
(WebCore::appendPathCommandAndPoints): Deleted.
(WebCore::appendPathSegment): Deleted.
(WebCore::buildObjectForShapeOutside): Deleted.
(WebCore::buildObjectForElementData): Deleted.
(WebCore::InspectorOverlay::buildHighlightObjectForNode const): Deleted.
(WebCore::InspectorOverlay::buildObjectForHighlightedNodes const): Deleted.
(WebCore::InspectorOverlay::drawPausedInDebuggerMessage): Deleted.
(WebCore::InspectorOverlay::overlayPage): Deleted.
(WebCore::InspectorOverlay::forcePaint): Deleted.
(WebCore::InspectorOverlay::reset): Deleted.
(WebCore::evaluateCommandInOverlay): Deleted.
(WebCore::InspectorOverlay::evaluateInOverlay): Deleted.
(WebCore::InspectorOverlay::freePage): Deleted.

* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setShowPaintRects):
Drive-by: rename `setShowingPaintRects` to better match the protocol.
* inspector/agents/page/PageDebuggerAgent.h:
* inspector/agents/page/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::PageDebuggerAgent):
(WebCore::PageDebuggerAgent::setOverlayMessage): Deleted.
Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::createLazyAgents):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::disconnectAllFrontends):
(WebCore::InspectorController::buildObjectForHighlightedNodes const): Deleted.

* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightObject): Deleted.

* inspector/InspectorOverlayPage.css: Removed.
* inspector/InspectorOverlayPage.html: Removed.
* inspector/InspectorOverlayPage.js: Removed.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WI.initializeTarget):

* UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
* Versions/Inspector-iOS-10.0.json:
* Versions/Inspector-iOS-10.3.json:
* Versions/Inspector-iOS-11.0.json:
* Versions/Inspector-iOS-11.3.json:
* Versions/Inspector-iOS-12.0.json:
* Versions/Inspector-iOS-12.2.json:
* Versions/Inspector-iOS-8.0.json:
* Versions/Inspector-iOS-9.0.json:
* Versions/Inspector-iOS-9.3.json:
Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.

LayoutTests:

* http/tests/inspector/dom/shapes-test.js: Removed.
* inspector/dom/hideHighlight.html: Removed.
* inspector/dom/hideHighlight-expected.txt: Removed.
* inspector/dom/highlight-shape-outside.html: Removed.
* inspector/dom/highlight-shape-outside-expected.txt: Removed.
* inspector/dom/highlight-shape-outside-margin.html: Removed.
* inspector/dom/highlight-shape-outside-margin-expected.txt: Removed.
* inspector/dom/highlightFrame.html: Removed.
* inspector/dom/highlightFrame-expected.txt: Removed.
* inspector/dom/highlightNode.html: Removed.
* inspector/dom/highlightNode-expected.txt: Removed.
* inspector/dom/highlightNodeList.html: Removed.
* inspector/dom/highlightNodeList-expected.txt: Removed.
* inspector/dom/highlightSelector.html: Removed.
* inspector/dom/highlightSelector-expected.txt: Removed.
* platform/mac/TestExpectations:

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

7 months agoWeb Inspector: provide a way to make searches case sensitive or use a regular expression
drousso@apple.com [Mon, 25 Feb 2019 04:27:46 +0000 (04:27 +0000)]
Web Inspector: provide a way to make searches case sensitive or use a regular expression
https://bugs.webkit.org/show_bug.cgi?id=192527
Source/WebInspectorUI:

Reviewed by Joseph Pecoraro.

* UserInterface/Base/SearchUtilities.js: Added.
(WI.SearchUtilities.get defaultSettings):
(WI.SearchUtilities.createSettings):
(WI.SearchUtilities.regExpForString):
(WI.SearchUtilities.createSettingsButton):
(WI.SearchUtilities.createSettingsButton.toggleActive):
* UserInterface/Views/Main.css:
(.search-settings): Added.
(.search-settings > .glyph): Added.
(.search-settings:active > .glyph): Added.
(.search-settings.active > .glyph): Added.
(.search-settings:active.active > .glyph): Added.
Create static utility class for handling settings related to searching/filtering.

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
Create default search settings that apply across WebInspector, unless a more specific
setting has been created that overrides it (e.g. the navigation sidebar or Search tab).

* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel):
(WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
(WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
(WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
(WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
(WI.SearchSidebarPanel.prototype.performSearch.domCallback):
(WI.SearchSidebarPanel.prototype.performSearch):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar):
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
checkboxes for each search setting. Any settings changed for each input take precedence over
the default settings, but will match the corresponding default setting if it's changed.

* UserInterface/Views/SearchResultTreeElement.js:
(WI.SearchResultTreeElement.truncateAndHighlightTitle):
Use the length of the found text, rather than the length of the query.

* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype._highlightSearchResults):
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._updateFilter):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.performSearch):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._urlFilterDidChange):
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.performSearch):
Use the default search settings when searching/filtering.

* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
Drive-by: prevent the (x) from appearing when no text has been entered.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:

LayoutTests:

<rdar://problem/46800955>

Reviewed by Joseph Pecoraro.

* inspector/debugger/search-scripts.html:
* inspector/debugger/search-scripts-expected.txt:

* inspector/page/searchInResources.html:
* inspector/page/searchInResources-expected.txt:

* inspector/page/resources/search-script.js:
* inspector/page/resources/search-stylesheet.css:
* inspector/page/resources/search-worker.js:
* inspector/page/resources/search-xhr.txt:

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

7 months agoWeb Inspector: make debounce Proxy into its own class
drousso@apple.com [Mon, 25 Feb 2019 03:04:01 +0000 (03:04 +0000)]
Web Inspector: make debounce Proxy into its own class
https://bugs.webkit.org/show_bug.cgi?id=194721

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
replace it with a "delayed" version. The issue with this is that it set the identifier for
the timer on the function itself, which is shared across all instances of a given class.
When different instances call the same delayed function, they'd clobber eachother's attempts
to delay work.

* UserInterface/Base/Debouncer.js: Added.
(Debouncer):
(Debouncer.prototype.force):
(Debouncer.prototype.delayForTime):
(Debouncer.prototype.delayForFrame):
(Debouncer.prototype.delayForMicrotask):
(Debouncer.prototype.cancel):
(Debouncer.prototype._execute):
* UserInterface/Base/Throttler.js: Added.
(Throttler):
(Throttler.prototype.force):
(Throttler.prototype.fire):
(Throttler.prototype.cancel):
(Throttler.prototype._execute):
* UserInterface/Base/Utilities.js:

* UserInterface/Views/BezierEditor.js:
(WI.BezierEditor):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser):
(WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
(WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WI.ContentBrowser.prototype._currentContentViewDidChange):
(WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
* UserInterface/Views/DOMTreeUpdater.js:
(WI.DOMTreeUpdater):
(WI.DOMTreeUpdater.prototype._nodeAttributeModified):
(WI.DOMTreeUpdater.prototype._nodeInserted):
(WI.DOMTreeUpdater.prototype._nodeRemoved):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel):
(WI.NavigationSidebarPanel.prototype.closed):
(WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
(WI.NavigationSidebarPanel.prototype.updateFilter):
(WI.NavigationSidebarPanel.prototype.shown):
(WI.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WI.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.hidden):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
(WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
(WI.ResourceDetailsSidebarPanel):
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
* UserInterface/Views/SpringEditor.js:
(WI.SpringEditor.prototype._resetPreviewAnimation):
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.set hidden):
(WI.TreeElement.prototype.didChange):
(WI.TreeElement.prototype._attach):
(WI.TreeElement.prototype._detach):
(WI.TreeElement.prototype.collapse):
(WI.TreeElement.prototype.expand):
(WI.TreeElement.prototype.reveal):
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline):
(WI.TreeOutline.prototype.registerScrollVirtualizer):
(WI.TreeOutline.prototype.get updateVirtualizedElementsDebouncer): Added.
(WI.TreeOutline.prototype._updateVirtualizedElements): Added.
(WI.TreeOutline.prototype.updateVirtualizedElements.walk): Deleted.
(WI.TreeOutline.prototype.updateVirtualizedElements): Deleted.
* UserInterface/Views/WebSocketContentView.js:
(WI.WebSocketContentView):
(WI.WebSocketContentView.prototype.shown):
(WI.WebSocketContentView.prototype._updateFramesSoon):
(WI.WebSocketContentView.prototype._updateFrames):

* UserInterface/Main.html:
* UserInterface/Test.html:
* .eslintrc:

LayoutTests:

* inspector/unit-tests/debouncer.html: Renamed from inspector/unit-tests/debounce.html:.
* inspector/unit-tests/debouncer-expected.txt: Renamed from inspector/unit-tests/debounce-expected.txt.
* inspector/unit-tests/throttler.html: Renamed from inspector/unit-tests/throttle.html:.
* inspector/unit-tests/throttler-expected.txt: Renamed from inspector/unit-tests/throttle-expected.txt.
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

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

7 months agoUnreviewed, fix indentation.
nvasilyev@apple.com [Mon, 25 Feb 2019 02:23:43 +0000 (02:23 +0000)]
Unreviewed, fix indentation.

* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.markModified):

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

7 months ago[JSC] Lazily create sentinel Map and Set buckets
ysuzuki@apple.com [Mon, 25 Feb 2019 02:17:35 +0000 (02:17 +0000)]
[JSC] Lazily create sentinel Map and Set buckets
https://bugs.webkit.org/show_bug.cgi?id=194975

Reviewed by Saam Barati.

If VM::canUseJIT() returns false, we can lazily initialize sentinel Map and Set buckets.
This patch adds getters to VM which lazily allocate these buckets. We eagerly initialize
them if VM::canUseJIT() returns true since they can be touched from DFG and FTL.

* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
(JSC::BytecodeIntrinsicRegistry::sentinelMapBucketValue):
(JSC::BytecodeIntrinsicRegistry::sentinelSetBucketValue):
* bytecode/BytecodeIntrinsicRegistry.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetMapBucketNext):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetMapBucket):
(JSC::FTL::DFG::LowerDFGToB3::compileGetMapBucketNext):
* runtime/MapConstructor.cpp:
(JSC::mapPrivateFuncMapBucketNext):
* runtime/SetConstructor.cpp:
(JSC::setPrivateFuncSetBucketNext):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::sentinelSetBucketSlow):
(JSC::VM::sentinelMapBucketSlow):
* runtime/VM.h:
(JSC::VM::sentinelSetBucket):
(JSC::VM::sentinelMapBucket):

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

7 months agoFinish removing String::format
darin@apple.com [Sun, 24 Feb 2019 23:57:25 +0000 (23:57 +0000)]
Finish removing String::format
https://bugs.webkit.org/show_bug.cgi?id=194893

Reviewed by Daniel Bates.

Source/JavaScriptCore:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::nameForRegister): Use makeString instead of String::format,
using the new "pad" function.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::lastModified const): Use makeString and pad.
* html/FTPDirectoryDocument.cpp:
(WebCore::processFileDateString): Ditto.

* mathml/MathMLElement.cpp:
(WebCore::convertToPercentageIfNeeded): Use makeString and FormattedNumber.

* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::ResourceUsageOverlay::platformDraw): Use makeString and pad.

* page/linux/ResourceUsageOverlayLinux.cpp:
(WebCore::cpuUsageString): Use makeString, FormattedNumber, and pad.
(WebCore::gcTimerString): Use String::number.

* platform/DateComponents.cpp:
(WebCore::DateComponents::toStringForTime const): Use makeString and pad.
(WebCore::DateComponents::toString const): Ditto.

* platform/LocalizedStrings.cpp: Removed comment that mentioned String::format,
and that was also inaccurate.

* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
Use makeString and pad.
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawText): Ditto.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo): Ditto.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::formatMediaControlsTime const): Ditto.

Source/WebKit:

* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::getAssertion): Use makeString, attempting to fix
a problem where we passed an NSData * to format with a "%s"."

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
(timeToString): Use makeString and pad.

Source/WTF:

* wtf/Assertions.cpp:
(WTF::createWithFormatAndArguments): Moved this here from WTFString.cpp.
(WTFLog): Use WTF::createWithFormatAndArguments instead of String::format.

* wtf/HexNumber.h: Deleted unneeded toString function.

* wtf/text/StringConcatenate.h: Got rid of unneeded forward declaration of
StringTypeAdapter, since that's now in Forward.h. Tweaked formatting of templates
a bit. Use function templates for writeTo functions rather than having two of each.
Removed unused toString functions. Optimized case where we use have a UChar* and
a length of zero to not force the result to be 16-bit. Also gets rid of a small
NO_RETURN_DUE_TO_CRASH mess that we don't need. Refactored constructors to use some
static member helper functions to compute string lengths. Added the pad function
and the PaddingSpecification struct template, so we can add padding to anything
we can turn into a string. Got rid of the special case overload for single
arguments, since it only worked for things that the String constructor can handle.
Instead we will now use StringTypeAdapter, which works for more types. Possibly
less optimal for some special cases, which we could specialize for later if we like.
* wtf/text/StringConcatenateNumbers.h: Ditto.
* wtf/text/StringOperators.h: Ditto.
* wtf/text/StringView.h: Ditto.

* wtf/text/WTFString.cpp:
(WTF::createWithFormatAndArguments): Deleted.
(WTF::String::format): Deleted.
* wtf/text/WTFString.h: Deleted declaration of String::format.

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

7 months ago[WPE][GTK] Remove user agent quirk for washingtonpost.com
mcatanzaro@igalia.com [Sun, 24 Feb 2019 22:39:39 +0000 (22:39 +0000)]
[WPE][GTK] Remove user agent quirk for washingtonpost.com
https://bugs.webkit.org/show_bug.cgi?id=194981

Reviewed by Žan Doberšek.

Source/WebCore:

Remove user agent quirk for washingtonpost.com because we support JPEG 2000 now.

* platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresChromeBrowser):

Tools:

* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):

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

7 months ago[WPE] Install MemoryPressureHandler in UIProcess
mcatanzaro@igalia.com [Sun, 24 Feb 2019 22:37:38 +0000 (22:37 +0000)]
[WPE] Install MemoryPressureHandler in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=194617

Reviewed by Žan Doberšek.

Currently only GTK and Cocoa ports run MemoryPressureHandler in the UI process. WPE should
too.

We need @no-unify to avoid changing the unified source bundles under API/, which are
notoriously fragile. (WebMemoryPressureHandler.cpp sorts just above API/.)

* SourcesWPE.txt:
* UIProcess/WebMemoryPressureHandler.cpp:
(WebKit::installMemoryPressureHandler):
* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitialize):

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

7 months agoRemove dead code: AdjacencyList::justOneChild()
rmorisset@apple.com [Sun, 24 Feb 2019 03:18:33 +0000 (03:18 +0000)]
Remove dead code: AdjacencyList::justOneChild()
https://bugs.webkit.org/show_bug.cgi?id=194965

Reviewed by Sam Weinig.

* dfg/DFGAdjacencyList.h:
(JSC::DFG::AdjacencyList::justOneChild const): Deleted.

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

7 months agoGive DrawingAreas their own identifiers
cdumez@apple.com [Sun, 24 Feb 2019 03:03:10 +0000 (03:03 +0000)]
Give DrawingAreas their own identifiers
https://bugs.webkit.org/show_bug.cgi?id=194969
<rdar://problem/48154508>

Unreviewed, fix API test debug assertion failures after r241988.
We do not support sending an ObjectIdentifier that is 0 via IPC so update WebPageProxy::CreateNewPage
IPC to return an Optional<WebPageCreationParameters> instead of a WebPageCreationParameters. It returns
nullopt when there this no UIClient or the client did not create the page, instead of returning a
default-initialized WebPageCreationParameters.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):

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

7 months agoUnreviewed, fix find/replace error from r232178
mcatanzaro@igalia.com [Sun, 24 Feb 2019 00:57:25 +0000 (00:57 +0000)]
Unreviewed, fix find/replace error from r232178

Looks like this was the only such error in that commit.

* wtf/URLHelpers.cpp:
(WTF::URLHelpers::isLookalikeCharacter):

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

7 months agoRemove remnants of iOS WK1 scrolling tree code
simon.fraser@apple.com [Sun, 24 Feb 2019 00:03:37 +0000 (00:03 +0000)]
Remove remnants of iOS WK1 scrolling tree code
https://bugs.webkit.org/show_bug.cgi?id=194980

Reviewed by Sam Weinig.

Source/WebCore:

Remove ScrollingTreeIOS and ScrollingCoordinatorIOS which were never instantiated,
to reduce maintenance costs and simplify.

Merge ScrollingTreeFrameScrollingNodeIOS into ScrollingTreeFrameScrollingNodeRemoteIOS
since that was the only concrete subclass, removing code which never applies to iOS WK2
(e.g. the synchronous scrolling code path).

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.h:
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::handleWheelEvent):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::updateLayersAfterDelegatedScroll): Deleted.
(WebCore::ScrollingTreeScrollingNode::scrollableAreaSize const): Deleted.
(WebCore::ScrollingTreeScrollingNode::totalContentsSize const): Deleted.
(WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets const): Deleted.
(WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets const): Deleted.
(WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsetRanges const): Deleted.
(WebCore::ScrollingTreeScrollingNode::verticalSnapOffsetRanges const): Deleted.
(WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex const): Deleted.
(WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex const): Deleted.
(WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Deleted.
(WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Deleted.
(WebCore::ScrollingTreeScrollingNode::useDarkAppearanceForScrollbars const): Deleted.
(WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition const): Deleted.
(WebCore::ScrollingTreeScrollingNode::reachableContentsSize const): Deleted.
(WebCore::ScrollingTreeScrollingNode::parentRelativeScrollableRect const): Deleted.
(WebCore::ScrollingTreeScrollingNode::scrollOrigin const): Deleted.
(WebCore::ScrollingTreeScrollingNode::totalContentsSizeForRubberBand const): Deleted.
(WebCore::ScrollingTreeScrollingNode::setTotalContentsSizeForRubberBand): Deleted.
(WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity const): Deleted.
(WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity const): Deleted.
(WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar const): Deleted.
(WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar const): Deleted.
(WebCore::ScrollingTreeScrollingNode::canHaveScrollbars const): Deleted.
(WebCore::ScrollingTreeScrollingNode::expectsWheelEventTestTrigger const): Deleted.
(WebCore::ScrollingTreeScrollingNode::scrollContainerLayer const): Deleted.
(WebCore::ScrollingTreeScrollingNode::scrolledContentsLayer const): Deleted.
* page/scrolling/ios/ScrollingCoordinatorIOS.h: Removed.
* page/scrolling/ios/ScrollingCoordinatorIOS.mm: Removed.
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Removed.
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Removed.
* page/scrolling/ios/ScrollingTreeIOS.cpp: Removed.
* page/scrolling/ios/ScrollingTreeIOS.h: Removed.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):

Source/WebKit:

Remove ScrollingTreeIOS and ScrollingCoordinatorIOS which were never instantiated.

Merge ScrollingTreeFrameScrollingNodeIOS into ScrollingTreeFrameScrollingNodeRemoteIOS,
removing code which never applies to iOS WK2 (e.g. the synchronous scrolling code path).

* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::minimumScrollPosition const):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::maximumScrollPosition const):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition const):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollPosition):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateChildNodesAfterScroll):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterViewportChange):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:

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

7 months ago[WebGPU] Buffer updates part 1: async mapping functions, unmap, and destroy
justin_fan@apple.com [Sat, 23 Feb 2019 23:24:27 +0000 (23:24 +0000)]
[WebGPU] Buffer updates part 1: async mapping functions, unmap, and destroy
https://bugs.webkit.org/show_bug.cgi?id=194665

Reviewed by Dean Jackson.

Source/WebCore:

Test: map-write-buffers.html. Other tests updated to match new API.

* Modules/webgpu/WebGPUBindGroupDescriptor.cpp: Added.
(WebCore::validateBufferBindingType): Ensure buffer binding usages match the binding type.
(WebCore::WebGPUBindGroupDescriptor::asGPUBindGroupDescriptor const): Logic moved out from WebGPUDevice.cpp.
* Modules/webgpu/WebGPUBindGroupDescriptor.h:
* Modules/webgpu/WebGPUBuffer.cpp: Added GPUBuffer functionality.
(WebCore::WebGPUBuffer::create):
(WebCore::WebGPUBuffer::WebGPUBuffer):
(WebCore::WebGPUBuffer::mapReadAsync):
(WebCore::WebGPUBuffer::mapWriteAsync):
(WebCore::WebGPUBuffer::unmap):
(WebCore::WebGPUBuffer::destroy):
(WebCore::WebGPUBuffer::rejectOrRegisterPromiseCallback): Register a mapping request on the GPUBuffer, if valid.
* Modules/webgpu/WebGPUBuffer.h:
(WebCore::WebGPUBuffer::buffer const):
(WebCore::WebGPUBuffer::mapping const): Deleted.
* Modules/webgpu/WebGPUBuffer.idl: Update to latest API and enable every function except setSubData.
* Modules/webgpu/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::beginRenderPass): Renamed descriptor conversion method.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBuffer const): Update to non-nullable return type.
(WebCore::WebGPUDevice::createBindGroup const): Move descriptor validation logic to descriptor implementation.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPURenderPassDescriptor.cpp:
(WebCore::WebGPURenderPassDescriptor::asGPURenderPassDescriptor const): Renamed from validateAndConvertToGPUVersion.
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::setVertexBuffers): Add validation for submitted buffers.
* platform/graphics/gpu/GPUBuffer.cpp: Added.
(WebCore::GPUBuffer::PendingMappingCallback::PendingMappingCallback): New struct for retaining a reference to mapping callbacks.
* platform/graphics/gpu/GPUBuffer.h: Add functionality to retain callbacks and usage bits.
(WebCore::GPUBuffer::isVertex const):
(WebCore::GPUBuffer::isUniform const):
(WebCore::GPUBuffer::isStorage const):
(WebCore::GPUBuffer::isReadOnly const):
(WebCore::GPUBuffer::PendingMapPromise::create):
(WebCore::GPUBuffer::isMappable const):
(WebCore::GPUBuffer::isMapWriteable const):
(WebCore::GPUBuffer::isMapReadable const):
(WebCore::GPUBuffer::mapping const): Deleted.
* platform/graphics/gpu/GPUBufferUsage.h: enum class cannot be logical ORed together.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::tryCreateBuffer const): Renamed from createBuffer.
(WebCore::GPUDevice::createBuffer const): Deleted.
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::tryCreateSharedBuffer): Attempt to create a MTLBuffer with shared memory.
(WebCore::GPUBuffer::tryCreate): No longer use Gigacage-allocated memory for MTLBuffer.
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::~GPUBuffer):
(WebCore::GPUBuffer::registerMappingCallback): Register the provided callback to be executed when the staging buffer can be safely exposed.
(WebCore::GPUBuffer::stagingBufferForRead): Prepare the arrayBuffer for reading and run the mapping callback.
(WebCore::GPUBuffer::stagingBufferForWrite): Ditto, but for writing.
(WebCore::GPUBuffer::unmap): If needed, copy the staging ArrayBuffer to the MTLBuffer. Unregister any mapping callback.
(WebCore::GPUBuffer::destroy): Stub implementation for now. Frees the MTLBuffer as soon as possible.
(WebCore::GPUBuffer::create): Deleted.
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
(WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Ensure only read-only GPUBuffers are used as read-only on the GPU.

Add symbols for new files:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Rewrite buffers.html -> map-write-buffers.html to test new functionality. Rewrite other affected
tests to use mapWriteAsync.

* webgpu/buffer-resource-triangles.html:
* webgpu/buffers-expected.txt: Renamed to map-write-buffers-expected.txt.
* webgpu/buffers.html: Renamed to map-write-buffers.html.
* webgpu/depth-enabled-triangle-strip.html:
* webgpu/map-write-buffers-expected.txt: Renamed from buffers-expected.txt.
* webgpu/map-write-buffers.html: Renamed from buffers.html.
* webgpu/vertex-buffer-triangle-strip.html:

* platform/mac/TestExpectations: Skip all webgpu tests on macOS 10.12 bots.

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

7 months agoUnreviewed, fix -Wunused-param warning
mcatanzaro@igalia.com [Sat, 23 Feb 2019 20:49:39 +0000 (20:49 +0000)]
Unreviewed, fix -Wunused-param warning

* jsc.cpp:

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

7 months agoAdd an exception check and some assertions in StringPrototype.cpp.
mark.lam@apple.com [Sat, 23 Feb 2019 18:15:41 +0000 (18:15 +0000)]
Add an exception check and some assertions in StringPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=194962
<rdar://problem/48013416>

Reviewed by Yusuke Suzuki and Saam Barati.

Source/JavaScriptCore:

* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::operationStringProtoFuncReplaceRegExpEmptyStr):

Source/WTF:

Add an AssertNoOverflow overflow handler which allows us to do CheckedArithmetic
for assertion purpose only on debug builds but sacrifices no performance on
release builds.

* wtf/CheckedArithmetic.h:
(WTF::AssertNoOverflow::overflowed):
(WTF::AssertNoOverflow::clearOverflow):
(WTF::AssertNoOverflow::crash):
(WTF::AssertNoOverflow::hasOverflowed const):
(WTF::observesOverflow):
(WTF::observesOverflow<AssertNoOverflow>):
(WTF::safeAdd):
(WTF::safeSub):
(WTF::safeMultiply):
(WTF::Checked::operator+=):
(WTF::Checked::operator-=):
(WTF::Checked::operator*=):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):

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

7 months agoAdd new mac target numbers
keith_miller@apple.com [Sat, 23 Feb 2019 18:01:16 +0000 (18:01 +0000)]
Add new mac target numbers
https://bugs.webkit.org/show_bug.cgi?id=194955

Reviewed by Tim Horton.

Source/bmalloc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/ThirdParty/libwebrtc:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebCore/PAL:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebKit:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:

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

7 months agoAX: WebKit is incorrectly mapping the <meter> element to progressbar
cfleizach@apple.com [Sat, 23 Feb 2019 16:11:41 +0000 (16:11 +0000)]
AX: WebKit is incorrectly mapping the <meter> element to progressbar
https://bugs.webkit.org/show_bug.cgi?id=164051
<rdar://problem/29055615>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Add a specific role for meter and map that to the appropriate mac role.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren const):
(WebCore::AccessibilityNodeObject::isProgressIndicator const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::accessibleNameDerivesFromContent const):
(WebCore::AccessibilityObject::isRangeControl const):
(WebCore::AccessibilityObject::computedRoleString const):
* accessibility/AccessibilityObjectInterface.h:
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::roleValue const):
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant const):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

LayoutTests:

* platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/meter-element-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

7 months agoGive DrawingAreas their own identifiers
cdumez@apple.com [Sat, 23 Feb 2019 05:30:19 +0000 (05:30 +0000)]
Give DrawingAreas their own identifiers
https://bugs.webkit.org/show_bug.cgi?id=194969
<rdar://problem/48154508>

Reviewed by Geoffrey Garen.

Give DrawingAreas their own identifiers instead of using the pageID. It will make the IPC more robust now that a
WebPageProxy can have several drawing areas with PSON.

* Shared/DrawingAreaInfo.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/AcceleratedDrawingAreaProxy.cpp:
(WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
(WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::~DrawingAreaProxy):
(WebKit::DrawingAreaProxy::messageSenderConnection const):
(WebKit::DrawingAreaProxy::sendMessage):
(WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::identifier const):
(WebKit::DrawingAreaProxy::process const):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::update):
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
(WebKit::AcceleratedDrawingArea::layerHostDidFlushLayers):
(WebKit::AcceleratedDrawingArea::sendDidUpdateBackingStoreState):
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::DrawingArea):
(WebKit::DrawingArea::removeMessageReceiverIfNeeded):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::identifier const):
(WebKit::DrawingArea::send):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded):
(WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):

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

7 months agoFix a legacy animation test. The <!-- webkit-test-runner --> was inside the <style>.
simon.fraser@apple.com [Sat, 23 Feb 2019 05:14:34 +0000 (05:14 +0000)]
Fix a legacy animation test. The <!-- webkit-test-runner --> was inside the <style>.

* legacy-animation-engine/animations/additive-transform-animations.html:

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

7 months agoCrash in SWServerJobQueue::runNextJobSynchronously
rniwa@webkit.org [Sat, 23 Feb 2019 05:05:03 +0000 (05:05 +0000)]
Crash in SWServerJobQueue::runNextJobSynchronously
https://bugs.webkit.org/show_bug.cgi?id=194974

Reviewed by Geoffrey Garen.

We suspect the crash is happening due to m_jobQueue being empty in runNextJobSynchronously
or there is a timer heap corruption again :(

Exit early when m_jobQueue is empty. Also add a debug assert that this should never happen
but convert an existing release assert to a debug assert since this appears to be hitting
too frequently in wild.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::runNextJobSynchronously):

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

7 months ago[Cocoa] Do not suppress deprecation warnings when calling sandbox_extension_issue_file
aestes@apple.com [Sat, 23 Feb 2019 04:50:56 +0000 (04:50 +0000)]
[Cocoa] Do not suppress deprecation warnings when calling sandbox_extension_issue_file
https://bugs.webkit.org/show_bug.cgi?id=194971
<rdar://problem/35786264>

Reviewed by Tim Horton.

sandbox_extension_issue_file is not actually deprecated.

* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):

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

7 months agoClean up the setScrollPosition/setScrollPositionWithoutContentEdgeConstraints confusi...
simon.fraser@apple.com [Sat, 23 Feb 2019 04:40:08 +0000 (04:40 +0000)]
Clean up the setScrollPosition/setScrollPositionWithoutContentEdgeConstraints confusion in the scrolling tree nodes
https://bugs.webkit.org/show_bug.cgi?id=194968

Reviewed by Antti Koivisto.

Having both setScrollPosition() and setScrollPositionWithoutContentEdgeConstraints() is confusing because
you can't tell which is the bottleneck. So add a 'clamp' parameter to setScrollPosition() and merge them.

ScrollingTreeFrameScrollingNodeMac::setScrollPosition() replicates a bit of code but future cleanups will
reduce that.

* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition): Deleted. This was the same as the base class method.
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::setScrollPosition):
(WebCore::ScrollingTreeScrollingNode::clampScrollPosition const):
(WebCore::ScrollingTreeScrollingNode::scrollBy):
(WebCore::ScrollingTreeScrollingNode::setScrollPositionWithoutContentEdgeConstraints): Deleted.
(WebCore::ScrollingTreeScrollingNode::scrollByWithoutContentEdgeConstraints): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints): Deleted. Did nothing.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints): Deleted.
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPosition):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints): Deleted.
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::delta const):
* platform/ScrollTypes.h:

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

7 months agoAX: Treat AXChildrenInNavigationOrder as AXChildren before adding support for aria...
commit-queue@webkit.org [Sat, 23 Feb 2019 04:31:33 +0000 (04:31 +0000)]
AX: Treat AXChildrenInNavigationOrder as AXChildren before adding support for aria-flowto
https://bugs.webkit.org/show_bug.cgi?id=194923

Patch by Eric Liang <ericliang@apple.com> on 2019-02-22
Reviewed by Chris Fleizach.

Source/WebCore:

Added AXChildrenInNavigationOrder attribute that returns the same array as from AXChildren. It prevents AppKit from reordering elements from the fallback AXChildren attribute.

Test: accessibility/mac/children-in-navigation-order-returns-children.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

Added test to check AXChildrenInNavigationOrder returns non-empty array from AXChildren.
* accessibility/mac/children-in-navigation-order-returns-children-expected.txt: Added.
* accessibility/mac/children-in-navigation-order-returns-children.html: Added.

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

7 months agoWeb Inspector: Timelines: add UI for preventing auto-stop
drousso@apple.com [Sat, 23 Feb 2019 04:17:58 +0000 (04:17 +0000)]
Web Inspector: Timelines: add UI for preventing auto-stop
https://bugs.webkit.org/show_bug.cgi?id=194956

Reviewed by Joseph Pecoraro.

Add a checkbox to the navigation area of the Timelines tab that controls whether recordings
automatically stop (e.g. after "load" or a period of inactivity).

* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
(WI.TimelineRecordingContentView.prototype.get navigationItems):
(WI.TimelineRecordingContentView.prototype._handleAutoStopCheckboxCheckedDidChange): Added.
(WI.TimelineRecordingContentView.prototype._handleTimelinesAutoStopSettingChanged): Added.

* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager):
(WI.TimelineManager.prototype.capturingStopped):
(WI.TimelineManager.prototype._stopAutoRecordingSoon):
(WI.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
(WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
(WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):

* UserInterface/Base/Setting.js:
* Localizations/en.lproj/localizedStrings.js:

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

7 months agoREGRESSION(r?): Web Inspector: Popovers have inset shadows
drousso@apple.com [Sat, 23 Feb 2019 04:10:00 +0000 (04:10 +0000)]
REGRESSION(r?): Web Inspector: Popovers have inset shadows
https://bugs.webkit.org/show_bug.cgi?id=192963
<rdar://problem/46888679>

Reviewed by Brian Burg.

* UserInterface/Views/Popover.js:
(WI.Popover.prototype._drawBackground):
(WI.Popover.prototype._drawBackground.isolate): Added.
* UserInterface/Views/Popover.css:
(.popover):

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

7 months agoWeb Inspector: Styles Redesign: clicking CSS property or selector should always selec...
drousso@apple.com [Sat, 23 Feb 2019 04:07:58 +0000 (04:07 +0000)]
Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
https://bugs.webkit.org/show_bug.cgi?id=180791
<rdar://problem/36038366>

Reviewed by Brian Burg.

* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField):
(WI.SpreadsheetSelectorField.prototype.startEditing):
(WI.SpreadsheetSelectorField.prototype.stopEditing):
(WI.SpreadsheetSelectorField.prototype._handleMouseDown): Added.
(WI.SpreadsheetSelectorField.prototype._handleMouseUp): Added.
(WI.SpreadsheetSelectorField.prototype._handleFocus): Deleted.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .selector.editing:focus, .spreadsheet-css-declaration .selector > .matched): Added.
(.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
(.spreadsheet-css-declaration .selector:focus, .spreadsheet-css-declaration .selector > .matched): Deleted.

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

7 months ago[WinCairo] Enable wk1/wk2 suffix for platform search path.
basuke.suzuki@sony.com [Sat, 23 Feb 2019 04:05:55 +0000 (04:05 +0000)]
[WinCairo] Enable wk1/wk2 suffix for platform search path.
https://bugs.webkit.org/show_bug.cgi?id=194846

Reviewed by Don Olmstead.

Tools:

Added _search_paths() and _port_specific_expectations_files() for
WinCairoPort.

* Scripts/webkitpy/port/win.py:
(WinCairoPort.default_baseline_search_path):
(WinCairoPort):
(WinCairoPort._port_specific_expectations_files):
(WinCairoPort._search_paths):

LayoutTests:

Added WebKitLegacy specific TestExpectations.

* platform/wincairo-wk1/TestExpectations: Added.
* platform/wincairo/TestExpectations:

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

7 months agoProcessSwap.PageOverlayLayerPersistence fails on iOS and in debug builds
timothy_horton@apple.com [Sat, 23 Feb 2019 02:38:02 +0000 (02:38 +0000)]
ProcessSwap.PageOverlayLayerPersistence fails on iOS and in debug builds
https://bugs.webkit.org/show_bug.cgi?id=194963

Reviewed by Dean Jackson.

Source/WebCore:

Tested by existing failing API test.

* page/Page.cpp:
(WebCore::Page::installedPageOverlaysChanged): Deleted.
* page/Page.h:
(WebCore::Page::pageOverlayController):
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::installedPageOverlaysChanged):
(WebCore::PageOverlayController::detachViewOverlayLayers):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::uninstallPageOverlay):
(WebCore::PageOverlayController::willDetachRootLayer): Deleted.
* page/PageOverlayController.h:
As intended by r240940, move installedPageOverlaysChanged to PageOverlayController.
Also, make it ignore isInWindow state; otherwise, if you install a overlay
and then come into window, nothing installs the root layer. There is no
need for this code to follow in-window state manually anymore since
the DrawingArea and RenderLayerCompositor just hook the layers up when needed.

Make some methods private, and make detachViewOverlayLayers only touch
*view* overlays, so that we don't detach the document-relative root
layer when you drop to having no view overlays. This maintains
existing behavior because nothing was calling PageOverlayController::detachViewOverlayLayers.

Now there are no callers of willDetachRootLayer, so remove it.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
Do a `contains` check instead of `equals`, because in debug builds we
put the GraphicsLayer pointer in a prefix.

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

7 months agoRotation animations sometimes use the wrong origin (affects apple.com)
dino@apple.com [Sat, 23 Feb 2019 02:10:58 +0000 (02:10 +0000)]
Rotation animations sometimes use the wrong origin (affects apple.com)
https://bugs.webkit.org/show_bug.cgi?id=194878
<rdar://problem/43908047>

Reviewed by Simon Fraser.

Forgot another expected results file.

* legacy-animation-engine/animations/additive-transform-animations-expected.html: Added.

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

7 months agoWeb Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
nvasilyev@apple.com [Sat, 23 Feb 2019 01:51:15 +0000 (01:51 +0000)]
Web Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
https://bugs.webkit.org/show_bug.cgi?id=194970
<rdar://problem/48330126>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineRuler.css:
(@media (prefers-color-scheme: dark)):
(.timeline-ruler > .markers > .marker.dom-content-event):
Make the marker lighter for the dark mode.

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

7 months agoSkip the test added in r241932 on iOS for now.
rniwa@webkit.org [Sat, 23 Feb 2019 01:03:55 +0000 (01:03 +0000)]
Skip the test added in r241932 on iOS for now.

* platform/ios/TestExpectations:

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

7 months ago[iOS] Callout menu overlaps in-page controls when editing a comment in github.com...
wenson_hsieh@apple.com [Sat, 23 Feb 2019 00:48:16 +0000 (00:48 +0000)]
[iOS] Callout menu overlaps in-page controls when editing a comment in github.com's issue tracker
https://bugs.webkit.org/show_bug.cgi?id=194873
<rdar://problem/46701974>

Reviewed by Tim Horton.

Source/WebKit:

On the topic of supporting web-based rich text editors on iOS, one problematic area has always been handling
conflicts between platform UI (i.e., the system callout menu) and in-page text editing controls. This issue
comes up in websites that don't use the "hidden contenteditable" approach to rich text editing, but also show
additional controls in a toolbar or contextual menu above the selection. In these cases, what often happens is
that system controls overlap controls in the page.

Luckily, the iOS callout menu (i.e. the private UICalloutBar) is capable of presenting with a list of "evasion
rects" to avoid; if the callout bar would normally intersect with one of these rects, then a different
orientation that does not intersect with one of these rects is chosen instead. Currently, the only rect added
here by UIKit when presenting the callout menu is the bounding rect of the on-screen keyboard, but after
<rdar://problem/48128337>, we now have a generalized mechanism for offering additional evasion rects before
UIKit presents the callout menu.

This patch adopts the mechanism introduced in <rdar://problem/48128337>, and introduces a heuristic for
determining the approximate location of controls in the page which might overlap the callout menu. This
heuristic works by hit-testing for clickable (but non-editable) nodes above the bounds of the selection, which
are additionally not hit-tested by advancing outwards from any of the other edges of the selection bounds.
Additionally, any hit-tested nodes whose bounding rects are very large (relative to the content view size) are
ignored (this deals with scenarios where the body or a large container element has a click handler). We then add
the bounding rects of each of the nodes that fit this criteria to the list of rects for UIKit to avoid when
presenting the system callout menu.

The result is that WebKit will, by default, avoid overlapping anything that looks like controls in the page when
showing a callout menu in editable content. In practice, this fixes overlapping controls on most websites that
roll their own context menu or toolbar in their rich text editor.

Test: editing/selection/ios/avoid-showing-callout-menu-over-controls.html

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):

Drive-by: handle null completion handler arguments more gracefully, by raising an NSException and bailing before
attempting to invoke a nil block.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::requestEvasionRectsAboveSelection):

See above for more detail.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestEvasionRectsAboveSelection):

Tools:

Add a couple of UIScriptController methods to make callout menu testing on iOS easier (see below).

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::menuRect const):
(WTR::UIScriptController::isShowingMenu const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::menuRect const):

Add a function to query the bounds of the callout menu in content coordinates.

(WTR::UIScriptController::isShowingMenu const):

Add a function to query whether the callout menu is shown (i.e., has finished its appearance animation).

* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::rectForMenuAction const):
(WTR::UIScriptController::menuRect const):
(WTR::UIScriptController::isShowingMenu const):
(WTR::findViewInHierarchyOfType): Deleted.

LayoutTests:

Add a test to ensure that the we dodge clickable elements when showing the callout bar.

* editing/selection/ios/avoid-showing-callout-menu-over-controls-expected.txt: Added.
* editing/selection/ios/avoid-showing-callout-menu-over-controls.html: Added.
* resources/ui-helper.js:
(window.UIHelper.waitForMenuToShow.return.new.Promise):
(window.UIHelper.waitForMenuToShow):
(window.UIHelper.menuRect):
(window.UIHelper):

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

7 months ago[iOS] Break a reference cycle between PreviewLoader and ResourceLoader
aestes@apple.com [Sat, 23 Feb 2019 00:41:58 +0000 (00:41 +0000)]
[iOS] Break a reference cycle between PreviewLoader and ResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=194964
<rdar://problem/48279441>

Reviewed by Alex Christensen.

When a document's QuickLook preview is loaded, a reference cycle is created between
PreviewLoader and ResourceLoader. Break the cycle by clearing m_previewLoader in
ResourceLoader::releaseResources().

Fixes leaks detected by `run-webkit-tests --leaks LayoutTests/quicklook`.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources):

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