Timeline



Jun 4, 2019:

11:34 PM Changeset in webkit [246100] by bshafiei@apple.com
  • 2 edits in branches/safari-608.1.27-branch/Source/WebCore

Cherry-pick r246099. rdar://problem/48006291

iPadOS: Google calendars new event picker moves and flickers in landscape with software keyboard
https://bugs.webkit.org/show_bug.cgi?id=198556

Reviewed by Wenson Hsieh.

Fix the issuse that it's really hard to create a new event using Google calendar on iPadOS with
a software keyboard enabled because tapping on date brings up software keyboard and erratically
shifts up/down the new event dialog/pane.

Add a site specific quirk to pretend these input elements have inputmode=none for now.

No new tests since this is a site specific quirk.

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

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

11:09 PM Changeset in webkit [246099] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

iPadOS: Google calendars new event picker moves and flickers in landscape with software keyboard
https://bugs.webkit.org/show_bug.cgi?id=198556

Reviewed by Wenson Hsieh.

Fix the issuse that it's really hard to create a new event using Google calendar on iPadOS with
a software keyboard enabled because tapping on date brings up software keyboard and erratically
shifts up/down the new event dialog/pane.

Add a site specific quirk to pretend these input elements have inputmode=none for now.

No new tests since this is a site specific quirk.

  • page/Quirks.cpp:

(WebCore::Quirks::needsInputModeNoneImplicitly const):

10:41 PM Changeset in webkit [246098] by bshafiei@apple.com
  • 2 edits in branches/safari-608.1.27-branch/Source/WebKit

Cherry-pick r246077. rdar://problem/51164741

Uploading third-party applications from /Applications needs additional syscall access
https://bugs.webkit.org/show_bug.cgi?id=198537
<rdar://problem/51164741>

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:

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

10:00 PM Changeset in webkit [246097] by Chris Dumez
  • 4 edits in trunk

Cookies set via [WKHTTPCookieStore setCookie:] on store right after constructing WKWebView get lost
https://bugs.webkit.org/show_bug.cgi?id=198553
<rdar://problem/51317144>

Reviewed by Geoffrey Garen.

Source/WebKit:

If you call [WKHTTPCookieStore setCookie:] right after you construct the WKWebView and before the
WebContent process has finished launching, then WebsiteDataStore::processPoolForCookieStorageOperations()
would return null, even though there is already a view/page/WebProcessProxy/WebProcessPool for this data
store. As a result, the cookie would get added to the WebsiteDataStore's m_pendingCookies but it will
not be used since we've already previously launched a network process when we constructed the web view.

The reason processPoolForCookieStorageOperations() would return null is because WebsiteDataStore::processPools()
relies on WebProcessLifetimeObserver::processes() but processes only register themselves with the
WebProcessLifetimeObservers when they have pages *and* after they are finished launching.

This patch updates processPoolForCookieStorageOperations() to fallback to iterating over all process pools
and find a process pool with a process using the current data store and which has pages. This way, even if
the process is still launching, we'll properly find its associated process pool.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:

(-[CheckSessionCookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

9:15 PM Changeset in webkit [246096] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[ContentChangeObserver] Gmail text editing controls require two taps
https://bugs.webkit.org/show_bug.cgi?id=198541
<rdar://problem/51375055>

Reviewed by Simon Fraser.

Source/WebCore:

When the animation completes we should also check if the newly visible content is also clickable and report it accordingly.
When the animated content is not clickable, we need to proceed with click instead of stopping at hover.

Test: fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html

  • page/ios/ContentChangeObserver.cpp:

(WebCore::isConsideredClickable):
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::adjustObservedState):
(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
(WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const): Deleted. -> Turn it into a static function so that didFinishTransition could call it as well.

  • page/ios/ContentChangeObserver.h:

LayoutTests:

  • fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html: Added.
8:14 PM Changeset in webkit [246095] by Michael Catanzaro
  • 10 edits in trunk

Fix miscellaneous build warnings
https://bugs.webkit.org/show_bug.cgi?id=198544

Reviewed by Don Olmstead.

Source/JavaScriptCore:

Silence -Wclass-memaccess warning in this dangerous code.

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):

Source/WebCore:

Carefully silence -Wsign-compare warnings.

  • contentextensions/DFABytecodeCompiler.cpp:

(WebCore::ContentExtensions::DFABytecodeCompiler::compile):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::indexForData):

  • xml/XSLStyleSheetLibxslt.cpp:

(WebCore::XSLStyleSheet::parseString):

Source/WebKit:

Carefully silence -Wsign-compare warnings.

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::readOrMakeSalt):

Tools:

When converting to PRIVATE include directories, we accidentally dropped SYSTEM here. The
naming convention used here is a bit confusing: the *_SYSTEM_INCLUDE_DIRECTORIES actually
uses both SYSTEM and PRIVATE. We should probably clarify this.

  • TestWebKitAPI/PlatformGTK.cmake:
7:21 PM Changeset in webkit [246094] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Improve performance of the lazy image loader
https://bugs.webkit.org/show_bug.cgi?id=198530

Reviewed by Devin Rousso.

  • wp-content/themes/webkit/scripts/global.js:

(enableScrollableTables):
(lazyLoadImages):
(findParentMenu): Deleted.
(i.m.menus.m.targetMenu.targetMenuClass.indexOf): Deleted.
(inView): Deleted.
(): Deleted.
(loadImage.else.img.onload): Deleted.
(loadImage): Deleted.
(onMovement): Deleted.
(updateImages): Deleted.

6:03 PM Changeset in webkit [246093] by youenn@apple.com
  • 8 edits in trunk

getUserMedia requests should be processed sequentially in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=198430
<rdar://problem/51311420>

Reviewed by Eric Carlson.

Source/WebKit:

Before the patch, we process all incoming gum/gdm requests in parallel.
We now queueu them and process them one at a time.
This allows to take into consideration state changes triggered by one request for the next one.
In particular, if a user grants a request, this might grant the next one as well.

To implement that, we keep a reference of the current request to process.
We queue other requests happening whenever another request comes.
When the request is processed, we look at the next one in the queue.
To ensure we do not stop processing the queue for no good reason, some refactoring is done:

  • queue processing happens when sending back IPC response to WebProcess.
  • denyRequest/grantRequest are consistently called in the manager proxy.
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests):
Invalidate pregranted requests as well.
(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
Renamed from userMediaAccessWasDenied to denyRequest.
This method is now consistently used whenever the manager proxy wants to deny the request.
It does the IPC to the WebProcess and triggers processing of the next request.
(WebKit::UserMediaPermissionRequestManagerProxy::grantRequest):
Renamed from userMediaAccessWasGranted to grantRequest.
(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
This method is now consistently used whenever the manager proxy wants to deny the request.
It does the IPC to the WebProcess and triggers processing of the next request.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired):
We now keep a queue of request instead of request IDs to make the deny code path more consistent.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::processNextUserMediaRequestIfNeeded):
(WebKit::UserMediaPermissionRequestManagerProxy::startProcessingUserMediaPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
To make sure we do not process a different request, we keep a pointer to the request and compare it with the current media request.
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::viewIsBecomingVisible):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):

  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::setDeviceAsFirst):
(WebKit::UserMediaPermissionRequestProxy::allow):
(WebKit::UserMediaPermissionRequestProxy::deny):

  • UIProcess/UserMediaPermissionRequestProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:

(-[GetUserMediaRepromptUIDelegate _webView:requestMediaCaptureAuthorization:decisionHandler:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia.html:
5:40 PM Changeset in webkit [246092] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Fix 64-bit vs 32-bit mismatch in ISOFairPlayStreamingPsshBox.cpp
https://bugs.webkit.org/show_bug.cgi?id=198539
<rdar://problem/51410358>

Reviewed by Alex Christensen.

Both ISOFairPlayStreamingKeyAssetIdBox and
ISOFairPlayStreamingKeyContextBox have Vector<> data members. The
parse() members of these classes call Vector<>::resize() on these
members. In both cases, the type of the parameter passed is a
uint64_t. However, resize() takes a size_t. On some platforms, size_t
is a 32-bit value, leading to a compile-time type mismatch error. Fix
this by changing the type of the value passed to parse() into a
size_t.

No new tests -- no new functionality.

  • platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp:

(WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
(WebCore::ISOFairPlayStreamingKeyContextBox::parse):

5:26 PM Changeset in webkit [246091] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Fix 64-bit vs 32-bit mismatch in TileController.cpp
https://bugs.webkit.org/show_bug.cgi?id=198540
<rdar://problem/51410851>

Reviewed by Alex Christensen.

TileController::blankPixelCountForTiles calculates its result as a
uint64_t, but returns it as an unsigned. The former is a 64-bit value,
while the latter can be a 32-bit value on some platforms. This
mismatch can lead to a compile-time error. Fix this by explicitly
casting the 64-bit value to an "unsigned".

No new tests -- no new functionality.

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::blankPixelCountForTiles):

5:23 PM Changeset in webkit [246090] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

Unreviewed, rolling out r246086.
https://bugs.webkit.org/show_bug.cgi?id=198549

Causing Internal build failures (Requested by ShawnRoberts on
#webkit).

Reverted changeset:

"Remove some unused selection code"
https://bugs.webkit.org/show_bug.cgi?id=198451
https://trac.webkit.org/changeset/246086

5:11 PM Changeset in webkit [246089] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

Layout test landed flaky in 245873 [ Release ] http/wpt/service-workers/service-worker-networkprocess-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=198435
<rdar://problem/51314295>

Reviewed by Alex Christensen.

Make the test more robust by retrying the null test more than once.

  • http/wpt/service-workers/service-worker-networkprocess-crash-expected.txt:
  • http/wpt/service-workers/service-worker-networkprocess-crash.html:
4:44 PM Changeset in webkit [246088] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Turn on background color estimation for all link indicators
https://bugs.webkit.org/show_bug.cgi?id=198547
<rdar://problem/51140196>

Reviewed by Dean Jackson.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::computeAndSendEditDragSnapshot):
(WebKit::linkIndicatorPositionInformation):

4:31 PM Changeset in webkit [246087] by Chris Dumez
  • 3 edits
    3 adds in trunk

Crash when calling XMLHttpRequest.setRequestHeader() in a worker
https://bugs.webkit.org/show_bug.cgi?id=198534
<rdar://problem/51393912>

Reviewed by Alex Christensen.

Source/WebCore:

Make sure the script execution context is a Document because calling document()
to get the settings.

Test: fast/workers/worker-xhr-setRequestHeader.html

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::setRequestHeader):

LayoutTests:

Add layout test coverage.

  • fast/workers/resources/worker-xhr-setRequestHeader.js: Added.
  • fast/workers/worker-xhr-setRequestHeader-expected.txt: Added.
  • fast/workers/worker-xhr-setRequestHeader.html: Added.
4:27 PM Changeset in webkit [246086] by timothy_horton@apple.com
  • 7 edits in trunk/Source/WebKit

Remove some unused selection code
https://bugs.webkit.org/show_bug.cgi?id=198451

Reviewed by Wenson Hsieh.

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

(toGestureType):
(toUIWKGestureType):

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):

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

(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::canShrinkToTextSelection): Deleted.
(WebKit::hasCustomLineHeight): Deleted.
(WebKit::WebPage::rangeForWebSelectionAtPosition): Deleted.

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

REGRESSION (r244557): Leak of WKNSString in WTR::runOpenPanel() while running WebKit layout tests
<https://webkit.org/b/198538>
<rdar://problem/51407719>

Reviewed by Darin Adler.

  • WebKitTestRunner/TestController.cpp:

(WTR::runOpenPanel): Use adoptWK() to fix the leak.

3:08 PM Changeset in webkit [246084] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, update exception scope for putByIndexBeyondVectorLength
https://bugs.webkit.org/show_bug.cgi?id=198477

  • runtime/JSObject.cpp:

(JSC::JSObject::putByIndexBeyondVectorLength):

2:53 PM Changeset in webkit [246083] by Antti Koivisto
  • 9 edits
    12 adds in trunk

Sticky positioning is jumpy in many overflow cases
https://bugs.webkit.org/show_bug.cgi?id=198532
<rdar://problem/51400532>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-1.html

scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-2.html
scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-1.html
scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-2.html
scrollingcoordinator/ios/sticky-overflow-stacking-context-no-stick.html
scrollingcoordinator/ios/sticky-overflow-stacking-context-stick.html

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::notifyRelatedNodesAfterScrollPositionChange):
(WebCore::ScrollingTree::notifyRelatedNodesRecursive):

Simplify for relatedNodeScrollPositionDidChange removal.

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::relatedNodeScrollPositionDidChange): Deleted.

  • page/scrolling/ScrollingTreeNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::applyLayerPositions):

  • page/scrolling/cocoa/ScrollingTreePositionedNode.h:
  • page/scrolling/cocoa/ScrollingTreePositionedNode.mm:

(WebCore::ScrollingTreePositionedNode::scrollOffsetSinceLastCommit const):

Factor into a function.

(WebCore::ScrollingTreePositionedNode::applyLayerPositions):
(WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange): Deleted.

We can't bail out based on changed node as that makes us compute different positions based on what the change root is.
Since all relatedNodeScrollPositionDidChange functions now always simply call applyLayerPositions we can remove the whole thing.

  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::applyLayerPositions):

Implement taking into account that the containing scroller may not be our ancestor.

LayoutTests:

  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-1-expected.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-1.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-2-expected.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-no-stick-2.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-1-expected.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-1.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-2-expected.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-no-stacking-context-stick-2.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-stacking-context-no-stick-expected.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-stacking-context-no-stick.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-stacking-context-stick-expected.html: Added.
  • scrollingcoordinator/ios/sticky-overflow-stacking-context-stick.html: Added.
2:40 PM Changeset in webkit [246082] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Add authentication while fetching bugs
https://bugs.webkit.org/show_bug.cgi?id=198415
<rdar://problem/51298710>

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-app/ews/common/bugzilla.py:

(Bugzilla._fetch_attachment_json): Use api_key if configured in environment variable.
(BugzillaBeautifulSoup.authenticate): Method to authenticate, logic copied from webkitpy/common/net/bugzilla/bugzilla.py
(BugzillaBeautifulSoup._load_query):

2:27 PM Changeset in webkit [246081] by Kocsen Chung
  • 7 edits in branches/safari-608.1.27-branch/Source

Versioning.

2:27 PM Changeset in webkit [246080] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Do not display unnecessary steps in the Buildbot build page UI
https://bugs.webkit.org/show_bug.cgi?id=198218
<rdar://problem/51104544>

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:
1:54 PM Changeset in webkit [246079] by sihui_liu@apple.com
  • 9 edits in trunk

WKWebsiteDataStore API fails to fetch web storage data for non-persistent data store
https://bugs.webkit.org/show_bug.cgi?id=198317
Source/WebKit:

<rdar://problem/51244662>

Reviewed by Alex Christensen.

Use LocalStorageNameSpace instead of SessionStorageNameSpace for localStorage in ephemeral session or
websiteDataStore.

Reland r245943 as test has been fixed in r246012.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::StorageArea::isEphemeral const):
(WebKit::StorageManager::StorageArea::removeListener):
(WebKit::StorageManager::StorageArea::setItems):
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded const):
(WebKit::StorageManager::LocalStorageNamespace::~LocalStorageNamespace):
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::LocalStorageNamespace::ephemeralOrigins const):
(WebKit::StorageManager::LocalStorageNamespace::cloneTo):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
(WebKit::StorageManager::suspend):
(WebKit::StorageManager::resume):
(WebKit::StorageManager::StorageArea::isSessionStorage const): Deleted.

  • NetworkProcess/WebStorage/StorageManager.h:

(): Deleted.

  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::connect):

  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):

  • WebProcess/WebStorage/StorageNamespaceImpl.h:
  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):

Tools:

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):

1:42 PM Changeset in webkit [246078] by Alan Coon
  • 1 copy in tags/Safari-608.1.27.2

Tag Safari-608.1.27.2.

12:37 PM Changeset in webkit [246077] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Uploading third-party applications from /Applications needs additional syscall access
https://bugs.webkit.org/show_bug.cgi?id=198537
<rdar://problem/51164741>

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
12:15 PM Changeset in webkit [246076] by commit-queue@webkit.org
  • 9 edits
    1 copy
    1 add in trunk

[WinCairo] Implement cpu and memory measuring functions.
https://bugs.webkit.org/show_bug.cgi?id=198466

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-06-04
Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsWin.cmake:

Source/WebCore:

Tests: inspector/memory/tracking.html

inspector/cpu-profiler/tracking.html

  • PlatformWinCairo.cmake:
  • page/ResourceUsageThread.h:
  • page/win/ResourceUsageOverlayWin.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/win/TestRunnerWin.cpp.

(WebCore::ResourceUsageOverlay::platformInitialize):
(WebCore::ResourceUsageOverlay::platformDestroy):

  • page/win/ResourceUsageThreadWin.cpp: Added.

(WebCore::ResourceUsageThread::platformSaveStateBeforeStarting):
(WebCore::fileTimeToUint64):
(WebCore::getCurrentCpuTime):
(WebCore::cpuUsage):
(WebCore::memoryUsage):
(WebCore::ResourceUsageThread::platformCollectCPUData):
(WebCore::ResourceUsageThread::platformCollectMemoryData):

Tools:

  • WebKitTestRunner/InjectedBundle/win/TestRunnerWin.cpp:

(WTR::TestRunner::inspectorTestStubURL):

LayoutTests:

  • platform/wincairo/TestExpectations:
12:06 PM Changeset in webkit [246075] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

Argument elimination should check transitive dependents for interference
https://bugs.webkit.org/show_bug.cgi?id=198520
<rdar://problem/50863343>

Reviewed by Filip Pizlo.

JSTests:

  • stress/argument-elimination-inline-rest-past-kill.js: Added.

(f2):
(f3):

Source/JavaScriptCore:

Consider the following program:

a: CreateRest
-->

b: CreateRest

<--
c: Spread(@a)
d: Spread(@b)
e: NewArrayWithSpread(@a, @b)
f: KillStack(locX)
g: LoadVarargs(@e)

Suppose @b reads locX, then we cannot transform @e to PhantomNewArraySpread, since that would
move the stack access from @b into @g, and that stack location is no longer valid at that point.

We fix that by computing a set of all inline call frames that any argument elimination candidate
depends on and checking each of them for interference in eliminateCandidatesThatInterfere.

  • dfg/DFGArgumentsEliminationPhase.cpp:
12:00 PM Changeset in webkit [246074] by commit-queue@webkit.org
  • 4 edits in trunk

[Pointer Events] Only allow pointer capture if the pointer is in the active buttons state
https://bugs.webkit.org/show_bug.cgi?id=198479

Patch by Antoine Quint <Antoine Quint> on 2019-06-04
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progression.

  • web-platform-tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse-expected.txt:

Source/WebCore:

The Pointer Events specification says that pointer capture can only be engaged provided the pointer is
in the active buttons state, which means that it has dispatched a "pointerdown" event more recently than
it has a "pointerup" event.

This is tested by web-platform-tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html.

That test showed a few issues that this patch addresses. First, we would update the pointerIsPressed state to
"true" only after a "pointerdown" event had been dispatched. This is incorrect since setPointerCapture() can,
and is likely to, be called during handling of a "pointerdown" event. So we now call pointerEventWillBeDispatched()
prior to dispatching a PointerEvent with a mouse type, which we only did previously for a PointerEvent with a
touch or pen type. If the event is "pointerdown", we set "pointerIsPressed" to true on the CapturingData object
matching the given pointer, and to false if the event is "pointerup".

Finally, we must also ensure that "pointerIsPressed" is set to true when creating CapturingData for a PointerEvent
with a touch or pen type since these types of pointer events implictly set capture.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::setPointerCapture):
(WebCore::PointerCaptureController::dispatchEvent):
(WebCore::PointerCaptureController::pointerEventWillBeDispatched):
(WebCore::PointerCaptureController::pointerEventWasDispatched):

11:27 AM Changeset in webkit [246073] by ysuzuki@apple.com
  • 25 edits
    2 copies
    1 delete in trunk/Source/JavaScriptCore

[JSC] InferredValue should not be a JSCell
https://bugs.webkit.org/show_bug.cgi?id=198407

Reviewed by Filip Pizlo.

Allocating InferredValue as a JSCell is too costly in terms of memory. Gmail has 90000 FunctionExecutables. And each gets
InferredValue, which takes 32 bytes. So it takes 2.7 MB memory footprint.

In this patch, we introduce a new container InferredValue<>. Which is similar to WriteBarrier<> container, but it replaces
the existing InferredValue cells with one pointer size field. The implementation of InferredValue<> is similar to
InlineWatchpointSet. But we encode JSCell* too to the pointer data of InlineWatchpointSet. So sizeof(InferredValue<>) is one
pointer size while it keeps Watchpoint feature and JSCell holder feature.

InferredValue<> needs validation in GC finalize phase. So this patch also makes SymbolTable Iso-allocated.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/ObjectAllocationProfileInlines.h:

(JSC::ObjectAllocationProfileBase<Derived>::initializeProfile):

  • bytecode/Watchpoint.h:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGDesiredWatchpoints.cpp:

(JSC::DFG::SymbolTableAdaptor::add):
(JSC::DFG::FunctionExecutableAdaptor::add):
(JSC::DFG::DesiredWatchpoints::addLazily):
(JSC::DFG::DesiredWatchpoints::reallyAdd):
(JSC::DFG::DesiredWatchpoints::areStillValid const):
(JSC::DFG::DesiredWatchpoints::dumpInContext const):
(JSC::DFG::InferredValueAdaptor::add): Deleted.

  • dfg/DFGDesiredWatchpoints.h:

(JSC::DFG::SymbolTableAdaptor::hasBeenInvalidated):
(JSC::DFG::SymbolTableAdaptor::dumpInContext):
(JSC::DFG::FunctionExecutableAdaptor::hasBeenInvalidated):
(JSC::DFG::FunctionExecutableAdaptor::dumpInContext):
(JSC::DFG::DesiredWatchpoints::isWatched):
(JSC::DFG::InferredValueAdaptor::hasBeenInvalidated): Deleted.
(JSC::DFG::InferredValueAdaptor::dumpInContext): Deleted.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunction):
(JSC::DFG::SpeculativeJIT::compileCreateActivation):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::FunctionExecutable):
(JSC::FunctionExecutable::finishCreation):
(JSC::FunctionExecutable::visitChildren):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionExecutableInlines.h: Copied from Source/JavaScriptCore/runtime/InferredValueInlines.h.

(JSC::FunctionExecutable::finalizeUnconditionally):

  • runtime/InferredValue.cpp: Removed.
  • runtime/InferredValue.h:

(JSC::InferredValue::inferredValue):
(JSC::InferredValue::InferredValue):
(JSC::InferredValue::~InferredValue):
(JSC::InferredValue::stateOnJSThread const):
(JSC::InferredValue::state const):
(JSC::InferredValue::hasBeenInvalidated const):
(JSC::InferredValue::isStillValid const):
(JSC::InferredValue::invalidate):
(JSC::InferredValue::isBeingWatched const):
(JSC::InferredValue::notifyWrite):
(JSC::InferredValue::isThin):
(JSC::InferredValue::isFat):
(JSC::InferredValue::decodeState):
(JSC::InferredValue::encodeState):
(JSC::InferredValue::isThin const):
(JSC::InferredValue::isFat const):
(JSC::InferredValue::fat):
(JSC::InferredValue::fat const):
(JSC::InferredValue::inflate):
(JSC::InferredValue<JSCellType>::InferredValueWatchpointSet::notifyWriteSlow):
(JSC::InferredValue<JSCellType>::notifyWriteSlow):
(JSC::InferredValue<JSCellType>::add):
(JSC::InferredValue<JSCellType>::inflateSlow):
(JSC::InferredValue<JSCellType>::freeFat):

  • runtime/InferredValueInlines.h:

(JSC::InferredValue<JSCellType>::finalizeUnconditionally):
(JSC::InferredValue::finalizeUnconditionally): Deleted.

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::createWithInvalidatedReallocationWatchpoint):

  • runtime/JSSymbolTableObject.h:

(JSC::JSSymbolTableObject::setSymbolTable):

  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::finishCreation):
(JSC::SymbolTable::visitChildren):

  • runtime/SymbolTable.h:
  • runtime/SymbolTableInlines.h: Copied from Source/JavaScriptCore/runtime/InferredValueInlines.h.

(JSC::SymbolTable::finalizeUnconditionally):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
10:59 AM Changeset in webkit [246072] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved
https://bugs.webkit.org/show_bug.cgi?id=198501
<rdar://problem/51370464>

Reviewed by Chris Dumez.

keyAndValue.key is assigned to pointerId. KeyAndValue.key is a
int64_t, whereas pointerId is a PointerID, aka int32_t. This mismatch
is normally just a warning, but breaks builds where warnings are
treated as errors.

This issue is not encountered in most builds because the warning is
disabled in the majority of build configurations. But there are some
where the warning is not disabled, and so those builds break.

Address this conversion error/warning by explicitly casting
keyAndValue.key to a PointerID (and adding a debug check to make sure
the cast is OK).

No new tests -- no new functionality.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::elementWasRemoved):

10:56 AM Changeset in webkit [246071] by Tadeu Zagallo
  • 4 edits
    1 add in trunk

Argument elimination should check for negative indices in GetByVal
https://bugs.webkit.org/show_bug.cgi?id=198302
<rdar://problem/51188095>

Reviewed by Filip Pizlo.

JSTests:

  • stress/eliminate-arguments-negative-rest-access.js: Added.

(inlinee):
(opt):

Source/JavaScriptCore:

In DFG::ArgumentEliminationPhase, the index is treated as unsigned, but there's no check
for overflow in the addition. In compileGetMyArgumentByVal, there's a check for overflow,
but the index is treated as signed, resulting in an index lower than numberOfArgumentsToSkip.

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetMyArgumentByVal):

10:45 AM Changeset in webkit [246070] by graouts@webkit.org
  • 14 edits
    4 adds in trunk

[Pointer Events] Expose navigator.maxTouchPoints
https://bugs.webkit.org/show_bug.cgi?id=198468
<rdar://problem/51273029>

Reviewed by Chris Dumez.

Source/WebCore:

Expose the navigator.maxTouchPoints property when Pointer Events are enabled both at compile-time and run-time.
We return a canned value for this on iOS touch-enabled devices that matches the number of simultaneous touches
supported by the system, which is 5. In fact, iPad support more simultaneous touches, but it doesn't seem worthy
to expose this level of granularity due to fingerprinting practices. In practice, what really matters is returning
0, 1 or more than 1 for this value to identify multi-touch support.

Test: js/dom/navigator-maxtouchpoints.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/NavigatorMaxTouchPoints.idl: Added.
  • page/Navigator.idl:
  • page/Navigator.h:

(WebCore::Navigator::maxTouchPoints const):

LayoutTests:

  • js/dom/navigator-maxtouchpoints-expected.txt: Added.
  • js/dom/navigator-maxtouchpoints.html: Added.
  • platform/mac-highsierra-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-highsierra/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/win/js/dom/navigator-maxtouchpoints-expected.txt: Added.
10:09 AM Changeset in webkit [246069] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Lazily construct the NetworkHTTPSUpgradeChecker
https://bugs.webkit.org/show_bug.cgi?id=198500

Reviewed by Alex Christensen.

Lazily construct the NetworkHTTPSUpgradeChecker since the feature is off by default and this
avoids unnecessarily opening its database in the common case.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::networkHTTPSUpgradeChecker):

9:11 AM Changeset in webkit [246068] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r245913) [ Debug ] ASSERTION FAILED: m_swConnectionsByIdentifier.contains(connection.serverConnectionIdentifier()) Layout Test http/wpt/service-workers/update-service-worker.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=198434
<rdar://problem/51313917>

Reviewed by Alex Christensen.

Iterate through the connectionID-based connection map instead of the sessionID-based map to notify them their connection is lost.

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didClose):

8:52 AM Changeset in webkit [246067] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Decouple float placement and line shrinking
https://bugs.webkit.org/show_bug.cgi?id=198528
<rdar://problem/51397638>

Reviewed by Antti Koivisto.

In LineLayout::placeInlineItems() float handling should be only about shrinking the current line, the actual
float placement should happen later when we construct the the display boxes/runs. It enables the preferred width
computation to call placeInlineItems() to gather line widths without accidentally mutating the layout context.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
(WebCore::Layout::InlineFormattingContext::LineLayout::handleFloat const): Deleted.

  • layout/inlineformatting/InlineItem.h:
8:49 AM Changeset in webkit [246066] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Add hard line break handling to LineBreaker
https://bugs.webkit.org/show_bug.cgi?id=198503
<rdar://problem/51373482>

Reviewed by Antti Koivisto.

LineBreaker should simply return BreakingContext::Keep with the breaking opportunity of yes.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContext):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::isAtBreakingOpportunity):

  • layout/inlineformatting/InlineLineBreaker.h:
8:48 AM Changeset in webkit [246065] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Remove InlineItem::width
https://bugs.webkit.org/show_bug.cgi?id=198502
<rdar://problem/51371744>

Reviewed by Antti Koivisto.

InlineItems are supposd to work across subsequent layouts (and in preferred width computation as well) so they should
not hold on to layout information (run width). This would not work with split runs either.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::UncommittedContent::runs):
(WebCore::Layout::UncommittedContent::isEmpty const):
(WebCore::Layout::UncommittedContent::size const):
(WebCore::Layout::UncommittedContent::add):
(WebCore::Layout::UncommittedContent::reset):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
(): Deleted.
(WebCore::Layout::InlineFormattingContext::LineLayout::commitInlineItemToLine const): Deleted.

  • layout/inlineformatting/InlineItem.h:

(WebCore::Layout::InlineItem::style const):
(): Deleted.
(WebCore::Layout::InlineItem::setWidth): Deleted.
(WebCore::Layout::InlineItem::width const): Deleted.

8:46 AM Changeset in webkit [246064] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] UIProcess' background task expiration handler may get called after the app is foreground again
https://bugs.webkit.org/show_bug.cgi?id=198380
<rdar://problem/49762471>

Reviewed by Geoff Garen.

UIProcess' background task expiration handler may get called after the app is foreground again. When
this happens, we already have a foreground assertion on behalf of the WebContent process, and the view
is visible. We would send the WillSuspendImminently IPC to the WebContent process, which would freeze
its layers, even though it is visible on screen.

To address the issue, we now check if the app is visible in the expiration handler. If it is visible,
we do not notify clients of imminent suspension. Instead, we end the background task right away and
call _updateBackgroundTask asynchronously to start a new background task if necessary.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):

8:26 AM Changeset in webkit [246063] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move run width measuring out of LineBreaker
https://bugs.webkit.org/show_bug.cgi?id=198491
<rdar://problem/51363554>

Reviewed by Antti Koivisto.

LineBreaker should not need to deal with measuring runs.
This is also in preparation for removing InlineItem::width().

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContext):
(WebCore::Layout::LineBreaker::LineBreaker): Deleted.
(WebCore::Layout::LineBreaker::runWidth const): Deleted.
(WebCore::Layout::LineBreaker::textWidth const): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:
7:54 AM Changeset in webkit [246062] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant InlineItem::width() calls.
https://bugs.webkit.org/show_bug.cgi?id=198489
<rdar://problem/51360390>

Reviewed by Antti Koivisto.

This is in preparation for removing InlineItem::width().

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::handleFloat const):
(WebCore::Layout::InlineFormattingContext::LineLayout::commitInlineItemToLine const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendInlineContainerEnd):

  • layout/inlineformatting/InlineLine.h:
7:34 AM Changeset in webkit [246061] by commit-queue@webkit.org
  • 15 edits
    4 adds in trunk

The "mouseenter" and "pointerenter" events are fired from the bottom up
https://bugs.webkit.org/show_bug.cgi?id=198036
<rdar://problem/50940350>

Patch by Antoine Quint <Antoine Quint> on 2019-06-04
Reviewed by Darin Adler.

Source/WebCore:

Ensure "mouseenter" and "pointerenter" events are dispatched from the bottom up to match the UI Events spec
at https://w3c.github.io/uievents/#events-mouseevent-event-order. We also fix the issue where "pointerevent"
and "pointerleave" events were dispatched as bubbling events on iOS which is not correct and was caught by the
new iOS test.

Tests: pointerevents/ios/enter-leave-order.html

pointerevents/mouse/enter-leave-order.html

  • dom/ios/PointerEventIOS.cpp:

(WebCore::typeCanBubble):
(WebCore::PointerEvent::PointerEvent):

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateMouseEventTargetNode):

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):

LayoutTests:

  • fast/events/mouseenter-mouseleave-capture-expected.txt:
  • fast/events/mouseenter-mouseleave-expected.txt:
  • fast/events/mouseenterleave-on-subframe-expected.txt:
  • fast/events/shadow-event-path-expected.txt:
  • fast/shadow-dom/mouseenter-mouseleave-across-shadow-boundary-expected.txt:
  • fast/shadow-dom/mouseenter-mouseleave-inside-shadow-tree-expected.txt:
  • fast/shadow-dom/mouseenter-mouseleave-on-slot-parent-expected.txt:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/fast/events/shadow-event-path-expected.txt:
  • platform/mac/fast/events/shadow-event-path-2-expected.txt:
  • pointerevents/ios/enter-leave-order-expected.txt: Added.
  • pointerevents/ios/enter-leave-order.html: Added.
  • pointerevents/mouse/enter-leave-order-expected.txt: Added.
  • pointerevents/mouse/enter-leave-order.html: Added.
4:14 AM Changeset in webkit [246060] by Tadeu Zagallo
  • 15 edits
    2 adds in trunk/Source/JavaScriptCore

JSScript should not keep bytecode cache in memory
https://bugs.webkit.org/show_bug.cgi?id=198482

Reviewed by Saam Barati.

When JSScript writes to the cache, we keep the in-memory serialized bytecode alive.
Instead, we should only ever hold the memory mapped bytecode cache to avoid using
too much memory.

  • API/JSScript.mm:

(-[JSScript writeCache:]):

  • API/tests/testapi.mm:

(testBytecodeCacheWithSyntaxError):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • jsc.cpp:
  • parser/SourceProvider.h:
  • runtime/BytecodeCacheError.cpp: Added.

(JSC::BytecodeCacheError::StandardError::isValid const):
(JSC::BytecodeCacheError::StandardError::message const):
(JSC::BytecodeCacheError::WriteError::isValid const):
(JSC::BytecodeCacheError::WriteError::message const):
(JSC::BytecodeCacheError::operator=):
(JSC::BytecodeCacheError::isValid const):
(JSC::BytecodeCacheError::message const):

  • runtime/BytecodeCacheError.h: Added.

(JSC::BytecodeCacheError::StandardError::StandardError):
(JSC::BytecodeCacheError::WriteError::WriteError):

  • runtime/CachedBytecode.h:

(JSC::CachedBytecode::create):

  • runtime/CachedTypes.cpp:

(JSC::Encoder::Encoder):
(JSC::Encoder::release):
(JSC::Encoder::releaseMapped):
(JSC::encodeCodeBlock):
(JSC::encodeFunctionCodeBlock):

  • runtime/CachedTypes.h:
  • runtime/CodeCache.cpp:

(JSC::serializeBytecode):

  • runtime/CodeCache.h:
  • runtime/Completion.cpp:

(JSC::generateProgramBytecode):
(JSC::generateModuleBytecode):

  • runtime/Completion.h:
3:37 AM Changeset in webkit [246059] by zandobersek@gmail.com
  • 4 edits in trunk/Tools

[misc] Remove JSCOnly ARMv7 Traditional bot
https://bugs.webkit.org/show_bug.cgi?id=198524

Reviewed by Carlos Garcia Campos.

This is not a supported configuration anymore, so the buildbot slave can
be removed from configuration.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
3:04 AM Changeset in webkit [246058] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK] Crash when re-entering AC mode after r245957
https://bugs.webkit.org/show_bug.cgi?id=198522

Reviewed by Žan Doberšek.

When AcceleratedBackingStoreWayland::displayBuffer() is called and we have already left AC mode, we early
dispatch the image and release it. The problem is that images are reused, so the given image can be the
committed one. In that case we end up freeing it again in the next AcceleratedBackingStoreWayland::paint()
call.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::displayBuffer): Do not release the given image if it's the committed one.

12:38 AM Changeset in webkit [246057] by commit-queue@webkit.org
  • 8 edits
    1 copy
    7 adds in trunk

JS wrapper of target in ResizeObserverEntry/ResizeObserver shouldn't get collected ahead
https://bugs.webkit.org/show_bug.cgi?id=197457

Patch by Cathie Chen <cathiechen> on 2019-06-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Add JSCustomMarkFunction to make sure JS wrappers wouldn't be collected when JSResizeObserverEntry live.

For ResizeObserver, if targets are removed, it will get fired for the last time. We also need to keep these JS
wrappers live. So add these targets to a GCReachableRef list once they're observed.

Add element-leak.html to test the targets with entry.target.myEntry = entry could be released properly.

Tests: resize-observer/element-leak.html

resize-observer/resize-observer-entry-keeps-js-wrapper-of-target-alive.html
resize-observer/resize-observer-keeps-js-wrapper-of-target-alive.html

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

(WebCore::JSResizeObserverEntry::visitAdditionalChildren):

  • page/ResizeObserver.cpp:

(WebCore::ResizeObserver::observe):
(WebCore::ResizeObserver::removeAllTargets):
(WebCore::ResizeObserver::removeObservation):
(WebCore::ResizeObserver::stop):

  • page/ResizeObserver.h:
  • page/ResizeObserverEntry.idl:

LayoutTests:

  • platform/win/TestExpectations:
  • resize-observer/element-leak-expected.txt: Added.
  • resize-observer/element-leak.html: Added.
  • resize-observer/resize-observer-entry-keeps-js-wrapper-of-target-alive-expected.txt: Added.
  • resize-observer/resize-observer-entry-keeps-js-wrapper-of-target-alive.html: Added.
  • resize-observer/resize-observer-keeps-js-wrapper-of-target-alive-expected.txt: Added.
  • resize-observer/resize-observer-keeps-js-wrapper-of-target-alive.html: Added.
  • resize-observer/resources/element-leak-frame.html: Added.

Jun 3, 2019:

11:36 PM Changeset in webkit [246056] by aestes@apple.com
  • 16 edits
    5 adds in trunk

[Apple Pay] Disable script injection when canMakePayment APIs are called and return true
https://bugs.webkit.org/show_bug.cgi?id=198448
<rdar://problem/51323694>

Reviewed by Alex Christensen.

Source/WebCore:

Previously, only an active Apple Pay session would disable script injection in restricted
WKWebViews. However, this can result in websites rendering non-functional Apple Pay buttons
due to the race between the hosting app calling -evaluateJavaScript:completionHandler: and
the website calling canMakePayment APIs to determine whether to draw a button.

This patch makes it so that, if a website calls ApplePaySession's canMakePayments or
canMakePaymentsWithActiveCard, or PaymentRequest's canMakePayment, in a web view that has no
injected scripts, and those calls return true, future script injections from the hosting app
will be blocked.

Also, this patch removes the restrictions on the openPaymentSetup, supportsVersion, and
validatedPaymentNetwork APIs, since those APIs do not reveal transaction information and are
not used to determine whether to draw buttons.

Added new API tests.

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::supportsVersion const):
(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::openPaymentSetup):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::validatedPaymentNetwork const):
(WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const):
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
(WebCore::PaymentCoordinator::shouldAllowApplePay const): Deleted.

  • Modules/applepay/PaymentCoordinator.h:
  • dom/Document.cpp:

(WebCore::Document::isApplePayActive const):
(WebCore::Document::setApplePayIsActive):
(WebCore::Document::hasStartedApplePaySession const): Deleted.
(WebCore::Document::setHasStartedApplePaySession): Deleted.

  • dom/Document.h:
  • testing/Internals.cpp:

(WebCore::Internals::setApplePayIsActive):
(WebCore::Internals::setHasStartedApplePaySession): Deleted.

  • testing/Internals.h:
  • testing/Internals.idl:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm:

(-[TestApplePayAvailableScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(-[TestApplePayActiveSessionScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::runActiveSessionTest):
(-[TestApplePayScriptMessageHandler initWithAPIsAvailableExpectation:canMakePaymentsExpectation:]): Deleted.
(-[TestApplePayScriptMessageHandler userContentController:didReceiveScriptMessage:]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-active-session.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-existing-object.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-in-iframe.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payment.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments-with-active-card.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay.js: Added.

(applePayRequestBase):
(applePayPaymentRequest):
(applePayMethod):

  • TestWebKitAPI/cocoa/TestProtocol.mm:

(-[TestProtocol startLoading]):

10:05 PM Changeset in webkit [246055] by bshafiei@apple.com
  • 5 edits in branches/safari-608.1.27-branch

Cherry-pick r246042. rdar://problem/50667125

Tweak the text and underline color for data detected text.
https://bugs.webkit.org/show_bug.cgi?id=198487
rdar://problem/50667125

Reviewed by Devin Rousso.

Source/WebCore:

Tests: Color.RGBToHSL API tests

  • editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): Use currentcolor so semantic text colors work. Force the lightness of the underline color to the middle, and multiply the alpha by 38%, so the color will appear on light and dark backgrounds, since only one color can be specified.
  • platform/graphics/Color.cpp: (WebCore::Color::getHSL const): Return hue in [0...6) range to easily round-trip with makeRGBAFromHSLA().

Tools:

  • TestWebKitAPI/Tests/WebCore/Color.cpp: (TestWebKitAPI::TEST): Added Color.RGBToHSL tests.

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

10:01 PM Changeset in webkit [246054] by bshafiei@apple.com
  • 7 edits in branches/safari-608.1.27-branch/Source

Versioning.

6:28 PM Changeset in webkit [246053] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[iOS] Do not prevent app suspension for more than 20 seconds after getting backgrounded
https://bugs.webkit.org/show_bug.cgi?id=198488
<rdar://problem/50837208>

Reviewed by Geoff Garen.

Do not prevent app suspension for more than 20 seconds after getting backgrounded on iOS. We
do this by implementing our own expiration handler which notifies our child processes of
their imminent suspension before ending the background task that was preventing suspension.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(isBackgroundState):
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _scheduleTimeoutTask]):
(-[WKProcessAssertionBackgroundTaskManager _cancelTimeoutTask]):
(-[WKProcessAssertionBackgroundTaskManager _backgroundTaskExpired]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):

5:25 PM Changeset in webkit [246052] by rmorisset@apple.com
  • 4 edits in trunk/Source/WebCore

[WHLSL] Parsing and lexing the standard library is slow
https://bugs.webkit.org/show_bug.cgi?id=192890
<rdar://problem/50746335>

Reviewed by Myles Maxfield.

The main idea is to avoid backtracking by instead peeking at the next token (and occasionally at the one after that).
This implies a few things:

  • We can replace the stack of tokens by a trivial ring buffer of size 2 (holding the next token and the one after, or WTF::nullopt if we are at the end of the file).
  • We now have "completeFooExpression" functions, to avoid having to reparse the prefix of some expression, if we find half-way through what it is.

I also fixed the following parser bug:

which was due to a mistake I made in the grammar

Finally I added two new macros: CONSUME_TYPE and PARSE to eliminate about 500 lines of error propagation boilerplate.

There are still lots of ways of improving the parser and lexer, such as:

  • finishing the conversion of tokens in the lexer, not bothering with allocating string views
  • make two special tokens Invalid and EOF, to remove the overhead of Optional
  • make peekTypes and consumeTypes use templates to avoid constructing a Vector and calling find on it.
  • Turn the entire lexer into a proper automata, not going through the same characters again and again (this is certainly the largest win by far)
  • Remove the last few pieces of backtracking from the parser.

The current patch is already enough to make parsing the full standard library (something like 85k lines) approximately 260ms.
This is still longer than I would like, but nowhere near the bottleneck any longer because of some other parts of the compiler.

  • Modules/webgpu/WHLSL/WHLSLLexer.h:

(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::peek):
(WebCore::WHLSL::Lexer::peekFurther):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::unconsumeToken): Deleted.

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::parse):
(WebCore::WHLSL::Parser::peek):
(WebCore::WHLSL::Parser::peekTypes):
(WebCore::WHLSL::Parser::tryType):
(WebCore::WHLSL::Parser::tryTypes):
(WebCore::WHLSL::Parser::consumeTypes):
(WebCore::WHLSL::Parser::parseConstantExpression):
(WebCore::WHLSL::Parser::parseTypeArgument):
(WebCore::WHLSL::Parser::parseTypeArguments):
(WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
(WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
(WebCore::WHLSL::Parser::parseType):
(WebCore::WHLSL::Parser::parseTypeDefinition):
(WebCore::WHLSL::Parser::parseResourceSemantic):
(WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
(WebCore::WHLSL::Parser::parseStageInOutSemantic):
(WebCore::WHLSL::Parser::parseSemantic):
(WebCore::WHLSL::Parser::parseQualifiers):
(WebCore::WHLSL::Parser::parseStructureElement):
(WebCore::WHLSL::Parser::parseStructureDefinition):
(WebCore::WHLSL::Parser::parseEnumerationDefinition):
(WebCore::WHLSL::Parser::parseEnumerationMember):
(WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
(WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
(WebCore::WHLSL::Parser::parseAttributeBlock):
(WebCore::WHLSL::Parser::parseParameter):
(WebCore::WHLSL::Parser::parseParameters):
(WebCore::WHLSL::Parser::parseFunctionDefinition):
(WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseVertexFragmentFunctionDeclaration):
(WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
(WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
(WebCore::WHLSL::Parser::parseFunctionDeclaration):
(WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseBlock):
(WebCore::WHLSL::Parser::parseBlockBody):
(WebCore::WHLSL::Parser::parseIfStatement):
(WebCore::WHLSL::Parser::parseSwitchStatement):
(WebCore::WHLSL::Parser::parseSwitchCase):
(WebCore::WHLSL::Parser::parseForLoop):
(WebCore::WHLSL::Parser::parseWhileLoop):
(WebCore::WHLSL::Parser::parseDoWhileLoop):
(WebCore::WHLSL::Parser::parseVariableDeclaration):
(WebCore::WHLSL::Parser::parseVariableDeclarations):
(WebCore::WHLSL::Parser::parseStatement):
(WebCore::WHLSL::Parser::parseEffectfulExpression):
(WebCore::WHLSL::Parser::parseEffectfulAssignment):
(WebCore::WHLSL::Parser::parseExpression):
(WebCore::WHLSL::Parser::parseTernaryConditional):
(WebCore::WHLSL::Parser::completeTernaryConditional):
(WebCore::WHLSL::Parser::parseAssignment):
(WebCore::WHLSL::Parser::completeAssignment):
(WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
(WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleShift):
(WebCore::WHLSL::Parser::completePossibleShift):
(WebCore::WHLSL::Parser::parsePossibleAdd):
(WebCore::WHLSL::Parser::completePossibleAdd):
(WebCore::WHLSL::Parser::parsePossibleMultiply):
(WebCore::WHLSL::Parser::completePossibleMultiply):
(WebCore::WHLSL::Parser::parsePossiblePrefix):
(WebCore::WHLSL::Parser::parsePossibleSuffix):
(WebCore::WHLSL::Parser::parseCallExpression):
(WebCore::WHLSL::Parser::parseTerm):
(WebCore::WHLSL::Parser::parseAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseNonAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulPrefix): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulSuffix): Deleted.

  • Modules/webgpu/WHLSL/WHLSLParser.h:

(WebCore::WHLSL::Parser::Error::dump const):

2:59 PM Changeset in webkit [246051] by Alan Coon
  • 1 copy in tags/Safari-608.1.27.1

Tag Safari-608.1.27.1.

2:10 PM Changeset in webkit [246050] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

[ Mac WK2 ] TestWebKitAPI.WKWebView.LocalStorageProcessCrashes is a flaky timeout when run locally.
https://bugs.webkit.org/show_bug.cgi?id=198423
<rdar://problem/51305247>

Reviewed by Youenn Fablet.

IDBDatabase receives error event on network process crash, so we don't need to check it periodically.

  • TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-crashes.html:
2:07 PM Changeset in webkit [246049] by youenn@apple.com
  • 7 edits
    2 adds in trunk

Allow resizing of camera video feeds to very small resolutions
https://bugs.webkit.org/show_bug.cgi?id=198421

Reviewed by Alex Christensen.

Source/WebCore:

Before the patch, the minimum capture resolution was set to 120.
Since this is a bit arbitrary and there are some use cases for lower resolution,
We now allow down to 1x1 resolution.

Test: fast/mediastream/getUserMedia-video-rescaling.html

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::updateCapabilities):
Allow 1x1 when computing min/max resolutions.
(WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
In case width and height are provided, we pick the closest preset that matches and resize accordingly.
If width or height is provided, we pick the closest preset tat matches and applies its aspect ratio.

LayoutTests:

Update tests to expect 1x1 minimum capture resolution.

  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
  • fast/mediastream/apply-constraints-video-expected.txt:
  • fast/mediastream/apply-constraints-video.html:
  • fast/mediastream/get-user-media-constraints-expected.txt:
  • fast/mediastream/getUserMedia-video-rescaling-expected.txt: Added.
  • fast/mediastream/getUserMedia-video-rescaling.html: Added.
2:07 PM Changeset in webkit [246048] by wenson_hsieh@apple.com
  • 12 edits
    1 copy in trunk/Source

Implement an internal switch to turn idempotent text autosizing and viewport rules off
https://bugs.webkit.org/show_bug.cgi?id=198460
<rdar://problem/51324526>

Reviewed by Tim Horton.

Source/WebCore:

Add a new WebCore setting for viewport shrink-to-fit-content heuristics; additionally, tweak the existing
idempotent text autosizing setting to default to false (this is overridden by preferences at the WebKit layer).

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:

Add new preferences to control viewport shrink-to-fit-content and idempotent text autosizing.

  • Shared/WebPreferencesDefaultValues.cpp:

Add the non-iOS implementation of defaultTextAutosizingUsesIdempotentMode, and also wrap these functions in the
WebKit namespace.

(WebKit::defaultTextAutosizingUsesIdempotentMode):
(defaultPassiveTouchListenersAsDefaultOnDocument): Deleted.
(defaultCustomPasteboardDataEnabled): Deleted.

  • Shared/WebPreferencesDefaultValues.h:

Move some existing default preference value helper functions into the WebKit namespace.

  • Shared/ios/WebPreferencesDefaultValuesIOS.mm: Copied from Source/WebKit/Shared/WebPreferencesDefaultValues.cpp.

Add an iOS-specific file for WebPreferencesDefaultValues, so that we can check for the user interface idiom.

(WebKit::defaultTextAutosizingUsesIdempotentMode):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::immediatelyShrinkToFitContent):

Add an early return for the case where shrink-to-fit-content is explicitly disabled via the new preference.

2:04 PM Changeset in webkit [246047] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Revert r246001. rdar://problem/50871594

1:58 PM Changeset in webkit [246046] by Devin Rousso
  • 6 edits in trunk

Web Inspector: remove RemoteObject.prototype.getPropertyDescriptorsAsObject
https://bugs.webkit.org/show_bug.cgi?id=198395

Reviewed by Matt Baker.

Source/WebInspectorUI:

When calling RemoteObject.prototype.getPropertyDescriptorsAsObject, if one of the returned
property descriptors is named __proto__, it will replace the __proto__ of the plain
object created for that function with the WI.PropertyDescriptor itself, altering the
prototype chain.

  • UserInterface/Protocol/RemoteObject.js:

(WI.RemoteObject.prototype.getPropertyDescriptorsAsObject): Deleted.

  • UserInterface/Models/AuditTestCase.js:

(WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach):

  • UserInterface/Views/ErrorObjectView.js:

(WI.ErrorObjectView.prototype.update):

LayoutTests:

  • inspector/runtime/awaitPromise.html:
1:49 PM Changeset in webkit [246045] by commit-queue@webkit.org
  • 25 edits
    32 adds in trunk

Implement imagesrcset and imagesizes attributes on link rel=preload
https://bugs.webkit.org/show_bug.cgi?id=192950

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

LayoutTests/imported/w3c:

Import relevant tests for this feature.

  • web-platform-tests/preload/dynamic-adding-preload-imagesrcset-expected.txt: Added.
  • web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html: Added.
  • web-platform-tests/preload/link-header-preload-expected.txt: Added.
  • web-platform-tests/preload/link-header-preload-imagesrcset-expected.txt: Added.
  • web-platform-tests/preload/link-header-preload-imagesrcset.html: Added.
  • web-platform-tests/preload/link-header-preload-imagesrcset.html.headers: Added.
  • web-platform-tests/preload/link-header-preload-nonce-expected.txt: Added.
  • web-platform-tests/preload/link-header-preload-nonce.html: Added.
  • web-platform-tests/preload/link-header-preload-nonce.html.headers: Added.
  • web-platform-tests/preload/link-header-preload.html: Added.
  • web-platform-tests/preload/link-header-preload.html.headers: Added.
  • web-platform-tests/preload/onload-event-expected.txt: Added.
  • web-platform-tests/preload/onload-event.html: Added.
  • web-platform-tests/preload/preload-csp.sub-expected.txt:
  • web-platform-tests/preload/preload-csp.sub.html:
  • web-platform-tests/preload/preload-default-csp.sub-expected.txt:
  • web-platform-tests/preload/preload-default-csp.sub.html:
  • web-platform-tests/preload/preload-with-type-expected.txt: Added.
  • web-platform-tests/preload/preload-with-type.html: Added.
  • web-platform-tests/preload/resources/A4.ogv: Added.
  • web-platform-tests/preload/resources/A4.ogv.sub.headers: Added.
  • web-platform-tests/preload/resources/cross-origin-module.py: Added.

(main):

  • web-platform-tests/preload/resources/dummy-preloads-subresource.css: Added.
  • web-platform-tests/preload/resources/dummy-preloads-subresource.css.sub.headers: Added.
  • web-platform-tests/preload/resources/empty.html: Added.
  • web-platform-tests/preload/resources/empty.html.sub.headers: Added.
  • web-platform-tests/preload/resources/foo.vtt.sub.headers: Added.
  • web-platform-tests/preload/resources/module1.js: Added.
  • web-platform-tests/preload/resources/module2.js: Added.
  • web-platform-tests/preload/resources/preload_helper.js:

(verifyNumberOfResourceTimingEntries):
(numberOfResourceTimingEntries):

Source/WebCore:

Implement imagesrcset and imagesizes attributes for both Link header
and link element.

Tests: imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html

imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset.html
imported/w3c/web-platform-tests/preload/link-header-preload-nonce.html
imported/w3c/web-platform-tests/preload/link-header-preload.html
imported/w3c/web-platform-tests/preload/onload-event.html
imported/w3c/web-platform-tests/preload/preload-with-type.html

  • html/HTMLAttributeNames.in:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/HTMLLinkElement.idl:
  • loader/LinkHeader.cpp:

(WebCore::paramterNameFromString):
(WebCore::LinkHeader::setValue):
(WebCore::LinkHeader::LinkHeader):

  • loader/LinkHeader.h:

(WebCore::LinkHeader::imageSrcSet const):
(WebCore::LinkHeader::imageSizes const):
(WebCore::LinkHeader::isViewportDependent const):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLinksFromHeader):
(WebCore::LinkLoader::preloadIfNeeded):
(WebCore::LinkLoader::loadLink):

  • loader/LinkLoader.h:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::linkPreloadResponsiveImagesEnabled const):
(WebCore::RuntimeEnabledFeatures::setLinkPreloadResponsiveImagesEnabled):

Source/WebKit:

Add a runtime flag for link preload responsive images.

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

Add a runtime flag for link preload responsive images.

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

(+[WebPreferences initialize]):
(-[WebPreferences linkPreloadResponsiveImagesEnabled]):
(-[WebPreferences setLinkPreloadResponsiveImagesEnabled:]):

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

(-[WebView _preferencesChanged:]):

Tools:

Add a runtime flag for link preload responsive images.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

LayoutTests:

Write special expectation for link-header-preload-imagesrcset.html because test runner
uses different dimensions on iOS.

  • platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset-expected.txt: Added.
  • platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset-expected.txt: Added.
1:12 PM Changeset in webkit [246044] by don.olmstead@sony.com
  • 6 edits
    1 add in trunk/Tools

[CMake] Use WEBKIT_EXECUTABLE in ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=198490

Reviewed by Konstantin Tokarev.

Use WEBKIT_EXECUTABLE in ImageDiff. Change CMake variables to use the proper
convention. Add a shared CoreGraphics.cmake instead of just including PlatformMac
for AppleWin builds.

  • ImageDiff/CMakeLists.txt:
  • ImageDiff/Cairo.cmake:
  • ImageDiff/CoreGraphics.cmake: Added.
  • ImageDiff/PlatformGTK.cmake:
  • ImageDiff/PlatformMac.cmake:
  • ImageDiff/PlatformWin.cmake:
12:39 PM Changeset in webkit [246043] by aestes@apple.com
  • 6 edits in trunk

Memory-cached main resources continue to load after the client decides a content policy of PolicyAction::Download
https://bugs.webkit.org/show_bug.cgi?id=198469
<rdar://problem/50512713>

Reviewed by Youenn Fablet.

Source/WebCore:

When a document is loaded from the memory cache it does not have a main resource loader, but
DocumentLoader::continueAfterContentPolicy relies on being able to call
ResourceLoader::didFail on the main resource loader to cancel the provisional navigation
when the client decides a content policy of PolicyAction::Download.

This means that memory-cached main resources continue to load even after WebKit has started
to download the main resource. The expected behavior is for the provisional navigation to
fail once the download starts, like what happens when there is a main resource loader.

This patch teaches DocumentLoader::continueAfterContentPolicy to call
stopLoadingForPolicyChange() in the case of a null main resource loader. This will dispatch
didFailProvisionalNavigation and remove the DocumentLoader as a client of its
CachedRawResource to prevent it from delivering any cached data.

Added a new API test.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didStartProvisionalNavigation:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didFailProvisionalNavigation:withError:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didFinishNavigation:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate _downloadDidStart:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TEST):

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

(+[TestProtocol additionalResponseHeaders]):
(+[TestProtocol setAdditionalResponseHeaders:]):
(-[TestProtocol startLoading]):

12:14 PM Changeset in webkit [246042] by timothy@apple.com
  • 5 edits in trunk

Tweak the text and underline color for data detected text.
https://bugs.webkit.org/show_bug.cgi?id=198487
rdar://problem/50667125

Reviewed by Devin Rousso.

Source/WebCore:

Tests: Color.RGBToHSL API tests

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange): Use currentcolor so semantic text colors work.
Force the lightness of the underline color to the middle, and multiply the alpha by 38%,
so the color will appear on light and dark backgrounds, since only one color can be specified.

  • platform/graphics/Color.cpp:

(WebCore::Color::getHSL const): Return hue in [0...6) range to easily round-trip with makeRGBAFromHSLA().

Tools:

  • TestWebKitAPI/Tests/WebCore/Color.cpp:

(TestWebKitAPI::TEST): Added Color.RGBToHSL tests.

11:42 AM Changeset in webkit [246041] by Caio Lima
  • 22 edits
    9 adds in trunk

[ESNext][BigInt] Implement support for ""
https://bugs.webkit.org/show_bug.cgi?id=190799

Reviewed by Saam Barati.

JSTests:

  • stress/big-int-exp-basic.js: Added.
  • stress/big-int-exp-jit-osr.js: Added.
  • stress/big-int-exp-jit-untyped.js: Added.
  • stress/big-int-exp-jit.js: Added.
  • stress/big-int-exp-negative-exponent.js: Added.
  • stress/big-int-exp-to-primitive.js: Added.
  • stress/big-int-exp-type-error.js: Added.
  • stress/big-int-exp-wrapped-value.js: Added.
  • stress/value-pow-ai-rule.js: Added.

Source/JavaScriptCore:

We are introducing support for BigInt into "" operator. This Patch
also includes changes into DFG, introducing a new node "ValuePow" that
is responsible to handle UntypedUse and BigIntUse.

  • dfg/DFGAbstractInterpreterInlines.h:

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

ValuePow(Untyped, Untyped) still can propagate constant if AI proves
it. We are doing so if AI proves rhs and lhs as numbers.

  • dfg/DFGByteCodeParser.cpp:

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

When compiling op_pow, we first verify if rhs and lhs can be any Int
or number. If this happen, we emit ArithPow, otherwise we fallback to
ValuePow and rely on fixup to convert it to ArithPow if possible.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

We only clobberize world if ValuePow is UntypedUse. Otherwise, we can
properly support CSE.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

JSBigInt::exponentiate allocates JSBigInts to perform calculation and
it can trigger GC. ValuePow(UntypedUse) can trigger GC because it can
execute user code.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupArithPow):
(JSC::DFG::FixupPhase::fixupNode):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValuePow):

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValuePow):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

We are adding proper support to BigInt on op_pow. The specification
defines that we can only apply pow when both operands have the same
type after calling ToNumeric().

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::exponentiate):

  • runtime/JSBigInt.h:
11:27 AM Changeset in webkit [246040] by ysuzuki@apple.com
  • 4 edits
    3 adds in trunk

[JSC] JSObject::attemptToInterceptPutByIndexOnHole should use getPrototype instead of getPrototypeDirect
https://bugs.webkit.org/show_bug.cgi?id=198477
<rdar://problem/51299504>

Reviewed by Saam Barati.

Source/JavaScriptCore:

JSObject::attemptToInterceptPutByIndexOnHole uses getPrototypeDirect, but it should use getPrototype to
handle getPrototype methods in derived JSObject classes correctly.

  • runtime/JSArrayInlines.h:

(JSC::JSArray::pushInline):

  • runtime/JSObject.cpp:

(JSC::JSObject::putByIndex):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::putByIndexBeyondVectorLength):

LayoutTests:

Ensure that JSWindow::getPrototype is used.

  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put-expected.txt: Added.
  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html: Added.
  • http/tests/security/resources/cross-frame-iframe-for-object-getPrototypeOf-in-put-test.html: Added.
10:04 AM Changeset in webkit [246039] by don.olmstead@sony.com
  • 17 edits in trunk

[CMake] Add WebKit::JavaScriptCore target
https://bugs.webkit.org/show_bug.cgi?id=198403

Reviewed by Konstantin Tokarev.

Source/JavaScriptCore:

Create the WebKit::JavaScriptCore target and use that to propagate headers. Use
WEBKIT_COPY_FILES instead of WEBKIT_MAKE_FORWARDING_HEADERS.

  • CMakeLists.txt:
  • shell/CMakeLists.txt:

Source/WebCore:

Use the WebKit::JavaScriptCore target.

  • CMakeLists.txt:

Source/WebCore/PAL:

Use the WebKit::JavaScriptCore target.

  • pal/CMakeLists.txt:

Source/WebKitLegacy:

Use the WebKit::JavaScriptCore target.

  • CMakeLists.txt:

Tools:

Use the WebKit::JavaScriptCore target.

  • DumpRenderTree/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/glib/CMakeLists.txt:
  • WebKitTestRunner/CMakeLists.txt:
9:48 AM Changeset in webkit [246038] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Unreviewed, rolling out r246022.
https://bugs.webkit.org/show_bug.cgi?id=198486

Causing Internal build failures and JSC test failures
(Requested by ShawnRoberts on #webkit).

Reverted changeset:

"Reenable Gigacage on ARM64."
https://bugs.webkit.org/show_bug.cgi?id=198453
https://trac.webkit.org/changeset/246022

9:37 AM Changeset in webkit [246037] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Flaky Test: inspector/canvas/recording.html
https://bugs.webkit.org/show_bug.cgi?id=198470

Reviewed by Timothy Hatcher.

  • inspector/canvas/recording.html:

The ordering of <canvas> in WI.canvasManager.canvases isn't always the same, so we should
perform the action on every <canvas> since we know we'll be recording at least one of them.

8:34 AM Changeset in webkit [246036] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[Nicosia] Disable async scrolling until implemented
https://bugs.webkit.org/show_bug.cgi?id=198476
<rdar://problem/51351478>

Unreviewed follow-up to r246033.

  • page/scrolling/ScrollingCoordinator.cpp:

Expand the PLATFORM(IOS) guard to IOS_FAMILY.

7:28 AM Changeset in webkit [246035] by berto@igalia.com
  • 3 edits in trunk/Source/WebDriver

REGRESSION(r245567): [GTK][WPE] [2.25.1] WebKitWebDriver gets installed as WebDriver
https://bugs.webkit.org/show_bug.cgi?id=198480

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-06-03
Reviewed by Michael Catanzaro.

We are now using the WEBKIT_EXECUTABLE macro that uses target_OUTPUT_NAME variable, but we define
taget_Process_OUTPUT_NAME.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
4:34 AM Changeset in webkit [246034] by Darin Adler
  • 30 edits in trunk

Finish cleanup of String::number for floating point
https://bugs.webkit.org/show_bug.cgi?id=198471

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode): Use String::number instead of
String::numberToStringECMAScript, since that's now the default.

  • parser/ParserArena.h:

(JSC::IdentifierArena::makeNumericIdentifier): Ditto.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue): Use appendNumber instead of
builder.appendECMAScriptNumber, since that's now the default.

  • runtime/NumberPrototype.cpp:

(JSC::toStringWithRadix): Use String::number instead of
String::numberToStringECMAScript, since that's now the default.
(JSC::numberProtoFuncToExponential): Ditto.
(JSC::numberProtoFuncToFixed): Ditto.
(JSC::numberProtoFuncToPrecision): Ditto.
(JSC::numberToStringInternal): Ditto.

  • runtime/NumericStrings.h:

(JSC::NumericStrings::add): Ditto.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::prepare): Ditto.

Source/WebCore:

  • css/CSSCursorImageValue.cpp:

(WebCore::CSSCursorImageValue::customCSSText const): Use makeString instead
of StringBuilder since it is more terse and possibly more efficient as well.

  • css/DOMMatrixReadOnly.cpp:

(WebCore::DOMMatrixReadOnly::toString const): Ditto.

  • css/WebKitCSSMatrix.cpp:

(WebCore::WebKitCSSMatrix::toString const): Ditto.

  • html/parser/HTMLParserIdioms.cpp:

(WebCore::serializeForNumberType): Use String::number instead of
String::numberToStringECMAScript since that is now the default.

  • html/shadow/MediaControlElementTypes.cpp:

(WebCore::MediaControlVolumeSliderElement::setVolume): Ditto.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTimelineElement::setPosition): Ditto.

  • platform/Decimal.cpp:

(WebCore::Decimal::fromDouble): Ditto.

  • rendering/RenderListMarker.cpp:

(WebCore::toRoman): Return a String instead of taking a StringBuilder argument.
Use LetterCase enum instead of bool for the uppercase vs. lowercase argument, to
be less mysterious at call sites. Use unsigned for string lengths since that's
what WTF::String uses.
(WebCore::toAlphabeticOrNumeric): Ditto. Also updated since SequenceType is now
an enum class.
(WebCore::toSymbolic): Use String::createUninitialized instead of StringBuilder.
Return a String instead of taking a StringBuilder argument. Straighten out the
algorithm so it's easier to understand.
(WebCore::toAlphabetic): Updated since SequenceType is now an enum class.
(WebCore::toNumeric): Ditto.
(WebCore::toHebrew): Return a String instead of taking a StringBuilder argument.
Use unsigned for string lengths since that's what WTF::String uses.
(WebCore::toArmenianUnder10000): Use unsigned and the LetterCase enum class.
(WebCore::toArmenian): Return a String instead of taking a StringBuilder argument.
Also use unsigned for string lengths since that's what WTF::String uses.
(WebCore::toGeorgian): Ditto.
(WebCore::toCJKIdeographic): Ditto.
(WebCore::listMarkerSuffix): Tweaked a comment.
(WebCore::listMarkerText): Use String return values instead of StringBuilder.
(WebCore::RenderListMarker::paint): Use String::createUninitialized instead of
StringBuilder since it's a bit more efficient. Use makeString instead of turning
single characters into strings since that's more efficient.

  • svg/SVGPathUtilities.cpp:

(WebCore::buildStringFromPath): Use appendNumber instead of appendShortestFormNumber
since that is now the default.

Source/WebKit:

  • NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:

(WebKit::submitTopList): Use makeString instead of StringBuilder since it
is more terse and possibly more efficient as well.

  • UIProcess/API/APIUserScript.cpp:

(API::UserScript::generateUniqueURL): Ditto.

  • UIProcess/API/APIUserStyleSheet.cpp:

(API::UserStyleSheet::generateUniqueURL): Ditto.

Source/WTF:

  • wtf/JSONValues.cpp:

(WTF::JSONImpl::Value::writeJSON const): Use appendNumber instead of
appendECMAScriptNumber, since that's now the default.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::appendNumber): Renamed from appendShortestFormNumber.

  • wtf/text/StringBuilder.h: Removed appendShortestFormNumber and

appendECMAScriptNumber, replacing both with overload of appendNumber.

  • wtf/text/WTFString.cpp:

(WTF::String::number): Renamed from numberToStringShortest.

  • wtf/text/WTFString.h: Removed numberToStringShortest and

numberToStringECMAScript, replacing both with overload of number.

Tools:

  • TestWebKitAPI/Tests/WTF/WTFString.cpp:

(TestWebKitAPI::testStringNumber): Go back to calling String::number instead of
String::numberToStringECMAScript.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::dumpFrameScrollPosition): Use appendNumber instead of appendECMAScriptNumber
since that is now the default.

2:45 AM Changeset in webkit [246033] by zandobersek@gmail.com
  • 24 edits in trunk

[Nicosia] Disable async scrolling until implemented
https://bugs.webkit.org/show_bug.cgi?id=198476

Reviewed by Antti Koivisto.

.:

Disable async scrolling on Nicosia-using ports until the underlying
implementation is complete, allowing easier refactorings of the general
async scrolling system.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Build ScrollingCoordinator::create() method on iOS or whenever
ASYNC_SCROLLING is not enabled.

Additionally, the USE(COORDINATED_GRAPHICS) build guards are removed
throughout the async scrolling classes as they aren't required now
and shouldn't be in the future.

  • page/scrolling/ScrollingCoordinator.cpp:
  • page/scrolling/ScrollingStateFixedNode.cpp:
  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateFrameHostingNode.cpp:
  • page/scrolling/ScrollingStateFrameHostingNode.h:
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:
  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.cpp:
  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
  • page/scrolling/ScrollingStateOverflowScrollingNode.h:
  • page/scrolling/ScrollingStatePositionedNode.cpp:
  • page/scrolling/ScrollingStatePositionedNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:
  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateStickyNode.cpp:
  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingStateTree.cpp:
  • page/scrolling/ScrollingStateTree.h:
2:43 AM Changeset in webkit [246032] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

REGRESSION(r240862) [WinCairo][WK2] position:fixed elements don't show
https://bugs.webkit.org/show_bug.cgi?id=198478

Reviewed by Carlos Garcia Campos.

All position:fixed elements didn't show in WinCairo WebKit2 since
r240862 which turns acceleratedCompositingEnabled on for WebKit2.
WinCairo WebKit2 doesn't have accelerated compositing support yet.
Let's do the same with GTK port.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Conditioned out the code
enabling acceleratedCompositingEnabled for PLATFORM(WIN).

2:29 AM Changeset in webkit [246031] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation
https://bugs.webkit.org/show_bug.cgi?id=198191

Unreviewed post-commit review feedback suggested by Darin Adler.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::reset):

1:07 AM Changeset in webkit [246030] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

REGRESSION(r244182): [CoordinatedGraphics] Related view doesn't receive graphic updates
https://bugs.webkit.org/show_bug.cgi?id=198418

Reviewed by Žan Doberšek.

This is because we need a DisplayRefreshMonitor per drawing area, but the one from the first ThreradedCompositor
is always reused because they use the same display ID.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Use a unique display ID derived from
WebPage's ID.
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode): Use the primary display ID.

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::LayerTreeHost): Get the current web page display ID instead of inventing one.
(WebKit::LayerTreeHost::setIsDiscardable): Do not change display ID.

Jun 2, 2019:

10:29 PM Changeset in webkit [246029] by bshafiei@apple.com
  • 3 edits
    6 adds in branches/safari-608.1.27-branch

Cherry-pick r245989. rdar://problem/51283532

iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=198244

Reviewed by Simon Fraser.

Source/WebKit:

This is a follow up to r245006. Even when overflow: hidden is specified on the document body,
we still need to make it scrollable when the page is pinch zoomed or there is a content inset
e.g. for software keyboard. Otherwise, the user won't be able to get to the content that is
outside the visual viewport when pinch zoomed or the parts of the page that is not outside
the visual viewport due to the scrolling caused by the software keyboard being brought up.

  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _didCommitLayerTree:]):

LayoutTests:

Added regression tests.

  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: Added.

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

10:28 PM Changeset in webkit [246028] by Fujii Hironori
  • 2 edits in trunk/Tools

[WinCairo][MiniBrowser] WKViewSetIsInWindow should be called
https://bugs.webkit.org/show_bug.cgi?id=198474

Reviewed by Darin Adler.

WinCairo WK2 MiniBrowser can't play back videos because
Page::canStartMedia() always returns false. WKViewSetIsInWindow
should be called.

The original MiniBrowser did it in Bug 55364.

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::WebKitBrowserWindow): Call WKViewSetIsInWindow.

7:12 PM Changeset in webkit [246027] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Flaky Test: inspector/canvas/recording.html
https://bugs.webkit.org/show_bug.cgi?id=198470

Reviewed by Matt Baker.

  • inspector/canvas/recording.html:

Don't rely on frameCount to automatically stop the recording, as that's dependent on when
the <canvas> paints and is less controllable/deterministic.

5:05 PM Changeset in webkit [246026] by Matt Baker
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger: sidebar should always reveal active call frame when hitting a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=198228
<rdar://problem/46719447>

Reviewed by Devin Rousso.

Reveal the active call frame TreeElement when call frames change. Refreshing
the current target's ThreadTreeElement children is insufficient, since
the sidebar panel content may have been scrolled.

This patch also introduces a workaround to prevent the DetailsSection header
element, which has sticky positioning, from covering a revealed TreeElement.
This can be the case when the TreeElement being revealed is at the topmost edge
of the scrolled content element.

  • UserInterface/Base/Utilities.js:
  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype.createContentTreeOutline):
(WI.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):

  • UserInterface/Views/DetailsSection.js:

(WI.DetailsSection.prototype.get element):
(WI.DetailsSection.prototype.get headerElement):
(WI.DetailsSection.prototype.get identifier):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype.reveal):

  • UserInterface/Views/TreeOutline.js:
4:34 PM Changeset in webkit [246025] by Devin Rousso
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: propagate whether to show prototype information to subobject views
https://bugs.webkit.org/show_bug.cgi?id=194929

Reviewed by Matt Baker.

Add a way to mark the ObjectTreeView as holding a JSON value, which extends
showOnlyProperties to also hide the prototype of all held values (e.g. children).

  • UserInterface/Views/ObjectTreeView.js:

(WI.ObjectTreeView.prototype.showOnlyJSON): Added.

  • UserInterface/Views/ObjectTreeView.css:

(.object-tree.properties-only.json-only .object-tree-property .prototype-property): Added.

  • UserInterface/Views/AuditTestCaseContentView.js:

(WI.AuditTestCaseContentView.prototype.layout):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):

  • UserInterface/Views/JSONResourceContentView.css:

(.content-view.resource.json .object-tree .prototype-property): Deleted.

  • UserInterface/Views/JSONResourceContentView.js:

(WI.JSONResourceContentView.prototype.contentAvailable):

3:18 PM Changeset in webkit [246024] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Crash explicitly if StructureIDs are exhausted
https://bugs.webkit.org/show_bug.cgi?id=198467

Reviewed by Sam Weinig.

When StructureIDTable::m_size reaches to s_maximumNumberOfStructures, newCapacity in resize function is also capped with s_maximumNumberOfStructures.
So m_size == newCapacity. In that case, the following code in resize function, makeFreeListFromRange(m_size, m_capacity - 1); starts executing the
wrong code.

Currently, this is safe. We immediately execute the wrong code in makeFreeListFromRange, and crash with zero division. But we should not rely on
this crash, and instead we should explicitly crash because we exhaust StructureIDs.

This patch inserts RELEASE_ASSERT for m_size < newCapacity status to ensure that resize is always extending the table.

In practice, this crash does not happen in Safari because Safari has memory footprint limit. To exhaust StructureIDs, we need to allocate massive
amount of Structures, and it exceeds the memory footprint limit and the process will be killed.

  • runtime/StructureIDTable.cpp:

(JSC::StructureIDTable::resize):

1:51 PM Changeset in webkit [246023] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

Provide an action to save an image on a link sheet
https://bugs.webkit.org/show_bug.cgi?id=198464

Reviewed by Wenson Hsieh.

When providing the set of default actions for a link
sheet, if an URL to an image was provided then offer
the action to save that image to Photos.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):

1:02 PM Changeset in webkit [246022] by keith_miller@apple.com
  • 9 edits in trunk/Source

Reenable Gigacage on ARM64.
https://bugs.webkit.org/show_bug.cgi?id=198453

Reviewed by Filip Pizlo.

Source/bmalloc:

  • bmalloc/Gigacage.h:

Source/JavaScriptCore:

This patch adds back Gigacaging on Apple's ARM64 ports. Unlike the
old Gigacage however, arm64e uses both Gigacaging and PAC. Since
Gigacaging would otherwise strip a PAC failed authenticate bit we
force a load of the pointer into some garbage register.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpForTypedArrayIsNeuteredIfOutOfBounds):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::untagArrayPtr):
(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cageConditionally):

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

  • wtf/CagedPtr.h:

(WTF::CagedPtr::authenticatingLoad):
(WTF::CagedPtr::get const):
(WTF::CagedPtr::getMayBeNull const):

5:25 AM Changeset in webkit [246021] by Tadeu Zagallo
  • 4 edits in trunk/Source/JavaScriptCore

CachedMetadataTable::decode leaks empty tables
https://bugs.webkit.org/show_bug.cgi?id=198465
<rdar://problem/51307673>

Reviewed by Yusuke Suzuki.

CachedMetadataTable::decode creates the metadata and never calls finalize on it.
This leaks the underlying UnlinkedMetadataTable buffer when m_hasMetadata is false,
since the buffer would be freed in finalize instead of in the destructor.

  • bytecode/UnlinkedMetadataTable.h:

(JSC::UnlinkedMetadataTable::empty):

  • bytecode/UnlinkedMetadataTableInlines.h:

(JSC::UnlinkedMetadataTable::UnlinkedMetadataTable):

  • runtime/CachedTypes.cpp:

(JSC::CachedMetadataTable::decode const):

Jun 1, 2019:

8:01 PM Changeset in webkit [246020] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit

Remove include directives unused since r245186
https://bugs.webkit.org/show_bug.cgi?id=198463

Reviewed by Don Olmstead.

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
8:01 PM Changeset in webkit [246019] by Simon Fraser
  • 5 edits in trunk

[Async overflow scroll] Flashing content when scrolling async overflow with a negative z-index child
https://bugs.webkit.org/show_bug.cgi?id=198458

Reviewed by Dean Jackson.

Source/WebCore:

Set the GraphicsLayerPaintOverflowContents phase on the foreground layer in a composited overflow scroller,
which prevents clipping to the visible region, fixing scrolling flashes.

Tested by compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updatePaintingPhases):

LayoutTests:

  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
7:55 PM Changeset in webkit [246018] by Simon Fraser
  • 4 edits
    6 adds in trunk

Async overflow scroll on iOS paints slowly if it has a negative z-index child
https://bugs.webkit.org/show_bug.cgi?id=196508
rdar://problem/49532709

Reviewed by Dean Jackson.
Source/WebCore:

If a RenderLayerBacking had a foreground layer and a scrolled contents layer, every geometry
update would change the size and offsetFromRenderer of the foreground layer between two
states, triggering repaint.

Fix by updating the fore- and background-layers last (nothing elese has dependencies
on their geometry), and using GraphicsLayer::DontSetNeedsDisplay as we do for the
scrolled contents layer.

The test also revealed a bug where the shapeMaskLayer would get incorrect geometry when scrollbars
were visible, because it would be squished by setting the wrong bounds, so fix that.

Test: compositing/repaint/scroller-with-foreground-layer-repaints.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateClippingStrategy):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

LayoutTests:

  • compositing/geometry/scroller-with-clipping-and-foreground-layers-expected.html: Added.
  • compositing/geometry/scroller-with-clipping-and-foreground-layers.html: Added.
  • compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt: Added.
  • compositing/repaint/scroller-with-foreground-layer-repaints.html: Added.
  • platform/ios-wk2/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt: Added.
  • platform/mac-wk1/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt: Added.
2:40 PM Changeset in webkit [246017] by Simon Fraser
  • 12 edits
    2 adds in trunk

Non-composited negative z-order children should not trigger creation of a foreground layer
https://bugs.webkit.org/show_bug.cgi?id=198455

Reviewed by Sam Weinig.
Source/WebCore:

The existing code triggered creation of a foreground layer on RenderLayerBacking when
the negative z-order list was non-empty. This isn't necessary; we can paint the negative
z-order children just fine.

We only need a foreground layer when the negative z-order layers are composited or
have composited descendants.

This will reduce backing store memory use in some cases.

Test: compositing/layer-creation/composited-negative-z-subtree.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
(WebCore::RenderLayerCompositor::needsContentsCompositingLayer const):

LayoutTests:

Change existing tests that use negative z-order layers to trigger foreground layer
creation to use compositing on those negative z-order layers.

  • compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
  • compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html:
  • compositing/geometry/bounds-ignores-hidden-expected.txt:
  • compositing/geometry/bounds-ignores-hidden.html:
  • compositing/layer-creation/composited-negative-z-subtree-expected.txt: Added.
  • compositing/layer-creation/composited-negative-z-subtree.html: Added.
  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html:
  • platform/ios-wk2/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
  • platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
2:37 PM Changeset in webkit [246016] by Devin Rousso
  • 7 edits
    7 moves
    31 adds
    1 delete in trunk/LayoutTests

Web Inspector: Canvas: split recording tests into separate files so they don't timeout
https://bugs.webkit.org/show_bug.cgi?id=198459
<rdar://problem/51332026>

Reviewed by Joseph Pecoraro.

  • inspector/canvas/recording.html:
  • inspector/canvas/recording-expected.txt:
  • inspector/canvas/recording-2d.html: Removed.
  • inspector/canvas/recording-2d-expected.txt: Removed.
  • inspector/canvas/console-record-2d.html: Added.
  • inspector/canvas/console-record-2d-expected.txt: Added.
  • inspector/canvas/recording-2d-frameCount.html: Added.
  • inspector/canvas/recording-2d-frameCount-expected.txt: Added.
  • inspector/canvas/recording-2d-full.html: Added.
  • inspector/canvas/recording-2d-full-expected.txt: Added.
  • inspector/canvas/recording-2d-memoryLimit.html: Added.
  • inspector/canvas/recording-2d-memoryLimit-expected.txt: Added.
  • inspector/canvas/recording-2d-saves.html: Added.
  • inspector/canvas/recording-2d-saves-expected.txt: Added.
  • inspector/canvas/resources/recording-2d.js: Added.
  • inspector/canvas/recording-bitmaprenderer.html: Removed.
  • inspector/canvas/recording-bitmaprenderer-expected.txt: Removed.
  • inspector/canvas/console-record-bitmaprenderer.html: Added.
  • inspector/canvas/console-record-bitmaprenderer-expected.txt: Added.
  • inspector/canvas/recording-bitmaprenderer-frameCount.html: Added.
  • inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt: Added.
  • inspector/canvas/recording-bitmaprenderer-full.html: Added.
  • inspector/canvas/recording-bitmaprenderer-full-expected.txt: Added.
  • inspector/canvas/recording-bitmaprenderer-memoryLimit.html: Added.
  • inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt: Added.
  • inspector/canvas/resources/recording-bitmaprenderer.js: Added.
  • inspector/canvas/recording-webgl.html: Removed.
  • inspector/canvas/recording-webgl-expected.txt: Removed.
  • inspector/canvas/console-record-webgl.html: Added.
  • inspector/canvas/console-record-webgl-expected.txt: Added.
  • inspector/canvas/recording-webgl-frameCount.html: Added.
  • inspector/canvas/recording-webgl-frameCount-expected.txt: Added.
  • inspector/canvas/recording-webgl-full.html: Added.
  • inspector/canvas/recording-webgl-full-expected.txt: Added.
  • inspector/canvas/recording-webgl-memoryLimit.html: Added.
  • inspector/canvas/recording-webgl-memoryLimit-expected.txt: Added.
  • inspector/canvas/resources/recording-webgl.js: Added.
  • inspector/canvas/recording-webgl2.html: Removed.
  • inspector/canvas/recording-webgl2-expected.txt: Removed.
  • inspector/canvas/console-record-webgl2.html: Added.
  • inspector/canvas/console-record-webgl2-expected.txt: Added.
  • inspector/canvas/recording-webgl2-frameCount.html: Added.
  • inspector/canvas/recording-webgl2-frameCount-expected.txt: Added.
  • inspector/canvas/recording-webgl2-full.html: Added.
  • inspector/canvas/recording-webgl2-full-expected.txt: Added.
  • inspector/canvas/recording-webgl2-memoryLimit.html: Added.
  • inspector/canvas/recording-webgl2-memoryLimit-expected.txt: Added.
  • inspector/canvas/resources/recording-webgl2.js: Added.
  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
1:19 PM Changeset in webkit [246015] by Devin Rousso
  • 4 edits in trunk/LayoutTests

Web Inspector: Canvas: in tests don't manually stop recording if a frame count is specified
https://bugs.webkit.org/show_bug.cgi?id=198457
<rdar://problem/48248697>

Reviewed by Joseph Pecoraro.

If a frameCount is specified, the recording will stop by itself, so if we hit the
LastFrame, there's no need to manually stop the recording at that point. Otherwise,
stopping it early may cause the recording to think that the last frame is incomplete.

  • inspector/canvas/resources/recording-utilities.js:
  • inspector/canvas/recording-webgl-snapshots.html:
  • inspector/canvas/recording-webgl2-snapshots.html:
9:19 AM Changeset in webkit [246014] by aestes@apple.com
  • 6 edits in trunk/Source

[Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=198449
<rdar://problem/51038583>

Reviewed by Wenson Hsieh.

Source/WebCore:

Rather than having a default return value of true for
PaymentCoordinatorClient::supportsUnrestrictedApplePay, make it pure virtual to force each
subclass to implement an override and explicitly choose an appropriate return value.

The only two clients that did not explicitly override were the empty client and
WebKitLegacy's client, and Apple Pay was never enabled in those clients, so there is no
change in behavior.

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
(WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.

  • loader/EmptyClients.cpp:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const):

May 31, 2019:

11:19 PM Changeset in webkit [246013] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Ensure keyboard editing is up to date
https://bugs.webkit.org/show_bug.cgi?id=198444
<rdar://problem/36311563>

Reviewed by Ryosuke Niwa.

In order for the keyboard cut/copy/undo/redo/etc buttons to be up to date
based on the state of the selection, we need to let the input delegate know when the
selection has changed.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _selectionChanged]):

9:33 PM Changeset in webkit [246012] by sihui_liu@apple.com
  • 3 edits in trunk/Tools

TestWebKitAPI.WKWebView.LocalStorageProcessSuspends is flaky
https://bugs.webkit.org/show_bug.cgi?id=198450

Reviewed by Ryosuke Niwa.

In local-storage-process-suspends-2.html, we periodically checked local storage item and sent a message when the
item value was changed or times of check reached limit. We expected the message to be sent after network process
resumed from suspension, because that's when the item value should get updated. However, the limit we set seemed
to be not high enough, so that the message could be sent eariler than expected, when limit of check number was
reached.

We can solve this in different ways. To make the test robust, we can send the message on a storage event, which
notifies about changes in local storage.

  • TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html:
9:16 PM Changeset in webkit [246011] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Remove outdated FIXME in StorageManager
https://bugs.webkit.org/show_bug.cgi?id=198049

Reviewed by Geoffrey Garen.

Previously StorageManager messages were dispatched and handled in the same thread, so we could perform a message
check. Now they are on different thread, and we would not be able to verify those parameters when dispatching
the message.

  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):

8:20 PM Changeset in webkit [246010] by rniwa@webkit.org
  • 2 edits in trunk/Tools

DragAndDropTests.DragImageLocationForLinkInSubframe fails on some iPad
https://bugs.webkit.org/show_bug.cgi?id=198447

Reviewed by Wenson Hsieh.

Give the elements an explicit 400px width to make the test always work.

  • TestWebKitAPI/Tests/WebKitCocoa/link-in-iframe-and-input.html:
6:09 PM Changeset in webkit [246009] by Alan Coon
  • 1 copy in tags/Safari-608.1.27

Tag Safari-608.1.27.

6:03 PM Changeset in webkit [246008] by jiewen_tan@apple.com
  • 3 edits in trunk/Source/WebKit

Teach AuxiliaryProcess about LoadOptimizer
https://bugs.webkit.org/show_bug.cgi?id=198443
<rdar://problem/51319120>

Reviewed by Brent Fulgham.

  • Shared/ios/AuxiliaryProcessIOS.mm:

(WebKit::AuxiliaryProcess::platformInitialize):

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::AuxiliaryProcess::platformInitialize):

6:02 PM Changeset in webkit [246007] by Alan Coon
  • 7 edits in branches/safari-608.1.27-branch/Source

Versioning.

5:59 PM Changeset in webkit [246006] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, fix setEntryAddressCommon register usage in LLInt ASM Windows 64
https://bugs.webkit.org/show_bug.cgi?id=197979

  • llint/LowLevelInterpreter.asm:
  • offlineasm/x86.rb:
5:57 PM Changeset in webkit [246005] by Alan Coon
  • 1 copy in tags/Safari-607.3.3

Tag Safari-607.3.3.

5:43 PM Changeset in webkit [246004] by wenson_hsieh@apple.com
  • 9 edits in trunk

Make tests that use UIHelper more robust under certain configurations
https://bugs.webkit.org/show_bug.cgi?id=198442
<rdar://problem/51301737>

Reviewed by Megan Gardner.

Tools:

For a certain device class, many tests that attempt to use UIHelper.isIOS are currently failing. We can fix this
by making the isIOS check more robust; this patch also renames isIOS to isIOSFamily, which is more
accurate (and consistent with the corresponding PLATFORM macro name).

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(WTR::TestRunner::isIOSFamily const):

LayoutTests:

Replace usages of UIHelper.isIOS with UIHelper.isIOSFamily.

  • fast/dom/iframe-inner-size-scaling.html:
  • fast/forms/datalist/datalist-show-hide.html:
  • fast/forms/datalist/datalist-textinput-suggestions-order.html:
  • fast/scrolling/ios/reveal-focused-element-right-above-keyboard-on-ipad.html:

Also remove a workaround here that forces isIOS to return true.

  • resources/ui-helper.js:

(window.UIHelper.isIOSFamily):
(window.UIHelper.isWebKit2):
(window.UIHelper.humanSpeedDoubleTapAt):
(window.UIHelper.humanSpeedZoomByDoubleTappingAt):
(window.UIHelper.zoomByDoubleTappingAt):
(window.UIHelper.async.doubleActivateAt):
(window.UIHelper.async.doubleActivateAtSelectionStart):
(window.UIHelper.async.selectWordByDoubleTapOrClick):
(window.UIHelper.keyDown):
(window.UIHelper.deactivateFormControl):
(window.UIHelper.typeCharacter):
(window.UIHelper.inputViewBounds):
(window.UIHelper.contentOffset):
(window.UIHelper.isIOS): Deleted.

5:00 PM Changeset in webkit [246003] by stephan.szabo@sony.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

[PlayStation] Support internal test runner for JSC tests
https://bugs.webkit.org/show_bug.cgi?id=198386

Reviewed by Alex Christensen.

Support using our test runner with our wrapper library
to run multiple tests sequentially in one execution. With
default arguments, will run as normal, but with special
arguments will shift into this mode.

  • runtime/Options.h:

Export the default values of the JSC options similar
to the values for resetting the values between tests.

  • shell/PlatformPlayStation.cmake:
  • shell/playstation/TestShell.cpp: Added.

(setupTestRun): Function to set up the system before starting the tests
(preTest): Function for setting up individual test
(runTest): Function to run a test execution
(postTest): Function for shutdown of individual test
(shutdownTestRun): Function for shutting down the system after test run completes.

4:49 PM Changeset in webkit [246002] by youenn@apple.com
  • 23 edits
    1 copy
    2 adds in trunk

Add an option to mute audio capture automatically when page is not visible
https://bugs.webkit.org/show_bug.cgi?id=198307

Reviewed by Eric Carlson.

Source/WebCore:

Reuse video capture mechanism for audio capture.
In case document gets in the background, interrupt the audio track if the audio factory requires it.
CoreAudioCaptureSourceIOS requires the audio source be interrupted if the app has not the right background mode.
It also allows interrupting the audio capture based on a runtime flag.

Add a runtime flag to control this.
Internals API is used to set it for test purposes, off by default.
For regular cases, the runtime flag is set through web preferences.

Test: platform/ios/mediastream/audio-muted-in-background-tab.html

  • dom/Document.cpp:

(WebCore::Document::notifyMediaCaptureOfVisibilityChanged):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::interruptAudioOnPageVisibilityChangeEnabled const):
(WebCore::RuntimeEnabledFeatures::setInterruptAudioOnPageVisibilityChangeEnabled):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
(WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):
(WebCore::RealtimeMediaSourceCenter::setCapturePageState):
(WebCore::RealtimeMediaSourceCenter::visibilityDidChange):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):

  • platform/mediastream/RealtimeMediaSourceFactory.h:

(WebCore::AudioCaptureFactory::setAudioCapturePageState):
(WebCore::VideoCaptureFactory::setVideoCapturePageState):

  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:

(WebCore::CoreAudioCaptureSourceFactory::setAudioCapturePageState):
(WebCore::CoreAudioCaptureSourceFactoryIOS::shouldInterruptAudioOnPageVisibilityChange):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setShouldInterruptAudioOnPageVisibilityChange):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Add API to set the new runtime flag.
Make source proxy factories implement this automatic muting.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _interruptAudioOnPageVisibilityChangeEnabled]):
(-[WKPreferences _setInterruptAudioOnPageVisibilityChangeEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::setAudioCapturePageState):
(WebKit::UserMediaCaptureManager::setVideoCapturePageState):

  • WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

  • platform/ios/mediastream/audio-muted-in-background-tab-expected.txt: Added.
  • platform/ios/mediastream/audio-muted-in-background-tab.html: Added.
4:49 PM Changeset in webkit [246001] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebCore

Apply patch. rdar://problem/50871594

4:43 PM Changeset in webkit [246000] by Alan Coon
  • 1 copy in tags/Safari-607.3.1.2.2

Tag Safari-607.3.1.2.2.

4:37 PM Changeset in webkit [245999] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

Updating expectations for failing tests
<rdar://problem/47088939>

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:36 PM Changeset in webkit [245998] by wenson_hsieh@apple.com
  • 15 edits
    1 copy
    1 move
    1 add in trunk

[iOS] Autocorrection menu font is Times New Roman when using font-family: UICTFontTextStyle*
https://bugs.webkit.org/show_bug.cgi?id=198427
<rdar://problem/50031825>

Reviewed by Tim Horton.

Source/WebKit:

When UICTFontTextStyle* is specified as the font-family in an editable element, text in autocorrection bubbles
always uses Times New Roman font. This is because we send a font family name, font size, and font attributes to
the UI process when computing autocorrection data for UIKit, and then assemble this information into a UIFont
object via +[UIFont fontWithFamilyName:traits:size:]. However, in the case where UICTFontTextStyle* is specified
as the font-family in CSS, the font family that we send to the UI process ends up being ".AppleSystemUIFont",
which +fontWithFamilyName:traits:size: fails to map to the system font as intended.

To fix this, we propagate font information to the UI process by encoding the UIFont itself via IPC, which
serializes the font descriptor, and then deserializes into a UIFont in the UI process. This allows the system
font to be returned in -fontForCaretSelection, which is invoked by UIKit when determining the font for the
autocorrection bubble. See below for more details.

Test: AutocorrectionTests.FontAtCaretWhenUsingUICTFontTextStyle

  • Shared/ios/WebAutocorrectionData.h: Copied from Source/WebKit/UIProcess/AutoCorrectionCallback.h.
  • Shared/ios/WebAutocorrectionData.mm: Renamed from Source/WebKit/UIProcess/AutoCorrectionCallback.h.

(WebKit::WebAutocorrectionData::encode const):
(WebKit::WebAutocorrectionData::decode):

Introduce WebAutocorrectionData, a struct containing information used to show autocorrection UI on iOS (i.e.
highlights and the bubble). This consists of a list of rects, along with a UIFont.

  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Refactor requestAutocorrectionData to request a WebAutocorrectionData instead, and also use the new async IPC
reply mechanism.

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

(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView fontForCaretSelection]):

Grab the UIFont directly from the WebAutocorrectionData. Also, address a FIXME by scaling the font size by the
content scale.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::autocorrectionDataCallback): Deleted.
(WebKit::WebPageProxy::autocorrectionContextCallback): Deleted.

Remove some IPC callbacks that are now unused.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestAutocorrectionData):

Tools:

Add a new API test to verify that -fontForCaretSelection returns the system font when using UICTFontTextStyle
in an editable web view.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: Added.

(-[TestWKWebView autocorrectionRectsForString:]):
(checkCGRectIsEqualToCGRectWithLogging):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/ios/UIKitSPI.h:
4:25 PM Changeset in webkit [245997] by Alan Coon
  • 9 edits in branches/safari-608.1.27-branch

Revert r245943. rdar://problem/51244662

4:24 PM Changeset in webkit [245996] by Alan Coon
  • 2 edits in branches/safari-608.1.27-branch/Source/WebKit

Revert r245899. rdar://problem/51316898

4:22 PM Changeset in webkit [245995] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Detab.

  • scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame.html:
4:20 PM Changeset in webkit [245994] by Simon Fraser
  • 2 edits in trunk/LayoutTests

[Mac WK2 Debug] Layout Test scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=197425

Unreviewed test gardening.

Speculative fix for flakey test; trigger layout inside the subframe.

  • scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame.html:
4:13 PM Changeset in webkit [245993] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

[iOS] Reveal the focused element when it's immediately above software keyboard
https://bugs.webkit.org/show_bug.cgi?id=198412

Reviewed by Wenson Hsieh.

Source/WebKit:

When _zoomToRevealFocusedElement is called with forceScroll set to NO (happens when input type is none or drawing
or when the platform is iPad), we don't force scrolling to reveal the focused element when it's entirely visible.

This can be misleading in cases where there is more content right beneath it relevant for editing operations.
Zoom & scroll to reveal the focused element when the said element is within 50px of the software keyboard.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):

LayoutTests:

Added a regression test. Note that this test always passes on non-iPad platforms either
before or after this patch as _zoomToRevealFocusedElement forces scrolling in that case.

  • fast/scrolling/ios/reveal-focused-element-right-above-keyboard-on-ipad-expected.txt: Added.
  • fast/scrolling/ios/reveal-focused-element-right-above-keyboard-on-ipad.html: Added.
4:10 PM Changeset in webkit [245992] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, rolling out r245899.

Seems to be causing crashes on iosmac

Reverted changeset:

"[iOS] UIProcess' background task expiration handler may get
called after the app is foreground again"
https://bugs.webkit.org/show_bug.cgi?id=198380
https://trac.webkit.org/changeset/245899

3:53 PM Changeset in webkit [245991] by Nikita Vasilyev
  • 11 edits in trunk

Web Inspector: CSS Changes: modifications aren't shared for rules that match multiple elements
https://bugs.webkit.org/show_bug.cgi?id=195264
<rdar://problem/48550023>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

This patch fixes several cases when the diff was incorrect.

  1. Perform diff based on CSSProperty content (name, value, and enabled property) instead of strict equality of CSSProperty instances.
  1. Copy all initial CSSProperty instances of CSSStyleDeclaration on 1st edit. This removes the need to update properties on every single edit.
  1. Do full diff to display modified property markers (green background) in Rules panel. This fixes a few cases when the markers were inaccurate. E.g. a newly added property matches removed property - no need to show the green background.
  • UserInterface/Base/Utilities.js:

(Array.diffArrays):
Allow repeating items in the arrays.

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager.prototype.getModifiedStyle):
(WI.CSSManager.prototype.removeModifiedStyle):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty):
(WI.CSSProperty.prototype.get modified):
(WI.CSSProperty.prototype.set modified):
(WI.CSSProperty.prototype.equals):
(WI.CSSProperty.prototype.clone):
(WI.CSSProperty.prototype._updateOwnerStyleText):
(WI.CSSProperty.prototype._markModified):

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.markModified):
(WI.CSSStyleDeclaration.prototype.updatePropertiesModifiedState):

  • UserInterface/Views/ChangesDetailsSidebarPanel.js:

(WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

LayoutTests:

Test arrays with repeating items for Array.diffArrays.

  • inspector/unit-tests/array-utilities-expected.txt:
  • inspector/unit-tests/array-utilities.html:
3:30 PM Changeset in webkit [245990] by Simon Fraser
  • 3 edits in trunk/LayoutTests

tile-coverage-iframe-to-zero-coverage.html flakey after r245974
https://bugs.webkit.org/show_bug.cgi?id=198438

Unreviewed test gardening.

layerTreeAsText() doesn't force layouts on subframes (webkit.org/b/198439) so
have the test force an update on the subframe via a dummy layerTreeAsText() call.

  • tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt:
  • tiled-drawing/tile-coverage-iframe-to-zero-coverage.html:
3:12 PM Changeset in webkit [245989] by rniwa@webkit.org
  • 3 edits
    6 adds in trunk

iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=198244

Reviewed by Simon Fraser.

Source/WebKit:

This is a follow up to r245006. Even when overflow: hidden is specified on the document body,
we still need to make it scrollable when the page is pinch zoomed or there is a content inset
e.g. for software keyboard. Otherwise, the user won't be able to get to the content that is
outside the visual viewport when pinch zoomed or the parts of the page that is not outside
the visual viewport due to the scrolling caused by the software keyboard being brought up.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):

LayoutTests:

Added regression tests.

  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: Added.
3:02 PM Changeset in webkit [245988] by timothy_horton@apple.com
  • 3 edits in trunk/Tools

REGRESSION: WebKit.InteractionDeadlockAfterCrash and SynchronousTimeoutTests.UnresponsivePageDoesNotCausePositionInformationToHangUI API tests are failing
https://bugs.webkit.org/show_bug.cgi?id=198432
<rdar://problem/51266033>

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm:

(TEST):
(recursiveFindHighlightLongPressRecognizer): Deleted.

  • TestWebKitAPI/Tests/ios/SynchronousTimeoutTests.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::recursiveFindHighlightLongPressRecognizer): Deleted.

2:56 PM Changeset in webkit [245987] by ggaren@apple.com
  • 6 edits in trunk/Source

Some WeakPtr typedef cleanup
https://bugs.webkit.org/show_bug.cgi?id=198431

Reviewed by Chris Dumez.

Use "using" instead of "typedef", since using is preferred in C++ for
better compatibility with templates.

Source/WebCore:

  • Modules/indexeddb/shared/InProcessIDBServer.h:
  • html/HTMLMediaElement.h:
  • platform/ScrollView.h:

Source/WebKit:

  • UIProcess/WebAuthentication/AuthenticatorManager.h:
2:32 PM Changeset in webkit [245986] by achristensen@apple.com
  • 2 edits in branches/safari-607-branch/Tools

Fix i386 build on safari-607-branch
<rdar://problem/50625279>

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

We need to check WK_API_ENABLED on the branch.

2:31 PM Changeset in webkit [245985] by Alan Coon
  • 3 edits
    6 deletes in branches/safari-608.1.27-branch

Revert r245953. rdar://problem/51314019

2:11 PM Changeset in webkit [245984] by commit-queue@webkit.org
  • 3 edits
    6 deletes in trunk

Unreviewed, rolling out r245953.
https://bugs.webkit.org/show_bug.cgi?id=198436

Broke quip (Requested by rniwa on #webkit).

Reverted changeset:

"iOS: Main frame should be scrollable when pinch zoomed or
software keyboard is up"
https://bugs.webkit.org/show_bug.cgi?id=198244
https://trac.webkit.org/changeset/245953

1:56 PM Changeset in webkit [245983] by achristensen@apple.com
  • 4 edits in trunk

URLParser::parseIPv6Host should properly parse 0's around compression
https://bugs.webkit.org/show_bug.cgi?id=198424

Reviewed by Tim Horton.

Source/WTF:

  • wtf/URLParser.cpp:

(WTF::URLParser::parseIPv6Host):

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):

1:55 PM Changeset in webkit [245982] by achristensen@apple.com
  • 4 edits in trunk

URLParser::parseHostAndPort should not allow non-port characters after an ipv6 host
https://bugs.webkit.org/show_bug.cgi?id=198428
<rdar://problem/51209196>

Reviewed by Tim Horton.

Source/WTF:

This matches Chrome and Firefox.

  • wtf/URLParser.cpp:

(WTF::URLParser::parseHostAndPort):

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):

1:52 PM Changeset in webkit [245981] by Dewei Zhu
  • 2 edits in trunk/Tools

run-benchmark should report an error if the argument to --build-directory is bogus
https://bugs.webkit.org/show_bug.cgi?id=198316

Reviewed by Ryosuke Niwa.

'run-benchmark' should not fallback to system safari when browser or browser build path is
specified but not valid.
Add a run-time check to ensure at least one of the resource from build directory is opened by
Safari when build directory is specified.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:

(OSXSafariDriver.launch_url): Raise an exception when browser or browser build path is
specified but not valid.

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

Inserting a newline in contenteditable causes two characters to be added instead of one
https://bugs.webkit.org/show_bug.cgi?id=197894
<rdar://problems/49700998>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-05-31
Reviewed by Chris Fleizach.

No new test is necessary since this is a comment change.

Removed radar reference from code.

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator):

1:00 PM Changeset in webkit [245979] by timothy_horton@apple.com
  • 43 edits
    4 adds in trunk

Optionally respect device management restrictions when loading from the network
https://bugs.webkit.org/show_bug.cgi?id=198318
<rdar://problem/44263806>

Reviewed by Alex Christensen.

Source/WebCore:

  • en.lproj/Localizable.strings:

Source/WebKit:

  • Configurations/Network-iOS.entitlements:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

Add some entitlements and sandbox holes required to talk to DeviceManagement.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::wasBlockedByRestrictions):

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

(WebKit::NetworkLoad::wasBlockedByRestrictions):

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

(WebKit::PingLoad::wasBlockedByRestrictions):

  • NetworkProcess/PingLoad.h:
  • Shared/WebErrors.cpp:

(WebKit::wasBlockedByRestrictionsError):

  • Shared/WebErrors.h:
  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):
(WebKit::NetworkDataTask::failureTimerFired):

  • NetworkProcess/NetworkDataTask.h:
  • Shared/API/APIError.h:
  • Shared/API/c/WKErrorRef.cpp:

(WKErrorGetErrorCode):

  • Shared/API/c/WKErrorRef.h:

Plumb a new error for loads that are blocked by device management restrictions.

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
Plumb a new bit that indicates whether a load is for the main resource of a frame.
We will only apply device management restrictions to main resources.

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

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

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):
Plumb a new bit indicating whether a network session should respect device mangement
restrictions.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::resume):
Defer resuming the load until we have a reply from DeviceManagement framework
about whether the URL should be blocked. If it is blocked, instead fail the load.

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

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::deviceManagementPolicyMonitor):
Cache a single DMFWebsitePolicyMonitor instance per NetworkSession.

  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::defaultDataStoreConfiguration):
The default data store is persistent; its configuration should reflect that.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setAllowsAnySSLCertificateForServiceWorker:]): Style.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _initWithConfiguration:]):
Make it possible to create a non-persistent WKWebsiteDataStore from a
configuration, and ensure that it does not have any persistent storage directories set.

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration init]):
(-[_WKWebsiteDataStoreConfiguration initWithNonPersistentConfiguration]):
(-[_WKWebsiteDataStoreConfiguration isPersistent]):
(-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
(-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
(-[_WKWebsiteDataStoreConfiguration deviceManagementRestrictionsEnabled]):
(-[_WKWebsiteDataStoreConfiguration setDeviceManagementRestrictionsEnabled:]):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::isPersistent const):
(WebKit::WebsiteDataStoreConfiguration::setPersistent):
(WebKit::WebsiteDataStoreConfiguration::perOriginStorageQuota const):
(WebKit::WebsiteDataStoreConfiguration::deviceManagementRestrictionsEnabled const):
(WebKit::WebsiteDataStoreConfiguration::setDeviceManagementRestrictionsEnabled):
(WebKit::WebsiteDataStoreConfiguration::perOriginStorageQuota): Deleted.
Make it possible to create a _WKWebsiteDataStoreConfiguration that will create a non-persistent
data store. Add a bit to _WKWebsiteDataStoreConfiguration that controls whether the network
session will respect device management restrictions.

  • WebKit.xcodeproj/project.pbxproj:
  • WebKit/NetworkProcess/cocoa/DeviceManagementSoftLink.h:
  • WebKit/NetworkProcess/cocoa/DeviceManagementSoftLink.mm:
  • WebKit/Platform/spi/Cocoa/DeviceManagementSPI.h:

Add some soft-linking and SPI headers.

Source/WTF:

  • wtf/Platform.h:

Add a HAVE flag for DeviceManagement.framework.
It does exist in the simulator, but does not function; pretend it doesn't exist.

Tools:

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

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):
Clone a test that tests non-persistent data stores and ensure
that it works if the data store is created via a configuration as well.

Add a test that ensures that you can't create a data store configuration
with an invalid set of options.

Add a test that device management restrictions (when mocked) correctly
fail the load with a new, appropriate error.

12:49 PM Changeset in webkit [245978] by Ryan Haddad
  • 9 edits in trunk

Unreviewed, rolling out r245943.

Caused API test WKWebView.LocalStorageProcessSuspends to fail
on release bots.

Reverted changeset:

"WKWebsiteDataStore API fails to fetch web storage data for
non-persistent data store"
https://bugs.webkit.org/show_bug.cgi?id=198317
https://trac.webkit.org/changeset/245943

12:07 PM Changeset in webkit [245977] by Simon Fraser
  • 6 edits
    4 adds in trunk

Move code that sets compositing paint phases into a single function
https://bugs.webkit.org/show_bug.cgi?id=198420

Reviewed by Zalan Bujtas.

Source/WebCore:

To compute the correct paint phases for the various GraphicsLayers in a RenderLayerBacking,
we have to know which set of layers we've created (m_scrollContainerLayer, m_foregroundLayer etc).
So move the code that sets phases into a single function which is called when that
set of layers changes.

The test dumps paint phases for a stacking-context-composited scroller with a negative z-index child.

Also have GraphicsLayer::setPaintingPhase() trigger the necessary repaint when the paint phase changes.

Test: compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::setPaintingPhase):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setPaintingPhase): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateScrollingLayers):
(WebCore::RenderLayerBacking::updatePaintingPhases):
(WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const): Deleted.

  • rendering/RenderLayerBacking.h:

LayoutTests:

  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt: Added.
  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html: Added.
  • platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt: Added.
  • platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt: Added.
12:05 PM Changeset in webkit [245976] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines: CPU: gray (?) and (x) should be white
https://bugs.webkit.org/show_bug.cgi?id=198394

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/Variables.css:

(@media (prefers-color-scheme: dark)):
Remove the dark mode override for --gray-foreground-color, as the default white is a
better contrast.

11:56 AM Changeset in webkit [245975] by ap@apple.com
  • 2 edits in trunk/Tools

WebKitTestRunner sometimes freezes under -[NSWindow release]
https://bugs.webkit.org/show_bug.cgi?id=198422

Reviewed by Tim Horton.

The window remains key until it's out of the allWindows vector, and AppKit is not
happy about deallocating key windows. Fixed by updating allWindows in -close
instead of -release.

Added isMainFrame assertions in code that manipulates allWindows for a good measure.

  • WebKitTestRunner/mac/WebKitTestRunnerWindow.mm:

(+[WebKitTestRunnerWindow _WTR_keyWindow]):
(-[WebKitTestRunnerWindow initWithContentRect:styleMask:backing:defer:]):
(-[WebKitTestRunnerWindow close]):
(-[WebKitTestRunnerWindow dealloc]):

11:55 AM Changeset in webkit [245974] by Simon Fraser
  • 8 edits in trunk

[Async overflow scrolling] Flashes of missing layer backing store when scrolling an overflow
https://bugs.webkit.org/show_bug.cgi?id=198363

Reviewed by Tim Horton.

Source/WebCore:

When the contents of an overflow:scroll did not use a tiled backing layer, GraphicsLayerCA::adjustCoverageRect()
would do no coverage rect expansion for scrolling, which meant that backing store attachment for
descendant layers would just use the visible rect from their scrolling ancestor which made it easy
to scroll into view a layer whose backing store was not yet attached.

Since this only affects non-tiled layers, re-use the generic TileController::adjustTileCoverageRect()
code by moving it down to GraphicsLayer, and call it for a scrolled contents layer which does not
have tiled backing.

Tested by fast/scrolling/ios/reconcile-layer-position-recursive.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::adjustCoverageRectForMovement):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::adjustCoverageRect const):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect):

LayoutTests:

Reset results.

  • fast/scrolling/ios/reconcile-layer-position-recursive-expected.txt:
  • tiled-drawing/tiled-backing-in-window-expected.txt:
11:16 AM Changeset in webkit [245973] by sbarati@apple.com
  • 3 edits
    2 adds in trunk

[WHLSL] Make sure we properly emit code for "&*x"
https://bugs.webkit.org/show_bug.cgi?id=198198

Reviewed by Myles C. Maxfield.

Source/WebCore:

I ran into this when trying to test zero-filling code, so let's just fix it.
The issue is that the property resolver ends up emitting code that looks like
"&*x". The semantics of this are such that it should result in just x.
However, we emitted Metal code in such a way where we'd end up with a pointer
to a temporary value. To fix this, DereferenceExpression will emit code that results
in a reference type. Then, MakePointerExpression will correctly return the
pointer backing that reference type.

Because of this, we also no longer need to pattern match the lhs of assignment
expressions since we will now be assigning to a reference type.

Test: webgpu/whlsl-store-to-property-updates-properly.html

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

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

LayoutTests:

  • webgpu/whlsl-store-to-property-updates-properly-expected.html: Added.
  • webgpu/whlsl-store-to-property-updates-properly.html: Added.
10:11 AM Changeset in webkit [245972] by ggaren@apple.com
  • 8 edits in trunk

Some WeakPtr cleanup
https://bugs.webkit.org/show_bug.cgi?id=198390

Reviewed by Chris Dumez.

Source/WebCore:

  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::storageQuotaManagerGetter): Dereference the weak pointer
directly instead of using a weak pointer to guard a raw pointer. It's
safer and more idiomatic to use weak pointers directly.

  • Modules/indexeddb/shared/InProcessIDBServer.h: Use our base clase

weakPtrFactory() definition instead of writing our own. Declare
WeakValueType so we can dereference the weak pointer we create (above).

Source/WTF:

  • wtf/WeakHashSet.h:

(WTF::HashTraits<Ref<WeakPtrImpl>>::isReleasedWeakValue):
(WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator):
Updated for rename to WeakPtrImpl.

(WTF::WeakHashSet::WeakHashSetConstIterator::get const): Updated for new
get() interface. Also, switched to iterator operator* to help clarify
the double dereference here.

(WTF::WeakHashSet::add):
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computeSize const):
(WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Deleted.
Updated for rename to WeakPtrImpl.

  • wtf/WeakPtr.h:

(WTF::WeakPtrImpl::create):
(WTF::WeakPtrImpl::~WeakPtrImpl): Renamed WeakReference to WeakPtrImpl.
Now we don't need a comment explaining that this class is the backing
implementation of WeakPtr.

(WTF::WeakPtrImpl::get): Return the pointer type we stored, rather than
the pointer type requested by our client. It's a little too surprising
for a field to store one pointer type and load another.

(WTF::WeakPtrImpl::WeakPtrImpl): Fixed a theoretical type safety bug.
Make sure to store T::WeakValueType* instead of T*, since they might
not be the same pointer value. (In practice, T and T::WeakValueType*
are always the same type in this constructor because WeakPtrFactory
makes them so, but it's best not to depend on implementation details
across classes.)

(WTF::WeakPtr::get const): Updated for new get() interface.

(WTF::WeakPtr::operator bool const):
(WTF::WeakPtr::operator=):
(WTF::WeakPtr::clear):
(WTF::WeakPtr::WeakPtr): Updated for WeakPtrImpl rename.

(WTF::WeakPtrFactory::~WeakPtrFactory): Updated for WeakPtrImpl rename.

(WTF::WeakPtrFactory::createWeakPtr const): ASSERT that the passed-in
pointer is equal to the stored pointer. As a space optimization, we
require our client to remind us what we point to each time a weak
pointer is created -- but nothing guarantees that our client will do
this correctly.

(WTF::WeakPtrFactory::revokeAll): Updated for WeakPtrImpl rename.

(WTF::CanMakeWeakPtr::weakPtrFactory const):
(WTF::CanMakeWeakPtr::weakPtrFactory): Use idiomatic accessor naming.

(WTF::weak_ptr_impl_cast): Fixed a theoretical type safety bug.
Previously, if Base and Derived both inherited CanMakeWeakPtr, and
you casted WeakPtr<Base> to WeakPtr<Derived> (or vice versa), and
casting Base <-> Derived required pointer fixup, the previous
compile-time check would accept the cast, even though the stored pointer
would be wrong.

(WTF::WeakPtr<T>::WeakPtr):
(WTF::=):
(WTF::makeWeakPtr):
(WTF::WeakReference::create): Deleted.
(WTF::WeakReference::~WeakReference): Deleted.
(WTF::WeakReference::get const): Deleted.
(WTF::WeakReference::operator bool const): Deleted.
(WTF::WeakReference::clear): Deleted.
(WTF::WeakReference::WeakReference): Deleted.
(WTF::weak_reference_cast): Deleted. Updated for rename to WeakPtrImpl.

Don't export WeakPtrImpl because it's an implmenetation detail and
it shouldn't be easy to use outside WTF.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Updated for rename.
10:09 AM Changeset in webkit [245971] by Kocsen Chung
  • 23 edits
    3 deletes in branches/safari-608.1.27-branch

Revert r245946. rdar://problem/47390407

10:05 AM Changeset in webkit [245970] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] InlineFormattingContext::LineLayout::processInlineItemsForLine should create and destroy Line.
https://bugs.webkit.org/show_bug.cgi?id=198419
<rdar://problem/51300837>

Reviewed by Antti Koivisto.

This is in preparation for using "createInlineRunsForLine" logic when computing preferred width.

  1. Line object is now constructed and destroyed in processInlineItemsForLine (caller does not need to know about Line).
  2. processInlineItemsForLine returns a Line::Content instance.
  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
(WebCore::Layout::constructLine):
(WebCore::Layout::InlineFormattingContext::LineLayout::processInlineItemsForLine const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createLine const): Deleted.
(WebCore::Layout::InlineFormattingContext::LineLayout::createInlineRunsForLine const): Deleted.
(WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const): Deleted.

9:58 AM Changeset in webkit [245969] by Kocsen Chung
  • 1 copy in branches/safari-608.1.27-branch

New branch.

9:56 AM Changeset in webkit [245968] by don.olmstead@sony.com
  • 23 edits in trunk

[CMake] Add WebKit::WTF target
https://bugs.webkit.org/show_bug.cgi?id=198400

Reviewed by Konstantin Tokarev.

Source/JavaScriptCore:

Use the WebKit::WTF target.

  • CMakeLists.txt:
  • shell/CMakeLists.txt:

Source/WebCore:

Use the WebKit::WTF target.

  • PlatformWin.cmake:

Source/WebDriver:

Use the WebKit::WTF target.

  • CMakeLists.txt:

Source/WebKitLegacy:

Use the WebKit::WTF target.

  • PlatformWin.cmake:

Source/WebKitLegacy/win:

Use the WebKit::WTF target.

  • WebKitQuartzCoreAdditions/CMakeLists.txt:

Source/WTF:

Create the WebKit::WTF target and use that to propagate headers. Use
WEBKIT_COPY_FILES instead of WEBKIT_MAKE_FORWARDING_HEADERS.

  • wtf/CMakeLists.txt:

Tools:

Use the WebKit::WTF target.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformWin.cmake:
9:48 AM Changeset in webkit [245967] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

9:37 AM Changeset in webkit [245966] by jh718.park@samsung.com
  • 3 edits
    3 adds in trunk

Always min-width should win over max-width.
https://bugs.webkit.org/show_bug.cgi?id=198032

Reviewed by Darin Adler.

In the spec, https://www.w3.org/TR/CSS21/visudet.html#min-max-widths,
the following algorithm describes how the two properties influence
the used value of the 'width' property.

  1. The tentative used width is calculated (without 'min-width' and 'max-width')

following the rules under "Calculating widths and margins" above.

  1. If the tentative used width is greater than 'max-width',

the rules above are applied again, but this time using the computed value of 'max-width'
as the computed value for 'width'.

  1. If the resulting width is smaller than 'min-width', the rules above are applied again,

but this time using the value of 'min-width' as the computed value for 'width'.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-sizing/min-width-max-width-precedence-expected.txt: Added.
  • web-platform-tests/css/css-sizing/min-width-max-width-precedence.html: Added.

Source/WebCore:

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computePreferredLogicalWidths):

9:19 AM Changeset in webkit [245965] by achristensen@apple.com
  • 2 edits in trunk/Tools

REGRESSION (Safari 12): SafariForWebkitDevelopment won't load any pages on Mojave, nightly builds broken
https://bugs.webkit.org/show_bug.cgi?id=194808
<rdar://problem/48278497>

Reviewed by Darin Adler.

I verified that a daily build downloaded an run on Mojave does not work without this and works with this.

  • WebKitArchiveSupport/run-webkit-archive:

(set_dyld_framework_path):
Also set XPC variants of needed environment variables.

8:20 AM Changeset in webkit [245964] by Ryan Haddad
  • 23 edits
    3 deletes in trunk

Unreviewed, rolling out r245946.

Breaks the watchOS build.

Reverted changeset:

"Add an option to mute audio capture automatically when page
is not visible"
https://bugs.webkit.org/show_bug.cgi?id=198307
https://trac.webkit.org/changeset/245946

7:42 AM Changeset in webkit [245963] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win10] Some tests are failing only on specific machines
https://bugs.webkit.org/show_bug.cgi?id=197509

Unreviewed test gardening.

  • platform/win/TestExpectations:
6:43 AM Changeset in webkit [245962] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC[IFC] Do not reuse the same Line object.
https://bugs.webkit.org/show_bug.cgi?id=198366
<rdar://problem/51250279>

Reviewed by Antti Koivisto.

This is in preparation for constructing Line inside createInlineRunsForLine and return Line::Content.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::createLine const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const):
(WebCore::Layout::InlineFormattingContext::LineLayout::initializeLine const): Deleted.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Line):
(WebCore::Layout::m_lineLogicalWidth):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::reset): Deleted.

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::hasContent const):

5:58 AM Changeset in webkit [245961] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move final runs to a dedicated class (Line::Content)
https://bugs.webkit.org/show_bug.cgi?id=198360
<rdar://problem/51247717>

Reviewed by Antti Koivisto.

It decouples the line and the final line content. So when we process the runs after closing the line,
LineContent should be able to answer all the content and geometry related questions.
This is also in preparation for
transfering the ownership of the line content when calling Line::close().

  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::processInlineRuns const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Content::isVisuallyEmpty const):
(WebCore::Layout::Line::Content::Run::Run):
(WebCore::Layout::Line::reset):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::LineItem::LineItem): Deleted.
(WebCore::Layout::Line::hasContent const): Deleted.

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Content::runs const):
(WebCore::Layout::Line::Content::isEmpty const):
(WebCore::Layout::Line::Content::logicalTop const):
(WebCore::Layout::Line::Content::logicalLeft const):
(WebCore::Layout::Line::Content::logicalRight const):
(WebCore::Layout::Line::Content::logicalBottom const):
(WebCore::Layout::Line::Content::logicalWidth const):
(WebCore::Layout::Line::Content::logicalHeight const):
(WebCore::Layout::Line::Content::setLogicalRect):
(WebCore::Layout::Line::Content::runs):
(WebCore::Layout::Line::hasContent const):
(WebCore::Layout::Line::availableWidth const):
(WebCore::Layout::Line::contentLogicalRight const):
(WebCore::Layout::Line::logicalTop const):
(WebCore::Layout::Line::logicalBottom const):
(WebCore::Layout::Line::logicalLeft const):
(WebCore::Layout::Line::logicalRight const):
(WebCore::Layout::Line::logicalWidth const):
(WebCore::Layout::Line::logicalHeight const):
(WebCore::Layout::Line::contentLogicalWidth const):

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

5:29 AM Changeset in webkit [245960] by jh718.park@samsung.com
  • 5 edits in trunk/Source/WebCore

Unreviewed. Fix typo of |ComputedStyleExtractor::valueForPropertyInStyle|
to follow camel case function naming style.

No behavioral changes.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-05-31

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle): Deleted.

  • css/CSSComputedStyleDeclaration.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::changedCustomPaintWatchedProperty):

4:39 AM Changeset in webkit [245959] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WPE] Build at-spi2-core without x11 support in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=198411

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-05-31
Reviewed by Philippe Normand.

  • wpe/jhbuild.modules:
4:03 AM Changeset in webkit [245958] by ajuma@chromium.org
  • 4 edits in trunk/Source/WebCore

REGRESSION (r245396): Page load time performance regression
https://bugs.webkit.org/show_bug.cgi?id=198382

Reviewed by Simon Fraser.

Delay the scheduling of a rendering update by 500ms when a new
IntersectionObserver target is added during page load. This addresses
a page load time regression from r245396, which immediately scheduled a
rendering update when a target is added. Note that even with this change,
if anything else triggers a rendering update before the 500ms delay expires,
intersection observations will be updated during that rendering update.

Covered by intersection-observer/initial-observation.html

  • dom/Document.cpp:

(WebCore::Document::updateIntersectionObservations):
(WebCore::Document::scheduleInitialIntersectionObservationUpdate):

  • dom/Document.h:
  • page/IntersectionObserver.cpp:

(WebCore::IntersectionObserver::observe):

1:17 AM Changeset in webkit [245957] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[GTK] WPERenderer: ensure we complete the last frame when leaving AC mode
https://bugs.webkit.org/show_bug.cgi?id=198372

Reviewed by Michael Catanzaro.

It can happen that we leave AC mode after a new image is received from the web process but before it's
committed. It can also happen that we receive a new image from the web process right after we have left AC
mode. In both cases we need to complete the frame to ensure we don't leave the wayland compositor waiting
forever for a frame to be completed.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::update): Complete any pending image when a new surface is used.
(WebKit::AcceleratedBackingStoreWayland::displayBuffer): Complete the given image and return early if we already
left AC mode.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.h:
1:15 AM Changeset in webkit [245956] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[CoordinatedGraphics] WPERenderer: do not release the host file descritor when initializing the render target
https://bugs.webkit.org/show_bug.cgi?id=198371

Reviewed by Michael Catanzaro.

We are assuming that there will always be only one target for a web page. In the GTK port we destroy the render
target when leaving AC mode, and a new one is created when re-entering AC mode. Since the file descriptor is
released on the first target and adopted by libwpe, the second target passes -1 as host fd to libwpe, and the
new surface created by the target is not properly registered in the wayland compositor. That means that frame
requests for the new target are simply ignored by the wayland compositor, it returns early on surfacxe frame
when the surface doesn't have a view backend client.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::hostFileDescriptor const): Rename it and make it const.

  • WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp:

(WebKit::AcceleratedSurfaceLibWPE::initialize): Pass a duplicated file descriptor to
wpe_renderer_backend_egl_target_create().

1:13 AM Changeset in webkit [245955] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK] Fix memory leak introduced in r245807
https://bugs.webkit.org/show_bug.cgi?id=198369

Reviewed by Michael Catanzaro.

We should destroy the wpe_view_backend_exportable_fdo created in AcceleratedBackingStoreWayland.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):

1:12 AM Changeset in webkit [245954] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

REGRESSION(r244182): [GTK] Web view no longer updated after re-entering AC mode
https://bugs.webkit.org/show_bug.cgi?id=198367

Reviewed by Sergio Villar Senin.

This happens because we leave accelerated compositing mode when a rendering update is scheduled in
RenderingUpdateScheduler. The ThreadedDisplayRefreshMonitor is destroyed without completing the
frame, so that the RenderingUpdateScheduler is left scheduled forever, ignoring any new schedule request. We
need to ensure we complete the frame request before destroying the display refresh monitor to leave the
RenderingUpdateScheduler in a consistent state.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:

(WebKit::ThreadedDisplayRefreshMonitor::invalidate):

12:25 AM Changeset in webkit [245953] by rniwa@webkit.org
  • 3 edits
    6 adds in trunk

iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=198244

Reviewed by Simon Fraser.

Source/WebKit:

This is a follow up to r245006. Even when overflow: hidden is specified on the document body,
we still need to make it scrollable when the page is pinch zoomed or there is a content inset
e.g. for software keyboard. Otherwise, the user won't be able to get to the content that is
outside the visual viewport when pinch zoomed or the parts of the page that is not outside
the visual viewport due to the scrolling caused by the software keyboard being brought up.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):

LayoutTests:

Added regression tests.

  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: Added.
Note: See TracTimeline for information about the timeline view.