Timeline
Apr 19, 2018:
- 11:41 PM Changeset in webkit [230836] by
-
- 3 edits in trunk/Source/WebCore
More WK_ALTERNATE_FRAMEWORKS_DIR adoption in WebCore
https://bugs.webkit.org/show_bug.cgi?id=184805
Reviewed by Dan Bernstein.
- Configurations/WebCoreTestShim.xcconfig:
- Configurations/WebCoreTestSupport.xcconfig:
- 11:17 PM Changeset in webkit [230835] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed. Fix GTK+ build after r230830.
Add SimulatedInputDispatcher.cpp to the build.
- CMakeLists.txt:
- 9:55 PM Changeset in webkit [230834] by
-
- 34 edits in trunk
Make back forward cache work with process swapping.
<rdar://problem/38676604> and https://bugs.webkit.org/show_bug.cgi?id=184793
Reviewed by Chris Dumez.
Source/WebCore:
Covered by API tests.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::loadDifferentDocumentItem):
- loader/FrameLoader.h:
Source/WebKit:
We previously saved old processes in "SuspendedPageProxy" objects.
Now we reuse them when going back or forward.
- Platform/Logging.h:
- Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::setSuspendedPage):
(WebKit::WebBackForwardListItem::loggingString):
- Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::suspendedPage const):
Teach Navigation objects their source WebBackForwardListItems:
- UIProcess/API/APINavigation.cpp:
(API::Navigation::Navigation):
(API::Navigation::loggingString const):
- UIProcess/API/APINavigation.h:
(API::Navigation::create):
(API::Navigation::targetItem const):
(API::Navigation::fromItem const):
(API::Navigation::backForwardListItem): Deleted.
- UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
- UIProcess/SuspendedPageProxy.cpp:
(WebKit::messageNamesToIgnoreWhileSuspended):
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::webProcessDidClose):
(WebKit::SuspendedPageProxy::didReceiveMessage):
(WebKit::SuspendedPageProxy::loggingString const):
- UIProcess/SuspendedPageProxy.h:
(WebKit::SuspendedPageProxy::origin const):
- UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::WebBackForwardList):
(WebKit::WebBackForwardList::~WebBackForwardList):
(WebKit::WebBackForwardList::pageClosed):
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
(WebKit::WebBackForwardList::removeAllItems):
(WebKit::WebBackForwardList::clear):
(WebKit::WebBackForwardList::restoreFromState):
(WebKit::WebBackForwardList::filteredItemStates const):
(WebKit::WebBackForwardList::itemStates const):
(WebKit::WebBackForwardList::loggingString):
- UIProcess/WebBackForwardList.h:
- UIProcess/WebNavigationState.cpp:
(WebKit::WebNavigationState::createLoadRequestNavigation):
(WebKit::WebNavigationState::createBackForwardNavigation):
- UIProcess/WebNavigationState.h:
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::maybeCreateSuspendedPage):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::connectionWillOpen):
(WebKit::WebPageProxy::attachToProcessForNavigation): Deleted.
- UIProcess/WebPageProxy.h:
- UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::webPageEnteringWebProcess):
(WebKit::WebProcessLifetimeTracker::connectionWillOpen): Deleted.
- UIProcess/WebProcessLifetimeTracker.h:
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::registerSuspendedPageProxy):
(WebKit::WebProcessPool::unregisterSuspendedPageProxy):
- UIProcess/WebProcessPool.h:
- UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::suspendWebPageProxy):
(WebKit::WebProcessProxy::updateBackForwardItem):
(WebKit::WebProcessProxy::frameCreated):
- UIProcess/WebProcessProxy.h:
- WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::attachDrawingArea):
- WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WebBackForwardListProxy::addItem):
- WebProcess/WebPage/WebBackForwardListProxy.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::m_credentialsMessenger):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::WebPage::restoreSessionInternal):
(WebKit::WebPage::restoreSession):
(WebKit::WebPage::updateBackForwardListForReattach):
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
- WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
- WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::attachDrawingArea): Force a reattachment of the drawing
area from a resumed WebProcess to the UIProcess (to make the page cache work)
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
- 8:16 PM Changeset in webkit [230833] by
-
- 7 edits in tags/Safari-606.1.14.1/Source
Versioning.
- 8:10 PM Changeset in webkit [230832] by
-
- 1 copy in tags/Safari-606.1.14.1
New tag.
- 7:15 PM Changeset in webkit [230831] by
-
- 36 edits2 moves in trunk/Source
Rename JSDOMWindowProxy to JSWindowProxy
https://bugs.webkit.org/show_bug.cgi?id=184797
Reviewed by Sam Weinig.
Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
Source/WebCore:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/IDLTypes.h:
- bindings/js/JSBindingsAllInOne.cpp:
- bindings/js/JSDOMConvertWindowProxy.h:
- bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::proxy const):
(WebCore::toJSDOMWindow):
- bindings/js/JSDOMWindowBase.h:
- bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::toWrapped):
- bindings/js/JSEventTargetCustom.cpp:
(WebCore::JSEventTarget::toWrapped):
- bindings/js/JSRemoteDOMWindowBase.cpp:
(WebCore::JSRemoteDOMWindowBase::JSRemoteDOMWindowBase):
(WebCore::toJSRemoteDOMWindow):
- bindings/js/JSRemoteDOMWindowBase.h:
- bindings/js/JSWindowProxy.cpp: Renamed from Source/WebCore/bindings/js/JSDOMWindowProxy.cpp.
(WebCore::JSWindowProxy::JSWindowProxy):
(WebCore::JSWindowProxy::finishCreation):
(WebCore::JSWindowProxy::create):
(WebCore::JSWindowProxy::destroy):
(WebCore::JSWindowProxy::setWindow):
(WebCore::JSWindowProxy::attachDebugger):
(WebCore::JSWindowProxy::wrapped const):
(WebCore::JSWindowProxy::toWrapped):
(WebCore::toJS):
(WebCore::toJSWindowProxy):
- bindings/js/JSWindowProxy.h: Renamed from Source/WebCore/bindings/js/JSDOMWindowProxy.h.
(WebCore::toJS):
(WebCore::toJSWindowProxy):
- bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScriptForWindowProxy):
- bindings/js/ScriptController.h:
- bindings/js/WindowProxy.cpp:
(WebCore::WindowProxy::createJSWindowProxy):
(WebCore::WindowProxy::jsWindowProxiesAsVector const):
(WebCore::WindowProxy::createJSWindowProxyWithInitializedScript):
- bindings/js/WindowProxy.h:
(WebCore::WindowProxy::jsWindowProxy):
(WebCore::WindowProxy::existingJSWindowProxy const):
- bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
(GenerateHeader):
(GenerateOverloadDispatcher):
(GenerateImplementation):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher):
- page/Frame.cpp:
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didCreateWindowProxy const):
- page/csp/ContentSecurityPolicy.h:
Source/WebInspectorUI:
- UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype._isNodeGlobalObject):
Source/WebKitLegacy/mac:
- DOM/DOMUtility.mm:
(createDOMWrapper):
- WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
Source/WebKitLegacy/win:
- WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
- 6:45 PM Changeset in webkit [230830] by
-
- 8 edits2 adds in trunk/Source/WebKit
Web Automation: add support for mouse/keyboard interaction sequences
https://bugs.webkit.org/show_bug.cgi?id=184603
<rdar://problem/39421839>
Reviewed by Timothy Hatcher.
Add new protocol methods and WebKit support for implementing the W3C Actions API.
This is a generic command for sending low-level mouse, key, and touch events to
test page behavior when performing drag-and-drop, gestures, or specific keydown/keyups.
To implement this functionality, this patch adds SimulatedInputDispatcher, a class
for dispatching input events asynchronously. Similar to the WebDriver specification,
this is designed as a keyframing API. Callers set up several "input sources" such
as keyboard or mouse, and then specify the states of that input source over time. The
dispatcher calculates diffs between the previous and current keyframes and generates
the appropriate events that would happen if a user caused the state transition.
For example, if a mouse input source's state changes, the dispatcher sends synthetic mousemove,
mousedown, or mouseup events depending on the pre- and post-state. This is uninteresting
and overcomplicated for simple key and mouse presses, but it's really designed with an
eye towards supporting mousemove interpolation and touch event interpolation in later patches.
The strategy for dispatching events depends on the input source type; right now, these
map directly to the existing platformSimulate{Mouse, Keyboard}Interaction methods. In
the future, the dispatch strategy may be elaborated for interpolated mousemove events.
This patch depends on support added in bug 184462.
No tests yet. When this command is hooked up to a driver, the code will be exercised by
W3C actions test suite, which is fairly complex at this point relative to end-user code.
- UIProcess/Automation/Automation.json: Add new types and commands.
- UIProcess/Automation/SimulatedInputDispatcher.h: Added.
(WebKit::SimulatedInputSourceState::emptyState):
(WebKit::SimulatedInputSource::create):
(WebKit::SimulatedInputSource::SimulatedInputSource):
(WebKit::SimulatedInputDispatcher::Client::~Client):
Add structs for input source, source state, and keyframe.
The dispatcher's client interface is implemented by WebAutomationSession.
(WebKit::SimulatedInputDispatcher::create):
- UIProcess/Automation/SimulatedInputDispatcher.cpp: Added.
(WebKit::SimulatedInputKeyFrame::SimulatedInputKeyFrame):
(WebKit::SimulatedInputKeyFrame::maximumDuration const):
(WebKit::SimulatedInputKeyFrame::keyFrameFromStateOfInputSources):
(WebKit::SimulatedInputKeyFrame::keyFrameToResetInputSources):
(WebKit::SimulatedInputDispatcher::SimulatedInputDispatcher):
(WebKit::SimulatedInputDispatcher::~SimulatedInputDispatcher):
(WebKit::SimulatedInputDispatcher::isActive const):
(WebKit::SimulatedInputDispatcher::keyFrameTransitionDurationTimerFired):
(WebKit::SimulatedInputDispatcher::isKeyFrameTransitionComplete const):
(WebKit::SimulatedInputDispatcher::transitionToNextKeyFrame):
(WebKit::SimulatedInputDispatcher::transitionToNextInputSourceState):
(WebKit::SimulatedInputDispatcher::transitionBetweenKeyFrames):
(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
(WebKit::SimulatedInputDispatcher::run):
(WebKit::SimulatedInputDispatcher::cancel):
(WebKit::SimulatedInputDispatcher::finishDispatching):
The dispatcher handles one interaction at a time. The interaction is described
by an array of keyframes, and each keyframe has an array of states. The dispatcher
transitions between keyframes by sequentially and asynchronously emitting events
that cause each input source state to transition as desired. Keyframe transitions
are additionally gated by a "maximum duration" timer. Each step that the dispatcher
executes is asynchronous, so the dispatcher keeps most state in members and uses
error argument lambdas as completion handlers for various async things.
- UIProcess/Automation/WebAutomationSession.h:
- UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::WebAutomationSession):
(WebKit::WebAutomationSession::inputDispatcherForPage):
(WebKit::WebAutomationSession::inputSourceForType const):
Add canonical input sources that are used to keep track of state across
interaction sequences.
(WebKit::WebAutomationSession::isSimulatingUserInteraction const):
(WebKit::WebAutomationSession::mouseEventsFlushedForPage):
(WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
Remove m_simulatingUserInteraction since it can be computed based on other members.
(WebKit::WebAutomationSession::willClosePage):
If the page is being torn down, stop the dispatcher if needed and cancel any
callbacks waiting for mouse/key events to be retired.
(WebKit::WebAutomationSession::simulateMouseInteraction):
(WebKit::WebAutomationSession::simulateKeyboardInteraction):
Add easy-to-use async methods for simulating mouse and key events. These are
hooked up to SimulatedInputDispatcher using async completion handlers.
(WebKit::protocolMouseButtonToWebMouseEventButton):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
Adjust some naming.
(WebKit::simulatedInputSourceTypeFromProtocolSourceType):
(WebKit::WebAutomationSession::performInteractionSequence):
(WebKit::WebAutomationSession::cancelInteractionSequence):
Add command handlers for the new action commands in Automation protocol.
- UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
(WebKit::mouseButtonToGdkButton):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
(WebKit::WebAutomationSession::platformSimulateKeyStroke): Deleted.
- UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
(WebKit::WebAutomationSession::platformSimulateKeyStroke): Deleted.
Rename the keyboard platform method to match the naming of the mouse platform method.
Take advantage of the 'using' alias to make the tedious switches easier to read.
- UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
(WebKit::virtualKeyHasStickyModifier):
(WebKit::keyCodeForVirtualKey):
(WebKit::eventModifierFlagsForVirtualKey):
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
(WebKit::keyHasStickyModifier): Deleted.
(WebKit::WebAutomationSession::platformSimulateKeyStroke): Deleted.
Allow the keyboard simulation method to take a virtual key and unichar to better
match how this is used by the Perform Actions command and its machinery.
- WebKit.xcodeproj/project.pbxproj:
- 6:00 PM Changeset in webkit [230829] by
-
- 16 edits3 adds in trunk
Introduce SVGGeometryElement interface
https://bugs.webkit.org/show_bug.cgi?id=184768
Source/WebCore:
Patch by Dirk Schulze <krit@webbkit.org> on 2018-04-19
Reviewed by Antti Koivisto.
Start implementing SVGGeometryElement interface from SVG2.
https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
Start with SVGPathElement only for now. Also, just inferface gets implemented
by this patch. No new functionality like isPointInFill yet.
Fix getPointAtLength and make it more restrictive. This follows the spec and
all other implementations.
Added additional test scenarios to existing tests.
- CMakeLists.txt:
- DerivedSources.make:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
- svg/SVGAllInOne.cpp:
- svg/SVGGeometryElement.cpp: Added.
(WebCore::SVGGeometryElement::SVGGeometryElement):
(WebCore::SVGGeometryElement::isSupportedAttribute):
(WebCore::SVGGeometryElement::parseAttribute):
(WebCore::SVGGeometryElement::svgAttributeChanged):
(WebCore::SVGGeometryElement::createElementRenderer):
- svg/SVGGeometryElement.h: Added.
- svg/SVGGeometryElement.idl: Added.
- svg/SVGGradientElement.cpp:
- svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::insertedIntoAncestor):
(WebCore::SVGPathElement::removedFromAncestor):
- svg/SVGPathElement.h:
- svg/SVGPathElement.idl:
LayoutTests:
Patch by Dirk Schulze <krit@webkit.org> on 2018-04-19
Reviewed by Antti Koivisto.
Start implementing SVGGeometryElement interface from SVG2.
- svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html: pointAtLength requires value now.
- svg/dom/path-pointAtLength-expected.txt:
- svg/dom/path-pointAtLength.html: Added throw tests for pointAtLength.
- svg/dom/svg2-inheritance-expected.txt: Inheritance fixed for SVGPathElement only for now.
- 4:59 PM Changeset in webkit [230828] by
-
- 7 edits2 adds in trunk
REGRESSION(r227340): ArrayBuffers were not being serialized when sent via MessagePorts
https://bugs.webkit.org/show_bug.cgi?id=184254
<rdar://problem/39140200>
Patch by Tadeu Zagallo <Tadeu Zagallo> on 2018-04-19
Reviewed by Daniel Bates.
Source/JavaScriptCore:
Expose an extra constructor of ArrayBufferContents in order to be able to decode SerializedScriptValues.
- runtime/ArrayBuffer.h:
(JSC::ArrayBufferContents::ArrayBufferContents):
Source/WebCore:
Add a new encoding method to SerializedScriptValue that includes ArrayBuffers.
Test: workers/message-port.html
- bindings/js/SerializedScriptValue.h:
(WebCore::SerializedScriptValue::encode const):
(WebCore::SerializedScriptValue::decode):
- dom/messageports/MessageWithMessagePorts.h:
(WebCore::MessageWithMessagePorts::encode const):
(WebCore::MessageWithMessagePorts::decode):
LayoutTests:
The regression test provided with the bug report verifies that the ArrayBuffer is properly
serialized - before, the whole data object would be null.
Test case provided by Yann Cabon <ycabon@esri.com> as part of the bug report.
- workers/message-port-expected.txt: Added.
- workers/message-port.html: Added.
- 4:51 PM Changeset in webkit [230827] by
-
- 4 edits in trunk/Source/WebKit
Remove access to keychain from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=184428
<rdar://problem/13150903>
Reviewed by Brent Fulgham.
Part 1.
Remove com.apple.identities from WebContent-iOS.entitlements, which is needed to encode/decode NSError’s userInfo[NSErrorClientCertificateChainKey]
when the corresponding NSErorr is relayed through WebContent Process from Networking Process to UI Process after a HTTPS client certificate
authentication is rejected becuase of bad certificates. This patch implements corresponding workarounds as well. The workaround works for mac, too.
Sadly, this change can only be tested manually at this moment. Please refer to the radar for testing steps.
- Configurations/WebContent-iOS.entitlements:
- Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::encodeNSError):
- UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize):
- 4:30 PM Changeset in webkit [230826] by
-
- 8 edits in trunk/Source/JavaScriptCore
Apply pointer profiling to Signal pointers.
https://bugs.webkit.org/show_bug.cgi?id=184790
<rdar://problem/39301369>
Reviewed by Michael Saboff.
- Change stackPointer, framePointer, and instructionPointer accessors to be a pair of getter/setter functions.
- Add support for USE(PLATFORM_REGISTERS_WITH_PROFILE) to allow use of a a pointer profiling variants of these accessors.
- Also add a linkRegister accessor only for ARM64 on OS(DARWIN).
- JavaScriptCorePrefix.h:
- runtime/MachineContext.h:
(JSC::MachineContext::stackPointerImpl):
(JSC::MachineContext::stackPointer):
(JSC::MachineContext::setStackPointer):
(JSC::MachineContext::framePointerImpl):
(JSC::MachineContext::framePointer):
(JSC::MachineContext::setFramePointer):
(JSC::MachineContext::instructionPointerImpl):
(JSC::MachineContext::instructionPointer):
(JSC::MachineContext::setInstructionPointer):
(JSC::MachineContext::linkRegisterImpl):
(JSC::MachineContext::linkRegister):
(JSC::MachineContext::setLinkRegister):
- runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::takeSample):
- runtime/VMTraps.cpp:
(JSC::SignalContext::SignalContext):
(JSC::VMTraps::tryInstallTrapBreakpoints):
- tools/CodeProfiling.cpp:
(JSC::profilingTimer):
- tools/SigillCrashAnalyzer.cpp:
(JSC::SignalContext::dump):
(JSC::installCrashHandler):
(JSC::SigillCrashAnalyzer::analyze):
- wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):
- 3:55 PM Changeset in webkit [230825] by
-
- 1 edit in trunk/LayoutTests/platform/ios-wk2/TestExpectations
Unreviewed, update TestExpectations for iOS Simulator.
- platform/ios-wk2/TestExpectations:
- 3:53 PM Changeset in webkit [230824] by
-
- 30 edits in trunk
Enable Objective-C weak references
<https://webkit.org/b/184789>
<rdar://problem/39571716>
Reviewed by Dan Bernstein.
Source/bmalloc:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/JavaScriptCore:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- Configurations/ToolExecutable.xcconfig:
(CLANG_ENABLE_OBJC_ARC): Simplify.
Source/ThirdParty/ANGLE:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/ThirdParty/libwebrtc:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/WebCore:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/WebCore/PAL:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/WebInspectorUI:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/WebKit:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/WebKitLegacy/mac:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Source/WTF:
- Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
Tools:
- ContentExtensionTester/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- DumpRenderTree/mac/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- ImageDiff/cg/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- MiniBrowser/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- TestWebKitAPI/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- WebEditingTester/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_ARC): Re-order.
- WebKitLauncher/Configurations/Base.xcconfig: Add newline at
end of file.
(CLANG_ENABLE_OBJC_WEAK): Enable.
- WebKitTestRunner/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
- 3:31 PM Changeset in webkit [230823] by
-
- 5 edits in trunk/Source/WebCore
Don't use RenderTreeBuilder::current() in RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=184794
Reviewed by Zalan Bujtas.
Pass the builder as a parameter where needed.
- rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::RenderTreeUpdater::updateTextRenderer):
(WebCore::RenderTreeUpdater::tearDownRenderers):
(WebCore::RenderTreeUpdater::tearDownRenderer):
(WebCore::RenderTreeUpdater::tearDownTextRenderer):
(WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded):
(WebCore::RenderTreeUpdater::tearDownLeftoverShadowHostChildren):
- rendering/updating/RenderTreeUpdater.h:
- rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::removeBeforePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::removeAfterPseudoElement):
- rendering/updating/RenderTreeUpdaterGeneratedContent.h:
- 3:21 PM Changeset in webkit [230822] by
-
- 4 edits2 adds in trunk
Runtime logging during GC can cause crash
https://bugs.webkit.org/show_bug.cgi?id=184792
<rdar://problem/39567927>
Reviewed by Jer Noble.
Source/WebCore:
Test: media/destructor-logging-crash.html
- dom/Document.cpp:
(WebCore::Document::~Document): Clear the logger observer immediately so anything logged
as a side effect of the destructor won't cause a problem.
(WebCore::Document::didLogMessage): Create the ConsoleMessage in a task.
- dom/Document.h:
LayoutTests:
- media/destructor-logging-crash-expected.txt: Added.
- media/destructor-logging-crash.html: Added.
- 3:16 PM Changeset in webkit [230821] by
-
- 10 edits2 adds in trunk/Websites/perf.webkit.org
Add a bisect button to automatically schedule bisecting A/B tasks.
https://bugs.webkit.org/show_bug.cgi?id=183888
Reviewed by Ryosuke Niwa.
Extended AnalysisTask's ability to figure out bisecting A/B tasks based on existing data points and test groups.
Updated analysis page UI to show bisect button which will only appear when the middle commit set of the range in
test group can be found.
Finding middle commit set algorithm is described as follows:
- Find all commits from multiple repositories among the ranges specified by two commit sets in test group. In
the meanwhile, merge all commits that have commit time into a single list. For commits only have commit order,
put those commits into separate lists.
- Filter all the available commit sets in current analysis task by keeping the ones have exact repositories
as the two commit sets in specified test group, and every commit of a commit set is in side the commit range.
After filtering the commit sets, sort the remaining ones and only keep one commit set if multiple commit sets
are equal to each other.
- Among commits processed by step 2, find the commit sets that have the commit which is closest to the middle of
all commits that have commit time created from step 1.
- Among commits processed by step 3, find the commit sets that have the commit which is closest to the middle of
commits that only have commit order and categorized by repository. We have to iterate through repository as commit
order is not granted to be comparable between different repositories.
- If more than one commit sets are found, choose the middle commit set.
- public/v3/commit-set-range-bisector.js: Added.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits): Instead of naively returning the middle of
existing commit set array, this function selects a bisect bisection points that is closest to actually middle of
the revision range based on all revisions reported to performance dashboard.
(CommitSetRangeBisector._findCommitSetsWithinRange): Helper function to find commit sets those are in specified range.
(CommitSetRangeBisector._orderCommitSetsByTimeAndOrderThenDeduplicate): Helper function to sort and deduplicate commit sets.
(CommitSetRangeBisector._closestCommitSetsToBisectingCommitByTime): Helper function to find the commit sets those
are closest to the middle of among all the commits in the range that have commit time.
(CommitSetRangeBisector._findCommitSetsClosestToMiddleOfCommitsWithOrder): Helper function which goes through all
repositories the commit of which has commit order, and find the commit sets those are closest to the middle of
commits for each repository.
(CommitSetRangeBisector._buildCommitToCommitSetMap): Helper function to builder mapping from a commit to commit
sets those contain this commit.
(CommitSetRangeBisector._findCommitClosestToMiddleIndex): Helper function to find closest commit to the middle of index.
(CommitSetRangeBisector):
- public/v3/index.html: Imports 'public/v3/commit-set-range-bisector.js'.
- public/v3/models/analysis-task.js:
(AnalysisTask.prototype.async.commitSetsFromTestGroupsAndMeasurementSet): Aggregates all existing commit sets in
test groups of current analysis tasks.
- public/v3/models/commit-log.js:
(CommitLog.prototype.hasCommitTime): A helper function determine whether a commit has a commit time. For commit
that does not have time, server will return commit time as zero. As it is unrealistic for a commit has commit time
0, it would be safe to assume a valid commit time is greater than 0.
(CommitLog.prototype.hasCommitOrder): Returns whether a commit has a commit oder.
(CommitLog.hasOrdering): Determine whether we can order two commits by commit time or commit order.
(CommitLog.orderTwoCommits): Order two commits incrementally.
- public/v3/models/commit-set.js:
(CommitSet.prototype.hasSameRepositories): A helper function to determine whether a commit set has same repositories
as current repository.
(CommitSet.containsRootOrPatchOrOwnedCommit): A helper function to determine whether current commit set has root,
patch or owned commit.
(CommitSet.commitForRepository): This function defined twice identically, remove one of them.
- public/v3/models/test-group.js: Make '_computeRequestedCommitSets' a static function as it does not use any
instance variables.
- public/v3/pages/analysis-task-page.js: Added bisect button.
(AnalysisTaskTestGroupPane):
(AnalysisTaskTestGroupPane.prototype.didConstructShadowTree):
(AnalysisTaskTestGroupPane.prototype.setTestGroups): Update 'setTestGroups' to update _bisectingCommitSetByTestGroup
when the test groups changes.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup): Added code to conditionally show bisect button.
Bisect button will only show when there is a middle commit set for that test group.
(AnalysisTaskTestGroupPane.htmlTemplate):
(AnalysisTaskTestGroupPane.cssTemplate):
(AnalysisTaskPage.prototype.didConstructShadowTree):
(AnalysisTaskPage.prototype._retryCurrentTestGroup):
(AnalysisTaskPage.prototype.async._bisectCurrentTestGroup): A callback when bisect button is clicked.
- tools/js/v3-models.js:
- unit-tests/commit-log-tests.js: Added unit tests for 'CommitLog.hasCommitTime', 'CommitLog.hasCommitOrder',
'CommitLog.orderTwoCommits', 'CommitLog.hasOrdering'.
- unit-tests/commit-set-range-bisector-tests.js: Unit tests for 'CommitSetRangeBisector.commitSetClosestToMiddleOfAllCommits'.
- unit-tests/commit-set-tests.js: Added unit tests for 'CommitSet.hasSameRepositories' and 'CommitSet.containsRootOrPatchOrOwnedCommit'.
- 2:27 PM Changeset in webkit [230820] by
-
- 13 edits in trunk
Web Inspector backend should get headers & cookies from network process separately from resource requests
https://bugs.webkit.org/show_bug.cgi?id=184396
<rdar://problem/38877384>
Reviewed by Brian Burg.
Source/WebCore:
Add two new loader strategies to get response and network metrics directly from
NetworkProcess based on resource loader identifier.
Use these methods in InspectorNetworkAgent when response/metrics might be filtered.
Covered by existing tests, in particular http/tests/inspector/network/fetch-network-data.html which would fail
without this since we are now setting the sourceOrigin for NetworkResourceLoader, which is used to sanitize response headers.
- inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::didReceiveResponse):
(WebCore::InspectorNetworkAgent::didFinishLoading):
- loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::responseFromResourceLoaIdentifier):
(WebCore::LoaderStrategy::networkMetricsFromResourceLoaIdentifier):
- loader/LoaderStrategy.h:
Source/WebKit:
Add support for storing response and network metrics for every resource load.
This is made conditional on inspector being activated.
NetworkConnectionToWebProcess keeps a response and network metrics for every load.
This is cleared when inspector is going away or when a web process requests
the data.
WebLoaderStrategy gets this data through synchronous IPC.
Synchronous IPC is a temporary implementation until Inspector code gets refactored.
Updated WebLoaderStrategy to pass the sourceOrigin for every NetworkResourceLoader.
This activates additional sanitization based on cross origin status.
- NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled):
- NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::takeNetworkLoadInformationResponse):
(WebKit::NetworkConnectionToWebProcess::takeNetworkLoadInformationMetrics):
(WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationResponse):
(WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics):
(WebKit::NetworkConnectionToWebProcess::removeNetworkLoadInformation):
- NetworkProcess/NetworkConnectionToWebProcess.messages.in:
- NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
- WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::responseFromResourceLoadIdentifier):
(WebKit::WebLoaderStrategy::networkMetricsFromResourceLoadIdentifier):
- WebProcess/Network/WebLoaderStrategy.h:
- WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
LayoutTests:
- http/wpt/service-workers/header-filtering.https-expected.txt:
- 2:00 PM Changeset in webkit [230819] by
-
- 13 edits3 adds in trunk
[Extra zoom mode] Add a mechanism to extend the height of the layout viewport in extra zoom mode
https://bugs.webkit.org/show_bug.cgi?id=184782
<rdar://problem/38346712>
Reviewed by Tim Horton.
Source/WebCore:
Add a new helper on FrameView to compute an expanded layout viewport size, as well as a new setting for the
height expansion factor when computing visual viewport dimensions. See WebKit/ChangeLog for more detail.
Test: fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html
- page/FrameView.cpp:
(WebCore::FrameView::expandedLayoutViewportSize):
- page/FrameView.h:
- page/Settings.yaml:
Source/WebKit:
In extra zoom mode, at initial scale, fixed position elements may take up a large portion of the viewport. This
leaves little room for non-fixed-position elements; to improve this experience, we introduce a mechanism to
extend the height of the layout viewport. By default, the layout viewport size is determined by the FrameView's
baseLayoutViewportSize, and passed into FrameView::computeUpdatedLayoutViewportRect in the client layer; in
extra zoom mode, if the layout viewport is shorter than the document width, we try to double the height of the
layout viewport and clamp to the document height if necessary.
- Shared/WebPreferences.yaml:
Add a new preference to determine the factor by which we should expand the height of the layout viewport. By
default, this is 0 (no increase in layout viewport height); in extra zoom mode, this is 1, which means we'll
increase the layout viewport's height by 1x the default height.
- Shared/WebPreferencesDefaultValues.h:
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView activeMinimumLayoutSizes:]):
Fixes a bug when computing the active minimum layout size. If a minimum allowed layout width is specified, we
clamp the active layout width (normally the view size) so that it is no less than the minimum allowed layout
width. However, the height is currently unaffected, which causes FrameView::baseLayoutViewportSize to return a
bogus size, where the width is scaled to 320px but the height isn't. Instead, we should scale the layout height
to match the new width here.
- UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect const):
Expand the base viewport layout size if necessary, given the expansion factor in WebPreferences.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
Expand the base viewport layout size if necessary, given the expansion factor in Settings.
LayoutTests:
Add a new layout test to exercise the following scenarios:
- The layout viewport should be fully extended when the document is much taller than the viewport.
- Programmatically shrinking the document height to less than the viewport height causes the layout viewport
to shrink to the viewport height.
- Programmatically extending the document height to a little more than the viewport height causes the layout
viewport to also expand, but this time, only to the new document height.
Skip tests in fast/visual-viewport/extrazoom by default.
- fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing-expected.txt: Added.
- fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html: Added.
- 1:57 PM Changeset in webkit [230818] by
-
- 9 edits in trunk
REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string
https://bugs.webkit.org/show_bug.cgi?id=184209
<rdar://problem/39145306>
Reviewed by Ryosuke Niwa.
Source/WebCore:
In r229133, we stopped doing navigation policy checks for about:blank because about:blank
loads need to happen synchronously for Web-compatibility. However, this regressed loading
an HTML string in a WebView because in such cases, the URL is also about:blank with
substitute data.
In this patch, we take a more conservative approach and restore policy checking for
'about:blank' but using synchronous IPC.
- loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
(TEST):
LayoutTests:
Rebaseline existing layout tests. Their output is back to what it was before r229133.
- fast/loader/iframe-src-invalid-url-expected.txt:
- fast/loader/policy-delegate-action-hit-test-zoomed-expected.txt:
- loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt:
- loader/navigation-policy/should-open-external-urls/subframe-click-target-top-expected.txt:
- 1:37 PM Changeset in webkit [230817] by
-
- 7 edits in trunk/Source/WebKit
Web Automation: simulated mouse interactions should not be done until associated DOM events have been dispatched
https://bugs.webkit.org/show_bug.cgi?id=184462
<rdar://problem/39323336>
Reviewed by Carlos Garcia Campos and Tim Horton.
Covered by existing layout tests and actions endpoints in WebDriver test suite.
In preparation for implementing the W3C WebDriver command "Perform Actions", we need a way to
know when a simulated mouse event has been fully processed by WebProcess and it is okay to continue
to dispatch more simulated events.
This patch makes mouse events go through a queue as they are delivered to WebPageProxy. The approach
is very similar to how key events are handled. In the key event case, lots of WebEvents can come out
of typing one keystroke, so these need to be queued up and retired one by one when the WebProcess has
finished handling each event. In some mouse event cases---particularly fake mouse moves---there can
also be more than one mouse event waiting to be handled by WebProcess.
In the past, these queued mouse events were tracked with several member variables as different
use cases emerged. These are all replaced with ordinary deque operations, such as peeking or
checking the queue length.
- Platform/Logging.h: Add logging channel for mouse events.
- UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::AutomationCommandError::toProtocolString): Add type-safe helper class for command errors.
In future patches we can hide knowledge of how this is sent over the protocol by relying more on
the convenience constructors and .toProtocolString() method.
(WebKit::WebAutomationSession::willShowJavaScriptDialog):
This section needs adjustments. Since performMouseInteraction now depends on key events being processed
prior to returning from the command, we need to abort any key event callbacks that are pending if an
alert pops up as a result of sending a mousedown event. Any mouse events that are still queued will
be handled when the alert is dismissed and the nested run loop exits.
(WebKit::WebAutomationSession::mouseEventsFlushedForPage):
(WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
Modernize this a bit. Don't spread knowledge about how commands are sent back out into event handling code.
Our wrapper callbacks in performXXXInteraction handle the protocol-specific details of the response.
(WebKit::WebAutomationSession::performMouseInteraction):
Add code similar to performKeyboardInteractions so that the command doesn't finish until the mouse
event has been fully handled. Unlike keyboards, sometimes mouse interactions don't turn into WebEvents
so we also need to handle the case where there is nothing to be waited on because hit testing did
not return a target to deliver the event to.
(WebKit::WebAutomationSession::performKeyboardInteractions):
Modernize a little bit to use generic callbacks rather than protocol-generated callbacks in the
event waiting/handling code. Now it matches the types used for the mouse event case.
- UIProcess/Automation/WebAutomationSession.h:
(WebKit::AutomationCommandError::AutomationCommandError):
Add a helper struct to hold an enumerated error name and an optional free-form error message.
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.cpp:
(WebKit::webMouseEventTypeString):
(WebKit::webKeyboardEventTypeString):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::processNextQueuedMouseEvent):
Split the old method into handleMouseEvent (called by other code) and processNextQueuedMouseEvent.
The latter sends the next mouse event to WebProcess, and can be triggered in didReceiveEvent
if there are more mouse events to be sent to WebProcess.
(WebKit::WebPageProxy::isProcessingMouseEvents const): Added.
(WebKit::WebPageProxy::currentlyProcessedMouseDownEvent): Reimplemented on top of the deque.
(WebKit::WebPageProxy::didReceiveEvent):
Unify the code paths for different mouse event types to all use the deque. They also will
notify the automation session if there are no more mouse events to send (i.e., interaction is over).
(WebKit::WebPageProxy::resetStateAfterProcessExited): Add handling for new map.
- 1:25 PM Changeset in webkit [230816] by
-
- 3 edits4 adds in trunk
Support calc() in webkit-gradient and cross-fade
https://bugs.webkit.org/show_bug.cgi?id=182225
Patch by Chris Nardi <cnardi@chromium.org> on 2018-04-19
Reviewed by Simon Fraser.
Source/WebCore:
calc() was previously unsupported in webkit-gradient and webkit-cross-fade, but both should take calc() values.
Update the code to support calc() values.
Tests: LayoutTests/css3/calc/cross-fade-calc.html
LayoutTests/css3/calc/webkit-gradient-calc.html
- css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeCrossFade):
LayoutTests:
Add new test cases.
- css3/calc/cross-fade-calc.html: Added.
- css3/calc/cross-fade-calc-expected.txt: Added.
- css3/calc/webkit-gradient-calc.html: Added.
- css3/calc/webkit-gradient-calc-expected.txt: Added.
- 1:20 PM Changeset in webkit [230815] by
-
- 2 edits in tags/Safari-606.1.14/Source/WTF
Revert r230677. rdar://problem/39569617
- 12:33 PM Changeset in webkit [230814] by
-
- 2 edits in trunk/Source/WebKit
[iOS] Implement find-in-page in the new WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=184654
<rdar://problem/39331654>
Reviewed by Tim Horton.
This is theoretically covered by existing WKPDFView API tests, but that's currently blocked
by <rdar://problem/39475542>.
- UIProcess/ios/WKPDFView.mm:
(stringCompareOptions):
Mapped _WKFindOptions to NSStringCompareOptions.
(-[WKPDFView _resetFind]):
Cancelled an in-progress search and reset the search state.
(-[WKPDFView _findString:withOptions:maxCount:completion:]):
Stored the completion block, find string, and max count, then called
-[PDFHostViewController findString:withOptions:].
(-[WKPDFView web_countStringMatches:options:maxCount:]):
Called -_findString:withOptions:maxCount:completion: with a completion block that calls
FindClient::didCountStringMatches() with _findStringCount.
(-[WKPDFView _computeFocusedSearchResultIndexWithOptions:didWrapAround:]):
Computed the focused search result index, taking _findStringCount and wrap-around into
account. There are two interesting cases to mention here:
- We can't change focus while a search is in progress, because we can't properly handle
wrap-around without a _findStringCount. If a search is in progress, store the requested
focus change in _focusedSearchResultPendingOffset, which will be applied once the search
finishes.
- If wrap-around is about to happen but the find options do not allow it, we need to call
FindClient::didFailToFindString(). Handle this by returning NO, which will tell
-_focusOnSearchResultWithOptions: to call didFailToFindString() if a search is not in
progress.
(-[WKPDFView _focusOnSearchResultWithOptions:]):
If -_computeFocusedSearchResultIndexWithOptions:didWrapAround: failed while a search is in
progress, just return early. Otherwise, call FindClient::didFailToFindString(). If
computing the index did not fail, call -[PDFHostViewController focusOnSearchResultAtIndex:]
to change focus and then call FindClient::didFindString() to inform the client.
(-[WKPDFView web_findString:options:maxCount:]):
If the find string is equal to _findString, change focus. Otherwise, start a new search.
(-[WKPDFView web_hideFindUI]):
Called -_resetFind.
(-[WKPDFView pdfHostViewController:findStringUpdate:done:]):
Stored the count in _findStringCount and called _findCompletion once the search is done.
- 12:33 PM Changeset in webkit [230813] by
-
- 31 edits2 adds in trunk/Source
The InternalFunction hierarchy should be in IsoSubspaces
https://bugs.webkit.org/show_bug.cgi?id=184721
Reviewed by Saam Barati.
Source/JavaScriptCore:
This moves InternalFunction into a IsoSubspace. It also moves all subclasses into IsoSubspaces,
but subclasses that are the same size as InternalFunction share its subspace. I did this
because the subclasses appear to just override methods, which are called dynamically via the
structure or class of the object. So, I don't see a type confusion risk if UAF is used to
allocate one kind of InternalFunction over another.
- API/JSBase.h:
- API/JSCallbackFunction.h:
- API/ObjCCallbackFunction.h:
(JSC::ObjCCallbackFunction::subspaceFor):
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- Sources.txt:
- heap/IsoSubspacePerVM.cpp: Added.
(JSC::IsoSubspacePerVM::AutoremovingIsoSubspace::AutoremovingIsoSubspace):
(JSC::IsoSubspacePerVM::AutoremovingIsoSubspace::~AutoremovingIsoSubspace):
(JSC::IsoSubspacePerVM::IsoSubspacePerVM):
(JSC::IsoSubspacePerVM::~IsoSubspacePerVM):
(JSC::IsoSubspacePerVM::forVM):
- heap/IsoSubspacePerVM.h: Added.
(JSC::IsoSubspacePerVM::SubspaceParameters::SubspaceParameters):
- runtime/Error.h:
- runtime/ErrorConstructor.h:
- runtime/InternalFunction.h:
(JSC::InternalFunction::subspaceFor):
- runtime/IntlCollatorConstructor.h:
- runtime/IntlDateTimeFormatConstructor.h:
- runtime/IntlNumberFormatConstructor.h:
- runtime/JSArrayBufferConstructor.h:
- runtime/NativeErrorConstructor.h:
- runtime/ProxyRevoke.h:
- runtime/RegExpConstructor.h:
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
Source/WebCore:
No new tests because no new behavior.
- bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::JSVMClientData):
- bindings/js/WebCoreJSClientData.h:
(WebCore::JSVMClientData::runtimeMethodSpace):
- bridge/runtime_method.cpp:
(JSC::RuntimeMethod::subspaceForImpl):
- bridge/runtime_method.h:
Source/WebKit:
- WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::subspaceForImpl):
- WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::create): Deleted.
(WebKit::JSNPMethod::npIdentifier const): Deleted.
(WebKit::JSNPMethod::createStructure): Deleted.
- WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::subspaceForImpl):
- WebProcess/Plugins/Netscape/JSNPObject.h:
(WebKit::JSNPObject::create): Deleted.
(WebKit::JSNPObject::npObject const): Deleted.
(WebKit::JSNPObject::createStructure): Deleted.
- 11:45 AM Changeset in webkit [230812] by
-
- 31 edits1 add in trunk/Source
Add globally-unique HistoryItem identifiers (and have WebKit2 adopt them).
<rdar://problem/39533949> and https://bugs.webkit.org/show_bug.cgi?id=184750
Reviewed by Ryosuke Niwa.
Source/WebCore:
No new tests (Refactor, no behavior change).
In WebCore, we:
- Add a process-unique "BackForwardItemIdentifier"
- Make all HistoryItems have such an identifier as a member
- WebCore.xcodeproj/project.pbxproj:
- history/BackForwardItemIdentifier.h: Added.
(WebCore::BackForwardItemIdentifier::logString const):
(WebCore::operator==):
(WebCore::BackForwardItemIdentifier::encode const):
(WebCore::BackForwardItemIdentifier::decode):
(WebCore::BackForwardItemIdentifier::hash const):
(WTF::BackForwardItemIdentifierHash::hash):
(WTF::BackForwardItemIdentifierHash::equal):
(WTF::HashTraits<WebCore::BackForwardItemIdentifier>::emptyValue):
(WTF::HashTraits<WebCore::BackForwardItemIdentifier>::constructDeletedValue):
(WTF::HashTraits<WebCore::BackForwardItemIdentifier>::isDeletedValue):
- history/HistoryItem.cpp:
(WebCore::HistoryItem::generateSequenceNumber):
(WebCore::HistoryItem::HistoryItem):
(WebCore::generateSequenceNumber): Deleted.
- history/HistoryItem.h:
(WebCore::HistoryItem::create):
(WebCore::HistoryItem::identifier const):
Source/WebKit:
With process swapping, the assumption that "back/forward items belong to a process" is invalid.
All HistoryItem/WebBackForwardListItems now need to be uniquely identified across all processes,
no matter which process they originated from, so there will never be a collision in the UIProcess.
This allows us to:
- Have the UIProcess to keep a single process-wide map of all WebBackForwardListItems
- Get rid of the per-WebProcess WebBackForwardListItem map
- Simplify a lot of WebBackForwardList(Proxy) code that no longer needs to keep that per-process map in sync
- Get rid of a lot of other ancillary code
- Shared/SessionState.cpp:
(WebKit::BackForwardListItemState::decode):
- Shared/SessionState.h:
- Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::~WebBackForwardListItem):
(WebKit::WebBackForwardListItem::itemForID):
(WebKit::WebBackForwardListItem::highestUsedItemID): Deleted.
- Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::itemID const):
- Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
- Shared/WebPageCreationParameters.h:
- UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::itemForID):
(WebKit::WebBackForwardList::pageClosed):
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::restoreFromState):
(WebKit::generateWebBackForwardItemID): Deleted.
- UIProcess/WebBackForwardList.h:
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeCreateSuspendedPage):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::backForwardAddItem):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardItemAtIndex):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::backForwardRemovedItem):
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- UIProcess/WebProcessPool.cpp: Explicitly set the UIProcess Process::Identifier so it starts at "1" and then the first child process starts at "2", etc etc.
- UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
(WebKit::WebProcessProxy::updateBackForwardItem):
(WebKit::WebProcessProxy::webBackForwardItem const): Deleted.
(WebKit::WebProcessProxy::registerNewWebBackForwardListItem): Deleted.
(WebKit::WebProcessProxy::removeBackForwardItem): Deleted.
(WebKit::WebProcessProxy::addOrUpdateBackForwardItem): Deleted.
- UIProcess/WebProcessProxy.h:
- UIProcess/WebProcessProxy.messages.in:
- WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toBackForwardListItemState):
(WebKit::applyFrameState):
(WebKit::toHistoryItem):
(WebKit::toPageState): Deleted.
- WebProcess/WebCoreSupport/SessionStateConversion.h:
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
- WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WK2NotifyHistoryItemChanged):
(WebKit::WebBackForwardListProxy::itemForID):
(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::addItem): Previously this was a two-step process of adding an item
to the process and then associating it with the page. Now it's just directly adding it to the page,
so we don't need to call updateBackForwardItem first.
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::close):
(WebKit::historyItemToIDMap): Deleted.
(WebKit::generateHistoryItemID): Deleted.
(WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess): Deleted.
(WebKit::updateBackForwardItem): Deleted.
(WebKit::WebBackForwardListProxy::idForItem): Deleted.
- WebProcess/WebPage/WebBackForwardListProxy.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::m_credentialsMessenger):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::WebPage::restoreSessionInternal):
(WebKit::WebPage::didRemoveBackForwardItem):
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
Source/WTF:
- wtf/DebugUtilities.h:
(WTF::debugString):
- 11:25 AM Changeset in webkit [230811] by
-
- 2 edits in trunk/Source/WTF
Unreviewed, rolling out r230677.
Introduced Netflix problems.
Reverted changeset:
"Deactivate the WindowServer connection for the WebContent process."
https://bugs.webkit.org/show_bug.cgi?id=184451
https://trac.webkit.org/changeset/230677
- 10:54 AM Changeset in webkit [230810] by
-
- 5 edits6 adds in trunk
NetworkProcess should use CSP/content blockers for sync XHR
https://bugs.webkit.org/show_bug.cgi?id=184760
Reviewed by Chris Dumez.
Source/WebKit:
Setting CSP/ContentBlockers parameters for sync XHR loads.
- NetworkProcess/NetworkResourceLoader.cpp:
LayoutTests:
- http/tests/contentextensions/sync-xhr-redirection-blocked-expected.txt: Added.
- http/tests/contentextensions/sync-xhr-redirection-blocked.html: Added.
- http/tests/contentextensions/sync-xhr-redirection-blocked.html.json: Added.
- http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/insecure-sync-xhr-in-main-frame-window.html: Added.
- http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-sync-xhr-in-main-frame-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-sync-xhr-in-main-frame.html: Added.
- platform/mac-wk1/TestExpectations:
- platform/win/TestExpectations:
- 10:49 AM Changeset in webkit [230809] by
-
- 3 edits1 delete in trunk/LayoutTests
Unreviewed test gardening for iOS simulator.
- platform/ios-wk2/TestExpectations:
- platform/ios-wk2/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Removed.
- platform/ios/TestExpectations:
- 10:36 AM Changeset in webkit [230808] by
-
- 20 edits2 adds in trunk
AX: AOM: respect the accessibility setting for dispatching the accessible events
https://bugs.webkit.org/show_bug.cgi?id=184619
Reviewed by Ryosuke Niwa.
Source/WebCore:
Added accessibilityEventsEnabled as a setting on the page.
Test: accessibility/ios-simulator/accessibility-events-setting.html
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const):
- page/Settings.yaml:
- testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setAccessibilityEventsEnabled):
- testing/InternalSettings.h:
- testing/InternalSettings.idl:
Source/WebKit:
Linked libAccessibility on iOS and macOS to use the platform accessibility settings
for allowing dispatching the accessibility events.
- Configurations/WebKit.xcconfig:
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(accessibilityEventsEnabledChangedCallback):
(-[WKWebView _updateAccessibilityEventsEnabled]):
- UIProcess/API/Cocoa/WKWebViewInternal.h:
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateAccessibilityEventsEnabled):
- UIProcess/WebPageProxy.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateAccessibilityEventsEnabled):
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
Source/WTF:
- wtf/Platform.h:
LayoutTests:
- accessibility/ios-simulator/accessibility-events-setting-expected.txt: Added.
- accessibility/ios-simulator/accessibility-events-setting.html: Added.
- platform/ios-wk1/TestExpectations:
- platform/ios-wk2/TestExpectations:
- 10:14 AM Changeset in webkit [230807] by
-
- 2 edits in trunk/Source/WebCore
Fix build when WK_ALTERNATE_FRAMEWORKS_DIR is set to non-empty value
https://bugs.webkit.org/show_bug.cgi?id=184693
<rdar://problem/39491884>
Reviewed by Tim Horton.
- Configurations/WebCore.xcconfig:
- 10:02 AM Changeset in webkit [230806] by
-
- 4 edits in trunk/LayoutTests
Fix flakiness in worker-to-worker test
https://bugs.webkit.org/show_bug.cgi?id=184769
<rdar://problem/39552333>
Patch by Tadeu Zagallo <Tadeu Zagallo> on 2018-04-19
Reviewed by Alexey Proskuryakov.
- workers/worker-to-worker-expected.txt:
- workers/worker-to-worker.html:
- workers/worker-to-worker.js:
- 9:01 AM Changeset in webkit [230805] by
-
- 4 edits in trunk/Source/WebCore
Change MediaSource WebCore to return NewObject for SourceBuffers
https://bugs.webkit.org/show_bug.cgi?id=184642
Patch by Eric Stobbart <ericstobbart@gmail.com> on 2018-04-19
Reviewed by Chris Dumez.
Minor change inline with IDL documentation
- Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
(): Deleted.
- Modules/mediasource/MediaSource.h:
- Modules/mediasource/MediaSource.idl:
- 8:58 AM Changeset in webkit [230804] by
-
- 6 edits6 adds in trunk/LayoutTests
Unreviewed, rebaseline tests for iOS simulator.
- platform/ios/TestExpectations:
- platform/ios/editing/deleting/delete-emoji-9-expected.txt:
- platform/ios/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt: Added.
- platform/ios/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Added.
- platform/ios/quicklook/excel-expected.txt:
- platform/ios/quicklook/excel-legacy-expected.txt:
- platform/ios/quicklook/excel-macro-enabled-expected.txt:
- 8:58 AM Changeset in webkit [230803] by
-
- 2 edits in trunk/LayoutTests
Skip legacy-animation-engine/media/track/opera directory on iOS.
https://bugs.webkit.org/show_bug.cgi?id=184420
Unreviewed test gardening.
The media/track/opera directory is already skipped on iOS, so skip this duplicated directory.
- platform/ios/TestExpectations:
- 8:58 AM Changeset in webkit [230802] by
-
- 2 edits in trunk/LayoutTests
Mark imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182833
Unreviewed test gardening.
- 8:58 AM Changeset in webkit [230801] by
-
- 2 edits in trunk/LayoutTests
Mark media/video-aspect-ratio.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=184457
Unreviewed test gardening.
- platform/mac-wk1/TestExpectations:
- 8:03 AM WebKitGTK/Gardening/Calendar edited by
- (diff)
- 8:00 AM Changeset in webkit [230800] by
-
- 2 edits in trunk/LayoutTests
Unreviewed GTK+ gardening after r230796.
- platform/gtk/TestExpectations:
- 5:47 AM Changeset in webkit [230799] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, build fix for Ubuntu LTS GCC
https://bugs.webkit.org/show_bug.cgi?id=184756
The variable name "windowProxy" (with auto&) conflicts with the function name "windowProxy".
- bindings/js/ScriptController.cpp:
(WebCore::ScriptController::updateDocument):
(WebCore::ScriptController::collectIsolatedContexts):
- 5:35 AM Changeset in webkit [230798] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, Fix jsc shell
https://bugs.webkit.org/show_bug.cgi?id=184600
WebAssembly module loading does not finish with drainMicrotasks().
So JSNativeStdFunction's capturing variables become invalid.
This patch fixes this issue.
- jsc.cpp:
(functionDollarAgentStart):
(runWithOptions):
(runJSC):
(jscmain):
- 12:10 AM Changeset in webkit [230797] by
-
- 35 edits6 adds in trunk
Caret rendered at incorrect location inside empty table cell
https://bugs.webkit.org/show_bug.cgi?id=85385
Reviewed by Zalan Bujtas.
Source/WebCore:
This is based on a previous patch by Shezan Baig <shezbaig.wk@gmail.com>.
This fixes the position of the caret in empty cells,
that was painted lower than expected
(and then modified when you start to edit the cell).
Ensures that editable table cells have at least one line when
they are laid out. This ensures that the cell's intrinsic before/after
padding is calculated correctly, which results in the caret location
being calculated correctly.
Test: editing/caret/caret-in-empty-cell.html
- rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::hasLineIfEmpty): Override method to consider
that it has an an empty line if the table cell is editable.
- rendering/RenderTableCell.h:
LayoutTests:
- editing/caret/caret-in-empty-cell-expected.html: Added.
- editing/caret/caret-in-empty-cell.html: Added.
- editing/deleting/5206311-2-expected.txt:
- editing/deleting/5433862-1-expected.txt:
- platform/gtk/editing/deleting/5126166-expected.png:
- platform/gtk/editing/deleting/5126166-expected.txt:
- platform/gtk/editing/deleting/5206311-1-expected.png:
- platform/gtk/editing/deleting/5206311-1-expected.txt:
- platform/gtk/editing/deleting/5433862-2-expected.png:
- platform/gtk/editing/deleting/5433862-2-expected.txt:
- platform/gtk/editing/deleting/5483370-expected.png:
- platform/gtk/editing/deleting/5483370-expected.txt:
- platform/gtk/editing/selection/move-by-line-001-expected.png:
- platform/gtk/editing/selection/move-by-line-001-expected.txt:
- platform/gtk/editing/selection/select-all-004-expected.txt:
- platform/ios-simulator/editing/deleting/5126166-expected.txt:
- platform/ios-simulator/editing/deleting/5206311-1-expected.txt:
- platform/ios-simulator/editing/deleting/5433862-2-expected.txt:
- platform/ios-simulator/editing/deleting/5483370-expected.txt:
- platform/mac/editing/deleting/5126166-expected.png:
- platform/mac/editing/deleting/5126166-expected.txt:
- platform/mac/editing/deleting/5206311-1-expected.png:
- platform/mac/editing/deleting/5206311-1-expected.txt:
- platform/mac/editing/deleting/5433862-2-expected.png:
- platform/mac/editing/deleting/5433862-2-expected.txt:
- platform/mac/editing/deleting/5483370-expected.png:
- platform/mac/editing/deleting/5483370-expected.txt:
- platform/mac/editing/selection/move-by-line-001-expected.txt:
- platform/mac/editing/selection/select-all-004-expected.txt:
- platform/win/editing/deleting/5126166-expected.png: Added.
- platform/win/editing/deleting/5126166-expected.txt:
- platform/win/editing/deleting/5206311-1-expected.png: Added.
- platform/win/editing/deleting/5206311-1-expected.txt:
- platform/win/editing/deleting/5433862-2-expected.png: Added.
- platform/win/editing/deleting/5433862-2-expected.txt:
- platform/win/editing/deleting/5483370-expected.png: Added.
- platform/win/editing/deleting/5483370-expected.txt:
Apr 18, 2018:
- 10:38 PM Changeset in webkit [230796] by
-
- 2 edits in trunk/Tools
[WinCairo][EWS] Build bot should clean user temp directory each time.
https://bugs.webkit.org/show_bug.cgi?id=184761
Reviewed by Lucas Forschler.
- EWSTools/Start-Queue.ps1:
Clean user's temp directory before each build, so that Windows git doesn't fill it up over time.
- 9:19 PM Changeset in webkit [230795] by
-
- 3 edits in trunk/Source/WebCore
Cleanup TextControlInnerElements
https://bugs.webkit.org/show_bug.cgi?id=184475
Reviewed by Antti Koivisto.
Clean up TextControlInnerElement::resolveCustomStyle(), move the implementation of
TextControlPlaceholderElement::create() from the header to the cpp file, replace
fancy comments to demarcate classes with MARK: so that they show up in Xcode's
function menu.
- html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
(WebCore::TextControlPlaceholderElement::create):
- html/shadow/TextControlInnerElements.h:
- 9:02 PM Changeset in webkit [230794] by
-
- 26 edits2 moves in trunk/Source
Rename WindowProxyController to WindowProxy
https://bugs.webkit.org/show_bug.cgi?id=184756
Reviewed by Sam Weinig.
Rename WindowProxyController to WindowProxy for clarity. When the IDL uses WindowProxy, the implementation
needed use WindowProxyController type, which was a bit confusing.
Source/WebCore:
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
(WebCore::DOMWrapperWorld::clearWrappers):
- bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::didCreateWindowProxy):
(WebCore::DOMWrapperWorld::didDestroyWindowProxy):
- bindings/js/JSBindingsAllInOne.cpp:
- bindings/js/JSDOMWindowBase.cpp:
(WebCore::toJS):
- bindings/js/JSDOMWindowProxy.cpp:
(WebCore::toJS):
(WebCore::toJSDOMWindowProxy):
- bindings/js/JSDOMWindowProxy.h:
(WebCore::toJS):
(WebCore::toJSDOMWindowProxy):
- bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
- bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::setupModuleScriptHandlers):
(WebCore::ScriptController::windowProxy):
(WebCore::ScriptController::enableEval):
(WebCore::ScriptController::enableWebAssembly):
(WebCore::ScriptController::disableEval):
(WebCore::ScriptController::disableWebAssembly):
(WebCore::ScriptController::updateDocument):
(WebCore::ScriptController::collectIsolatedContexts):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::executeIfJavaScriptURL):
- bindings/js/ScriptController.h:
(WebCore::ScriptController::globalObject):
- bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::windowScriptObject):
- bindings/js/ScriptState.cpp:
(WebCore::mainWorldExecState):
- bindings/js/WindowProxy.cpp: Renamed from Source/WebCore/bindings/js/WindowProxyController.cpp.
(WebCore::WindowProxy::WindowProxy):
(WebCore::WindowProxy::~WindowProxy):
(WebCore::WindowProxy::destroyJSWindowProxy):
(WebCore::WindowProxy::createJSWindowProxy):
(WebCore::WindowProxy::jsWindowProxiesAsVector const):
(WebCore::WindowProxy::createJSWindowProxyWithInitializedScript):
(WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
(WebCore::WindowProxy::setDOMWindow):
(WebCore::WindowProxy::attachDebugger):
- bindings/js/WindowProxy.h: Renamed from Source/WebCore/bindings/js/WindowProxyController.h.
(WebCore::WindowProxy::jsWindowProxies const):
(WebCore::WindowProxy::releaseJSWindowProxies):
(WebCore::WindowProxy::setJSWindowProxies):
(WebCore::WindowProxy::jsWindowProxy):
(WebCore::WindowProxy::existingJSWindowProxy const):
(WebCore::WindowProxy::globalObject):
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
- page/AbstractFrame.cpp:
(WebCore::AbstractFrame::AbstractFrame):
- page/AbstractFrame.h:
(WebCore::AbstractFrame::windowProxy):
(WebCore::AbstractFrame::windowProxy const):
- page/Page.cpp:
(WebCore::Page::setDebugger):
- page/RemoteDOMWindow.cpp:
(WebCore::RemoteDOMWindow::self const):
(WebCore::RemoteDOMWindow::top const):
(WebCore::RemoteDOMWindow::opener const):
(WebCore::RemoteDOMWindow::parent const):
- page/RemoteDOMWindow.h:
Source/WebKit:
- WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameBecameRemote):
Source/WebKitLegacy/mac:
- Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
- WebView/WebFrame.mm:
(-[WebFrame _attachScriptDebugger]):
- 7:05 PM Changeset in webkit [230793] by
-
- 7 edits in branches/safari-605-branch/Source
Versioning.
- 6:38 PM Changeset in webkit [230792] by
-
- 1 copy in tags/Safari-605.2.5
Tag Safari-605.2.5.
- 5:47 PM Changeset in webkit [230791] by
-
- 13 edits6 copies in trunk
LayoutTests/imported/w3c:
Allow cross-origin redirections for synchronous XHR
https://bugs.webkit.org/show_bug.cgi?id=184723
Reviewed by Alex Christensen.
- web-platform-tests/XMLHttpRequest/access-control-and-redirects-expected.txt:
Source/WebKit:
Allow SameOrigin credentials handling for synchronous XHR
https://bugs.webkit.org/show_bug.cgi?id=184723
Reviewed by Alex Christensen.
In case of SameOrigin credentials, we need to stop the current load
in case of cross origin redirection to restart a load with a different session.
Covered by updated WK2 tests.
Rebased WK1 tests since this is Wk1 only.
- NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
- NetworkProcess/NetworkResourceLoader.h:
LayoutTests:
Allow SameOrigin credentials handling for synchronous XHR
https://bugs.webkit.org/show_bug.cgi?id=184723
Reviewed by Alex Christensen.
- http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
- http/tests/xmlhttprequest/access-control-and-redirects.html:
- http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt:
- http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt:
- http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
- platform/mac-wk1/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
- platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt.
- platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt.
- platform/mac-wk1/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt.
- platform/win/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
- platform/win/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt.
- platform/win/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt.
- platform/win/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt: Copied from LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt.
- 4:40 PM Changeset in webkit [230790] by
-
- 2 edits in trunk/Tools
Buildbots using Python zipfile should enable compression
https://bugs.webkit.org/show_bug.cgi?id=184759
Reviewed by Lucas Forschler.
- BuildSlaveSupport/built-product-archive:
(createZipManually):
Default is to archive without compressing, so tell it to compress as well.
- 3:27 PM Changeset in webkit [230789] by
-
- 19 edits1 copy in trunk
Set RemoteDOMWindow's initial opener
https://bugs.webkit.org/show_bug.cgi?id=184716
Reviewed by Sam Weinig.
Source/WebCore:
Add support for WindowProxy type in the IDL. The implementation should
return a WindowProxyController and toJS() will take care of converting
this into a JSValue via JSDOMWindowProxy.
No new tests, rebaselined existing test.
- WebCore.xcodeproj/project.pbxproj:
- bindings/IDLTypes.h:
- bindings/js/JSDOMConvertWindowProxy.h: Added.
(WebCore::JSConverter<IDLWindowProxy>::convert):
- bindings/js/JSDOMWindowBase.cpp:
(WebCore::toJS):
- bindings/js/JSDOMWindowBase.h:
(WebCore::toJS):
- bindings/js/JSDOMWindowProxy.cpp:
(WebCore::toJS):
(WebCore::toJSDOMWindowProxy):
- bindings/js/JSDOMWindowProxy.h:
(WebCore::toJS):
(WebCore::toJSDOMWindowProxy):
- bindings/js/JSRemoteDOMWindowBase.cpp:
- bindings/js/JSRemoteDOMWindowBase.h:
- bindings/scripts/CodeGenerator.pm:
(IsBuiltinType):
- bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
(GetBaseIDLType):
- page/RemoteDOMWindow.cpp:
(WebCore::RemoteDOMWindow::self const):
(WebCore::RemoteDOMWindow::top const):
(WebCore::RemoteDOMWindow::opener const):
(WebCore::RemoteDOMWindow::parent const):
- page/RemoteDOMWindow.h:
- page/RemoteDOMWindow.idl:
- page/RemoteFrame.h:
Source/WebKit:
When a frame becomes remote, transfer the frame opener from the old
frame to the new remote one.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameBecameRemote):
LayoutTests:
Rebaseline existing test now that remoteWindow.opener now returns
its initial opener.
- http/tests/navigation/process-swap-window-open-expected.txt:
- 3:13 PM Changeset in webkit [230788] by
-
- 11 edits3 adds in trunk
Detect system preview links
https://bugs.webkit.org/show_bug.cgi?id=184753
<rdar://problem/39500514>
Reviewed by Antoine Quint.
Source/WebCore:
Detect a special type of link anchor, which we're calling System Previews.
Ultimately this will allow WebKit to present such links in a special
way.
A System Preview link is an <a> element, with a rel attribute that
includes "system-preview". It has a single element child, which is
either an <img> or a <picture>.
Test: system-preview/detection.html
- html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::relList): Add braces.
(WebCore::HTMLAnchorElement::isSystemPreviewLink const): New
function.
- html/HTMLAnchorElement.h:
- html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::isSystemPreviewImage const): Ask the
parent if it is a system preview link.
- html/HTMLImageElement.h:
- html/HTMLPictureElement.cpp:
(WebCore::HTMLPictureElement::isSystemPreviewImage const): Ditto.
- html/HTMLPictureElement.h:
- testing/Internals.cpp: Testing helpers.
(WebCore::Internals::systemPreviewRelType):
(WebCore::Internals::isSystemPreviewLink const):
(WebCore::Internals::isSystemPreviewImage const):
- testing/Internals.h:
- testing/Internals.idl:
LayoutTests:
- system-preview/detection-expected.txt: Added.
- system-preview/detection.html: Added.
- 3:03 PM Changeset in webkit [230787] by
-
- 2 edits in trunk/LayoutTests
Skip animations/missing-from-to.html on mac-wk1 debug.
https://bugs.webkit.org/show_bug.cgi?id=184569
Unreviewed test gardening.
- platform/mac-wk1/TestExpectations:
- 3:01 PM Changeset in webkit [230786] by
-
- 2 edits in trunk/Source/WebCore
:active pseudo class doesn't deactivate when using pressure sensitive trackpad
https://bugs.webkit.org/show_bug.cgi?id=181680
Reviewed by Beth Dakin.
Trackpad sends a mouse force event with force of zero after mouse up event. This causes the element under cursor
activate again.
Even a fake event test doesn't appear to be currently possible as TestRunner crashes if you try to send mouseForceChanged.
All the tests using it are skipped.
- page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseForceEvent):
Don't add HitTestRequest::Active if the force of the force event is zero.
- 2:54 PM Changeset in webkit [230785] by
-
- 2 edits in trunk/Source/WebCore
Ensure correct screen sizes
https://bugs.webkit.org/show_bug.cgi?id=184757
Reviewed by Wenson Hsieh.
Make sure that the screen sizes are actually correct.
Not currently testable, will add tests when it is.
- platform/ios/PlatformScreenIOS.mm:
- 2:43 PM Changeset in webkit [230784] by
-
- 9 copies1 add in releases/Apple/Safari Technology Preview 54
Added a tag for Safari Technology Preview release 54.
- 2:26 PM Changeset in webkit [230783] by
-
- 2 edits in trunk/Source/WebKit
NetworkResourceLoader should not clean itself inside didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=184754
Reviewed by Chris Dumez.
Delay the cleanup to after the didReceiveResponse call so that NetworkLoad can terminate its work.
Covered by XHR sync tests no longer crashing on GuardMalloc bots.
- NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponse):
- 2:21 PM Changeset in webkit [230782] by
-
- 9 edits2 adds in trunk
AX: [macOS] WebKit hangs when triggering an alert from an AOM increment event
https://bugs.webkit.org/show_bug.cgi?id=184742
Reviewed by Chris Fleizach.
Source/WebCore:
Made increment and decrement actions on the macOS to be async. So that VoiceOver
won't hang indefinitely if performing the actions causes an alert or other modal
behaviors.
Test: accessibility/mac/async-increment-decrement-action.html
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityPerformIncrementAction]):
(-[WebAccessibilityObjectWrapper _accessibilityPerformIncrementAction]):
(-[WebAccessibilityObjectWrapper accessibilityPerformDecrementAction]):
(-[WebAccessibilityObjectWrapper _accessibilityPerformDecrementAction]):
(-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
Tools:
- DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::increment):
(AccessibilityUIElement::decrement):
- WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(WTR::AccessibilityUIElement::asyncIncrement):
(WTR::AccessibilityUIElement::asyncDecrement):
- WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
- WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::increment):
(WTR::AccessibilityUIElement::decrement):
(WTR::AccessibilityUIElement::asyncIncrement):
(WTR::AccessibilityUIElement::asyncDecrement):
LayoutTests:
- accessibility/mac/async-increment-decrement-action-expected.txt: Added.
- accessibility/mac/async-increment-decrement-action.html: Added.
- platform/mac-wk1/TestExpectations:
- 2:21 PM Changeset in webkit [230781] by
-
- 7 edits in trunk
MediaResourceLoader should set its fetch destination
https://bugs.webkit.org/show_bug.cgi?id=184746
Reviewed by Eric Carlson.
LayoutTests/imported/w3c:
- web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt:
- web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html:
- web-platform-tests/service-workers/service-worker/resources/fetch-request-resources-iframe.https.html:
- web-platform-tests/service-workers/service-worker/resources/fetch-request-resources-worker.js:
Source/WebCore:
Covered by updated test.
- loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):
- 2:17 PM Changeset in webkit [230780] by
-
- 2 edits in trunk/Source/WebKit
Fix rendering of WKRemoteView layers in the simulator
https://bugs.webkit.org/show_bug.cgi?id=184752
Reviewed by Tim Horton.
- Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForExternalHostingProcess):
- 2:17 PM Changeset in webkit [230779] by
-
- 2 edits in trunk/Source/WebCore
Fix runtime errors in simulator while playing media
https://bugs.webkit.org/show_bug.cgi?id=184751
Reviewed by Eric Carlson.
AVURLAssetHTTPCookiesKey may not be present, and AVPlayer may not respond to certain methods.
- platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
- 2:06 PM Changeset in webkit [230778] by
-
- 13 edits2 adds in trunk/Source/WebKit
Fix entitlements and sandboxing for iphoneminimalsimulator
https://bugs.webkit.org/show_bug.cgi?id=184692
Reviewed by Tim Horton.
Use the correct implementations for ChildProcess and NetworkProcess
when building for iphoneminimalsimulator. Stub out imlementations
which rely on methods not available in the iphoneminimalsimulator SDK.
- Configurations/Network-OSX.entitlements: Added.
- Configurations/NetworkService.xcconfig:
- NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::sourceApplicationAuditData const):
- NetworkProcess/ios/NetworkProcessIOS.mm:
- NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::initializeProcessName):
(WebKit::overrideSystemProxies):
- Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox):
- Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setApplicationIsDaemon):
(WebKit::enableSandboxStyleFileQuarantine):
(WebKit::ChildProcess::initializeSandbox):
(WebKit::ChildProcess::platformStopRunLoop):
- Shared/mac/CodeSigning.mm:
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeSandbox):
- 1:26 PM Changeset in webkit [230777] by
-
- 2 edits in tags/Safari-606.1.14/Source/WebKit
Cherry-pick r230771. rdar://problem/39287964
Avoid crash if ITP Debug mode is on, but ResourceLoadStatistics are not being used
https://bugs.webkit.org/show_bug.cgi?id=184739
<rdar://problem/39287964>
Reviewed by David Kilzer.
If a user has the ResourceLoadStatistics logic turned off, but has the ITP Debug experimental
flag turned on, you can cause a crash.
This is because the WebsiteDataStore for the process doesn't bother creating a ResourceLoadStatisticsStore
if the statistics machinery is not running. The ITP debug flag was being blindly set without checking
if the statistics store exists or not, which can cause a crash.
- UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode): Check if the statistics store exists before calling functions on it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 1:19 PM Changeset in webkit [230776] by
-
- 2 edits in trunk/Source/JavaScriptCore
REGRESSION(r230748) [WinCairo] 'JSC::JIT::appendCallWithSlowPathReturnType': function does not take 1 arguments
https://bugs.webkit.org/show_bug.cgi?id=184725
Reviewed by Mark Lam.
- jit/JIT.h:
- 1:13 PM Changeset in webkit [230775] by
-
- 2 edits in trunk/Source/WebCore
Ignore ASSERT when setting AVAudioSessionCategory returns an error on simulator.
https://bugs.webkit.org/show_bug.cgi?id=184698
Reviewed by Eric Carlson.
- platform/audio/ios/AudioSessionIOS.mm:
- platform/audio/mac/AudioSessionMac.cpp:
- 1:09 PM Changeset in webkit [230774] by
-
- 5 edits in trunk
[Win] Layout Test js/date-constructor.html is failing
https://bugs.webkit.org/show_bug.cgi?id=140945
Reviewed by Per Arne Vollan.
Source/WTF:
- wtf/DateMath.cpp:
(WTF::calculateDSTOffset):
Move all shared calculations outside of the #if -- including the "jump forward a day" case that had been overlooked.
LayoutTests:
- platform/win/TestExpectations:
- platform/wincairo/TestExpectations:
- 12:17 PM Changeset in webkit [230773] by
-
- 7 edits in trunk/Source/WebKit
Unreviewed, rolling out r230743.
https://bugs.webkit.org/show_bug.cgi?id=184747
causes mouse clicks to not work on some platforms (Requested
by brrian on #webkit).
Reverted changeset:
"Web Automation: simulated mouse interactions should not be
done until associated DOM events have been dispatched"
https://bugs.webkit.org/show_bug.cgi?id=184462
https://trac.webkit.org/changeset/230743
Patch by Commit Queue <commit-queue@webkit.org> on 2018-04-18
- 12:04 PM Changeset in webkit [230772] by
-
- 2 edits in trunk/Tools
Fix archive step for WinCairo build bot.
https://bugs.webkit.org/show_bug.cgi?id=184715
Reviewed by Lucas Forschler.
- BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct):
(extractBuiltProduct):
- 11:55 AM Changeset in webkit [230771] by
-
- 2 edits in trunk/Source/WebKit
Avoid crash if ITP Debug mode is on, but ResourceLoadStatistics are not being used
https://bugs.webkit.org/show_bug.cgi?id=184739
<rdar://problem/39287964>
Reviewed by David Kilzer.
If a user has the ResourceLoadStatistics logic turned off, but has the ITP Debug experimental
flag turned on, you can cause a crash.
This is because the WebsiteDataStore for the process doesn't bother creating a ResourceLoadStatisticsStore
if the statistics machinery is not running. The ITP debug flag was being blindly set without checking
if the statistics store exists or not, which can cause a crash.
- UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode): Check if the statistics store exists
before calling functions on it.
- 11:42 AM Changeset in webkit [230770] by
-
- 3 edits in tags/Safari-606.1.14/Source/WebKit
Cherry-pick r230747. rdar://problem/39468022
WebKit::DisplayLink maintains a strong reference to WebPageProxy, creating a reference cycle
https://bugs.webkit.org/show_bug.cgi?id=184718
Reviewed by Tim Horton.
It turns out that the m_webPageProxy back-reference in DisplayLink, which was creating a
reference cycle, wasn't ever read, so we can just remove it.
- UIProcess/mac/DisplayLink.cpp: (WebKit::DisplayLink::DisplayLink):
- UIProcess/mac/DisplayLink.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 11:02 AM Changeset in webkit [230769] by
-
- 1 copy in tags/Safari-606.1.14
Tag Safari-606.1.14.
- 10:55 AM Changeset in webkit [230768] by
-
- 15 edits in trunk
[WebAssembly][Modules] Import tables in wasm modules
https://bugs.webkit.org/show_bug.cgi?id=184738
Reviewed by JF Bastien.
JSTests:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports.js:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wasm:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wat:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/re-export.js:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wasm:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wat:
- wasm/modules/wasm-imports-wasm-exports.js:
- wasm/modules/wasm-imports-wasm-exports/imports.wasm:
- wasm/modules/wasm-imports-wasm-exports/imports.wat:
- wasm/modules/wasm-imports-wasm-exports/sum.wasm:
- wasm/modules/wasm-imports-wasm-exports/sum.wat:
Source/JavaScriptCore:
This patch simply allows wasm modules to import table from wasm modules / js re-exporting.
Basically moving JSWebAssemblyInstance's table linking code to WebAssemblyModuleRecord::link
just works.
- wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
- 10:50 AM Changeset in webkit [230767] by
-
- 4 edits in trunk
REGRESSION: Using the reload button while offline pushes identical pages onto the back/forward list
https://bugs.webkit.org/show_bug.cgi?id=184570
<rdar://problem/34807323>
Patch by Sihui Liu <sihui_liu@apple.com> on 2018-04-18
Reviewed by Chris Dumez.
Source/WebCore:
Set FrameLoadType properly when error occurs in reload.
tests: Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::load):
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(TEST):
- 10:31 AM Changeset in webkit [230766] by
-
- 3 edits in trunk/Source/WebKit
Add -[_WKInputDelegateDelegate willStartInputSession:] for clients that want to configure input session before assisting form node
https://bugs.webkit.org/show_bug.cgi?id=184662
Patch by Paul Knight <pknight@apple.com> on 2018-04-18
Reviewed by Beth Dakin.
Clients may wish to configure a WKInputSession before we start assisting
a node. Add a -[_WKInputDelegateDelegate _webView:willStartInputSession:]
callback.
For example, clients that wish to present a custom input view will want
to configure the WKFormInputSession's customInputView before the
keyboard is presented. Otherwise the standard keyboard will begin to
animate and then the custom input view will swap in later.
- UIProcess/API/Cocoa/_WKInputDelegate.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Call -_webView:willStartInputSession: before assisting the node.
Only create the form session if the delegate implements either
the willStart or didStartInputSession callbacks.
- 10:16 AM Changeset in webkit [230765] by
-
- 4 edits in trunk/Source/JavaScriptCore
[ARM] Fix build error and crash after PtrTag change
https://bugs.webkit.org/show_bug.cgi?id=184732
Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-04-18
Reviewed by Mark Lam.
Do not pass NoPtrTag in callOperation and fix misspelled JSEntryPtrTag. Use
MacroAssemblerCodePtr::createFromExecutableAddress to avoid tagging a pointer
twice with ARM-Thumb2.
- assembler/MacroAssemblerCodeRef.h:
(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
- jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_put_by_val):
- jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
- 9:50 AM Changeset in webkit [230764] by
-
- 40 edits2 adds in trunk
Add support for converting a local window to a remote window
https://bugs.webkit.org/show_bug.cgi?id=184515
<rdar://problem/39011318>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Add initial support for process-swapping when navigating cross-origin as a result
of a window.open(). The window object returned by window.open() is initially same
origin and is for about:blank. The navigation cross-origin then happens and the
JS wrappers for the window then point to a cross-origin window which is remote (i.e.
hosted in another WebProcess).
The RemoteDOMWindow exposed to JS looks like a regular cross-origin Window with a few
exceptions due to our incomplete implementation (e.g. w.location returns null) and
most of its API is currently not functional. The RemoteDOMWindow API will be implemented
in a follow-up by relying on IPC.
Test: http/tests/navigation/process-swap-window-open.html
- bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::scriptExecutionContext const):
- bindings/js/JSDOMPromiseDeferred.h:
- bindings/js/JSDOMWindowProperties.cpp:
(WebCore::JSDOMWindowProperties::getOwnPropertySlot):
- bindings/js/JSDOMWindowProxy.cpp:
(WebCore::JSDOMWindowProxy::finishCreation):
(WebCore::JSDOMWindowProxy::create):
- bindings/js/JSDOMWindowProxy.h:
- bindings/js/JSDOMWrapper.cpp:
(WebCore::JSDOMObject::JSDOMObject):
- bindings/js/JSDOMWrapper.h:
- bindings/js/WindowProxyController.cpp:
(WebCore::WindowProxyController::createWindowProxy):
(WebCore::WindowProxyController::setDOMWindowForWindowProxy):
- bridge/objc/WebScriptObject.mm:
(-[WebScriptObject _isSafeScript]):
Teach more of our bindings code about RemoteDOMWindows.
- dom/Document.cpp:
(WebCore::Document::createDOMWindow):
- loader/FrameLoaderClient.h:
Add FrameLoaderClient function to notify the client when a DOMWindow is constructed in
the frame. This is needed for WebKit2 to link the old window to its new representation
in the new WebProcess.
Source/WebKit:
Add initial support for process-swapping when navigating cross-origin as a result
of a window.open(). The window object returned by window.open() is initially same
origin and is for about:blank. The navigation cross-origin then happens and the
JS wrappers for the window then point to a cross-origin window which is remote (i.e.
hosted in another WebProcess).
The RemoteDOMWindow exposed to JS looks like a regular cross-origin Window with a few
exceptions due to our incomplete implementation (e.g. w.location returns null) and
most of its API is currently not functional. The RemoteDOMWindow API will be implemented
in a follow-up by relying on IPC.
- UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
- UIProcess/API/APIProcessPoolConfiguration.h:
- UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationProcessSwapsOnWindowOpenWithOpener):
(WKContextConfigurationSetProcessSwapsOnWindowOpenWithOpener):
- UIProcess/API/C/WKContextConfigurationRef.h:
- UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
- UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration setProcessSwapsOnWindowOpenWithOpener:]):
(-[_WKProcessPoolConfiguration processSwapsOnWindowOpenWithOpener]):
Add ProcessPool configuration flag to turn on processSwap on window.open(), even
if there is an opener.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
If the navigation was triggered via window.open(), then set up on handler for when
a DOMWindow is constructed for the main frame in the new process.
(WebKit::WebPageProxy::didCreateWindow):
When a Window is constructed for the main frame in a new process on process swap,
notify the old process that its representation of the window should become remote
and provide it with the Frame / Window identifiers it needs.
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
Do process swapping on cross-origin window.open() if the corresponding setting is
enabled.
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didCreateWindow):
- WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameBecameRemote):
This is called when process swapping has happened due to a window.open() navigation
cross-origin, when a Frame / Window has been constructed in the new process. We do
the following:
- Construct a RemoteFrame / RemoteWindow using the provided global identifiers to represent the Frame / Window in the new process.
- We transfer the WindowProxies from the old Frame's WindowProxyController to the new RemoteFrame's WindowProxyController.
- We update the window proxied by those WindowProxies to be the new RemoteWindow.
- We detach the old Frame as it is now remote and represented by the new RemoteFrame object we constructed.
- If the old frame was the main frame (always the case currently), we close the page as it is no longer needed. The new RemoteFrame is currently owned by the RemoteWindow which is kept alive by its JS wrappers.
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
Tools:
- MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
- MiniBrowser/mac/SettingsController.h:
- MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController processSwapOnWindowOpenWithOpenerEnabled]):
(-[SettingsController toggleProcessSwapOnWindowOpenWithOpener:]):
Add menu entry in minibrowser to turn on process swap on cross-origin window.open().
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
Turn on process swap on cross-origin window.open() for corresponding test and update
test to expect that a new WebProcess is created.
- WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForResponse):
Add null checks for injectedBundle.testRunner(). When we swap process on navigation,
the InjectedBundlePage::decidePolicyForResponse() gets called in the new process.
In this new process, we have constructed a InjectedBundlePage for the page but we
have not initialized the InjectedBundle members such as testRunner.
- WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):
- WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
Add a way for layout tests to turn on process swap on navigation via a test header.
LayoutTests:
Add layout test coverage a cross-origin window.open() to check that the
returned window looks like a regular cross-origin window after being
navigated cross-origin. We are still failing some of the checks because
our implementation is still incomplete. However, it mostly works as
expected.
- TestExpectations:
- http/tests/navigation/process-swap-window-open-expected.txt: Added.
- http/tests/navigation/process-swap-window-open.html: Added.
- platform/wk2/TestExpectations:
- 9:33 AM Changeset in webkit [230763] by
-
- 17 edits6 adds in trunk
[WebAssembly][Modules] Import globals from wasm modules
https://bugs.webkit.org/show_bug.cgi?id=184736
Reviewed by JF Bastien.
JSTests:
- wasm.yaml:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports.js:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wasm:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wat:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/re-export.js:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wasm:
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wat:
- wasm/modules/wasm-imports-wasm-exports.js:
- wasm/modules/wasm-imports-wasm-exports/imports.wasm:
- wasm/modules/wasm-imports-wasm-exports/imports.wat:
- wasm/modules/wasm-imports-wasm-exports/sum.wasm:
- wasm/modules/wasm-imports-wasm-exports/sum.wat:
Source/JavaScriptCore:
This patch implements a feature importing globals to/from wasm modules.
Since we are not supporting mutable globals now, we can just copy the
global data when importing. Currently we do not support importing/exporting
i64 globals. This will be supported once (1) mutable global bindings are
specified and (2) BigInt based i64 importing/exporting is specified.
- wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
- 6:01 AM Changeset in webkit [230762] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, fix build on ARM
- assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::readCallTarget):
- 4:09 AM Changeset in webkit [230761] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, fix build with GCC
- assembler/LinkBuffer.h:
(JSC::LinkBuffer::finalizeCodeWithDisassembly):
- 3:42 AM Changeset in webkit [230760] by
-
- 9 edits in trunk/LayoutTests
Test gardening.
https://bugs.webkit.org/show_bug.cgi?id=184726
Unreviewed test gardening.
LayoutTests/imported/w3c:
- web-platform-tests/touch-events/historical-expected.txt: update expectation to test change
LayoutTests:
Update expectations.
- platform/gtk/TestExpectations:
- platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
- platform/wpe/TestExpectations:
- platform/wpe/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:
- platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
- platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt:
- 3:03 AM WebKitGTK/Gardening/Calendar edited by
- (diff)
- 2:47 AM Changeset in webkit [230759] by
-
- 25 edits1 copy65 adds in trunk
Unreviewed, reland r230697, r230720, and r230724.
https://bugs.webkit.org/show_bug.cgi?id=184600
JSTests:
- wasm.yaml:
- wasm/modules/constant.wasm: Added.
- wasm/modules/constant.wat: Added.
- wasm/modules/default-import-star-error.js: Added.
(then):
- wasm/modules/default-import-star-error/entry.wasm: Added.
- wasm/modules/default-import-star-error/entry.wat: Added.
- wasm/modules/default-import-star-error/t0.js: Added.
- wasm/modules/default-import-star-error/t1.js: Added.
- wasm/modules/default-import-star-error/t2.js: Added.
(export.default.Cocoa):
- wasm/modules/js-wasm-cycle.js: Added.
- wasm/modules/js-wasm-cycle/entry.js: Added.
(from.string_appeared_here.export.return42):
- wasm/modules/js-wasm-cycle/sum.wasm: Added.
- wasm/modules/js-wasm-cycle/sum.wat: Added.
- wasm/modules/js-wasm-function-namespace.js: Added.
(assert.throws):
- wasm/modules/js-wasm-function.js: Added.
(assert.throws):
- wasm/modules/js-wasm-global-namespace.js: Added.
(assert.throws):
- wasm/modules/js-wasm-global.js: Added.
(assert.throws):
- wasm/modules/js-wasm-memory-namespace.js: Added.
(assert.throws):
- wasm/modules/js-wasm-memory.js: Added.
(assert.throws):
- wasm/modules/js-wasm-start.js: Added.
(then):
- wasm/modules/js-wasm-table-namespace.js: Added.
(assert.throws):
- wasm/modules/js-wasm-table.js: Added.
(assert.throws):
- wasm/modules/memory.wasm: Added.
- wasm/modules/memory.wat: Added.
- wasm/modules/run-from-wasm.wasm: Added.
- wasm/modules/run-from-wasm.wat: Added.
- wasm/modules/run-from-wasm/check.js: Added.
(export.check):
- wasm/modules/start.wasm: Added.
- wasm/modules/start.wat: Added.
- wasm/modules/sum.wasm: Added.
- wasm/modules/sum.wat: Added.
- wasm/modules/table.wasm: Added.
- wasm/modules/table.wat: Added.
- wasm/modules/wasm-imports-js-exports.js: Added.
- wasm/modules/wasm-imports-js-exports/imports.wasm: Added.
- wasm/modules/wasm-imports-js-exports/imports.wat: Added.
- wasm/modules/wasm-imports-js-exports/sum.js: Added.
(export.sum):
- wasm/modules/wasm-imports-js-re-exports-wasm-exports.js: Added.
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wasm: Added.
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wat: Added.
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/re-export.js: Added.
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wasm: Added.
- wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wat: Added.
- wasm/modules/wasm-imports-wasm-exports.js: Added.
- wasm/modules/wasm-imports-wasm-exports/imports.wasm: Added.
- wasm/modules/wasm-imports-wasm-exports/imports.wat: Added.
- wasm/modules/wasm-imports-wasm-exports/sum.wasm: Added.
- wasm/modules/wasm-imports-wasm-exports/sum.wat: Added.
- wasm/modules/wasm-js-cycle.js: Added.
- wasm/modules/wasm-js-cycle/entry.wasm: Added.
- wasm/modules/wasm-js-cycle/entry.wat: Added.
- wasm/modules/wasm-js-cycle/sum.js: Added.
(from.string_appeared_here.export.sum):
- wasm/modules/wasm-wasm-cycle.js: Added.
- wasm/modules/wasm-wasm-cycle/entry.wasm: Added.
- wasm/modules/wasm-wasm-cycle/entry.wat: Added.
- wasm/modules/wasm-wasm-cycle/sum.wasm: Added.
- wasm/modules/wasm-wasm-cycle/sum.wat: Added.
Source/JavaScriptCore:
With CatchScope check.
- JavaScriptCore.xcodeproj/project.pbxproj:
- builtins/ModuleLoaderPrototype.js:
(globalPrivate.newRegistryEntry):
(requestInstantiate):
(link):
- jsc.cpp:
(convertShebangToJSComment):
(fillBufferWithContentsOfFile):
(fetchModuleFromLocalFileSystem):
(GlobalObject::moduleLoaderFetch):
(functionDollarAgentStart):
(checkException):
(runWithOptions):
- parser/NodesAnalyzeModule.cpp:
(JSC::ImportDeclarationNode::analyzeModule):
- parser/SourceProvider.h:
(JSC::WebAssemblySourceProvider::create):
(JSC::WebAssemblySourceProvider::WebAssemblySourceProvider):
- runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::hostResolveImportedModule):
(JSC::AbstractModuleRecord::resolveImport):
(JSC::AbstractModuleRecord::link):
(JSC::AbstractModuleRecord::evaluate):
(JSC::identifierToJSValue): Deleted.
- runtime/AbstractModuleRecord.h:
(JSC::AbstractModuleRecord::moduleEnvironmentMayBeNull):
(JSC::AbstractModuleRecord::ImportEntry::isNamespace const): Deleted.
- runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::getOwnNonIndexPropertyNames):
- runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::evaluate):
- runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::link):
(JSC::JSModuleRecord::instantiateDeclarations):
- runtime/JSModuleRecord.h:
- runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeParseModule):
(JSC::moduleLoaderPrototypeRequestedModules):
(JSC::moduleLoaderPrototypeModuleDeclarationInstantiation):
- wasm/WasmCreationMode.h: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.h.
- wasm/js/JSWebAssemblyHelpers.h:
(JSC::getWasmBufferFromValue):
(JSC::createSourceBufferFromValue):
- wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::createPrivateModuleKey):
(JSC::JSWebAssemblyInstance::create):
- wasm/js/JSWebAssemblyInstance.h:
- wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::prepareLink):
(JSC::WebAssemblyModuleRecord::link):
- wasm/js/WebAssemblyModuleRecord.h:
- wasm/js/WebAssemblyPrototype.cpp:
(JSC::resolve):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::WebAssemblyPrototype::instantiate):
(JSC::webAssemblyInstantiateFunc):
(JSC::webAssemblyValidateFunc):
- wasm/js/WebAssemblyPrototype.h:
Tools:
- Scripts/run-jsc-stress-tests:
- 1:36 AM Changeset in webkit [230758] by
-
- 1 copy in releases/WebKitGTK/webkit-2.21.1
WebKitGTK+ 2.21.1
- 1:35 AM Changeset in webkit [230757] by
-
- 4 edits in trunk
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.1 release.
.:
- Source/cmake/OptionsGTK.cmake: Bump version numbers.
Source/WebKit:
- gtk/NEWS: Add release notes for 2.21.1.
- 1:33 AM Changeset in webkit [230756] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed. Remove symbols from webkitglib-symbols.map.
Remove symbols not present in WebKit.
- webkitglib-symbols.map:
- 12:42 AM Changeset in webkit [230755] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed. Add missing symbols to webkitglib-symbols.map.
Add symbols global in JSC and present in WebKit.
- webkitglib-symbols.map:
- 12:33 AM Changeset in webkit [230754] by
-
- 2 edits in trunk/Source/WebKit
[Win][WebKit] Implement InjectedBundleWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=184525
Reviewed by Konstantin Tokarev.
- WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
(WebKit::InjectedBundle::initialize):