WebKit-https.git
3 years agoAdd an IDB leak test.
beidson@apple.com [Fri, 10 Jun 2016 21:01:55 +0000 (21:01 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: Cleanup InspectorIndexedDBAgent a bit
commit-queue@webkit.org [Fri, 10 Jun 2016 20:59:38 +0000 (20:59 +0000)]
Web Inspector: Cleanup InspectorIndexedDBAgent a bit
https://bugs.webkit.org/show_bug.cgi?id=158598

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-10
Reviewed by Darin Adler.

* inspector/InspectorIndexedDBAgent.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201939 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRefactor TestWebKitAPI to allow just testing WTF
weinig@apple.com [Fri, 10 Jun 2016 20:38:35 +0000 (20:38 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201938 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: rendering frames timeline "60fps" horizontal guide is mispositioned...
mattbaker@apple.com [Fri, 10 Jun 2016 19:59:20 +0000 (19:59 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoThe backend should be happy to compile Unreachable even if AI didn't prove it to...
fpizlo@apple.com [Fri, 10 Jun 2016 19:56:18 +0000 (19:56 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201936 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION (r201538): Web Inspector: 1px gap above timeline progress view
mattbaker@apple.com [Fri, 10 Jun 2016 19:42:37 +0000 (19:42 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201935 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: REGRESSION (r201538): Web Inspector: Border under JS Call Trees conten...
mattbaker@apple.com [Fri, 10 Jun 2016 19:41:46 +0000 (19:41 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201934 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRemove CommandLine class
andersca@apple.com [Fri, 10 Jun 2016 18:49:57 +0000 (18:49 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201933 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION(r201928?) API test WTF.StringOperators failing
beidson@apple.com [Fri, 10 Jun 2016 18:43:11 +0000 (18:43 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201932 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[GTK] Unreviewed gardening.
clopez@igalia.com [Fri, 10 Jun 2016 18:41:11 +0000 (18:41 +0000)]
[GTK] Unreviewed gardening.

* TestExpectations: shadow-dom tests timeout on the GTK port.
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201931 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoOrigin header is not included in CORS requests for preloaded cross-origin resources
youenn.fablet@crf.canon.fr [Fri, 10 Jun 2016 18:17:11 +0000 (18:17 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201930 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
simon.fraser@apple.com [Fri, 10 Jun 2016 18:01:54 +0000 (18:01 +0000)]
[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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201929 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWTF_CrossThreadTask.Basic fails in all non mac ports.
beidson@apple.com [Fri, 10 Jun 2016 17:04:11 +0000 (17:04 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201928 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking fast/hidpi/hidpi-3x-device-pixel-ratio.html as failing on ios-simulator
ryanhaddad@apple.com [Fri, 10 Jun 2016 16:45:49 +0000 (16:45 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201927 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoErrorEvent / ProgressEvent should be exposed to workers
cdumez@apple.com [Fri, 10 Jun 2016 16:19:44 +0000 (16:19 +0000)]
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:
- https://html.spec.whatwg.org/multipage/webappapis.html#errorevent
- https://xhr.spec.whatwg.org/#interface-progressevent

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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMessagePort should be exposed to workers
cdumez@apple.com [Fri, 10 Jun 2016 14:47:37 +0000 (14:47 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201925 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMove preflight check code outside of DocumentThreadableLoader
youenn.fablet@crf.canon.fr [Fri, 10 Jun 2016 13:26:30 +0000 (13:26 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201924 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Threaded Compositor] Content and viewport sizes are mixed
carlosgc@webkit.org [Fri, 10 Jun 2016 12:58:12 +0000 (12:58 +0000)]
[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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201923 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Threaded Compositor] Make it clear that compositing thread operations are always...
carlosgc@webkit.org [Fri, 10 Jun 2016 12:52:38 +0000 (12:52 +0000)]
[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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201922 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[GTK] Browser plugins crash under Wayland
carlosgc@webkit.org [Fri, 10 Jun 2016 12:50:14 +0000 (12:50 +0000)]
[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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201921 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWebRTC: Imlement MediaEndpointPeerConnection::createAnswer()
adam.bergkvist@ericsson.com [Fri, 10 Jun 2016 09:15:07 +0000 (09:15 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[css-grid] CRASH when getting the computed style of a grid with only absolutely posit...
svillar@igalia.com [Fri, 10 Jun 2016 07:41:23 +0000 (07:41 +0000)]
[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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201919 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoDOMException should be exposed to workers
cdumez@apple.com [Fri, 10 Jun 2016 07:37:52 +0000 (07:37 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up Visual Studio properties files after switching to CMake.
achristensen@apple.com [Fri, 10 Jun 2016 06:50:34 +0000 (06:50 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFix CMake build.
achristensen@apple.com [Fri, 10 Jun 2016 06:48:16 +0000 (06:48 +0000)]
Fix CMake build.

* PlatformMac.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201916 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFix AppleWin build after r201901.
achristensen@apple.com [Fri, 10 Jun 2016 06:36:38 +0000 (06:36 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201915 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up Tools *.vcxproj after switching to CMake.
achristensen@apple.com [Fri, 10 Jun 2016 06:11:26 +0000 (06:11 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAX: VoiceOver Unable to View Download Progress or Completion Status for Mail Attachments
cfleizach@apple.com [Fri, 10 Jun 2016 06:06:08 +0000 (06:06 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up JavaScriptCore.vcxproj directory after switching to CMake.
achristensen@apple.com [Fri, 10 Jun 2016 05:53:57 +0000 (05:53 +0000)]
Clean up JavaScriptCore.vcxproj directory after switching to CMake.

* JavaScriptCore.vcxproj/LLInt: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Removed.
* JavaScriptCore.vcxproj/jsc: Removed.
* JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp: Removed.
* JavaScriptCore.vcxproj/jsc/DLLLauncherWinCairo.props: Removed.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Removed.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/jsc/jscCommon.props: Removed.
* JavaScriptCore.vcxproj/jsc/jscDebug.props: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncherPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncherPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncherPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscProduction.props: Removed.
* JavaScriptCore.vcxproj/jsc/jscRelease.props: Removed.
* JavaScriptCore.vcxproj/testRegExp: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: Removed.
* JavaScriptCore.vcxproj/testapi: Removed.
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Removed.
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/testapi/testapiCommon.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiDebug.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncherPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncherPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncherPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiProduction.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiRelease.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: Removed.
* shell/DLLLauncherMain.cpp: Copied from JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp.
* shell/PlatformWin.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up WebCore.vcxproj after switching to CMake.
achristensen@apple.com [Fri, 10 Jun 2016 05:42:28 +0000 (05:42 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFix Windows build.
achristensen@apple.com [Fri, 10 Jun 2016 05:39:38 +0000 (05:39 +0000)]
Fix Windows build.

* WebKit.resources/resource.h: Removed.
* resource.h: Copied from WebKit.resources/resource.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201910 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoActually fix Windows build after r201894
achristensen@apple.com [Fri, 10 Jun 2016 05:34:48 +0000 (05:34 +0000)]
Actually fix Windows build after r201894
https://bugs.webkit.org/show_bug.cgi?id=158588

* WebView.cpp:
(WebView::initWithFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201909 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up WebKit.vcxproj directory after switching to CMake.
achristensen@apple.com [Fri, 10 Jun 2016 05:33:45 +0000 (05:33 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201908 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoHairline borders do not show up on 3x displays.
zalan@apple.com [Fri, 10 Jun 2016 05:27:11 +0000 (05:27 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r201887.
ryanhaddad@apple.com [Fri, 10 Jun 2016 05:24:46 +0000 (05:24 +0000)]
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201906 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed build fix after r201894
achristensen@apple.com [Fri, 10 Jun 2016 05:17:48 +0000 (05:17 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd testing support for 3x device scale factor.
zalan@apple.com [Fri, 10 Jun 2016 03:31:00 +0000 (03:31 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAddress Darin's review comment on r201898.
cdumez@apple.com [Fri, 10 Jun 2016 03:20:01 +0000 (03:20 +0000)]
Address Darin's review comment on r201898.
https://bugs.webkit.org/show_bug.cgi?id=158576

Reviewed by Darin Adler.

* page/Base64Utilities.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201903 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION(r201823) editing/selection/selection-in-iframe-removed-crash.html is flaky
rniwa@webkit.org [Fri, 10 Jun 2016 02:45:34 +0000 (02:45 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201902 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[iOS] -webkit-overflow-scrolling: touch; ignores pointer-events: none;
commit-queue@webkit.org [Fri, 10 Jun 2016 02:06:30 +0000 (02:06 +0000)]
[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 <graouts@apple.com> 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201901 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRare failure in stress/v8-deltablue-strict.js.ftl-eager
fpizlo@apple.com [Fri, 10 Jun 2016 02:03:33 +0000 (02:03 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201900 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWorkerNavigator property should exist on WorkerGlobalScope
cdumez@apple.com [Fri, 10 Jun 2016 01:54:13 +0000 (01:54 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201899 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoatob() / btoa() API should be exposed to workers
cdumez@apple.com [Fri, 10 Jun 2016 01:42:05 +0000 (01:42 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201898 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRemove OriginAndDatabases.cpp, it's unused
andersca@apple.com [Fri, 10 Jun 2016 01:11:47 +0000 (01:11 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201897 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMake some methods const.
mark.lam@apple.com [Fri, 10 Jun 2016 00:42:19 +0000 (00:42 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201896 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRestrict HTTP/0.9 responses to default ports and cancel HTTP/0.9 resource loads if...
bfulgham@apple.com [Fri, 10 Jun 2016 00:21:16 +0000 (00:21 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201895 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up EditorClient lifetime
achristensen@apple.com [Thu, 9 Jun 2016 23:53:36 +0000 (23:53 +0000)]
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.
2. 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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201894 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
commit-queue@webkit.org [Thu, 9 Jun 2016 23:48:08 +0000 (23:48 +0000)]
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 <pecoraro@apple.com> 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201893 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoES6: Reusing function name as a parameter name shouldn't throw Syntax Error
msaboff@apple.com [Thu, 9 Jun 2016 23:30:39 +0000 (23:30 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201892 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: Support Command-P for quick open
nvasilyev@apple.com [Thu, 9 Jun 2016 22:55:52 +0000 (22:55 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201891 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION (r194717): Web Inspector: Elements tab: an element loses focus when select...
nvasilyev@apple.com [Thu, 9 Jun 2016 22:49:28 +0000 (22:49 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201890 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoChanging canvas height immediately after page load does not relayout canvas
commit-queue@webkit.org [Thu, 9 Jun 2016 22:34:41 +0000 (22:34 +0000)]
Changing canvas height immediately after page load does not relayout canvas
https://bugs.webkit.org/show_bug.cgi?id=156097

Patch by Antoine Quint <graouts@apple.com> 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201889 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWKWebView does not render PDF pages in AirPrint
aestes@apple.com [Thu, 9 Jun 2016 22:05:04 +0000 (22:05 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201888 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoDeleting a CSSOM style rule invalidates any previously-added FontFaces
mmaxfield@apple.com [Thu, 9 Jun 2016 22:03:53 +0000 (22:03 +0000)]
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.

2. 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201887 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking webgl/webgl-backing-store-size-update.html as a flaky timeout on mac-wk1
ryanhaddad@apple.com [Thu, 9 Jun 2016 21:41:39 +0000 (21:41 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201886 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRemoving Mavericks-specific TestExpectations from mac-wk1 TestExpectations file.
ryanhaddad@apple.com [Thu, 9 Jun 2016 21:38:42 +0000 (21:38 +0000)]
Removing Mavericks-specific TestExpectations from mac-wk1 TestExpectations file.

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201885 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoDefine printing{Minimum,Maximum}ShrinkFactor in only one place
aestes@apple.com [Thu, 9 Jun 2016 21:34:25 +0000 (21:34 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201884 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoDon't show the caption menu if a video has only forced tracks
eric.carlson@apple.com [Thu, 9 Jun 2016 21:30:35 +0000 (21:30 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201883 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoPass through play state and toggle state to the WebPlaybackControlsManager
jer.noble@apple.com [Thu, 9 Jun 2016 21:01:55 +0000 (21:01 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201882 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRenderMathOperator: Move calculation of preferred width into MathOperator
fred.wang@free.fr [Thu, 9 Jun 2016 20:50:44 +0000 (20:50 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoClean up WebSocket code
achristensen@apple.com [Thu, 9 Jun 2016 20:10:30 +0000 (20:10 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201880 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAdd comments to clarify feature enablement
mcatanzaro@igalia.com [Thu, 9 Jun 2016 20:09:21 +0000 (20:09 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201879 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoPerformanceTests:
fpizlo@apple.com [Thu, 9 Jun 2016 19:24:22 +0000 (19:24 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r201815.
commit-queue@webkit.org [Thu, 9 Jun 2016 18:52:27 +0000 (18:52 +0000)]
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWorkerGlobalScope attributes / operations should be on the prototype
cdumez@apple.com [Thu, 9 Jun 2016 18:47:21 +0000 (18:47 +0000)]
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]:
- https://html.spec.whatwg.org/multipage/workers.html#the-workerglobalscope-common-interface
- http://heycam.github.io/webidl/#es-attributes
- http://heycam.github.io/webidl/#es-operations

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).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201876 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWriting-mode-dependent properties don't apply if their value is a variable
timothy_horton@apple.com [Thu, 9 Jun 2016 18:33:02 +0000 (18:33 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201875 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMarking editing/selection/selection-in-iframe-removed-crash.html as flaky on Mac
ryanhaddad@apple.com [Thu, 9 Jun 2016 18:27:32 +0000 (18:27 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201874 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnaddressed review feedback from r201872
beidson@apple.com [Thu, 9 Jun 2016 17:42:41 +0000 (17:42 +0000)]
Unaddressed review feedback from r201872

* wtf/CrossThreadTask.h:
(WTF::callFunctionForCrossThreadTask): Fix typo.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201873 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoGreatly simplify CrossThreadTask.h.
beidson@apple.com [Thu, 9 Jun 2016 17:34:55 +0000 (17:34 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201872 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoLayoutTest storage/indexeddb/modern/handle-user-delete.html is a flaky failure.
beidson@apple.com [Thu, 9 Jun 2016 17:31:08 +0000 (17:31 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201871 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoAttempt to fix the iOS build.
ryanhaddad@apple.com [Thu, 9 Jun 2016 17:12:53 +0000 (17:12 +0000)]
Attempt to fix the iOS build.

Unreviewed build fix.

* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::ResourceError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUpdate properties for UIWKTextInteractionAssistant
ddkilzer@apple.com [Thu, 9 Jun 2016 17:07:06 +0000 (17:07 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201869 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoborder-radius with different width and height rendered wrong
simon.fraser@apple.com [Thu, 9 Jun 2016 16:59:17 +0000 (16:59 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201868 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed test gardening.
peavo@outlook.com [Thu, 9 Jun 2016 16:49:19 +0000 (16:49 +0000)]
Unreviewed test gardening.

Unskip passing websocket tests.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201867 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r201836, r201845, and r201848.
cdumez@apple.com [Thu, 9 Jun 2016 16:31:38 +0000 (16:31 +0000)]
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201866 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r201842.
ryanhaddad@apple.com [Thu, 9 Jun 2016 15:56:07 +0000 (15:56 +0000)]
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201865 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, fixing compilation issue with WebRTC
calvaris@igalia.com [Thu, 9 Jun 2016 15:14:41 +0000 (15:14 +0000)]
Unreviewed, fixing compilation issue with WebRTC

The code dependencies of the SDP processor were not right.

* PlatformGTK.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWebKitTestRunner and DumpRenderTree do not handle dangling surrogate characters
msaboff@apple.com [Thu, 9 Jun 2016 14:54:50 +0000 (14:54 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201863 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoIntroduce MathOperator::Type
fred.wang@free.fr [Thu, 9 Jun 2016 14:50:19 +0000 (14:50 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201862 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoUnreviewed, rolling out r201810.
commit-queue@webkit.org [Thu, 9 Jun 2016 12:59:40 +0000 (12:59 +0000)]
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201861 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Threaded Compositor] Many layout tests crash when threaded compositor is enabled
carlosgc@webkit.org [Thu, 9 Jun 2016 12:09:22 +0000 (12:09 +0000)]
[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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201860 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago[Threaded Compositor] Remove ThreadedCompositor::setNeedsDisplay()
carlosgc@webkit.org [Thu, 9 Jun 2016 12:07:38 +0000 (12:07 +0000)]
[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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoslotchange event should be fired at the end of microtask
rniwa@webkit.org [Thu, 9 Jun 2016 09:09:50 +0000 (09:09 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201858 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoIncrease disk cache capacity when there is lots of free space
antti@apple.com [Thu, 9 Jun 2016 08:41:54 +0000 (08:41 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201857 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoIntroduce ResourceErrorBase::type
youenn.fablet@crf.canon.fr [Thu, 9 Jun 2016 06:55:26 +0000 (06:55 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201856 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoREGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
commit-queue@webkit.org [Thu, 9 Jun 2016 06:20:55 +0000 (06:20 +0000)]
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 <pecoraro@apple.com> 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201855 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoMove selection and drawing of stretchy operators into a separate MathOperator class
fred.wang@free.fr [Thu, 9 Jun 2016 06:17:40 +0000 (06:17 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201854 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoJSObject::reifyAllStaticProperties cleanup
barraclough@apple.com [Thu, 9 Jun 2016 05:43:46 +0000 (05:43 +0000)]
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201853 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoDedicatedWorkerGlobalScope prototype chain is incorrect
cdumez@apple.com [Thu, 9 Jun 2016 05:18:38 +0000 (05:18 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201852 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWebRTC: Imlement MediaEndpointPeerConnection::setRemoteDescription()
adam.bergkvist@ericsson.com [Thu, 9 Jun 2016 05:09:42 +0000 (05:09 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201851 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoPerform IDNA encoding on parameters for setHostAndPort and setHost
bfulgham@apple.com [Thu, 9 Jun 2016 05:07:24 +0000 (05:07 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201850 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoTry to fix the EFL build.
hs85.jeong@samsung.com [Thu, 9 Jun 2016 02:41:01 +0000 (02:41 +0000)]
Try to fix the EFL build.

Unreviewed.

* TestWebKitAPI/CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201849 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoChange thresholdForOptimizeSoon to match thresholdForOptimizeAfterWarmUp
benjamin@webkit.org [Thu, 9 Jun 2016 02:05:26 +0000 (02:05 +0000)]
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201848 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years ago Fix WinCairo build
achristensen@apple.com [Thu, 9 Jun 2016 01:00:57 +0000 (01:00 +0000)]
   Fix WinCairo build

* DumpRenderTree/cairo/PixelDumpSupportCairo.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoFix WinCairo build.
achristensen@apple.com [Thu, 9 Jun 2016 00:49:38 +0000 (00:49 +0000)]
Fix WinCairo build.

* platform/network/curl/MultipartHandle.cpp:
(WebCore::MultipartHandle::didReceiveResponse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201846 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoTempory fix for the debug bots
benjamin@webkit.org [Thu, 9 Jun 2016 00:41:28 +0000 (00:41 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201845 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoSource/WebCore:
achristensen@apple.com [Wed, 8 Jun 2016 23:19:34 +0000 (23:19 +0000)]
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201844 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWeb Inspector: an error is encountered when trying to delete nodes that have children
bburg@apple.com [Wed, 8 Jun 2016 23:17:11 +0000 (23:17 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201843 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoRebaseline js/dom/global-constructors-attributes.html for Mac after r201810
ryanhaddad@apple.com [Wed, 8 Jun 2016 23:11:23 +0000 (23:11 +0000)]
Rebaseline js/dom/global-constructors-attributes.html for Mac after r201810

Unreviewed test gardening.

* platform/mac/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201842 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agoWith audio user gesture restriction in place, video.src = 'file', video.play() succee...
jer.noble@apple.com [Wed, 8 Jun 2016 23:09:44 +0000 (23:09 +0000)]
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201841 268f45cc-cd09-0410-ab3c-d52691b4dbfc