forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 0
merge #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sunyuping
wants to merge
10,000
commits into
sunyuping:master
Choose a base branch
from
WebKit:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
merge #1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…logic https://bugs.webkit.org/show_bug.cgi?id=196183 Reviewed by Dean Jackson. Source/WebCore: Make getters return raw refs/pointers and provide const versions if necessary. All Web GPU objects are non-nullable, but become no-op if invalid, and descriptors are not moved unless needed. No new tests; no change in behavior. Getter updates and const qualifications: * Modules/webgpu/WebGPUAdapter.h: (WebCore::WebGPUAdapter::options const): * Modules/webgpu/WebGPUBindGroup.h: (WebCore::WebGPUBindGroup::bindGroup): (WebCore::WebGPUBindGroup::bindGroup const): Deleted. * Modules/webgpu/WebGPUBindGroupDescriptor.cpp: (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const): * Modules/webgpu/WebGPUBindGroupDescriptor.h: * Modules/webgpu/WebGPUBindGroupLayout.h: (WebCore::WebGPUBindGroupLayout::bindGroupLayout const): * Modules/webgpu/WebGPUBuffer.h: (WebCore::WebGPUBuffer::buffer): (WebCore::WebGPUBuffer::buffer const): * Modules/webgpu/WebGPURenderPassDescriptor.cpp: (WebCore::WebGPURenderPassDescriptor::tryCreateGPURenderPassDescriptor const): * Modules/webgpu/WebGPURenderPassEncoder.cpp: (WebCore::WebGPURenderPassEncoder::setVertexBuffers): * Modules/webgpu/WebGPUSampler.h: (WebCore::WebGPUSampler::sampler const): * Modules/webgpu/WebGPUSwapChain.h: (WebCore::WebGPUSwapChain::swapChain): (WebCore::WebGPUSwapChain::swapChain const): Deleted. * Modules/webgpu/WebGPUTexture.h: (WebCore::WebGPUTexture::texture): (WebCore::WebGPUTexture::texture const): Deleted. * Modules/webgpu/WebGPUTextureView.h: (WebCore::WebGPUTextureView::texture): (WebCore::WebGPUTextureView::texture const): Deleted. * platform/graphics/gpu/GPUBindGroupBinding.h: * platform/graphics/gpu/GPUBindGroupDescriptor.h: * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: (WebCore::tryGetResourceAsMTLSamplerState): Web GPU object creation logic: * Modules/webgpu/WebGPUCommandEncoder.cpp: (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const): (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const): (WebCore::WebGPUCommandEncoder::beginRenderPass): (WebCore::WebGPUCommandEncoder::copyBufferToBuffer): * Modules/webgpu/WebGPUCommandEncoder.h: * Modules/webgpu/WebGPUDevice.cpp: (WebCore::WebGPUDevice::createBuffer const): (WebCore::WebGPUDevice::createTexture const): (WebCore::WebGPUDevice::createPipelineLayout const): (WebCore::WebGPUDevice::createBindGroup const): (WebCore::WebGPUDevice::createShaderModule const): (WebCore::WebGPUDevice::createRenderPipeline const): (WebCore::WebGPUDevice::getQueue const): * Modules/webgpu/WebGPUDevice.h: * Modules/webgpu/WebGPUPipelineLayout.cpp: (WebCore::WebGPUPipelineLayout::create): (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout): * Modules/webgpu/WebGPUPipelineLayout.h: (WebCore::WebGPUPipelineLayout::pipelineLayout): * Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp: (WebCore::WebGPUPipelineLayoutDescriptor::tryCreateGPUPipelineLayoutDescriptor const): * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: * Modules/webgpu/WebGPUQueue.cpp: (WebCore::WebGPUQueue::create): (WebCore::WebGPUQueue::WebGPUQueue): (WebCore::WebGPUQueue::submit): * Modules/webgpu/WebGPUQueue.h: * Modules/webgpu/WebGPUShaderModule.cpp: (WebCore::WebGPUShaderModule::create): (WebCore::WebGPUShaderModule::WebGPUShaderModule): * Modules/webgpu/WebGPUShaderModule.h: (WebCore::WebGPUShaderModule::module const): * platform/graphics/gpu/GPUBuffer.h: * platform/graphics/gpu/GPUDevice.cpp: (WebCore::GPUDevice::tryCreateBuffer): (WebCore::GPUDevice::tryCreateTexture const): (WebCore::GPUDevice::tryCreateShaderModule const): (WebCore::GPUDevice::tryCreateRenderPipeline const): (WebCore::GPUDevice::tryGetQueue const): (WebCore::GPUDevice::createShaderModule const): Deleted. (WebCore::GPUDevice::createRenderPipeline const): Deleted. (WebCore::GPUDevice::getQueue const): Deleted. * platform/graphics/gpu/GPUDevice.h: * platform/graphics/gpu/GPUPipelineLayout.cpp: (WebCore::GPUPipelineLayout::create): (WebCore::GPUPipelineLayout::GPUPipelineLayout): * platform/graphics/gpu/GPUPipelineLayout.h: (WebCore::GPUPipelineLayout::bindGroupLayouts const): * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: * platform/graphics/gpu/GPURenderPipeline.h: * platform/graphics/gpu/GPUShaderModule.h: * platform/graphics/gpu/cocoa/GPUBufferMetal.mm: (WebCore::GPUBuffer::tryCreate): (WebCore::GPUBuffer::GPUBuffer): (WebCore::GPUBuffer::setSubData): * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm: (WebCore::GPUCommandBuffer::tryCreate): * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm: (WebCore::GPUDevice::tryCreate): * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: (WebCore::GPURenderPipeline::tryCreate): (WebCore::GPURenderPipeline::GPURenderPipeline): (WebCore::GPURenderPipeline::create): Deleted. * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm: (WebCore::GPUShaderModule::tryCreate): (WebCore::GPUShaderModule::create): Deleted. Add WebGPUPipelineLayoutDescriptor.cpp to project: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: LayoutTests: GPUShaderModule is no longer nullable. * webgpu/shader-modules.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196309 Reviewed by Dewei Zhu. * BuildSlaveSupport/ews-app/ews/templates/statusbubble.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…d fails https://bugs.webkit.org/show_bug.cgi?id=196156 Reviewed by Alex Christensen. In order to help track the connection between a failed resource-load and a user-visible error message, include the CFNetworking task UUID in the associated error as an element of the userInfo property. This can then be pulled out and reported in the logging at the point the error is reported to the user. * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-italic.html https://bugs.webkit.org/show_bug.cgi?id=196112 Unreviewed test gardening. * platform/ios-simulator-wk2/TestExpectations: * platform/mac/TestExpectations: Marking tests as flaky git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
… in WebKit.framework/XPCServices/ https://bugs.webkit.org/show_bug.cgi?id=196317 Reviewed by Dan Bernstein. Source/WebKit: Removed some remnants of the Storage Process. * Configurations/BaseTarget.xcconfig: * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Removed. * WebKit.xcodeproj/project.pbxproj: Tools: package-root copies built products into a staging directory using ditto(1), which does not follow symbolic links as it traverses a directory. Now that the files in WebKit.framework/XPCServices/ are symbolic links to a location outside of the framework itself, these become broken links when ditto'd into the staging directory. To account for this, change package-root to copy using cp(1) in a mode that follows symlinks. * Scripts/package-root: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196173 Reviewed by Tim Horton. Introduce a mechanism that allows us to insert code from WebKitAdditions into public or private SDK headers using `#import`s of the form: ``` #if USE(APPLE_INTERNAL_SDK) #import <WebKitAdditions/WKWebViewConfigurationAdditions.h> #endif ``` The resulting header in the built products directory will contain the contents of the imported file inserted in place of the `#if USE(APPLE_INTERNAL_SDK) … #endif` block; however, when building with the Apple internal SDK, the additions header content will be imported by the usual means. * mac/postprocess-framework-headers.sh: * mac/replace-webkit-additions-includes.py: Added. Add a step when post-processing framework headers to replace instances of `#if USE(APPLE_INTERNAL_SDK) … #endif` with the text content of the additions files. The replacement script first searches in the built products directory for the matching additions file, and falls back to the SDK if no matching file is found. If neither are present (e.g. a build using the public SDK), then the block is simply replaced by the empty string. (read_content_from_webkit_additions): (main): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196329 * platform/gtk/TestExpectations: * platform/gtk/http/tests/inspector/network/har/har-page-expected.txt: * platform/gtk/http/tests/inspector/network/resource-sizes-network-expected.txt: * platform/gtk/js/intl-datetimeformat-expected.txt: Added. * platform/wpe/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196333 <rdar://problem/47693367> Reviewed by Tim Horton. When opening a new WKSystemPreviewView, we were exiting if there was no presentingViewController. This code was unnecessary, and causing blank content when opening a new tab. * UIProcess/ios/WKSystemPreviewView.mm: (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]): Remove the code looking for a presentingViewController. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…nto double format https://bugs.webkit.org/show_bug.cgi?id=196313 <rdar://problem/49306703> Reviewed by Yusuke Suzuki. JSTests: * stress/validate-int-52-ai-state.js: Added. Source/JavaScriptCore: * dfg/DFGOSREntry.cpp: (JSC::DFG::prepareOSREntry): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::validateAIState): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196334 Reviewed by Yusuke Suzuki. PerformanceTests: * JetStream2/JetStreamDriver.js: (toTimeValue): (Driver.prototype.async.reportScoreToRunBenchmarkRunner): Websites/browserbench.org: * JetStream2.0/JetStreamDriver.js: (toTimeValue): (Driver.prototype.async.reportScoreToRunBenchmarkRunner): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…focus while popup was previosuly shown https://bugs.webkit.org/show_bug.cgi?id=196336 Reviewed by Tim Horton. Source/WebCore: * rendering/RenderMenuList.cpp: (RenderMenuList::popupDidHide): Added a comment. Source/WebKit: The bug was caused by WebPopupMenu::hide never notifying PopupClient that the popup had been dismissed. This resulted in RenderMenuList::m_popupIsVisible to be never reset. Also fixed a bug in WebPopupMenuProxyMac::hidePopupMenu that this function was never dismissing the popup as the selector "dismissPopUp", on the contrary to its name, does not dimiss the popup. Send cancelTracking to NSMenu instead, which DOES dismiss the popup. Tests: fast/forms/select/mac-wk2/blur-dismisses-select-popup.html fast/forms/select/mac-wk2/open-select-popup-after-dismissing-by-blur.html * UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::hidePopupMenu): * WebProcess/WebCoreSupport/WebPopupMenu.cpp: (WebKit::WebPopupMenu::hide): Source/WebKitLegacy/mac: Fixed the bug that we were not actually dismissing the popup in PopupMenuMac::hide as done in WebKit2. Unfortunately no new tests since intenals.isSelectPopupVisible would always return false in WebKit1. * WebCoreSupport/PopupMenuMac.mm: (PopupMenuMac::hide): LayoutTests: Added regression tests for dismissing the select element's popup menu by bluring the element then re-opening the popup. Unfortunately these tests are only enabled in WebKit2 since intenals.isSelectPopupVisible would always return false in WebKit1. * TestExpectations: * fast/forms/select/mac-wk2: Added. * fast/forms/select/mac-wk2/blur-dismisses-select-popup-expected.html: Added. * fast/forms/select/mac-wk2/blur-dismisses-select-popup.html: Added. * fast/forms/select/mac-wk2/open-select-popup-after-dismissing-by-blur-expected.txt: Added. * fast/forms/select/mac-wk2/open-select-popup-after-dismissing-by-blur.html: Added. * platform/mac-wk2/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=161493 Reviewed by Michael Catanzaro. Source/WebCore: Use the first glyph origin as the initial advance of every complex text run. * platform/graphics/cairo/FontCairo.cpp: (WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance. * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance. LayoutTests: Rebaseline fast/text/international/hebrew-vowels.html. * platform/gtk/fast/text/international/hebrew-vowels-expected.png: * platform/gtk/fast/text/international/hebrew-vowels-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196310 Patch by Víctor Manuel Jáquez Leal <[email protected]> on 2019-03-28 Reviewed by Michael Catanzaro. Source/JavaScriptCore: Initialize variable with default constructor. * API/glib/JSCOptions.cpp: (jsc_options_foreach): Source/WebCore: No change in behavior. * accessibility/AccessibilityObject.h: add missing override clause. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcChangeState): add missing format string to log. * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: add missing virtual destructor. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: add missing override clause and remove unused private member. Source/WebKit: * UIProcess/API/glib/WebKitInjectedBundleClient.cpp: add missing override clause. * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h: add missing override clause. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ile running IndexedDB/large-number-of-inserts.html https://bugs.webkit.org/show_bug.cgi?id=195952 Unreviewed test gardening. * Skipped: Skip the affected test so the bot will finish the run. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196338 <rdar://problem/47975167> Reviewed by Daniel Bates. Source/WebCore: Disable simple line layout unconditionally on non-auto text-underline-position content. We don't support it yet. Test: fast/text/simple-line-layout-with-text-underline-position.html * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseForStyle): LayoutTests: * fast/text/simple-line-layout-with-text-underline-position-expected.html: Added. * fast/text/simple-line-layout-with-text-underline-position.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196322 <rdar://problem/49229632> Reviewed by Wenson Hsieh. Stop taking advantage of -[WKContentView inputView] being called when we invoke -reloadInputViews to "lazily" allocate the input peripheral for the currently focused element. In theory, UIKit only needs to call -inputView when it actually needs to display the input view (the keyboard). For popup menu buttons, like <select>, no keyboard is needed. Instead we should create the peripheral as part of the logic in the UI process to focus a new element before we call -reloadInputViews. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView inputView]): Extract logic to allocate the peripheral from here and moved it to createInputPeripheralWithView(). (-[WKContentView accessoryTab:]): While I am here, add a FIXME comment to explain why we need to end the input sessions and nullify the input peripheral before we tell the web process to switch focus as opposed to letting this happen after the web process tells us it focused a new element. (createInputPeripheralWithView): Added. (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): Write in terms of createInputPeripheralWithView(). Create the input peripheral after becoming first responder because creating the peripheral has known side-effects: for popup buttons it tells the popup controller to present the popover. For key input to popovers to work from the get-go, the content view must be the first responder. See <https://bugs.webkit.org/show_bug.cgi?id=196272> for more details. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…hoto after scrolling https://bugs.webkit.org/show_bug.cgi?id=196330 rdar://problem/49100304 Source/WebCore: Reviewed by Antti Koivisto. When we call ScrollingTree::applyLayerPositions() on the main thread after a flush, we need to ensure that the most recent version of the scrolling tree has been committed, because it has to have state (like requested scroll position and layout viewport rect) that match the layer flush. To fix this we have to have the main thread wait for the commit to complete, so ThreadedScrollingTree keeps track of a pending commit count, and uses a condition variable to allow the main thread to safely wait for it to reach zero. Tracing shows that this works as expected, and the main thread is never blocked for more than a few tens of microseconds. Also lock the tree mutex in ScrollingTree::handleWheelEvent(), since we enter the scrolling tree here and we don't want that racing with applyLayerPositions() on the main thread. Test: scrollingcoordinator/mac/fixed-scrolled-body.html * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::handleWheelEvent): (WebCore::ScrollingTree::applyLayerPositions): * page/scrolling/ScrollingTree.h: * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::commitTreeState): (WebCore::ThreadedScrollingTree::incrementPendingCommitCount): (WebCore::ThreadedScrollingTree::decrementPendingCommitCount): (WebCore::ThreadedScrollingTree::waitForPendingCommits): (WebCore::ThreadedScrollingTree::applyLayerPositions): * page/scrolling/ThreadedScrollingTree.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::commitTreeState): LayoutTests: Reviewed by NOBODY (OOPS!). * scrollingcoordinator/mac/fixed-scrolled-body-expected.html: Added. * scrollingcoordinator/mac/fixed-scrolled-body.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…t setting error https://bugs.webkit.org/show_bug.cgi?id=186276 Reviewed by Carlos Garcia Campos. Source/WebKit: Currently it's possible for webkit_web_resource_get_data_finish() to return NULL without setting the error parameter. This is illegal because it is an API guarantee (and a GObject convention) that if an error parameter exists, it should be set whenever a function call returns NULL. Epiphany correctly dereferences the error in this case without checking if it is NULL, because it knows it does not have to, and crashes. Fix this. We'll return a byte array of length 1 containing a NUL character. This isn't great, but there's not really any better solution without deprecating the API or returning an error code to indicate an empty resource, and it at least fixes the Epiphany crash. This does not fix bug #186276, in which this function incorrectly returns no data when it ought to. But that is a different bug. Now, at least we won't crash when no data is available. * UIProcess/API/glib/WebKitWebResource.cpp: (resourceDataCallback): Tools: * TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp: (webViewLoadChanged): (testWebResourceGetDataError): (testWebResourceGetDataEmpty): (beforeAll): (webViewloadChanged): Deleted. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196321 Reviewed by Geoffrey Garen. Use the SourceProvider's URL to make sure that the hosts match for the two SourceCodeKeys in operator==. * parser/SourceCodeKey.h: (JSC::SourceCodeKey::host const): (JSC::SourceCodeKey::operator== const): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…eek() https://bugs.webkit.org/show_bug.cgi?id=196352 Reviewed by Xabier Rodriguez-Calvar. MediaPlayerPrivateGStreamerMSE overrides doSeek() and seek(), so this branch is never reached. This patch does not introduce behavior changes. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::doSeek): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ent as an observer https://bugs.webkit.org/show_bug.cgi?id=196324 <rdar://problem/49357109> Reviewed by Matt Baker. No change in functionality. * html/CanvasBase.cpp: (WebCore::CanvasBase::notifyObserversCanvasChanged): (WebCore::CanvasBase::notifyObserversCanvasResized): (WebCore::CanvasBase::notifyObserversCanvasDestroyed): * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::frameNavigated): (WebCore::InspectorCanvasAgent::bindCanvas): (WebCore::InspectorCanvasAgent::unbindCanvas): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=196357 Unreviewed test gardening. * platform/ios-simulator-wk2/TestExpectations: Updating test expectations for flaky failure git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196358 Unreviewed test gardening. * platform/ios-simulator-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: Updating test expectations for flaky failure git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196316 <rdar://problem/49352679> Reviewed by Devin Rousso. * UserInterface/Controllers/NetworkManager.js: (WI.NetworkManager.prototype.resourceRequestWillBeSent): (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache): (WI.NetworkManager.prototype._initiatorCallFramesFromPayload): Initialize call frames from the initiator payload. * UserInterface/Models/Resource.js: (WI.Resource.prototype.get initiatorCallFrames): Initialization and accessor. * UserInterface/Views/CallFrameTreeElement.js: (WI.CallFrameTreeElement): Selecting a native element won't do anything so just don't allow selection. * UserInterface/Views/ResourceHeadersContentView.css: (.resource-headers .go-to-link): (.resource-headers .call-stack): (.resource-headers .call-stack:hover): (@media (prefers-color-scheme: dark)): * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView): (WI.ResourceHeadersContentView.prototype.hidden): (WI.ResourceHeadersContentView.prototype._refreshSummarySection): Add an "Initiator" line in the summary with a way to view the whole initiator backtrace if one exists. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…nfo::infoForExistingObjectStore https://bugs.webkit.org/show_bug.cgi?id=196120 <rdar://problem/39869767> Reviewed by Ryosuke Niwa. No new tests because it is unclear how the crash happens. Added release logging to help debug. * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex): (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* bindings/js/ScriptController.cpp: (WebCore::ScriptController::shouldAllowUserAgentScripts const): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196341 Reviewed by Saam Barati. Previously, we created Objective-C weak map to maintain JSVirtualMachine and JSContext wrappers corresponding to VM and JSGlobalObject. But Objective-C weak map is really memory costly. Even if the entry is only one, it consumes 2.5KB per weak map. Since we can modify JSC intrusively for JavaScriptCore.framework (and we already did it, like, holding JSWrapperMap in JSGlobalObject), we can just hold a pointer to a wrapper in VM and JSGlobalObject. This patch adds void* members to VM and JSGlobalObject, which holds a non-strong reference to a wrapper. When a wrapper is gone, we clear this pointer too. This removes unnecessary two Objective-C weak maps, and save 5KB. * API/JSContext.mm: (-[JSContext initWithVirtualMachine:]): (-[JSContext dealloc]): (-[JSContext initWithGlobalContextRef:]): (-[JSContext wrapperMap]): (+[JSContext contextWithJSGlobalContextRef:]): * API/JSVirtualMachine.mm: (-[JSVirtualMachine initWithContextGroupRef:]): (-[JSVirtualMachine dealloc]): (+[JSVirtualMachine virtualMachineWithContextGroupRef:]): (scanExternalObjectGraph): (scanExternalRememberedSet): (initWrapperCache): Deleted. (wrapperCache): Deleted. (+[JSVMWrapperCache addWrapper:forJSContextGroupRef:]): Deleted. (+[JSVMWrapperCache wrapperForJSContextGroupRef:]): Deleted. (-[JSVirtualMachine contextForGlobalContextRef:]): Deleted. (-[JSVirtualMachine addContext:forGlobalContextRef:]): Deleted. * API/JSVirtualMachineInternal.h: * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::setAPIWrapper): (JSC::JSGlobalObject::apiWrapper const): * runtime/VM.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant showImageSheet]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView actionSheetAssistant:showCustomSheetForElement:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* wtf/Platform.h: It is no longer necessary to exclude this from PLATFORM(IOSMAC). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* web-platform-tests/html/dom/interfaces-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…OrContiguous https://bugs.webkit.org/show_bug.cgi?id=196574 Reviewed by Saam Barati. JSTests: * stress/string-index-of-exception-check.js: Added. (blurType): (1.forEach): Source/JavaScriptCore: This patch adds missing exception check in operationArrayIndexOfValueInt32OrContiguous. * dfg/DFGOperations.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ity mode by default https://bugs.webkit.org/show_bug.cgi?id=196526 <rdar://problem/49532923> Reviewed by Tim Horton. Change UseModernCompatibilityModeByDefault from an internal preference to a debug preference, so that it may be enabled for all apps on the system. * Shared/WebPreferences.yaml: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196553 Reviewed by Eric Carlson. * Source/third_party/boringssl/src/fuzz: Removed. * Source/third_party/protobuf/csharp/keys: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196553 Reviewed by Eric Carlson. * Source/third_party/boringssl/src/fuzz: Removed. * Source/third_party/protobuf/csharp/keys: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ject::execInline https://bugs.webkit.org/show_bug.cgi?id=196477 Reviewed by Keith Miller. Source/JavaScriptCore: The problem here is that when we advance the index by 2 for a character class that only has non-BMP characters, we might go past the end of the string. This can happen for greedy counted character classes that are part of a alternative where there is one character to match after the greedy non-BMP character class. The "do we have string left to match" check at the top of the JIT loop for the counted character class checks to see if index is not equal to the string length. For non-BMP character classes, we need to check to see if there are at least 2 characters left. Therefore we now temporarily add 1 to the current index before comparing. This checks to see if there are iat least 2 characters left to match, instead of 1. * yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy): LayoutTests: Updated the test with a couple more test cases to test a few variants of this bug. Also added a couple of non-greedy counted non-BMP character class tests that don't have the bug just to be sure. * js/regexp-unicode-expected.txt: * js/script-tests/regexp-unicode.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…tml is a flaky failure and timeout https://bugs.webkit.org/show_bug.cgi?id=196115 Unreviewed test gardening. * platform/mac-wk2/TestExpectations: Updating test expectations for flaky test git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196575 Unreviewed. PerformanceTests: * MotionMark/resources/debug-runner/motionmark.css: (#intro .start-benchmark p): Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: This is an unreviewed partial revert of r243819. Turns out there are some websites which use this property to do browser detection. So, we need to continue to parse the property, but we don't need the property to do anything. Test: fast/text/trailing-word-detection.html * Configurations/FeatureDefines.xcconfig: * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator TrailingWord const): * css/CSSProperties.json: * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): (WebCore::CSSParserFastPaths::isKeywordPropertyID): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::trailingWord const): (WebCore::RenderStyle::setTrailingWord): (WebCore::RenderStyle::initialTrailingWord): * rendering/style/RenderStyleConstants.h: Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: * fast/text/trailing-word-detection-expected.txt: Added. * fast/text/trailing-word-detection.html: Added. * platform/gtk/TestExpectations: * platform/win/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196577 <rdar://problem/34841155> Reviewed by Lucas Forschler. * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager.run): Upload results after each device shard, since the configuration will be different for each device. (Manager._results_to_upload_json_trie): Convert a TestRunResults object to a trie to be uploaded to a results database. * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): Add new 'Upload Options' and prepare 'Results JSON Options' for deprecation. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196586 Reviewed by Saam Barati. Towards deterministic tests for the results from randomizing fuzzer agent, this patch adds Options::dumpRandomizingFuzzerAgentPredictions, which dumps the generated types. The results is like this. getPrediction name:(#C2q9xD),bytecodeIndex:(22),original:(Array),generated:(OtherObj|Array|Float64Array|BigInt|NonIntAsDouble) getPrediction name:(makeUnwriteableUnconfigurableObject#AiEJv1),bytecodeIndex:(14),original:(OtherObj),generated:(Final|Uint8Array|Float64Array|SetObject|WeakSetObject|BigInt|NonIntAsDouble) * runtime/Options.cpp: (JSC::recomputeDependentOptions): * runtime/Options.h: * runtime/RandomizingFuzzerAgent.cpp: (JSC::RandomizingFuzzerAgent::getPrediction): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ateWithRange https://bugs.webkit.org/show_bug.cgi?id=196579 Reviewed by Simon Fraser. Avoid crashing accessing the unengated optional's value in relese builds for now. Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject getting out out of sync would require a significant re-architecturing of the whole selection repainting / state managing mechanism. * rendering/SelectionRangeData.h: (WebCore::SelectionRangeData::startPosition const): (WebCore::SelectionRangeData::endPosition const): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…orner rect till it collapses https://bugs.webkit.org/show_bug.cgi?id=196518 Patch by Said Abou-Hallawa <[email protected]> on 2019-04-03 Reviewed by Simon Fraser. Source/WebCore: r220717 made RenderSVGRect clear its m_path in updateShapeFromElement(). RenderSVGRect tries to optimize its layout and drawing if the rectangle is not rounded. So it uses the flag m_usePathFallback to know whether to use m_path or m_innerStrokeRect and m_outerStrokeRect. If the rectangle is rounded but its boundingSize is empty, m_path will be cleared, m_innerStrokeRect and m_outerStrokeRect will be recalculated but m_usePathFallback will not be reset to false. Therefore when calling RenderSVGRect::isEmpty(), it will call RenderSVGShape::isEmpty() which will assert since m_path is null. Test: svg/animations/animate-rounded-corner-rect-zero-height.svg * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): Reset m_usePathFallback to false once clearPath() is called. LayoutTests: * svg/animations/animate-rounded-corner-rect-zero-height-expected.txt: Added. * svg/animations/animate-rounded-corner-rect-zero-height.svg: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196571 Reviewed by Zalan Bujtas. m_requestedScrollPosition and m_requestedScrollPositionRepresentsProgrammaticScroll were duplicated on ScrollingStateFrameScrollingNode and ScrollingStateScrollingNode, so remove them from the derived class. * page/scrolling/ScrollingStateFrameScrollingNode.cpp: (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const): * page/scrolling/ScrollingStateFrameScrollingNode.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…o-one uses it https://bugs.webkit.org/show_bug.cgi?id=196587 Reviewed by Zalan Bujtas. This argument was unused. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::requestScroll): * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::requestScroll): * UIProcess/API/wpe/PageClientImpl.h: * UIProcess/PageClient.h: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestScroll): * UIProcess/WebPageProxy.h: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::requestScroll): * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::requestScroll): * UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::requestScroll): * UIProcess/win/PageClientImpl.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…process swap or crash https://bugs.webkit.org/show_bug.cgi?id=196588 <rdar://problem/49365787> Reviewed by Ryosuke Niwa. Source/WebKit: The page's focusedFrame / frameSetLargestFrame do not get cleared on process swap or crash. This can lead to returning stale frames to the client if it asks for those. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetState): Tools: Add API test coverage. * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: (TestWebKitAPI::nullJavaScriptCallback): (TestWebKitAPI::didCrashCheckFrames): (TestWebKitAPI::TEST): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: (TestWebKitAPI::TEST): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196573 Reviewed by Eric Carlson. Source/ThirdParty/libwebrtc: Expand macros directly to add some logging. Removed the dispatch_once since VPModuleInitialize is already called in one. * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp: (webrtc::initVideoProcessingVPModuleInitialize): Source/WebCore: Add some ASSERTs. No change of behavior. * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp: (WebCore::LibWebRTCProviderCocoa::createDecoderFactory): (WebCore::LibWebRTCProviderCocoa::createEncoderFactory): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=194081 Reviewed by Filip Pizlo. JSTests: Added three microbenchmarks: - add-tree should be the ideal case, but there is no speedup because we are currently unable to prove that the CheckAdd won't overflow - bit-xor-tree most closely matches the situation where the optimization triggers on the JetStream2 subtests where it triggers: an unbalanced expression tree of size 8 that can be balanced, with no other optimizations being unlocked. 16% speedup - bit-or-tree is an ideal case, where the reassociation also enables a ton of further simplifications. 42% speedup * microbenchmarks/add-tree.js: Added. * microbenchmarks/bit-or-tree.js: Added. * microbenchmarks/bit-xor-tree.js: Added. Source/JavaScriptCore: This patch adds a new B3 pass, that tries to find and optimize expression trees made purely of any one associative and commutative operator (Add/Mul/BitOr/BitAnd/BitXor). The pass only runs in O2, and runs once, after lowerMacros and just before a run of B3ReduceStrength (which helps clean up the dead code it tends to leave behind). I had to separate killDeadCode out of B3ReduceStrength (as a new B3EliminateDeadCode pass) to run it before B3OptimizeAssociativeExpressionTrees, as otherwise it is stopped by high use counts inherited from CSE. This extra run of DCE is by itself a win, most notably on microbenchmarks/instanceof-always-hit-two (1.5x faster), and on microbenchmarks/licm-dragons(-out-of-bounds) (both get 1.16x speedup). I suspect it is because it runs between CSE and tail-dedup, and as a result allows a lot more tail-dedup to occur. The pass is currently extremely conservative, not trying anything if it would cause _any_ code duplication. For this purpose, it starts by computing use counts for the potentially interesting nodes (those with the right opcodes), and segregate them into expression trees. The root of an expression tree is a node that is either used in multiple places, or is used by a value with a different opcode. The leaves of an expression tree are nodes that are either used in multiple places, or have a different opcode. All constant leaves of a tree are combined, as well as all leaves that are identical. What remains is then laid out into a balanced binary tree, hopefully maximizing ILP. This optimization was implemented as a stand-alone pass and not as part of B3ReduceStrength mostly because it needs use counts to avoid code duplication. It also benefits from finding all tree roots first, and not trying to repeatedly optimize subtrees. I added several tests to testB3 with varying patterns of trees. It is also tested in a less focused way by lots of older tests. In the future this pass could be expanded to allow some bounded amount of code duplication, and merging more leaves (e.g. Mul(a, 3) and a in an Add tree, into Mul(a, 4)) The latter will need exposing the peephole optimizations out of B3ReduceStrength to avoid duplicating code. * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * b3/B3Common.cpp: (JSC::B3::shouldDumpIR): (JSC::B3::shouldDumpIRAtEachPhase): * b3/B3Common.h: * b3/B3EliminateDeadCode.cpp: Added. (JSC::B3::EliminateDeadCode::run): (JSC::B3::eliminateDeadCode): * b3/B3EliminateDeadCode.h: Added. (JSC::B3::EliminateDeadCode::EliminateDeadCode): * b3/B3Generate.cpp: (JSC::B3::generateToAir): * b3/B3OptimizeAssociativeExpressionTrees.cpp: Added. (JSC::B3::OptimizeAssociativeExpressionTrees::OptimizeAssociativeExpressionTrees): (JSC::B3::OptimizeAssociativeExpressionTrees::neutralElement): (JSC::B3::OptimizeAssociativeExpressionTrees::isAbsorbingElement): (JSC::B3::OptimizeAssociativeExpressionTrees::combineConstants): (JSC::B3::OptimizeAssociativeExpressionTrees::emitValue): (JSC::B3::OptimizeAssociativeExpressionTrees::optimizeRootedTree): (JSC::B3::OptimizeAssociativeExpressionTrees::run): (JSC::B3::optimizeAssociativeExpressionTrees): * b3/B3OptimizeAssociativeExpressionTrees.h: Added. * b3/B3ReduceStrength.cpp: * b3/B3Value.cpp: (JSC::B3::Value::replaceWithIdentity): * b3/testb3.cpp: (JSC::B3::testBitXorTreeArgs): (JSC::B3::testBitXorTreeArgsEven): (JSC::B3::testBitXorTreeArgImm): (JSC::B3::testAddTreeArg32): (JSC::B3::testMulTreeArg32): (JSC::B3::testBitAndTreeArg32): (JSC::B3::testBitOrTreeArg32): (JSC::B3::run): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196581 Reviewed by Dewei Zhu. * BuildSlaveSupport/ews-build/config.json: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Broke CLoop and Windows builds. Reverted changeset: "[JSC] Add dump feature for RandomizingFuzzerAgent" https://bugs.webkit.org/show_bug.cgi?id=196586 https://trac.webkit.org/changeset/243843 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ation https://bugs.webkit.org/show_bug.cgi?id=196520 Reviewed by Dewei Zhu. * BuildSlaveSupport/ews-build/master.cfg: Configure authentication using admin's username and password from environment variables. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196589 Reviewed by Zalan Bujtas. Source/WebCore: AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() just returned early if programmaticScroll was true, so instead, just never call it. This means we can remove the "programmaticScroll" argument from scheduleUpdateScrollPositionAfterAsyncScroll(). Also change some callers to use the ScrollType enum instead of a bool. Now, ThreadedScrollingTree::scrollingTreeNodeDidScroll() just returns early. Programmatic scrolls update state on the main thread before updating the scrolling tree, so this makes sense. * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired): (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): (WebCore::AsyncScrollingCoordinator::reconcileScrollingState): * page/scrolling/AsyncScrollingCoordinator.h: (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate): (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType const): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::operator<<): * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::reconcileScrollingState): * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll): Source/WebKit: * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm: Remove the parameter. (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode): Use the enum type. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateVisibleContentRects): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196586 * runtime/Options.cpp: (JSC::recomputeDependentOptions): * runtime/Options.h: * runtime/RandomizingFuzzerAgent.cpp: (JSC::RandomizingFuzzerAgent::getPrediction): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…process swap or crash https://bugs.webkit.org/show_bug.cgi?id=196588 <rdar://problem/49365787> Unreviewed build fix for Windows port. error C3861: 'kill': identifier not found * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: (TestWebKitAPI::TEST): Replaced kill with WKPageTerminate. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196557 rdar://problem/48292514 Reviewed by Tim Horton. Source/WebCore: * css/html.css: (input::-webkit-credentials-auto-fill-button): (input::-webkit-contacts-auto-fill-button): (input::-webkit-credit-card-auto-fill-button): LayoutTests: * platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: * platform/mac/fast/forms/auto-fill-button/input-contacts-auto-fill-button-expected.txt: * platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…hDidClearWindowObjectInWorld https://bugs.webkit.org/show_bug.cgi?id=193914 Reviewed by Michael Catanzaro. Move it to dispatchDidFinishDocumentLoad, since we know we have the document at that point and we can create the root accessibility object wrapper. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196534 Reviewed by Michael Catanzaro. We are currently storing the ID and waiting for the next time get_accessible is called to embed the socket. We can simply embed the socket when the plug ID is received. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseGetAccessible): * UIProcess/WebPageProxy.h: * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::bindAccessibilityTree): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196535 Reviewed by Michael Catanzaro. This way the properties are not cached. Right now, if number of children is queried before the socket is embedded, 0 is returned and cached, so ATs don't see the child even after the socket has been embedded. * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: (webkitWebViewBaseAccessibleRefStateSet): Set ATK_STATE_TRANSIENT is the socket is not occupied. * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::bindAccessibilityTree): Unset ATK_STATE_TRANSIENT. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=196537 Reviewed by Michael Catanzaro. Source/WebKit: Several changes and cleanups: - Add WebKit prefix so that style checker doesn't complain about GObject conventions. - Rename the header to remove the Atk prefix to match the cpp file and class name. - Use pragma once. - Use nullptr instead of 0. - Use WEBKIT_DEFINE_TYPE instead of G_DEFINE_TYPE. - Return generic AtkObject* from constructor. * SourcesGTK.txt: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp: Renamed from Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp. (accessibilityRootObjectWrapper): (webkitWebPageAccessibilityObjectInitialize): (webkitWebPageAccessibilityObjectGetIndexInParent): (webkitWebPageAccessibilityObjectGetNChildren): (webkitWebPageAccessibilityObjectRefChild): (webkit_web_page_accessibility_object_class_init): (webkitWebPageAccessibilityObjectNew): (webkitWebPageAccessibilityObjectRefresh): * WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Added. * WebProcess/WebPage/atk/WebPageAccessibilityObject.h: Removed. * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::platformInitialize): (WebKit::WebPage::updateAccessibilityTree): Tools: Also consider files under atk directories as exceptions for GObject conventions. * Scripts/webkitpy/style/checkers/cpp.py: (check_identifier_name_in_declaration): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…n AXObjectCache::attachWrapper() https://bugs.webkit.org/show_bug.cgi?id=196538 Reviewed by Michael Catanzaro. In most of the cases the parent is not found, probably because the child is not a direct descendant of the parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound. * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…n ThreadedCompositor https://bugs.webkit.org/show_bug.cgi?id=188839 Reviewed by Žan Doberšek. Even if a platform layer has changed, don't wait for a main thread callback to finish the CompositingRunLoop update. It can be finished as soon as we receive the frameComplete signal. * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp: (WebKit::CompositingRunLoop::scheduleUpdate): (WebKit::CompositingRunLoop::stopUpdates): (WebKit::CompositingRunLoop::updateCompleted): (WebKit::CompositingRunLoop::updateTimerFired): (WebKit::CompositingRunLoop::compositionCompleted): Deleted. * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h: * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::renderLayerTree): (WebKit::ThreadedCompositor::sceneUpdateFinished): (WebKit::ThreadedCompositor::displayRefreshMonitor): (WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate): Deleted. * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp: (WebKit::LayerTreeHost::handleDisplayRefreshMonitorUpdate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
merge