Timeline
Sep 22, 2019:
- 8:46 PM Changeset in webkit [250201] by
-
- 10 edits in trunk/Source/WebCore
clang-tidy: Fix unnecessary copy/ref churn of for loop variables in WebCore
<https://webkit.org/b/202090>
Reviewed by Daniel Bates.
Fix unwanted copying/ref churn of loop variables by making them
const references.
- Modules/encryptedmedia/InitDataRegistry.cpp:
(WebCore::InitDataRegistry::extractKeyIDsCenc):
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::getMisspellingRange const):
(WebCore::AccessibilityObject::performTextOperation):
- html/HTMLSlotElement.cpp:
(WebCore::flattenAssignedNodes):
- html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::checkAndStoreStyleSheet):
- layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
- platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers):
- platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard allDroppedFileURLs]):
- svg/SVGStringList.h:
- testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
Also call transceivers.reserve() to optimize allocations.
- 2:57 AM Changeset in webkit [250200] by
-
- 5 edits2 adds in trunk
[JSC] Int52Rep(DoubleRepAnyIntUse) should not call operation function
https://bugs.webkit.org/show_bug.cgi?id=202072
Reviewed by Mark Lam.
JSTests:
- stress/int52rep-with-double-checks-int52-range.js: Added.
(shouldBe):
(test):
Source/JavaScriptCore:
Inline doubleToStrictInt52 in FTL since it is very simple function.
This change improves JetStream2/stanford-crypto-sha256 by ~5%.
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::doubleToStrictInt52):
- ftl/FTLOutput.cpp:
(JSC::FTL::Output::doubleToInt64):
- ftl/FTLOutput.h:
- 2:08 AM Changeset in webkit [250199] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, follow-up change after r250198
https://bugs.webkit.org/show_bug.cgi?id=201633
- b3/testb3_5.cpp:
(testCheckAddRemoveCheckWithSExt16):
- 12:19 AM Changeset in webkit [250198] by
-
- 5 edits in trunk/Source/JavaScriptCore
[JSC] Remove CheckAdd in JetStream2/async-fs's Math.random function
https://bugs.webkit.org/show_bug.cgi?id=201633
Reviewed by Mark Lam.
Int52Rep is used in DFG and FTL to calculate Int52 things faster. This is typically used when user code see uint32_t type.
In JS, we handles Int32 well, but if the value exceeds Int32 range (like, using 0xffffffff), we use Int52 instead not to fallback to Double.
The problem is that we do not have optimizations for Int52's overflow checks. This emits many ArithAdd(Int52Rep x 2, CheckOverflow). Each
of them emits OSR exit, which prevents dead-store-elimination in B3, and makes ValueToInt32(Int52) alive if it is referenced from some variable which
can be seen if OSR exit occurs.
In this patch, we perform strength-reduction for CheckAdd, converting to Add. We already have such a thing. But the existing one does not handle instructions
well emitted when Int52 is used.
When Int52 is used, we typically have the sequence like,
Int64 @78 = SExt32(@73, DFG:@67<Int52>) Widen Int32 to Int64
Int64 @81 = Shl(@78, $12(@80), DFG:@162<Int52>) Convert Int32 to Int52
While we have Shl handling for integer-range optimization in B3ReduceStrength, we lack handling of SExt32 while it is very easy.
This patch adds SExt8, SExt16, SExt32, and ZExt32 handling to B3ReduceStrength's integer range analysis.
This converts many CheckAdd in JetStream2/async-fs's hot function to simple Add, and removes a bunch of unnecessary instructions which exist because of this OSR exit.
We can see ~5% improvement in JetStream2/async-fs.
- b3/B3ReduceStrength.cpp:
- b3/testb3.h:
(int16Operands):
(int8Operands):
- b3/testb3_1.cpp:
(run):
- b3/testb3_5.cpp:
(testCheckAddRemoveCheckWithSExt8):
(testCheckAddRemoveCheckWithSExt16):
(testCheckAddRemoveCheckWithSExt32):
(testCheckAddRemoveCheckWithZExt32):
Sep 21, 2019:
- 11:12 PM Changeset in webkit [250197] by
-
- 2 edits in trunk/Source/WebKit
Fix an assertion failure introduced in r250186.
- UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): Corrected the
assertion.
- 11:04 PM Changeset in webkit [250196] by
-
- 24 edits in trunk/Source
Reduce use of SessionID::defaultSessionID() in WebKit
https://bugs.webkit.org/show_bug.cgi?id=202080
Reviewed by Alex Christensen.
Source/WebCore:
Reduce use of SessionID::defaultSessionID() in WebKit. Falling back to the default session
when you don't know which session to use is never a good idea and a potential privacy issue.
- Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
- dom/Document.cpp:
(WebCore::Document::logger):
- dom/Document.h:
- html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAdClickAttribution const):
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
- loader/EmptyFrameLoaderClient.h:
- loader/FrameLoaderClient.h:
- loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
- loader/cache/CachedResourceLoader.h:
(WebCore::CachedResourceLoader::clearDocumentLoader):
- page/Frame.cpp:
- page/Frame.h:
- workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const):
Source/WebKit:
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
- WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
- WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertMainResourceLoadToDownload):
- WebProcess/WebPage/WebFrame.h:
Source/WebKitLegacy/mac:
- WebCoreSupport/WebFrameLoaderClient.h:
- WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
Source/WebKitLegacy/win:
- WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
- WebCoreSupport/WebFrameLoaderClient.h:
- 10:17 PM Changeset in webkit [250195] by
-
- 7 edits in trunk/Source/WebCore
ServiceWorkerContextData does not need a sessionID
https://bugs.webkit.org/show_bug.cgi?id=202087
Reviewed by Alex Christensen.
- workers/service/ServiceWorkerContextData.cpp:
(WebCore::ServiceWorkerContextData::isolatedCopy const):
- workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):
- workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::RegistrationDatabase):
(WebCore::RegistrationDatabase::importRecords):
- workers/service/server/RegistrationDatabase.h:
- workers/service/server/SWServer.cpp:
(WebCore::SWServer::updateWorker):
- workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::contextData const):
- 10:17 PM Changeset in webkit [250194] by
-
- 3 edits in trunk/Source/WebKit
Drop unnecessary NetworkProcess::m_sessionByConnection
https://bugs.webkit.org/show_bug.cgi?id=202088
Reviewed by Alex Christensen.
- NetworkProcess/NetworkProcess.cpp:
- NetworkProcess/NetworkProcess.h:
- 10:16 PM Changeset in webkit [250193] by
-
- 7 edits in trunk/Source
WebIDBConnectionToClient does not need to be RefCounted or a SessionID
https://bugs.webkit.org/show_bug.cgi?id=202089
Reviewed by Alex Christensen.
Source/WebCore:
Drop some dead code.
- Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
Source/WebKit:
WebIDBConnectionToClient does not need to be RefCounted, the ref() / deref() virtual function
it implemented from its interface were dead code. We now stop subclassing RefCounted and have
the NetworkConnectionToWebProcess fully own the WebIDBConnectionToClient. Instead of the
WebIDBConnectionToClient having 3 data members for the NetworkProcess, the sessionID and the IPC
connection, use a single data member to its NetworkConnectionToWebProcess parent. It can get
everything it needs from its parent.
- NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::idbServer):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::messageSenderConnection const):
(WebKit::WebIDBConnectionToClient::connectionToClient):
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::renameIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getAllRecords):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
(WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
(WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
- NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
- NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
- NetworkProcess/NetworkConnectionToWebProcess.h:
- 10:15 PM Changeset in webkit [250192] by
-
- 6 edits in trunk/Source/WebCore
[CURL] CurlRequest does not need a sessionID
https://bugs.webkit.org/show_bug.cgi?id=202086
Reviewed by Alex Christensen.
- platform/network/curl/CurlFormDataStream.cpp:
(WebCore::CurlFormDataStream::CurlFormDataStream):
- platform/network/curl/CurlFormDataStream.h:
- platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::CurlRequest):
- platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::create):
- platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::createCurlRequest):
- 10:15 PM Changeset in webkit [250191] by
-
- 5 edits in trunk/Source/WebCore
CookieRequestHeaderFieldProxy does not need a SessionID
https://bugs.webkit.org/show_bug.cgi?id=202084
Reviewed by Alex Christensen.
- Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didOpenSocketStream):
- loader/CookieJar.cpp:
(WebCore::CookieJar::cookieRequestHeaderFieldProxy):
- loader/CookieJar.h:
- platform/network/CookieRequestHeaderFieldProxy.h:
(WebCore::CookieRequestHeaderFieldProxy::encode const):
(WebCore::CookieRequestHeaderFieldProxy::decode):
- 10:14 PM Changeset in webkit [250190] by
-
- 3 edits in trunk/Source/WebCore
DocumentLoader::m_temporaryServiceWorkerClient does not need a sessionID
https://bugs.webkit.org/show_bug.cgi?id=202083
Reviewed by Alex Christensen.
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
(WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
- loader/DocumentLoader.h:
- 9:01 PM Changeset in webkit [250189] by
-
- 6 edits in trunk/Source/JavaScriptCore
Move JSLexicalEnvironment, DirectArguments, and ScopedArguments cells out of the Gigacage.
https://bugs.webkit.org/show_bug.cgi?id=202082
Reviewed by Tadeu Zagallo.
They are not being caged anyway.
- runtime/DirectArguments.h:
- runtime/JSLexicalEnvironment.h:
(JSC::JSLexicalEnvironment::subspaceFor):
- runtime/ScopedArguments.h:
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
- 7:40 PM Changeset in webkit [250188] by
-
- 10 edits in trunk/Source/WebCore
[FTW] Resolve crashes found while running canvas tests
https://bugs.webkit.org/show_bug.cgi?id=202062
Reviewed by Don Olmstead.
- platform/graphics/Pattern.h:
- platform/graphics/win/Direct2DOperations.cpp:
(WebCore::Direct2D::FillSource::FillSource): Take GraphicsContext as argument, rather than
a PlatformContextDirect2D since downstream operations require the former.
(WebCore::Direct2D::StrokeSource::StrokeSource): Ditto.
(WebCore::Direct2D::clip): Use new 'pushClip' helper function.
- platform/graphics/win/Direct2DOperations.h:
- platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::strokeRect):
- platform/graphics/win/GraphicsContextImplDirect2D.cpp:
(WebCore::GraphicsContextImplDirect2D::fillRect): Update to pass GraphicsContext.
(WebCore::GraphicsContextImplDirect2D::fillRectWithRoundedHole): Ditto.
(WebCore::GraphicsContextImplDirect2D::fillPath): Ditto.
(WebCore::GraphicsContextImplDirect2D::strokeRect): Ditto.
(WebCore::GraphicsContextImplDirect2D::strokePath): Ditto.
(WebCore::GraphicsContextImplDirect2D::drawGlyphs): Ditto.
- platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::copyRectFromSourceToData): Correct return behavior.
(WebCore::ImageBufferData::compatibleBitmap): Make a copy if the render target is
backed by the ID2D1Bitmap we are trying to draw with.
- platform/graphics/win/PatternDirect2D.cpp:
(WebCore::Pattern::createPlatformPattern const): Remove 'PlatformContextDirect2D' contructor,
since we always need a GraphicsContext for the Image class.
- platform/graphics/win/PlatformContextDirect2D.cpp:
(WebCore::PlatformContextDirect2D::clipLayer const): Added.
(WebCore::PlatformContextDirect2D::clearClips): Added.
(WebCore::PlatformContextDirect2D::restore): Update to use m_stateStack, rather than
the m_renderStates vector.
(WebCore::PlatformContextDirect2D::save): Ditto.
(WebCore::PlatformContextDirect2D::pushRenderClip): Ditto.
(WebCore::PlatformContextDirect2D::setActiveLayer): Ditto.
(WebCore::PlatformContextDirect2D::endDraw): Ditto.
(WebCore::PlatformContextDirect2D::notifyPostDrawObserver): Ditto.
(WebCore::PlatformContextDirect2D::pushClip): Ditto.
- platform/graphics/win/PlatformContextDirect2D.h:
(WebCore::PlatformContextDirect2D::hasSavedState const):
(WebCore::PlatformContextDirect2D::clipLayer const): Deleted.
- 4:13 PM Changeset in webkit [250187] by
-
- 2 edits in trunk/Source/WebKit
Regression(iOS 13) web views do not deal properly with their window's UIScene changing
https://bugs.webkit.org/show_bug.cgi?id=202070
<rdar://problem/55580699>
Reviewed by Tim Horton.
Web views do not deal properly with their window's UIScene changing. If a Safari window is in the
background for 1 minute, its UIScene will be detached and the window will get a new UIScene if
the user later switches to this window. Our web views listen to UIScene notifications to determine
their visibility and currently stop receiving visibility updates once the window’s UIScene has
changed. This causes view freezes because our WebContent process does not know its view is visible
and keeps its layer tree frozen.
Previously, when our view would be added to a window, we would get this window's UIScene and listen
for UISceneDidEnterBackgroundNotification / UISceneWillEnterForegroundNotification for this UIScene
object. Instead, we now listen to these notifications for ALL the application's UIScenes. Our handler
then checks if the notification's UIScene object matches the current window's UIScene before
forwarding the notification to the rest of WebKit.
- UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
- 3:57 PM Changeset in webkit [250186] by
-
- 4 edits in trunk/Source/WebKit
Safari 13 may launch leftover 32-bit plug-in process from Safari 12’s WebKit, which crashes
https://bugs.webkit.org/show_bug.cgi?id=202077
<rdar://problem/55547063>
Reviewed by Sam Weinig.
- Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginArchitecture): Removed support for i386 plug-ins.
- UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName): Assert that the requested process type is not Plugin32.
- UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): Assert that the
plug-in architecture is x86_64.
- 1:20 PM Changeset in webkit [250185] by
-
- 2 edits in trunk/JSTests
stress/test-out-of-memory.js is not throwing OOM into ARMv7 and MIPS
https://bugs.webkit.org/show_bug.cgi?id=202011
Reviewed by Mark Lam.
We are skipping this test into MIPS and ARMv7 because some of its assumptions
are not valid for them. The current behavior of the test in those architectures
is that it does not throw duringnew ArrayBuffer(1000)allocation site,
because eden collection keeps happening between iterations. The collection
is triggered on those architectures because the amount of stress
new Promisegenerates into GC limits is not enough to avoid them
while loop is executing.
Changing the size of
UInt8Arrayfrom80000000to160000000can
be an alternative fix to avoid collection happening duringArrayBuffer
allocation loop, but we can't guarantee this test is always going to execute
without error when Gigacage is disabled, given we can reach an OOM state in
some allocations that need to succeed, making this test flaky for those
architectures.
- stress/test-out-of-memory.js:
- 11:30 AM Changeset in webkit [250184] by
-
- 14 edits1 add in trunk
AccessCase should strongly visit its dependencies while on stack
https://bugs.webkit.org/show_bug.cgi?id=201986
<rdar://problem/55521953>
Reviewed by Saam Barati and Yusuke Suzuki.
JSTests:
- stress/ftl-put-by-id-setter-exception-interesting-live-state-2.js: Added.
(foo):
(warmup):
Source/JavaScriptCore:
AccessCase::doesCalls is responsible for specifying the cells it depends on, so that
MarkingGCAwareJITStubRoutine can strongly visit them while the stub is on stack. However,
it was missing most of its dependencies, which led to it being collected while on stack.
This manifested in the flaky test stress/ftl-put-by-id-setter-exception-interesting-live-state.js
as the PolymorphicAccess being collected and removing its exception handler from the code
block, which led to exception propagating past the try/catch.
In order to fix this, we abstract the dependency gathering logic from AccessCase into
forEachDependentCell and use it to implement visitWeak as well as doesCalls in order to
guarantee that their implementation is consistent.
- bytecode/AccessCase.cpp:
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::doesCalls const):
(JSC::AccessCase::visitWeak const):
- bytecode/AccessCase.h:
- bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::lastSeenCallee const):
(JSC::CallLinkInfo::haveLastSeenCallee const):
(JSC::CallLinkInfo::lastSeenCallee): Deleted.
(JSC::CallLinkInfo::haveLastSeenCallee): Deleted.
- bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::isDirect const):
(JSC::CallLinkInfo::isLinked const):
(JSC::CallLinkInfo::stub const):
(JSC::CallLinkInfo::forEachDependentCell const):
(JSC::CallLinkInfo::isLinked): Deleted.
(JSC::CallLinkInfo::stub): Deleted.
- bytecode/ObjectPropertyCondition.cpp:
(JSC::ObjectPropertyCondition::isStillLive const):
- bytecode/ObjectPropertyCondition.h:
(JSC::ObjectPropertyCondition::forEachDependentCell const):
- bytecode/ObjectPropertyConditionSet.cpp:
(JSC::ObjectPropertyConditionSet::areStillLive const):
- bytecode/ObjectPropertyConditionSet.h:
(JSC::ObjectPropertyConditionSet::forEachDependentCell const):
- bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isStillLive const):
- bytecode/PropertyCondition.h:
(JSC::PropertyCondition::forEachDependentCell const):
- jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::visitWeak):
- jit/PolymorphicCallStubRoutine.h:
(JSC::PolymorphicCallStubRoutine::forEachDependentCell):
- 9:08 AM Changeset in webkit [250183] by
-
- 4 edits4 adds in trunk
[Pointer Events] touch-action set to pan-x or pan-y alone should disable scrolling altogether if the intial gesture is in the disallowed direction
https://bugs.webkit.org/show_bug.cgi?id=202053
<rdar://problem/54542190>
Reviewed by Tim Horton.
Source/WebKit:
Although the Pointer Events specification does not specify this clearly (see https://github.com/w3c/pointerevents/issues/303), setting "touch-action" to a value
that only allows scrolling a specific direction ("pan-x" or "pan-y") should disable scrolling in the specified direction if the panning gesture initially is directed
in the opposite direction. In practice, this means that setting "touch-action: pan-y" on an element should disable scrolling if the user initially pans horizontally,
even if later on in the gesture the user pans vertically. This allows for sites that want to offer a programmatic horizontal scroller to disable vertical scrolling
if the user pans horizontally.
In order to support this, we add four UISwipeGestureRecognizers, one for each direction, and we selectively allows touches to be recognizer for them based on the
"touch-action" value specified at the initial touch location for a given gesture. In the case of "touch-action: pan-y" we only allow the left and right swipe recognizers
to be enabled, and in the case of "touch-action: pan-x" we only allow the up and down swipe recognizers to be enabled. If any of those gesture recognizers is recognized,
scrolling will be disabled for the duration of this gesture. If a UIScrollView panning gesture recognizer is recognized prior to a swipe, they won't have a chance to be
recognized.
- UIProcess/ios/WKContentViewInteraction.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
LayoutTests:
Add new tests checking that setting "touch-action: pan-y" on an element and initiating a horizontal panning gesture will disallow scrolling vertically
if a vertical scrolling gesture follows. We test both the case where scrolling would apply to the whole page and the case where scrolling would apply
to an "overflow: scroll" element.
- pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added.
- pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling.html: Added.
- pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added.
- pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling.html: Added.
- 8:34 AM Changeset in webkit [250182] by
-
- 5 edits4 adds in trunk
releasePointerCapture() not working for implicit capture; can't opt-in to pointerenter/leave for touches
https://bugs.webkit.org/show_bug.cgi?id=199803
<rdar://problem/53127223>
Reviewed by Dean Jackson.
Source/WebCore:
In order to dispatch boundary events (pointerover/out/enter/leave) when the implicit pointer capture is released on iOS,
we need to track the target of the pointer events that was dispatched last for a given pointer id. Then we compare that
target with the current target when dispatching a new pointer event and determine whether we should dispatch boundary
events using the exact same approach used to dispatch mouse boundary events in EventHandler::updateMouseEventTargetNode().
Tests: pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html
pointerevents/ios/boundary-events-without-pointer-capture.html
- page/PointerCaptureController.cpp:
(WebCore::hierarchyHasCapturingEventListeners):
(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
(WebCore::PointerCaptureController::pointerEventWillBeDispatched):
(WebCore::PointerCaptureController::ensureCapturingDataForPointerEvent):
(WebCore::PointerCaptureController::cancelPointer):
- page/PointerCaptureController.h:
LayoutTests:
Add new tests that check we correctly dispatch boundary events on iOS when pointer capture is disabled.
- pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture-expected.txt: Added.
- pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html: Added.
- pointerevents/ios/boundary-events-without-pointer-capture-expected.txt: Added.
- pointerevents/ios/boundary-events-without-pointer-capture.html: Added.
- pointerevents/utils.js:
- 6:51 AM Changeset in webkit [250181] by
-
- 3 edits in trunk/Source/WebCore
[LFC] LayoutContext::m_formattingContextRootListForLayout should be a WeakHashSet
https://bugs.webkit.org/show_bug.cgi?id=202068
<rdar://problem/55579352>
Reviewed by Alex Christensen.
- layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layout):
(WebCore::Layout::LayoutContext::styleChanged):
(WebCore::Layout::LayoutContext::markNeedsUpdate):
- layout/LayoutContext.h:
- page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):
- 4:39 AM Changeset in webkit [250180] by
-
- 12 edits in trunk/Source
clang-tidy: Fix unnecessary copy/ref churn of for loop variables in WTF/JavaScriptCore
<https://webkit.org/b/202069>
Reviewed by Mark Lam.
Fix unwanted copying/ref churn of loop variables by making them
const references.
Source/JavaScriptCore:
- bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setConstantIdentifierSetRegisters):
- bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration):
- dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
- inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::activateExtraDomains):
- inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::stopInternal):
(Inspector::RemoteInspector::xpcConnectionFailed):
(Inspector::RemoteInspector::pushListingsNow):
- parser/Parser.h:
(JSC::Scope::computeLexicallyCapturedVariablesAndPurgeCandidates):
- runtime/ProxyObject.cpp:
(JSC::ProxyObject::performGetOwnPropertyNames):
- runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::registerForReportAtExit):
(JSC::SamplingProfiler::reportTopFunctions):
(JSC::SamplingProfiler::reportTopBytecodes):
- runtime/TypeSet.cpp:
(JSC::StructureShape::inspectorRepresentation):
(JSC::StructureShape::merge):
Source/WTF:
- wtf/AggregateLogger.h:
(WTF::AggregateLogger::log const):