WebKit-https.git
4 years agoCleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
dbates@webkit.org [Thu, 9 Jul 2015 04:10:05 +0000 (04:10 +0000)]
Cleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
https://bugs.webkit.org/show_bug.cgi?id=146670

Reviewed by Darin Adler.

Make calling the ContentSecurityPolicy::allow* functions less error prone by making
ContentSecurityPolicy::ReportingStatus an enum class. Among other benefits this will
prevent a caller from inadvertently passing an enumerator of ContentSecurityPolicy::ReportingStatus
as the boolean argument overridingContentSecurityPolicy, which is taken by the various
ContentSecurityPolicy::allow* functions, by causing a compile-time error (since an enum class
enumerator cannot be implicitly converted to an integral type).

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):
(WebCore::CSPDirectiveList::allowPluginType):
(WebCore::CSPDirectiveList::allowScriptFromSource):
(WebCore::CSPDirectiveList::allowObjectFromSource):
(WebCore::CSPDirectiveList::allowChildFrameFromSource):
(WebCore::CSPDirectiveList::allowImageFromSource):
(WebCore::CSPDirectiveList::allowStyleFromSource):
(WebCore::CSPDirectiveList::allowFontFromSource):
(WebCore::CSPDirectiveList::allowMediaFromSource):
(WebCore::CSPDirectiveList::allowConnectToSource):
(WebCore::CSPDirectiveList::allowFormAction):
(WebCore::CSPDirectiveList::allowBaseURI):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
(WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
* page/ContentSecurityPolicy.h:
* page/DOMSecurityPolicy.cpp:
(WebCore::DOMSecurityPolicy::allowsEval):

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

4 years agoActivate DOMURLMediaStream
commit-queue@webkit.org [Thu, 9 Jul 2015 03:55:19 +0000 (03:55 +0000)]
Activate DOMURLMediaStream
https://bugs.webkit.org/show_bug.cgi?id=146764
<rdar://problem/21738101>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Eric Carlson.

* DerivedSources.make: Added DOMURLMediaStream.idl to list
* WebCore.xcodeproj/project.pbxproj: Added DOMURLMediaStream.cpp and
DOMURLMediaStream.h to compile

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

4 years agoMake sure MediaStream uses blob protocol
commit-queue@webkit.org [Thu, 9 Jul 2015 03:51:39 +0000 (03:51 +0000)]
Make sure MediaStream uses blob protocol
https://bugs.webkit.org/show_bug.cgi?id=146752
<rdar://problem/21736057>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectNextSourceChild): Added MediaStream
blob protocol

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

4 years agoFix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
commit-queue@webkit.org [Thu, 9 Jul 2015 03:33:49 +0000 (03:33 +0000)]
Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
https://bugs.webkit.org/show_bug.cgi?id=146546

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-07-08
Reviewed by Darin Adler.

We did't reset pendingNavigationID value when request url is empty.
Hence we need to ignore ASSERT check in this case.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reload):

Tools:

* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
(TestWebKitAPI::TEST):

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

4 years agoVideos on apple.com don't show up when restored from page cache.
akling@apple.com [Thu, 9 Jul 2015 03:28:24 +0000 (03:28 +0000)]
Videos on apple.com don't show up when restored from page cache.
<https://webkit.org/b/146766>
<rdar://problem/21712311>

Reviewed by Darin Adler.

Source/WebCore:

Break out most of HTMLMediaElement::stop() (override of ActiveDOMObject::stop(), to be clear)
into a stopWithoutDestroyingMediaPlayer() function that both stop() and suspend() can call.

Before this change, suspend() would call stop() when moving into the page cache, killing the
internal MediaPlayer object which caused the video to disappear from the page.

Test: LayoutTests/media/restore-from-page-cache.html (amended)

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::suspend):
* html/HTMLMediaElement.h:

LayoutTests:

Tweaked an existing media element page caching test to dump out the video height
after restoring from page cache. Failure to restore the video player would result
in incorrect geometry (it falls back to RenderReplaced's default 300x150.)

* media/restore-from-page-cache-expected.txt:
* media/restore-from-page-cache.html:

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

4 years agoUse Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
gyuyoung.kim@webkit.org [Thu, 9 Jul 2015 02:31:21 +0000 (02:31 +0000)]
Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
https://bugs.webkit.org/show_bug.cgi?id=146591

Reviewed by Darin Adler.

Following patch in order to reduce use of PassRefPtr.

* Shared/BlobDataFileReferenceWithSandboxExtension.h:
* Shared/Cocoa/CompletionHandlerCallChecker.h:
* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::CompletionHandlerCallChecker::create):
* Shared/Downloads/DownloadAuthenticationClient.h:
(WebKit::DownloadAuthenticationClient::create):
* Shared/SandboxExtension.h:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
* Shared/ShareableResource.h:
* Shared/mac/ObjCObjectGraph.h:
(WebKit::ObjCObjectGraph::create):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::create):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(getInjectedBundleInitializationUserData):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::create):
* UIProcess/WebPreferences.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayCreate):
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
(WKBundlePageBannerCreateBannerWithCALayer):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
(WebKit::InjectedBundleDOMWindowExtension::create):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::create):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::create):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
(WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::InjectedBundleScriptWorld::create):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
* WebProcess/Network/NetworkProcessConnection.h:
(WebKit::NetworkProcessConnection::create):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::create):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::create):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::create):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
(WebKit::NetscapePluginStream::create):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::create):
* WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
(WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::create):
* WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
* WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
(WebKit::PDFPluginPasswordField::create):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::create):
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::create):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::create):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::URLRequest::create):
(WebKit::PluginView::Stream::create):
(WebKit::PluginView::create):
* WebProcess/Plugins/PluginView.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
(WebKit::RemoteScrollingCoordinator::create):
* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::create):
* WebProcess/Storage/StorageAreaImpl.h:
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::create):
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::create):
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
(WebKit::WebSearchPopupMenu::create):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::create):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::create):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::create):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/PageBanner.h:
* WebProcess/WebPage/WebBackForwardListProxy.h:
(WebKit::WebBackForwardListProxy::create):
* WebProcess/WebPage/WebContextMenu.h:
(WebKit::WebContextMenu::create):
* WebProcess/WebPage/WebDocumentLoader.h:
(WebKit::WebDocumentLoader::create):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::create):
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::create):
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebOpenPanelResultListener.cpp:
(WebKit::WebOpenPanelResultListener::create):
* WebProcess/WebPage/WebOpenPanelResultListener.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::create):
* WebProcess/WebPage/WebPageOverlay.h:
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::WebUndoStep::create):
* WebProcess/WebPage/WebUndoStep.h:
* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::create):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::create):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::create):

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

4 years agoMake MediaStream conform to its private client like MediaSource does
commit-queue@webkit.org [Thu, 9 Jul 2015 02:27:32 +0000 (02:27 +0000)]
Make MediaStream conform to its private client like MediaSource does
https://bugs.webkit.org/show_bug.cgi?id=146756
<rdar://problem/21736457>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

MediaStream should be inheriting its PrivateClient's getters and
setters for RefCounted, not inheriting its own.

* Modules/mediastream/MediaStream.h: Changed MediaStream's inherit
statements
* platform/mediastream/MediaStreamPrivate.h: Changed
MediaStreamPrivateClient to inherit RefCounted<MediaStreamPrivateClient>

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

4 years agoMade AVMediaCaptureSource's session accessor public
commit-queue@webkit.org [Thu, 9 Jul 2015 02:23:25 +0000 (02:23 +0000)]
Made AVMediaCaptureSource's session accessor public
https://bugs.webkit.org/show_bug.cgi?id=146758
<rdar://problem/21736651>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

* platform/mediastream/mac/AVMediaCaptureSource.h:
(WebCore::AVMediaCaptureSource::session): Changed to public

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

4 years agoMake sure MediaStream engine loaded for interpreting MediaStreams
commit-queue@webkit.org [Thu, 9 Jul 2015 01:22:28 +0000 (01:22 +0000)]
Make sure MediaStream engine loaded for interpreting MediaStreams
https://bugs.webkit.org/show_bug.cgi?id=146748
<rdar://problem/21735416>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

Prevent the MediaSource engine from being used to process
MediaStreams, since they are not compatible

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
Changed MediaStream to never be loaded
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
Changed MediaStream to never be loaded

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

4 years agoWeb Inspector: Color swatches show up in color names in comments
drousso@apple.com [Thu, 9 Jul 2015 01:17:44 +0000 (01:17 +0000)]
Web Inspector: Color swatches show up in color names in comments
https://bugs.webkit.org/show_bug.cgi?id=146757

Reviewed by Timothy Hatcher.

* UserInterface/Views/CodeMirrorAdditions.js: Color markers now only appear if the color is in a keyword.

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

4 years agoWeb Inspector: Only record a timeline when the Timelines tab is showing
timothy@apple.com [Thu, 9 Jul 2015 01:14:03 +0000 (01:14 +0000)]
Web Inspector: Only record a timeline when the Timelines tab is showing
https://bugs.webkit.org/show_bug.cgi?id=146759

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.get autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype._startAutoCapturing):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype.shown):
(WebInspector.TimelineTabContentView.prototype.hidden):

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

4 years ago[Content Extensions] Fuse undistinguishable actions as much as possible
benjamin@webkit.org [Thu, 9 Jul 2015 00:52:53 +0000 (00:52 +0000)]
[Content Extensions] Fuse undistinguishable actions as much as possible
https://bugs.webkit.org/show_bug.cgi?id=146762

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-07-08
Reviewed by Alex Christensen.

Source/WebCore:

Our previous code that fused actions was based on test lists that were
grouping similar actions in the input.

The input we get from developers is more distributed. It is very common to
have trigger flags all over the place, and "css-display-none" mixed with "block".

This patch refines the merging code to merge those cases as much as possible.

The size taken by the actions is negligible, but having different actions make
nodes unkillable by the Minimizer. By merging many more actions, the minimizer
no longer see those subtrees as distinguishable and can do a better job.

On a large test list, this cuts the bytecode size by 2 megabytes.

Tests: http/tests/contentextensions/css-display-none-after-ignore-previous-rules.html
       http/tests/contentextensions/single-css-display-none.html

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
(WebCore::ContentExtensions::serializeActions):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
Test that combinations and flags still work as expected.

LayoutTests:

Make sure the last CSS rule is not ignored.

* http/tests/contentextensions/css-display-none-after-ignore-previous-rules-expected.txt: Added.
* http/tests/contentextensions/css-display-none-after-ignore-previous-rules.html: Added.
* http/tests/contentextensions/css-display-none-after-ignore-previous-rules.html.json: Added.
* http/tests/contentextensions/single-css-display-none-expected.txt: Added.
* http/tests/contentextensions/single-css-display-none.html: Added.
* http/tests/contentextensions/single-css-display-none.html.json: Added.

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

4 years agoWKSecurityOrigin.h has wrong availability info
andersca@apple.com [Thu, 9 Jul 2015 00:24:58 +0000 (00:24 +0000)]
WKSecurityOrigin.h has wrong availability info
https://bugs.webkit.org/show_bug.cgi?id=146761
rdar://problem/21735802

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKSecurityOrigin.h:

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

4 years ago[iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
akling@apple.com [Thu, 9 Jul 2015 00:19:10 +0000 (00:19 +0000)]
[iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
<https://webkit.org/b/146735>
<rdar://problem/21151033>

Reviewed by Enrica Casucci.

Every touch on the page causes us to call elementDidFocus(), since we may need to bring
up a keyboard if the node had previously been programmatically focused. This was causing
little lag spikes during scrolling every time you'd put your finger to the screen.

Have WebPage::elementDidFocus() return early if the node already has focus, and we've
started an input session in response to non-programmatic focus already.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):
(WebKit::WebPage::elementDidBlur):

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

4 years agoFix asynchronous function calls for scroll snap animation tests
commit-queue@webkit.org [Thu, 9 Jul 2015 00:17:13 +0000 (00:17 +0000)]
Fix asynchronous function calls for scroll snap animation tests
https://bugs.webkit.org/show_bug.cgi?id=146753

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2015-07-08
Reviewed by Brent Fulgham.

Fixes unintended use of setTimeout in several scroll snap tests.

* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html: Fixed asynchronous Javascript invocations.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: See above.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html: See above.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: See above.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: See above.

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

4 years agoCleared contentMIMETypes for MediaStreams
commit-queue@webkit.org [Thu, 9 Jul 2015 00:16:03 +0000 (00:16 +0000)]
Cleared contentMIMETypes for MediaStreams
https://bugs.webkit.org/show_bug.cgi?id=146750
<rdar://problem/21735678>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load): Needed to clear contentMIMETypes

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

4 years agoAudio elements with controls force their enclosing stacking context to composite
dino@apple.com [Thu, 9 Jul 2015 00:11:35 +0000 (00:11 +0000)]
Audio elements with controls force their enclosing stacking context to composite
https://bugs.webkit.org/show_bug.cgi?id=146751
<rdar://problem/21466572>

Reviewed by Simon Fraser.

There were a number of issues with audio controls, on both iOS and OS X.

- they used a blurry background which was not the intended design
- they cause the page to composite, which causes a degradation in
  text rendering quality
- they inserted 20px of padding above every audio element, which
  could break existing page designs.

Removing the need for compositing and blending means that the
colors used for control tints need to be adjusted for the non-blended
case. Wherever I could, I kept as much as possible in a shared
rule and made specific changes for audio or video.

The controls were also unintentionally relying on the compositing
to create stacking contexts and control the rendering order. Without
them, I needed to add some explicit stacking.

I also made some drive-by whitespace clean-ups.

* Modules/mediacontrols/mediaControlsApple.css: Remove as much compositing
as possible in audio controls.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.drawTimelineBackground): Use specific colors for audio.

* Modules/mediacontrols/mediaControlsiOS.css: Remove as much need for compositing
as possible.

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

4 years agoNow that PingLoaders work in the NetworkProcess, re-enable http/tests/navigation...
beidson@apple.com [Thu, 9 Jul 2015 00:04:24 +0000 (00:04 +0000)]
Now that PingLoaders work in the NetworkProcess, re-enable http/tests/navigation/ping-cookie.html
https://bugs.webkit.org/show_bug.cgi?id=146747

Reviewed by Tim Horton.

* platform/gtk/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

4 years agoCrash when appending an SVG <use> element dynamically which has animated SVG <path...
commit-queue@webkit.org [Wed, 8 Jul 2015 23:56:58 +0000 (23:56 +0000)]
Crash when appending an SVG <use> element dynamically which has animated SVG <path> element
https://bugs.webkit.org/show_bug.cgi?id=146690
<rdar://problem/20790376>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-07-08
Reviewed by Dean Jackson.

Source/WebCore:

Test: svg/animations/insert-animate-use-path-while-animation.svg

The crashing call stack shows that
SVGAnimatedListPropertyTearOff<SVGPathSegList>::m_animVal is null when
trying to access it in synchronizeWrappersIfNeeded(). This happens because
animationStarted() was not called for this animatedType.

SVGAnimateElementBase::resetAnimatedType() calls
SVGAnimatedPathAnimator::startAnimValAnimation() at the beginning of the
animation. For the target element and all its instances, this function calls
SVGAnimatedPathSegListPropertyTearOff::animationStarted() which calls
SVGAnimatedListPropertyTearOff<SVGPathSegList>::animationStarted(). This
last function allocates the member m_animVal when calling
SVGAnimatedListPropertyTearOff<SVGPathSegList>::animVal().

When adding a new instance of the same animating target element,
SVGAnimateElementBase::resetAnimatedType() just keeps calling
SVGAnimatedPathAnimator::animValDidChange() for all the instances of the
targetElement without ensuring that all of them have started their
animations.

The fix is to make SVGAnimatedPathAnimator::resetAnimValToBaseVal() ensure
that animationStarted() is called for the targetElement and all its instances.

* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Move resetting
the animation value and starting the animatedTypes code to a new overriding
function which is named resetAnimValToBaseVal().

(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): Call the overriding
function which calls buildSVGPathByteStreamFromSVGPathSegList() as before
and ensure that all the animatedTypes have started their animations.

* svg/SVGAnimatedPath.h:

LayoutTests:

When adding dynamically a new <use> element which references an animated
SVG path after the animation starts, ensure that WebKit is not crashing.

* svg/animations/insert-animate-use-path-while-animation-expected.txt: Added.
* svg/animations/insert-animate-use-path-while-animation.svg: Added.

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

4 years agoWeb Inspector: Details sidebar doesn't activate on first selected resource in Network tab
timothy@apple.com [Wed, 8 Jul 2015 23:54:17 +0000 (23:54 +0000)]
Web Inspector: Details sidebar doesn't activate on first selected resource in Network tab
https://bugs.webkit.org/show_bug.cgi?id=146691

Make sure the SelectionPathComponentsDidChange event is dispatched when the tree elements are selected.
Selecting in the DataGrid selects the TreeElements, but onselect is not fired to avoid an inifinte loop.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView): Hook up _treeElementSelected.
(WebInspector.NetworkGridContentView.prototype._treeElementSelected): Added. Moved from
NetworkSidebarPanel and added dispatch of SelectionPathComponentsDidChange event.

* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel): Removed _treeElementSelected.
(WebInspector.NetworkSidebarPanel.prototype.canShowDifferentContentView): Renamed from _canShowDifferentContentView.
(WebInspector.NetworkSidebarPanel.prototype._canShowDifferentContentView): Deleted.
(WebInspector.NetworkSidebarPanel.prototype._treeElementSelected): Moved to NetworkGridContentView.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.treeElementSelected): Dispatch SelectionPathComponentsDidChange event.

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

4 years agoMedia Session: indicate to clients whether a media session has active media elements
mrajca@apple.com [Wed, 8 Jul 2015 23:46:16 +0000 (23:46 +0000)]
Media Session: indicate to clients whether a media session has active media elements
https://bugs.webkit.org/show_bug.cgi?id=146742

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageHasMediaSessionWithActiveMediaElements):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

4 years agoWeb Inspector: Confusingly crossed out properties in .sidebar > .panel.navigation...
drousso@apple.com [Wed, 8 Jul 2015 23:46:11 +0000 (23:46 +0000)]
Web Inspector: Confusingly crossed out properties in .sidebar > .panel.navigation.timeline > .title-bar
https://bugs.webkit.org/show_bug.cgi?id=146727

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
The properties map used for refreshing each property now holds a list of properties for each line to ensure that
if a duplicate property exists, it also gets refreshed.

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

4 years agoWeb Inspector: Can't select last row in the timeline because it's covered by filter...
drousso@apple.com [Wed, 8 Jul 2015 23:44:40 +0000 (23:44 +0000)]
Web Inspector: Can't select last row in the timeline because it's covered by filter selector
https://bugs.webkit.org/show_bug.cgi?id=146603

Reviewed by Timothy Hatcher.

* UserInterface/Views/ScopeBar.js: Now adds a class to the scope bar if the default item is selected.
* UserInterface/Views/LayoutTimelineView.js:
* UserInterface/Views/NetworkTimelineView.js:
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline > .navigation-bar-container): Deleted.
(.data-grid.timeline.has-non-default-filter > .navigation-bar-container): Deleted.
(.data-grid.timeline:hover > .navigation-bar-container): Deleted.
(.data-grid.timeline > .navigation-bar-container > .navigation-bar): Deleted.
(body.window-inactive .data-grid.timeline > .navigation-bar-container > .navigation-bar): Deleted.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.createColumnScopeBar):
(WebInspector.TimelineDataGrid.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple path):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.set contentTreeOutlineScopeBar):
Clears the title bar scope element and adds the given element as a child node.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineScopeBar):
Returns the scope bar element of the current object if it exists.

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

4 years agoMedia Session: propagate artwork URL with metadata to UI clients
mrajca@apple.com [Wed, 8 Jul 2015 23:43:09 +0000 (23:43 +0000)]
Media Session: propagate artwork URL with metadata to UI clients
https://bugs.webkit.org/show_bug.cgi?id=146698

Reviewed by Tim Horton.

* Shared/WebMediaSessionMetadata.h:
(WebKit::WebMediaSessionMetadata::artworkURL):
* UIProcess/API/C/WKMediaSessionMetadata.cpp:
(WKMediaSessionMetadataCopyArtworkURL):
* UIProcess/API/C/WKMediaSessionMetadata.h:

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

4 years agoDon't allow page scroll when previewing a link or image.
commit-queue@webkit.org [Wed, 8 Jul 2015 23:40:10 +0000 (23:40 +0000)]
Don't allow page scroll when previewing a link or image.
https://bugs.webkit.org/show_bug.cgi?id=146741
rdar://problem/21733053

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-07-08
Reviewed by Beth Dakin.

Don't let preview gesture and scroll panning gesture or zooming gesture recognize at the same time.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):

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

4 years agoSnapshots can be misplaced when custom swipe views are offset from the window origin
timothy_horton@apple.com [Wed, 8 Jul 2015 23:03:38 +0000 (23:03 +0000)]
Snapshots can be misplaced when custom swipe views are offset from the window origin
https://bugs.webkit.org/show_bug.cgi?id=146744
<rdar://problem/20942120>

Reviewed by Dean Jackson.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Keep swipeArea in window coordinates; it was already in window coordinates
when using custom swipe views, but not in the non-custom case.

Convert from window coordinates to parent-of-m_swipeLayer coordinates when
determining m_swipeLayer's frame.

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

4 years ago[iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
aestes@apple.com [Wed, 8 Jul 2015 23:02:43 +0000 (23:02 +0000)]
[iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
https://bugs.webkit.org/show_bug.cgi?id=146712

Reviewed by Benjamin Poulain.

r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
event could fire on the navigated-to page. This change extends this fix to apply to subframes.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::WebFrame):
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
(WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
(WebKit::WebPage::commitPotentialTap): Ditto.
(WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
(WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
(WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.

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

4 years agoMove PingLoaders to the NetworkingProcess.
beidson@apple.com [Wed, 8 Jul 2015 22:53:41 +0000 (22:53 +0000)]
Move PingLoaders to the NetworkingProcess.
<rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710

Reviewed by Tim Horton.

Source/WebCore:

No new tests.
There's no current solution for communicating back to a page that a ping load has reached its target.
Until we have such a solution, any attempt at a layout test will be fragile at best.

* WebCore.xcodeproj/project.pbxproj:

* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::createPingHandle): Default implementation is create the PingHandle directly.
* loader/LoaderStrategy.h:

PingLoader becomes a static class for now that crafts the ResourceRequest then passes it off
to the LoaderStrategy:
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
(WebCore::PingLoader::startPingLoad):
(WebCore::PingLoader::createPingLoader): Deleted.
(WebCore::PingLoader::PingLoader): Deleted.
(WebCore::PingLoader::~PingLoader): Deleted.
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired): Deleted.

PingHandle does what PingLoader used to - It's a basic ResourceHandleClient that simply waits
for any response/completion/failure and then deletes itself.
* platform/network/PingHandle.h: Added.
(WebCore::PingHandle::PingHandle):
(WebCore::PingHandle::usesAsyncCallbacks):
(WebCore::PingHandle::timeoutTimerFired):
(WebCore::PingHandle::~PingHandle):

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing): Create a PingHandle and then return.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createPingHandle): If the Network process is enabled,
  compile the appropriate load parameters and then message to it.
  Otherwise, use the default in-process PingHandle.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

4 years agoAdd new sources to StyleAllInOne.cpp
bfulgham@apple.com [Wed, 8 Jul 2015 21:38:10 +0000 (21:38 +0000)]
Add new sources to StyleAllInOne.cpp
https://bugs.webkit.org/show_bug.cgi?id=146584

Patch by Csaba Osztrogonác <ossy@webkit.org> on 2015-07-08
Reviewed by Brent Fulgham.

* WebCore.vcxproj/WebCore.vcxproj:
* rendering/style/StyleAllInOne.cpp:

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

4 years agoOnly support image previews for clients that implement commitPreviewedImageWithURL
bdakin@apple.com [Wed, 8 Jul 2015 21:15:01 +0000 (21:15 +0000)]
Only support image previews for clients that implement commitPreviewedImageWithURL
delegate
https://bugs.webkit.org/show_bug.cgi?id=146739
-and corresponding-
rdar://problem/21692929

Reviewed by Tim Horton.

We should only support image previews for clients that implement
commitPreviewedImageWithURL delegate since there is no default commit action.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):

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

4 years agoAdd new sources to DOMAllInOne.cpp
bfulgham@apple.com [Wed, 8 Jul 2015 21:11:04 +0000 (21:11 +0000)]
Add new sources to DOMAllInOne.cpp
https://bugs.webkit.org/show_bug.cgi?id=146587

Patch by Csaba Osztrogonác <ossy@webkit.org> on 2015-07-08
Reviewed by Brent Fulgham.

* WebCore.vcxproj/WebCore.vcxproj:
* dom/DOMAllInOne.cpp:

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

4 years agoAdd new sources to AccessibilityAllInOne.cpp
bfulgham@apple.com [Wed, 8 Jul 2015 20:49:55 +0000 (20:49 +0000)]
Add new sources to AccessibilityAllInOne.cpp
https://bugs.webkit.org/show_bug.cgi?id=146582

Patch by Csaba Osztrogonác <ossy@webkit.org> on 2015-07-08
Reviewed by Brent Fulgham.

* WebCore.vcxproj/WebCore.vcxproj:
* accessibility/AccessibilityAllInOne.cpp:

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

4 years agoWeb Inspector: Clicking style checkbox selects the property name while mouse down
drousso@apple.com [Wed, 8 Jul 2015 20:40:24 +0000 (20:40 +0000)]
Web Inspector: Clicking style checkbox selects the property name while mouse down
https://bugs.webkit.org/show_bug.cgi?id=146728

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
Now returns if the click was not at the end of the line.

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

4 years agoMake ApplicationStateTracker be per view instead of being a singleton
andersca@apple.com [Wed, 8 Jul 2015 20:36:09 +0000 (20:36 +0000)]
Make ApplicationStateTracker be per view instead of being a singleton
https://bugs.webkit.org/show_bug.cgi?id=146737

Reviewed by Andreas Kling.

* UIProcess/ApplicationStateTracker.h:
Update to be per view instead of a singleton.

* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
Change to take a view + selectors.

(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
Invalidate the state monitor and remove the listeners.

(WebKit::ApplicationStateTracker::applicationDidEnterBackground):
Just call the single background method.

(WebKit::ApplicationStateTracker::applicationWillEnterForeground):
Just call the single foreground method.

(WebKit::ApplicationStateTracker::singleton): Deleted.
(WebKit::ApplicationStateTracker::addListener): Deleted.
(WebKit::ApplicationStateTracker::invokeListeners): Deleted.
(WebKit::ApplicationStateTracker::pruneListeners): Deleted.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
Create the ApplicationStateTracker here.

(-[WKContentView isBackground]):
Get the ivar instead of the singleton.

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

4 years agoInteractionInformationAtPosition bounds seem wrong on many sites, affects
bdakin@apple.com [Wed, 8 Jul 2015 20:20:09 +0000 (20:20 +0000)]
InteractionInformationAtPosition bounds seem wrong on many sites, affects
apple.com
https://bugs.webkit.org/show_bug.cgi?id=146736
-and corresponding-
rdar://problem/21655549

Reviewed by Tim Horton.

http://trac.webkit.org/changeset/186132/ changed the bounds for
InteractionInformationAtPosition. The image-related changes are good, but the
link-related changes feel wrong on many sites. We should revert the change for now
and just use the absoluteBoundingBoxRect() for non-images.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

4 years agoREGRESSION (r185629): Web Inspector: Filtering doesn't display any items if folders...
timothy@apple.com [Wed, 8 Jul 2015 19:27:46 +0000 (19:27 +0000)]
REGRESSION (r185629): Web Inspector: Filtering doesn't display any items if folders are used to organize the web page resources
https://bugs.webkit.org/show_bug.cgi?id=146675

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeElement.prototype.revealed): Added ignoreHidden parameter.
(WebInspector.TreeElement.prototype.traverseNextTreeElement.shouldSkip): Pass true to ignore hidden elements.
(WebInspector.TreeElement.prototype.traverseNextTreeElement): Populate up front like the old traverseNextTreeElement.
This is needed to traverse into lazy populated tree elements. Don't call shouldSkip in the loop.
(WebInspector.TreeElement.prototype.traversePreviousTreeElement.shouldSkip): Pass true to ignore hidden elements.
(WebInspector.TreeElement.prototype.traversePreviousTreeElement): Add some newlines.

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

4 years ago[Mac] Two clicks required to enable AirPlay at youtube.com
eric.carlson@apple.com [Wed, 8 Jul 2015 18:54:34 +0000 (18:54 +0000)]
[Mac] Two clicks required to enable AirPlay at youtube.com
https://bugs.webkit.org/show_bug.cgi?id=146733
<rdar://problem/21556356>

Reviewed by Brent Fulgham.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::clientStateDidChange): Only log when state has changed.
  Don't steal the route if another client is actively playing to the device.
(WebCore::WebMediaSessionManager::setPlaybackTarget): Set m_targetChanged.
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't consider the
  requestedPicker flag until after a target change.
* Modules/mediasession/WebMediaSessionManager.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Add logging.
(WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget): Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Always log.

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

4 years agohttp/tests/xmlviewer/dumpAsText/svg.xml contains a typo that breaks the test with...
ddkilzer@apple.com [Wed, 8 Jul 2015 18:52:31 +0000 (18:52 +0000)]
http/tests/xmlviewer/dumpAsText/svg.xml contains a typo that breaks the test with libxml2 v2.9.2

* http/tests/xmlviewer/dumpAsText/svg.xml: Add missing space to
<svg:svg> tag make this test work with libxml2 v2.9.2.

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

4 years agoWeb Inspector: Pressing delete in the styles sidebar with no text causes text to...
drousso@apple.com [Wed, 8 Jul 2015 18:36:18 +0000 (18:36 +0000)]
Web Inspector: Pressing delete in the styles sidebar with no text causes text to become misaligned
https://bugs.webkit.org/show_bug.cgi?id=146715

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):
Now returns if the change was in the first character of the first line.

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

4 years agoAdd actions to image previews
bdakin@apple.com [Wed, 8 Jul 2015 17:58:35 +0000 (17:58 +0000)]
Add actions to image previews
https://bugs.webkit.org/show_bug.cgi?id=146702
-and corresponding-
<rdar://problem/21642654>

Reviewed by Sam Weinig.

Add an array of actions and _WKActivatedElementInfo in order to properly invoke
the actions.
* UIProcess/WKImagePreviewViewController.h:
* UIProcess/WKImagePreviewViewController.mm:
(-[WKImagePreviewViewController loadView]):
(-[WKImagePreviewViewController initWithCGImage:defaultActions:elementInfo:]):
(_scaleSizeWithinSize):
(-[WKImagePreviewViewController initWithCGImage:]): Deleted.

Re-factor defaultActionsForImageSheet into a stand-alone function so that it can
be invoked for previews as well as for the action sheet.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet]):
(-[WKActionSheetAssistant defaultActionsForImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):

WKImagePreviewViewController initializer now takes the default actions and
_WKActivatedElementInfo.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):

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

4 years ago<rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the...
mitz@apple.com [Wed, 8 Jul 2015 17:48:52 +0000 (17:48 +0000)]
<rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
https://bugs.webkit.org/show_bug.cgi?id=146732

Reviewed by Sam Weinig.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interpretKeyEvent:isCharEvent:]): Bail out if we are no longer the first
responder.

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

4 years ago[GTK] Unreviewed GTK gardening after r186500.
clopez@igalia.com [Wed, 8 Jul 2015 17:31:22 +0000 (17:31 +0000)]
[GTK] Unreviewed GTK gardening after r186500.

* platform/gtk/TestExpectations: Mark new failures and remove new passes
that were affected by the update of libraries inside the JHBuild.
* platform/gtk/fast/css/input-search-padding-expected.png: Rebaseline test.
* platform/gtk/fast/css/input-search-padding-expected.txt: Rebaseline test.

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

4 years agoAlways begin a background task when needed, not just when we go into the background
andersca@apple.com [Wed, 8 Jul 2015 17:24:01 +0000 (17:24 +0000)]
Always begin a background task when needed, not just when we go into the background
https://bugs.webkit.org/show_bug.cgi?id=146704

Reviewed by Gavin Barraclough.

The system let background code run for the same amount of time regardless of whether the assertion was grabbed
when the app is in the foreground or being backgrounded, so remove the background/foreground tracking code.

* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager init]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]): Deleted.

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

4 years agoNetwork Cache: Don't open files in main thread
antti@apple.com [Wed, 8 Jul 2015 17:18:03 +0000 (17:18 +0000)]
Network Cache: Don't open files in main thread
https://bugs.webkit.org/show_bug.cgi?id=146722

Follow-up.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::dispatchReadOperation):

    Accessing m_bodyFilter is technically not thread safe so keep it in main thread.

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

4 years agoNetwork Cache: Don't open files in main thread
antti@apple.com [Wed, 8 Jul 2015 17:02:54 +0000 (17:02 +0000)]
Network Cache: Don't open files in main thread
https://bugs.webkit.org/show_bug.cgi?id=146722

Reviewed by Chris Dumez.

While we use open() with O_NONBLOCK profiling indicates that we still may block up to 5ms under the syscall in some case.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::dispatchReadOperation):

    Dispatch read operation to a concurrent queue.
    With this we can also eliminate the separate dispatch() for body blob read.

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

4 years agoDo not waste window server memory for placeholder windows initiated by ThemeMac.
zalan@apple.com [Wed, 8 Jul 2015 16:48:28 +0000 (16:48 +0000)]
Do not waste window server memory for placeholder windows initiated by ThemeMac.
https://bugs.webkit.org/show_bug.cgi?id=146730
rdar://problem/20321222

Using defer:YES prevents us from wasting any window server resources for WebCoreThemeWindow(s).

Patch by Darin Adler.
Reviewed by Zalan Bujtas.

Not testable.

* platform/mac/ThemeMac.mm:
(-[WebCoreThemeView window]):

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

4 years agohttp/tests/security/XFrameOptions/x-frame-options-{cached,deny-delete-frame-in-load...
ddkilzer@apple.com [Wed, 8 Jul 2015 15:55:49 +0000 (15:55 +0000)]
http/tests/security/XFrameOptions/x-frame-options-{cached,deny-delete-frame-in-load-event}.html crash on Windows Debug bots

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-cached.html>
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-deny-delete-frame-in-load-event.html>

* platform/win/TestExpectations: Mark tests as crashing:
- http/tests/security/XFrameOptions/x-frame-options-cached.html
- http/tests/security/XFrameOptions/x-frame-options-deny-delete-frame-in-load-event.html

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

4 years ago[GTK] [Wayland] Allow building and testing the Wayland target with the default JHBuil...
clopez@igalia.com [Wed, 8 Jul 2015 14:00:31 +0000 (14:00 +0000)]
[GTK] [Wayland] Allow building and testing the Wayland target with the default JHBuild moduleset.
https://bugs.webkit.org/show_bug.cgi?id=146056

Reviewed by Martin Robinson.

* gtk/install-dependencies: libepoxy is now required for building GTK+.
* gtk/jhbuild-wayland.modules: Removed. Not longer needed.
* gtk/jhbuild.modules: Upgrade GTK+ (3.16.4) and required dependencies for building:
Cairo (1.14.2), Gdk-Pixbuf (2.30.8) and GLib (2.44.1).
* gtk/patches/cairo-1.12.8-add_disable-lto.patch: Removed. Not longer needed.
Cairo removed support for LTO on (1.14). Upstream commit: c7ff9bb.
* gtk/patches/gtk-3.6-do-not-shutdown-accessibility.patch: Removed. Not longer needed.
GTK+ merged this patch on GTK+-3.10. Upstream commit: 8d83d98.

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

4 years ago[GTK] Unreviewed GTK gardening.
clopez@igalia.com [Wed, 8 Jul 2015 13:43:25 +0000 (13:43 +0000)]
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Report and mark new failing tests.
* platform/gtk/editing/pasteboard/onpaste-text-html-expected.txt: Rebaseline after r186191.
* platform/gtk/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: Added. Rebaseline after r185166.
* platform/gtk/fast/images/gif-loop-count-expected.png: Removed. Remove unneded expected image result after 185310.
* platform/gtk/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: Rebaseline after r185533.
* platform/gtk/media/media-controls-clone-expected.png: Rebaseline after r184932.
* platform/gtk/media/media-controls-clone-expected.txt: Rebaseline after r184932.
* platform/gtk/media/video-controls-rendering-expected.png: Rebaseline after r184932.
* platform/gtk/media/video-controls-rendering-expected.txt: Rebaseline after r184932.

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

4 years ago[GTK] Deactivate GObject bindings for static methods
calvaris@igalia.com [Wed, 8 Jul 2015 10:34:41 +0000 (10:34 +0000)]
[GTK] Deactivate GObject bindings for static methods
https://bugs.webkit.org/show_bug.cgi?id=146717

Reviewed by Carlos Garcia Campos.

Static methods are currently not supported by GObject bindings so we deactivate them from the generation.

Current tests suffice. Expectations updated.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Skip isStatic functions.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_implements_method4): Deleted.
(webkit_dom_test_interface_supplemental_method4): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_class_method): Deleted.
(webkit_dom_test_obj_class_method_with_optional): Deleted.
(webkit_dom_test_obj_overloaded_method1): Deleted.

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

4 years ago[Unix] Remove unused local variable from Connection::sendOutgoingMessage().
commit-queue@webkit.org [Wed, 8 Jul 2015 10:28:23 +0000 (10:28 +0000)]
[Unix] Remove unused local variable from Connection::sendOutgoingMessage().
https://bugs.webkit.org/show_bug.cgi?id=146713

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-07-08
Reviewed by Csaba Osztrogonác.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::sendOutgoingMessage):

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

4 years agoWeb Inspector: Use "hairline" borders on retina screen
nvasilyev@apple.com [Wed, 8 Jul 2015 06:27:07 +0000 (06:27 +0000)]
Web Inspector: Use "hairline" borders on retina screen
https://bugs.webkit.org/show_bug.cgi?id=146619

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section):
(.style-declaration-section.locked):
(.style-declaration-section:not(.locked)):
(.style-declaration-section.last-in-group):
(.style-declaration-section + .style-declaration-section):
(.style-declaration-section.last-in-group + .style-declaration-section):
(@media (-webkit-min-device-pixel-ratio: 2)):
* UserInterface/Views/DetailsSection.css:
(.details-section .details-section):
(.details-section > .content > .group:nth-child(even)):
(@media (-webkit-min-device-pixel-ratio: 2)):
* UserInterface/Views/DividerNavigationItem.css:
(@media (-webkit-min-device-pixel-ratio: 2)):
* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules .label + .style-declaration-section):
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label.filter-matching-label):
(.sidebar > .panel.details.css-style > .content:not(.filter-in-progress) > .rules > .new-rule + .style-declaration-section):
(.sidebar > .panel.details.css-style > .content:not(.filter-in-progress) > .rules > .new-rule + .label):
(@media (-webkit-min-device-pixel-ratio: 2)):

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

4 years agoRemove the overflow checks from the important vectors used by the content extensions...
benjamin@webkit.org [Wed, 8 Jul 2015 05:44:42 +0000 (05:44 +0000)]
Remove the overflow checks from the important vectors used by the content extensions machines
https://bugs.webkit.org/show_bug.cgi?id=146703

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-07-07
Reviewed by Andreas Kling.

Most of the overflow checks cannot be eliminated by clang. Removing them
explicitly removes 400 ms from the compile time of a very large test list.

* contentextensions/ContentExtensionsDebugging.h:
* contentextensions/DFA.h:
* contentextensions/DFACombiner.cpp:
* contentextensions/DFAMinimizer.cpp:
* contentextensions/ImmutableNFA.h:
* contentextensions/MutableRangeList.h:
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::epsilonClosureExcludingSelf):
(WebCore::ContentExtensions::resolveEpsilonClosures):
(WebCore::ContentExtensions::extendSetWithClosure):
(WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
(WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
(WebCore::ContentExtensions::createCombinedTransition):
(WebCore::ContentExtensions::getOrCreateDFANode):
(WebCore::ContentExtensions::NFAToDFA::convert):

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

4 years agoWeb Inspector: Pressing tab on a comment in the styles sidebar doesn't highlight...
drousso@apple.com [Wed, 8 Jul 2015 05:27:17 +0000 (05:27 +0000)]
Web Inspector: Pressing tab on a comment in the styles sidebar doesn't highlight the comment
https://bugs.webkit.org/show_bug.cgi?id=146709

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectFirstProperty):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectLastProperty):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._textAtCursorIsComment):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._insertNewlineAfterCurrentLine):
Determines if the text at the given cursor position in the given line is a comment.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):

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

4 years agoWeb Inspector: spacebar should pause/resume timeline recording when timelines are...
drousso@apple.com [Wed, 8 Jul 2015 05:24:35 +0000 (05:24 +0000)]
Web Inspector: spacebar should pause/resume timeline recording when timelines are open
https://bugs.webkit.org/show_bug.cgi?id=143267

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineSidebarPanel): Added two new keyboard shortcuts: space and shift-space.
(WebInspector.TimelineSidebarPanel.prototype.shown): Enables the keyboard shortcuts.
(WebInspector.TimelineSidebarPanel.prototype.hidden): Disables the keyboard shortcuts.
(WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
(WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Starts/stops recording.

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

4 years agoWeb Inspector: Improve names for unprefixed animation events
commit-queue@webkit.org [Wed, 8 Jul 2015 05:23:46 +0000 (05:23 +0000)]
Web Inspector: Improve names for unprefixed animation events
https://bugs.webkit.org/show_bug.cgi?id=146708

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-07-07
Reviewed by Timothy Hatcher.

* UserInterface/Models/ScriptTimelineRecord.js:

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

4 years ago[iOS] MediaControls: Start Play and Can't Play buttons need to be cutout and blurred
dino@apple.com [Wed, 8 Jul 2015 02:19:45 +0000 (02:19 +0000)]
[iOS] MediaControls: Start Play and Can't Play buttons need to be cutout and blurred
https://bugs.webkit.org/show_bug.cgi?id=146226

Reviewed by Simon Fraser.

This patch takes what Said Abou-Hallawa posted in an earlier revision and
makes a few tweaks to workaround the bugs he's listed.

Replicate the iOS System blur backdrop in pure CSS, so that the large
start button looks more correct. Also add artwork for a failure state.

* Modules/mediacontrols/mediaControlsiOS.css: New style rules for the start
button, which now is a collection of elements rather than a <button>.
(video::-webkit-media-controls-start-playback-button):
(video::-webkit-media-controls-start-playback-background):
(video::-webkit-media-controls-start-playback-tint):

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createBase): Replace the <button> with the hierarchy of
elements to replicate the blur. Give some of them a class attribute, so they
can match selectors (see the bugs Said filed in the original bugzilla).
(ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): Toggle classes on
the hierarchy as needed.
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
(ControllerIOS.prototype.updateStatusDisplay): Ditto.

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

4 years agoCrash when parent iframe is set to display none and the child frame is mutated the...
zalan@apple.com [Wed, 8 Jul 2015 01:53:42 +0000 (01:53 +0000)]
Crash when parent iframe is set to display none and the child frame is mutated the same time.
https://bugs.webkit.org/show_bug.cgi?id=146699
rdar://problem/16207881

Reviewed by Andreas Kling.

When the parent iframe is set to display: none, we destroy the associated renderer (RenderIFrame).
However if the child frame is mutated the same time, during layout we try to access this RenderIFrame
to check whether it needs frame flattening.
This patch checks whether the parent render widget is still valid.

Source/WebCore:

Test: fast/frames/crash-display-none-iframe-during-onbeforeload.html

* page/FrameView.cpp:
(WebCore::FrameView::isInChildFrameWithFrameFlattening): rearrange early returns.

LayoutTests:

* fast/frames/crash-display-none-iframe-during-onbeforeload-expected.txt: Added.
* fast/frames/crash-display-none-iframe-during-onbeforeload.html: Added.
* fast/frames/resources/displaynone-this-during-object-beforeload.html: Added.

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

4 years agoOccasional null deref in the CA callback in flushLayers()
timothy_horton@apple.com [Tue, 7 Jul 2015 23:54:11 +0000 (23:54 +0000)]
Occasional null deref in the CA callback in flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=146700
<rdar://problem/21668754>

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Make sure we keep the WebPage alive, and null-check the potentially null
WebCore objects (Page and Frame).

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

4 years agoMedia Session: propagate metadata changes to UI clients
mrajca@apple.com [Tue, 7 Jul 2015 23:52:29 +0000 (23:52 +0000)]
Media Session: propagate metadata changes to UI clients
https://bugs.webkit.org/show_bug.cgi?id=146660

Reviewed by Tim Horton.

* CMakeLists.txt: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
* Shared/API/APIObject.h: Added a media session metadata type.
* Shared/API/c/WKBase.h:
* Shared/WebMediaSessionMetadata.cpp: Added API adapter for WebCore::MediaSessionMetadata.
(WebKit::WebMediaSessionMetadata::create):
(WebKit::WebMediaSessionMetadata::WebMediaSessionMetadata):
(WebKit::WebMediaSessionMetadata::~WebMediaSessionMetadata):
* Shared/WebMediaSessionMetadata.h: Added API adapter for WebCore::MediaSessionMetadata.
(WebKit::WebMediaSessionMetadata::title):
(WebKit::WebMediaSessionMetadata::artist):
(WebKit::WebMediaSessionMetadata::album):
* UIProcess/API/APIUIClient.h: Added 'mediaSessionMetadataDidChange' interface.
(API::UIClient::mediaSessionMetadataDidChange):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKMediaSessionMetadata.cpp: Added C wrapper for WebMediaSessionMetadata.
(WKMediaSessionMetadataGetTypeID):
(WKMediaSessionMetadataCopyTitle):
(WKMediaSessionMetadataCopyArtist):
(WKMediaSessionMetadataCopyAlbum):
* UIProcess/API/C/WKMediaSessionMetadata.h: Added C wrapper for WebMediaSessionMetadata.
* UIProcess/API/C/WKPage.cpp: Forward 'mediaSessionMetadataDidChange' to client.
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h: Added 'mediaSessionMetadataDidChange' callback.
* UIProcess/WebPageProxy.cpp: Forward 'mediaSessionMetadataDidChange' to UI client.
(WebKit::WebPageProxy::mediaSessionMetadataDidChange):
* WebKit2.xcodeproj/project.pbxproj: Added WebMediaSessionMetadata and WKMediaSessionMetadata.

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

4 years ago[Win] Unreviewed test skip after r186476.
bfulgham@apple.com [Tue, 7 Jul 2015 23:25:55 +0000 (23:25 +0000)]
[Win] Unreviewed test skip after r186476.

* platform/win/TestExpectations:

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

4 years agoMedia Session: remove seek forward/backward attributes
mrajca@apple.com [Tue, 7 Jul 2015 23:00:41 +0000 (23:00 +0000)]
Media Session: remove seek forward/backward attributes
https://bugs.webkit.org/show_bug.cgi?id=146645

Reviewed by Eric Carlson.

* Modules/mediasession/MediaRemoteControls.h:
* Modules/mediasession/MediaRemoteControls.idl:

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

4 years agoWeb Inspector: Timeline record bars are not white when the row is selected from the...
timothy@apple.com [Tue, 7 Jul 2015 22:57:01 +0000 (22:57 +0000)]
Web Inspector: Timeline record bars are not white when the row is selected from the sidebar
https://bugs.webkit.org/show_bug.cgi?id=146694

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineRecordBar.css:
(:matches(:focus, .force-focus) .selected .timeline-record-bar > .segment):
(:matches(:focus, .force-focus) .selected .timeline-record-bar > .segment.inactive):
(:matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):

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

4 years agoREGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding...
bfulgham@apple.com [Tue, 7 Jul 2015 22:32:54 +0000 (22:32 +0000)]
REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
https://bugs.webkit.org/show_bug.cgi?id=146695
<rdar://problem/21441466>

Reviewed by Tim Horton.

When we would currently use dictionary lookup to decide on our text selection, first check if we
are targeting an editable field. If we are, use the original selection behavior. Otherwise, use
the new "dictionary lookup" selection.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Only use dictionary lookup
when our target node is not editable.

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

4 years agoAnother attempt to fix CURL/Soup builds after r186476
beidson@apple.com [Tue, 7 Jul 2015 22:26:10 +0000 (22:26 +0000)]
Another attempt to fix CURL/Soup builds after r186476

Reviewed by NOBODY.

* platform/network/curl/SocketStreamHandle.h:

* platform/network/soup/SocketStreamHandle.h:

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

4 years agoAttempt to fix CURL/Soup builds after r186476
beidson@apple.com [Tue, 7 Jul 2015 21:37:21 +0000 (21:37 +0000)]
Attempt to fix CURL/Soup builds after r186476

Reviewed by NOBODY.

* platform/network/curl/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):

* platform/network/soup/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):

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

4 years agoWeb Inspector: Unnecessary space added after -webkit- prefixed property values
drousso@apple.com [Tue, 7 Jul 2015 21:21:36 +0000 (21:21 +0000)]
Web Inspector: Unnecessary space added after -webkit- prefixed property values
https://bugs.webkit.org/show_bug.cgi?id=146671

Reviewed by Joseph Pecoraro.

* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css: Added.
* Tools/PrettyPrinting/index.html:
* UserInterface/Views/CodeMirrorFormatters.js: Now only adds a space if both the current and previous
tokens are a property, value, or atom.

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

4 years agoHTTP Auth cached after disabling private browsing/reset.
beidson@apple.com [Tue, 7 Jul 2015 21:13:31 +0000 (21:13 +0000)]
HTTP Auth cached after disabling private browsing/reset.
<rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654

Reviewed by Tim Horton.

Source/WebCore:

Test: http/tests/security/private-browsing-http-auth.html

- Change most static CredentialStorage methods to be instance methods instead.
- Make a CredentialStorage objects be per-NetworkStorageSession.

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::connect): Only start the web socket load if a networking
  context is available.

* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::defaultCredentialStorage): Returns the credential storage
  from the default NetworkStorageSession.
(WebCore::CredentialStorage::set):
(WebCore::CredentialStorage::get):
(WebCore::CredentialStorage::remove):
(WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
(WebCore::CredentialStorage::clearCredentials):
(WebCore::protectionSpaceToCredentialMap): Deleted.
(WebCore::originsWithCredentials): Deleted.
(WebCore::pathToDefaultProtectionSpaceMap): Deleted.
(WebCore::findDefaultProtectionSpaceForURL): Deleted.
(WebCore::CredentialStorage::setPrivateMode): Deleted. Was a no-op anyways.
* platform/network/CredentialStorage.h:

* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::credentialStorage):

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):

* platform/network/cf/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::getStoredCONNECTProxyCredentials):
(WebCore::getStoredCONNECTProxyCredentials): Deleted.

* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::applyAuthenticationToRequest):

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::applyAuthenticationToRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):

Source/WebKit/mac:

* Misc/WebCache.h:
* Misc/WebCache.mm:
(+[WebCache clearCachedCredentials]): Clear the global CredentialStorage as well as the
  storages belonging to each main frame of each WebView. This method is for DRT.

* Misc/WebDownload.mm:
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):

* Plugins/WebBaseNetscapePluginView.mm:
(WebKit::getAuthenticationInfo):

* WebView/WebView.mm:
(-[WebView _clearCredentials]): Clear the storage belonging to the current networking session
  of the main frame of this WebView.
* WebView/WebViewInternal.h:

Source/WebKit/win:

* WebDownloadCFNet.cpp:
(WebDownload::didReceiveAuthenticationChallenge):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getAuthenticationInfo):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting): Clear in-memory credentials in between test runs.

LayoutTests:

* http/tests/security/private-browsing-http-auth-expected.txt: Added.
* http/tests/security/private-browsing-http-auth.html: Added.
* http/tests/security/resources/auth-echo.php: Added.
* http/tests/security/resources/basic-auth.php: Added.
* platform/wk2/TestExpectations:

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

4 years agoREGRESSION(169105): CSS Regions: renderer returns wrong selection root when it is...
zalan@apple.com [Tue, 7 Jul 2015 20:09:22 +0000 (20:09 +0000)]
REGRESSION(169105): CSS Regions: renderer returns wrong selection root when it is inside a column flow.
https://bugs.webkit.org/show_bug.cgi?id=146529
rdar://problem/21613670

Reviewed by Mihnea Ovidenie and David Kilzer.

This patch ensures that RenderObject::selectionRoot() handles column flows properly while searching for the associated
selection root.
When the renderer is inside a column flow and the column flow is part of a named flow, we stop
traversing the ancestor chain, searching for the selection root, when we reach the column flow.
Since the column flow is not a selection root, we mistakenly fall back to the RenderView as selection root.
Instead, we should check if the column is inside a named flow and return the selection root accordingly.
Returning the wrong selection root confuses RenderView::splitSelectionBetweenSubtrees() logic and this particular
RenderObject could end up in multiple selection trees.

Source/WebCore:

Test: fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionRoot):

LayoutTests:

* fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow-expected.txt: Added.
* fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html: Added.

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

4 years ago[Mac] REGRESSION (r184794): Play/Pause control doesn't update state in full screen
bfulgham@apple.com [Tue, 7 Jul 2015 20:03:50 +0000 (20:03 +0000)]
[Mac] REGRESSION (r184794): Play/Pause control doesn't update state in full screen
https://bugs.webkit.org/show_bug.cgi?id=146689
<rdar://problem/21393490>

Reviewed by Dean Jackson.

The changes in r184794 did not take full screen mode into account. This needed to be corrected.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handlePanelTransitionEnd):
(Controller.prototype.setPlaying):
(Controller.prototype.showControls):

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

4 years agoWeb Inspector: Pad ruler selection area by 1px in the Rendering Frames timeline overview
mattbaker@apple.com [Tue, 7 Jul 2015 19:58:03 +0000 (19:58 +0000)]
Web Inspector: Pad ruler selection area by 1px in the Rendering Frames timeline overview
https://bugs.webkit.org/show_bug.cgi?id=146248

Reviewed by Timothy Hatcher.

* UserInterface/Views/RenderingFrameTimelineOverview.js:
Enable duration pixel alignment.

* UserInterface/Views/TimelineOverview.css:
(.timeline-overview.frames > .timeline-ruler > .header > .divider):
(.timeline-overview.frames > .timeline-ruler > .selection-handle.right):
(.timeline-overview.frames > .timeline-ruler > .shaded-area.right):
Shift ruler elements 1 pixel to the right, so that selection boundaries and dividers are
positioned inside the gap between frame elements.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
(WebInspector.TimelineOverview.prototype.get pixelAlignDuration):
(WebInspector.TimelineOverview.prototype.set pixelAlignDuration):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
Added a property to force the overview graph to align duration units on the y-axis to pixel boundaries.
When enabled, frame elements are displayed in integer widths while zooming, preventing subpixel blurring
and maintaining a consistent 1 pixel gap between frames.

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

4 years agoMake sure to remove the download message receiver before freeing it
andersca@apple.com [Tue, 7 Jul 2015 19:24:06 +0000 (19:24 +0000)]
Make sure to remove the download message receiver before freeing it
https://bugs.webkit.org/show_bug.cgi?id=146687

Reviewed by Simon Fraser.

* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::downloadFinished):

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

4 years agoSnap point regions containing X and Y snap points should do a better job animating
commit-queue@webkit.org [Tue, 7 Jul 2015 19:12:22 +0000 (19:12 +0000)]
Snap point regions containing X and Y snap points should do a better job animating
https://bugs.webkit.org/show_bug.cgi?id=142523
<rdar://problem/20100753>

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2015-07-07
Reviewed by Brent Fulgham.

Source/WebCore:

Reimplemented snap point animations to use a single timer for both horizontal and
vertical axes to better support 2D snap scrolling. Instead of making velocity
dependent on progress to the snap point and handling 2D snapping with different
timer update functions, this implementation uses a fixed animation time to coordinate
the snapping animation across both axes.

Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Refactored to use a single scroll snap timer.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: See above.
(WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): See above.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): See above.
* platform/cocoa/ScrollController.h: Refactored to use a single scroll snap timer and update function to handle
    snapping in both axes. This entails removing the ScrollEventAxis parameter from various functions below. Also
    removed methods that computed "snap" and "glide" offsets.
(WebCore::ScrollControllerClient::startScrollSnapTimer): See above.
(WebCore::ScrollControllerClient::stopScrollSnapTimer): See above.
* platform/cocoa/ScrollController.mm: See above.
(WebCore::ScrollController::ScrollController): Added new constants used to compute animation offsets.
(WebCore::ScrollController::snapRubberBandTimerFired):  Added a check to prevent the rubber band timer from firing
    alongside the scroll snap timer. This results in scroll snapping taking precedence over rubber banding when
    scrolling against the edge of a container in the case of 2D scrolling. We didn't run into this issue before
    because snapping wasn't working properly at the edges of a 2D scrolling container. In the future, we may want
    to unify both snap scrolling and rubber banding timers to solve this issue.
(WebCore::ScrollController::isScrollSnapInProgress): Refactored to use a single scroll snap timer.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Fixed an issue where wheel deltas were being pushed
    to the snap state incorrectly.
(WebCore::ScrollController::processWheelEventForScrollSnap): Fixed an issue with 2D snapping where scrolling in 2 axes
    simultaneously would cause the vertical axis to override the horizontal axis. This is more like a sub-issue of fixing
    2D scrolling, and is required for 2D snap animations to work properly.
(WebCore::ScrollController::startScrollSnapTimer): Refactored to use a single scroll snap timer.
(WebCore::ScrollController::stopScrollSnapTimer): See above.
(WebCore::ScrollController::scrollSnapTimerFired): This new method handles snap scroll updates on both axes.
(WebCore::ScrollController::beginScrollSnapAnimation): Refactored to account for single scroll snap timer.
(WebCore::ScrollController::endScrollSnapAnimation): See above.
(WebCore::ScrollController::initializeScrollSnapAnimationParameters): New method that initializes parameters used to
    coordinate the animation state across horizontal and vertical axes.
(WebCore::ScrollController::isSnappingOnAxis):  Checks whether or not a given axis is currently scroll snapping. This will
    return true in the case of active 2D scroll snapping.
(WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Deleted.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Deleted.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Deleted.
(WebCore::ScrollController::scrollSnapAnimationUpdate): Deleted.
(WebCore::ScrollController::initializeGlideParameters): Deleted.
(WebCore::snapProgress): Deleted.
(WebCore::clampedSnapMagnitude): Deleted.
(WebCore::ScrollController::computeSnapDelta): Deleted.
(WebCore::snapGlide): Deleted.
(WebCore::ScrollController::computeGlideDelta): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.h:  Added a new datastructure, ScrollSnapAnimationCurveState, which tracks
    the scroll snap animation state across both axes.
* platform/cocoa/ScrollSnapAnimatorState.mm: Removed fields relevant to the former "gliding" model and renamed the
    initial wheel delta variable to reflect this.
(WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Fixed an issue where wheel deltas were being pushed
    to the snap state incorrectly.
(WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Tiny for loop incrementor style fix.
(WebCore::ScrollSnapAnimatorState::isSnapping): Checks whether this state is in either snapping or gliding mode.
(WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Checks whether the scroll velocity is
    consistent with the initial and target offsets.
(WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Interpolates the offset for a given progress value.
(WebCore::ScrollSnapAnimationCurveState::ScrollSnapAnimationCurveState): New constants.
(WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Abstracts out part of the initialization process.
(WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Abstracts out part of the
    initialization process.
(WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Abstracts out curve interpolation.
(WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Added.
(WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Added.

LayoutTests:

Tests that snap points are honored when scrolling in a 2D overflow container.

* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Added.

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

4 years agoWeb Inspector: Tabbing in the styles sidebar doesn't highlight the next section of...
drousso@apple.com [Tue, 7 Jul 2015 18:28:45 +0000 (18:28 +0000)]
Web Inspector: Tabbing in the styles sidebar doesn't highlight the next section of text
https://bugs.webkit.org/show_bug.cgi?id=146676

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue): Modified the logic to only search the
remaining text after the current cursor position.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey): Now only searches for matches before the colon.

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

4 years agoUnreviewed, Fix non-Mac build after r186464.
cdumez@apple.com [Tue, 7 Jul 2015 17:28:26 +0000 (17:28 +0000)]
Unreviewed, Fix non-Mac build after r186464.

* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):

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

4 years agoWeb Inspector: Option+Click not jumping to resource
drousso@apple.com [Tue, 7 Jul 2015 17:25:48 +0000 (17:25 +0000)]
Web Inspector: Option+Click not jumping to resource
https://bugs.webkit.org/show_bug.cgi?id=146498

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js: Always show the tab which contains the represented object.
(WebInspector._domNodeWasInspected):
(WebInspector._frameWasAdded):
(WebInspector.showConsoleTab):
(WebInspector.showRepresentedObject): Removed forceShowTab parameter.
(WebInspector.showMainFrameDOMTree):
(WebInspector.showContentFlowDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):

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

4 years agoUnreviewed, attempt to fix iOS build.
cdumez@apple.com [Tue, 7 Jul 2015 17:22:28 +0000 (17:22 +0000)]
Unreviewed, attempt to fix iOS build.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):

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

4 years agoMake sure to remove message receivers before they are deallocated
andersca@apple.com [Tue, 7 Jul 2015 17:12:41 +0000 (17:12 +0000)]
Make sure to remove message receivers before they are deallocated
https://bugs.webkit.org/show_bug.cgi?id=146666
rdar://problem/21331118

Reviewed by Tim Horton.

Add code so we can assert that there are no message receiver maps pointing to a message receiver
when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.

* Platform/IPC/MessageReceiver.h:
(IPC::MessageReceiver::~MessageReceiver):
(IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
(IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
* Platform/IPC/MessageReceiverMap.cpp:
(IPC::MessageReceiverMap::addMessageReceiver):
(IPC::MessageReceiverMap::removeMessageReceiver):
(IPC::MessageReceiverMap::invalidate):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::removeMessageReceiver):
* Shared/ChildProcess.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::removeMessageReceiver):
* Shared/ChildProcessProxy.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController dealloc]):
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::invalidate):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController dealloc]):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::invalidate):

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

4 years agoWeb Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
drousso@apple.com [Tue, 7 Jul 2015 17:11:43 +0000 (17:11 +0000)]
Web Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
https://bugs.webkit.org/show_bug.cgi?id=146672

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now returns if completions are showing.

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

4 years agoWeb Inspector: Properly align checkboxes in the styles sidebar
nvasilyev@apple.com [Tue, 7 Jul 2015 16:25:37 +0000 (16:25 +0000)]
Web Inspector: Properly align checkboxes in the styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=146673

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines input[type=checkbox]):

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

4 years agoREGRESSION(r183706): HTMLImageElement sometimes fails to register as document named...
akling@apple.com [Tue, 7 Jul 2015 15:54:20 +0000 (15:54 +0000)]
REGRESSION(r183706): HTMLImageElement sometimes fails to register as document named item.
<https://webkit.org/b/146679>
<rdar://problem/21613839>

Reviewed by Antti Koivisto.

Source/WebCore:

After r183706, Element::hasName() no longer returns outdated information when called
inside a parseAttribute() override. HTMLImageElement was relying on this to check
if it *used* to have a name attribute before the currently parsing one was set.

Since parseAttribute() only shows subclasses the new attribute value, I'm adding a
flag to HTMLImageElement that remembers whether we had a name attribute or not.

Test: fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLImageElement.h:

LayoutTests:

Add a test that would assert when removing a named HTMLImageElement from the DOM
after having failed to register it as a document named item.

* fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash-expected.txt: Added.
* fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html: Added.

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

4 years agoREGRESSION (r186388): http/tests/security/contentSecurityPolicy/userAgentShadowDOM...
ddkilzer@apple.com [Tue, 7 Jul 2015 11:27:15 +0000 (11:27 +0000)]
REGRESSION (r186388): http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html always fails on Windows

* platform/win/TestExpectations: Consolidate WebAudio skips.
Mark test as always failing:
- http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html

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

4 years agohttp/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin...
ddkilzer@apple.com [Tue, 7 Jul 2015 11:27:09 +0000 (11:27 +0000)]
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html crashes on Windows sometimes

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-deny-meta-tag-parent-same-origin-allow.html>

* platform/win/TestExpectations: Mark test as crashing, too:
- http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html

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

4 years agoEl Capitan: Hangs caused by PDFs should be fixed
ddkilzer@apple.com [Tue, 7 Jul 2015 11:07:44 +0000 (11:07 +0000)]
El Capitan: Hangs caused by PDFs should be fixed

* platform/mac-wk1/TestExpectations: Remove skipped tests as the
PDF hangs should be fixed.

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

4 years agoREGRESSION (r186391): css3/masking/mask-repeat-space-padding.html image-only failure...
ddkilzer@apple.com [Tue, 7 Jul 2015 11:07:38 +0000 (11:07 +0000)]
REGRESSION (r186391): css3/masking/mask-repeat-space-padding.html image-only failure on El Capitan WK1

* platform/mac-wk1/TestExpectations: Mark as image-only failure:
- css3/masking/mask-repeat-space-padding.html

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

4 years agoSource/WebCore:
youenn.fablet@crf.canon.fr [Tue, 7 Jul 2015 08:00:22 +0000 (08:00 +0000)]
Source/WebCore:
[Streams API] Remove ReadableStreamReader.read() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146643

Reviewed by Darin Adler.

Moved ReadableStreamReader.read handling from callbacks to promises.
Introduced DOMPromiseIteratorWithCallback for that purpose: it takes resolve() to resolve a promise with a not-ending iterator value,
resolveEnd() to resolve a promise with a terminating iterator value and reject().
Added template helper routine to convert typed values to JS iterator wrapping the value.
Removed ReadableStreamReader.read custom binding.

Covered by rebased tests.

* Modules/streams/ReadableStream.cpp: Updated code to use DOMPromiseIteratorWithCallback API.
(WebCore::ReadableStream::releaseReader):
(WebCore::ReadableStream::changeStateToErrored):
(WebCore::ReadableStream::read):
(WebCore::ReadableStream::resolveReadCallback):
* Modules/streams/ReadableStream.h:
* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::read):
* Modules/streams/ReadableStreamReader.h:
* Modules/streams/ReadableStreamReader.idl: Removed custom binding.
* bindings/js/JSDOMBinding.h:
(WebCore::toJSIterator): create JS iterator from typed value.
(WebCore::toJSIteratorEnd): create JS end iterator.
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredWrapper::globalObject): Added globaObject getter and removed promise getter.
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback):
(WebCore::Error>::resolve):
(WebCore::Error>::resolveEnd):
(WebCore::Error>::reject):
* bindings/js/JSReadableStreamReaderCustom.cpp: Removed custom binding.

LayoutTests:
[Streams API] Remove ReadableStreamStream.read() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146643

Reviewed by Darin Adler.

* streams/reference-implementation/brand-checks-expected.txt:

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

4 years agoREGRESSION: Slider thumb does not render properly (image tests with <input type=...
zalan@apple.com [Tue, 7 Jul 2015 05:04:36 +0000 (05:04 +0000)]
REGRESSION: Slider thumb does not render properly (image tests with <input type="range">)
https://bugs.webkit.org/show_bug.cgi?id=146669
rdar://problem/21677831

Reviewed by Simon Fraser.

Draw NSSliderCell's knob only when slider's thumb paint is requested.

Covered by existing tests.

Source/WebCore:

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):

LayoutTests:

* platform/mac/TestExpectations: Unskip slider tests.

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

4 years agoMove shouldIgnoreAttributeCase inline function to Element.h
ossy@webkit.org [Tue, 7 Jul 2015 04:27:03 +0000 (04:27 +0000)]
Move shouldIgnoreAttributeCase inline function to Element.h
https://bugs.webkit.org/show_bug.cgi?id=146588

Reviewed by Andreas Kling.

* dom/Element.cpp:
(WebCore::shouldIgnoreAttributeCase): Deleted.
* dom/Element.h:
(WebCore::shouldIgnoreAttributeCase):
* dom/NamedNodeMap.cpp:
(WebCore::shouldIgnoreAttributeCase): Deleted.

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

4 years agoRemove the unused HeapBlock.h
ossy@webkit.org [Tue, 7 Jul 2015 04:20:28 +0000 (04:20 +0000)]
Remove the unused HeapBlock.h
https://bugs.webkit.org/show_bug.cgi?id=146580

Reviewed by Andreas Kling.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopiedBlock.h:
* heap/CopiedSpace.h:
* heap/CopiedSpaceInlines.h:
* heap/HandleBlock.h:
* heap/HeapBlock.h: Removed.
* heap/MarkedBlock.h:

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

4 years agoEnsure media playback is stopped during page close
bfulgham@apple.com [Tue, 7 Jul 2015 03:40:19 +0000 (03:40 +0000)]
Ensure media playback is stopped during page close
https://bugs.webkit.org/show_bug.cgi?id=146554
<rdar://problem/18033944>

Reviewed by Brady Eidson.

Source/WebCore:

* Modules/webaudio/AudioContext.cpp:
(WebCore::WebAudio::hostingDocument): Added.
* Modules/webaudio/AudioContext.h:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::hostingDocument): Added.
* dom/Document.cpp:
(WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
* platform/audio/PlatformMediaSession.h:
Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
playback on elements that match the provided document.
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
on all elements in the current process.
* platform/audio/PlatformMediaSessionManager.h:

Source/WebKit2:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
the process is being shut down.

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

4 years agoIsolated worlds should respect Content Security Policy; User Agent Shadow DOM
dbates@webkit.org [Tue, 7 Jul 2015 03:12:14 +0000 (03:12 +0000)]
Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
should be exempt from Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=144830
<rdar://problem/18860261>

Inadvertently omitted argument overrideContentSecurityPolicy in calls to ContentSecurityPolicy::allowEval()
that explicitly specified a report status. And the report status, which is an enum, was being implicitly
converted to bool.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* page/DOMSecurityPolicy.cpp:
(WebCore::DOMSecurityPolicy::allowsEval):

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

4 years agoUnreviewed, rolling out r186385.
commit-queue@webkit.org [Tue, 7 Jul 2015 01:42:15 +0000 (01:42 +0000)]
Unreviewed, rolling out r186385.
https://bugs.webkit.org/show_bug.cgi?id=146668

crashes 3 webaudio tests in debug builds (Requested by
alexchristensen on #webkit).

Reverted changeset:

"Ensure media playback is stopped during page close"
https://bugs.webkit.org/show_bug.cgi?id=146554
http://trac.webkit.org/changeset/186385

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

4 years agoCrash when setting text direction via MakeTextWritingDirection* editing commands.
akling@apple.com [Tue, 7 Jul 2015 01:37:40 +0000 (01:37 +0000)]
Crash when setting text direction via MakeTextWritingDirection* editing commands.
<https://webkit.org/b/146665>
<rdar://problem/20835477>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Fix two buggy clients of enclosingBlock(node) that would fail if the returned
element is the same as the node passed in.

Test: editing/style/change-text-direction-crash.html

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):

LayoutTests:

Add a test that covers some very simple MakeTextWritingDirection* command usage.

* editing/style/change-text-direction-crash-expected.txt: Added.
* editing/style/change-text-direction-crash.html: Added.

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

4 years agoRevert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494)
simon.fraser@apple.com [Tue, 7 Jul 2015 01:16:24 +0000 (01:16 +0000)]
Revert use of  SVG <mask> elements for -webkit-mask-image (r176798, r177494)
https://bugs.webkit.org/show_bug.cgi?id=146653

Reviewed by Dean Jackson.

Fixes rdar://problem/21435233.

r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
was not being maintained, so revert it.

This patch reverts r176798.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText): Deleted.
(WebCore::CSSValue::destroy): Deleted.
* css/CSSValue.h:
(WebCore::CSSValue::isWebKitCSSResourceValue): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::maskImageValueFromIterator): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments): Deleted.
* css/WebKitCSSResourceValue.cpp: Removed.
* css/WebKitCSSResourceValue.h: Removed.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::addCachedResource): Deleted.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading):
(WebCore::CachedSVGDocument::CachedSVGDocument): Deleted.
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::load):
* loader/cache/CachedSVGDocumentReference.h:
* page/FrameView.cpp:
(WebCore::FrameView::containsSVGDocument): Deleted.
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::createPageFromBuffer): Deleted.
* page/Page.h:
* platform/ScrollView.h:
(WebCore::ScrollView::containsSVGDocument): Deleted.
* platform/graphics/MaskImageOperation.cpp: Removed.
* platform/graphics/MaskImageOperation.h: Removed.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerFilterInfo.cpp:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLayerMaskImageInfo.h: Removed.
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::operator==):
(WebCore::FillLayer::cullEmptyLayers):
(WebCore::layerImagesIdentical):
(WebCore::FillLayer::FillLayer): Deleted.
(WebCore::FillLayer::operator=): Deleted.
(WebCore::FillLayer::hasNonEmptyMaskImage): Deleted.
(WebCore::FillLayer::imagesAreLoaded): Deleted.
* rendering/style/FillLayer.h:
(WebCore::FillLayer::maskImage): Deleted.
(WebCore::FillLayer::imageOrMaskImage): Deleted.
(WebCore::FillLayer::setMaskImage): Deleted.
(WebCore::FillLayer::clearMaskImage): Deleted.
(WebCore::FillLayer::hasMaskImage): Deleted.
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::applySVGMask): Deleted.
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer): Deleted.
* rendering/svg/RenderSVGResourceMasker.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
(WebCore::SVGMaskElement::addClientRenderLayer): Deleted.
(WebCore::SVGMaskElement::removeClientRenderLayer): Deleted.
* svg/SVGMaskElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateExternalDocument):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):

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

4 years agoRevert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
simon.fraser@apple.com [Tue, 7 Jul 2015 01:15:01 +0000 (01:15 +0000)]
Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
https://bugs.webkit.org/show_bug.cgi?id=146653

Reviewed by Dean Jackson.

Fixes rdar://problem/21435233.

r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
was not being maintained, so revert it.

This patch reverts r177494.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseMaskImage): Deleted.
* css/CSSParser.h:
* css/CSSPropertyNames.in:
* css/CSSValue.h:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMaskImageOperations): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::loadPendingImages):
(WebCore::StyleResolver::adjustStyleForMaskImages): Deleted.
(WebCore::StyleResolver::applyMatchedProperties): Deleted.
* css/StyleResolver.h:
* page/FrameView.cpp:
(WebCore::FrameView::containsSVGDocument):
* page/FrameView.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::blendFunc): Deleted.
(WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper): Deleted.
(WebCore::MaskImagePropertyWrapper::equals): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::containsSVGDocument):
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::~MaskImageOperation): Deleted.
(WebCore::MaskImageOperation::operator==): Deleted.
* platform/graphics/MaskImageOperation.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::updateFillImages):
(WebCore::RenderElement::~RenderElement): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer): Deleted.
(WebCore::RenderLayer::calculateClipRects): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerMaskImageInfo.cpp: Removed.
* rendering/style/FillLayer.h:
(WebCore::FillLayer::image):
(WebCore::FillLayer::imageOrMaskImage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setMaskImage): Deleted.
* rendering/style/RenderStyle.h:

LayoutTests:

* css3/masking/mask-base64-expected.html: Removed.
* css3/masking/mask-base64.html: Removed.
* css3/masking/mask-multiple-values-expected.html: Removed.
* css3/masking/mask-multiple-values.html: Removed.
* css3/masking/mask-repeat-space-padding-expected.html:
* css3/masking/mask-repeat-space-padding.html:
* css3/masking/mask-svg-clipped-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-clipped-fragmentId.html: Removed.
* css3/masking/mask-svg-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-fragmentId.html: Removed.
* css3/masking/mask-svg-inline-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-inline-fragmentId.html: Removed.
* css3/masking/mask-svg-inline-invalid-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-inline-invalid-fragmentId.html: Removed.
* css3/masking/mask-svg-invalid-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-invalid-fragmentId.html: Removed.
* css3/masking/mask-svg-no-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-no-fragmentId-tiled-expected.html: Removed.
* css3/masking/mask-svg-no-fragmentId-tiled.html: Removed.
* css3/masking/mask-svg-no-fragmentId.html: Removed.
* css3/masking/mask-svg-script-entire-svg-to-mask-expected.html: Removed.
* css3/masking/mask-svg-script-entire-svg-to-mask.html: Removed.
* css3/masking/mask-svg-script-mask-to-entire-svg-expected.html: Removed.
* css3/masking/mask-svg-script-mask-to-entire-svg.html: Removed.
* css3/masking/mask-svg-script-mask-to-none-expected.html: Removed.
* css3/masking/mask-svg-script-mask-to-none.html: Removed.
* css3/masking/mask-svg-script-mask-to-png-expected.html: Removed.
* css3/masking/mask-svg-script-mask-to-png.html: Removed.
* css3/masking/mask-svg-script-none-to-mask-expected.html: Removed.
* css3/masking/mask-svg-script-none-to-mask.html: Removed.
* css3/masking/mask-svg-script-none-to-png-expected.html: Removed.
* css3/masking/mask-svg-script-none-to-png.html: Removed.
* css3/masking/mask-svg-script-png-to-mask-expected.html: Removed.
* css3/masking/mask-svg-script-png-to-mask.html: Removed.
* css3/masking/mask-svg-script-png-to-none-expected.html: Removed.
* css3/masking/mask-svg-script-png-to-none.html: Removed.
* css3/masking/resources/masks.svg: Removed.

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

4 years agoRevert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
simon.fraser@apple.com [Tue, 7 Jul 2015 01:11:49 +0000 (01:11 +0000)]
Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
https://bugs.webkit.org/show_bug.cgi?id=146653

Fixes rdar://problem/21435233.

This patch reverts r186180, but keeps the layout test.

This feature caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
was not being maintained, so revert it.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource): Deleted.
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::acceptOverride): Deleted.
(WebCore::CachedResourceRequest::setAcceptOverride): Deleted.
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::load): Deleted.
* loader/cache/CachedSVGDocumentReference.h:
(WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType): Deleted.
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
(WebCore::MaskImageOperation::notifyFinished):

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

4 years agoFix the Windows build following <https://trac.webkit.org/changeset/186388>
dbates@webkit.org [Tue, 7 Jul 2015 01:05:48 +0000 (01:05 +0000)]
Fix the Windows build following <https://trac.webkit.org/changeset/186388>
(https://bugs.webkit.org/show_bug.cgi?id=144830)

As we for for Mac in WebCoreAVFResourceLoader::startLoading(), instantiate ResourceLoaderOptions
with ContentSecurityPolicyImposition::DoPolicyCheck.

* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):

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

4 years agoIsolated worlds should respect Content Security Policy; User Agent Shadow DOM
dbates@webkit.org [Tue, 7 Jul 2015 00:42:50 +0000 (00:42 +0000)]
Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
should be exempt from Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=144830
<rdar://problem/18860261>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make scripts that run in an isolated world be subject to the Content Security Policy (CSP) of the page
and exempt features implemented using a user agent shadow DOM. As a side effect of this change,
Safari Content Extensions will respect the CSP policy of the page when loading subresources (e.g. an image).

Tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html
       http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html
       http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
* css/CSSCanvasValue.h:
(WebCore::CSSCanvasValue::loadSubimages): Modified to take argument ResourceLoaderOptions (unused).
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
the cross fade is applied to an element in a user agent shadow tree.
(WebCore::CSSCrossfadeValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
(WebCore::CSSCrossfadeValue::image): Explicitly instantiate default ResourceLoaderOptions and pass it
when requesting a cached image. Added FIXME comment to skip Content Security Policy check when the cross
fade is applied to an element in a user agent shadow tree.
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedImage): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
the cross fade is applied to an element in a user agent shadow tree.
(WebCore::CSSFilterImageValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
(WebCore::CSSFilterImageValue::loadSubimages): Explicitly instantiate default ResourceLoaderOptions and pass
pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
the cross fade is applied to an element in a user agent shadow tree.
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont): Take a boolean, isInitiatingElementInUserAgentShadowTree,
so as to determine the appropriate CSP imposition. In particular, we skip the CSP check when the initiating element
(e.g. SVG font-face element) is in a user agent shadow tree.
* css/CSSFontFaceSrcValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
it as appropriate.
* css/CSSFontSelector.h:
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::loadSubimages): Ditto.
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet): Deleted.
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage): Deleted.
* css/CSSImageValue.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
it as appropriate.
(WebCore::RuleSet::addRulesFromSheet): Added FIXME comment to skip Content Security Policy check when
when stylesheet is in a user agent shadow tree.
* css/RuleSet.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver): Determine whether the SVG font-face element is in a user agent shadow tree
and pass the appropriate value when calling CSSFontSelector::addFontFaceRule(). Also, modernized code; used C++11 range
-based for-loop instead of const_iterator idiom.
(WebCore::StyleResolver::loadPendingSVGDocuments): Skip CSP check when requesting subresources as a byproduct of
resolving style for an element in a user agent shadow tree.
(WebCore::StyleResolver::loadPendingImage): Ditto.
(WebCore::StyleResolver::loadPendingShapeImage): Ditto.
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet): Added FIXME comment to skip Content Security Policy check when
when stylesheet is in a user agent shadow tree.
* dom/Element.h:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet): Skip CSP check for an inline <style> that is in a user agent shadow tree.
* dom/Node.cpp:
(WebCore::Node::isInUserAgentShadowTree): Added.
* dom/Node.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript): Skip CSP check for an external JavaScript script in a user agent shadow tree.
(WebCore::ScriptElement::executeScript): Skip CSP check for an inline JavaScript script that is in a user agent shadow tree.
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged): Skip CSP check when modifying the inline style of an element in a user
agent shadow tree.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::isSafeToLoadURL): Skip CSP check for a <audio>, <video> in a user agent shadow tree.
(WebCore::HTMLMediaElement::outOfBandTrackSources): Ditto.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::canLoadURL): Ditto.
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired): Determine whether the <track> is in a user agent shadow tree
and pass the appropriate value when calling TextTrackLoader::load().
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Do CSP check when loading a resource by default.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Skip CSP check for an image that is in a user agent shadow tree.
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added FIXME comment to skip Content Security Policy check
when when associated plugin element is in a user agent shadow tree.
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy): Skip CSP check for a <iframe> in a user agent shadow tree.
* loader/ResourceLoaderOptions.h: Defined enum class ContentSecurityPolicyImposition with explicit type uint8_t so
as to provide a hint to the compiler (for better packing) when it computes the memory layout for struct that
contains an instance of this class.
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added argument contentSecurityPolicyImposition.
(WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Added.
(WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Added.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::pluginIsLoadable): Skip CSP check for a plugin element that is in a user agent shadow tree.
(WebCore::SubframeLoader::createJavaAppletWidget): Skip CSP check for an applet element that is in a user agent shadow tree.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load): Take a boolean, isInitiatingElementInUserAgentShadowTree, and sets the appropriate
Content Security Policy imposition for the text track request.
* loader/TextTrackLoader.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Skip CSP check for a user-specified stylesheet.
(WebCore::CachedResourceLoader::canRequest): Only check the CSP of the page if specified in the resource loader options for the request.
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Add ContentSecurityPolicyImposition::DoPolicyCheck to the default
resource loader options so that do check the CSP policy of the page before performing a resource request by default.
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::load): Take a ResourceLoaderOptions as an argument and passes it as appropriate.
* loader/cache/CachedSVGDocumentReference.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Take an argument called overrideContentSecurityPolicy (defaults to false). When
overrideContentSecurityPolicy := true, this function unconditionally returns true.
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
(WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
(WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
(WebCore::ContentSecurityPolicy::allowEval): Ditto.
(WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
(WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
(WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
(WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
* page/ContentSecurityPolicy.h:
* page/DOMSecurityPolicy.cpp:
* page/EventSource.cpp:
(WebCore::EventSource::create): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::requestImageResource): Skip CSP check for a SVG FEImage element in a user agent shadow tree.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::loadFont): Skip CSP check for a SVG font-face-uri element in a user agent shadow tree.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateExternalDocument): Skip CSP check for a SVG use element in a user agent shadow tree.
* testing/Internals.cpp:
(WebCore::Internals::ensureUserAgentShadowRoot): Added.
* testing/Internals.h:
* testing/Internals.idl: Added declaration for ensureUserAgentShadowRoot().
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().

LayoutTests:

Add tests to ensure that we exempt nodes in a user agent shadow tree from the Content Security Policy (CSP) of the page.

Updated test LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp.html to ensure that
we do not bypass the CSP of the page for a script that executes in an isolated world and renamed the
file image-load-should-not-bypass-main-world-csp.html.

* http/tests/security/contentSecurityPolicy/resources/alert-pass-and-notify-done.js: Added.
* http/tests/security/contentSecurityPolicy/resources/wait-until-done.js: Added.
(alertAndDone):
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/resources/ABCFont.svg: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/resources/allow-inline-script.js: Added.
(window.onload):
(testPassed):
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/resources/floodGreenFilter.svg: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html: Added.
* http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp-expected.txt: Renamed from LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp-expected.txt.
* http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html: Renamed from LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp.html.

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

4 years agoWeb Inspector: Rendering Frame bars appear misaligned and contain gaps when displayin...
mattbaker@apple.com [Tue, 7 Jul 2015 00:23:04 +0000 (00:23 +0000)]
Web Inspector: Rendering Frame bars appear misaligned and contain gaps when displaying small task segments
https://bugs.webkit.org/show_bug.cgi?id=146475

Reviewed by Timothy Hatcher.

Displaying all task segments within a frame in the Rendering Frames graph is impossible, as very short tasks
would result in a bar with a height of less than 1 pixel. Consecutive small tasks, each less than a visible
pixel, appear as gaps in the frame bar. This patch addresses these shortcomings by introducing a minimum
displayable frame height (3 pixels), and setting the height of every frame to a multiple of the minimum height.

* UserInterface/Base/Utilities.js:
(.value):
Added Math.roundTo to simplify rounding to arbitrary intervals.

* UserInterface/Views/TimelineRecordFrame.css:
(.timeline-record-frame):
(.timeline-record-frame > .frame > .duration):
Enforce 3px min height for frames & segments. TimelineRenderingFrame's segment height calculator
creates segments that are always at least 3px, this is just a precaution.

* UserInterface/Views/TimelineRecordFrame.js:
(WebInspector.TimelineRecordFrame.prototype._calculateFrameDisplayData.updateDurationRemainder):
(WebInspector.TimelineRecordFrame.prototype._calculateFrameDisplayData.pushCurrentSegment):
(WebInspector.TimelineRecordFrame.prototype._calculateFrameDisplayData.invisibleSegments.forEach):
(WebInspector.TimelineRecordFrame.prototype._updateChildElements.createDurationElement): Deleted.
Added algorithm for calculating frame segment heights, rather than simply dividing each task's
duration by the frame duration. Results are cached so the segment heights aren't needlessly
recalculated on every scroll/zoom.

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

4 years agoWeb Inspector: Force show Console tab when supportsSplitContentBrowser is false
timothy@apple.com [Tue, 7 Jul 2015 00:21:07 +0000 (00:21 +0000)]
Web Inspector: Force show Console tab when supportsSplitContentBrowser is false
https://bugs.webkit.org/show_bug.cgi?id=146661

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.showConsoleTab):

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