Timeline



Jun 10, 2016:

11:01 PM Changeset in webkit [201966] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, attempt to fix r201964 failure on Apple ports
https://bugs.webkit.org/show_bug.cgi?id=158619

Reviewed by Mark Lam.

Add Private attributes to MathCommon.h.

10:32 PM Changeset in webkit [201965] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: <template> content should not be hidden as Shadow Content
https://bugs.webkit.org/show_bug.cgi?id=158654

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-10
Reviewed by Ryosuke Niwa.

  • Localizations/en.lproj/localizedStrings.js:

New "Template Content" string.

  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode):
Don't treat template content as shadow content.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
Custom string for template content fragment.

10:31 PM Changeset in webkit [201964] by Yusuke Suzuki
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] Inline JSC::toInt32 to improve kraken
https://bugs.webkit.org/show_bug.cgi?id=158619

Reviewed by Mark Lam.

Several kraken benchmarks show that JSC::toInt32 is frequently called.
For example, stanford-crypto-pbkdf2 reports that the hottest runtime function is JSC::toInt32.

The data is below (taken by Linux perf tools).
5.50% jsc libJavaScriptCore.so.1.0.0 . _ZN3JSC7toInt32Ed
3.96% jsc libJavaScriptCore.so.1.0.0 . _ZN3JSC20arrayProtoFuncConcatEPNS_9ExecStateE
2.48% jsc libJavaScriptCore.so.1.0.0 . _ZN3JSC19arrayProtoFuncSliceEPNS_9ExecStateE
1.69% jsc libJavaScriptCore.so.1.0.0 . _ZNK3JSC9Structure27holesMustForwardToPrototypeERNS_2VME

This is because of CommonSlowPaths' bit operations's JSValue::toInt32.
Due to the slow path, in value | 0, value may be a double number value. In that case, JSC::toInt32 is called.

While JSC::toIn32 is hot, the function itself is very small. It's worth inlining.

This change offers the following kraken improvements.

baseline patched

Kraken:

audio-beat-detection 47.492+-1.701 46.657+-1.232 might be 1.0179x faster
stanford-crypto-aes 43.669+-0.210 42.862+-0.115 definitely 1.0188x faster
stanford-crypto-ccm 45.213+-1.424 44.490+-1.290 might be 1.0162x faster
stanford-crypto-pbkdf2 107.665+-0.581 106.229+-0.807 definitely 1.0135x faster

This patch only focused on the call to toInt32 from the runtime functions.
So JSC::toInt32 calls from the baseline / DFG remain.
We ensure that JIT code uses operationToInt32 instead of JSC::toInt32 since JSC::toInt32 is now marked as ALWAYS_INLINE.
Linux perf profiler also finds that this operationToInt32 is frequently called in the above benchmarks.
It may be good to introduce asm emit for that instead of calling JSC::toInt32 operation in the separated patch.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):

  • runtime/JSCJSValue.cpp:

(JSC::toInt32): Deleted.

  • runtime/JSCJSValueInlines.h:
  • runtime/MathCommon.cpp:

(JSC::operationToInt32):

  • runtime/MathCommon.h:

(JSC::toInt32):

9:37 PM Changeset in webkit [201963] by adachan@apple.com
  • 5 edits in trunk/Source

Use the video element's video box when getting the inline video rect in WebVideoFullscreenManager
https://bugs.webkit.org/show_bug.cgi?id=158351
<rdar://problem/26567938>

Reviewed by Darin Adler.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:

Change the visibility of RenderVideo.h and RenderMedia.h since we'll be importing RenderVideo.h from WebKit2.

  • rendering/RenderVideo.h:

Source/WebKit2:

  • WebProcess/cocoa/WebVideoFullscreenManager.mm:

(WebKit::inlineVideoFrame):
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
(WebKit::clientRectForElement): Deleted.

9:24 PM Changeset in webkit [201962] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix CMake build.

  • PlatformMac.cmake:
6:52 PM Changeset in webkit [201961] by fpizlo@apple.com
  • 2 edits
    1 add in trunk/PerformanceTests

Make it easy to package Air.js
https://bugs.webkit.org/show_bug.cgi?id=158652

Reviewed by Benjamin Poulain.

If you want to give Air.js to someone, you can now do:

cd PerformanceTests/Air.js
./make_dist.sh

This will create Air.js.tar.gz and a directory called Air.js. If you want to send someone
the benchmark, just send either of those things and tell them to look at index.html.

You may have to edit make_dist.sh for wherever you have Markdown.pl. You can get that from
https://daringfireball.net/projects/markdown/

  • Air.js/make_dist.sh: Added.
  • Air.js/test.html:
6:32 PM Changeset in webkit [201960] by fpizlo@apple.com
  • 2 edits in trunk/PerformanceTests

Unreviewed, make the link to test.html into an actual link.

  • Air.js/README.md:
6:20 PM Changeset in webkit [201959] by fpizlo@apple.com
  • 2 edits in trunk/PerformanceTests

Fix some text in Air.js/README.md
https://bugs.webkit.org/show_bug.cgi?id=158650

Reviewed by Benjamin Poulain.

I read the text again and found bugs:

  • We never actually say how to run the benchmark. This change adds a blurb about how to run it.
  • We both say that allocateStack is responsible for the bulk of the running time and that we haven't measured where the bulk of the time is spent. This changes the text to say that it was a goal to make allocateStack be the hottest part of the benchmark, but that we did not measure this.
  • Air.js/README.md:
6:18 PM Changeset in webkit [201958] by benjamin@webkit.org
  • 37 edits
    10 adds in trunk

Add support for passive event listeners on touch events
https://bugs.webkit.org/show_bug.cgi?id=158601

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-10
Reviewed by Simon Fraser.

Source/WebCore:

This patch wires "passive" state of EventTarget to the delivery of touch
events in WebKit2.

Instead of having a NonFastScrollableRegion, we have a pair of regions
in EventTrackingRegions.
The "asynchronousDispatchRegion" tracks the area for which all event
listeners are passive. For those, events should be dispatched asynchronously.
The "synchronousDispatchRegion" tracks the area for which there is at
least one active event listener. Events have to be dispatched synchronously
for correctness.

Tests: fast/events/touch/ios/tap-with-active-listener-on-elements.html

fast/events/touch/ios/tap-with-active-listener-on-window.html
fast/events/touch/ios/tap-with-passive-listener-on-elements.html
fast/events/touch/ios/tap-with-passive-listener-on-window.html

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::wheelEventHandlersChanged):
(WebCore::Document::Document): Deleted.

  • dom/Document.h:
  • dom/EventListenerMap.cpp:

(WebCore::EventListenerMap::containsActive):
If a Target has multiple listener for an event type, we want to know
if any of them is active.

  • dom/EventListenerMap.h:
  • dom/EventTarget.cpp:

(WebCore::EventTarget::hasActiveEventListeners):
(WebCore::EventTarget::hasActiveTouchEventListeners):

  • dom/EventTarget.h:
  • page/DebugPageOverlays.cpp:

(WebCore::NonFastScrollableRegionOverlay::updateRegion):
I did not change the debug overlays.
The NonFastScrollable area is the region for which events needs
synchronous dispatch. Everything else should scroll without delay.

  • page/FrameView.cpp:

(WebCore::FrameView::scrollableAreaSetChanged):

  • page/Page.cpp:

(WebCore::Page::nonFastScrollableRects):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setEventTrackingRegionsDirty):
(WebCore::AsyncScrollingCoordinator::willCommitTree):
(WebCore::AsyncScrollingCoordinator::updateEventTrackingRegions):
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewEventTrackingRegionsChanged):
(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
(WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionDirty): Deleted.
(WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion): Deleted.
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Deleted.

  • page/scrolling/AsyncScrollingCoordinator.h:

(WebCore::AsyncScrollingCoordinator::eventTrackingRegionsDirty):
(WebCore::AsyncScrollingCoordinator::nonFastScrollableRegionDirty): Deleted.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame):
(WebCore::ScrollingCoordinator::absoluteEventTrackingRegions):
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): Deleted.
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Deleted.
I intentionally left the Wheel event with synchronous dispatch.
This use case will need its own set of tests.

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::frameViewEventTrackingRegionsChanged):
(WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Deleted.

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::setEventTrackingRegions):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
(WebCore::ScrollingStateFrameScrollingNode::setNonFastScrollableRegion): Deleted.

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

(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::commitNewTreeState):
(WebCore::ScrollingTree::eventTrackingTypeForPoint):
(WebCore::ScrollingTree::isPointInNonFastScrollableRegion): Deleted.

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):

  • platform/EventTrackingRegions.h: Added.

(WebCore::EventTrackingRegions::isEmpty):
(WebCore::EventTrackingRegions::trackingTypeForPoint):
(WebCore::operator==):

Source/WebKit2:

  • Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
(WebKit::dump):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<EventTrackingRegions>::encode):
(IPC::ArgumentCoder<EventTrackingRegions>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::eventTrackingTypeForPoint):
(WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion): Deleted.

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::touchEventTrackingType):
The type is the most restrictive type of all the touch points.
If any touch point needs synchronous tracking, everything has to be synchronous.

(WebKit::WebPageProxy::handleTouchEventSynchronously):
This is a very unfortunate design.

The upper layer dealing with UIKit knows about gesture and when something
can be dispatched asynchrnously because a gesture has started.
This layer knows about tracking and can use that extra inforamtion
to dispatch an event asynchrnously anyway.

In the future, we should refactor this to let WebPageProxy
always decide of the dispatch type. I am just concerned changing
the upper layer while we are stabilizing WebKit.

(WebKit::WebPageProxy::handleTouchEventAsynchronously):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::WebPageProxy): Deleted.
(WebKit::WebPageProxy::shouldStartTrackingTouchEvents): Deleted.

  • UIProcess/WebPageProxy.h:

LayoutTests:

  • fast/events/touch/ios/tap-with-active-listener-on-elements-expected.txt: Added.
  • fast/events/touch/ios/tap-with-active-listener-on-elements.html: Added.
  • fast/events/touch/ios/tap-with-active-listener-on-window-expected.txt: Added.
  • fast/events/touch/ios/tap-with-active-listener-on-window.html: Added.
  • fast/events/touch/ios/tap-with-passive-listener-inside-active-listener-expected.txt: Added.
  • fast/events/touch/ios/tap-with-passive-listener-on-elements-expected.txt: Added.
  • fast/events/touch/ios/tap-with-passive-listener-on-elements.html: Added.
  • fast/events/touch/ios/tap-with-passive-listener-on-window-expected.txt: Added.
  • fast/events/touch/ios/tap-with-passive-listener-on-window.html: Added.
5:48 PM Changeset in webkit [201957] by fpizlo@apple.com
  • 1 edit
    1 add in trunk/PerformanceTests

Air.js should have some documentation
https://bugs.webkit.org/show_bug.cgi?id=158648

Reviewed by Keith Miller.

I want to be able to point people at a document if they want to know more about this
benchmark.

  • Air.js/README.md: Added.
5:21 PM Changeset in webkit [201956] by enrica@apple.com
  • 9 edits
    2 adds in trunk

REGRESSION(r198177): Cannot paste an image when the pasteboard format is mime type.
https://bugs.webkit.org/show_bug.cgi?id=158590
rdar://problem/25471371

Reviewed by Darin Adler.

Source/WebCore:

When creating a fragment from an image resource, the resource needs to
be added to the document loader before setting the src attribute to the
image element, otherwise loading is triggered and the loading fails.
In r198177 the order of the operations was changed causing the bug.
This patch adds support to test the scenario where the image in the pasteboard
is available only as mime type (not WebArchive or RTFD), a situation that occurs
more frequently on iOS.

Test: editing/pasteboard/image-in-iframe.html

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::createFragmentForImageResourceAndAddResource):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::WebContentReader::readWebArchive):
(WebCore::Editor::WebContentReader::readRTFD):
(WebCore::Editor::WebContentReader::readRTF):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):

  • page/Settings.cpp:

(WebCore::Settings::setImagesEnabled):
(WebCore::Settings::setPreferMimeTypeForImages):
(WebCore::Settings::setForcePendingWebGLPolicy):

  • page/Settings.h:

(WebCore::Settings::areImagesEnabled):
(WebCore::Settings::preferMimeTypeForImages):
(WebCore::Settings::arePluginsEnabled):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
(WebCore::InternalSettings::setPreferMimeTypeForImages):
(WebCore::InternalSettings::setImagesEnabled):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

LayoutTests:

  • editing/pasteboard/image-in-iframe-expected.txt: Added.
  • editing/pasteboard/image-in-iframe.html: Added.
5:20 PM Changeset in webkit [201955] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix CMake build.

  • TestWebKitAPI/PlatformMac.cmake:
5:15 PM Changeset in webkit [201954] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix WinCairo build after r201943

  • platform/network/curl/MultipartHandle.cpp:

(WebCore::MultipartHandle::didReceiveResponse):

  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::handleLocalReceiveResponse):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::dispatchSynchronousJob):

4:54 PM Changeset in webkit [201953] by fpizlo@apple.com
  • 3 edits
    6 copies
    1 move
    2 deletes in trunk

PerformanceTests:
Rename JSAir to Air.js.

Rubber stamped by Mark Lam.

  • Air.js: Copied from PerformanceTests/JSAir.
  • Air.js/airjs-tests.yaml: Copied from PerformanceTests/JSAir/jsair-tests.yaml.
  • Air.js/benchmark.js: Copied from PerformanceTests/JSAir/benchmark.js.

(Benchmark):

  • Air.js/jsair-tests.yaml: Removed.
  • Air.js/payload-airjs-ACLj8C.js: Copied from PerformanceTests/JSAir/payload-jsair-ACLj8C.js.
  • Air.js/payload-jsair-ACLj8C.js: Removed.
  • Air.js/stress-test.js: Copied from PerformanceTests/JSAir/stress-test.js.
  • Air.js/test.html: Copied from PerformanceTests/JSAir/test.html.
  • Air.js/test.js: Copied from PerformanceTests/JSAir/test.js.
  • JSAir: Removed.
  • JSAir/all.js: Removed.
  • JSAir/allocate_stack.js: Removed.
  • JSAir/arg.js: Removed.
  • JSAir/basic_block.js: Removed.
  • JSAir/benchmark.js: Removed.
  • JSAir/code.js: Removed.
  • JSAir/custom.js: Removed.
  • JSAir/frequented_block.js: Removed.
  • JSAir/insertion_set.js: Removed.
  • JSAir/inst.js: Removed.
  • JSAir/jsair-tests.yaml: Removed.
  • JSAir/liveness.js: Removed.
  • JSAir/opcode.js: Removed.
  • JSAir/payload-gbemu-executeIteration.js: Removed.
  • JSAir/payload-imaging-gaussian-blur-gaussianBlur.js: Removed.
  • JSAir/payload-jsair-ACLj8C.js: Removed.
  • JSAir/payload-typescript-scanIdentifier.js: Removed.
  • JSAir/reg.js: Removed.
  • JSAir/stack_slot.js: Removed.
  • JSAir/stress-test.js: Removed.
  • JSAir/strip-hash.rb: Removed.
  • JSAir/symbols.js: Removed.
  • JSAir/test.html: Removed.
  • JSAir/test.js: Removed.
  • JSAir/tmp.js: Removed.
  • JSAir/tmp_base.js: Removed.
  • JSAir/util.js: Removed.

Tools:
Rename JSAir to Air.js

Rubber stamped by Mark Lam.

  • Scripts/run-javascriptcore-tests:
4:29 PM Changeset in webkit [201952] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/blink/storage/indexeddb/blob-delete-objectstore-db.html as flaky on Yosemite Release WK2
https://bugs.webkit.org/show_bug.cgi?id=158639

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:18 PM Changeset in webkit [201951] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/LayoutTests

Roll out r201287. rdar://problem/26605164

4:10 PM Changeset in webkit [201950] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/LayoutTests

Merge r201287. rdar://problem/26228555

4:05 PM Changeset in webkit [201949] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
https://bugs.webkit.org/show_bug.cgi?id=158584
<rdar://problem/26727849>

Reviewed by Timothy Hatcher.

ALways compare the the later snapshot to the earlier snapshot,
regardless of selection order.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
Swap shapshots if the first has a greater identifier than the second.
Drive-by cleanup: null out _baselineDataGridNode since it isn't used
after the comparison completes.

4:00 PM Changeset in webkit [201948] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/LayoutTests

Merge r201287. rdar://problem/26605164

3:55 PM Changeset in webkit [201947] by fpizlo@apple.com
  • 7 edits
    1 add in trunk

JSC Stress Test failing: jsair-tests.yaml/test.js.ftl-eager-no-cjit
https://bugs.webkit.org/show_bug.cgi?id=158571

Reviewed by Keith Miller.

PerformanceTests:

Introduce a different harness for run-jsc-stress-tests, which runs for a minimum of 10
iterations and then tries to do any number of "bonus" iterations until it's been running for
two seconds. Since this is the sort of test that isn't really meant to stress anything in
particular, I think it's OK if it is time-limited in this way. The worst case is that some
of its failures will be flaky, but I think that they would have been flaky anyway given the
complexity of the test.

  • JSAir/benchmark.js:

(Benchmark):
(Benchmark.prototype.runIteration):
(benchmark): Deleted.

  • JSAir/jsair-tests.yaml:
  • JSAir/stress-test.js: Added.

(preciseTime):

  • JSAir/test.html:
  • JSAir/test.js:

Tools:

Unskip the JSAir test.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

3:26 PM Changeset in webkit [201946] by achristensen@apple.com
  • 3 edits
    2 deletes in trunk/Source/WebCore

handleDataURL is only used by curl
https://bugs.webkit.org/show_bug.cgi?id=158636

Reviewed by Tim Horton.

  • CMakeLists.txt:
  • platform/network/DataURL.cpp: Removed.
  • platform/network/DataURL.h: Removed.
  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::ResourceHandleManager::startScheduledJobs):
(WebCore::handleDataURL):
(WebCore::ResourceHandleManager::dispatchSynchronousJob):

3:18 PM Changeset in webkit [201945] by Beth Dakin
  • 3 edits in trunk/Source/WebKit2

Add requestExitFullScreen to WKFullScreenWindowController
https://bugs.webkit.org/show_bug.cgi?id=158633
-and corresponding-
rdar://problem/26564036

Reviewed by Tim Horton.

  • UIProcess/mac/WKFullScreenWindowController.h:
  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController requestExitFullScreen]):

3:15 PM Changeset in webkit [201944] by weinig@apple.com
  • 2 edits in trunk/Tools

Re-disable the UserMedia tests which are timing out.

They used to be accidentally disabled, due to not including
the FeatureDefines correctly, but not we explicitly disable it.

  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::TEST):

3:02 PM Changeset in webkit [201943] by achristensen@apple.com
  • 37 edits in trunk/Source

Reduce ResourceResponse copying
https://bugs.webkit.org/show_bug.cgi?id=158232

Reviewed by Darin Adler.

Source/WebCore:

No new tests. No change in behavior except removing an unnecessary copy on cocoa platforms.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didSendData):
(WebCore::ResourceLoader::didReceiveResponse):

  • loader/ResourceLoader.h:
  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::createResourceHandle):
(WebCore::ApplicationCacheGroup::didReceiveResponse):

  • loader/appcache/ApplicationCacheGroup.h:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResourceClient::~PlatformMediaResourceClient):
(WebCore::PlatformMediaResourceClient::responseReceived):
(WebCore::PlatformMediaResourceClient::redirectReceived):
(WebCore::PlatformMediaResourceClient::shouldCacheResponse):
(WebCore::PlatformMediaResourceClient::dataSent):

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::willSendRequest):
(ResourceHandleStreamingClient::didReceiveResponse):

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
(WebCore::BlobResourceHandle::notifyResponseOnError):
(WebCore::BlobResourceHandle::notifyReceiveData):

  • platform/network/DataURL.cpp:

(WebCore::handleDataURL):

  • platform/network/PingHandle.h:

(WebCore::PingHandle::PingHandle):

  • platform/network/ResourceHandleClient.cpp:

(WebCore::ResourceHandleClient::willSendRequestAsync):
(WebCore::ResourceHandleClient::didReceiveResponseAsync):

  • platform/network/ResourceHandleClient.h:

(WebCore::ResourceHandleClient::didSendData):
(WebCore::ResourceHandleClient::didReceiveResponse):
(WebCore::ResourceHandleClient::didReceiveData):

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::includeCertificateInfo):
(WebCore::ResourceResponseBase::suggestedFilename):
(WebCore::ResourceResponseBase::certificateInfo): Deleted.

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::certificateInfo):
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):
(WebCore::ResourceResponseBase::containsCertificateInfo): Deleted.

  • platform/network/SynchronousLoaderClient.cpp:

(WebCore::SynchronousLoaderClient::canAuthenticateAgainstProtectionSpace):
(WebCore::SynchronousLoaderClient::didReceiveResponse):
(WebCore::SynchronousLoaderClient::didReceiveData):

  • platform/network/SynchronousLoaderClient.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):

  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:

(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::nextMultipartResponsePartCallback):
(WebCore::sendRequestCallback):

Source/WebKit2:

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::sharedDidReceiveResponse):
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):
(WebKit::NetworkLoad::didReceiveResponseAsync):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::abort):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.h:
  • NetworkProcess/cache/NetworkCacheCoders.h:

(WebKit::NetworkCache::Coder<Optional<T>>::encode):
(WebKit::NetworkCache::Coder<Optional<T>>::decode):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

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

(WebKit::NetworkDataTask::didCompleteWithError):
(WebKit::NetworkDataTask::didReceiveResponse):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::url):
(WebKit::WebFrame::certificateInfo):
(WebKit::WebFrame::innerText):

3:00 PM Changeset in webkit [201942] by rniwa@webkit.org
  • 9 edits in trunk/Source

Add SPI to disable spellchecking on auto-fillable text fields
https://bugs.webkit.org/show_bug.cgi?id=158611

Reviewed by Anders Carlsson.

Source/WebCore:

Added a boolean flag m_isSpellCheckingEnabled to HTMLInputElement. This flag defaults to true, and can be set
to false by WebKit2 C API.

  • editing/Editor.cpp:

(WebCore::Editor::isSpellCheckingEnabledFor): Fixed a bug that we were calling isSpellCheckingEnabled on
the div inside an input element's shadow tree instead of the input element itself.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement): Initialize m_spellcheckEnabled to true (it's a bit field).
(WebCore::HTMLInputElement::isSpellCheckingEnabled): Added. Return false if m_spellcheckEnabled is false.

  • html/HTMLInputElement.h:

(WebCore::HTMLInputElement::setSpellcheckEnabled): Added.

Source/WebKit2:

Added WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled to disable spellchecking on a text field.

This is used by WebKit2 client which desires to disable spellchecking and notably autocorrection on
login forms, etc... where such feature would interfere with user's actions.

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:

(WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled): Added.

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled): Added.

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2:26 PM Changeset in webkit [201941] by achristensen@apple.com
  • 20 edits
    2 adds in trunk

Introduce WTF::UniqueRef
https://bugs.webkit.org/show_bug.cgi?id=158596

Reviewed by Brady Eidson.

Source/WebCore:

No new tests. No change in behavior.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::overlayPage):

  • loader/EmptyClients.cpp:

(WebCore::fillWithEmptyClients):

  • page/Page.cpp:

(WebCore::Page::Page):

  • page/Page.h:

(WebCore::Page::canStartMedia):
(WebCore::Page::editorClient):
(WebCore::Page::plugInClient):
(WebCore::Page::mainFrame):
(WebCore::Page::groupPtr): Deleted.

  • page/PageConfiguration.cpp:

(WebCore::PageConfiguration::PageConfiguration):

  • page/PageConfiguration.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit/win:

  • WebView.cpp:

(WebView::initWithFrame):

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_shouldDispatchFakeMouseMoveEvents):

Source/WTF:

WTF::UniqueRef is like a std::unique_ptr that is guaranteed to be non-null.
std::make_unique returns a non-null value that is put into a std::unique_ptr, a type
that could contain null values. To be able to pass such values around and store them
without wondering if they are null, we now have WTF::UniqueRef which cannot be null.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/UniqueRef.h: Added.

(WTF::makeUniqueRef):
(WTF::UniqueRef::UniqueRef):
(WTF::UniqueRef::get):
(WTF::UniqueRef::operator&):
(WTF::UniqueRef::operator->):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/UniqueRef.cpp: Added.

(TestWebKitAPI::B::B):
(TestWebKitAPI::C::C):
(TestWebKitAPI::function):
(TestWebKitAPI::TEST):

2:01 PM Changeset in webkit [201940] by beidson@apple.com
  • 1 edit
    3 adds in trunk/LayoutTests

Add an IDB leak test.
https://bugs.webkit.org/show_bug.cgi?id=158632

Reviewed by Alex Christensen.

  • storage/indexeddb/modern/leak-1-expected.txt: Added.
  • storage/indexeddb/modern/leak-1.html: Added.
  • storage/indexeddb/modern/resources/leak-1.js: Added.
1:59 PM Changeset in webkit [201939] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Web Inspector: Cleanup InspectorIndexedDBAgent a bit
https://bugs.webkit.org/show_bug.cgi?id=158598

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-10
Reviewed by Darin Adler.

  • inspector/InspectorIndexedDBAgent.cpp:
1:38 PM Changeset in webkit [201938] by weinig@apple.com
  • 8 edits
    4 adds in trunk/Tools

Refactor TestWebKitAPI to allow just testing WTF
https://bugs.webkit.org/show_bug.cgi?id=158625

Reviewed by Tim Horton.

Extract all the WTF tests into a new target to allow a faster build / test / fix
cycle when working on WTF bugs and features.

By calling run-api-tests --wtf-only, you don't need to have a build of JavaScriptCore/WebCore/etc
to test WTF only changes.

  • Scripts/build-api-tests:
  • Scripts/run-api-tests:

(buildTestTool):
(testToolPaths):
Add new options to build-api-tests and run-api-tests to only build/run the WTF test runner.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/Configurations/TestWTF.xcconfig: Added.
  • TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Added.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Add two new targets, TestWTFLibrary which contains all the WTF tests, and TestWTF,
the test runner that runs the WTF tests.

  • TestWebKitAPI/Tests/WTF/RunLoop.cpp:

Use Utilities.h rather than PlatformUtilities.h.

  • TestWebKitAPI/Utilities.h: Added.
  • TestWebKitAPI/PlatformUtilities.h:
  • TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
  • TestWebKitAPI/cocoa/UtilitiesCocoa.mm: Added.

Move the sleep and run functions into a new Utilities.h/cpp file. This file contains utilities
that don't depend on anything in the WebKit project.

12:59 PM Changeset in webkit [201937] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: rendering frames timeline "60fps" horizontal guide is mispositioned after switching timeline modes
https://bugs.webkit.org/show_bug.cgi?id=158587
<rdar://problem/26728174>

Reviewed by Timothy Hatcher.

When the view mode changes we iterate over all overview graphs, updating
their visibility as needed. Graphs being shown perform layout, even though
the overview's state is in transition: its offset height may still change.

A simple fix is to use TimelineOverviewGraph.height instead of the graph
element's offset height when performing layout.

  • UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:

(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):

12:56 PM Changeset in webkit [201936] by fpizlo@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

The backend should be happy to compile Unreachable even if AI didn't prove it to be unreachable
https://bugs.webkit.org/show_bug.cgi?id=158631

Reviewed by Keith Miller.

We've been slowly making the DFG Unreachable opcode behave like a grown-up. When we first
added it, it was a hack for Throw, and we could always rely on AI proving that Unreachable
was not reachable. But then we started using Unreachable as a proper Unreachable opcode,
like Oops in B3 for example, which has a more nuanced meaning: you use it whenever you
emit code that *you* know will not return, and you need some way of terminating the basic
block. The DFG is not a proof-carrying compiler, and it never will be. So, when you have
proved that something is not reachable, you should be able to use Unreachable even if
there is no guarantee that the compiler will later be able to replicate your proof. This
means that the backend may find itself compiling Unreachable because AI did not prove that
it was unreachable.

Prior to this change, we would crash compiling Unreachable because we would rely on AI
preventing us from reaching Unreachable in the backend. But that's silly! We don't want
users of Unreachable to have to also convince AI that their Unreachable is really
Unreachable.

This fixes crashes on real websites. I couldn't work out how to turn them into a reduced
test.

  • assembler/AbortReason.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
(JSC::DFG::SpeculativeJIT::unreachable):
(JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compilePutDynamicVar):
(JSC::FTL::DFG::LowerDFGToB3::compileUnreachable):
(JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):

12:42 PM Changeset in webkit [201935] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r201538): Web Inspector: 1px gap above timeline progress view
https://bugs.webkit.org/show_bug.cgi?id=158626

Reviewed by Joseph Pecoraro.

Adjust progress view top position to account for grid border changes.

  • UserInterface/Views/TimelineRecordingContentView.css:

(.content-view.timeline-recording > .content-browser .recording-progress):

12:41 PM Changeset in webkit [201934] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r201538): Web Inspector: Border under JS Call Trees content view is too thick
https://bugs.webkit.org/show_bug.cgi?id=158624
<rdar://problem/26743633>

Reviewed by Joseph Pecoraro.

Remove top border from <th> elements.

  • UserInterface/Views/ProfileView.css:

(.profile > .data-grid th): Deleted.

11:49 AM Changeset in webkit [201933] by andersca@apple.com
  • 2 edits
    2 deletes in trunk/Source/WebKit2

Remove CommandLine class
https://bugs.webkit.org/show_bug.cgi?id=158628

Reviewed by Tim Horton.

  • Shared/CommandLine.h: Removed.

(WebKit::CommandLine::operator[]): Deleted.

  • Shared/posix/CommandLinePOSIX.cpp: Removed.

(WebKit::CommandLine::parse): Deleted.

  • WebKit2.xcodeproj/project.pbxproj:
11:49 AM WebKitGTK/Gardening/Calendar edited by clopez@igalia.com
(diff)
11:49 AM WebKitGTK/Gardening/Calendar edited by clopez@igalia.com
(diff)
11:43 AM Changeset in webkit [201932] by beidson@apple.com
  • 2 edits in trunk/Tools

REGRESSION(r201928?) API test WTF.StringOperators failing
https://bugs.webkit.org/show_bug.cgi?id=158623

Unreviewed, but buddy coded with Alex Christensen.

  • TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:

(TestWebKitAPI::LifetimeLogger::fullName): Only one file in all of TestWebKitAPI is allowed

to use string concatenation, otherwise the linker will mess up on the symbol related to
this bizarre WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING macro expansion.

11:41 AM Changeset in webkit [201931] by clopez@igalia.com
  • 6 edits in trunk/LayoutTests

[GTK] Unreviewed gardening.

Update the general expectations file to include also Timeout as
an expected failure.

  • platform/gtk/TestExpectations: Since r200320 resource-timing feature is a runtime flag and this causes failures.

Remove also one test that has been removed.

  • platform/gtk/fast/table/border-collapsing/cached-change-row-border-width-expected.txt: rebaseline after r201234
  • platform/gtk/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt: rebaseline after r201234
  • platform/gtk/fast/table/max-width-integer-overflow-expected.txt: rebaseline after r201234
11:17 AM Changeset in webkit [201930] by youenn.fablet@crf.canon.fr
  • 8 edits
    3 adds in trunk

Origin header is not included in CORS requests for preloaded cross-origin resources
https://bugs.webkit.org/show_bug.cgi?id=155761
<rdar://problem/25351850>

Reviewed by Alex Christensen.

Source/WebCore:

Making HTML preloader fully aware of crossorigin attribute value.
Introducing CachedResourceRequest::setAsPotentiallyCrossOrigin as a helper routine to activate CORS mode.
Making HTMLLinkElement and HTMLResourcePreloader use that routine.
Making TokenPreloadScanner store the crossorigin attribute value in preload requests.
Making TokenPreloadScanner store the crossorigin attribute value for link elements.

Test: http/tests/security/cross-origin-css-9.html

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::crossOriginModeAllowsCookies):
(WebCore::PreloadRequest::resourceRequest):

  • html/parser/HTMLResourcePreloader.h:

(WebCore::PreloadRequest::setCrossOriginMode):
(WebCore::PreloadRequest::PreloadRequest): Deleted.
(WebCore::PreloadRequest::resourceType): Deleted.

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):

  • loader/cache/CachedResourceRequest.h:

LayoutTests:

  • http/tests/security/cross-origin-css-9-expected.txt: Added.
  • http/tests/security/cross-origin-css-9.html: Added.
  • http/tests/security/resources/get-css-if-origin-header.php: Added.
11:01 AM Changeset in webkit [201929] by Simon Fraser
  • 3 edits in trunk/Source/WebKit2

[iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=158622
rdar://problem/26609452

Reviewed by Tim Horton.

It's possible for a CADisplayLink to fire after being paused sometimes, possibly
when an app is running another CADisplayLink whose callback takes some time. When
this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
to proceed when the m_pendingBackingStoreFlusher was still flushing.

Fix by preventing two didUpdates from being sent from the UI process between
commits.

Not easily testable.

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):

10:04 AM Changeset in webkit [201928] by beidson@apple.com
  • 2 edits in trunk/Tools

WTF_CrossThreadTask.Basic fails in all non mac ports.
https://bugs.webkit.org/show_bug.cgi?id=158612

Reviewed by Alex Christensen.

The test is very sensitive to argument evaluation order which is explicitly undefined in C++.

Instead, we should just count the appropriate events to forget their order.

  • TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:

(TestWebKitAPI::LifetimeLogger::LifetimeLogger):
(TestWebKitAPI::LifetimeLogger::~LifetimeLogger):
(TestWebKitAPI::LifetimeLogger::isolatedCopy):
(TestWebKitAPI::LifetimeLogger::fullName):
(TestWebKitAPI::testFunction):
(TestWebKitAPI::TEST):
(TestWebKitAPI::LifetimeLogger::log): Deleted.
(TestWebKitAPI::LifetimeLogger::takeLogStr): Deleted.

9:45 AM Changeset in webkit [201927] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/hidpi/hidpi-3x-device-pixel-ratio.html as failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=158618

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
9:19 AM Changeset in webkit [201926] by Chris Dumez
  • 5 edits in trunk

ErrorEvent / ProgressEvent should be exposed to workers
https://bugs.webkit.org/show_bug.cgi?id=158606

Reviewed by Brady Eidson.

Source/WebCore:

ErrorEvent / ProgressEvent should be exposed to workers:

Firefox and Chrome both already expose those.

No new tests, rebaselined existing test.

  • dom/ErrorEvent.idl:
  • dom/ProgressEvent.idl:

LayoutTests:

Rebaseline test.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
7:47 AM Changeset in webkit [201925] by Chris Dumez
  • 4 edits in trunk

MessagePort should be exposed to workers
https://bugs.webkit.org/show_bug.cgi?id=158607

Reviewed by Brady Eidson.

Source/WebCore:

MessagePort should be exposed to workers:
https://html.spec.whatwg.org/multipage/comms.html#messageport

Firefox and Chrome both already expose it.

No new tests, rebaselined existing test.

  • dom/MessagePort.idl:

LayoutTests:

Rebaseline test.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
6:26 AM Changeset in webkit [201924] by youenn.fablet@crf.canon.fr
  • 5 edits
    2 adds in trunk/Source/WebCore

Move preflight check code outside of DocumentThreadableLoader
https://bugs.webkit.org/show_bug.cgi?id=158425

Reviewed by Darin Adler.

Moving preflight check code in its own class.
This allows code to be easier to read, use/reuse and update.

Behavior should be the same as before except in the case of a preflight response
being a 3XX redirect response.
Before this patch, the 3XX response was directly passed to the code processing regular responses.
To keep compatibility with existing tests, a didFailRedirectCheck callback is called.
This should be change to a preflight failure.

Covered by existing tests.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/CrossOriginPreflightChecker.cpp: Added.

(WebCore::CrossOriginPreflightChecker::CrossOriginPreflightChecker):
(WebCore::CrossOriginPreflightChecker::~CrossOriginPreflightChecker):
(WebCore::CrossOriginPreflightChecker::handleLoadingFailure):
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
(WebCore::CrossOriginPreflightChecker::notifyFinished):
(WebCore::CrossOriginPreflightChecker::startPreflight):
(WebCore::CrossOriginPreflightChecker::doPreflight):
(WebCore::CrossOriginPreflightChecker::redirectReceived):
(WebCore::CrossOriginPreflightChecker::setDefersLoading):
(WebCore::CrossOriginPreflightChecker::isXMLHttpRequest):

  • loader/CrossOriginPreflightChecker.h: Added.
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::create):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
(WebCore::DocumentThreadableLoader::setDefersLoading):
(WebCore::DocumentThreadableLoader::clearResource):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::didReceiveData):
(WebCore::DocumentThreadableLoader::notifyFinished):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightSuccess):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
(WebCore::DocumentThreadableLoader::responseReceived): Deleted.
(WebCore::DocumentThreadableLoader::dataReceived): Deleted.
(WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy): Deleted.

  • loader/DocumentThreadableLoader.h:

(WebCore::DocumentThreadableLoader::options):
(WebCore::DocumentThreadableLoader::isLoading):
(WebCore::DocumentThreadableLoader::document):

5:58 AM Changeset in webkit [201923] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebKit2

[Threaded Compositor] Content and viewport sizes are mixed
https://bugs.webkit.org/show_bug.cgi?id=158564

Reviewed by Žan Doberšek.

Make ThreadedCoordinatedLayerTreeHost::sizeDidChange() update the viewport size for consistency with all other
LayerTreeHost implementations and rename viewportSizeChanged() as contentsSizeChanged() and update the contents
size.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::contentsSizeChanged): Remove ifdefed code here, the drawing area is notified two lines below.

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:

(WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): Update the viewport size to the contents size
only when using a fixed layout here instead of in cross-platform code.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged):
(WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
(WebKit::ThreadedCoordinatedLayerTreeHost::viewportSizeChanged): Deleted.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Call LayerTreeHost::contentsSizeChanged().
(WebKit::DrawingAreaImpl::updateBackingStoreState): Remove ifdefed code for the threadecd compositor since it's
now consistent with all other LayerTreeHost implementations.

  • WebProcess/WebPage/LayerTreeHost.h:
5:52 AM Changeset in webkit [201922] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebKit2

[Threaded Compositor] Make it clear that compositing thread operations are always scheduled from the main thread
https://bugs.webkit.org/show_bug.cgi?id=158562

Reviewed by Žan Doberšek.

The code is written as if the compositor thread could also call callOnCompositingRunLoop() which makes the code
confusing. This patch no longer checks if the task was scheduled in the compositing thread, and instead it adds
an ASSERT to ensure it's always called from the main thread as expected. It also adds some more ASSERTS to ensure
and clarify the methods are called from the expected thread.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::performTask):
(WebKit::CompositingRunLoop::callOnCompositingRunLoop): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
(WebKit::ThreadedCompositor::setDeviceScaleFactor):
(WebKit::ThreadedCompositor::didChangeViewportSize):
(WebKit::ThreadedCompositor::didChangeViewportAttribute):
(WebKit::ThreadedCompositor::didChangeContentsSize):
(WebKit::ThreadedCompositor::scrollTo):
(WebKit::ThreadedCompositor::scrollBy):
(WebKit::ThreadedCompositor::glContext):
(WebKit::ThreadedCompositor::didChangeVisibleRect):
(WebKit::ThreadedCompositor::renderLayerTree):
(WebKit::ThreadedCompositor::updateSceneState):
(WebKit::ThreadedCompositor::callOnCompositingThread): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
5:50 AM Changeset in webkit [201921] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] Browser plugins crash under Wayland
https://bugs.webkit.org/show_bug.cgi?id=157605

Reviewed by Michael Catanzaro.

Fail the initialization of windowed plugins if we don't have a platform implementation.

  • WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:

(WebKit::NetscapePlugin::platformPostInitialize):

2:15 AM Changeset in webkit [201920] by adam.bergkvist@ericsson.com
  • 5 edits
    2 adds in trunk

WebRTC: Imlement MediaEndpointPeerConnection::createAnswer()
https://bugs.webkit.org/show_bug.cgi?id=158566

Reviewed by Eric Carlson.

Source/WebCore:

Add the MediaEndpointPeerConnection implementation of RTCPeerConnection.createAnswer [1].
createAnswer() creates a 'reply' to an remote offer set with setRemoteDescription(),
completes the offer/answer dialog and brings the RTCPeerConnection back to the 'stable'
signaling state.

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-createanswer

Test: fast/mediastream/RTCPeerConnection-inspect-answer.html

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createOfferTask):
Align creation of RTCSessionDescription with createAnswerTask.
(WebCore::MediaEndpointPeerConnection::createAnswer):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):
Add Implementation.

  • Modules/mediastream/MediaEndpointPeerConnection.h:

LayoutTests:

Add test for RTCPeerConnection.createAnswer.

  • fast/mediastream/RTCPeerConnection-inspect-answer-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-inspect-answer.html: Added.

Generate two answers, one with audio only and a second with audio and video, and inspect
the result.

  • platform/mac/TestExpectations:

Skip tests for mac that require building with WEB_RTC enabled.

12:41 AM Changeset in webkit [201919] by svillar@igalia.com
  • 5 edits
    2 adds in trunk

[css-grid] CRASH when getting the computed style of a grid with only absolutely positioned children
https://bugs.webkit.org/show_bug.cgi?id=158537

Reviewed by Darin Adler.

Source/WebCore:

Absolute positioning occurs after layout of the grid and its in-flow contents, and does not
contribute to the sizing of any grid tracks or affect the size/configuration of the grid in
any way. This means that we should treat as empty any grid whose only children are
absolutely positioned items.

Since r201510 empty grids are no longer internally represented by a 1x1 matrix. As we were
not considering grids-with-only-absolutely-positioned-children as empty, we were trying to
access some invalid position in the internal representation of the grid triggering an ASSERT
in debug builds and a crash in release.

Test: fast/css-grid-layout/grid-only-abspos-item-computed-style-crash.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForGridTrackList):

LayoutTests:

  • fast/css-grid-layout/grid-only-abspos-item-computed-style-crash-expected.txt: Added.
  • fast/css-grid-layout/grid-only-abspos-item-computed-style-crash.html: Added.
  • fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt: Adjusted, grid-template

does create explicit tracks so we should return 0px instead of none.

  • fast/css-grid-layout/grid-template-shorthand-get-set.html: Ditto.
12:37 AM Changeset in webkit [201918] by Chris Dumez
  • 4 edits in trunk

DOMException should be exposed to workers
https://bugs.webkit.org/show_bug.cgi?id=158608

Reviewed by Alex Christensen.

Source/WebCore:

DOMException should be exposed to workers:
https://heycam.github.io/webidl/#es-DOMException-call

Both Firefox and Chrome expose DOMException to workers already.

No new tests, rebaselined existing test.

  • dom/DOMCoreException.idl:

LayoutTests:

Rebaseline existing test.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:

Jun 9, 2016:

11:50 PM Changeset in webkit [201917] by achristensen@apple.com
  • 1 edit
    2 deletes in trunk/WebKitLibraries

Clean up Visual Studio properties files after switching to CMake.

  • win/tools/WinTools.make: Removed.
  • win/tools/vsprops: Removed.
  • win/tools/vsprops/FeatureDefines.props: Removed.
  • win/tools/vsprops/FeatureDefinesCairo.props: Removed.
  • win/tools/vsprops/GStreamer32.props: Removed.
  • win/tools/vsprops/GStreamer64.props: Removed.
  • win/tools/vsprops/GStreamerCommon.props: Removed.
  • win/tools/vsprops/WinCairo.props: Removed.
  • win/tools/vsprops/cURL.props: Removed.
  • win/tools/vsprops/common.props: Removed.
  • win/tools/vsprops/debug.props: Removed.
  • win/tools/vsprops/debug_wincairo.props: Removed.
  • win/tools/vsprops/debugsuffix.props: Removed.
  • win/tools/vsprops/production.props: Removed.
  • win/tools/vsprops/release.props: Removed.
11:48 PM Changeset in webkit [201916] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMake build.

  • PlatformMac.cmake:
11:36 PM Changeset in webkit [201915] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix AppleWin build after r201901.
https://bugs.webkit.org/show_bug.cgi?id=119839

  • platform/graphics/ca/win/PlatformCALayerWin.cpp:

(PlatformCALayerWin::backingStoreAttached):
(PlatformCALayerWin::userInteractionEnabled):
(PlatformCALayerWin::setUserInteractionEnabled):
(PlatformCALayerWin::geometryFlipped):

  • platform/graphics/ca/win/PlatformCALayerWin.h:
11:11 PM Changeset in webkit [201914] by achristensen@apple.com
  • 3 edits
    9 copies
    5 deletes in trunk/Tools

Clean up Tools *.vcxproj after switching to CMake.

  • DumpRenderTree/DumpRenderTree.sln: Removed.
  • DumpRenderTree/DumpRenderTree.vcxproj: Removed.
  • DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin: Removed.
  • DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def: Removed.
  • DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc: Removed.
  • DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/resource.h: Removed.
  • DumpRenderTree/PlatformWin.cmake:
  • DumpRenderTree/win/TestNetscapePlugin.def: Copied from DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def.
  • DumpRenderTree/win/TestNetscapePlugin.rc: Copied from DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc.
  • DumpRenderTree/win/resource.h: Copied from DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/resource.h.
  • MiniBrowser/MiniBrowser.vcxproj: Removed.
  • MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.ico: Removed.
  • MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.rc: Removed.
  • MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.rc: Removed.
  • MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibResource.h: Removed.
  • MiniBrowser/MiniBrowser.vcxproj/MiniBrowserResource.h: Removed.
  • MiniBrowser/MiniBrowser.vcxproj/small.ico: Removed.
  • MiniBrowser/win/CMakeLists.txt:
  • MiniBrowser/win/MiniBrowser.ico: Copied from MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.ico.
  • MiniBrowser/win/MiniBrowser.rc: Copied from MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.rc.
  • MiniBrowser/win/MiniBrowserLib.rc: Copied from MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.rc.
  • MiniBrowser/win/MiniBrowserLibResource.h: Copied from MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibResource.h.
  • MiniBrowser/win/MiniBrowserResource.h: Copied from MiniBrowser/MiniBrowser.vcxproj/MiniBrowserResource.h.
  • MiniBrowser/win/small.ico: Copied from MiniBrowser/MiniBrowser.vcxproj/small.ico.
  • WebKitTestRunner/WebKitTestRunner.sln: Removed.
  • win/DLLLauncher/DLLLauncherWinCairo.props: Removed.
11:06 PM Changeset in webkit [201913] by Chris Fleizach
  • 8 edits
    1 add in trunk

AX: VoiceOver Unable to View Download Progress or Completion Status for Mail Attachments
https://bugs.webkit.org/show_bug.cgi?id=158581

Reviewed by Darin Adler.

Source/WebCore:

Update attachment element accessibility so that:

1) the action name comes first to match UI
2) on iOS, it has the updates frequently trait

Make sure this test now runs on iOS as well.

Modified tests: accessibility/attachment-element.html

  • accessibility/AccessibilityAttachment.cpp:

(WebCore::AccessibilityAttachment::accessibilityText):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper accessibilityValue]):
(-[WebAccessibilityObjectWrapper accessibilityIsAttachmentElement]):
(-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):

LayoutTests:

  • accessibility/attachment-element-expected.txt:
  • accessibility/attachment-element.html:
  • accessibility/ios-simulator/attributed-string-for-range-expected.txt:
  • platform/ios-simulator/TestExpectations:
  • platform/ios-simulator/accessibility/attachment-element-expected.txt: Added.
10:53 PM Changeset in webkit [201912] by achristensen@apple.com
  • 2 edits
    1 copy
    4 deletes in trunk/Source/JavaScriptCore

Clean up JavaScriptCore.vcxproj directory after switching to CMake.

10:42 PM Changeset in webkit [201911] by achristensen@apple.com
  • 1 edit
    2 deletes in trunk/Source/WebCore

Clean up WebCore.vcxproj after switching to CMake.

  • WebCore.vcxproj/QTMovieWin: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinPreBuild.cmd: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinPreLink.cmd: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props: Removed.
  • WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props: Removed.
  • WebCore.vcxproj/xcopy.excludes: Removed.
10:39 PM Changeset in webkit [201910] by achristensen@apple.com
  • 1 edit
    1 move in trunk/Source/WebKit/win

Fix Windows build.

  • WebKit.resources/resource.h: Removed.
  • resource.h: Copied from WebKit.resources/resource.h.
10:34 PM Changeset in webkit [201909] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit/win

Actually fix Windows build after r201894
https://bugs.webkit.org/show_bug.cgi?id=158588

  • WebView.cpp:

(WebView::initWithFrame):

10:33 PM Changeset in webkit [201908] by achristensen@apple.com
  • 3 edits
    1 copy
    3 deletes in trunk/Source/WebKit

Clean up WebKit.vcxproj directory after switching to CMake.

Source/WebKit:

  • PlatformWin.cmake:
  • WebKit.vcxproj/Interfaces: Removed.
  • WebKit.vcxproj/WebKit: Removed.
  • WebKit.vcxproj/WebKit/resource.h: Removed.
  • WebKit.vcxproj/WebKitGUID: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj.filters: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDCommon.props: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDDebug.props: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDDebugWinCairo.props: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDPostBuild.cmd: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDPreBuild.cmd: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDProduction.props: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDRelease.props: Removed.
  • WebKit.vcxproj/WebKitGUID/WebKitGUIDReleaseWinCairo.props: Removed.

Source/WebKit/win:

  • WebKit.resources/resource.h: Copied from WebKit.vcxproj/WebKit/resource.h.
10:27 PM Changeset in webkit [201907] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Hairline borders do not show up on 3x displays.
https://bugs.webkit.org/show_bug.cgi?id=158604
<rdar://problem/26511679>

Reviewed by Simon Fraser.

On a 3x display, when we convert a 1/3px hairline border from float
to LayoutUnit and pixel floor the result, we end up with a 0px width border.
It's because float to LayoutUnit is lossy and since the current kFixedPointDenominator % 3 != 0,
flooring LayoutUnit(1/3px) ends up being 0px. (float: 1/3 -> LayoutUnit: (1/3 - 1/kFixedPointDenominator) -> floor: 0)
This patch eliminates the (unnecessary) float -> LayoutUnit - float conversion on border width.

Source/WebCore:

Test: fast/borders/hidpi-3x-input-hairline-border.html

  • rendering/BorderEdge.cpp:

(WebCore::BorderEdge::BorderEdge):

  • rendering/BorderEdge.h:

LayoutTests:

  • fast/borders/hidpi-3x-input-hairline-border-expected-mismatch.html: Added.
  • fast/borders/hidpi-3x-input-hairline-border.html: Added.
10:24 PM Changeset in webkit [201906] by Ryan Haddad
  • 10 edits
    2 deletes in trunk

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

This change caused LayoutTest crashes under GuardMalloc and
ASan (Requested by ryanhaddad on #webkit).

Reverted changeset:

"Deleting a CSSOM style rule invalidates any previously-added
FontFaces"
https://bugs.webkit.org/show_bug.cgi?id=158450
http://trac.webkit.org/changeset/201887

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-09

10:17 PM Changeset in webkit [201905] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit/win

Unreviewed build fix after r201894
https://bugs.webkit.org/show_bug.cgi?id=158588

  • WebCoreSupport/WebEditorClient.cpp:

(WebEditorClient::~WebEditorClient):
(WebEditorClient::isContinuousSpellCheckingEnabled):
(WebEditorClient::pageDestroyed): Deleted.

  • WebCoreSupport/WebEditorClient.h:
  • WebView.cpp:

(WebView::initWithFrame):

8:31 PM Changeset in webkit [201904] by Alan Bujtas
  • 6 edits
    2 adds in trunk

Add testing support for 3x device scale factor.
https://bugs.webkit.org/show_bug.cgi?id=158597

Reviewed by Simon Fraser.

Set 3x device scale factor on the test canvas when the test url is prefixed with hidpi-3x-.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(changeWindowScaleIfNeeded):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::updateWindowScaleForTest):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::deviceScaleFactorForTest):
(WTR::TestOptions::TestOptions):
(WTR::isHiDPITestPath): Deleted.

  • WebKitTestRunner/TestOptions.h:

LayoutTests:

  • fast/hidpi/hidpi-3x-device-pixel-ratio-expected.txt: Added.
  • fast/hidpi/hidpi-3x-device-pixel-ratio.html: Added.
8:20 PM Changeset in webkit [201903] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Address Darin's review comment on r201898.
https://bugs.webkit.org/show_bug.cgi?id=158576

Reviewed by Darin Adler.

  • page/Base64Utilities.h:
7:45 PM Changeset in webkit [201902] by rniwa@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION(r201823) editing/selection/selection-in-iframe-removed-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=158569

Commit the test fix that was supposed to be landed as a part of r201823,
and remove the flaky test expectation.

  • editing/selection/selection-in-iframe-removed-crash.html:
  • platform/mac/TestExpectations:
7:06 PM Changeset in webkit [201901] by commit-queue@webkit.org
  • 16 edits
    2 adds in trunk

[iOS] -webkit-overflow-scrolling: touch; ignores pointer-events: none;
https://bugs.webkit.org/show_bug.cgi?id=119839
<rdar://problem/9671514>

Patch by Antoine Quint <Antoine Quint> on 2016-06-09
Reviewed by Simon Fraser.

Source/WebCore:

Propagate a "userInteractionEnabled" flag from the Web process which is used to turn off
user interaction on a UIScrollView created for -webkit-overflow-scrolling: touch.

Test: fast/scrolling/ios/touch-scroll-pointer-events-none.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::userInteractionEnabled):
(WebCore::GraphicsLayer::setUserInteractionEnabled):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setUserInteractionEnabled):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateUserInteractionEnabled):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayerCocoa::userInteractionEnabled):
(PlatformCALayerCocoa::setUserInteractionEnabled):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateAfterDescendants):

Source/WebKit2:

Propagate a "userInteractionEnabled" flag from the Web process which is used to turn off
user interaction on a UIScrollView created for -webkit-overflow-scrolling: touch.

  • Shared/mac/RemoteLayerTreePropertyApplier.mm:

(WebKit::RemoteLayerTreePropertyApplier::applyProperties):

  • Shared/mac/RemoteLayerTreeTransaction.h:
  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::userInteractionEnabled):
(WebKit::PlatformCALayerRemote::setUserInteractionEnabled):

  • WebProcess/WebPage/mac/PlatformCALayerRemote.h:

LayoutTests:

  • fast/scrolling/ios/touch-scroll-pointer-events-none-expected.txt: Added.
  • fast/scrolling/ios/touch-scroll-pointer-events-none.html: Added.
7:03 PM Changeset in webkit [201900] by fpizlo@apple.com
  • 4 edits
    2 adds in trunk/Source/JavaScriptCore

Rare failure in stress/v8-deltablue-strict.js.ftl-eager
https://bugs.webkit.org/show_bug.cgi?id=158591

Reviewed by Saam Barati.

This is a simple and sensible fix to an amazing compiler bug that previously only
manifested rarely in the v8-deltablue-strict test. It required on average 1000 runs while
the system was under load for the bug to manifest. Fortunately, the bug is 100% repro with
concurrent JIT disabled in the new "constant-fold-multi-get-by-offset-to-get-by-offset-on-
prototype-and-sink-allocation.js" test.

The problem here is that we were allowing ourselves to be super sloppy with the meaning of
the two children of GetByOffset, and to a lesser extent, PutByOffset. The first two
children of these nodes have these meanings:

child1: the storage from which to load (or to which to store)
child2: the logical object base

Normally, child1 == child2, but child1 may point to a node that vends the storage pointer
in case we are using multiple indirections to get to the property. That's fairly common.

Where this gets nutty is that we don't validate the behavior of child1. Previously, the
DFG::Validate phase would accept code that had child1 point to one object and child2 point
to another object. That's bad because then, analyses will assume that we're loading from
one object while we are actually loading from another. One of the fixes is to make
Validate smarter about this, so that future problems with this get caught sooner.

The actual bug was in ConstantFoldingPhase. When we first wrote ConstantFoldingPhase's
logic for converting GetByIds and MultiGetByOffsets to GetByOffset, we assumed that this
was only for non-prototype loads. This was becuase the logic was originally written based
on a static GetByIdStatus analysis, which does not handle prototypes. So, as a shortcut,
we would convert the GetById (or MultiGetByOffset) to a GetByOffset by doing this
shuffling of children:

child1 got the storage pointer, which might be a new GetButterfly node that we created.
child2 got the old value of child1.

The bug was introduced when I later made it possible for a monomorphic prototype
MultiGetByOffset to be converted to a GetByOffset. Then this algorithm would mean that:

child1 got either a pointer to the prototype or a storage pointer derived from the

prototype.

child2 got the old value of child1, which was a pointer to the base object (i.e. not the

prototype).


This happens super rarely because most prototype loads that we can statically reason about
also happen to load constants, so we don't convert to GetByOffset at all. You need the
strange combination of a MultiGetByOffset (not GetById or GetByOffset) on some prototypes
and some static reasoning about the base so that we can convert it to a GetByOffset, but
not enough static reasoning that we can convert it to a constant.

Even if the bad thing happened, then this is not enough for it to cause symptons. If we
did nothing else - like none of the other optimizations succeeded - then this would
be OK because the backend will emit code based on child1, which is right. But disaster
strikes when the code otherwise looks sane enough for ObjectAllocationSinkingPhase to kick
in. This phase operates on child2, as any good phase should: child1 is only interesting
for knowing *how* to load, not *what* we are loading. The phase is right to ignore child1.

So the phase would assume that we are loading the prototype property ("f" in the new test
or "addToGraph" in deltablue) from the sunken base object allocation in the inlined
constructor. The base object has no such property, but the phase conservatively assumes
that it does indeed have such a property. That's just how the phase does things: it is
very abstract and general, so it assumes that the set of properties on an allocation is
the set of properties that accesses to the allocation speak of. Clearly, this GetByOffset
was speaking of the property as being on the allocation. When sinking completed, it would
convert the GetByOffset to the sunken (a.k.a. promoted) property. But nobody stored to
this property on the allocation, so we'd get the bottom value, which is 1927. Why 1927? I
don't remember anymore, but apparently I chose it. It helped here - when I started seeing
that value come up, it took a quick grep to realize that this was the object allocation
sinking phase's bottom value.

The real fix to the bug is to make Node::convertToGetByOffset() take an explicit new base
since its clients will use it to potentially create a load on a different object than the
base of the original operation, as in the relatively new
MultiGetByOffset(prototype)->GetByOffset optimization. As far as I know, the PutByOffset
code did not have the same bug because we don't have any optimizations that turn a PutById
or MultiPutByOffset into a PutByOffset on anything but the base object. But the logical
bug is definitely there: there's code in ConstantFoldingPhase that claims to be able to
convert any node to a PutByOffset on any base, but it actually silently reuses the
original node's child1 as the logical base (i.e. child2). This patch makes all of this
stuff explicit. You can't make this mistake anymore.

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToGetStack):
(JSC::DFG::Node::convertToGetByOffset):
(JSC::DFG::Node::convertToMultiGetByOffset):
(JSC::DFG::Node::convertToPutByOffset):

  • dfg/DFGValidate.cpp:
  • tests/stress/constant-fold-multi-get-by-offset-to-get-by-offset-on-prototype-and-sink-allocation.js: Added.

(ThingA):
(ThingB):
(foo):
(bar):

  • tests/stress/sink-to-impossible-multi-get-by-offset-on-prototypes.js: Added.

(ThingA):
(ThingB):
(ThingC):
(bar):
(foo):

6:54 PM Changeset in webkit [201899] by Chris Dumez
  • 4 edits in trunk

WorkerNavigator property should exist on WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=158574
<rdar://problem/26725108>

Reviewed by Darin Adler.

Source/WebCore:

WorkerNavigator property should exist on WorkerGlobalScope:
https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object

Fixing this gets the number of failures on http://w3c-test.org/workers/interfaces.worker
from 34 to 23.

No new tests, rebaselined existing test.

  • page/WorkerNavigator.idl:

LayoutTests:

Rebaseline existing test now that WorkerNavigator is exposed to workers.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
6:42 PM Changeset in webkit [201898] by Chris Dumez
  • 12 edits
    1 move
    5 adds
    1 delete in trunk

atob() / btoa() API should be exposed to workers
https://bugs.webkit.org/show_bug.cgi?id=158576
<rdar://problem/26729340>

Reviewed by Sam Weinig.

Source/WebCore:

Expose atob() / btoa() API to workers as per:
https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope

This aligns our behavior with Firefox and Chrome as well.

Test: fast/workers/atob-btoa.html

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • page/Base64Utilities.cpp: Added.

(WebCore::Base64Utilities::btoa):
(WebCore::Base64Utilities::atob):

  • page/Base64Utilities.h: Added.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::find): Deleted.
(WebCore::DOMWindow::offscreenBuffering): Deleted.
(WebCore::DOMWindow::outerHeight): Deleted.
(WebCore::DOMWindow::outerWidth): Deleted.

  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • page/WindowBase64.idl: Removed.
  • page/WindowOrWorkerGlobalScope.idl: Renamed from Source/WebCore/page/WindowTimers.idl.
  • workers/WorkerGlobalScope.h:
  • workers/WorkerGlobalScope.idl:

LayoutTests:

Add test for atob() / btoa() in workers.

  • fast/workers/atob-btoa-expected.txt: Added.
  • fast/workers/atob-btoa.html: Added.
  • fast/workers/resources/worker-atob-btoa.js: Added.
6:11 PM Changeset in webkit [201897] by andersca@apple.com
  • 3 edits
    2 deletes in trunk/Source/WebKit2

Remove OriginAndDatabases.cpp, it's unused
https://bugs.webkit.org/show_bug.cgi?id=158595

Reviewed by Sam Weinig.

  • CMakeLists.txt:
  • Shared/OriginAndDatabases.cpp: Removed.

(WebKit::OriginAndDatabases::encode): Deleted.
(WebKit::OriginAndDatabases::decode): Deleted.

  • Shared/OriginAndDatabases.h: Removed.
  • WebKit2.xcodeproj/project.pbxproj:
5:42 PM Changeset in webkit [201896] by mark.lam@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

Make some methods const.
https://bugs.webkit.org/show_bug.cgi?id=158594

Reviewed by Benjamin Poulain.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::columnNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):

  • bytecode/CodeBlock.h:
  • bytecode/ExpressionRangeInfo.h:

(JSC::ExpressionRangeInfo::encodeFatColumnMode):
(JSC::ExpressionRangeInfo::decodeFatLineMode):
(JSC::ExpressionRangeInfo::decodeFatColumnMode):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset):
(JSC::UnlinkedCodeBlock::getLineAndColumn):
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::createRareDataIfNecessary):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::isOpcode):
(JSC::StackFrame::computeLineAndColumn):
(JSC::StackFrame::toString):

  • interpreter/Interpreter.h:

(JSC::StackFrame::isNative):

5:21 PM Changeset in webkit [201895] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

Restrict HTTP/0.9 responses to default ports and cancel HTTP/0.9 resource loads if the document was loaded with another HTTP protocol
https://bugs.webkit.org/show_bug.cgi?id=158589
<rdar://problem/25757454>

Patch by John Wilander <wilander@apple.com> on 2016-06-09
Reviewed by Brent Fulgham.

No new tests. Our layout test environment does not allow for headerless responses
nor does it allow you to set an explicit HTTP/0.9 status header in PHP. I have
manually tested this change with a Python socket setup doing both headerless and
HTTP/0.9 header tests for positive and negative cases.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived):

Cancel loads if the request was made to a non-default port.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveResponse):

Cancel loads if the request was made to a non-default port or if the document
was loaded with another protocol. Cancelation is handled as a fail so as to
fire the onerror event and allow sites to handle it gracefully.

4:53 PM Changeset in webkit [201894] by achristensen@apple.com
  • 19 edits in trunk/Source

Clean up EditorClient lifetime
https://bugs.webkit.org/show_bug.cgi?id=158588

Reviewed by Anders Carlsson.

Source/WebCore:

No new tests. This patch does two things, all of which do not change behavior:

  1. Use a std::unique_ptr<EditorClient> owned by the Page instead of allocating

with new in WebKit/WebKit2 and deleting in WebEditorClient::pageDestroyed.

  1. Give the Page a PageConfiguration&& instead of a PageConfiguration& in its constructor.
  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::overlayPage):

  • loader/EmptyClients.cpp:

(WebCore::fillWithEmptyClients):

  • loader/EmptyClients.h:

(WebCore::EmptyEditorClient::EmptyEditorClient):
(WebCore::EmptyEditorClient::~EmptyEditorClient):

  • page/EditorClient.h:

(WebCore::EditorClient::~EditorClient):

  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::setViewMode):
(WebCore::Page::clearUndoRedoOperations):
(WebCore::Page::inLowQualityImageInterpolationMode):
(WebCore::Page::invalidateStylesForAllLinks):
(WebCore::Page::invalidateStylesForLink):
(WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
(WebCore::Page::setDebugger):
(WebCore::Page::setIsVisibleInternal):
(WebCore::Page::setAllowsMediaDocumentInlinePlayback):

  • page/Page.h:

(WebCore::Page::canStartMedia):
(WebCore::Page::editorClient):
(WebCore::Page::plugInClient):
(WebCore::Page::mainFrame):
(WebCore::Page::group):

  • page/PageConfiguration.cpp:
  • page/PageConfiguration.h:
  • page/mac/PageMac.mm:

(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Source/WebKit/mac:

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::WebEditorClient):
(WebEditorClient::pageDestroyed): Deleted.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::generateTextCheckingRequestID):
(WebKit::WebEditorClient::shouldDeleteRange):
(WebKit::WebEditorClient::pageDestroyed): Deleted.

  • WebProcess/WebCoreSupport/WebEditorClient.h:

(WebKit::WebEditorClient::WebEditorClient):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_shouldDispatchFakeMouseMoveEvents):

4:48 PM Changeset in webkit [201893] by commit-queue@webkit.org
  • 5 edits in trunk/Source

REGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
https://bugs.webkit.org/show_bug.cgi?id=158592
<rdar://problem/26730696>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-09
Reviewed by Timothy Hatcher.

Source/WebCore:

  • inspector/InspectorIndexedDBAgent.cpp:

(WebCore::DataLoader::execute):
Ensure the IDBTransaction is active when attempting to open a cursor.

(WebCore::OpenCursorCallback::handleEvent):
End, when the cursor result is empty, like we do for script results.

Source/WebInspectorUI:

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype._noteRowRemoved):
(WebInspector.DataGridNode.prototype._detach):
When rows are removed in the non-Virtual DataGrids, we should
actually remove the row.

  • UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:

(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
Don't use the delete operator. Use a boolean.

4:30 PM Changeset in webkit [201892] by msaboff@apple.com
  • 5 edits in trunk

ES6: Reusing function name as a parameter name shouldn't throw Syntax Error
https://bugs.webkit.org/show_bug.cgi?id=158575

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

The check for a parameter with a duplicate name doesn't take into account the
type of the prior variable. Added a check that the duplicate is also a
parameter.

See the relevant spec section at:
http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions-static-semantics-early-errors

  • parser/Parser.h:

(JSC::Scope::declareParameter):

LayoutTests:

Added a new test case.

  • js/basic-strict-mode-expected.txt:
  • js/script-tests/basic-strict-mode.js:
3:55 PM Changeset in webkit [201891] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Support Command-P for quick open
https://bugs.webkit.org/show_bug.cgi?id=158579
<rdar://problem/26726751>

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):

3:49 PM Changeset in webkit [201890] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

REGRESSION (r194717): Web Inspector: Elements tab: an element loses focus when selected by Up/Down key
https://bugs.webkit.org/show_bug.cgi?id=157768
<rdar://problem/26311155>

Reviewed by Timothy Hatcher.

Remove _previousFocusedSection and _newInspectorRuleSelector since it was used only
to focus on a newly created section (added by clicking on "+" button).

Introduce _inspectorSection and _isInspectorSectionPendingFocus.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): Deleted.
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): Deleted.
No longer needed, it was only used by _previousFocusedSection and _newInspectorRuleSelector.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.): Deleted.
No londer needed, it was only used by _previousFocusedSection.

  • UserInterface/Views/RulesStyleDetailsPanel.js:

(WebInspector.RulesStyleDetailsPanel):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused): Deleted.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): Deleted.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector): Deleted.

3:34 PM Changeset in webkit [201889] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Changing canvas height immediately after page load does not relayout canvas
https://bugs.webkit.org/show_bug.cgi?id=156097

Patch by Antoine Quint <Antoine Quint> on 2016-06-09
Reviewed by Zalan Bujtas.

Source/WebCore:

Promote the logic use to identify whether we should perform a layout after a change of
intrinsic size from RenderImage to RenderReplaced such that RenderCanvas may use it
in canvasSizeChanged() and correctly update its layout in the case where the width
or height attribute is updated and there are no explicit sizing performed with CSS.
Additionally, this will also account for the object-fix property to only perform
a layout if necessary.

Test: fast/canvas/canvas-css-size-after-height-change-with-display-flex.html

  • rendering/RenderHTMLCanvas.cpp:

(WebCore::RenderHTMLCanvas::canvasSizeChanged):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::repaintOrMarkForLayout):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::setNeedsLayoutIfNeededAfterIntrinsicSizeChange):

  • rendering/RenderReplaced.h:

LayoutTests:

  • fast/canvas/canvas-css-size-after-height-change-with-display-flex-expected.html: Added.
  • fast/canvas/canvas-css-size-after-height-change-with-display-flex.html: Added.
3:05 PM Changeset in webkit [201888] by aestes@apple.com
  • 16 edits
    1 add in trunk/Source/WebKit2

WKWebView does not render PDF pages in AirPrint
https://bugs.webkit.org/show_bug.cgi?id=151386
rdar://problem/22499157

Reviewed by Tim Horton.

_WKWebViewPrintFormatter originally attempted to handle PDFs, but the code path was never
properly tested since Safari prints PDFs by setting a printingItem on the
UIPrintInteractionController instead of going through a print formatter. The existing code
almost worked, if it weren't for CGContextScaleCTM() scaling each page into oblivion due to
_totalScaleFactor equaling 0.

This patch properly implements -[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:] to
handle drawing both PDFs generated by WebKit and PDFs loaded in the main frame. It also
takes the opportunity to clean up a number of issues in the existing code:

  • Handling of -[_WKWebViewPrintFormatter startPage] is now correct. I had previously assumed this property represented the first page of output to print, but it actually represents the first page in the overall print job that the print formatter renders. In other words, regardless of -startPage, the print formatter should always print all its pages.
  • Code specific to webpage and PDF printing was factored out into WKContentView and WKPDFView, respectively. Each conforms to @protocol(_WKWebViewPrintProvider), and _WKWebViewPrintFormatter accesses the provider via -[WKWebView _printProvider].
  • Instead of piping the printed PDF data from WebPageProxy to WKWebView via PageClient, use the GenericCallback mechanism to have WebPageProxy call a lambda specified by WKContentView when the printed PDF is available.
  • Removed _totalScaleFactor and used CGPDFPageGetDrawingTransform() to transform both webpages and PDFs. For webpages, _totalScaleFactor will always equal the ratio of the paper width to the PDF page width, so CGPDFPageGetDrawingTransform() will apply the same scaling as CGContextScaleCTM(_totalScaleFactor, _totalScaleFactor) would.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _printProvider]): Added. Returns _currentContentView if it conforms to
@protocol(_WKWebViewPrintProvider).
(-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:firstPage:computedTotalScaleFactor:]):
Moved code to _wk_pageCountForPrintFormatter in WKContentView and WKPDFView.
(-[WKWebView _endPrinting]): Deleted.
(-[WKWebView _printedDocument]): Deleted.
(-[WKWebView _setPrintedDocument:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h: Declared the _printProvider property.
  • UIProcess/PageClient.h: Removed didFinishDrawingPagesToPDF().
  • UIProcess/WebPageProxy.h: Declared computePagesForPrintingAndDrawToPDF() and

drawToPDFCallback().

  • UIProcess/WebPageProxy.messages.in: Renamed DidFinishDrawingPagesToPDF to

DrawToPDFCallback.

  • UIProcess/_WKWebViewPrintFormatter.mm: Backed the frameToPrint property with a RetainPtr

ivar so that it doesn't need to be released manually in -dealloc; removed _totalScaleFactor
and _printInfo ivars and added a _printedDocument ivar; removed the property declaration for
webView.
(-[_WKWebViewPrintFormatter frameToPrint]): Added a custom getter for the frameToPrint
property.
(-[_WKWebViewPrintFormatter setFrameToPrint:]): Added a custom setter for the frameToPrint
property.
(-[_WKWebViewPrintFormatter _webView]): Renamed from webView; added an underscore since this
is a private method.
(-[_WKWebViewPrintFormatter _recalcPageCount]): Retrieved the page count from the print
provider and clamped its value to NSIntegerMax.
(-[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Retrieved the printed document
from the print provider if needed; modified the CTM transformations to work for both
webpages and PDFs.
(-[_WKWebViewPrintFormatter dealloc]): Deleted.
(-[_WKWebViewPrintFormatter webView]): Renamed to _webView.
(-[_WKWebViewPrintFormatter rectForPageAtIndex:]): Deleted.

  • UIProcess/_WKWebViewPrintFormatterInternal.h: Added. Moved a UIPrintFormatter internal

method declaration to here and defined the _WKWebViewPrintProvider protocol.

  • UIProcess/ios/PageClientImplIOS.h: Removed didFinishDrawingPagesToPDF().
  • UIProcess/ios/PageClientImplIOS.mm: Ditto.

(WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Deleted.

  • UIProcess/ios/WKContentView.mm: Conformed to @protocol(_WKWebViewPrintProvider).

(-[WKContentView _wk_pageCountForPrintFormatter:]): Moved the code to compute page count
from WKWebView to here.
(-[WKContentView _wk_printedDocument]): Moved the code to get the printed document from
WKWebView to here.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _wk_pageCountForPrintFormatter:]): Moved the code to compute the page count
from WKWebView to here; added a call to CGPDFDocumentAllowsPrinting(), returning 0 if
printing is not allowed.
(-[WKPDFView _wk_printedDocument]): Moved the code to get the printed document from
WKWebView to here.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF): Registered the callback with
m_callbacks and sent Messages::WebPage::ComputePagesForPrintingAndDrawToPDF; returned the
synchronously-returned page count.
(WebKit::WebPageProxy::drawToPDFCallback): Added to perform the callback when drawing to PDF
is complete.
(WebKit::WebPageProxy::didFinishDrawingPagesToPDF): Deleted.

  • WebKit2.xcodeproj/project.pbxproj: Added _WKWebViewPrintFormatterInternal.h.
  • WebProcess/WebPage/WebPage.h: Renamed computePagesForPrintingAndStartDrawingToPDF() to

computePagesForPrintingAndDrawToPDF().

  • WebProcess/WebPage/WebPage.messages.in: Renamed

ComputePagesForPrintingAndStartDrawingToPDF to ComputePagesForPrintingAndDrawToPDF. Removed
the startPage parameter and added a callbackID.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::computePagesForPrintingAndDrawToPDF): Renamed from
computePagesForPrintingAndStartDrawingToPDF(). Added a call to endPrinting() after sending
Messages::WebPageProxy::DrawToPDFCallback.
(WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Renamed to
computePagesForPrintingAndDrawToPDF.

3:03 PM Changeset in webkit [201887] by mmaxfield@apple.com
  • 10 edits
    2 adds in trunk

Deleting a CSSOM style rule invalidates any previously-added FontFaces
https://bugs.webkit.org/show_bug.cgi?id=158450

Reviewed by Darin Adler.

Source/WebCore:

This patch has two pieces: updating the CSSOM when the FontFace changes, and
updating the FontFace when the CSSOM changes.

1: Updating the CSSOM when the FontFace changes: CSSFontFaces already have a RefPtr
to their StyleRuleFontFace which represents their CSS-connection. When changing a
property of the CSSFontFace, we simply reach into the StyleRule and update it to
match. Our existing infrastructure of invalidation due to the attribute changes
makes sure that all the necessary updates occur.

  1. Updating the FontFace when the CSSOM changes: If the CSSOM changes in a trivial

way (for example, a new @font-face is appended to the end of the last <style>
element), we can handle it directly. However, when something more invasive occurs,
we end up clearing the entire CSSFontSelector, and then adding all the style rules
from scratch. This involves three steps:

a) CSSFontSelector::buildStarted() is run, which means "we're about to start

building up all the @font-face rules from scratch." We take this opportunity
to purge as many fonts as possible. This is valuable because, for example,
this function gets run when the page gets put into the page cache, so we
want to destroy as much as possible. Not everything can be purged, however -
only CSS-connected fonts which have never been inspected by script are
purgeable. We don't allow fonts inspected by script to be purged because
purging might result in a font appearing from JavaScript to transition from
a success -> failure state, which we don't allow.

b) Upon style recalc (possibly asynchronously) CSSFontSelector::addFontFaceRule()

is called for each @font-face rule. We actually detect that we're in the
middle of a style rebuild, and defer this step.

c) When we're done adding all the font face rules, we call

CSSFontSelector::buildCompleted(). This is where we compare the newly built-
up list of font faces with what existed previously (as remembered in
CSSFontSelector::buildStarted()) in order to detect font faces which were
deleted from the document. Fonts which were newly added to the document
are handled naturally.
Fonts which have a property modified on them are created as if they were new.
However, instead of simply adding the CSSFontFace, we search for the existing
CSSFontFace (by CSS connection pointer) and tell the existing FontFace to
adopt this new CSSFontFace. This means that the JavaScript object will just
pick up any newly-written values in the CSSOM. It also means that the
"status" attribute of the JavaScript object is reset, but this is expected
and allowed by the spec. (For example, if you change the "src" attribute of
an @font-face block via the CSSOM, all bets are off when you inspect the
FontFace JS object representing that block.)

Test: fast/text/font-face-set-cssom.html

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::CSSFontFace):
(WebCore::CSSFontFace::setFamilies):
(WebCore::CSSFontFace::setStyle):
(WebCore::CSSFontFace::setWeight):
(WebCore::CSSFontFace::setUnicodeRange):
(WebCore::CSSFontFace::setVariantLigatures):
(WebCore::CSSFontFace::setVariantPosition):
(WebCore::CSSFontFace::setVariantCaps):
(WebCore::CSSFontFace::setVariantNumeric):
(WebCore::CSSFontFace::setVariantAlternates):
(WebCore::CSSFontFace::setVariantEastAsian):
(WebCore::CSSFontFace::setFeatureSettings):
(WebCore::CSSFontFace::initializeWrapper):
(WebCore::CSSFontFace::wrapper):
(WebCore::CSSFontFace::setWrapper):
(WebCore::CSSFontFace::purgeable):
(WebCore::CSSFontFace::updateStyleIfNeeded):

  • css/CSSFontFace.h:
  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::remove):
(WebCore::CSSFontFaceSet::containsCSSConnection):
(WebCore::CSSFontFaceSet::purge):

  • css/CSSFontFaceSet.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::buildStarted):
(WebCore::CSSFontSelector::buildCompleted):
(WebCore::CSSFontSelector::addFontFaceRule):

  • css/CSSFontSelector.h:
  • css/FontFace.cpp:

(WebCore::FontFace::family):
(WebCore::FontFace::style):
(WebCore::FontFace::weight):
(WebCore::FontFace::unicodeRange):
(WebCore::FontFace::variant):
(WebCore::FontFace::featureSettings):
(WebCore::FontFace::adopt):

  • css/FontFace.h:

LayoutTests:

  • fast/text/font-face-set-cssom-expected.txt: Added.
  • fast/text/font-face-set-cssom.html: Added.
2:41 PM Changeset in webkit [201886] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking webgl/webgl-backing-store-size-update.html as a flaky timeout on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=158585

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:38 PM Changeset in webkit [201885] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Removing Mavericks-specific TestExpectations from mac-wk1 TestExpectations file.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:34 PM Changeset in webkit [201884] by aestes@apple.com
  • 5 edits in trunk/Source

Define printing{Minimum,Maximum}ShrinkFactor in only one place
https://bugs.webkit.org/show_bug.cgi?id=158580

Reviewed by Tim Horton.

Source/WebCore:

  • page/PrintContext.cpp: Removed printingMinimumShrinkFactor and printingMaximumShrinkFactor.

(WebCore::PrintContext::begin): Used minimumShrinkFactor() and maximumShrinkFactor() instead
of printingMinimumShrinkFactor and printingMaximumShrinkFactor.
(WebCore::PrintContext::computeAutomaticScaleFactor): Ditto.

  • page/PrintContext.h:

(WebCore::PrintContext::minimumShrinkFactor): Added to return the same value as
printingMinimumShrinkFactor.
(WebCore::PrintContext::maximumShrinkFactor): Added to return the same value as
printingMaximumShrinkFactor.

Source/WebKit/mac:

  • WebView/WebHTMLView.mm: Initialized _WebHTMLViewPrintingMinimumShrinkFactor and

_WebHTMLViewPrintingMaximumShrinkFactor with PrintContext::minimumShrinkFactor() and
PrintContext::maximumShrinkFactor() instead of with duplicated float literals.

2:30 PM Changeset in webkit [201883] by eric.carlson@apple.com
  • 4 edits
    2 adds in trunk

Don't show the caption menu if a video has only forced tracks
https://bugs.webkit.org/show_bug.cgi?id=158573
<rdar://problem/24632384>

Reviewed by Jer Noble.

Source/WebCore:

Test: media/controls/forced-tracks-only.html

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.updateCaptionButton): Don't show the button of there are no user-selectable

text or audio tracks.

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Return an empty Vector if

there are no user-selectable tracks.

LayoutTests:

  • media/controls/forced-tracks-only-expected.txt: Added.
  • media/controls/forced-tracks-only.html: Added.
2:01 PM Changeset in webkit [201882] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

Pass through play state and toggle state to the WebPlaybackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=158578
<rdar://problem/25045616>

Reviewed by Beth Dakin.

Pass through the isPlaying portion of setRate() and allow toggling when a model is present.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::setRate):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

1:54 PM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
1:50 PM Changeset in webkit [201881] by fred.wang@free.fr
  • 4 edits in trunk/Source/WebCore

RenderMathOperator: Move calculation of preferred width into MathOperator
https://bugs.webkit.org/show_bug.cgi?id=157071

Reviewed by Brent Fulgham.

No new tests, behavior is not change.

  • rendering/mathml/MathOperator.cpp:

(WebCore::MathOperator::setOperator): Introduce a style parameter and call reset.
(WebCore::MathOperator::reset): New helper function to reset the operator.
For now we only set the width of the base glyph and the preferred max width.
(WebCore::MathOperator::calculateDisplayStyleLargeOperator): Calculate the m_maxPreferredWidth.
(WebCore::MathOperator::calculateStretchyData): Change the signature of the function and directly set m_maxPreferredWidth.

  • rendering/mathml/MathOperator.h: Add m_maxPreferredWidth member and update some declarations.

(WebCore::MathOperator::width): New helper function.
(WebCore::MathOperator::maxPreferredWidth): New helper function.

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): This function performs wrong
operations that will be fixed in bug 152244 when we update the tests.
For now, let's just use maxPreferredWidth() for non-horizontal operators.
(WebCore::RenderMathMLOperator::updateStyle): Use the new signature of the functions.

1:10 PM Changeset in webkit [201880] by achristensen@apple.com
  • 29 edits in trunk/Source

Clean up WebSocket code
https://bugs.webkit.org/show_bug.cgi?id=158551

Reviewed by Darin Adler.

Source/WebCore:

No new tests. There is no change in behavior.
There seems to be no reason why SocketStreamHandle should be an AuthenticationClient.

  • Modules/websockets/ThreadableWebSocketChannel.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:

(WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult):
(WebCore::ThreadableWebSocketChannelClientWrapper::bufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::setBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):

  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocket.cpp:

(WebCore::joinStrings):
(WebCore::saturateAdd):
(WebCore::WebSocket::send):
(WebCore::WebSocket::readyState):
(WebCore::WebSocket::bufferedAmount):
(WebCore::WebSocket::didReceiveBinaryData):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didUpdateBufferedAmount):
(WebCore::WebSocket::didStartClosingHandshake):
(WebCore::WebSocket::didClose):

  • Modules/websockets/WebSocket.h:
  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::~WebSocketChannel):
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::bufferedAmount):
(WebCore::WebSocketChannel::resume):
(WebCore::WebSocketChannel::willOpenSocketStream):
(WebCore::WebSocketChannel::didOpenSocketStream):
(WebCore::WebSocketChannel::didCloseSocketStream):
(WebCore::WebSocketChannel::didReceiveSocketStreamData):
(WebCore::WebSocketChannel::didUpdateBufferedAmount):
(WebCore::WebSocketChannel::didFailSocketStream):
(WebCore::WebSocketChannel::didStartLoading):
(WebCore::WebSocketChannel::appendToBuffer):
(WebCore::WebSocketChannel::processBuffer):
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::didReceiveAuthenticationChallenge): Deleted.
(WebCore::WebSocketChannel::didCancelAuthenticationChallenge): Deleted.

  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WebSocketChannelClient.h:

(WebCore::WebSocketChannelClient::~WebSocketChannelClient):
(WebCore::WebSocketChannelClient::didConnect):
(WebCore::WebSocketChannelClient::didReceiveMessage):
(WebCore::WebSocketChannelClient::didReceiveBinaryData):
(WebCore::WebSocketChannelClient::didReceiveMessageError):
(WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
(WebCore::WebSocketChannelClient::didStartClosingHandshake):
(WebCore::WebSocketChannelClient::didClose):
(WebCore::WebSocketChannelClient::WebSocketChannelClient):

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::send):
(WebCore::WorkerThreadableWebSocketChannel::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):

  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • platform/network/BlobData.cpp:

(WebCore::BlobData::appendData):
(WebCore::BlobData::appendFile):

  • platform/network/BlobData.h:

(WebCore::BlobDataItem::BlobDataItem):

  • platform/network/BlobRegistry.h:
  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::appendStorageItems):
(WebCore::BlobRegistryImpl::registerFileBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):

  • platform/network/BlobRegistryImpl.h:
  • platform/network/SocketStreamHandleBase.cpp:

(WebCore::SocketStreamHandleBase::send):
(WebCore::SocketStreamHandleBase::disconnect):
(WebCore::SocketStreamHandleBase::sendPendingData):

  • platform/network/SocketStreamHandleBase.h:
  • platform/network/SocketStreamHandleClient.h:

(WebCore::SocketStreamHandleClient::~SocketStreamHandleClient):
(WebCore::SocketStreamHandleClient::willOpenSocketStream):
(WebCore::SocketStreamHandleClient::didOpenSocketStream):
(WebCore::SocketStreamHandleClient::didCloseSocketStream):
(WebCore::SocketStreamHandleClient::didReceiveSocketStreamData):
(WebCore::SocketStreamHandleClient::didUpdateBufferedAmount):
(WebCore::SocketStreamHandleClient::didFailSocketStream):
(WebCore::SocketStreamHandleClient::didReceiveAuthenticationChallenge): Deleted.
(WebCore::SocketStreamHandleClient::didCancelAuthenticationChallenge): Deleted.

  • platform/network/cf/SocketStreamHandle.h:

(WebCore::SocketStreamHandle::create):
(WebCore::SocketStreamHandle::refAuthenticationClient): Deleted.
(WebCore::SocketStreamHandle::derefAuthenticationClient): Deleted.

  • platform/network/cf/SocketStreamHandleCFNet.cpp:

(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::addCONNECTCredentials):
(WebCore::SocketStreamHandle::copyCFStreamDescription):
(WebCore::SocketStreamHandle::readStreamCallback):
(WebCore::SocketStreamHandle::writeStreamCallback):
(WebCore::SocketStreamHandle::reportErrorToClient):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::port):
(WebCore::SocketStreamHandle::receivedCredential): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::SocketStreamHandle::receivedCancellation): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.

  • platform/network/curl/ResourceHandleCurl.cpp:
  • platform/network/curl/SocketStreamHandle.h:

(WebCore::SocketStreamHandle::SocketData::SocketData):

  • platform/network/curl/SocketStreamHandleCurl.cpp:

(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::readData):
(WebCore::SocketStreamHandle::didReceiveData):
(WebCore::SocketStreamHandle::didOpenSocket):
(WebCore::SocketStreamHandle::createCopy):
(WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
(WebCore::SocketStreamHandle::receivedCredential): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::SocketStreamHandle::receivedCancellation): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.

  • platform/network/soup/SocketStreamHandle.h:

(WebCore::SocketStreamHandle::create):

  • platform/network/soup/SocketStreamHandleSoup.cpp:

(WebCore::getHandleFromId):
(WebCore::deactivateHandle):
(WebCore::activateHandle):
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::connected):
(WebCore::SocketStreamHandle::readBytes):
(WebCore::SocketStreamHandle::platformSend):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
(WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
(WebCore::SocketStreamHandle::receivedCredential): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::SocketStreamHandle::receivedCancellation): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.

Source/WebKit2:

  • WebProcess/FileAPI/BlobRegistryProxy.cpp:

(WebKit::BlobRegistryProxy::registerFileBlobURL):

  • WebProcess/FileAPI/BlobRegistryProxy.h:
1:09 PM Changeset in webkit [201879] by Michael Catanzaro
  • 4 edits in trunk

Add comments to clarify feature enablement
https://bugs.webkit.org/show_bug.cgi?id=158567

Reviewed by Alex Christensen.

.:

  • Source/cmake/WebKitFeatures.cmake:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
12:24 PM Changeset in webkit [201878] by fpizlo@apple.com
  • 4 edits in trunk

PerformanceTests:
Unreviewed, teach the perf bots not to run JSAir.

  • Skipped:

Tools:
Unreviewed, skip jsair tests while we figure out the debug timeouts.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

11:52 AM Changeset in webkit [201877] by commit-queue@webkit.org
  • 5 edits in trunk

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

This broke the cmake build. (Requested by lforschler on
#webkit).

Reverted changeset:

"Teach cmake about libWebKitSystemInterfaceOSX10.12"
http://trac.webkit.org/changeset/201815

11:47 AM Changeset in webkit [201876] by Chris Dumez
  • 5 edits
    2 adds in trunk

WorkerGlobalScope attributes / operations should be on the prototype
https://bugs.webkit.org/show_bug.cgi?id=158568
<rdar://problem/26720079>

Reviewed by Geoffrey Garen.

Source/WebCore:

WorkerGlobalScope attributes / operations should be on the prototype
because WorkerGlobalScope is not marked as [Global] / [PrimaryGlobal]:

DedicatedWorkerGlobalScope is the interface that is marked as [Global]
and whose attributes / operations should be on the instance.

This brings the number of failures on http://w3c-test.org/workers/interfaces.worker
from 65 to 34. It also aligns our behavior with Firefox and Chrome.

Test: fast/workers/WorkerGlobalScope-properties-prototype.html

  • bindings/scripts/CodeGeneratorJS.pm:

(InterfaceRequiresAttributesOnInstance):
(OperationShouldBeOnInstance):

LayoutTests:

  • fast/workers/WorkerGlobalScope-properties-prototype-expected.txt: Added.
  • fast/workers/WorkerGlobalScope-properties-prototype.html: Added.

Add layout test coverage.

  • fast/workers/self-hasOwnProperty-expected.txt:
  • fast/workers/self-hasOwnProperty.html:

Update test I added a couple of days ago because it wrongly expected
the 'navigator' property to be on the instance. This check was failing
in other browsers (Firefox and Chrome).

11:33 AM Changeset in webkit [201875] by timothy_horton@apple.com
  • 5 edits
    2 adds in trunk

Writing-mode-dependent properties don't apply if their value is a variable
https://bugs.webkit.org/show_bug.cgi?id=158449
<rdar://problem/26662478>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/variables/direction-dependent-variable-properties.html

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseVariableDependentValue):

  • css/CSSParser.h:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::resolvedVariableValue):
CSSVariableDependentValue stores the unresolved (direction-dependent) property ID,
because the property that it resolves to cannot be determined until style resolution time.
Plumb the requisite direction and writing mode information into parseVariableDependentValue
at style resolution time so that the property can be resolved to the correct
non-direction-dependent property for each use of the value.

LayoutTests:

  • fast/css/variables/direction-dependent-variable-properties-expected.html: Added.
  • fast/css/variables/direction-dependent-variable-properties.html: Added.

Add a test ensuring that direction-dependent properties work correctly,
including flipping when the direction is flipped.

11:27 AM Changeset in webkit [201874] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking editing/selection/selection-in-iframe-removed-crash.html as flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=158569

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:42 AM Changeset in webkit [201873] by beidson@apple.com
  • 2 edits in trunk/Source/WTF

Unaddressed review feedback from r201872

  • wtf/CrossThreadTask.h:

(WTF::callFunctionForCrossThreadTask): Fix typo.

10:34 AM Changeset in webkit [201872] by beidson@apple.com
  • 4 edits in trunk

Greatly simplify CrossThreadTask.h.
https://bugs.webkit.org/show_bug.cgi?id=158542

Reviewed by Darin Adler.

Source/WTF:

  • wtf/CrossThreadTask.h:

(WTF::crossThreadCopy):
(WTF::callFunctionForCrossThreadTaskImpl):
(WTF::callFunctionForCrossThreadTask):
(WTF::createCrossThreadTask):
(WTF::callMemberFunctionForCrossThreadTaskImpl):
(WTF::callMemberFunctionForCrossThreadTask):

Tools:

  • TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:

(TestWebKitAPI::TEST):

10:31 AM Changeset in webkit [201871] by beidson@apple.com
  • 3 edits in trunk/LayoutTests

LayoutTest storage/indexeddb/modern/handle-user-delete.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=158501

Reviewed by Darin Adler.

The order in which the transaction abort happens doesn't matter; It only matters that it happens.

Update the test to reflect this.

  • storage/indexeddb/modern/handle-user-delete-expected.txt:
  • storage/indexeddb/modern/resources/handle-user-delete.js:
10:12 AM Changeset in webkit [201870] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix the iOS build.

Unreviewed build fix.

  • platform/network/mac/ResourceErrorMac.mm:

(WebCore::ResourceError::ResourceError):

10:07 AM Changeset in webkit [201869] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit2

Update properties for UIWKTextInteractionAssistant
<https://webkit.org/b/158559>

Reviewed by Darin Adler.

  • Platform/spi/ios/UIKitSPI.h:

(UIWKTextInteractionAssistant.loupeGesture):
(UIWKTextInteractionAssistant.singleTapGesture):
Change from retain to assign since UIWKTextInteractionAssistant
is not responsible for their lifetime. Sort alphabetically.

9:59 AM Changeset in webkit [201868] by Simon Fraser
  • 4 edits
    7 adds in trunk

border-radius with different width and height rendered wrong
https://bugs.webkit.org/show_bug.cgi?id=158300
<rdar://problem/26672922>

Reviewed by Zalan Bujtas.
Source/WebCore:

Borders with border-radius close to 100% 100% got oddly clipped. This happened because
of the clipping we do to achieve the diagonal corner joins; RenderBoxModelObject::clipBorderSidePolygon()
created trapezoids for each side, but only extended them to the center of the inner border rect.
This clipped out parts of these borders.

Fix by computing the trapezoids by intersecting the corner diagonal line with a line that passes
through the adjacent corners of the inner rect, whose intersection is always going to be inside the
rounded border. Also fix the quads used to do the antialiased/non-antialiased clipping,
by adding a point rather than moving a corner point to ensure we don't mistakenly clip out any
parts of the border.

Finally, improve the rendering of non-renderable cases by actually doing the diagonal
corner joins rather than just giving up.

Tests: fast/borders/border-non-renderable-radius-inner-clip.html

fast/borders/border-radius-inner-clip-vertical.html
fast/borders/border-radius-inner-clip.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::calculateAdjustedInnerBorder): Moved up.
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::RenderBoxModelObject::clipBorderSidePolygon):
(WebCore::findInnerVertex): Deleted.
(WebCore::calculateSideRectIncludingInner): Deleted.
(WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath): Deleted.

  • rendering/RenderBoxModelObject.h:

LayoutTests:

  • fast/borders/border-non-renderable-radius-inner-clip-expected.html: Added.
  • fast/borders/border-non-renderable-radius-inner-clip.html: Added.
  • fast/borders/border-radius-inner-clip-expected-mismatch.html: Added.
  • fast/borders/border-radius-inner-clip-vertical-expected-mismatch.html: Added.
  • fast/borders/border-radius-inner-clip-vertical.html: Added.
  • fast/borders/border-radius-inner-clip.html: Added.
  • fast/borders/resources/border-radius-helpers.js: Added.

(createContainer):
(createReferenceContainer):

9:49 AM Changeset in webkit [201867] by peavo@outlook.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening.

Unskip passing websocket tests.

  • platform/win/TestExpectations:
9:31 AM Changeset in webkit [201866] by Chris Dumez
  • 5 edits in trunk

Unreviewed, rolling out r201836, r201845, and r201848.

Looks like a 1-2% PLT regression on iOS

Reverted changesets:

"[JSC] Change some parameters based on a random search"
https://bugs.webkit.org/show_bug.cgi?id=158514
http://trac.webkit.org/changeset/201836

"Tempory fix for the debug bots"
http://trac.webkit.org/changeset/201845

"Change thresholdForOptimizeSoon to match
thresholdForOptimizeAfterWarmUp"
http://trac.webkit.org/changeset/201848

8:56 AM Changeset in webkit [201865] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed, rolling out r201842.

The change that prompted this rebaseline was rolled out.

Reverted changeset:

"Rebaseline js/dom/global-constructors-attributes.html for Mac
after r201810"
http://trac.webkit.org/changeset/201842

8:15 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
8:14 AM Changeset in webkit [201864] by calvaris@igalia.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fixing compilation issue with WebRTC

The code dependencies of the SDP processor were not right.

  • PlatformGTK.cmake:
8:04 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
7:54 AM Changeset in webkit [201863] by msaboff@apple.com
  • 7 edits
    2 adds in trunk

WebKitTestRunner and DumpRenderTree do not handle dangling surrogate characters
https://bugs.webkit.org/show_bug.cgi?id=154863

Reviewed by Alexey Proskuryakov.

Source/WebKit2:

Added a non-strict verions of WKStringGetUTF8CString() that will handle dangling
surrogates called WKStringGetUTF8CStringNonStrict().

  • Shared/API/c/WKString.cpp:

(WKStringGetUTF8CStringImpl):
(WKStringGetUTF8CString):
(WKStringGetUTF8CStringNonStrict):

  • Shared/API/c/WKString.h:

Tools:

Added a non-strict verions of WKStringGetUTF8CString() that will handle dangling
surrogates. Changed the extraction of inner text from frames in DumpRenderTree
to use the new WKStringGetUTF8CStringNonStrict() function instead of NSString
conversion since NSString doesn't have a way to handle dangling surrogates.
The code added in DumpRenderTree matches what was changed in WebKitTestRunner.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(dumpFramesAsText):

  • WebKitTestRunner/StringFunctions.h:

(WTR::toWTFString):

LayoutTests:

New tests.

  • fast/text/dangling-surrogates-expected.txt: Added.
  • fast/text/dangling-surrogates.html: Added.
7:50 AM Changeset in webkit [201862] by fred.wang@free.fr
  • 4 edits in trunk/Source/WebCore

Introduce MathOperator::Type
https://bugs.webkit.org/show_bug.cgi?id=156950

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-09
Reviewed by Sergio Villar Senin.

No new tests, behavior is not change.

An enum Type is introduced in MathOperator in order to indicate
which kind of stretching is requested. In follow-up work, this will
allow to just call setOperator and stretchTo without having to
explicitly call calculateDisplayStyleLargeOperator or calculateStretchyData.

  • rendering/mathml/MathOperator.cpp:

(WebCore::MathOperator::setOperator): Use Type instead of a boolean.
(WebCore::MathOperator::setGlyphAssembly): Add an assert to ensure that the function is correctly used.
(WebCore::MathOperator::calculateDisplayStyleLargeOperator): Ditto, this makes the assert more accurate.
(WebCore::MathOperator::calculateStretchyData): Ditto and replace m_isVertical with a local isVertical variable.
(WebCore::MathOperator::fillWithVerticalExtensionGlyph): Ditto.
(WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.
(WebCore::MathOperator::paintVerticalGlyphAssembly): Ditto.
(WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.

  • rendering/mathml/MathOperator.h: Add the Type enum.

(WebCore::MathOperator::stretchSize): Use Type instead of a boolean and add an
assert to ensure that the function is correctly used.

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Call setOperator with the correct value.
(WebCore::RenderMathMLOperator::updateStyle): Ditto.

5:59 AM Changeset in webkit [201861] by commit-queue@webkit.org
  • 28 edits
    11 deletes in trunk

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

breaks build without ENABLE_WEB_ANIMATION (Requested by
mcatanzaro on #webkit).

Reverted changeset:

"[web-animations] Add Animatable, AnimationEffect,
KeyframeEffect and Animation interface"
https://bugs.webkit.org/show_bug.cgi?id=156096
http://trac.webkit.org/changeset/201810

5:09 AM Changeset in webkit [201860] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[Threaded Compositor] Many layout tests crash when threaded compositor is enabled
https://bugs.webkit.org/show_bug.cgi?id=158560

Reviewed by Žan Doberšek.

This is because CoordinatedGraphicsLayer::notifyFlushRequired() assumes it has a valid compositor when it's
called. But the compositor is only present when GraphicsLayer::create() is called with a
GraphicsLayerFactory. When running the layout tests, layers are created without a factory because DrawingAreaImpl
is not entering AC mode as expected and the layer tree host is not created, making
DrawingAreaImpl::graphicsLayerFactory() always return nullptr. This happens because DrawingAreaImpl is checking
acceleratedDrawingEnabled setting to decide whether to always use compositing mode or not, and WTR sets that
setting to false (changing its default value). The thing is that acceleratedDrawingEnabled setting doesn't have
any effect in non-Mac ports, what we really want to check there is whether acceleratedCompositingEnabled is true
or false.

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::updatePreferences):

5:07 AM Changeset in webkit [201859] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

[Threaded Compositor] Remove ThreadedCompositor::setNeedsDisplay()
https://bugs.webkit.org/show_bug.cgi?id=158523

Reviewed by Michael Catanzaro.

ThreadedCompositor::setNeedsDisplay() is always called from the main thread and schedules a task to the
compositing thread to schedule an immediate update. But RunLoop::Timer is thread-safe so we don't really need to
schedule a task to the update the timer in the compositing thread, we can do that directly in the main
thread. And that's exactly what scheduleDisplayImmediately() does, so we can use it instead of setNeedsDisplay().

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::setNeedsDisplay(): Deleted.
(WebKit::ThreadedCompositor::updateSceneState):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2:09 AM Changeset in webkit [201858] by rniwa@webkit.org
  • 10 edits in trunk

slotchange event should be fired at the end of microtask
https://bugs.webkit.org/show_bug.cgi?id=157374
<rdar://problem/26154024>

Reviewed by Antti Koivisto.

Source/WebCore:

Dispatch slotchange event at the end of every microtask after delivering records to mutation observers
as specified in: https://dom.spec.whatwg.org/#notify-mutation-observers

Test: fast/shadow-dom/slotchange-event.html

  • dom/Document.cpp:

(WebCore::Document::enqueueSlotchangeEvent): Deleted.

  • dom/Document.h:
  • dom/MutationObserver.cpp:

(WebCore::signalSlotList): Added.
(WebCore::MutationObserverMicrotask::run): mutationObserverCompoundMicrotaskQueuedFlag is now unset in
notifyMutationObservers to better match the concept to "notify mutation observers".
(WebCore::MutationObserver::enqueueSlotChangeEvent): Added.
(WebCore::MutationObserver::notifyMutationObservers): Renamed from deliverAllMutations. Added the code
to dispatch slotchange events as spec'ed, and also added comments for each step.

  • dom/MutationObserver.h:
  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Use MutationObserver::enqueueSlotChangeEvent. Don't
create an event here since that is only needed when dispatching the event, and to keep track of whether
we've already scheduled an event or not. Use a boolean flag instead for the latter.
(WebCore::HTMLSlotElement::dispatchSlotChangeEvent): Added. Creates and dispatches an event.
(WebCore::HTMLSlotElement::dispatchEvent): Deleted.

  • html/HTMLSlotElement.h:

(WebCore::HTMLSlotElement::didRemoveFromSignalSlotList): Added.

LayoutTests:

Added a test case to ensure slotchange event is dispatched at the end of a microtask.

  • fast/shadow-dom/slotchange-event-expected.txt:
  • fast/shadow-dom/slotchange-event.html:
2:07 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
1:41 AM Changeset in webkit [201857] by Antti Koivisto
  • 2 edits in trunk/Source/WebKit2

Increase disk cache capacity when there is lots of free space
https://bugs.webkit.org/show_bug.cgi?id=158526

Reviewed by Chris Dumez.

Our maximum disk cache capacity has been 175MB for a very long time. Meanwhile the average resource size has grown
massively. 175MB is now enough for cacheable resources of a few dozen sites at most. Using bigger caches when there is
room for it can reduce network traffic, reduce disk writes, save battery and speed up page loading.

This patch changes cache size for PrimaryWebBrowser cache model

=16GB free: 175MB -> 500MB

8-16GB free: 150MB -> 250MB

and modestly for DocumentBrowser

=16GB free: 50MB -> 75MB

Note that if system (on Cocoa platforms) really needs disk space it will wipe out caches so this doesn't reduce
available disk space in scenarios like software installation.

  • Shared/CacheModel.cpp:

(WebKit::calculateCacheSizes):

Jun 8, 2016:

11:55 PM Changeset in webkit [201856] by youenn.fablet@crf.canon.fr
  • 16 edits in trunk/Source

Introduce ResourceErrorBase::type
https://bugs.webkit.org/show_bug.cgi?id=158299

Reviewed by Alex Christensen.

Source/WebCore:

Introducing an enum type for ResourceErrorBase.
In most cases, the type is set at construction time.
By default, constructor with no parameters will set type to Null.
Constructor with parameters will set type to General.

Removed boolean state error fields.

Introduced a type setter. It should only be used to make the type
more precise (when type is Null or General).

Updating related calling code.

No change of behavior.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoadingForPolicyChange):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::cancel):

  • loader/EmptyClients.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::cancelledError):
(WebCore::FrameLoader::blockedError):

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):

  • platform/network/ResourceErrorBase.cpp:

(WebCore::ResourceErrorBase::isolatedCopy):
(WebCore::ResourceErrorBase::setType):
(WebCore::ResourceErrorBase::compare):

  • platform/network/ResourceErrorBase.h:

(WebCore::ResourceErrorBase::isNull):
(WebCore::ResourceErrorBase::isCancellation):
(WebCore::ResourceErrorBase::isTimeout):
(WebCore::ResourceErrorBase::type):
(WebCore::ResourceErrorBase::ResourceErrorBase):
(WebCore::ResourceErrorBase::domain):

  • platform/network/cf/ResourceError.h:

(WebCore::ResourceError::ResourceError):

  • platform/network/cf/ResourceErrorCF.cpp:

(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::cfError):

  • platform/network/curl/ResourceError.h:

(WebCore::ResourceError::ResourceError):

  • platform/network/mac/ResourceErrorMac.mm:

(WebCore::m_platformError):
(WebCore::ResourceError::nsError):
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::platformLazyInit):

  • platform/network/soup/ResourceError.h:

(WebCore::ResourceError::ResourceError):

  • platform/network/soup/ResourceErrorSoup.cpp:

(WebCore::ResourceError::timeoutError):

Source/WebKit2:

  • Shared/soup/WebCoreArgumentCodersSoup.cpp:

(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):

11:20 PM Changeset in webkit [201855] by commit-queue@webkit.org
  • 19 edits in trunk

REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
https://bugs.webkit.org/show_bug.cgi?id=158548
<rdar://problem/26708513>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-08
Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

  • UserInterface/Controllers/RuntimeManager.js:

(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Switch the many parameters to an options dictionary.
Include a new option for sourceURL appender, so that
Console evaluations can have its own append.

  • UserInterface/Controllers/JavaScriptLogViewController.js:

(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
Use the appendWebInspectorConsoleEvaluationSourceURL appender.

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
Use the new options dictionary.

LayoutTests:

  • inspector/console/addInspectedNode.html:
  • inspector/console/command-line-api-copy.html:
  • inspector/console/command-line-api.html:
  • inspector/console/console-api.html:
  • inspector/console/console-table.html:
  • inspector/console/messagesCleared.html:
  • inspector/controller/runtime-controller.html:
  • inspector/debugger/command-line-api-exception-nested-catch.html:
  • inspector/debugger/command-line-api-exception.html:
  • inspector/model/remote-object-get-properties.html:
  • inspector/model/remote-object-weak-collection.html:
  • inspector/model/remote-object.html:
  • inspector/timeline/exception-in-injected-script-while-recording.html:

Update evaluateInInspectedWindow callsites to use options dictionary.

11:17 PM Changeset in webkit [201854] by fred.wang@free.fr
  • 5 edits
    2 adds in trunk/Source/WebCore

Move selection and drawing of stretchy operators into a separate MathOperator class
https://bugs.webkit.org/show_bug.cgi?id=156921

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-08
Reviewed by Martin Robinson.

No new tests, behavior is not changed.

  • CMakeLists.txt: Add the MathOperator files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • rendering/mathml/MathOperator.cpp: Added.

(WebCore::boundsForGlyph): Moved from RenderMathMLOperator.
(WebCore::heightForGlyph): Moved from RenderMathMLOperator.
(WebCore::advanceWidthForGlyph): Moved from RenderMathMLOperator.
(WebCore::MathOperator::MathOperator):
(WebCore::MathOperator::setOperator):
(WebCore::MathOperator::getBaseGlyph): Moved from RenderMathMLOperator.
(WebCore::MathOperator::setSizeVariant): Moved from RenderMathMLOperator.
(WebCore::MathOperator::setGlyphAssembly): Moved from RenderMathMLOperator.
(WebCore::MathOperator::calculateDisplayStyleLargeOperator): Moved from RenderMathMLOperator with additional style parameter.
(WebCore::MathOperator::calculateGlyphAssemblyFallBack): Ditto.
(WebCore::MathOperator::calculateStretchyData): Ditto.
(WebCore::MathOperator::paintGlyph): Ditto.
(WebCore::MathOperator::fillWithVerticalExtensionGlyph): Ditto.
(WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.
(WebCore::MathOperator::paintVerticalGlyphAssembly): Ditto.
(WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.

  • rendering/mathml/MathOperator.h: Added.

(WebCore::MathOperator::italicCorrection):
(WebCore::MathOperator::isStretched):
(WebCore::MathOperator::unstretch):
(WebCore::MathOperator::GlyphAssemblyData::GlyphAssemblyData): Moved from RenderMathMLOperator.
(WebCore::MathOperator::stretchSize):

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Updated to use MathOperator members.
For now we call setOperator to transmit information to m_mathOperator.
(WebCore::RenderMathMLOperator::updateStyle): Updated to use MathOperator members.
For now we set some m_mathOperator members to transmit it some information.
(WebCore::RenderMathMLOperator::firstLineBaseline): Updated to use MathOperator members.
(WebCore::RenderMathMLOperator::computeLogicalHeight): Ditto.
(WebCore::RenderMathMLOperator::paint): Ditto.
For now we set some m_mathOperator members to transmit it some information.
(WebCore::RenderMathMLOperator::paintChildren): Updated to use MathOperator members.
(WebCore::RenderMathMLOperator::trailingSpaceError): Ditto.
(WebCore::RenderMathMLOperator::getBaseGlyph): Deleted.
(WebCore::RenderMathMLOperator::setSizeVariant): Deleted.
(WebCore::RenderMathMLOperator::setGlyphAssembly): Deleted.
(WebCore::RenderMathMLOperator::calculateGlyphAssemblyFallBack): Deleted.
(WebCore::RenderMathMLOperator::calculateDisplayStyleLargeOperator): Deleted.
(WebCore::RenderMathMLOperator::calculateStretchyData): Deleted.
(WebCore::RenderMathMLOperator::paintGlyph): Deleted.
(WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph): Deleted.
(WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph): Deleted.
(WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): Deleted.
(WebCore::RenderMathMLOperator::paintHorizontalGlyphAssembly): Deleted.

  • rendering/mathml/RenderMathMLOperator.h:

(WebCore::RenderMathMLOperator::italicCorrection): Updated to use MathOperator members.
(WebCore::RenderMathMLOperator::GlyphAssemblyData::GlyphAssemblyData): Deleted.

10:43 PM Changeset in webkit [201853] by barraclough@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

JSObject::reifyAllStaticProperties cleanup
https://bugs.webkit.org/show_bug.cgi?id=158543

Reviewed by Mark Lam.

  • JSObject & Structure contain fields labeled 'staticFunctionsReified', however reification now affects all properties, not just functions. Rename to 'staticPropertiesReified'.
  • reifyAllStaticProperties relies on a 'hasStaticProperties' method on ClassInfo that walks the ClassInfo inheritance chain looking for static property tables. We can now more efficiently get this information from TypeInfo.
  • reifyAllStaticProperties triggers a 'toUncacheableDictionaryTransition'; this is overzealous, cacheable dictionary is sufficient - this is what we do in the case of DOM prototype property reification (see 'reifyStaticProperties' in Lookup.h). (Changing this with an eye on switching
DOM prototype property reification to use JSObject
reifyAllStaticProperties, rather than having its own special purpose code path.)
  • runtime/ClassInfo.h:

(JSC::ClassInfo::hasStaticProperties): Deleted.

  • deprecated by TypeInfo::hasStaticPropertyTable.
  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::getOwnNonIndexPropertyNames):

  • staticFunctionsReified -> staticPropertiesReified

(JSC::JSObject::reifyAllStaticProperties):

  • hasStaticProperties -> TypeInfo::hasStaticPropertyTable
  • toUncacheableDictionaryTransition -> toCacheableDictionaryTransition
  • staticFunctionsReified -> staticPropertiesReified
  • runtime/JSObject.h:

(JSC::JSObject::staticPropertiesReified):
(JSC::JSObject::staticFunctionsReified): Deleted.

  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • runtime/Lookup.h:

(JSC::getStaticPropertySlotFromTable):
(JSC::replaceStaticPropertySlot):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):

  • runtime/Structure.h:
    • staticFunctionsReified -> staticPropertiesReified
10:18 PM Changeset in webkit [201852] by Chris Dumez
  • 4 edits
    2 adds in trunk

DedicatedWorkerGlobalScope prototype chain is incorrect
https://bugs.webkit.org/show_bug.cgi?id=158544

Reviewed by Brady Eidson.

Source/WebCore:

There were several issues with the prototype chain of DedicatedWorkerGlobalScope:

  1. Object.getPrototypeOf(DedicatedWorkerGlobalScope.prototype) was not WorkerGlobalScope.prototype.
  2. WorkerGlobalScope.prototype was a DedicatedWorkerGlobalScopePrototype object and was equal to DedicatedWorkerGlobalScope.prototype.
  3. Object.getPrototypeOf(WorkerGlobalScope.prototype) was not EventTarget.prototype.

Those issues were identified by the following W3C web-platform-test:
http://w3c-test.org/workers/interfaces.worker

This patch fixes the issue so that the prototype chain is now as per the
specification.

Test: fast/workers/DedicatedWorkerGlobalScope-prototype-chain.html

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • Stop creating the WorkerGlobalScopePrototype and let JSWorkerGlobalScope create it.
  • Set DedicatedWorkerGlobalScopePrototype's prototype to JSWorkerGlobalScope's prototype after creating the JSDedicatedWorkerGlobalScope object.
  • bindings/scripts/CodeGeneratorJS.pm:

(ShouldUseGlobalObjectPrototype):
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorHelperMethods):

  • Do not use globalObject.getPrototypeDirect() as 'prototype' property for WorkerGlobalScope. The globalObject is a DedicatedWorkerGlobalScope, not a WorkerGlobalScope.
  • Generate the code to create / get a prototype object for WorkerGlobalScope.

LayoutTests:

Add test coverage for the DedicatedWorkerGlobalScope prototype chain.

  • fast/workers/DedicatedWorkerGlobalScope-prototype-chain-expected.txt: Added.
  • fast/workers/DedicatedWorkerGlobalScope-prototype-chain.html: Added.
10:09 PM Changeset in webkit [201851] by adam.bergkvist@ericsson.com
  • 17 edits
    4 adds in trunk

WebRTC: Imlement MediaEndpointPeerConnection::setRemoteDescription()
https://bugs.webkit.org/show_bug.cgi?id=158467

Reviewed by Eric Carlson.

Source/WebCore:

Implement MediaEndpointPeerConnection::setRemoteDescription() which verifies a
remote offer or answer, configures the WebRTC backend and dispatches the 'track' events
that represent the incoming media [1].

This change also updates the RTCTrackEvent [2] with a streams and a transceiver attribute.

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-setremotedescription
[2] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#rtctrackevent

Tests: fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html

fast/mediastream/RTCTrackEvent-constructor.html

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::createSourceMap):
(WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
(WebCore::MediaEndpointPeerConnection::setRemoteDescription):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
Implemented.
(WebCore::MediaEndpointPeerConnection::remoteDescription):
(WebCore::MediaEndpointPeerConnection::currentRemoteDescription):
(WebCore::MediaEndpointPeerConnection::pendingRemoteDescription):
(WebCore::MediaEndpointPeerConnection::remoteDescriptionTypeValidForState):
(WebCore::MediaEndpointPeerConnection::internalRemoteDescription):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTransceiver):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpReceiver.h:

(WebCore::RTCRtpReceiver::isDispatched):
(WebCore::RTCRtpReceiver::setDispatched):

  • Modules/mediastream/RTCTrackEvent.cpp:

(WebCore::RTCTrackEvent::create):
(WebCore::RTCTrackEvent::RTCTrackEvent):

  • Modules/mediastream/RTCTrackEvent.h:

(WebCore::RTCTrackEvent::streams):
(WebCore::RTCTrackEvent::transceiver):

  • Modules/mediastream/RTCTrackEvent.idl:

Add streams and transceiver attributes.

  • bindings/js/JSDictionary.cpp:

(WebCore::JSDictionary::convertValue):

  • bindings/js/JSDictionary.h:
  • platform/mediastream/MediaEndpoint.h:
  • platform/mock/MockMediaEndpoint.cpp:

(WebCore::MockMediaEndpoint::filterPayloads):
(WebCore::MockMediaEndpoint::updateSendConfiguration):

  • platform/mock/MockMediaEndpoint.h:

LayoutTests:

Add tests for RTCPeerConnection.setRemoteDescription() and the RTCTrackEvent constructor.

  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html: Added.

Verify the description set, the expected RTCPeerConnection state changes and that the
'track' event is fired before the setRemoteDescription() promise fulfills.

  • fast/mediastream/RTCTrackEvent-constructor-expected.txt: Added.
  • fast/mediastream/RTCTrackEvent-constructor.html: Added.

This test has some expected failures since the bindings generator don't support 'required'
dictionary members for event init dictionaries.

  • platform/mac/TestExpectations:

Skip tests for mac that require building with WEB_RTC enabled.

10:07 PM Changeset in webkit [201850] by Brent Fulgham
  • 3 edits
    10 adds in trunk

Perform IDNA encoding on parameters for setHostAndPort and setHost
https://bugs.webkit.org/show_bug.cgi?id=158371
<rdar://problem/16869342>

Patch by John Wilander <wilander@apple.com> on 2016-06-08
Reviewed by Brent Fulgham.

Source/WebCore:

Tests: fast/dom/set-document-location-host-to-unaccepted-values.html

fast/dom/set-document-location-hostname-to-unaccepted-values.html
http/tests/dom/set-document-location-host-to-accepted-values.html
http/tests/dom/set-document-location-hostname-to-accepted-values.html

  • platform/URL.cpp:

(WebCore::containsOnlyASCII):

Moved up to enable usage in URL::setHost and URL::setHostAndPort.

(WebCore::appendEncodedHostname):

Moved up to enable usage in URL::setHost and URL::setHostAndPort.

(WebCore::URL::setHost):

Now disallows the colon character, does IDNA encoding, and uses StringBuilder.

(WebCore::URL::setHostAndPort):

Now disallows multiple colons, disallows non-numeric ports, disallows the empty
string, does IDNA encoding, and uses StringBuilder.

LayoutTests:

  • fast/dom/resources/set-document-location-iframe.html: Added.
  • fast/dom/set-document-location-host-to-unaccepted-values-expected.txt: Added.
  • fast/dom/set-document-location-host-to-unaccepted-values.html: Added.
  • fast/dom/set-document-location-hostname-to-unaccepted-values-expected.txt: Added.
  • fast/dom/set-document-location-hostname-to-unaccepted-values.html: Added.
  • http/tests/dom/resources/set-document-location-iframe.html: Added.
  • http/tests/dom/set-document-location-host-to-accepted-values-expected.txt: Added.
  • http/tests/dom/set-document-location-host-to-accepted-values.html: Added.
  • http/tests/dom/set-document-location-hostname-to-accepted-values-expected.txt: Added.
  • http/tests/dom/set-document-location-hostname-to-accepted-values.html: Added.
7:41 PM Changeset in webkit [201849] by Hunseop Jeong
  • 2 edits in trunk/Tools

Try to fix the EFL build.

Unreviewed.

  • TestWebKitAPI/CMakeLists.txt:
7:05 PM Changeset in webkit [201848] by benjamin@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

Change thresholdForOptimizeSoon to match thresholdForOptimizeAfterWarmUp

Unreviewed.

This adds back the assertion removed in r201845.
Making those threshold equal is completely perf neutral
(on Haswell rMBP with 20 runs).

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-08

  • runtime/Options.cpp:

(JSC::Options::initialize):

  • runtime/Options.h:
6:00 PM Changeset in webkit [201847] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix WinCairo build

  • DumpRenderTree/cairo/PixelDumpSupportCairo.h:
5:49 PM Changeset in webkit [201846] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build.

  • platform/network/curl/MultipartHandle.cpp:

(WebCore::MultipartHandle::didReceiveResponse):

5:41 PM Changeset in webkit [201845] by benjamin@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Tempory fix for the debug bots

Unreviewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-08

  • runtime/Options.cpp:

(JSC::Options::initialize):
Weaken an assertion while I test values for thresholdForOptimizeSoon.

4:19 PM Changeset in webkit [201844] by achristensen@apple.com
  • 4 edits in trunk

Source/WebCore:
Fix WinCairo build.

  • platform/network/curl/MultipartHandle.cpp:

(WebCore::MultipartHandle::didReceiveResponse):

Tools:
Fix WinCairo build

  • DumpRenderTree/cairo/PixelDumpSupportCairo.h:

(BitmapContext::createByAdoptingBitmapAndContext):
(BitmapContext::~BitmapContext):

4:17 PM Changeset in webkit [201843] by Brian Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: an error is encountered when trying to delete nodes that have children
https://bugs.webkit.org/show_bug.cgi?id=158541
<rdar://problem/26705901>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
Offset into the array variable instead of a variable holding its length.

4:11 PM Changeset in webkit [201842] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html for Mac after r201810

Unreviewed test gardening.

  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
4:09 PM Changeset in webkit [201841] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

With audio user gesture restriction in place, video.src = 'file', video.play() succeeds where it should fail.
https://bugs.webkit.org/show_bug.cgi?id=158546

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-playback-restriction-play-before-load.html

Don't check that the media element isPlaying(); that will only return true if playback has begun.
Instead, check !paused(), as that will be true as soon as the play() method returns.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::updateShouldPlay):

  • rendering/RenderLayer.h:

LayoutTests:

  • media/video-playback-restriction-play-before-load-expected.txt: Added.
  • media/video-playback-restriction-play-before-load.html: Added.
4:04 PM Changeset in webkit [201840] by Brian Burg
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: DOMTreeOutline selection areas should be created and updated lazily
https://bugs.webkit.org/show_bug.cgi?id=158513
<rdar://problem/26689646>

Reviewed by Timothy Hatcher.

Selection areas for DOMTreeElements are used for several things: drag markers,
element hover styles, element selection styles, and showing forced pseudo states
for an element. Fortunately it's easy to tell when any of these things is necessary.

Change DOMTreeOutline and DOMTreeElement so they don't create selection areas
unless they are needed for one of these tasks. This significantly reduces
forced layouts that are required to update the selection area height in case the
element has new attributes that cause the tag to become more or less wrapped.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype.set hovered):
Modernize this method a bit.

(WebInspector.DOMTreeElement.prototype.updateSelectionArea):
If a selection area is not necessary, don't create one.
If one exists and it's not needed, then remove it.

(WebInspector.DOMTreeElement.prototype.onattach):
Remove redundant calls to updateSelection(). This is already called in
updateTitle().

(WebInspector.DOMTreeElement.prototype.onselect):
Ask the DOMTreeOutline to update the selection rather than forcing the
element to do it. This is consistent with other updates to user selection.

(WebInspector.DOMTreeElement.prototype._insertInLastAttributePosition):
(WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
(WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
Use renamed method.

(WebInspector.DOMTreeElement.prototype.updateTitle):
Add a comment to explain why the selection area is nulled out here.

(WebInspector.DOMTreeElement.prototype.get pseudoClassesEnabled):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Update the selection area in case one does not exist for this tree element.
The indicator for forced pseudo classes is a pseudo element of the selection area.

(WebInspector.DOMTreeElement.prototype.updateSelection): Renamed.
(WebInspector.DOMTreeElement.prototype.onexpand):
(WebInspector.DOMTreeElement.prototype.oncollapse):
Remove redundant calls to updateSelection(). This is already called in
updateTitle().

  • UserInterface/Views/DOMTreeOutline.css:

(.tree-outline.dom):
(.tree-outline.dom li.hovered:not(.selected) .selection-area):
(.tree-outline.dom li .selection-area):
(.tree-outline.dom li.selected .selection-area):
(.tree-outline.dom li.elements-drag-over .selection-area):
(.tree-outline.dom:focus li.selected .selection-area):
(.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
(.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before):
(.tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
(.tree-outline.dom li .selection): Deleted.
(.tree-outline.dom li.selected .selection): Deleted.
(.tree-outline.dom li.elements-drag-over .selection): Deleted.
(.tree-outline.dom:focus li.selected .selection): Deleted.
(.tree-outline.dom li.pseudo-class-enabled > .selection::before): Deleted.
(.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before): Deleted.
Rename the selector to be less ambiguous.

  • UserInterface/Views/DOMTreeOutline.js:

(WebInspector.DOMTreeOutline.prototype.updateSelection): Simplify. The call
to update the selection area will bail out if there is nothing to be done.

(WebInspector.DOMTreeOutline.prototype.findTreeElement):
(WebInspector.DOMTreeOutline.prototype._onmousemove):
(WebInspector.DOMTreeOutline.prototype._onmouseout):
Clean up and use let and arrow functions.

(WebInspector.DOMTreeOutline.prototype._ondragover):
(WebInspector.DOMTreeOutline.prototype._clearDragOverTreeElementMarker):
Clear the dragging element before updating the selection area since it looks at
the dragging element to determine whether anything needs to be done.

  • UserInterface/Views/FormattedValue.css:

(.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection-area):
(.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
Rename the selector to be less ambiguous.

4:02 PM Changeset in webkit [201839] by Brian Burg
  • 2 edits in trunk/Source/WebInspectorUI

Uncaught Exception in TimelineDataGrid._updatePopoverForSelectedNode()
https://bugs.webkit.org/show_bug.cgi?id=158502
<rdar://problem/26687038>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TimelineDataGrid.js:

(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
It appears that this expression was moved around since it accesses
targetFrame before it's initialized. Check rect.size.height directly.

3:35 PM Changeset in webkit [201838] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

_web_didAddMediaControlsManager should take a controlsManager as a parameter
https://bugs.webkit.org/show_bug.cgi?id=158545

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebViewImpl.h:
3:27 PM Changeset in webkit [201837] by achristensen@apple.com
  • 10 edits in trunk/Source/WebCore

Modernize WebSocket code
https://bugs.webkit.org/show_bug.cgi?id=158539

Reviewed by Brady Eidson.

No new tests, no change in behavior.

  • Modules/websockets/ThreadableWebSocketChannel.cpp:

(WebCore::ThreadableWebSocketChannel::create):

  • Modules/websockets/ThreadableWebSocketChannel.h:

(WebCore::ThreadableWebSocketChannel::ThreadableWebSocketChannel):

  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:

(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::create):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):

  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::WebSocketChannel):

  • Modules/websockets/WebSocketChannel.h:

(WebCore::WebSocketChannel::create):

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
(WebCore::WorkerThreadableWebSocketChannel::subprotocol):
(WebCore::WorkerThreadableWebSocketChannel::extensions):
(WebCore::WorkerThreadableWebSocketChannel::resume):
(WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::~Bridge):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::setMethodNotCompleted):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):

  • Modules/websockets/WorkerThreadableWebSocketChannel.h:

(WebCore::WorkerThreadableWebSocketChannel::create):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::create):

3:22 PM Changeset in webkit [201836] by commit-queue@webkit.org
  • 5 edits in trunk

[JSC] Change some parameters based on a random search
https://bugs.webkit.org/show_bug.cgi?id=158514

Source/JavaScriptCore:

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-08
Reviewed by Filip Pizlo.

Over the weekend, I left an iMac running the JSC benchmarks
while changing a bunch of parameters.

The parameters were changed randomly, with a random deviation
from the original value.
To converge toward good values, the range was subject
to exponential annealing over time.

The values in this patch is the best outcome my iMac could
find over the weekend. It is about 1% better on the Haswell
machines I tested.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::optimizationThresholdScalingFactor):

  • runtime/Options.h:

Tools:

Patch by Benjamin Poulain <benjamin@webkit.org> on 2016-06-08
Reviewed by Filip Pizlo.

  • Scripts/run-jsc-stress-tests:
3:14 PM Changeset in webkit [201835] by Chris Dumez
  • 6 edits
    2 adds in trunk

First parameter to MessagePort / DedicatedWorkerGlobalScope.postMessage() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=158540

Reviewed by Geoffrey Garen.

Source/WebCore:

First parameter to MessagePort / DedicatedWorkerGlobalScope.postMessage() should be mandatory:

Previously, WebKit send a bogus MessageEvent whose data attribute is undefined. This would
cause a testharness error when running the following W3C test:

Firefox and Chrome already correctly throw in this case. Our Window.postMessage() API is also
already throwing in this case.

Test: fast/workers/postMessage-missing-parameter.html

  • bindings/js/JSMessagePortCustom.h:

(WebCore::handlePostMessage):

LayoutTests:

Add test coverage.

  • fast/files/workers/inline-worker-via-blob-url.html:
  • fast/workers/postMessage-missing-parameter-expected.txt: Added.
  • fast/workers/postMessage-missing-parameter.html: Added.
  • fast/workers/worker-messageport-expected.txt:
  • fast/workers/worker-messageport.html:
2:49 PM Changeset in webkit [201834] by barraclough@apple.com
  • 6 edits in trunk/Source

Remove removeDirect
https://bugs.webkit.org/show_bug.cgi?id=158516

Reviewed by Ryosuke Niwa.

removeDirect is typically used as a subroutine of deleteProperty, but is also available to
call directly. Having this functionality factored out to a separate routine is a bad idea
on a couple of fronts:

  • for the main use within deleteProperty there is redundancy (presence of the property was being checked twice) and inconsistency (the two functions returned different results in the case of a nonexistent property; the result from removeDirect was never observed).
  • all uses of removeDirect are in practical terms incorrect. removeDirect had the advantage of ignoring the configurable (DontDelete) attributes, but this is achievable using the DeletePropertyMode setting - and the disadvantage of failing delete static table properties. Last uses were one that was removed in bug #158295 (where failure to delete static properties was a problem), and as addressed in this patch removeDirect is being used to implement runtime enabled features. This only works because we currently force reification of all properties on the DOM prototype objects, so in effect there are no static properties. In order to make the code robust such that runtime enabled features would still work even if we were not reifying static properties (a change we may want to make) we should be calling deleteProperty in this case too.

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):

  • incorporated removeDirect functionality, added comments & ASSERT.

(JSC::JSObject::removeDirect): Deleted.

  • removed.
  • runtime/JSObject.h:
    • removed removeDirect.

Source/WebCore:

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • changed to call deleteProperty instead of removeDirect.
  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjPrototype::finishCreation):

  • updated bindings test results.
2:17 PM Changeset in webkit [201833] by Brian Burg
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: reduce redundant attribute modification updates in DOMTreeUpdater and DOMTreeElement
https://bugs.webkit.org/show_bug.cgi?id=158504
<rdar://problem/25561452>

Reviewed by Timothy Hatcher.

When the frontend gets lots of DOM.attributeModified events, it forwards these on to
DOMTreeUpdater, which pushes a record for every single modification. It then updates
the DOM elements with the attibute changes on an animation frame. However, since it
doesn't do any deduplication of the modification records, a lot of time is wasted
on updating DOMTreeElements with intermediate (non-final) attribute values.

This patch rewrites DOMTreeUpdater to precisely track which nodes and attributes
of each node need to be updated on the next animation frame. This is done using
Sets and Maps that only hold onto the most recent attribute values rather than
pushing a record object for every single mutation.

This improves the performance of the Elements tab on an SVG particle simulator
dramatically so that the Inspector will not immediately hang. It still only achieves
a few updates per second in this case, so there is still optimization to be done on
the frontend and throttling to be done on the backend.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype.attributeDidChange):
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
(WebInspector.DOMTreeElement.prototype._markNodeChanged):
(WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
(WebInspector.DOMTreeElement.prototype._fireDidChange):
(WebInspector.DOMTreeElement.prototype.nodeStateChanged): Deleted.
Simplify the list of modified attributes a little bit. This still uses a worklist
approach, so it's possible that duplicate updates for the same attribute could accumulate
if DOMTreeUpdater pushes updates faster than DOMTreeElement can render them.

  • UserInterface/Views/DOMTreeUpdater.js:

(WebInspector.DOMTreeUpdater):
(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
(WebInspector.DOMTreeUpdater.prototype._characterDataModified):
(WebInspector.DOMTreeUpdater.prototype._nodeAttributeModified):
(WebInspector.DOMTreeUpdater.prototype._nodeInserted):
(WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
(WebInspector.DOMTreeUpdater.prototype._childNodeCountUpdated):
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
(WebInspector.DOMTreeUpdater.prototype._reset):
Rewrite this class to separately track insertions, deletions, and modifications. Use
Sets and Maps so redundant entries are not kept around. Split the main work loop
and use fewer enum-like properties to control how each DOM element change is handled.

Attempt to update all inserted children before modifying their attributes. This
wasn't done previously, but enough duplicate attribute modifications occurred that
usually some of them would be processed after being added to the tree. There is only
one chance to do this now.

2:15 PM Changeset in webkit [201832] by n_wang@apple.com
  • 10 edits
    2 adds in trunk

For keyboard users, activating a fragment URL should transfer focus and caret to the destination
https://bugs.webkit.org/show_bug.cgi?id=116046

Reviewed by Ryosuke Niwa.

Source/WebCore:

Added a sequential focus navigation starting node to document. When TAB or SHIFT-TAB is pressed
and there is no focused element, we start searching for next focus candidates at the sequential
focus navigation node.
Spec: https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation-starting-point

Test: fast/events/sequential-focus-navigation-starting-point.html

  • dom/Document.cpp:

(WebCore::Document::removedLastRef):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::styleResolverChanged):
(WebCore::isNodeInSubtree):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::hoveredElementDidDetach):
(WebCore::Document::setFocusedElement):
(WebCore::shouldResetFocusNavigationStartingNode):
(WebCore::Document::setFocusNavigationStartingNode):
(WebCore::Document::focusNavigationStartingNode):
(WebCore::Document::setCSSTarget):
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
(WebCore::fallbackFocusNavigationStartingNodeAfterRemoval):
(WebCore::Document::removeFocusNavigationNodeOfSubtree):
(WebCore::Document::textInserted):

  • dom/Document.h:

(WebCore::Document::userActionElements):

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):

  • page/FocusController.cpp:

(WebCore::FocusController::advanceFocusInDocumentOrder):

  • page/FrameView.cpp:

(WebCore::FrameView::scrollToAnchor):

LayoutTests:

Added a layout test to check that mouse pressing, fragment navigation, focusing an element and removing
the focused element will give us the expected focus navigation starting point.

Also updated the fragment activation test because now that navigating to an unfocusable fragment will
unfocus the current focused element.

  • fast/dom/fragment-activation-focuses-target-expected.txt:
  • fast/dom/fragment-activation-focuses-target.html:
  • fast/events/sequential-focus-navigation-starting-point-expected.txt: Added.
  • fast/events/sequential-focus-navigation-starting-point.html: Added.
  • platform/ios-simulator/TestExpectations:
2:07 PM Changeset in webkit [201831] by eric.carlson@apple.com
  • 4 edits
    2 adds in trunk/Source/WebCore

HTMLMediaElement.prototype.canPlayType accounting for 250-750ms first loading theverge.com
https://bugs.webkit.org/show_bug.cgi?id=158335
<rdar://problem/26615416>

Reviewed by Brent Fulgham.

  • WebCore.xcodeproj/project.pbxproj: Add AVFoundationMIMETypeCache.
  • platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.h: Added.
  • platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm: Added.

(WebCore::AVFoundationMIMETypeCache::AVFoundationMIMETypeCache):
(WebCore::AVFoundationMIMETypeCache::loadTypes):
(WebCore::AVFoundationMIMETypeCache::types):
(WebCore::AVFoundationMIMETypeCache::singleton):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Start MIME type loading.
(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): Use AVFoundationMIMETypeCache.
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): Ditto.
(WebCore::avfMIMETypes): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Start MIME type loading.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Use AVFoundationMIMETypeCache.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Ditto.
(WebCore::mimeTypeCache): Deleted.

1:59 PM Changeset in webkit [201830] by mark.lam@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Simplify Interpreter::StackFrame.
https://bugs.webkit.org/show_bug.cgi?id=158498

Reviewed by Saam Barati.

Previously, Interpreter::StackFrame (which is used to capture info for
Error.stack) eagerly extracts info out of CodeBlock and duplicates the work that
CodeBlock does to compute line and column numbers (amongst other things).

This patch does away with the eager extraction and only stashes the CodeBlock
pointer in the Interpreter::StackFrame. Instead, Interpreter::StackFrame will
provide methods for computing the desired values on request later.

One difference in implementation: the old StackFrame offers a sourceURL and a
friendlySourceURL(). The only difference between the 2 is that for native
functions, sourceURL returns an empty string, and friendlySourceURL() returns
"[native code]". This is how it affects the clients of StackFrame:

  • In the old code, the Error object's addErrorInfoAndGetBytecodeOffset() and the inspector's createScriptCallStackFromException() would check if sourceURL is empty. If so, they will use this as an indicator to use alternate source info in the Error object e.g. url and line numbers from the parser that produced a SyntaxError.
  • In the new implementation, StackFrame only has a sourceURL() function that behaves like the old friendlySourceURL(). The client code which were relying on sourceURL being empty, will now explicitly check if the StackFrame is for native code using a new isNative() query in addition to the sourceURL being empty. This achieve functional parity with the old behavior.

Also fix Error.cpp's addErrorInfoAndGetBytecodeOffset() to take a bytecodeOffset
pointer instead of a reference. The bytecodeOffset arg is supposed to be
optional, but was implemented in a unclear way. This change clarifies it.

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::createScriptCallStackFromException):

  • interpreter/Interpreter.cpp:

(JSC::StackFrame::sourceID):
(JSC::StackFrame::sourceURL):
(JSC::StackFrame::functionName):
(JSC::eval):
(JSC::Interpreter::isOpcode):
(JSC::StackFrame::computeLineAndColumn):
(JSC::StackFrame::toString):
(JSC::GetStackTraceFunctor::operator()):
(JSC::StackFrame::friendlySourceURL): Deleted.
(JSC::StackFrame::friendlyFunctionName): Deleted.
(JSC::getStackFrameCodeType): Deleted.
(JSC::StackFrame::expressionInfo): Deleted.

  • interpreter/Interpreter.h:

(JSC::StackFrame::isNative):

  • runtime/Error.cpp:

(JSC::addErrorInfoAndGetBytecodeOffset):
(JSC::addErrorInfo):

  • runtime/Error.h:
  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):

1:56 PM Changeset in webkit [201829] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r158219): Web Inspector: Border under the default Timeline content view is too thick
https://bugs.webkit.org/show_bug.cgi?id=158533

Reviewed by Timothy Hatcher.

  • UserInterface/Views/OverviewTimelineView.css:

(.timeline-view.overview > .data-grid th): Deleted.

1:43 PM Changeset in webkit [201828] by rniwa@webkit.org
  • 1 edit
    2 adds in trunk/Websites/perf.webkit.org

sync-buildbot.js should update the list of tests and platforms associated with a triggerable
https://bugs.webkit.org/show_bug.cgi?id=158406

Reviewed by Chris Dumez.

Add /api/update-triggerable and a test for it, which were supposed to be added in r201718
but for which I forgot to run svn add.

  • public/api/update-triggerable.php: Added.

(main):

  • server-tests/api-update-triggerable.js: Added.
1:21 PM Changeset in webkit [201827] by timothy@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Command-W should not close Web Inspector tabs; it should close the window
https://bugs.webkit.org/show_bug.cgi?id=158538
rdar://problem/26699215

Reviewed by Brian Burg.

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser): Change shortcut to Command-Shift-W.

12:50 PM Changeset in webkit [201826] by Chris Dumez
  • 2 edits
    2 adds in trunk/LayoutTests/imported/w3c

Import new AddEventListenerOptions test from W3C web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=158535

Reviewed by Ryosuke Niwa.

Import new AddEventListenerOptions test from W3C web-platform-tests.

  • web-platform-tests/dom/events/AddEventListenerOptions-passive-expected.txt: Added.
  • web-platform-tests/dom/events/AddEventListenerOptions-passive.html: Added.
  • web-platform-tests/dom/events/EventListenerOptions-capture.html:
12:40 PM Changeset in webkit [201825] by keith_miller@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

We should be able to lookup symbols by identifier in builtins
https://bugs.webkit.org/show_bug.cgi?id=158530

Reviewed by Mark Lam.

This patch allows us to lookup the value of a symbol property on a
object by identifier in builtins. Before, it was only possible to
do so if we were directly emitting the bytecodes, such as in a
for-of loop looking for Symbol.iterator. As we tier up we convert
the builtin's get_by_val symbol lookups into get_by_id
lookups. However, there is still a significant performance
difference between get_by_id and get_by_val in the LLInt, where
this transformation does not take place.

In order to make this work we hijack BuiltinNames'
m_publicToPrivateMap so that it points the @<symbol>Symbol to the
appropriate vm symbol. This way when we lex the identifier it will
become the appropriate symbol's identifier. Currently, if the
symbol is used to name a property in an object literal we will not
keep a cache of the Symbol objects we have already seen. We could
add a map for symbols but since we can only load symbols by
identifier in builtins its likely not worth it. Additionally, even
in builtins it is extremely rare to use Symbols in object
literals.

  • builtins/ArrayConstructor.js:

(from):

  • builtins/ArrayPrototype.js:

(filter):
(map):

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinUtils.h:
  • builtins/GlobalObject.js:

(speciesConstructor):

  • builtins/StringPrototype.js:

(match):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(search):
(split):

  • builtins/TypedArrayConstructor.js:

(from):

  • builtins/TypedArrayPrototype.js:

(map):
(filter):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry): Deleted.

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitLoad):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):

12:20 PM Changeset in webkit [201824] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

12:19 PM Changeset in webkit [201823] by rniwa@webkit.org
  • 16 edits in trunk
REGRESSION (r201667): ASSERTION FAILED: !m_anchorNode
!editingIgnoresContent(*m_anchorNode)

https://bugs.webkit.org/show_bug.cgi?id=158373
Source/WebCore:

<rdar://problem/26690795>

Reviewed by Brent Fulgham.

The bug was caused by VisibleSelection::toNormalizedRange calling parentAnchoredEquivalent on an orphaned Position.
Fixed it by checking that condition and exiting early since we can't create a Range with a detached node anyway.

Also renamed isNonOrphanedCaretOrRange to isNoneOrOrphaned after negating the semantics for clarity.

Test: editing/selection/selection-in-iframe-removed-crash.html

  • editing/EditorCommand.cpp:

(WebCore::valueFormatBlock):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::doApply):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::doApply):

  • editing/RemoveFormatCommand.cpp:

(WebCore::RemoveFormatCommand::doApply):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply):

  • editing/SetSelectionCommand.cpp:

(WebCore::SetSelectionCommand::doApply):
(WebCore::SetSelectionCommand::doUnapply):

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::doApply):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::firstRange): Also added a check for isNoneOrOrphaned since this function can hit the same
assertion when the selection end points are orphaned.
(WebCore::VisibleSelection::toNormalizedRange): Fixed the bug.

  • editing/VisibleSelection.h:

(WebCore::VisibleSelection::isNoneOrOrphaned): Renamed from isNonOrphanedCaretOrRange and negated the semantics.

LayoutTests:

Reviewed by Brent Fulgham.

Fixed a test so that the assertion failure happens within the test instead of affecting the subsequent test.

  • editing/selection/selection-in-iframe-removed-crash-expected.txt:
  • editing/selection/selection-in-iframe-removed-crash.html:
12:18 PM Changeset in webkit [201822] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.36

New tag.

12:17 PM Changeset in webkit [201821] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

tests fail if display sleeps while run-webkit-tests is running
https://bugs.webkit.org/show_bug.cgi?id=153919

Reviewed by Alexey Proskuryakov.

  • DumpRenderTree/mac/LayoutTestHelper.m:

(releaseSleepAssertions): Release both Display sleep and System sleep assertions.
(addSleepAssertions): Add sleep assertion for both Display sleep and System sleep.

11:52 AM Changeset in webkit [201820] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking css3/filters/backdrop/dynamic-backdrop-filter-change.html as flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=158534

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:47 AM Changeset in webkit [201819] by Lucas Forschler
  • 2 edits in trunk/Tools

Reverted changeset 201814.

  • Scripts/copy-webkitlibraries-to-product-directory:
11:46 AM Changeset in webkit [201818] by dino@apple.com
  • 5 edits
    2 adds in trunk

Multiple selectors break keyframes animation
https://bugs.webkit.org/show_bug.cgi?id=158199
<rdar://problem/26652591>

Reviewed by Simon Fraser.

Source/WebCore:

If we came across a duplicate key entry in a keyframe, we
were replacing the existing entry, instead of merging.

Test: animations/duplicate-keys.html

  • css/CSSKeyframeRule.h:

(WebCore::StyleKeyframe::setKey): Add a way to set the key of a rule
as a number, rather than going through a string and the CSS parser.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::keyframeStylesForAnimation): Check if the rule
has duplicates, and if it does, merge all the common entries.

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::insert): Now that we've removed duplicates at
the processing time, we should never come across a duplicate while
building this list.

LayoutTests:

  • animations/duplicate-keys-expected.html: Added.
  • animations/duplicate-keys.html: Added.
11:45 AM Changeset in webkit [201817] by peavo@outlook.com
  • 12 edits in trunk

[Win] Shadow DOM tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=158524

Reviewed by Brent Fulgham.

.:

Enable Shadow DOM.

  • Source/cmake/OptionsWin.cmake:

Source/WebKit/win:

Add preference for enabling Shadow DOM.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::shadowDOMEnabled):
(WebPreferences::setShadowDOMEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

Enable Shadow DOM when running tests.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

LayoutTests:

Update test expectations for Shadow DOM.

  • platform/win/TestExpectations:
11:45 AM Changeset in webkit [201816] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Rebaseline bindings tests after r201808

Unreviewed test gardening.

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::JSTestGlobalObject::finishCreation):

  • bindings/scripts/test/JS/JSTestGlobalObject.h:
11:37 AM Changeset in webkit [201815] by Lucas Forschler
  • 5 edits in trunk

Teach cmake about libWebKitSystemInterfaceOSX10.12
Source/WebCore:


Rubber-stamped by Matt Hanson and Alex Christensen.

  • PlatformMac.cmake:

Tools:

This patch also removes duplicated logic inside DumpRenderTree/PlatformMac.cmake

Rubber-stamped by Alex Christensen.

  • DumpRenderTree/PlatformMac.cmake:
  • WebKitTestRunner/PlatformMac.cmake:
11:25 AM Changeset in webkit [201814] by Lucas Forschler
  • 2 edits in trunk/Tools

<rdar://problem/26685782>
Teach the copy-webkitlibraries-to-product-directory script about WebKitSystemInterfaceOSX10.12

Rubber-stamped by Jessie Berlin.

  • Scripts/copy-webkitlibraries-to-product-directory:
11:13 AM Changeset in webkit [201813] by fpizlo@apple.com
  • 10 edits in trunk/PerformanceTests

Use more ES6 features in JSAir
https://bugs.webkit.org/show_bug.cgi?id=158497

Reviewed by Keith Miller.

This improves JSAir with the following ES6 features suggested by JoePeck:

  • String interpolation.
  • Destructuring inside PatchCustom.
  • Default arguments.


All of these things are on hot paths.

Note that I didn't use string interpolation everywhere that I could, only in those places
where it made the code more readable. In Ruby, I used the style that if the interpolation
expression has any non-trivial stuff (like a ternary operator, a chain of calls, or embedded
strings) then it's better to use regular strcat. I think that's what I carried over to here.

Note that the previous change (Add result validation to JSAir) also made the Proxy code not
dead, though it's not necessarily on the hot path. The Proxy isn't called into frequently
but it's used from a function that is otherwise hot, so if calling into the Proxy prevents
that function from being optimized then it will hurt so good.

I also reenabled tail calls in a few places.

This change doesn't seem to change the performance of the benchmark for us. That's expected
since these ES6 features are cheap. Note that this claim doesn't include Proxy, which was
added in a separate change and that change did make the benchmark overall more expensive.

  • JSAir/allocate_stack.js:

(allocateStack):

  • JSAir/arg.js:

(Arg.createBitImm64):
(Arg.createAddr):
(Arg.createStack):
(Arg.logScale):
(Arg.createIndex):

  • JSAir/basic_block.js:

(BasicBlock.get headerString):
(BasicBlock.prototype.get if):
(BasicBlock):

  • JSAir/benchmark.js:

(benchmark):

  • JSAir/code.js:

(Code):
(Code.prototype.addBlock):
(Code.prototype.addStackSlot):
(Code.prototype.newTmp):
(Code.prototype.get size):
(Code.prototype.get blocks):
(Code.prototype.get stackSlots):
(Code.prototype.tmps):
(Code.prototype.get callArgAreaSize):
(Code.prototype.toString):

  • JSAir/custom.js:

(const.PatchCustom.forEachArg):

  • JSAir/inst.js:

(Inst):

  • JSAir/reg.js:

(Reg.prototype.toString):

  • JSAir/util.js:

(symbolName):
(lowerSymbolName):

11:03 AM Changeset in webkit [201812] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Don't try to cleanup non-existing ios Simulators
https://bugs.webkit.org/show_bug.cgi?id=158510

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort.clean_up_test_run):
Check if simulator exists before trying to clean it up.

10:46 AM Changeset in webkit [201811] by beidson@apple.com
  • 2 edits in trunk/Tools

Try to fix the Windows build.

Unreviewed.

  • TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:

(TestWebKitAPI::LifetimeLogger::log):
(TestWebKitAPI::LifetimeLogger::takeLogStr):
(TestWebKitAPI::testFunction):
(TestWebKitAPI::TEST):
(TestWebKitAPI::log): Deleted. (VS was seeing it as a dupe symbol)
(TestWebKitAPI::takeLogStr): Deleted. (VS was seeing it as a dupe symbol)

10:32 AM Changeset in webkit [201810] by commit-queue@webkit.org
  • 28 edits
    10 copies
    5 adds in trunk

[web-animations] Add Animatable, AnimationEffect, KeyframeEffect and Animation interface
https://bugs.webkit.org/show_bug.cgi?id=156096

Patch by Rawinder Singh <rawinder.singh-webkit@cisra.canon.com.au> on 2016-06-08
Reviewed by Dean Jackson.

Adds:
Source/JavaScriptCore:

  • Animatable interface and implementation of getAnimations in Element
  • Interface and implementation for Document getAnimations method.
  • AnimationEffect interface and class stub.
  • KeyframeEffect interface and constructor implementation.
  • 'Animation' interface, constructor and query methods for effect and timeline.
  • Remove runtime condition on Web animation interfaces (compile time flag is specified).
  • runtime/CommonIdentifiers.h:

Source/WebCore:

  • Animatable interface and implementation of getAnimations in Element
  • Interface and implementation for Document getAnimations method.
  • AnimationEffect interface and class stub.
  • KeyframeEffect interface and constructor implementation.
  • 'Animation' interface, constructor and query methods for effect and timeline.
  • Remove runtime condition on Web animation interfaces (compile time flag is specified).

Test: webanimations/Document.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/Animatable.idl: Copied from Source/WebCore/animation/DocumentAnimation.idl.
  • animation/AnimationEffect.cpp: Copied from Source/WebCore/animation/AnimationTimeline.cpp.

(WebCore::AnimationEffect::AnimationEffect):
(WebCore::AnimationEffect::~AnimationEffect):
(WebCore::AnimationEffect::setAnimation):
(WebCore::AnimationEffect::isCurrent):
(WebCore::AnimationEffect::isInEffect):

  • animation/AnimationEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.cpp.
  • animation/AnimationEffect.idl: Copied from Source/WebCore/animation/AnimationTimeline.idl.
  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::destroy):
(WebCore::AnimationTimeline::attachAnimation):
(WebCore::AnimationTimeline::detachAnimation):

  • animation/AnimationTimeline.h:
  • animation/AnimationTimeline.idl:
  • animation/DocumentAnimation.cpp:

(WebCore::DocumentAnimation::timeline):
(WebCore::DocumentAnimation::getAnimations):
(WebCore::DocumentAnimation::addAnimation):
(WebCore::DocumentAnimation::removeAnimation):

  • animation/DocumentAnimation.h:

(WebCore::DocumentAnimation::getAnimations):

  • animation/DocumentAnimation.idl:
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::attach):
(WebCore::DocumentTimeline::detach):

  • animation/DocumentTimeline.h:
  • animation/DocumentTimeline.idl:
  • animation/KeyframeEffect.cpp: Copied from Source/WebCore/animation/DocumentTimeline.cpp.

(WebCore::KeyframeEffect::create):
(WebCore::KeyframeEffect::KeyframeEffect):
(WebCore::KeyframeEffect::~KeyframeEffect):

  • animation/KeyframeEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.h.
  • animation/KeyframeEffect.idl: Copied from Source/WebCore/animation/AnimationTimeline.idl.
  • animation/WebAnimation.cpp: Copied from Source/WebCore/animation/DocumentAnimation.cpp.

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::~WebAnimation):

  • animation/WebAnimation.h: Copied from Source/WebCore/animation/DocumentAnimation.h.
  • animation/WebAnimation.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl.
  • bindings/scripts/CodeGeneratorGObject.pm:
  • dom/Element.cpp:

(WebCore::Element::getAnimations):

  • dom/Element.h:
  • dom/Element.idl:

Source/WebKit/mac:

  • Setup interface for enabling runtime flag for Web animations through preferences.
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences webAnimationsEnabled]):
(-[WebPreferences setWebAnimationsEnabled:]):

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

(-[WebView _preferencesChanged:]):

LayoutTests:

  • Animatable interface and implementation of getAnimations in Element
  • Interface and implementation for Document getAnimations method.
  • AnimationEffect interface and class stub.
  • KeyframeEffect interface and constructor implementation.
  • 'Animation' interface, constructor and query methods for effect and timeline.
  • Remove runtime condition on Web animation interfaces (compile time flag is specified).
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • webanimations/Document-expected.txt: Added.
  • webanimations/Document.html: Added.
  • webanimations/script-tests/Document.js: Added.
10:31 AM Changeset in webkit [201809] by beidson@apple.com
  • 4 edits in trunk

Make CrossThreadCopier more efficient (fewer copies!).
https://bugs.webkit.org/show_bug.cgi?id=158456

Reviewed by Alex Christensen.

Source/WTF:

Previously, we'd run all arguments through CrossThreadCopier, then immediately make
an unnecessary copy of the result during lambda capture.

Instead, we should just put the CrossThreadCopier generated objects directly in lambdas,
which are then captured by NoncopyableFunctions.

This reduces the number of constructor calls per argument from 2 copies to 1 move.

  • wtf/CrossThreadTask.h:

(WTF::CrossThreadTask::CrossThreadTask):
(WTF::createCrossThreadTask):

Tools:

  • TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:

(TestWebKitAPI::TEST):

10:31 AM Changeset in webkit [201808] by Chris Dumez
  • 8 edits
    4 adds in trunk

self.hasOwnProperty() does not work inside Web workers
https://bugs.webkit.org/show_bug.cgi?id=158446
<rdar://problem/26638397>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add a factory function to JSProxy to create a JSProxy without a target.
Also make the setTarget() method public so that the target can now be
set after creation. This is needed so that we can create a proxy for
JSWorkerGlobalScope, then create the JSWorkerGlobalScope object,
passing it the proxy and finally set the target on the proxy.

  • runtime/JSProxy.h:

(JSC::JSProxy::create):

Source/WebCore:

W3C tests for workers were severely broken on WebKit because
self.hasOwnProperty() did not work inside workers. The reason is that
hasOwnProperty() (and other methods like toString()) call toThis() in
StrictMode on thisValue. However, in the case of 'self' in workers,
self was a DedicatedWorkerGlobalScope, which is a JSGlobalObject.
JSGlobalObject::toThis() returns jsUndefined() when called in strict
mode. As a result, we would end up with exceptions such as "undefined
is not an object" when calling self.hasOwnProperty() in workers.

To address the problem, this patch introduces a JSProxy whose proxy
type is PureForwardingProxyType and whose target is the
WorkerGlobalScope. This JSProxy is what we expose to the JavaScript,
instead of the JSWorkerGlobalScope itself. As a result, toThis() now
behaves as expected and self.hasOwnProperty() works inside workers.

This patch greatly improves our pass rate on several W3C tests:
http://w3c-test.org/workers/interfaces.worker: 20 passes -> 50 passes (out of 128)
http://w3c-test.org/IndexedDB/interfaces.worker 0 passes -> 145 passes (out of 156)

Tests: fast/workers/self-hasOwnProperty.html

fast/workers/self-toString.html

  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::JSWorkerGlobalScopeBase::finishCreation):
(WebCore::JSWorkerGlobalScopeBase::visitChildren):
(WebCore::toJS):

  • bindings/js/JSWorkerGlobalScopeBase.h:

(WebCore::JSWorkerGlobalScopeBase::proxy):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

LayoutTests:

Add tests to make sure that self.toString() and self.hasOwnProperty()
now work in workers.

  • fast/workers/self-hasOwnProperty-expected.txt: Added.
  • fast/workers/self-hasOwnProperty.html: Added.
  • fast/workers/self-toString-expected.txt: Added.
  • fast/workers/self-toString.html: Added.
10:21 AM Changeset in webkit [201807] by fpizlo@apple.com
  • 31 edits
    2 adds in trunk

Add result validation to JSAir
https://bugs.webkit.org/show_bug.cgi?id=158493

Reviewed by Saam Barati.

PerformanceTests:

This adds the ability to hash a Code in a way that matches the C++ code's hashing of Code.
This allows us to check if the Code that JSAir sees is the code that C++ saw. We use this to
check the Code before and after allocateStack, and compare against hashes we got from C++.

Doing this uncovered bugs. roundUpToMultipleOf wasn't doing anything. allocateStack was not
allocating things correctly because I was concatting a Set to an Array, which doesn't really
work. Now these bugs are fixed.

The checking step adds to the running time so I reduced the number of iterations. The
benchmark spends a decent amount of its time computing Code hashes; I think it's around 1/3
total. This is probably OK. It's better to verify the results even if the running time is
not all in the "core" of the algorithm.

Also add a run-jsc-stress-tests yaml file to allow this to run as a test.

  • JSAir/allocate_stack.js:
  • JSAir/arg.js:

(Arg.createImm):
(Arg.createBigImm):
(Arg.createBitImm):
(Arg.createBitImm64):
(Arg.createWidth):
(Arg.createSpecial):
(Arg.prototype.get kind):
(Arg.prototype.get isTmp):
(Arg.prototype.get isImm):
(Arg.prototype.get isSomeImm):
(Arg.prototype.get isSomeBigImm):
(Arg.prototype.get isCondition):
(Arg.prototype.get isWidth):
(Arg.prototype.get isSpecial):
(Arg.prototype.get isAlive):
(Arg.prototype.get tmp):
(Arg.prototype.get value):
(Arg.prototype.get lowValue):
(Arg.prototype.get highValue):
(Arg.prototype.get base):
(Arg.prototype.get isGP):
(Arg.prototype.get isFP):
(Arg.prototype.isValidForm):
(Arg.prototype.get isInvertible):
(Arg.kindCode):
(Arg.prototype.hash):
(Arg.prototype.toString):
(Arg):

  • JSAir/basic_block.js:

(BasicBlock.get successorBlocks):

  • JSAir/benchmark.js:

(benchmark):

  • JSAir/code.js:

(Code.prototype.setFrameSize):
(Code.prototype.hash):
(Code.prototype.toString):
(Code):

  • JSAir/inst.js:

(Inst.prototype.get hasNonArgEffects):
(Inst.prototype.hash):
(Inst.prototype.toString):
(Inst):

  • JSAir/jsair-tests.yaml: Added.
  • JSAir/opcode.js:

(Inst_forEachArg):
(Inst_hasNonArgEffects):
(opcodeCode):

  • JSAir/payload-gbemu-executeIteration.js:

(createPayloadGbemuExecuteIteration):

  • JSAir/payload-imaging-gaussian-blur-gaussianBlur.js:

(createPayloadImagingGaussianBlurGaussianBlur):

  • JSAir/payload-jsair-ACLj8C.js:

(createPayloadJSAirACLj8C):

  • JSAir/payload-typescript-scanIdentifier.js:

(createPayloadTypescriptScanIdentifier):

  • JSAir/reg.js:

(Reg.prototype.get isReg):
(Reg.prototype.hash):
(Reg.prototype.toString):

  • JSAir/stack_slot.js:

(StackSlot.prototype.setOffsetFromFP):
(StackSlot.prototype.hash):
(StackSlot.prototype.toString):

  • JSAir/symbols.js:

(relCondCode):
(resCondCode):
(doubleCondCode):

  • JSAir/test.html:
  • JSAir/tmp.js:

(Tmp.prototype.get isReg):
(Tmp.prototype.hash):
(Tmp.prototype.toString):

  • JSAir/util.js:

(roundUpToMultipleOf):
(symbolName):

Source/JavaScriptCore:

Add a ::jsHash() method to some things, to compute a hash code that is suitable for
comparing a C++ Code to a JSAir Code. This is different from existing hashing functionality
because it errs on the side of easy reproducibility from JS rather than speed.

  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::isCompatibleType):
(JSC::B3::Air::Arg::jsHash):
(JSC::B3::Air::Arg::dump):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::asDoubleCondition):
(JSC::B3::Air::Arg::isInvertible):
(JSC::B3::Air::Arg::isUnsignedCond):
(JSC::B3::Air::Arg::Arg):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::addFastTmp):
(JSC::B3::Air::Code::jsHash):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::lastPhaseName):

  • b3/air/AirDumpAsJS.cpp:

(JSC::B3::Air::dumpAsJS):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/air/AirInst.cpp:

(JSC::B3::Air::Inst::hasArgEffects):
(JSC::B3::Air::Inst::jsHash):
(JSC::B3::Air::Inst::dump):

  • b3/air/AirInst.h:
  • b3/air/AirStackSlot.cpp:

(JSC::B3::Air::StackSlot::setOffsetFromFP):
(JSC::B3::Air::StackSlot::jsHash):
(JSC::B3::Air::StackSlot::dump):

  • b3/air/AirStackSlot.h:
  • b3/air/opcode_generator.rb:

Tools:

Run JSAir.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

9:48 AM Changeset in webkit [201806] by beidson@apple.com
  • 3 edits
    1 add in trunk/Tools

Add an API test that confirms object constructor/destructor calls during creation of a CrossThreadTask.
https://bugs.webkit.org/show_bug.cgi?id=158528

Reviewed by Alex Christensen.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp: Added.

(TestWebKitAPI::log):
(TestWebKitAPI::takeLogStr):
(TestWebKitAPI::LifetimeLogger::LifetimeLogger):
(TestWebKitAPI::LifetimeLogger::~LifetimeLogger):
(TestWebKitAPI::LifetimeLogger::isolatedCopy):
(TestWebKitAPI::testFunction):
(TestWebKitAPI::TEST):

8:20 AM WebKitGTK/2.12.x edited by Michael Catanzaro
(diff)
6:37 AM Changeset in webkit [201805] by Antti Koivisto
  • 11 edits in trunk

WebKit memory cache doesn't respect Vary header
https://bugs.webkit.org/show_bug.cgi?id=71509
<rdar://problem/26651033>

Reviewed by Sam Weinig.

Source/WebCore:

Implement Vary header support in WebCore memory cache.

The patch moves Vary header code from WebKit2 Network Cache to WebCore and uses it to
verify the headers for CachedResources.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::failBeforeStarting):
(WebCore::addAdditionalRequestHeadersToRequest):

Factor into standalone function so we can use it from varyHeaderValuesMatch.

(WebCore::CachedResource::addAdditionalRequestHeaders):
(WebCore::CachedResource::load):
(WebCore::CachedResource::setResponse):

Collect the Vary header values when we receive a response.

(WebCore::CachedResource::responseReceived):
(WebCore::CachedResource::redirectChainAllowsReuse):
(WebCore::CachedResource::varyHeaderValuesMatch):

Test for Vary match.

(WebCore::CachedResource::overheadSize):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isCacheValidator):
(WebCore::CachedResource::resourceToRevalidate):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy):

Reload on Vary mismatch.

  • platform/network/CacheValidation.cpp:

(WebCore::parseCacheControlDirectives):
(WebCore::headerValueForVary):
(WebCore::collectVaryingRequestHeaders):
(WebCore::verifyVaryingRequestHeaders):

Vary header collection and validation code moves here.

  • platform/network/CacheValidation.h:

Source/WebKit2:

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeCacheKey):
(WebKit::NetworkCache::cachePolicyAllowsExpired):
(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::storeRedirect):
(WebKit::NetworkCache::Cache::update):
(WebKit::NetworkCache::headerValueForVary): Deleted.
(WebKit::NetworkCache::collectVaryingRequestHeaders): Deleted.
(WebKit::NetworkCache::verifyVaryingRequestHeaders): Deleted.

These move to WebCore.

LayoutTests:

  • http/tests/cache/disk-cache/disk-cache-vary-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-vary-no-body-expected.txt:
5:56 AM Changeset in webkit [201804] by Konstantin Tokarev
  • 2 edits in trunk/Tools

TestWebKitAPI: Removed redunandant check PLATFORM(GTK) && !defined(BUILDING_WEBKIT2)
https://bugs.webkit.org/show_bug.cgi?id=158521

Reviewed by Carlos Garcia Campos.

  • TestWebKitAPI/config.h:
5:48 AM Changeset in webkit [201803] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ build with threaded compositor enabled after r201802.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::create):

5:13 AM Changeset in webkit [201802] by Carlos Garcia Campos
  • 11 edits in trunk/Source/WebKit2

LayerTreeHost should be created with a WebPage reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=158520

Reviewed by Žan Doberšek.

We are indeed creating the LayerTreeHost always from a WebPage reference but getting its address to pass it to
the LayerTreeHost create() function.

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:

(WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::create):
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
(WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
(WebKit::CoordinatedLayerTreeHost::commitSceneState):
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::create):
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
(WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::ThreadedCoordinatedLayerTreeHost::compositorDidFlushLayers):
(WebKit::ThreadedCoordinatedLayerTreeHost::didScaleFactorChanged):
(WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect):

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):

  • WebProcess/WebPage/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::create):
(WebKit::LayerTreeHost::LayerTreeHost):

  • WebProcess/WebPage/LayerTreeHost.h:
  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::create):
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
(WebKit::LayerTreeHostGtk::makeContextCurrent):
(WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
(WebKit::LayerTreeHostGtk::paintContents):
(WebKit::LayerTreeHostGtk::deviceScaleFactor):
(WebKit::LayerTreeHostGtk::pageScaleFactor):
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
(WebKit::LayerTreeHostGtk::flushAndRenderLayers):
(WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
(WebKit::LayerTreeHostGtk::initialize): Deleted.

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2:06 AM Changeset in webkit [201801] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

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

Missing WebKit2 pieces (Requested by anttik on #webkit).

Reverted changeset:

"WebKit memory cache doesn't respect Vary header"
https://bugs.webkit.org/show_bug.cgi?id=71509
http://trac.webkit.org/changeset/201800

2:01 AM Changeset in webkit [201800] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

WebKit memory cache doesn't respect Vary header
https://bugs.webkit.org/show_bug.cgi?id=71509
<rdar://problem/26651033>

Reviewed by Sam Weinig.

Implement Vary header support in WebCore memory cache.

The patch moves Vary header code from WebKit2 Network Cache to WebCore and uses it to
verify the headers for CachedResources.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::failBeforeStarting):
(WebCore::addAdditionalRequestHeadersToRequest):

Factor into standalone function so we can use it from varyHeaderValuesMatch.

(WebCore::CachedResource::addAdditionalRequestHeaders):
(WebCore::CachedResource::load):
(WebCore::CachedResource::setResponse):

Collect the Vary header values when we receive a response.

(WebCore::CachedResource::responseReceived):
(WebCore::CachedResource::redirectChainAllowsReuse):
(WebCore::CachedResource::varyHeaderValuesMatch):

Test for Vary match.

(WebCore::CachedResource::overheadSize):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isCacheValidator):
(WebCore::CachedResource::resourceToRevalidate):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy):

Reload on Vary mismatch.

  • platform/network/CacheValidation.cpp:

(WebCore::parseCacheControlDirectives):
(WebCore::headerValueForVary):
(WebCore::collectVaryingRequestHeaders):
(WebCore::verifyVaryingRequestHeaders):

Vary header collection and validation code moves here.

  • platform/network/CacheValidation.h:
1:00 AM Changeset in webkit [201799] by mmaxfield@apple.com
  • 9 edits in trunk/Source/WebCore

Extend CSSFontSelector's lifetime to be longer than the Document's lifetime
https://bugs.webkit.org/show_bug.cgi?id=154101

Reviewed by Darin Adler.

Rather than destroying the Document's CSSFontSelector, instead, the object should
live for the lifetime of the document, and it should instead be asked to clear its
contents.

This is important for the CSS Font Loading API, where the identity of objects the
CSSFontSelector references needs to persist throughout the lifetime of the
Document. This patch represents the first step to implementing this correctly.
The second step is for the CSSFontSelector to perform a diff instead of a
wholesale clear of its contents. Once this is done, font loading objects can
survive through a call to Document::clearStyleResolver().

This patch gives the CSSFontSelector two states: building underway and building not
underway. The state is building underway in between calls to clearStyleResolver()
and when the style resolver gets built back up. Otherwise, the state is building
not underway. Because of this new design, creation of all FontFace objects can be
postponed until a state transition from building underway to building not underway.
A subsequent patch will perform the diff at this point. An ASSERT() makes sure that
we never service a font lookup request while Building.

No new tests because there is no behavior change.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::clear):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::buildStarted):
(WebCore::CSSFontSelector::buildCompleted):
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::CSSFontSelector): Deleted.
(WebCore::CSSFontSelector::clearDocument): Deleted.

  • css/CSSFontSelector.h:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::appendAuthorStyleSheets):

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::clearStyleResolver):
(WebCore::Document::fontSelector): Deleted.

  • dom/Document.h:

(WebCore::Document::fontSelector):

12:37 AM Changeset in webkit [201798] by adam.bergkvist@ericsson.com
  • 7 edits
    4 adds in trunk

WebRTC: Imlement MediaEndpointPeerConnection::setLocalDescription()
https://bugs.webkit.org/show_bug.cgi?id=158190

Reviewed by Eric Carlson.

Source/WebCore:

Add implementation for MediaEndpointPeerConnection::setLocalDescription. This function
parses the input SDP, configures the media backend and updates the
RTCPeerConnection state.

This change adds MediaEndpointSessionDescription which is an object representation
of an RTCSessionDescription (which contains an SDP string).

Test: fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html

  • CMakeLists.txt:

Add MediaEndpointSessionDescription.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::hasUnassociatedTransceivers):
(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::setLocalDescription):
(WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
Add implementation.
(WebCore::MediaEndpointPeerConnection::localDescription):
(WebCore::MediaEndpointPeerConnection::currentLocalDescription):
(WebCore::MediaEndpointPeerConnection::pendingLocalDescription):
(WebCore::MediaEndpointPeerConnection::localDescriptionTypeValidForState):
(WebCore::MediaEndpointPeerConnection::internalLocalDescription):
(WebCore::MediaEndpointPeerConnection::createRTCSessionDescription):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/MediaEndpointSessionDescription.cpp: Added.

(WebCore::MediaEndpointSessionDescription::create):
(WebCore::MediaEndpointSessionDescription::toRTCSessionDescription):
(WebCore::MediaEndpointSessionDescription::typeString):
(WebCore::MediaEndpointSessionDescription::isLaterThan):

  • Modules/mediastream/MediaEndpointSessionDescription.h: Added.

(WebCore::MediaEndpointSessionDescription::~MediaEndpointSessionDescription):
(WebCore::MediaEndpointSessionDescription::type):
(WebCore::MediaEndpointSessionDescription::configuration):
(WebCore::MediaEndpointSessionDescription::MediaEndpointSessionDescription):

  • WebCore.xcodeproj/project.pbxproj:

Add MediaEndpointSessionDescription.

LayoutTests:

Add new test for RTCPeerConnection.setLocalDescription.

  • fast/mediastream/RTCPeerConnection-setLocalDescription-offer-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html: Added.

Set two local offers as local descriptions and inspect the state changes. Also set some
descriptions with bad types.

  • platform/mac/TestExpectations:

Skip the above test for mac (not building with WEB_RTC)

Jun 7, 2016:

11:54 PM Changeset in webkit [201797] by Carlos Garcia Campos
  • 2 edits in trunk

[GTK] Enable IndexedDB in workers
https://bugs.webkit.org/show_bug.cgi?id=158475

Reviewed by Antonio Gomes.

This is working now and many tests are failing only because we don't enable it.

  • Source/cmake/OptionsGTK.cmake:
11:51 PM Changeset in webkit [201796] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GLIB] Implement hardLinkOrCopyFile() in FileSystemGlib
https://bugs.webkit.org/show_bug.cgi?id=158473

Reviewed by Michael Catanzaro.

It was added in r199230 to be used by IndexedDB blob support, but never implemented for GLib.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::hardLinkOrCopyFile):

11:49 PM Changeset in webkit [201795] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] Use a longer timeout for glib unit tests
https://bugs.webkit.org/show_bug.cgi?id=158476

Reviewed by Darin Adler.

The timeout is supposed to be per test case, but in the case of GLib tests it affects all the tests cases of the
same test program. Some test programs like TestLoaderClient, that have a lot of test cases, often time out in
the bots because the timeout is not enough to run all the tests cases. So, we should use a longer timeout for
GLib tests.

  • Scripts/run-gtk-tests:

(TestRunner._run_test_glib):

11:30 PM Changeset in webkit [201794] by adam.bergkvist@ericsson.com
  • 2 edits in trunk/Source/WebCore

WebRTC: Refactor: Use captures with initializers in MediaEndpointPeerConnection::createOffer()
https://bugs.webkit.org/show_bug.cgi?id=158486

Reviewed by Eric Carlson.

Use initializers for the capture list when scheduling the "create offer task".

No change in behavior.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createOffer):
(WebCore::WrappedSessionDescriptionPromise::create): Deleted.
(WebCore::WrappedSessionDescriptionPromise::promise): Deleted.
(WebCore::WrappedSessionDescriptionPromise::WrappedSessionDescriptionPromise): Deleted.
Not needed anymore.

11:11 PM Changeset in webkit [201793] by nael.ouedraogo@crf.canon.fr
  • 4 edits in trunk/Source/WebCore

TouchList::append() should take a Ref instead of RefPtr
https://bugs.webkit.org/show_bug.cgi?id=158469

Reviewed by Chris Dumez.

RefPtr<Touch> items handled in TouchList cannot be null. Thus
RefPtr<Touch> is replaced by Ref<Touch> objects.

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::createTouchList):

  • dom/TouchList.cpp:

(WebCore::TouchList::item):

  • dom/TouchList.h:

(WebCore::TouchList::append):

10:42 PM Changeset in webkit [201792] by Gyuyoung Kim
  • 2 edits in trunk/Source/WebCore

EFL build has been broken since r201761
https://bugs.webkit.org/show_bug.cgi?id=158512

Unreviewed build fix.

  • platform/posix/SharedBufferPOSIX.cpp:

(WebCore::SharedBuffer::createFromReadingFile):
Do not use ? operand in return line. Additionally return nullptr instead of 0.

10:28 PM Changeset in webkit [201791] by Chris Dumez
  • 5 edits in trunk

Expose Event / EventTarget properties on WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=158511

Reviewed by Sam Weinig.

Source/WebCore:

Expose Event / EventTarget properties on WorkerGlobalScope, as per the
latest DOM specification:

No new tests, rebaselined existing test.

  • dom/Event.idl:
  • dom/EventTarget.idl:

LayoutTests:

Rebaseline existing test.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
9:27 PM Changeset in webkit [201790] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

[EFL] Build fix related with SharedBuffer::createFromReadingFile in SharedBufferPosix.cpp
https://bugs.webkit.org/show_bug.cgi?id=158515

  • platform/posix/SharedBufferPOSIX.cpp:

(WebCore::SharedBuffer::createFromReadingFile):

8:39 PM Changeset in webkit [201789] by bshafiei@apple.com
  • 2 edits in tags/Safari-602.1.35.0.1/Source/WebCore

Merged r201687. rdar://problem/26628125

8:38 PM Changeset in webkit [201788] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.1.35.0.1/Source

Versioning.

7:53 PM Changeset in webkit [201787] by mark.lam@apple.com
  • 22 edits
    1 add in trunk/Source

Need an exception check after constructEmptyArray().
https://bugs.webkit.org/show_bug.cgi?id=158411

Reviewed by Saam Barati.

Source/JavaScriptCore:

Added an exception check after each call to constructEmptyArray().

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::JSInjectedScriptHost::weakMapEntries):
(Inspector::JSInjectedScriptHost::weakSetEntries):
(Inspector::JSInjectedScriptHost::iteratorEntries):

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::functionsOnStack):

  • profiler/ProfilerBytecodeSequence.cpp:

(JSC::Profiler::BytecodeSequence::addSequenceProperties):

  • profiler/ProfilerCompilation.cpp:

(JSC::Profiler::Compilation::toJS):

  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::toJS):

  • profiler/ProfilerOSRExitSite.cpp:

(JSC::Profiler::OSRExitSite::toJS):

  • profiler/ProfilerOriginStack.cpp:

(JSC::Profiler::OriginStack::toJS):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::parse):

  • runtime/ModuleLoaderObject.cpp:

(JSC::moduleLoaderObjectRequestedModules):

  • runtime/ObjectConstructor.cpp:

(JSC::ownPropertyKeys):

  • runtime/RegExpObject.cpp:

(JSC::collectMatches):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncSplitFast):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncSplitFast):

  • runtime/TemplateRegistry.cpp:

(JSC::TemplateRegistry::getTemplateObject):

  • tests/stress/regress-158411.js: Added.

Source/WebCore:

A stress test for this was added in JavaScriptCore.

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::toJS):

  • bindings/js/JSCommandLineAPIHostCustom.cpp:

(WebCore::getJSListenerFunctions):

  • bindings/js/JSCryptoKeySerializationJWK.cpp:

(WebCore::buildJSONForRSAComponents):
(WebCore::addBoolToJSON):
(WebCore::addUsagesToJSON):
(WebCore::JSCryptoKeySerializationJWK::serialize):

  • bindings/js/JSDOMBinding.h:

(WebCore::toJS):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::deserialize):

7:47 PM Changeset in webkit [201786] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.35.0.1

New tag.

7:07 PM Changeset in webkit [201785] by commit-queue@webkit.org
  • 6 edits
    12 adds in trunk

The backdrop-filter property does not respect border-radius
https://bugs.webkit.org/show_bug.cgi?id=158483
<rdar://problem/24210257>

Patch by Antoine Quint <Antoine Quint> on 2016-06-07
Reviewed by Simon Fraser.

Source/WebCore:

In order to correctly support border-radius and backdrop-filter together, we change
the value set as the m_backdropFiltersRect from a FloatRect to FloatRoundedRect so
that it accounts for values set by the border-radius property. Then we add a new
m_backdropClippingLayer PlatformCALayer member to clip the backdrop layer in the
event that the border-radius is non-zero in updateBackdropFiltersRect(). Finally,
we follow the same pattern used for other PlatformCALayers owned by a GraphicsLayerCA
to support cloning of the new m_backdropClippingLayer.

Tests: css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-add.html

css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove.html
css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection.html
css3/filters/backdrop/backdrop-filter-with-border-radius-value-change.html
css3/filters/backdrop/backdrop-filter-with-border-radius-value-remove.html
css3/filters/backdrop/backdrop-filter-with-border-radius.html

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setBackdropFiltersRect):
(WebCore::GraphicsLayer::backdropFiltersRect):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::setBackdropFiltersRect):
(WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
Use a rounded rect if there is no clip and we have non-zero border-radius set on the renderer.

LayoutTests:

Adding new tests checking that border-radius correctly affects clipping of the backdrop layer
in a basic scenario, when we change border-radius to a different value, when we set border-radius
back to 0 and when we add a reflection.

  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-add-expected.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-add.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-expected.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove-expected.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-expected.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-value-change-expected.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-value-change.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-value-remove-expected.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius-value-remove.html: Added.
  • css3/filters/backdrop/backdrop-filter-with-border-radius.html: Added.
6:53 PM Changeset in webkit [201784] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

CachedScript should avoid recomputing its hash multiple times.
<https://webkit.org/b/158506>

Reviewed by Saam Barati.

JSBench was hitting CachedScript::script() hard and spending lots of time hashing scripts.
Since we're already caching the hash in a member variable, don't bother rehashing if we've
already done it before.

This takes total time spent in StringImpl::hashSlowCase() from 1600ms to 77ms on my MBP.

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::script):

6:43 PM Changeset in webkit [201783] by fpizlo@apple.com
  • 23 edits
    27 adds in trunk

Implement Air::allocateStack() in ES6 to see how much of a bad idea that is
https://bugs.webkit.org/show_bug.cgi?id=158318

Reviewed by Saam Barati.
PerformanceTests:


This adds a new benchmark for us to play with called JSAir. It's a complete ES6
implementation of Air's allocateStack() phase along with all of Air needed to run that
phase. This includes things like stack slots, registers, temporaries, basic blocks,
instructions, and all of the code for iterating over, inspecting, and modifying those
things.

To make this work, JSC can now dump Air just before allocateStack() in the form of JS code
that creates a Code object that matches exactly what C++ Air saw. This benchmark comprises
four Air IRs:

  • Octane/gbemu's largest function, executeIteration.
  • Kraken/imaging-gaussian-blur's largest function in OSR entry mode, gaussuanBlur.
  • Octane/typescript's largest function that is actually hot, scanIdentifier.
  • JSAir's largest hot function, which is anonymous, so we call it by its hash (ACLj8C).


This runs in about 2 seconds on my machine in JSC trunk. It includes both a commandline
harness and a web harness. JSAir is almost exactly 100x slower in ES6 in WebKit than the
C++ Air::allocateStack() phase on which it is based.

JSAir uses the following ES6 features:

  • Symbol.
  • for-of.
  • arrow functions.
  • Map/Set.
  • let/const.
  • classes.


All of these things are used in anger and should end up on the hot path. There is also code
that uses Proxies, but it ends up being dead.

We can improve this even more:
I still need to add result validation: https://bugs.webkit.org/show_bug.cgi?id=158493
I want to make it use more ES6 features: https://bugs.webkit.org/show_bug.cgi?id=158497

  • JSAir: Added.
  • JSAir/all.js: Added.
  • JSAir/allocate_stack.js: Added.

(allocateStack.attemptAssignment):
(allocateStack.assign):
(allocateStack.interfere):
(allocateStack.):
(allocateStack):

  • JSAir/arg.js: Added.

(Arg):
(Arg.isAnyUse):
(Arg.isColdUse):
(Arg.isWarmUse):
(Arg.cooled):
(Arg.isEarlyUse):
(Arg.isLateUse):
(Arg.isAnyDef):
(Arg.isEarlyDef):
(Arg.isLateDef):
(Arg.isZDef):
(Arg.typeForB3Type):
(Arg.widthForB3Type):
(Arg.conservativeWidth):
(Arg.minimumWidth):
(Arg.bytes):
(Arg.widthForBytes):
(Arg.createTmp):
(Arg.fromReg):
(Arg.createImm):
(Arg.createBigImm):
(Arg.createBitImm):
(Arg.createBitImm64):
(Arg.createAddr):
(Arg.createStack):
(Arg.createCallArg):
(Arg.createStackAddr):
(Arg.isValidScale):
(Arg.logScale):
(Arg.createIndex):
(Arg.createRelCond):
(Arg.createResCond):
(Arg.createDoubleCond):
(Arg.createWidth):
(Arg.prototype.get kind):
(Arg.prototype.get isTmp):
(Arg.prototype.get isImm):
(Arg.prototype.get isBigImm):
(Arg.prototype.get isBitImm):
(Arg.prototype.get isBitImm64):
(Arg.prototype.get isSomeImm):
(Arg.prototype.get isAddr):
(Arg.prototype.get isStack):
(Arg.prototype.get isCallArg):
(Arg.prototype.get isIndex):
(Arg.prototype.get isMemory):
(Arg.prototype.get isStackMemory):
(Arg.prototype.get isRelCond):
(Arg.prototype.get isResCond):
(Arg.prototype.get isDoubleCond):
(Arg.prototype.get isCondition):
(Arg.prototype.get isWidth):
(Arg.prototype.get isAlive):
(Arg.prototype.get tmp):
(Arg.prototype.get value):
(Arg.prototype.get base):
(Arg.prototype.get hasOffset):
(Arg.prototype.get offset):
(Arg.prototype.get stackSlot):
(Arg.prototype.get index):
(Arg.prototype.get scale):
(Arg.prototype.get logScale):
(Arg.prototype.get width):
(Arg.prototype.get isGPTmp):
(Arg.prototype.get isFPTmp):
(Arg.prototype.get isGP):
(Arg.prototype.get isFP):
(Arg.prototype.get hasType):
(Arg.prototype.get type):
(Arg.prototype.isType):
(Arg.prototype.isCompatibleType):
(Arg.prototype.get isGPR):
(Arg.prototype.get gpr):
(Arg.prototype.get isFPR):
(Arg.prototype.get fpr):
(Arg.prototype.get isReg):
(Arg.prototype.get reg):
(Arg.isValidImmForm):
(Arg.isValidBitImmForm):
(Arg.isValidBitImm64Form):
(Arg.isValidAddrForm):
(Arg.isValidIndexForm):
(Arg.prototype.isValidForm):
(Arg.prototype.forEachTmpFast):
(Arg.prototype.usesTmp):
(Arg.prototype.forEachTmp):
(Arg.prototype.is):
(Arg.prototype.as):
(Arg.prototype.forEachFast):
(Arg.prototype.forEach):
(Arg.extract):
(Arg.forEachFast):
(Arg.forEach):
(Arg.prototype.get condition):
(Arg.prototype.get isInvertible):
(Arg.prototype.toString):

  • JSAir/basic_block.js: Added.

(BasicBlock):
(BasicBlock.prototype.get index):
(BasicBlock.prototype.get size):
(BasicBlock.prototype.Symbol.iterator):
(BasicBlock.prototype.at):
(BasicBlock.get last):
(BasicBlock.get insts):
(BasicBlock.get numSuccessors):
(BasicBlock.get successors):
(BasicBlock.get successorBlocks.):
(BasicBlock.get successorBlocks):
(BasicBlock.set get numPredecessors):
(BasicBlock.get predecessors):
(BasicBlock.get frequency):
(BasicBlock.get headerString):
(BasicBlock.get footerString):

  • JSAir/benchmark.js: Added.

(benchmark):

  • JSAir/code.js: Added.

(Code):
(Code.prototype.addBlock):
(Code.prototype.addStackSlot):
(Code.prototype.newTmp):
(Code.prototype.get size):
(Code.prototype.at):
(Code.prototype.Symbol.iterator):
(Code.prototype.get blocks):
(Code.prototype.get stackSlots):
(Code.prototype.tmps):
(Code.prototype.get callArgAreaSize):
(Code.prototype.requestCallArgAreaSize):
(Code.prototype.get frameSize):
(Code.prototype.setFrameSize):
(Code.prototype.toString):

  • JSAir/custom.js: Added.

(const.ShuffleCustom.forEachArg):
(const.ShuffleCustom.hasNonArgNonControlEffects):
(const.PatchCustom.forEachArg):
(const.PatchCustom.hasNonArgNonControlEffects):
(const.CCallCustom.forEachArg):
(const.CCallCustom.hasNonArgNonControlEffects):
(const.ColdCCallCustom.forEachArg):
(const.ColdCCallCustom.hasNonArgNonControlEffects):

  • JSAir/frequented_block.js: Added.

(FrequentedBlock):
(FrequentedBlock.prototype.toString):

  • JSAir/insertion_set.js: Added.

(Insertion):
(Insertion.prototype.get index):
(Insertion.prototype.get element):
(Insertion.prototype.lessThan):
(InsertionSet):
(InsertionSet.prototype.appendInsertion):
(InsertionSet.prototype.append):
(InsertionSet.prototype.execute):

  • JSAir/inst.js: Added.

(Inst):
(Inst.prototype.append):
(Inst.prototype.clear):
(Inst.prototype.get opcode):
(Inst.prototype.get args):
(Inst.prototype.visitArg):
(Inst.prototype.forEachTmpFast):
(Inst.prototype.forEachArg):
(Inst.prototype.forEachTmp):
(Inst.prototype.forEach):
(Inst.forEachDef):
(Inst.forEachDefWithExtraClobberedRegs):
(Inst.prototype.get hasNonArgEffects):
(Inst.prototype.toString):

  • JSAir/liveness.js: Added.

(Liveness):
(Liveness.prototype.get thing):
(Liveness.prototype.get code):
(Liveness.prototype.get liveAtHead):
(Liveness.prototype.get liveAtTail):
(Liveness.prototype.localCalc.LocalCalc):
(Liveness.prototype.localCalc.LocalCalc.prototype.get liveSet):
(Liveness.prototype.localCalc.LocalCalc.prototype.execute):
(Liveness.prototype.localCalc):

  • JSAir/opcode.js: Added.

(Inst_forEachArg):
(Inst_hasNonArgEffects):

  • JSAir/payload-gbemu-executeIteration.js: Added.

(createPayloadGbemuExecuteIteration):

  • JSAir/payload-imaging-gaussian-blur-gaussianBlur.js: Added.

(createPayloadImagingGaussianBlurGaussianBlur):

  • JSAir/payload-jsair-ACLj8C.js: Added.

(createPayloadJSAirACLj8C):

  • JSAir/payload-typescript-scanIdentifier.js: Added.

(createPayloadTypescriptScanIdentifier):

  • JSAir/reg.js: Added.

(Reg):
(Reg.fromReg):
(Reg.prototype.get index):
(Reg.prototype.get type):
(Reg.prototype.get name):
(Reg.prototype.get isCalleeSave):
(Reg.prototype.get isReg):
(Reg.prototype.toString):
(Reg.extract):
(Reg.forEachFast):
(Reg.forEach):
(newGPR):
(Reg.gprs.Reg.fprs.Reg.calleeSaveGPRs.Reg.calleeSaveFPRs.Reg.calleeSaves):

  • JSAir/stack_slot.js: Added.

(StackSlot):
(StackSlot.prototype.get byteSize):
(StackSlot.prototype.get kind):
(StackSlot.prototype.get isLocked):
(StackSlot.prototype.get isSpill):
(StackSlot.prototype.get index):
(StackSlot.prototype.ensureSize):
(StackSlot.prototype.get alignment):
(StackSlot.prototype.get offsetFromFP):
(StackSlot.prototype.setOffsetFromFP):
(StackSlot.prototype.toString):
(StackSlot.extract):
(StackSlot.forEachFast):
(StackSlot.forEach):

  • JSAir/symbols.js: Added.
  • JSAir/test.html: Added.
  • JSAir/test.js: Added.
  • JSAir/tmp.js: Added.

(Tmp):
(Tmp.fromReg):
(Tmp.prototype.get index):
(Tmp.prototype.get type):
(Tmp.prototype.get isReg):
(Tmp.prototype.toString):
(Tmp.extract):
(Tmp.forEachFast):
(Tmp.forEach):

  • JSAir/tmp_base.js: Added.

(TmpBase.prototype.get isGP):
(TmpBase.prototype.get isFP):
(TmpBase.prototype.get isGPR):
(TmpBase.prototype.get isFPR):
(TmpBase.prototype.get reg):
(TmpBase.prototype.get gpr):
(TmpBase.prototype.get fpr):
(TmpBase):

  • JSAir/util.js: Added.

(isRepresentableAsInt32):
(addIndexed):
(roundUpToMultipleOf):
(symbolName):
(mergeIntoSet):
(nonEmptyRangesOverlap):
(rangesOverlap):
(removeAllMatching):
(swap):
(bubble):
(bubbleSort):
(currentTime):
(else.currentTime):

Source/JavaScriptCore:


Most of these changes are to support dumpAsJS(). But I also found some duplicate and dead
code while rewriting it to JS.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/air/AirAllocateStack.cpp:
  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::isSomeImm):
(JSC::B3::Air::Arg::isAddr):
(JSC::B3::Air::Arg::tmpIndex):
(JSC::B3::Air::Arg::isValidImmForm):
(JSC::B3::Air::Arg::withOffset): Deleted. This was dead code.

  • b3/air/AirArgInlines.h: It turns out that Inst has a ForEach thing that duplicated some of the logic of ArgThingHelper, so I just made ArgThingHelper more powerful.

(JSC::B3::Air::ArgThingHelper<Arg>::forEach):
(JSC::B3::Air::ArgThingHelper<Reg>::is):
(JSC::B3::Air::ArgThingHelper<Reg>::as):
(JSC::B3::Air::ArgThingHelper<Reg>::forEachFast):
(JSC::B3::Air::ArgThingHelper<Reg>::forEach):
(JSC::B3::Air::Arg::is):

  • b3/air/AirDumpAsJS.cpp: Added.

(JSC::B3::Air::dumpAsJS):

  • b3/air/AirDumpAsJS.h: Added.
  • b3/air/AirFixObviousSpills.cpp:
  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::forEach):
(JSC::B3::Air::Inst::extraClobberedRegs):
(JSC::B3::Air::ForEach<Tmp>::forEach): Deleted. This was doing what ArgThingHelper would have done but not as well.
(JSC::B3::Air::ForEach<Arg>::forEach): Deleted.
(JSC::B3::Air::ForEach<Reg>::forEach): Deleted.

  • b3/air/AirLogRegisterPressure.cpp:
  • b3/air/AirReportUsedRegisters.cpp:
  • b3/air/AirSpillEverything.cpp:
  • b3/air/opcode_generator.rb: Make this dump opcode.js, which is like what it dumps for C++.
  • jit/Reg.cpp:

(JSC::Reg::debugName):
(JSC::Reg::dump):

  • jit/Reg.h:

(JSC::Reg::hash):

  • jsc.cpp: Fix jsc so that it reports the filename and line number of parser errors.

(dumpException):

  • parser/ParserError.h: Make it easier to debug this code.

(WTF::printInternal):

  • runtime/Options.h:

Source/WTF:

  • wtf/Insertion.h:

(WTF::executeInsertions): I found a bug while rewriting this code in JS.

  • wtf/PrintStream.h:

(WTF::PrintStream::print):
(WTF::PrintStream::println): This is useful to have.

6:31 PM Changeset in webkit [201782] by Keith Rollin
  • 34 edits in trunk

Remove all uses of PassRefPtr in WTF
https://bugs.webkit.org/show_bug.cgi?id=157596
<rdar://problem/26234391>

Reviewed by Chris Dumez.

Source/JavaScriptCore:

Update calls to interfaces that no longer take or return PassRefPtrs.

  • runtime/JSString.cpp:

(JSC::JSRopeString::resolveRope):

  • runtime/JSString.h:

(JSC::JSString::JSString):
(JSC::jsSubstring):

  • runtime/PrivateName.h:

(JSC::PrivateName::PrivateName):

  • runtime/SmallStrings.cpp:

(JSC::SmallStringsStorage::SmallStringsStorage):

  • runtime/StringConstructor.cpp:

(JSC::stringFromCharCodeSlowCase):

  • runtime/StringPrototype.cpp:

(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::replaceUsingStringSearch):
(JSC::repeatCharacter):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
(JSC::normalize):

Source/WebCore:

Update calls to interfaces that no longer take or return PassRefPtrs.

No new tests: no new functionality so changes are covered by existing
tests.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberValue):

  • dom/Document.cpp:

(WebCore::Document::displayStringModifiedByEncoding):

  • xml/XPathGrammar.y:

Source/WTF:

Remove/update most interfaces that take or return PassRefPtrs.
Remaining references include those in non-Cocoa implementations and
those required for continued compatibility with modules that still use
PassRefPtrs (specifically: Forward.h, RefPtr interoperability,
SizeLimits.h, WorkQueue (Windows) DispatchQueueEfl,
DispatchWorkItemEfl, and PassRefPtr itself).

Update calls to interfaces that no longer take or return PassRefPtrs.

Update adoptRef(T*) to return a RefPtr instead of a PassRefPtr and
move it to RefPtr.h from PassRefPtr.h.

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::allocate):

  • wtf/MetaAllocator.h:
  • wtf/ParallelJobsGeneric.h:

(WTF::ParallelEnvironment::ThreadPrivate::create):

  • wtf/text/AtomicStringImpl.cpp:

(WTF::HashAndUTF8CharactersTranslator::translate):
(WTF::SubstringTranslator::translate):

  • wtf/text/CString.cpp:

(WTF::CStringBuffer::createUninitialized):

  • wtf/text/CString.h:
  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
(WTF::StringBuilder::reallocateBuffer<LChar>):
(WTF::StringBuilder::reallocateBuffer<UChar>):

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::create8BitIfPossible):
(WTF::StringImpl::createSymbol):
(WTF::StringImpl::createNullSymbol):
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToLowercaseWithLocale):
(WTF::StringImpl::convertToUppercaseWithLocale):
(WTF::StringImpl::convertASCIICase):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::extractFoldedStringInSymbol):

  • wtf/text/SymbolRegistry.cpp:

(WTF::SymbolRegistry::symbolForKey):

  • wtf/text/WTFString.cpp:

(WTF::String::substringSharingImpl):

  • wtf/text/WTFString.h:

(WTF::String::String): Deleted.

  • wtf/text/cf/StringImplCF.cpp:

Tools:

Update calls to interfaces that no longer take or return PassRefPtrs.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::stringFromUTF8):
(TestWebKitAPI::TEST):

6:30 PM Changeset in webkit [201781] by weinig@apple.com
  • 4 edits in trunk/LayoutTests

Update tests to work around https://bugs.webkit.org/show_bug.cgi?id=158507.

Re-enable now passing test.

  • animations/script-tests/spring-computed-style.js:
  • animations/script-tests/spring-parsing.js:

Use a non-body element to do the testing.

5:44 PM Changeset in webkit [201780] by weinig@apple.com
  • 2 edits in trunk/LayoutTests

Mark animations/spring-computed-style.html as failing temporarily.

5:36 PM Changeset in webkit [201779] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/events/touch/document-create-touch-list-ios.html

Unreviewed test gardening.

  • fast/events/touch/document-create-touch-list-ios-expected.txt:
5:32 PM Changeset in webkit [201778] by Brian Burg
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: reduce timer churn when processing many DOM.attributeModified messages
https://bugs.webkit.org/show_bug.cgi?id=158491
<rdar://problem/25561452>

Reviewed by Timothy Hatcher.

When the backend sends thousands of DOM.attributeModified events to the frontend, it
slows to a crawl. This is partly because redundant messages are being sent, and
because the frontend is taking too long to render attribute updates in the elements tab.

This patch is a first step to improve performance by reducing unnecessary work. It
coalesces all attribute state updates to only happen once per animation frame. This
reduces timer churn because we previously used a debouncing timer with interval of 0ms,
and that had to be cleared and restarted on every call. This change also eliminates
forced layouts when updating the selection highlights, since the DOM tree outline has
been reflowed by the time we start updating selections in a requestAnimationFrame callback.

There is still a lot of optimization to be done here, but this reduces the problem
considerably by keeping the event loop clear and making it obvious which selection
update operations are still too expensive.

  • UserInterface/Base/Utilities.js:

Add a 'onNextFrame' proxy to Object. It works like debounce, except it coalesces calls
up until the next animation frame rather than a fixed timeout. It also does not extend
the timeout interval for each call.

  • UserInterface/Views/DOMTreeUpdater.js:

(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
(WebInspector.DOMTreeUpdater.prototype._characterDataModified):
(WebInspector.DOMTreeUpdater.prototype._nodeInserted):
(WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
Update on the next frame rather than on a zero delay timeout.

  • UserInterface/Views/TreeOutline.js:

(WebInspector.TreeOutline.WebInspector.TreeElement.prototype.didChange):
(WebInspector.TreeOutline.WebInspector.TreeElement.prototype._fireDidChange):
Update on the next frame rather than on a zero delay timeout.

5:06 PM Changeset in webkit [201777] by mmaxfield@apple.com
  • 6 edits
    6 adds in trunk

Text-decoration-style: dashed / dotted rendered as solid
https://bugs.webkit.org/show_bug.cgi?id=134336

Reviewed by Dean Jackson.

Source/WebCore:

We already had most of the infrastructure for dotted / dashed underlines.
Previously, we were setting the stroke style for the underlines, but then
filling the underlines (which means the stroke styles is irrelevant).
Instead, we should just compute the individual dots / dashes to fill.

The implementation of this is done inside GraphicsContext because
GraphicsContext is already responsible for handling the single / double
underline distinction. Extending it to be responsible for dotted / dashed
is the natural thing to do.

Tests: fast/css3-text/css3-text-decoration/text-decoration-dashed.html

fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html
fast/css3-text/css3-text-decoration/text-decoration-dotted.html

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::drawLinesForText):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::drawLinesForText):

  • rendering/TextDecorationPainter.cpp:

(WebCore::drawSkipInkUnderline):
(WebCore::TextDecorationPainter::paintTextDecoration):

LayoutTests:

Make sure that the dotted / dashed / solid renderings are all distinct.

  • fast/css3-text/css3-text-decoration/text-decoration-dashed-expected-mismatch.html: Added.
  • fast/css3-text/css3-text-decoration/text-decoration-dashed.html: Added.
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed-expected-mismatch.html: Added.
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html: Added.
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-expected-mismatch.html: Added.
  • fast/css3-text/css3-text-decoration/text-decoration-dotted.html: Added.
4:45 PM Changeset in webkit [201776] by sbarati@apple.com
  • 2 edits
    1 add in trunk/Source/JavaScriptCore

InvalidationPointInjectionPhase creates bogus InvalidationPoints that may even be inserted when it's not OK to exit
https://bugs.webkit.org/show_bug.cgi?id=158499
<rdar://problem/26647473>

Reviewed by Mark Lam and Benjamin Poulain.

InvalidationPointInjectionPhase forgot to clear m_originThatHadFire
before analyzing the current block it's analyzing. This meant that
the phase allowed a residual m_originThatHadFire that was set from the
previous block to effect a completely unrelated block. This is usually
harmless, but sometimes we would insert an InvalidationPoint at a point
in the graph when exiting is invalid. This would cause a crash.

  • dfg/DFGInvalidationPointInjectionPhase.cpp:

(JSC::DFG::InvalidationPointInjectionPhase::run):

  • tests/stress/dont-crash-on-bad-invalidation-point.js: Added.

(dontCrash):

4:40 PM Changeset in webkit [201775] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Build fix after r201739. attachShadow was throwing an exception on this component.

  • public/v3/pages/analysis-category-toolbar.js:

(AnalysisCategoryToolbar):

3:45 PM Changeset in webkit [201774] by Chris Fleizach
  • 2 edits in trunk/Source/WebCore

AX: iOS: Need to expose whether object is a dialog element
https://bugs.webkit.org/show_bug.cgi?id=158487
<rdar://problem/26678218>

Reviewed by Joanmarie Diggs.

Expose whether an object is a dialog type. This will allow decisions higher up the stack to be made in regards to where to move VoiceOver focus.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityIsDialog]):

3:32 PM Changeset in webkit [201773] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r158219): Web Inspector: Border under Memory content view is too thick
https://bugs.webkit.org/show_bug.cgi?id=158495
<rdar://problem/26683428>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/MemoryTimelineView.css:

(.timeline-view.memory): Deleted.

2:09 PM Changeset in webkit [201772] by Brent Fulgham
  • 2 edits in trunk/Source/bmalloc

Prevents integer overflow in Vector.h
https://bugs.webkit.org/show_bug.cgi?id=158455
<rdar://problem/20235469>

Patch by Pranjal Jumde <pjumde@apple.com> on 2016-06-07
Reviewed by Mark Lam.

  • bmalloc/Vector.h:

(bmalloc::Vector<T>::reallocateBuffer):

1:46 PM Changeset in webkit [201771] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Yosemite build.
https://bugs.webkit.org/show_bug.cgi?id=158403

  • platform/spi/cocoa/QuartzCoreSPI.h:
1:32 PM Changeset in webkit [201770] by weinig@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix 10.10 build.

  • WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:

(WebKit::addAnimationToLayer):

1:24 PM Changeset in webkit [201769] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build.

  • platform/network/curl/MultipartHandle.cpp:

(WebCore::MultipartHandle::didReceiveResponse):

1:07 PM Changeset in webkit [201768] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

operationProcessTypeProfilerLogDFG doesn't update topCallFrame
https://bugs.webkit.org/show_bug.cgi?id=158428
<rdar://problem/26571493>

Reviewed by Mark Lam.

  • dfg/DFGOperations.cpp:
1:05 PM Changeset in webkit [201767] by achristensen@apple.com
  • 5 edits in trunk/Source/WebCore

Build fix non-cocoa platforms.
https://bugs.webkit.org/show_bug.cgi?id=158332

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::createCustomFontData):

  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::continueWillSendRequest):

  • platform/network/curl/MultipartHandle.cpp:

(WebCore::MultipartHandle::didReceiveResponse):

  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::headerCallback):

12:51 PM Changeset in webkit [201766] by mark.lam@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

calculatedDisplayName() and friends actually need a VM& and not a ExecState/CallFrame.
https://bugs.webkit.org/show_bug.cgi?id=158488

Reviewed by Geoffrey Garen.

calculatedDisplayName() (and some of its friends) actually just need a VM&.
Their work has nothing to do with an ExecState at all. This patch will make that
clear by changing these functions to take a VM& arg instead of an ExecState* or
CallFrame*.

Also removed the JS_EXPORT_PRIVATE attribute from Interpreter::StackFrame::toString().
The JS_EXPORT_PRIVATE attribute was a holdover from the days when WebInspector
was entirely in WebCore. It is no longer needed.

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::functionName):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::functionDetails):

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::createScriptCallStackFromException):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::friendlyFunctionName):

  • interpreter/Interpreter.cpp:

(JSC::StackFrame::friendlySourceURL):
(JSC::StackFrame::friendlyFunctionName):
(JSC::StackFrame::expressionInfo):
(JSC::StackFrame::toString):
(JSC::Interpreter::stackTraceAsString):

  • interpreter/Interpreter.h:
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::functionName):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::name):
(JSC::InternalFunction::displayName):
(JSC::InternalFunction::getCallData):
(JSC::InternalFunction::calculatedDisplayName):

  • runtime/InternalFunction.h:

(JSC::InternalFunction::createStructure):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::name):
(JSC::JSFunction::displayName):
(JSC::JSFunction::calculatedDisplayName):
(JSC::JSFunction::getConstructData):
(JSC::getCalculatedDisplayName):

  • runtime/JSFunction.h:

(JSC::JSFunction::executable):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):

12:31 PM Changeset in webkit [201765] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skipping http/tests/websocket/tests/hybi/upgrade-simple-ws.html
https://bugs.webkit.org/show_bug.cgi?id=158480

Unreviewed test gardening.

12:22 PM Changeset in webkit [201764] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the 10.10 build.

  • platform/spi/cocoa/QuartzCoreSPI.h:
11:56 AM Changeset in webkit [201763] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit/mac

[iOS WK1] Remove unused -_webkit_unescapedQueryValue and -_webkit_queryKeysAndValues NSString category methods
<https://webkit.org/b/158485>
<rdar://problem/16960445>

Reviewed by Dan Bernstein.

  • Misc/WebNSURLExtras.h:

(-[NSString _webkit_unescapedQueryValue]): Deleted declaration.
(-[NSString _webkit_queryKeysAndValues]): Deleted declaration.

  • Misc/WebNSURLExtras.mm:

(-[NSString _webkit_unescapedQueryValue]): Deleted.
(-[NSString _webkit_queryKeysAndValues]): Deleted.

11:55 AM Changeset in webkit [201762] by Brian Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: add a keyboard shortcut to open the new tab tab
https://bugs.webkit.org/show_bug.cgi?id=158365
<rdar://problem/26631897>

Unreviewed, fix a typo introduced in r201692.
This caused the new tab button to stop working.

  • UserInterface/Base/Main.js:

(WebInspector._updateNewTabButtonState):

11:52 AM Changeset in webkit [201761] by achristensen@apple.com
  • 46 edits in trunk/Source

Modernize loading code
https://bugs.webkit.org/show_bug.cgi?id=158332

Reviewed by Darin Adler.

Source/WebCore:

No new tests, no change in behavior.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

  • loader/FrameLoader.h:
  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::didReceiveData):
(WebCore::NetscapePlugInStreamLoader::didReceiveBuffer):
(WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer):
(WebCore::NetscapePlugInStreamLoader::didFinishLoading):

  • loader/NetscapePlugInStreamLoader.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::deliverResponseAndData):
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::addDataOrBuffer):
(WebCore::ResourceLoader::clearResourceData):
(WebCore::ResourceLoader::didReceiveData):
(WebCore::ResourceLoader::didReceiveBuffer):
(WebCore::ResourceLoader::didReceiveDataOrBuffer):
(WebCore::ResourceLoader::didFinishLoading):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::wasCancelled):
(WebCore::ResourceLoader::options):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveData):
(WebCore::SubresourceLoader::didReceiveBuffer):
(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

  • loader/SubresourceLoader.h:
  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::abort):
(WebCore::ApplicationCacheGroup::createResourceHandle):

  • loader/appcache/ApplicationCacheGroup.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::addData):

  • loader/cache/CachedRawResourceClient.h:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::createWithContentsOfFile):
(WebCore::SharedBuffer::adoptVector):
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
(WebCore::SharedBuffer::appendToDataBuffer):
(WebCore::SharedBuffer::clearDataBuffer):

  • platform/SharedBuffer.h:

(WebCore::SharedBuffer::create):

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::maybeAppendPlatformData):
(WebCore::SharedBuffer::wrapCFDataArray):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::didReceiveData):
(ResourceHandleStreamingClient::didReceiveBuffer):

  • platform/mac/SharedBufferMac.mm:

(WebCore::SharedBuffer::createCFData):
(WebCore::SharedBuffer::createFromReadingFile):

  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::~BlobRegistryImpl):
(WebCore::createBlobResourceHandle):
(WebCore::loadBlobResourceSynchronously):
(WebCore::registerBlobResourceHandleConstructor):
(WebCore::BlobRegistryImpl::createResourceHandle):
(WebCore::BlobRegistryImpl::appendStorageItems):
(WebCore::createResourceHandle): Deleted.
(WebCore::loadResourceSynchronously): Deleted.

  • platform/network/BlobRegistryImpl.h:
  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::createAsync):
(WebCore::BlobResourceHandle::loadResourceSynchronously):
Removed the overridden didReceiveData and didFinishLoading,
which did nothing and were identical to the function they overwrote.

  • platform/network/BlobResourceHandle.h:
  • platform/network/PingHandle.h:
  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::ResourceHandle):
(WebCore::ResourceHandle::create):
(WebCore::ResourceHandle::scheduleFailure):

  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleClient.cpp:

(WebCore::ResourceHandleClient::willCacheResponseAsync):
(WebCore::ResourceHandleClient::didReceiveBuffer):

  • platform/network/ResourceHandleClient.h:

(WebCore::ResourceHandleClient::didReceiveResponse):
(WebCore::ResourceHandleClient::didReceiveData):
(WebCore::ResourceHandleClient::didFinishLoading):
(WebCore::ResourceHandleClient::didFail):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask resource:receivedData:length:]):
This data must be copied in order to put it in a refcounted NSData because it comes
from IPC from the Network Process and is an IPC::DataReference which will be deallocated
when the message handling is done.

  • platform/soup/SharedBufferSoup.cpp:

(WebCore::SharedBuffer::SharedBuffer):

  • testing/MockContentFilter.cpp:

(WebCore::MockContentFilter::replacementData):
(WebCore::MockContentFilter::unblockHandler):

Source/WebKit2:

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::client):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveResponseNetworkSession):
(WebKit::NetworkLoad::didReceiveData):
(WebKit::NetworkLoad::didReceiveBuffer):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):

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

(WebKit::NetworkDataTask::didReceiveResponse):
(WebKit::NetworkDataTask::didReceiveData):

  • Shared/WebHitTestResultData.cpp:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveResource):

11:22 AM WebInspector edited by clopez@igalia.com
(diff)
11:21 AM WebInspector edited by clopez@igalia.com
(diff)
11:20 AM Changeset in webkit [201760] by peavo@outlook.com
  • 2 edits in trunk/Tools

[Win] Imported markup insertion test is failing.
https://bugs.webkit.org/show_bug.cgi?id=158477

Reviewed by Darin Adler.

Make sure the empty synchronous request is loaded after each test.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(runTest):

11:15 AM Changeset in webkit [201759] by weinig@apple.com
  • 29 edits
    9 adds in trunk

Add experimental support for spring based CSS animations
https://bugs.webkit.org/show_bug.cgi?id=158403

Reviewed by Dean Jackson.

Source/WebCore:

Adds experimental support for a new CSS animation timing function that uses
spring to model the time function. To use it you replace your normal timing
function, be it cubic-bezier or steps, with a new function called spring().
For instance, for a transition you would write:

transition-timing-function: spring(1 100 10 0);


The parameters are, in order:

  • Mass
  • Stiffness
  • Damping
  • Initial Velocity

Tests: animations/spring-computed-style.html

animations/spring-function.html
animations/spring-parsing.html

  • WebCore.xcodeproj/project.pbxproj:

Add new file.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createTimingFunctionValue):
Modernize and add support for the spring function.

  • css/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseTransformOriginShorthand):
(WebCore::CSSParser::isSpringTimingFunctionEnabled):
(WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
(WebCore::CSSParser::parseSpringTimingFunctionValue):
(WebCore::CSSParser::parseAnimationTimingFunction):

  • css/CSSParser.h:
  • css/CSSParserMode.h:

Add parsing support for the spring() function.

  • css/CSSTimingFunctionValue.cpp:

(WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
(WebCore::CSSCubicBezierTimingFunctionValue::equals):
(WebCore::CSSStepsTimingFunctionValue::customCSSText):
(WebCore::CSSStepsTimingFunctionValue::equals):
(WebCore::CSSSpringTimingFunctionValue::customCSSText):
(WebCore::CSSSpringTimingFunctionValue::equals):

  • css/CSSTimingFunctionValue.h:

(WebCore::CSSSpringTimingFunctionValue::create):
(WebCore::CSSSpringTimingFunctionValue::mass):
(WebCore::CSSSpringTimingFunctionValue::stiffness):
(WebCore::CSSSpringTimingFunctionValue::damping):
(WebCore::CSSSpringTimingFunctionValue::initialVelocity):
(WebCore::CSSSpringTimingFunctionValue::CSSSpringTimingFunctionValue):
Modernize and add support for the spring function.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
Pipe the spring function into the animation.

  • css/CSSValue.cpp:

(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isSpringTimingFunctionValue):
Add support for the spring function.

  • page/Settings.in:

Add a setting to control if the spring function is enabled.

  • page/animation/AnimationBase.cpp:

(WebCore::solveSpringFunction):
(WebCore::AnimationBase::progress):
Add support for solving the spring function. Since the spring requires time to be absolute,
get the real time by multiplying the ratio t, to the total duration.

  • platform/animation/TimingFunction.cpp:

(WebCore::operator<<):

  • platform/animation/TimingFunction.h:

(WebCore::TimingFunction::~TimingFunction):
(WebCore::TimingFunction::isSpringTimingFunction):
Add support for the spring timing function.

  • platform/graphics/SpringSolver.h: Added.

(WebCore::SpringSolver::SpringSolver):
(WebCore::SpringSolver::solve):
Add a Spring solver that matches the one in CoreAnimation.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createBasicAnimation):
(WebCore::GraphicsLayerCA::createSpringAnimation):
(WebCore::GraphicsLayerCA::setupAnimation):

  • platform/graphics/ca/GraphicsLayerCA.h:

Map animations with spring timing functions to CASpringAnimations.

  • platform/graphics/ca/PlatformCAAnimation.cpp:

(WebCore::operator<<):
(WebCore::PlatformCAAnimation::isBasicAnimation):

  • platform/graphics/ca/PlatformCAAnimation.h:

(WebCore::PlatformCAAnimation::setActualStartTimeIfNeeded):
(WebCore::PlatformCAAnimation::PlatformCAAnimation):

  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:

(WebCore::toCAMediaTimingFunction):
(PlatformCAAnimationCocoa::PlatformCAAnimationCocoa):
(PlatformCAAnimationCocoa::setTimingFunction):
(PlatformCAAnimationCocoa::copyTimingFunctionFrom):
(PlatformCAAnimationCocoa::setFromValue):
(PlatformCAAnimationCocoa::copyFromValueFrom):
(PlatformCAAnimationCocoa::setToValue):
(PlatformCAAnimationCocoa::copyToValueFrom):
Add a new type of PlatformCAAnimation, Spring, which is a sub-type of Basic.

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<StepsTimingFunction>::decode):
(IPC::ArgumentCoder<SpringTimingFunction>::encode):
(IPC::ArgumentCoder<SpringTimingFunction>::decode):
(IPC::ArgumentCoder<FloatPoint>::encode):

  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:

(WebKit::PlatformCAAnimationRemote::Properties::encode):
(WebKit::PlatformCAAnimationRemote::Properties::decode):
(WebKit::addAnimationToLayer):
Pipe through support for the Spring animation.

LayoutTests:

  • animations/script-tests/spring-computed-style.js: Added.
  • animations/script-tests/spring-parsing.js: Added.
  • animations/spring-computed-style-expected.txt: Added.
  • animations/spring-computed-style.html: Added.
  • animations/spring-function-expected.txt: Added.
  • animations/spring-function.html: Added.
  • animations/spring-parsing-expected.txt: Added.
  • animations/spring-parsing.html: Added.

Add tests for the spring timing function.

11:13 AM Changeset in webkit [201758] by achristensen@apple.com
  • 2 edits
    1 add in trunk/Source/WebKit/mac

Adopt [PDFView documentScrollView]
https://bugs.webkit.org/show_bug.cgi?id=158454
rdar://problem/25875390

Reviewed by Tim Horton.

  • WebView/PDFViewSPI.h: Added.
  • WebView/WebPDFView.mm:

(-[WebPDFView _clipViewForPDFDocumentView]):

11:12 AM WebInspector edited by clopez@igalia.com
(diff)
11:10 AM EnvironmentVariables edited by clopez@igalia.com
(diff)
11:01 AM EnvironmentVariables edited by clopez@igalia.com
(diff)
10:53 AM Changeset in webkit [201757] by Chris Dumez
  • 25 edits
    23 adds in trunk

Implement EventListenerOptions argument to addEventListener
https://bugs.webkit.org/show_bug.cgi?id=149466
<rdar://problem/22802031>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Import new test from W3C that covers EventListenerOptions.

  • web-platform-tests/dom/events/EventListenerOptions-capture-expected.txt: Added.
  • web-platform-tests/dom/events/EventListenerOptions-capture.html: Added.

Source/WebCore:

Implement AddEventListenerOptions dictionary argument to addEventListener()
and EventListenerOptions dictionary argument to removeEventListener(), as
per the latest DOM specification:

Firefox and Chrome already support this.

Support for AddEventListenerOptions in this patch is as follows:

  • 'capture': fully supported.
  • 'once': fully supported.
  • 'passive': supported in the sense that preventDefault() will be ignored

for passive event listeners. There are however currently no
performance benefits from passing this flag. Those optimizations
will be implemented in follow-up patches (in particular for
Touch and Scroll events).

Tests: fast/events/AddEventListenerOptions-once-recursive.html

fast/events/AddEventListenerOptions-once.html
fast/events/AddEventListenerOptions-passive.html
fast/events/removeEventListener-EventListenerOptions-capture.html
imported/w3c/web-platform-tests/dom/events/EventListenerOptions-capture.html

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::addEventListener):
(WebCore::AudioScheduledSourceNode::removeEventListener):

  • Modules/webaudio/AudioScheduledSourceNode.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::addEventListener):
(WebCore::ScriptProcessorNode::removeEventListener):

  • Modules/webaudio/ScriptProcessorNode.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheckExpression):

  • dom/Event.h:

(WebCore::Event::preventDefault):
(WebCore::Event::setInPassiveListener):

  • dom/EventListenerMap.cpp:

(WebCore::addListenerToVector):
(WebCore::EventListenerMap::add):

  • dom/EventListenerMap.h:
  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::fireEventListeners):

  • dom/EventTarget.h:

(WebCore::EventTarget::ListenerOptions::ListenerOptions):
(WebCore::EventTarget::AddEventListenerOptions::AddEventListenerOptions):
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):

  • dom/EventTarget.idl:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::addEventListener):

  • dom/MessagePort.h:
  • dom/Node.cpp:

(WebCore::tryAddEventListener):
(WebCore::Node::addEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):

  • dom/Node.h:
  • dom/RegisteredEventListener.h:

(WebCore::RegisteredEventListener::Options::Options):
(WebCore::RegisteredEventListener::RegisteredEventListener):
(WebCore::operator==):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::removeEventListener):

  • html/HTMLMediaElement.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):

  • page/DOMWindow.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::addEventListener):
(WebCore::SVGElement::removeEventListener):

  • svg/SVGElement.h:

LayoutTests:

  • fast/events/AddEventListenerOptions-once-expected.txt: Added.
  • fast/events/AddEventListenerOptions-once-recursive-expected.txt: Added.
  • fast/events/AddEventListenerOptions-once-recursive.html: Added.
  • fast/events/AddEventListenerOptions-once.html: Added.
  • fast/events/AddEventListenerOptions-passive-expected.txt: Added.
  • fast/events/AddEventListenerOptions-passive.html: Added.
  • fast/events/removeEventListener-EventListenerOptions-capture-expected.txt: Added.
  • fast/events/removeEventListener-EventListenerOptions-capture.html: Added.

Add layout testing coverage for various aspects of the functionality.

  • imported/blink/fast/events/eventlisteneroptions/capture_default-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_default.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_equality-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_equality.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_query-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_query.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_dispatch-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_dispatch.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_inequality-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_inequality.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_query-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_query.html: Added.

Import blink tests for this functionality.

10:23 AM Changeset in webkit [201756] by Yusuke Suzuki
  • 4 edits
    6 adds in trunk/Source

[JSC] Do not allocate unnecessary UTF-8 string for encodeXXX functions
https://bugs.webkit.org/show_bug.cgi?id=158416

Reviewed by Darin Adler and Geoffrey Garen.

Source/JavaScriptCore:

Previously, encodeXXX functions first allocate new UTF-8 string, and generate (& allocate) the results from this UTF-8 string.
It is costly since this UTF-8 string is always wasted. In this patch, we generate the results without this UTF-8 string.
We precisely implement ECMA262's Encode abstract operation[1].

This optimized encodeXXX functions provide great improvement in kraken stanford-crypto-sha256-iterative since it frequently calls
these functions. We can see 6 - 7% improvements.

baseline patched

stanford-crypto-sha256-iterative 37.952+-0.155 35.484+-0.265 definitely 1.0695x faster

[1]: https://tc39.github.io/ecma262/#sec-encode

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::toSafeView):
Use this helper function to retrieve JSString::SafeView.

(JSC::makeCharacterBitmap):
(JSC::encode):
In encode, we reserve N length buffer at first. This is important when the length of the given string is long enough,
preventing frequent unnecessary buffer reallocations. This reserving contributes to 1% kraken stanford-crypto-sha256-iterative progression.

(JSC::decode):
Previously, Bitmap accidentally includes \0. And instead of removing this \0, we checked character != 0.
This patch fixes it for the Bitmap not to include \0.

(JSC::globalFuncParseInt):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):

  • tests/stress/encode-decode-ascii.js: Added.

(shouldBe):

  • tests/stress/encode-decode-unicode.js: Added.

(shouldBe):
(isLowSurrogate):
(isHighSurrogate):
(isSurrogate):

  • tests/stress/encode-decode-uri-component-surrogates.js: Added.

(shouldBe):
(toHighSurrogate):
(toLowSurrogate):

  • tests/stress/encode-decode-uri-surrogates.js: Added.

(shouldBe):
(toHighSurrogate):
(toLowSurrogate):

  • tests/stress/encode-decode-zero.js: Added.

(shouldBe):

  • tests/stress/escape-unescape-surrogates.js: Added.

(shouldBe):
(toHighSurrogate):
(toLowSurrogate):

Source/WTF:

  • wtf/Bitmap.h:

(WTF::Bitmap::size):
(WTF::WordType>::Bitmap):
(WTF::WordType>::get):
(WTF::WordType>::set):
(WTF::WordType>::testAndSet):
(WTF::WordType>::testAndClear):
(WTF::WordType>::concurrentTestAndSet):
(WTF::WordType>::concurrentTestAndClear):
(WTF::WordType>::clear):
(WTF::WordType>::clearAll):
(WTF::WordType>::nextPossiblyUnset):
(WTF::WordType>::findRunOfZeros):
(WTF::WordType>::count):
(WTF::WordType>::isEmpty):
(WTF::WordType>::isFull):

9:37 AM Changeset in webkit [201755] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[GTK] Include locale.h before using LC_ALL
https://bugs.webkit.org/show_bug.cgi?id=158470

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2016-06-07
Reviewed by Darin Adler.

  • jsc.cpp:
9:19 AM Changeset in webkit [201754] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Unskip generator related stress tests
https://bugs.webkit.org/show_bug.cgi?id=158461

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-07
Reviewed by Darin Adler.

  • tests/stress/generator-methods.js:
  • tests/stress/generator-syntax.js:
  • tests/stress/yield-and-line-terminator.js:
  • tests/stress/yield-label-generator.js:
  • tests/stress/yield-named-accessors-generator.js:
  • tests/stress/yield-named-variable-generator.js:
  • tests/stress/yield-out-of-generator.js:
8:47 AM Changeset in webkit [201753] by Brent Fulgham
  • 23 edits
    64 adds in trunk

CSP: Content Security Policy directive, upgrade-insecure-requests (UIR)
https://bugs.webkit.org/show_bug.cgi?id=143653
<rdar://problem/23032067>

Reviewed by Andy Estes.

Source/WebCore:

Modify our loading logic so that we recognize and upgrade insecure requests to secure
requests if the Content Security Policy directive 'upgrade-insecure-requests' is
present.

Add a static helper function to ContentSecurityPolicy to upgrade insecure URLs so
that we don't have to sprinkle the same code all over the loader system.

Tests: http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure.php

http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade.https.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-auxiliary.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-nested.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-subresource.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-top-level.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-open-window-upgrades.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-image-in-main-frame.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-simple-ws.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-xhr-in-main-frame.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrades-mixed-content.html
http/tests/ssl/iframe-upgrade.https.html
http/tests/ssl/upgrade-origin-usage.html
http/tests/websocket/tests/hybi/upgrade-simple-ws.html

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Upgrade insecure requests if the CSP
indicates we should.

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Populate new document CSP with sets of upgrade host and port combinations.

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestScript): Upgrade insecure requests if
the CSP indicates we should.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource): Ditto.

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin): Ditto.

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create): Ditto.
(WebCore::FormSubmission::populateFrameLoadRequest): Add "Upgrade-Insecure-Requests"
header to frame load requests.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::addExtraFieldsToMainResourceRequest): Add the
'Update-Insecure-Requests' header field if necessary.
(WebCore::FrameLoader::addHTTPUpgradeInsecureRequestsIfNeeded): Added helper function.
(WebCore::FrameLoader::loadPostRequest): Upgrade insecure requests if the CSP
indicates we should.
(WebCore::FrameLoader::loadResourceSynchronously): Ditto.
(WebCore::FrameLoader::loadDifferentDocumentItem): If loading a form, add the
'Update-Insecure-Requests' header field if necessary.
(WebCore::createWindow): Upgrade insecure requests if the CSP
indicates we should.

  • loader/FrameLoader.h:
  • loader/PingLoader.cpp:

(WebCore::PingLoader::loadImage): Upgrade insecure requests if the CSP
indicates we should.
(WebCore::PingLoader::sendPing): Ditto.
(WebCore::PingLoader::sendViolationReport): Ditto.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal): Ditto.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::requestFrame): Ditto.
(WebCore::SubframeLoader::requestObject): Ditto.

  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache): Ditto.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestImage): Ditto.
(WebCore::CachedResourceLoader::requestResource): Ditto.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow): Add the 'Update-Insecure-Requests' header
field if necessary.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::copyStateFrom): Populate upgraded resource set
from other context.
(WebCore::ContentSecurityPolicy::upgradeInsecureRequestIfNeeded): Added helper function
to upgrade requests when the upgrade-insecure-requests CSP policy is present, or if
the host and port combination have previously been upgraded.
(WebCore::ContentSecurityPolicy::upgradeInsecureNavigationRequestIfNeeded): Added
helper function to upgrade requests that have been previously upgraded. Cross-site
navigations only get upgraded when they have been previously upgraded.
(WebCore::ContentSecurityPolicy::addInsecureNavigationRequestsToUpgrade): Added.
(WebCore::ContentSecurityPolicy::populateInsecureNavigationRequestsToUpgradeFromOther): Added.

  • page/csp/ContentSecurityPolicy.h:

(WebCore::ContentSecurityPolicy::setUpgradeInsecureRequests): Added.
(WebCore::ContentSecurityPolicy::upgradeInsecureRequests): Added.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::ContentSecurityPolicyDirectiveList): Use
more C++11 initializations.
(WebCore::ContentSecurityPolicyDirectiveList::setUpgradeInsecureRequests): Added.
(WebCore::ContentSecurityPolicyDirectiveList::addDirective): Teach this function to
recognize the new directive.

  • page/csp/ContentSecurityPolicyDirectiveList.h:
  • page/csp/ContentSecurityPolicyDirectiveNames.cpp:
  • page/csp/ContentSecurityPolicyDirectiveNames.h:
  • platform/network/HTTPHeaderNames.in: Add new 'Upgrade-Insecure-Requests' header field.
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::open): Upgrade insecure requests if the CSP if needed.

LayoutTests:

Some of these tests are based on a set of Blink patches by Mike West <mkwst@chromium.org>.
<https://src.chromium.org/viewvc/blink?revision=192607&view=revision>,
<https://codereview.chromium.org/1178093002>, <https://codereview.chromium.org/1964303003>

The rest of them are based on our own mixedContent tests, revised for upgraded requests.

Note that WebSockets are not part of this testing at present due to https://bugs.webkit.org/show_bug.cgi?id=157884.

  • http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure.php: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade.https-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade.https.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-auxiliary-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-auxiliary.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-nested-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-nested.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-subresource-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-subresource.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-top-level-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/https-header-top-level.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-open-window-upgrades-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-open-window-upgrades.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/basic-upgrade-cors.https.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/check-https-header.pl: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/echo-https-header.pl: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-insecure-audio-video.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-insecure-css.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-insecure-image.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-redirect-http-to-https-script.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/frame-with-redirect-https-to-http-script.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/insecure-xhr-in-main-frame-window.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/mixed-content-with-upgrade.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/resources/post-https-header.pl: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-image-in-main-frame-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-image-in-main-frame.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-xhr-in-main-frame-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-xhr-in-main-frame.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe.html: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrades-mixed-content-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrades-mixed-content.html: Added.
  • http/tests/security/resources/post-origin-to-parent.html: Added.
  • http/tests/ssl/iframe-upgrade.https-expected.txt: Added.
  • http/tests/ssl/iframe-upgrade.https.html: Added.
  • http/tests/ssl/upgrade-origin-usage-expected.txt: Added.
  • http/tests/ssl/upgrade-origin-usage.html: Added.
  • http/tests/ssl/resources/origin-usage-iframe-1.html: Added.
  • http/tests/ssl/resources/origin-usage-iframe-1.manifest: Added.
  • http/tests/ssl/resources/origin-usage-iframe-2.html: Added.
  • http/tests/ssl/resources/origin-usage-iframe-2.manifest: Added.
  • http/tests/websocket/tests/hybi/upgrade-simple-ws-expected.txt: Added.
  • http/tests/websocket/tests/hybi/upgrade-simple-ws.html: Added.
  • TestExpectations: Skip http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-simple-ws.html since the

WebSocket server does not currently support wss sockets.

8:03 AM Changeset in webkit [201752] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Video elements are painted twice, in PaintPhaseForeground and PaintPhaseSelfOutline
https://bugs.webkit.org/show_bug.cgi?id=158247

Patch by Fujii Hironori <Fujii Hironori> on 2016-06-07
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/replaced/outline-replaced-elements-offset.html

In <http://trac.webkit.org/changeset/105247>,
RenderReplaced::paint was changed to call
RenderReplaced::paintReplaced in PaintPhaseOutline and
PaintPhaseSelfOutline to paint outline of SVG.

As the result, RenderVideo::paintReplaced paints twice,
in forground and outline phase.

It was changed to paint outline of SVG in PaintPhaseForeground
since <http://trac.webkit.org/changeset/168645>. No need to call
RenderReplaced::paintReplaced in outline phases anymore.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::paint): Return early if
PaintPhaseOutline or PaintPhaseSelfOutline.
Return early unless PaintPhaseForeground nor PaintPhaseSelection,
even if canHaveChildren().

LayoutTests:

  • fast/replaced/outline-replaced-elements-offset-expected.html: Added.
  • fast/replaced/outline-replaced-elements-offset.html: Added.
7:32 AM Changeset in webkit [201751] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

[GTK] Mark fast/text/international/system-language/han-quotes.html as flaky

Unreviewed gardening

  • platform/gtk/TestExpectations:
7:22 AM Changeset in webkit [201750] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit

[Mac][cmake] Unreviewed trivial buildfix after r201689. Just for fun.

  • PlatformMac.cmake:
7:12 AM Changeset in webkit [201749] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit2

[GTK] Hide GTK+ 2 plugins if GTK+ 2 plugin process was built but is not installed
https://bugs.webkit.org/show_bug.cgi?id=158419

Reviewed by Carlos Garcia Campos.

  • UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:

(WebKit::PluginInfoStore::getPluginInfo):

  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:

(WebKit::PluginProcessProxy::scanPlugin):

5:43 AM Changeset in webkit [201748] by peavo@outlook.com
  • 2 edits in trunk/Source/WebKit/win

[Win][IndexedDB] Crash when running worker test.
https://bugs.webkit.org/show_bug.cgi?id=158434

Reviewed by Alex Christensen.

Initialize main runloop, otherwise RunLoop::main() will return nullptr.

  • WebView.cpp:

(WebView::WebView):

3:06 AM Changeset in webkit [201747] by nael.ouedraogo@crf.canon.fr
  • 8 edits in trunk

Creating a TouchList with non Touch items should throw an exception
https://bugs.webkit.org/show_bug.cgi?id=158302

Reviewed by Youenn Fablet.

Source/WebCore:

Only Touch items should be passed to CreateTouchList function as per specification
(https://w3c.github.io/touch-events/#extensions-to-the-document-interface).
CreateTouchList function behavior is modified. An exception is thrown when non Touch items
are passed as parameters instead of adding null items in the TouchList.

Tests have been modified to check whether behavior of CreateTouchList is correct.

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::createTouchList):

  • dom/Document.idl:

LayoutTests:

Only Touch items should be passed to CreateTouchList function as
per specification (https://w3c.github.io/touch-events/#extensions-to-the-document-interface).

Tests have been modified to check whether behavior of CreateTouchList is correct.

  • fast/events/touch/document-create-touch-list-crash-expected.txt:
  • fast/events/touch/document-create-touch-list-expected.txt:
  • fast/events/touch/script-tests/document-create-touch-list-crash.js:
  • fast/events/touch/script-tests/document-create-touch-list.js:
1:33 AM Changeset in webkit [201746] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Unskip js/script-tests/class-syntax-scoping.js
https://bugs.webkit.org/show_bug.cgi?id=158458

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-07
Reviewed by Ryosuke Niwa.

  • js/script-tests/class-syntax-scoping.js:

Jun 6, 2016:

11:33 PM Changeset in webkit [201745] by commit-queue@webkit.org
  • 1 edit
    1 move in trunk/Source/JavaScriptCore

Fix typo in test name trailing-comma-in-function-paramters.js
https://bugs.webkit.org/show_bug.cgi?id=158462

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-06
Reviewed by Mark Lam.

  • tests/stress/trailing-comma-in-function-parameters.js: Renamed from Source/JavaScriptCore/tests/stress/trailing-comma-in-function-paramters.js.
11:32 PM Changeset in webkit [201744] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

ASSERTION failed in get-by-pname.js when run with JSC_useLLINT=false and 2 other configurations
https://bugs.webkit.org/show_bug.cgi?id=138497
<rdar://problem/18909792>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-06
Reviewed by Mark Lam.

  • js/script-tests/get-by-pname.js:

Test is no longer failing. Lets unskip.

11:06 PM Changeset in webkit [201743] by commit-queue@webkit.org
  • 25 edits
    11 deletes in trunk

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

fast/events/AddEventListenerOptions-once-recursive.html fails
on all bots (Requested by ap on #webkit).

Reverted changeset:

"Implement EventListenerOptions argument to addEventListener"
https://bugs.webkit.org/show_bug.cgi?id=149466
http://trac.webkit.org/changeset/201735

11:05 PM Changeset in webkit [201742] by commit-queue@webkit.org
  • 22 edits
    14 deletes in trunk

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

http/tests/websocket/tests/hybi/upgrade-simple-ws.html is
flaky (Requested by ap on #webkit).

Reverted changeset:

"CSP: Content Security Policy directive, upgrade-insecure-
requests (UIR)"
https://bugs.webkit.org/show_bug.cgi?id=143653
http://trac.webkit.org/changeset/201679

10:54 PM Changeset in webkit [201741] by akling@apple.com
  • 6 edits in trunk/Source

REGRESSION(r197595): 2% JSBench regression on iPhone 5.
<https://webkit.org/b/158459>

Unreviewed rollout.

  • runtime/VM.cpp:

(JSC::VM::deleteAllRegExpCode): Deleted.

  • runtime/VM.h:
10:46 PM Changeset in webkit [201740] by jiewen_tan@apple.com
  • 25 edits
    2 adds in trunk

URLs containing tabs or newlines are parsed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=143381
<rdar://problem/26567214>

Reviewed by Brent Fulgham.

Source/WebCore:

  1. Strip any tabs and newlines in the URL input.
  2. Replace the original stripping URL leading and trailing white spaces logic with WTFString's

builtin, and move this logic to the very begining of the URL parser.

  1. Enhance the protocolIs method to ignore any leading whitespace/control characters, and

tabs/newlines of the examining url.

Test: fast/url/tab-and-newline-stripping.html

  • platform/URL.cpp:

(WebCore::isTabNewline):
(WebCore::shouldTrimFromURL):
(WebCore::URL::init):
(WebCore::protocolIs):

LayoutTests:

  • fast/dom/DOMURL/set-href-attribute-host-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-host.html:
  • fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js:
  • fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt:
  • fast/url/segments-expected.txt:
  • fast/url/segments-from-data-url-expected.txt:
  • fast/url/segments-from-data-url.html:
  • fast/url/segments.html:
  • fast/url/tab-and-newline-stripping-expected.txt: Added.
  • fast/url/tab-and-newline-stripping.html: Added.
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode-expected.txt:
  • http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS-expected.txt:
  • http/tests/security/xssAuditor/javascript-link-control-char2-expected.txt:
9:02 PM Changeset in webkit [201739] by rniwa@webkit.org
  • 27 edits in trunk

Update the list of elements attachShadow is allowed
https://bugs.webkit.org/show_bug.cgi?id=157706

Reviewed by Darin Adler.

Source/WebCore:

Update the list of elements on which attachShadow is allowed per the latest shadow DOM spec:
http://www.w3.org/TR/shadow-dom/#widl-Element-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict
which now only allows attachShadow on the following elements and custom elements:
button, details, input, marquee, meter, progress, select, textarea, keygen

In order to check that a given HTML element's local name is a valid custom element name,
this patch moves CustomElementDefinitions::checkName to Document::validateCustomElementName so that
it could be used when either SHADOW_DOM or CUSTOM_ELEMENTS build flag is turned on.

Also removed Element::canHaveUserAgentShadowRoot since it was only used in Element::attachShadow.

Test: fast/shadow-dom/Element-interface-attachShadow.html

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::defineElement):

  • dom/CustomElementDefinitions.cpp:

(WebCore::CustomElementDefinitions::checkName): Moved to Document::validateCustomElementName.

  • dom/CustomElementDefinitions.h:
  • dom/Document.cpp:

(WebCore::createHTMLElementWithNameValidation):
(WebCore::createFallbackHTMLElement):
(WebCore::Document::validateCustomElementName): Moved from CustomElementDefinitions::checkName.

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::canAttachAuthorShadowRoot): Added.
(WebCore::Element::attachShadow):

  • dom/Element.h:
  • html/HTMLButtonElement.h:
  • html/HTMLDetailsElement.h:
  • html/HTMLInputElement.h:
  • html/HTMLKeygenElement.h:
  • html/HTMLMarqueeElement.h:
  • html/HTMLMediaElement.h:
  • html/HTMLMeterElement.h:
  • html/HTMLPlugInElement.h:
  • html/HTMLProgressElement.h:
  • html/HTMLQuoteElement.h:
  • html/HTMLSelectElement.h:
  • html/HTMLSummaryElement.h:
  • html/HTMLTagNames.in:
  • html/HTMLTextAreaElement.h:
  • html/HTMLUnknownElement.h:
  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):

LayoutTests:

Added more test cases for validating elements on which attachShadow is allowed and disallowed.

  • fast/shadow-dom/Element-interface-attachShadow-expected.txt:
  • fast/shadow-dom/Element-interface-attachShadow.html:
8:24 PM Changeset in webkit [201738] by sbarati@apple.com
  • 2 edits in trunk/Source/WTF

equal(StringView, StringView) for strings should have a fast path for pointer equality
https://bugs.webkit.org/show_bug.cgi?id=158452

Reviewed by Andreas Kling.

JSBench does a lot of StringView::operator== on StringViews that have
the same underlying characters pointer. This becomes hot inside JSBench
because JSBench heavily stresses JSC's UnlinkedCodeCache with a high
hit rate. This means that when we get a hit in the cache, we used to
do the long form of string compare. However, we were often comparing
two StringViews that had the same underlying buffer and length.
This patch speeds this case up to run in constant time instead of
linear time.

  • wtf/text/StringCommon.h:

(WTF::equalCommon):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::StringImpl):
(WTF::StringImpl::data):

  • wtf/text/StringView.h:

(WTF::StringView::data):

8:02 PM Changeset in webkit [201737] by msaboff@apple.com
  • 2 edits
    1 add in trunk/Source/JavaScriptCore

octal and binary parsing is wrong for some programs
https://bugs.webkit.org/show_bug.cgi?id=158437

Reviewed by Saam Barati.

When there is an error parsing an binary or octal literal, we need to clear the returnValue
of any residual value. This is because the processing of returnValue happens before the
syntax check for the extra character. Without clearing returnValue, we end trying to
categorize the value as an INTEGER or DOUBLE token. If the value happens to be an
impure NaN, we ASSERT.

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseBinary):
(JSC::Lexer<T>::parseOctal):

  • tests/stress/regress-158437.js: New test.
7:40 PM Changeset in webkit [201736] by rniwa@webkit.org
  • 5 edits
    2 adds in trunk

Crash inside moveOutOfAllShadowRoots
https://bugs.webkit.org/show_bug.cgi?id=158378

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by InShadowTreeFlag not being cleared when a shadow host or its ancestor was removed
due to addChildNodesToDeletionQueue not invoking notifyChildNodeRemoved when a node was in a shadow tree
but not in a document.

Fixed the bug by invoking notifyChildNodeRemoved when the removed node is either in a shadow tree
or it's in a shadow tree. Also fixed a bug in VTTCue::~VTTCue that it was trying to remove the display
tree even when the owner document was being destroyed. This results in various assertions to be hit.

Test: fast/shadow-dom/shadow-host-removal-crash.html

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::addChildNodesToDeletionQueue):

  • html/track/VTTCue.cpp:

(WebCore::VTTCue::~VTTCue):

LayoutTests:

Added a regression test that reproduced the crash reliably at least on my machine.

  • fast/shadow-dom/shadow-host-removal-crash-expected.txt: Added.
  • fast/shadow-dom/shadow-host-removal-crash.html: Added.
  • platform/ios-simulator/TestExpectations:
7:35 PM Changeset in webkit [201735] by Chris Dumez
  • 25 edits
    23 adds in trunk

Implement EventListenerOptions argument to addEventListener
https://bugs.webkit.org/show_bug.cgi?id=149466
<rdar://problem/22802031>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Import new test from W3C that covers EventListenerOptions.

  • web-platform-tests/dom/events/EventListenerOptions-capture-expected.txt: Added.
  • web-platform-tests/dom/events/EventListenerOptions-capture.html: Added.

Source/WebCore:

Implement AddEventListenerOptions dictionary argument to addEventListener()
and EventListenerOptions dictionary argument to removeEventListener(), as
per the latest DOM specification:

Firefox and Chrome already support this.

Support for AddEventListenerOptions in this patch is as follows:

  • 'capture': fully supported.
  • 'once': fully supported.
  • 'passive': supported in the sense that preventDefault() will be ignored

for passive event listeners. There are however currently no
performance benefits from passing this flag. Those optimizations
will be implemented in follow-up patches (in particular for
Touch and Scroll events).

Tests: fast/events/AddEventListenerOptions-once-recursive.html

fast/events/AddEventListenerOptions-once.html
fast/events/AddEventListenerOptions-passive.html
fast/events/removeEventListener-EventListenerOptions-capture.html
imported/w3c/web-platform-tests/dom/events/EventListenerOptions-capture.html

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::addEventListener):
(WebCore::AudioScheduledSourceNode::removeEventListener):

  • Modules/webaudio/AudioScheduledSourceNode.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::addEventListener):
(WebCore::ScriptProcessorNode::removeEventListener):

  • Modules/webaudio/ScriptProcessorNode.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheckExpression):

  • dom/Event.h:

(WebCore::Event::preventDefault):
(WebCore::Event::setInPassiveListener):

  • dom/EventListenerMap.cpp:

(WebCore::addListenerToVector):
(WebCore::EventListenerMap::add):

  • dom/EventListenerMap.h:
  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::fireEventListeners):

  • dom/EventTarget.h:

(WebCore::EventTarget::ListenerOptions::ListenerOptions):
(WebCore::EventTarget::AddEventListenerOptions::AddEventListenerOptions):
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):

  • dom/EventTarget.idl:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::addEventListener):

  • dom/MessagePort.h:
  • dom/Node.cpp:

(WebCore::tryAddEventListener):
(WebCore::Node::addEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):

  • dom/Node.h:
  • dom/RegisteredEventListener.h:

(WebCore::RegisteredEventListener::Options::Options):
(WebCore::RegisteredEventListener::RegisteredEventListener):
(WebCore::operator==):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::removeEventListener):

  • html/HTMLMediaElement.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):

  • page/DOMWindow.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::addEventListener):
(WebCore::SVGElement::removeEventListener):

  • svg/SVGElement.h:

LayoutTests:

  • fast/events/AddEventListenerOptions-once-expected.txt: Added.
  • fast/events/AddEventListenerOptions-once-recursive-expected.txt: Added.
  • fast/events/AddEventListenerOptions-once-recursive.html: Added.
  • fast/events/AddEventListenerOptions-once.html: Added.
  • fast/events/AddEventListenerOptions-passive-expected.txt: Added.
  • fast/events/AddEventListenerOptions-passive.html: Added.
  • fast/events/removeEventListener-EventListenerOptions-capture-expected.txt: Added.
  • fast/events/removeEventListener-EventListenerOptions-capture.html: Added.

Add layout testing coverage for various aspects of the functionality.

  • imported/blink/fast/events/eventlisteneroptions/capture_default-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_default.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_equality-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_equality.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_query-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_query.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_dispatch-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_dispatch.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_inequality-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_inequality.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_query-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_query.html: Added.

Import blink tests for this functionality.

5:36 PM Changeset in webkit [201734] by Ryan Haddad
  • 25 edits
    11 deletes in trunk

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

This change caused existing LayoutTests to crash (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"Implement EventListenerOptions argument to addEventListener"
https://bugs.webkit.org/show_bug.cgi?id=149466
http://trac.webkit.org/changeset/201730

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-06

5:00 PM Changeset in webkit [201733] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

32-bit JSC stress test failing: stress/recursive-try-catch.js.ftl-no-cjit-validate-sampling-profiler
https://bugs.webkit.org/show_bug.cgi?id=158362

Reviewed by Michael Saboff.

The test does infinite recursion until it overflows the stack. That means the
sampling profiler will have to capture excessively large samples, which in turn
makes it run very slowly. This is what causes the test time out.

The fix is to not run the test with the sampling profiler.

  • tests/stress/recursive-try-catch.js:
4:38 PM Changeset in webkit [201732] by akling@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Don't reportAbandonedObjectGraph() after throwing out linked code or RegExps.
<https://webkit.org/b/158444>

Unreviewed.

This is a speculative change for iOS performance bots. The calls to reportAbandonedObjectGraph
were basically redundant, since mainframe navigation will cause GC acceleration anyway via
ScriptController.

This appears successful at recovering the ~0.7% regression I could reproduce locally on newer
hardware but it's a bit too noisy to say for sure.

  • runtime/VM.cpp:

(JSC::VM::deleteAllLinkedCode):
(JSC::VM::deleteAllRegExpCode):

3:33 PM Changeset in webkit [201731] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/misc/slow-loading-animated-image.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=157916

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
3:28 PM Changeset in webkit [201730] by Chris Dumez
  • 25 edits
    23 adds in trunk

Implement EventListenerOptions argument to addEventListener
https://bugs.webkit.org/show_bug.cgi?id=149466
<rdar://problem/22802031>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Import new test from W3C that covers EventListenerOptions.

  • web-platform-tests/dom/events/EventListenerOptions-capture-expected.txt: Added.
  • web-platform-tests/dom/events/EventListenerOptions-capture.html: Added.

Source/WebCore:

Implement AddEventListenerOptions dictionary argument to addEventListener()
and EventListenerOptions dictionary argument to removeEventListener(), as
per the latest DOM specification:

Firefox and Chrome already support this.

Support for AddEventListenerOptions in this patch is as follows:

  • 'capture': fully supported.
  • 'once': fully supported.
  • 'passive': supported in the sense that preventDefault() will be ignored

for passive event listeners. There are however currently no
performance benefits from passing this flag. Those optimizations
will be implemented in follow-up patches (in particular for
Touch and Scroll events).

Tests: fast/events/AddEventListenerOptions-once-recursive.html

fast/events/AddEventListenerOptions-once.html
fast/events/AddEventListenerOptions-passive.html
fast/events/removeEventListener-EventListenerOptions-capture.html
imported/w3c/web-platform-tests/dom/events/EventListenerOptions-capture.html

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::addEventListener):
(WebCore::AudioScheduledSourceNode::removeEventListener):

  • Modules/webaudio/AudioScheduledSourceNode.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::addEventListener):
(WebCore::ScriptProcessorNode::removeEventListener):

  • Modules/webaudio/ScriptProcessorNode.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheckExpression):

  • dom/Event.h:

(WebCore::Event::preventDefault):
(WebCore::Event::setInPassiveListener):

  • dom/EventListenerMap.cpp:

(WebCore::addListenerToVector):
(WebCore::EventListenerMap::add):

  • dom/EventListenerMap.h:
  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::fireEventListeners):

  • dom/EventTarget.h:

(WebCore::EventTarget::ListenerOptions::ListenerOptions):
(WebCore::EventTarget::AddEventListenerOptions::AddEventListenerOptions):
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::addEventListenerForBindings):
(WebCore::EventTarget::removeEventListenerForBindings):

  • dom/EventTarget.idl:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::addEventListener):

  • dom/MessagePort.h:
  • dom/Node.cpp:

(WebCore::tryAddEventListener):
(WebCore::Node::addEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):

  • dom/Node.h:
  • dom/RegisteredEventListener.h:

(WebCore::RegisteredEventListener::Options::Options):
(WebCore::RegisteredEventListener::RegisteredEventListener):
(WebCore::operator==):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::removeEventListener):

  • html/HTMLMediaElement.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):

  • page/DOMWindow.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::addEventListener):
(WebCore::SVGElement::removeEventListener):

  • svg/SVGElement.h:

LayoutTests:

  • fast/events/AddEventListenerOptions-once-expected.txt: Added.
  • fast/events/AddEventListenerOptions-once-recursive-expected.txt: Added.
  • fast/events/AddEventListenerOptions-once-recursive.html: Added.
  • fast/events/AddEventListenerOptions-once.html: Added.
  • fast/events/AddEventListenerOptions-passive-expected.txt: Added.
  • fast/events/AddEventListenerOptions-passive.html: Added.
  • fast/events/removeEventListener-EventListenerOptions-capture-expected.txt: Added.
  • fast/events/removeEventListener-EventListenerOptions-capture.html: Added.

Add layout testing coverage for various aspects of the functionality.

  • imported/blink/fast/events/eventlisteneroptions/capture_default-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_default.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_equality-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_equality.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_query-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/capture_query.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_dispatch-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_dispatch.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_inequality-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_inequality.html: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_query-expected.txt: Added.
  • imported/blink/fast/events/eventlisteneroptions/passive_query.html: Added.

Import blink tests for this functionality.

2:47 PM Changeset in webkit [201729] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Media elements should only be allowed to control controls manager during a user gesture.
https://bugs.webkit.org/show_bug.cgi?id=158432

Reviewed by Eric Carlson.

Add a new MediaElementSession behavior restriction for the controls manager
which is cleared on the first user gesture. Since canControlControlsManager()
may be called before the first layout, call updatePlaybackControlsManager()
since the main content check requires the laid-out size of the media element.

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::layoutSizeChanged):
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):

  • html/HTMLMediaElement.h:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::canControlControlsManager):

  • html/MediaElementSession.h:
2:40 PM Changeset in webkit [201728] by adam.bergkvist@ericsson.com
  • 11 edits
    1 add in trunk

WebRTC: Update MediaEndpointPeerConnection::createOffer() to use the transceiver set
https://bugs.webkit.org/show_bug.cgi?id=158203

Reviewed by Eric Carlson.

Source/WebCore:

Create an SDP offer based on the RTCPeerConnection object's set of RTCRtpTransceiver objects
(instead of RTCRtpSender objects).

Updated existing test: fast/mediastream/RTCPeerConnection-inspect-offer.html

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::matchTransceiver):
(WebCore::matchTransceiverByMid):
(WebCore::MediaEndpointPeerConnection::createOfferTask):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:

Remove getSenders() which is replaced by getTransceivers().

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/SDPProcessor.cpp:

(WebCore::configurationFromJSON):
(WebCore::configurationToJSON):

  • Modules/mediastream/sdp.js:

(SDP.parse):
(SDP.generate):
Add support for mid attribute.

  • platform/mediastream/PeerMediaDescription.h:

(WebCore::PeerMediaDescription::mid):
(WebCore::PeerMediaDescription::setMid):
(WebCore::PeerMediaDescription::clone):

LayoutTests:

Updated existing test.

  • fast/mediastream/RTCPeerConnection-inspect-offer-expected.txt:
  • fast/mediastream/RTCPeerConnection-inspect-offer.html:

Add verification of mid attribute [1] (corresponds to the RTCRtpTransceiver mid attribute).
[1] https://tools.ietf.org/html/rfc5888

  • fast/mediastream/resources/sdp-utils.js: Added.

(printComparableSessionDescription):
(verified):
(match):
Move the printComparableSessionDescription function to a separate file
to make it usable in other (future) tests.

1:58 PM Changeset in webkit [201727] by commit-queue@webkit.org
  • 4 edits
    6 adds in trunk

Position of WebGL <canvas> on iOS is incorrect with CSS borders
https://bugs.webkit.org/show_bug.cgi?id=156790

Patch by Antoine Quint <Antoine Quint> on 2016-06-06
Reviewed by Simon Fraser.

Source/WebKit2:

WebGL layers on iOS are hosted by a WKRemoteView, which applies a transform scaling
its content by the inverse of the device pixel ratio, which affects how positions are
applied to the WebGL layer. The container layer of the layer hosted by a WKRemoteView
then has an inverse transform applied to it in the PlatformCALayerRemoteCustom
constructor. However, the position of a CALayer is not affected by its transform.

The fix for <rdar://problem/18316542> should be specific to video, so we only apply the
scaling in the case of a LayerTypeAVPlayerLayer.

  • UIProcess/ios/RemoteLayerTreeHostIOS.mm:

(-[WKRemoteView initWithFrame:contextID:]):
(WebKit::RemoteLayerTreeHost::createLayer):
(-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Deleted.

  • WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:

(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):

LayoutTests:

Adding new tests checking that CSS border, box-shadow and padding properties used on a
WebGL <canvas> element correctly affect the position of the WebGL content.

  • webgl/webgl-border-expected.html: Added.
  • webgl/webgl-border.html: Added.
  • webgl/webgl-box-shadow-expected.html: Added.
  • webgl/webgl-box-shadow.html: Added.
  • webgl/webgl-padding-expected.html: Added.
  • webgl/webgl-padding.html: Added.
1:34 PM Changeset in webkit [201726] by clopez@igalia.com
  • 2 edits
    1 add in trunk/Tools

REGRESSION(r201449) [GTK] ARMv7 build fails with libicudata.so.55: cannot open shared object file on gtkdoc-scangobj step.
https://bugs.webkit.org/show_bug.cgi?id=158417

Reviewed by Michael Catanzaro.

The toolchain on armhf (ARMv7) seems unable to properly handle
a shared library that doesn't link with anything.

And libicudata is built by default in this way because it only
contains static data.

That makes icu unusable on armhf because the linker will be
unable to resolve the libicudata dependencies.

Most (if not all) distributions workaround this by linking
libicudata with libc6, which is already a needed dependency for
any of the other icu shared libraries.

So import here the Debian patch fixing this issue. For further
details check https://bugs.debian.org/653457

  • gtk/jhbuild.modules:
  • gtk/patches/icudata-stdlibs.patch: Added.
1:33 PM Changeset in webkit [201725] by gskachkov@gmail.com
  • 6 edits
    1 add in trunk

Source/JavaScriptCore:
[ESNext] Trailing commas in function parameters.
https://bugs.webkit.org/show_bug.cgi?id=158020

Reviewed by Keith Miller.

ESNext allow to add trailing commas in function parameters and function arguments.
Link to spec - https://jeffmo.github.io/es-trailing-function-commas
Example of using - (function (a, b,) { return a + b; })(1,2,);

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFormalParameters):
(JSC::Parser<LexerType>::parseArguments):

  • tests/stress/trailing-comma-in-function-paramters.js: Added.

LayoutTests:
[ESNext] Support trailing commas in function param lists
https://bugs.webkit.org/show_bug.cgi?id=158020

Reviewed by Keith Miller.

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
  • sputnik/Conformance/13_Function_Definition/S13_A5.html:
1:30 PM Changeset in webkit [201724] by commit-queue@webkit.org
  • 16 edits
    21 adds in trunk

Support createPattern(HTMLVideoElement, const String& repetitionType)
https://bugs.webkit.org/show_bug.cgi?id=149984
<rdar://problem/23058823>

Patch by George Ruan <gruan@apple.com> on 2016-06-06
Reviewed by Dean Jackson.

Source/WebCore:

Support functionality for HTMLVideoElement argument for
CanvasRenderingContext2D::createPattern*()

Tests: fast/canvas/canvas-createPattern-video-invalid.html

fast/canvas/canvas-createPattern-video-loading.html
fast/canvas/canvas-createPattern-video-modify.html
http/tests/security/canvas-remote-read-remote-video-allowed-anonymous.html
http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.html
http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
http/tests/security/canvas-remote-read-remote-video-localhost.html
http/tests/security/canvas-remote-read-remote-video-redirect.html
media/video-canvas-createPattern.html

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::createPattern): Implement
functionality of description

  • html/canvas/CanvasRenderingContext2D.h:
  • html/canvas/CanvasRenderingContext2D.idl:

LayoutTests:

  • fast/canvas/canvas-createPattern-video-invalid-expected.txt: Added.
  • fast/canvas/canvas-createPattern-video-invalid.html: Added. Test

behavior when given invalid arguments.

  • fast/canvas/canvas-createPattern-video-loading-expected.txt: Added.
  • fast/canvas/canvas-createPattern-video-loading.html: Added. Tests

behavior before video loaded, right after it's loaded, and after being
played.

  • fast/canvas/canvas-createPattern-video-modify-expected.txt: Added.
  • fast/canvas/canvas-createPattern-video-modify.html: Added. Tests

that modifying the video after calling the createPattern() function
does not affect the pattern rendered or to be rendered.
*
http/tests/security/canvas-remote-read-remote-image-allowed-expected.txt:
Fix typo.
*
http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials-expected.txt:
Fix typo.
*
http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials.html:
Fix typo.

  • http/tests/security/canvas-remote-read-remote-image-allowed.html:

Fix typo.
*
http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin-expected.txt:
Fix typo.
*
http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin.html:
Fix typo.

  • http/tests/security/canvas-remote-read-remote-video-allowed-anonymous-expected.txt: Added.

*
http/tests/security/canvas-remote-read-remote-video-allowed-anonymous.html:
Added. This test will fail as CORS is not implemented for media yet.
Tests that data can be retrieved from canvas even when tainted if CORS
is enabled with anonymous.

  • http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials-expected.txt: Added.

*
http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.html:
Added. This test will fail as CORS is not implemented for media yet.
Tests that data can be retrieved from canvas even when tainted if CORS
is enabled with credentials.

  • http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin-expected.txt: Added.

*
http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html:
Added. Ensures that data cannot be retrieved from a tainted canvas if
no cross origin is enabled.

  • http/tests/security/canvas-remote-read-remote-video-localhost-expected.txt: Added.
  • http/tests/security/canvas-remote-read-remote-video-localhost.html:

Added. Ensures that localhost is blocked like http.

  • http/tests/security/canvas-remote-read-remote-video-redirect-expected.txt: Added.
  • http/tests/security/canvas-remote-read-remote-video-redirect.html:

Added. Ensures that redirects are blocked.

  • http/tests/security/resources/canvas-video-crossorigin.js: Added.

Includes common functions used to test the CORS of canvas for video.
*
http/tests/security/resources/video-cross-origin-allow-credentials.php:
Added. Script that serves test video for
canvas-remote-read-remote-video-allowed-with-credentials.html.

  • media/video-canvas-createPattern-expected.txt: Added.
  • media/video-canvas-createPattern.html: Added. Naive test that

ensures functionality of createPattern() with HTMLVideoElement
argument.

  • platform/ios-simulator-wk1/TestExpectations: Added

canvas-remote-read-remote-video-allowed-anonymous.html and
canvas-remote-read-remote-video-allowed-with-credentials.html.

  • platform/ios-simulator-wk2/TestExpectations: Same as wk1.
  • platform/mac/TestExpectations: Same as wk1.
  • platform/mac/media/video-canvas-createPattern-expected.png: Added.
  • platform/win/TestExpectations: Same as wk1.
  • platform/wk2/TestExpectations: Same as wk1.
1:19 PM Changeset in webkit [201723] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Fix the !ENABLE(SHADOW_DOM) && !ENABLE(DETAILS_ELEMENT) build
https://bugs.webkit.org/show_bug.cgi?id=158347

Reviewed by Chris Dumez.

  • dom/ContainerNode.cpp:

(WebCore::destroyRenderTreeIfNeeded):

1:11 PM Changeset in webkit [201722] by beidson@apple.com
  • 4 edits in trunk/Source/WebKit2

Fix build after r201717

Unreviewed.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs):

  • NetworkProcess/NetworkProcess.h:
12:23 PM Changeset in webkit [201721] by achristensen@apple.com
  • 5 edits in trunk/Source/WebCore

Remove unused ResourceResponse::platformResponseIsUpToDate
https://bugs.webkit.org/show_bug.cgi?id=158424

Reviewed by Brady Eidson.

No change in behavior, just removing unused code that was introduced in r145007.

  • platform/network/cf/ResourceResponse.h:

(WebCore::ResourceResponse::ResourceResponse):
(WebCore::ResourceResponse::platformResponseIsUpToDate): Deleted.

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::ResourceResponse::ResourceResponse):

  • platform/network/curl/ResourceResponse.h:

(WebCore::ResourceResponse::cfURLResponse):
(WebCore::ResourceResponse::platformResponseIsUpToDate): Deleted.

  • platform/network/soup/ResourceResponse.h:

(WebCore::ResourceResponse::soupMessageTLSErrors):
(WebCore::ResourceResponse::setSoupMessageTLSErrors):
(WebCore::ResourceResponse::decode):
(WebCore::ResourceResponse::platformResponseIsUpToDate): Deleted.

12:16 PM Changeset in webkit [201720] by peavo@outlook.com
  • 2 edits in trunk/Tools

REGRESSION (r104174): 500+ tests failing on Windows
https://bugs.webkit.org/show_bug.cgi?id=75965

Reviewed by Michael Catanzaro.

Reset WebView scale factors before running next test.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebViewToConsistentStateBeforeTesting):

12:11 PM Changeset in webkit [201719] by barraclough@apple.com
  • 17 edits in trunk/Source

Deprecate remaining uses of Lookup getStatic*, use HasStaticPropertyTable instead.
https://bugs.webkit.org/show_bug.cgi?id=158178

Reviewed by Darin Adler.

As of bug #158059 most JSC static table property access no longer requires getOwnPropertySlot to be
overridden. Port remaining calls to the getStatic* functions in Lookup.h over to the new mechanism.

Source/JavaScriptCore:

Deprecate getStatic* functions in Lookup.h

  • runtime/Lookup.h:

(JSC::getStaticPropertySlot): Deleted.
(JSC::getStaticFunctionSlot): Deleted.
(JSC::getStaticValueSlot): Deleted.

  • No longer required. Static table access now via JSObject.

Source/WebCore:

Switch WebCore DOM instance bindings to use HasStaticPropertyTable.

  • bindings/js/JSPluginElementFunctions.h:

(WebCore::pluginElementCustomGetOwnPropertySlot):

  • Switch call from getStaticValueSlot to Type::getOwnPropertySlot. For any element where Type::hasStaticPropertyTable is true the HasStaticPropertyTable structure flag will also be set, so Type::getOwnPropertySlot will do the same thing.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateGetOwnPropertySlotBody):

  • If we override getOwnPropertySlot, Base::getOwnPropertySlot will handle property storage & static property lookup.

(InstanceOverridesGetOwnPropertySlot):

  • Instances only override getOwnPropertySlot if the really need to, not just for static property lookup.

(GenerateHeader):

  • Set HasStaticPropertyTable in instance structureFlags, where appropriate.

(GenerateImplementation):

  • GenerateGetOwnPropertySlotBody no longer needs to know if there are static properties.
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/JS/JSattribute.cpp:
  • bindings/scripts/test/JS/JSattribute.h:
    • Updating bindings test results.
11:51 AM Changeset in webkit [201718] by rniwa@webkit.org
  • 9 edits in trunk/Websites/perf.webkit.org

sync-buildbot.js should update the list of tests and platforms associated with a triggerable
https://bugs.webkit.org/show_bug.cgi?id=158406
<rdar://problem/26185737>

Reviewed by Darin Adler.

Added /api/update-triggerable to update the list of configurations (platform and test pairs)
associated with a given triggerable, and make sync-buildbot.js use this JSON API before each
syncing cycle so that the association gets updated automatically by simply updating the JSON.

  • server-tests/api-manifest.js: Use const for imported modules.
  • server-tests/api-report-commits-tests.js: Removed unnecessary importing of crypto.
  • server-tests/resources/mock-data.js:

(MockData.someTestId): Added.
(MockData.somePlatformId): Added.
(MockData.addMockData):

  • server-tests/tools-buildbot-triggerable-tests.js: Use const for imported modules. Also added

a test for BuildbotTriggerable's updateTriggerable.

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable): Added. Find the list of all configurations
associated with this triggeerable and post it to /api/update-triggerable.

  • tools/js/database.js: Added triggerable_configurations to the list of tables.
  • tools/js/remote.js:

(RemoteAPI.prototype.postJSON): Print the whole response when JSON parsing fails for debugging.

  • tools/sync-buildbot.js:

(syncLoop): Call BuildbotTriggerable's updateTriggerable before syncing.

11:38 AM Changeset in webkit [201717] by beidson@apple.com
  • 17 edits in trunk/Source

Modern IDB: Crash seen in IDBConnectionProxy::putOrAdd on GuardMalloc bot
https://bugs.webkit.org/show_bug.cgi?id=158124

Reviewed by Darin Adler.
Source/WebCore:

No new tests (Covered by existing test configurations).

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::putOrAddOnServer):

  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::putOrAdd):

  • Modules/indexeddb/client/IDBConnectionProxy.h:

(WebCore::IDBClient::IDBConnectionProxy::callConnectionOnMainThread):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):

  • bindings/js/SerializedScriptValue.h:
  • platform/network/BlobRegistry.h:
  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles):

  • platform/network/BlobRegistryImpl.h:

Source/WebKit2:

  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):

  • NetworkProcess/FileAPI/NetworkBlobRegistry.h:
  • WebProcess/FileAPI/BlobRegistryProxy.cpp:

(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):

  • WebProcess/FileAPI/BlobRegistryProxy.h:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):

  • WebProcess/Network/NetworkProcessConnection.h:
11:09 AM Changeset in webkit [201716] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[jsc][mips] Implement absDouble()
https://bugs.webkit.org/show_bug.cgi?id=158206

Patch by Guillaume Emont <guijemont@igalia.com> on 2016-06-06
Reviewed by Mark Lam.

Implement absDouble() for MIPS. This is needed because Math.pow() uses
it since r200208.

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::absd):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::absDouble):

10:56 AM Changeset in webkit [201715] by Ryan Haddad
  • 28 edits
    9 deletes in trunk

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

This change broke the Yosemite build and its LayoutTest is
failing on Mac and iOS testers (Requested by ryanhaddad on
#webkit).

Reverted changeset:

"Add experimental support for spring based CSS animations"
https://bugs.webkit.org/show_bug.cgi?id=158403
http://trac.webkit.org/changeset/201706

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-06

10:31 AM Changeset in webkit [201714] by oliver@apple.com
  • 5 edits in trunk

RegExp unicode parsing reads an extra character before failing
https://bugs.webkit.org/show_bug.cgi?id=158376

Reviewed by Saam Barati.

Source/JavaScriptCore:

This was a probably harmless bug, but keeps triggering assertions
for me locally. Essentially we'd see a parse error, set the error
type, but then carry on parsing. In debug builds this asserts, in
release builds you are pretty safe unless you're exceptionally
unlucky with where the error occurs.

  • yarr/YarrParser.h:

(JSC::Yarr::Parser::parseEscape):

LayoutTests:

Add a couple of tests.

  • js/script-tests/regexp-unicode.js:
10:22 AM Changeset in webkit [201713] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[jsc][mips] fix JIT::emit_op_log_shadow_chicken_prologue/_tail
https://bugs.webkit.org/show_bug.cgi?id=158209

Patch by Guillaume Emont <guijemont@igalia.com> on 2016-06-06
Reviewed by Mark Lam.

On MIPS, changes GPRInfo::nonArgGPR0 to be regT4 instead of regT0,
since the code of JIT::emit_op_log_shadow_chicken_prologue/_tail()
expects nonArgGPR0 to be a different register from regT0 and regT2.

  • jit/GPRInfo.h:
9:40 AM Changeset in webkit [201712] by Chris Dumez
  • 3 edits
    2 adds in trunk

Crash under JSObject::getOwnPropertyDescriptor()
https://bugs.webkit.org/show_bug.cgi?id=158382
<rdar://problem/26605004>

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/JSObject.h:

(JSC::JSObject::putDirectInternal):
We were crashing under getOwnPropertyDescriptor() because the
CustomAccessor was not properly reset on window.statusbar when
setting it to false (which is allowed because the property is
marked as [Replaceable] in the IDL). We now property reset the
CustomAccessor flag in putDirectInternal() when needed. This
fixes the crash.

LayoutTests:

Add layout test to cover the crash in JSObject::getOwnPropertyDescriptor().

  • js/dom/getOwnPropertyDescriptor-crash-expected.txt: Added.
  • js/dom/getOwnPropertyDescriptor-crash.html: Added.
7:31 AM Changeset in webkit [201711] by Gyuyoung Kim
  • 2 edits in trunk/Source/JavaScriptCore

[EFL] Move efl include paths to JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
https://bugs.webkit.org/show_bug.cgi?id=158418

Reviewed by Csaba Osztrogonác.

In Source/JavaScriptCore/PlatformEfl.cmake, we don't use JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
for efl include paths.

  • PlatformEfl.cmake:
6:00 AM Changeset in webkit [201710] by Gyuyoung Kim
  • 2 edits in trunk

[EFL] Update ewebkit minor version
https://bugs.webkit.org/show_bug.cgi?id=158409

Reviewed by Csaba Osztrogonác.

EWebKit has used efl 1.17 version though, it still is stopped at version 1.14.

  • Source/cmake/OptionsEfl.cmake: Bump minor version to 1.17.
5:11 AM Changeset in webkit [201709] by jfernandez@igalia.com
  • 3 edits
    2 adds in trunk

[css-grid] Horizontal scroll must account for grid container's height
https://bugs.webkit.org/show_bug.cgi?id=157971

Reviewed by Darin Adler.

Source/WebCore:

We don't consider the scrollbar when computing the grid container's
logical height at the beginning of the 'layoutBlock' logic. We must
do it because otherwise, contentLogicalHeight may return a negative
value.

Test: fast/css-grid-layout/grid-container-scroll-accounts-for-sizing.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):

LayoutTests:

Test to verify we account horizontal scrollbar's size for grid container's
height computation.

  • fast/css-grid-layout/grid-container-scroll-accounts-for-sizing-expected.html: Added.
  • fast/css-grid-layout/grid-container-scroll-accounts-for-sizing.html: Added.
1:25 AM Changeset in webkit [201708] by commit-queue@webkit.org
  • 35 edits in trunk/Source

Reduce ResourceRequest copying in loading code
https://bugs.webkit.org/show_bug.cgi?id=158251

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-06
Reviewed by Darin Adler.

Source/WebCore:

No new tests. There should be no change in behavior except fewer unnecessary copies.
Before, we would pass a const ResourceRequest& around, and if we needed to modify it
we would copy the whole thing, modify the copy, and pass the copy along. This can be
accomplished with move semantics without the now-unnecessary copy.

The biggest conceptual change is that the synchronous ResourceHandleClient::willSendRequest
used to take a non-const ResourceRequest& and modify it, but now it returns a modified
ResourceRequest instead.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::cannotShowURLError):
(WebCore::ResourceLoader::willSendRequest):
(WebCore::ResourceLoader::didSendData):

  • loader/ResourceLoader.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::getOrCreateReadBuffer):
(ResourceHandleStreamingClient::willSendRequest):
(ResourceHandleStreamingClient::didReceiveResponse):

  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleClient.cpp:

(WebCore::ResourceHandleClient::~ResourceHandleClient):
(WebCore::ResourceHandleClient::willSendRequest):
(WebCore::ResourceHandleClient::willSendRequestAsync):
(WebCore::ResourceHandleClient::didReceiveResponseAsync):

  • platform/network/ResourceHandleClient.h:

(WebCore::ResourceHandleClient::didSendData):
(WebCore::ResourceHandleClient::didReceiveResponse):
(WebCore::ResourceHandleClient::loadingSynchronousXHR):
(WebCore::ResourceHandleClient::willSendRequest): Deleted.

  • platform/network/SynchronousLoaderClient.cpp:

(WebCore::SynchronousLoaderClient::~SynchronousLoaderClient):
(WebCore::SynchronousLoaderClient::willSendRequest):
(WebCore::SynchronousLoaderClient::shouldUseCredentialStorage):

  • platform/network/SynchronousLoaderClient.h:
  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::cancel):
(WebCore::ResourceHandle::willSendRequest):

  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::continueWillSendRequest):

  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:

(-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::shouldRedirectAsGET):
(WebCore::continueAfterWillSendRequest):
(WebCore::readCallback):
(WebCore::ResourceHandle::continueWillSendRequest):
(WebCore::ResourceHandle::continueDidReceiveResponse):

Source/WebKit2:

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::DownloadManager::continueWillSendRequest):
(WebKit::DownloadManager::willDecidePendingDownloadDestination):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::PendingDownload):
(WebKit::PendingDownload::willSendRedirectedRequest):
(WebKit::PendingDownload::continueWillSendRequest):
(WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::firstRequest):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::sharedDidReceiveResponse):
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
(WebKit::NetworkLoad::setPendingDownload):
(WebKit::NetworkLoad::willPerformHTTPRedirection):
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didFail):
(WebKit::NetworkLoad::willSendRequestAsync):

  • NetworkProcess/NetworkLoad.h:

(WebKit::NetworkLoad::currentRequest):
(WebKit::NetworkLoad::clearCurrentRequest):
(WebKit::NetworkLoad::pendingDownloadID):

  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueWillSendRequest):
(WebKit::NetworkProcess::pendingDownloadCanceled):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.h:

(WebKit::PingLoad::PingLoad):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

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

(WebKit::NetworkDataTask::didBecomeDownload):
(WebKit::NetworkDataTask::willPerformHTTPRedirection):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::detachFromCoreLoader):
(WebKit::WebResourceLoader::willSendRequest):

  • WebProcess/Network/WebResourceLoader.h:
Note: See TracTimeline for information about the timeline view.