Timeline
Jan 27, 2019:
- 7:03 PM Changeset in webkit [240558] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, fix WPE/GTK debug builds after r240557
https://bugs.webkit.org/show_bug.cgi?id=192742
<rdar://problem/46757369>
Also fix an improper format string that was recently added in a different commit.
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
- 5:56 PM Changeset in webkit [240557] by
-
- 115 edits in trunk
Replace many uses of String::format with more type-safe alternatives
https://bugs.webkit.org/show_bug.cgi?id=192742
Reviewed by Mark Lam.
Source/JavaScriptCore:
- inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeCall): Use makeString.
(Inspector::InjectedScriptBase::makeAsyncCall): Ditto.
- inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::getPropertyValue): Ditto.
- inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::enable): Ditto.
- jsc.cpp:
(FunctionJSCStackFunctor::operator() const): Ditto.
- runtime/CodeCache.cpp:
(JSC::writeCodeBlock): Use makeString's numeric capabilities instead of
using String::number.
- runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::initializeDateTimeFormat): Use string concatenation.
- runtime/IntlObject.cpp:
(JSC::canonicalizeLocaleList): Ditto.
Source/WebCore:
A while back, String::format was more efficient than string concatenation,
but that is no longer true, and we should prefer String::number, makeString,
or concatenation with the "+" operator to String::format for new code.
This is not as good for programmers who are fond of printf formatting
style, and in some cases it's a little harder to read the strings
interspersed with variables rather than a format string, but it's better
in a few ways:
- more efficient (I didn't measure the difference, but it's definitely slower to use String::Format which calls vsnprintf twice than to use the WTF code)
- works in a type-safe way without a need to use a format specifier such as "%" PRIu64 or "%tu" making it much easier to avoid problems due to subtle differences between platforms
- allows us to use StringView in some cases to sidestep the need to allocate temporary WTF::String objects
- does not require converting each WTF::String to a C string, allowing us to remove many cases of ".utf8().data()" and similar expressions, eliminating the allocation of temporary WTF::CString objects
This patch covers a batch of easiest-to-convert call sites.
Later patches will allow us to deprecate or remove String::format.
- Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Use makeString.
- Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString const): Ditto.
- Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
(WebCore::IDBGetAllRecordsData::loggingString const): Ditto.
- Modules/indexeddb/shared/IDBGetRecordData.cpp:
(WebCore::IDBGetRecordData::loggingString const): Ditto.
- Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::loggingString const): Ditto.
(WebCore::IDBIndexInfo::condensedLoggingString const): Ditto.
- Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString const): Ditto.
- Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::condensedLoggingString const): Ditto.
- Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::loggingString const): Ditto.
- Modules/webdatabase/Database.cpp:
(WebCore::formatErrorMessage): Ditto.
- Modules/webdatabase/SQLError.h:
(WebCore::SQLError::create): Ditto.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Use makeString.
- bindings/scripts/test/JS/JSInterfaceName.cpp:
- bindings/scripts/test/JS/JSMapLike.cpp:
- bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
- bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
- bindings/scripts/test/JS/JSTestCEReactions.cpp:
- bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
- bindings/scripts/test/JS/JSTestCallTracer.cpp:
- bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
- bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
- bindings/scripts/test/JS/JSTestDOMJIT.cpp:
- bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
- bindings/scripts/test/JS/JSTestEventConstructor.cpp:
- bindings/scripts/test/JS/JSTestEventTarget.cpp:
- bindings/scripts/test/JS/JSTestException.cpp:
- bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
- bindings/scripts/test/JS/JSTestGlobalObject.cpp:
- bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
- bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
- bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
- bindings/scripts/test/JS/JSTestInterface.cpp:
- bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
- bindings/scripts/test/JS/JSTestIterable.cpp:
- bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
- bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
- bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
- bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
- bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
- bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
- bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
- bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
- bindings/scripts/test/JS/JSTestNode.cpp:
- bindings/scripts/test/JS/JSTestObj.cpp:
- bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
- bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
- bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
- bindings/scripts/test/JS/JSTestPluginInterface.cpp:
- bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
- bindings/scripts/test/JS/JSTestSerialization.cpp:
- bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
- bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
- bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
- bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
- bindings/scripts/test/JS/JSTestStringifier.cpp:
- bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
- bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
- bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
- bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
- bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
- bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
- bindings/scripts/test/JS/JSTestTypedefs.cpp:
Updated expected results.
Source/WebKit:
- Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::writeHeaders): Use makeString.
- UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
- UIProcess/WebInspectorUtilities.cpp:
(WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
(WebKit::WebProcessPool::startMemorySampler): Ditto.
Source/WebKitLegacy:
- Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::writeHeaders): Use makeString.
- UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::makeCredential): Use string concatentation.
- UIProcess/WebInspectorUtilities.cpp:
(WebKit::inspectorPageGroupIdentifierForPage): Use makeString.
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching): Ditto.
(WebKit::WebProcessPool::startMemorySampler): Ditto.
Source/WTF:
- wtf/WorkQueue.cpp:
(WTF::WorkQueue::concurrentApply): Use makeString.
- wtf/dtoa.cpp:
(WTF::dtoa): Use sprintf instead of String::format in the comments,
since these functions have nothing to do with WTF::String.
Tools:
- WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::cacheTestRunnerCallback): Use makeString.
- WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveAuthenticationChallenge): Use makeString.
(WTR::TestController::downloadDidFail): Use an ASCIILiteral via the _s syntax.
- 3:51 PM Changeset in webkit [240556] by
-
- 2 edits in trunk/Source/WebCore
Remove a couple of PLATFORM defines intended for watchOS
https://bugs.webkit.org/show_bug.cgi?id=193888
Reviewed by Alexey Proskuryakov.
Remove the use of !PLATFORM(WATCH), since this is true on every platform.
- editing/cocoa/DictionaryLookup.mm:
- 12:44 PM Changeset in webkit [240555] by
-
- 11 edits3 copies in trunk
Use a load optimizer for some sites
https://bugs.webkit.org/show_bug.cgi?id=193881
<rdar://problem/46325455>
Reviewed by Brent Fulgham.
Source/WebCore:
Expose FormData::flatten to be used by the load optimizer.
- WebCore.xcodeproj/project.pbxproj:
- platform/network/FormData.h:
Source/WebKit:
We will try to speed up some sites with a dedicated load optimizer. The load optimizer lives
within the WebsiteDataStore as one client instance should have only one and it should live
as long as the client lives. How does the load optimizer work? It intercepts every load in
the navigation state. If a request meets some requirements, it will then fetch the request
from its own cache. Once the fetch succeeds, the original load will be ignored and the
optimizer will display the cached content.
Covered by API tests.
- SourcesCocoa.txt:
- UIProcess/Cocoa/LoadOptimizer.h: Added.
- UIProcess/Cocoa/LoadOptimizer.mm: Added.
- UIProcess/Cocoa/MediaCaptureUtilities.h:
- UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryInterceptNavigation):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::tryAppLink): Deleted.
- UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
- UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::loadOptimizer):
- WebKit.xcodeproj/project.pbxproj:
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm: Added.
- 10:36 AM Changeset in webkit [240554] by
-
- 10 edits2 adds in trunk/Source/WebKit
Web Automation: add support for simulating single touches to Automation.performInteractionSequence
https://bugs.webkit.org/show_bug.cgi?id=193852
<rdar://problem/28360781>
Reviewed by Joseph Pecoraro and Simon Fraser.
This patch makes it possible to simulate touches via the Actions API. The approach is to
use a stripped down version of HIDEventGenerator to send HID events to the UIWindow.
The initial version supports a single touch point; this may be expanded if needed, but
so far it hasn't been an impediment when running desktop-oriented WebDriver test suites.
As part of implementing this support, I went through and added [somewhat obnoxious] ENABLE()
guards so that we don't mistakenly compile mouse support on iOS and touch on Mac,
and vice versa. Each of the interaction methods---touch, mouse, keyboard---can be independently
compiled out. If none is supported (i.e., Windows), then we don't even try to compile
platformSimulate*Interaction methods or SimulatedInputDispatcher. This allows WebAutomationSession
to not include members and code that are never going to be used on a particular platform.
This functionality is covered by existing WebDriver test suites that use Element Click command.
Additional tests that explicitly include 'touch' pointerType will be submitted to WPT later.
- UIProcess/Automation/Automation.json: Update comment.
- UIProcess/Automation/SimulatedInputDispatcher.h:
- UIProcess/Automation/SimulatedInputDispatcher.cpp:
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
- Add appropriate guards for code specific to each interaction type.
- Handle SimulatedInputSourceType::Touch and call out to dispatch events.
- UIProcess/Automation/WebAutomationSession.h:
- UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::WebAutomationSession):
(WebKit::WebAutomationSession::terminate):
(WebKit::WebAutomationSession::willShowJavaScriptDialog):
(WebKit::WebAutomationSession::mouseEventsFlushedForPage):
(WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
(WebKit::WebAutomationSession::willClosePage):
Add appropriate guards for code specific to each interaction type.
(WebKit::WebAutomationSession::isSimulatingUserInteraction const):
Add new hook so that we can detect when a touch simulation is in progress.
We don't rely on checking WebKit's event queue, so use a flag.
(WebKit::WebAutomationSession::simulateTouchInteraction):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
(WebKit::WebAutomationSession::cancelInteractionSequence):
(WebKit::WebAutomationSession::performInteractionSequence):
- Add appropriate guards for code specific to each interaction type.
- Bail out immediately if a requested interaction type is not supported.
- Shim Touch input type to Mouse if mouse is not supported but touches are.
Nearly all WebDriver tests in the wild will be requesting a 'mouse' pointerType,
so this is necessary for compatibility. It's easier to shim at this level than try
to implement platformSimulateMouseInteraction for iOS because
platformSimulateMouseinteraction does not use a completion handler but the iOS
implementation would require that.
(WebKit::WebAutomationSession::platformSimulateMouseInteraction): Deleted.
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Deleted.
- Remove these stubs. Platform methods of this class are no longer being filled
with stubs on unsupported platforms because we expect the command to fail earlier.
- UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
(WebKit::WebAutomationSession::platformSimulateTouchInteraction):
- Add appropriate guards for code specific to each interaction type.
- Implement new platform method to simulate touches. This uses _WKTouchEventGenerator.
- UIProcess/Automation/mac/WebAutomationSessionMac.mm:
Add appropriate guards for code specific to each interaction type.
- UIProcess/_WKTouchEventGenerator.h: Added.
- UIProcess/_WKTouchEventGenerator.mm: Added.
(simpleCurveInterpolation):
(calculateNextCurveLocation):
(delayBetweenMove):
(+[_WKTouchEventGenerator sharedTouchEventGenerator]):
(+[_WKTouchEventGenerator nextEventCallbackID]):
(-[_WKTouchEventGenerator init]):
(-[_WKTouchEventGenerator dealloc]):
(-[_WKTouchEventGenerator _createIOHIDEventType:]):
(-[_WKTouchEventGenerator _sendHIDEvent:]):
(-[_WKTouchEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
(-[_WKTouchEventGenerator _updateTouchPoints:count:]):
(-[_WKTouchEventGenerator touchDownAtPoints:touchCount:]):
(-[_WKTouchEventGenerator touchDown:touchCount:]):
(-[_WKTouchEventGenerator touchDown:]):
(-[_WKTouchEventGenerator liftUpAtPoints:touchCount:]):
(-[_WKTouchEventGenerator liftUp:touchCount:]):
(-[_WKTouchEventGenerator liftUp:]):
(-[_WKTouchEventGenerator moveToPoints:touchCount:duration:]):
(-[_WKTouchEventGenerator touchDown:completionBlock:]):
(-[_WKTouchEventGenerator liftUp:completionBlock:]):
(-[_WKTouchEventGenerator moveToPoint:duration:completionBlock:]):
(-[_WKTouchEventGenerator receivedHIDEvent:]):
Copied and simplified from HIDEventGenerator in WebKitTestRunner.
- WebKit.xcodeproj/project.pbxproj:
Add _WKTouchEventGenerator.{h,mm} and make it a private header. The client needs to
route received HID events to -receivedHIDEvent: in order to detect when the marker
HID event has been processed (and thus the interaction is completed).
- config.h: Add ENABLE(WEBDRIVER_*_INTERACTIONS) macros here.
- 8:58 AM Changeset in webkit [240553] by
-
- 26 edits in trunk
Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node
https://bugs.webkit.org/show_bug.cgi?id=193879
Reviewed by Antti Koivisto.
Source/WebCore:
Currently we parent iframe scrolling tree nodes by finding the closest ancestor layer with a scrolling tree node.
This results in scrolling tree nodes being connected across iframe boundaries in some arbitrary ancestor. This
makes updating scrolling tree geometry very error-prone, since changes in the parent document will need to trigger
updates of the scrolling tree node in an iframe.
To address this, I already added a new "FrameHosting" scrolling node type. This patch actually instantiates these
nodes, which are owned by the RenderIFrame's composited layer. Connecting across frame boundaries is theforefore
simply a case of getting the FrameHosting node from the ownerElement's renderer; this is very similar to how we
connect GraphicsLayers together.
RenderLayerBacking gains another scrolling role for FrameHosting and ScrollingNodeID.
Tested by existing tests.
- page/FrameView.h:
- rendering/RenderLayer.cpp:
(WebCore::outputPaintOrderTreeRecursive):
- rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
- rendering/RenderLayerCompositor.cpp:
(WebCore::frameContentsRenderView):
(WebCore::RenderLayerCompositor::frameContentsCompositor):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::isLayerForIFrameWithScrollCoordinatedContents const):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
(WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
(WebCore::scrollCoordinatedAncestorInParentOfFrame):
(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
(WebCore::RenderLayerCompositor::attachScrollingNode):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
- rendering/RenderLayerCompositor.h:
- testing/Internals.cpp:
(WebCore::Internals::scrollingStateTreeAsText const):
Source/WebKit:
Need a specialization of dump() for ScrollingStateFrameHostingNode to avoid infinite recursion.
- Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::dump):
LayoutTests:
New test results with FrameHosting nodes.
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt:
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt:
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt:
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt:
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt:
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt:
- scrollingcoordinator/scrolling-tree/coordinated-frame-expected.txt:
- scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor-expected.txt:
- scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed-expected.txt:
- scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor-expected.txt:
- scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
- scrollingcoordinator/scrolling-tree/scrolling-tree-includes-frame-expected.txt:
- scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt:
- 12:49 AM Changeset in webkit [240552] by
-
- 27 edits6 adds in trunk
Source/JavaScriptCore:
AX: Introduce a static accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=193348
<rdar://problem/47203295>
Reviewed by Ryosuke Niwa.
- Configurations/FeatureDefines.xcconfig:
Source/WebCore:
AX: Introduce a static accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=193348
<rdar://problem/47203295>
Reviewed by Ryosuke Niwa.
In order to improve performance when requesting the accessibility hierarchy, we introduce the idea of a "static accessibility tree" which
could be accessed on a different thread by assistive technologies.
That is accomplished by storing all the data needed to answer accessibility attribute queries in a static object that mirrors the
"live" AccessibilityObjects (which interact with both DOM and Render trees).
These static objects are generally created after layout is done and final tasks are being performed. They are then stored in the static tree
representation and able to be read from anywhere.
Tactically this is done with AXIsolatedTreeNodes inside of an AXIsolatedTree. The TreeNodes implement an AccessibilityObjectInterface shared
with AccessibilityObject.
This allows the wrappers to access either one depending on conditions and platforms without significant code duplication or re-organization.
- CMakeLists.txt:
- Configurations/FeatureDefines.xcconfig:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::createIsolatedAccessibilityTree):
(WebCore::AXObjectCache::generateStaticAccessibilityTreeIfNeeded):
- accessibility/AXObjectCache.h:
- accessibility/AccessibilityObject.h:
- accessibility/AccessibilityObjectInterface.h: Added.
- accessibility/isolatedtree: Added.
- accessibility/isolatedtree/AXIsolatedTree.cpp: Added.
(WebCore::AXIsolatedTree::treeCache):
(WebCore::AXIsolatedTree::AXIsolatedTree):
(WebCore::AXIsolatedTree::create):
(WebCore::AXIsolatedTree::treeForID):
(WebCore::AXIsolatedTree::treeForPageID):
(WebCore::AXIsolatedTree::nodeForID const):
(WebCore::AXIsolatedTree::rootNode):
(WebCore::AXIsolatedTree::removeNode):
(WebCore::AXIsolatedTree::appendNodeChanges):
(WebCore::AXIsolatedTree::applyPendingChanges):
- accessibility/isolatedtree/AXIsolatedTree.h: Added.
(WebCore::AXIsolatedTree::treeIdentifier const):
- accessibility/isolatedtree/AXIsolatedTreeNode.cpp: Added.
To note: we don't mark the attribute map const because even though attributes don't change after initial creation,
we may copy an existing node and replace specific values.
(WebCore::AXIsolatedTreeNode::AXIsolatedTreeNode):
(WebCore::AXIsolatedTreeNode::create):
(WebCore::AXIsolatedTreeNode::initializeAttributeData):
(WebCore::AXIsolatedTreeNode::setProperty):
(WebCore::AXIsolatedTreeNode::doubleAttributeValue const):
(WebCore::AXIsolatedTreeNode::unsignedAttributeValue const):
(WebCore::AXIsolatedTreeNode::boolAttributeValue const):
(WebCore::AXIsolatedTreeNode::stringAttributeValue const):
(WebCore::AXIsolatedTreeNode::intAttributeValue const):
- accessibility/isolatedtree/AXIsolatedTreeNode.h: Added.
- accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::associateIsolatedTreeNode):
- accessibility/mac/WebAccessibilityObjectWrapperBase.h:
- accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
(-[WebAccessibilityObjectWrapperBase isolatedTreeNode]):
(-[WebAccessibilityObjectWrapperBase detach]):
(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
(-[WebAccessibilityObjectWrapperBase axBackingObject]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilityDescription]):
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper role]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
- dom/Document.cpp:
(WebCore::Document::pageID const):
- dom/Document.h:
Source/WebCore/PAL:
AX: Introduce isolated accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=193348
<rdar://problem/47203295>
Reviewed by Ryosuke Niwa.
- Configurations/FeatureDefines.xcconfig:
Source/WebKit:
AX: Introduce a static accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=193348
<rdar://problem/47203295>
Reviewed by Ryosuke Niwa.
- Configurations/FeatureDefines.xcconfig:
- WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
Source/WebKitLegacy/mac:
AX: Introduce a static accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=193348
<rdar://problem/47203295>
Reviewed by Ryosuke Niwa.
- Configurations/FeatureDefines.xcconfig:
Tools:
AX: Introduce a static accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=193348
<rdar://problem/47203295>
Reviewed by Ryosuke Niwa.
- TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Jan 26, 2019:
- 6:10 PM Changeset in webkit [240551] by
-
- 13 edits in trunk/Source
Allow scrolling tree nodes to exist in a detached state
https://bugs.webkit.org/show_bug.cgi?id=193754
Reviewed by Zalan Bujtas.
Source/WebCore:
One of the (questionable?) design decisions of the scrolling tree is that the tree implementation
is hidden behind the ScrollingCoordinator interface. That interface only allowed nodes to exist
in a connected state; attachToStateTree() required a non-zero parent for any node that was not
the root.
This makes it impossible to coordinate the hookup of the scrolling tree across frame boundaries;
the scrolling tree has to have been fully constructed in ancestor frames before subframe nodes
can be attached. This is a significant difference from compositing, where a subframe can create
GraphicsLayers which don't have to be parented right away, and actually get parented later via
a compositing update in the parent frame.
We want to be able to hook up the scrolling tree via the same code paths as GraphicsLayer
connection (anything else is too confusing). So we need to be able to instantiate scrolling
tree nodes in a disconnected state, and attach them later.
To achieve this, add the notion of "unparented" nodes to ScrollingCoordinator and the ScrollingStateTree.
Allow clients to create unparented nodes, which can be attached later. ScrollingCoordinator stores
the roots of unparented subtrees in an owning HashMap. Nodes in unparented trees are still referenced
by m_stateNodeMap, so it's possible to find them and set state on them.
Clean up the ScrollingCoordinator interface to remove "state tree" terminology; the state vs. scrolling tree
is really an implementation detail.
This also removes the special-casing of ScrollingNodeType::Subframe nodes which ScrollingStateTree stored
in m_orphanedSubframeNodes; now the unparenting is controlled by the client.
Currently no code creates unparented nodes so there is no behavior change.
- dom/Document.cpp:
(WebCore::Document::setPageCacheState):
- page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::createNode):
(WebCore::AsyncScrollingCoordinator::insertNode):
(WebCore::AsyncScrollingCoordinator::unparentNode):
(WebCore::AsyncScrollingCoordinator::unparentChildrenAndDestroyNode):
(WebCore::AsyncScrollingCoordinator::detachAndDestroySubtree):
(WebCore::AsyncScrollingCoordinator::clearAllNodes):
(WebCore::AsyncScrollingCoordinator::parentOfNode const):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::AsyncScrollingCoordinator::attachToStateTree): Deleted.
(WebCore::AsyncScrollingCoordinator::detachFromStateTree): Deleted.
(WebCore::AsyncScrollingCoordinator::clearStateTree): Deleted.
- page/scrolling/AsyncScrollingCoordinator.h:
- page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::handleWheelEvent):
(WebCore::ScrollingCoordinator::createNode):
(WebCore::ScrollingCoordinator::insertNode):
(WebCore::ScrollingCoordinator::unparentNode):
(WebCore::ScrollingCoordinator::unparentChildrenAndDestroyNode):
(WebCore::ScrollingCoordinator::detachAndDestroySubtree):
(WebCore::ScrollingCoordinator::clearAllNodes):
(WebCore::ScrollingCoordinator::parentOfNode const):
(WebCore::ScrollingCoordinator::childrenOfNode const):
(WebCore::ScrollingCoordinator::attachToStateTree): Deleted.
(WebCore::ScrollingCoordinator::detachFromStateTree): Deleted.
(WebCore::ScrollingCoordinator::clearStateTree): Deleted.
- page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::removeFromParent):
(WebCore::ScrollingStateNode::removeChild):
- page/scrolling/ScrollingStateNode.h:
- page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::ScrollingStateTree):
(WebCore::ScrollingStateTree::createUnparentedNode):
(WebCore::ScrollingStateTree::insertNode):
(WebCore::ScrollingStateTree::unparentNode):
(WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode):
(WebCore::ScrollingStateTree::detachAndDestroySubtree):
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::commit):
(WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
(WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
(showScrollingStateTree):
(WebCore::ScrollingStateTree::attachNode): Deleted.
(WebCore::ScrollingStateTree::detachNode): Deleted.
- page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::nodeCount const):
- rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
(WebCore::RenderLayerCompositor::attachScrollingNode):
Source/WebKit:
- Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
- 3:54 PM Changeset in webkit [240550] by
-
- 5 edits in trunk
Web Inspector: handle CSS Color 4 color syntaxes
https://bugs.webkit.org/show_bug.cgi?id=193166
<rdar://problem/47062403>
Reviewed by Simon Fraser.
Source/WebInspectorUI:
- UserInterface/Models/Color.js:
(WI.Color.fromString):
(WI.Color.fromString.splitFunctionString): Added.
(WI.Color.fromString.parseFunctionAlpha): Added.
(WI.Color.fromString.parseFunctionComponent): Added.
(WI.Color.fromString.parseHueComponent): Added.
(WI.Color.fromString.parsePercentageComponent): Added.
LayoutTests:
- inspector/model/color.html:
- inspector/model/color-expected.txt:
- 2:32 PM Changeset in webkit [240549] by
-
- 13 edits2 adds in trunk
Web Inspector: provide a way to edit the user agent of a remote target
https://bugs.webkit.org/show_bug.cgi?id=193862
<rdar://problem/47359292>
Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:
- inspector/protocol/Page.json:
Add
overrideUserAgentcommand.
Source/WebCore:
Test: inspector/page/overrideUserAgent.html
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::userAgent const):
(WebCore::FrameLoader::userAgentForJavaScript const):
- inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::applyUserAgentOverride): Added.
- inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl): Added.
- inspector/agents/InspectorPageAgent.h:
- inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideUserAgent): Added.
(WebCore::InspectorPageAgent::applyUserAgentOverride): Added.
Source/WebInspectorUI:
- UserInterface/Base/Main.js:
(WI.loaded):
(WI.contentLoaded):
(WI.initializeTarget):
(WI._handleDeviceSettingsToolbarButtonClicked):
(WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
(WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
(WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
(WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
(WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
(WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
(WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
- UserInterface/Views/Main.css:
(.device-settings-content):
(.device-settings-content .user-agent-value): Added.
(.device-settings-content .user-agent-value > select): Added.
(.device-settings-content .user-agent-value > input): Added.
(body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
(body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
(.device-settings-content label > input): Added.
(body[dir=ltr] .device-settings-content label > input): Deleted.
(body[dir=rtl] .device-settings-content label > input): Deleted.
- Localizations/en.lproj/localizedStrings.js:
LayoutTests:
- inspector/page/overrideUserAgent.html: Added.
- inspector/page/overrideUserAgent-expected.txt: Added.
- 12:00 PM Changeset in webkit [240548] by
-
- 1 edit1 copy3 moves in trunk/LayoutTests
Move scrolling-tree/fixed-inside-frame.html into scrolling tree tests
https://bugs.webkit.org/show_bug.cgi?id=193871
Reviewed by Zalan Bujtas.
Move another test into scrollingcoordinator/scrolling-tree, and now that it runs on iOS,
add iOS results.
- platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt.
- scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt.
- scrollingcoordinator/scrolling-tree/fixed-inside-frame.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/fixed-inside-frame.html.
- scrollingcoordinator/scrolling-tree/resources/autoscrolling-frame-with-fixed.html: Renamed from LayoutTests/tiled-drawing/scrolling/frames/resources/autoscrolling-frame-with-fixed.html.
- 11:24 AM Changeset in webkit [240547] by
-
- 5 edits2 adds in trunk
Source/WebCore:
[LFC] The initial values for top/bottom in contentHeightForFormattingContextRoot should not be 0.
https://bugs.webkit.org/show_bug.cgi?id=193867
Reviewed by Antti Koivisto.
The initial content top/bottom value is the border top + padding top.
This is only a problem when the box has float children only. While computing the height using the bottom-most float,
we call "top = std::min(floatTop, top)". With 0 initial top value, this returns an incorrect result when the box
has (top)border/padding.
Test: fast/block/block-only/abs-pos-with-border-padding-and-float-child.html
- layout/FormattingContextGeometry.cpp:
(WebCore::Layout::contentHeightForFormattingContextRoot):
Tools:
[LFC] The default values for top/bottom in contentHeightForFormattingContextRoot should not be 0.
https://bugs.webkit.org/show_bug.cgi?id=193867
Reviewed by Antti Koivisto.
- LayoutReloaded/misc/LFC-passing-tests.txt:
LayoutTests:
[LFC] The default values for top/bottom in contentHeightForFormattingContextRoot should not be 0.
https://bugs.webkit.org/show_bug.cgi?id=193867
Reviewed by Antti Koivisto.
- fast/block/block-only/abs-pos-with-border-padding-and-float-child-expected.html: Added.
- fast/block/block-only/abs-pos-with-border-padding-and-float-child.html: Added.
- 10:14 AM Scrolling created by
- 10:08 AM WikiStart edited by
- (diff)
- 7:01 AM Changeset in webkit [240546] by
-
- 7 edits2 adds in trunk
[LFC][BFC] Ignore last inflow child's collapsed through margin after when computing containing block's height.
https://bugs.webkit.org/show_bug.cgi?id=193865
Reviewed by Antti Koivisto.
Source/WebCore:
Height computation ->
10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
...the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom
margin does not collapse with the element's bottom margin
<div style="border: 1px solid green">
<div style="margin-top: 100px;"></div>
</div>
When the child vertical margins collapse through (margin-top = margin-bottom = 100px), the bottom edge of the bottom margin is
the same as the bottom edge of the top margin which is alredy taken into use while positioning so technically the bottom margin value should be ignored.
Test: fast/block/margin-collapse/collapsed-through-child-simple.html
- layout/MarginTypes.h:
(WebCore::Layout::UsedVerticalMargin::isCollapsedThrough const):
- layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
- layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::hasCollapsedThroughMargin const):
Tools:
- LayoutReloaded/misc/LFC-passing-tests.txt:
LayoutTests:
- fast/block/margin-collapse/collapsed-through-child-simple-expected.html: Added.
- fast/block/margin-collapse/collapsed-through-child-simple.html: Added.
- 5:13 AM Changeset in webkit [240545] by
-
- 2 edits in trunk/Source/WebCore
[LFC][BFC][MarginCollapsing] marginAfterCollapsesWithParentMarginAfter/marginAfterCollapsesWithLastInFlowChildMarginAfter should check for border/padding after values.
https://bugs.webkit.org/show_bug.cgi?id=193864
Reviewed by Antti Koivisto.
- layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):
- 4:44 AM Changeset in webkit [240544] by
-
- 2 edits in trunk/Source/WebCore
[LFC] Box::nextInFlowOrFloatingSibling() should always return sibling floats as well.
https://bugs.webkit.org/show_bug.cgi?id=193855
Reviewed by Antti Koivisto.
Use iterative algorithm to find next/previous siblings.
- layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::nextInFlowOrFloatingSibling const):
- 1:07 AM Changeset in webkit [240543] by
-
- 21 edits2 adds in trunk
[JSC] NativeErrorConstructor should not have own IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=193713
Reviewed by Saam Barati.
JSTests:
Remove @Error use.
- stress/try-get-by-id-should-spill-registers-dfg.js:
(let.f.createBuiltin):
Source/JavaScriptCore:
This removes an additional member in NativeErrorConstructor, and make sizeof(NativeErrorConstructor) == sizeof(InternalFunction).
We also make error constructors lazily allocated by using LazyClassStructure. Since error structures are not accessed from DFG / FTL
threads, this is OK. While TypeError constructor is eagerly allocated because it is touched from our builtin JS as @TypeError, we should
offer some function instead of exposing TypeError constructor in the future, and remove this @TypeError reference. This change removes
IsoSubspace for NativeErrorConstructor in VM. We also remove @Error and @RangeError references for builtins since they are no longer
referenced.
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- Sources.txt:
- builtins/BuiltinNames.h:
- interpreter/Interpreter.h:
- runtime/Error.cpp:
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(WTF::printInternal): Deleted.
- runtime/Error.h:
- runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::create):
(JSC::ErrorPrototype::finishCreation):
- runtime/ErrorPrototype.h:
(JSC::ErrorPrototype::create): Deleted.
- runtime/ErrorType.cpp: Added.
(JSC::errorTypeName):
(WTF::printInternal):
- runtime/ErrorType.h: Added.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::initializeErrorConstructor):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
- runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::internalPromiseConstructor const):
(JSC::JSGlobalObject::errorStructure const):
(JSC::JSGlobalObject::evalErrorConstructor const): Deleted.
(JSC::JSGlobalObject::rangeErrorConstructor const): Deleted.
(JSC::JSGlobalObject::referenceErrorConstructor const): Deleted.
(JSC::JSGlobalObject::syntaxErrorConstructor const): Deleted.
(JSC::JSGlobalObject::typeErrorConstructor const): Deleted.
(JSC::JSGlobalObject::URIErrorConstructor const): Deleted.
- runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor<errorType>::NativeErrorConstructor):
(JSC::NativeErrorConstructorBase::finishCreation):
(JSC::NativeErrorConstructor<errorType>::constructNativeErrorConstructor):
(JSC::NativeErrorConstructor<errorType>::callNativeErrorConstructor):
(JSC::NativeErrorConstructor::NativeErrorConstructor): Deleted.
(JSC::NativeErrorConstructor::finishCreation): Deleted.
(JSC::NativeErrorConstructor::visitChildren): Deleted.
(JSC::Interpreter::constructWithNativeErrorConstructor): Deleted.
(JSC::Interpreter::callNativeErrorConstructor): Deleted.
- runtime/NativeErrorConstructor.h:
(JSC::NativeErrorConstructorBase::createStructure):
(JSC::NativeErrorConstructorBase::NativeErrorConstructorBase):
- runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::finishCreation): Deleted.
- runtime/NativeErrorPrototype.h:
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
- wasm/js/WasmToJS.cpp:
(JSC::Wasm::handleBadI64Use):