REGRESSION(r164438): [GTK] Tests /WebKitGtk/testcontextmenu, /WebKitGtk/testmimehandling, /WebKitGtk/testloading assert in Debug build
https://bugs.webkit.org/show_bug.cgi?id=129256

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2014-02-24
Reviewed by Carlos Garcia Campos.

* WebCoreSupport/FrameLoaderClientGtk.cpp: Manage error values not present in WebCore
(WebKit::toWebKitNetworkError):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r164438): [GTK] Tests /webkit2/WebKitWebView/tls-errors-policy and /webkit2/WebKitWebContext/uri-scheme fail
https://bugs.webkit.org/show_bug.cgi?id=129252

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2014-02-24
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitPrivate.cpp: Manage error values generated by the user application and not present in WebCore
(toWebKitError):
(toWebCoreError):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename PageClientImplIOS::m_view to m_contentView
https://bugs.webkit.org/show_bug.cgi?id=129124

Reviewed by Benjamin Poulain.

Simple rename of m_view to m_contentView in preparation for
also holding onto the WKView.

* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::isViewInWindow):
(WebKit::PageClientImpl::processDidExit):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::interpretKeyEvent):
(WebKit::PageClientImpl::positionInformationDidChange):
(WebKit::PageClientImpl::selectionDidChange):
(WebKit::PageClientImpl::screenToRootView):
(WebKit::PageClientImpl::rootViewToScreen):
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::takeViewSnapshot):
(WebKit::PageClientImpl::didGetTapHighlightGeometries):
(WebKit::PageClientImpl::didCommitLayerTree):
(WebKit::PageClientImpl::startAssistingNode):
(WebKit::PageClientImpl::stopAssistingNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move non-API files in the API/ios directory out to UIProcess/ios
https://bugs.webkit.org/show_bug.cgi?id=129264

Reviewed by Anders Carlsson.

* UIProcess/ios/PageClientImplIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h.
* UIProcess/ios/PageClientImplIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm.
* UIProcess/ios/WKActionSheet.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.h.
* UIProcess/ios/WKActionSheet.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.mm.
* UIProcess/ios/WKContentViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h.
* UIProcess/ios/WKGeolocationProviderIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h.
* UIProcess/ios/WKGeolocationProviderIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm.
* UIProcess/ios/WKInteractionView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.h.
* UIProcess/ios/WKInteractionView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm.
* UIProcess/ios/WKScrollView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.h.
* UIProcess/ios/WKScrollView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.mm.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Relative positioned elements overflowing the region do not get painted into the next tile
https://bugs.webkit.org/show_bug.cgi?id=129254

Reviewed by Antti Koivisto.

Source/WebCore:

The painting of the region's layer should not be aborted so early if the region's fragment shouldn't be painted
because that would prevent all the layer's children from being painted.

Another problem this patch addresses is that clipping should also be performed when the clip rect is empty,
which is what happens when painting in a tile in which the flowed element would normally be painted
if it wasn't clipped by the region.

Test: fast/regions/content-relative-next-tile.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):

LayoutTests:

Added test for the painting across tiles of relative positioned elements flowed into regions.

* fast/regions/content-relative-next-tile-expected.html: Added.
* fast/regions/content-relative-next-tile.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move non-API files out of WebKit2/UIProcess/API/mac
https://bugs.webkit.org/show_bug.cgi?id=129267

Reviewed by Anders Carlsson.

* UIProcess/mac/FindIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h.
* UIProcess/mac/FindIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm.
* UIProcess/mac/PDFViewController.h: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.h.
* UIProcess/mac/PDFViewController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.mm.
* UIProcess/mac/WKPrintingView.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.h.
* UIProcess/mac/WKPrintingView.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm.
* UIProcess/mac/WKTextInputWindowController.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h.
* UIProcess/mac/WKTextInputWindowController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebRTC] Validating RTCConfiguration according to the spec
https://bugs.webkit.org/show_bug.cgi?id=129182

Reviewed by Eric Carlson.

Spec states that:
    - iceServers should not be an empty list
    - the entry in the configuration dictionary is "urls", instead of "url"
    - urls can be either a list or a string
Fixing all that in RTCConfiguration validation when creating a RTCPeerConnection

Source/WebCore:

Existing tests were updated.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::appendIceServer): Added.
(WebCore::processIceServer): Added.
(WebCore::RTCPeerConnection::parseConfiguration):

LayoutTests:

* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* fast/mediastream/RTCPeerConnection-createAnswer.html:
* fast/mediastream/RTCPeerConnection-createOffer.html:
* fast/mediastream/RTCPeerConnection-datachannel.html:
* fast/mediastream/RTCPeerConnection-dtmf.html:
* fast/mediastream/RTCPeerConnection-events.html:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCPeerConnection-have-local-answer.html:
* fast/mediastream/RTCPeerConnection-have-local-offer.html:
* fast/mediastream/RTCPeerConnection-have-local-pranswer.html:
* fast/mediastream/RTCPeerConnection-have-remote-offer.html:
* fast/mediastream/RTCPeerConnection-have-remote-pranswer.html:
* fast/mediastream/RTCPeerConnection-ice-expected.txt:
* fast/mediastream/RTCPeerConnection-ice.html:
* fast/mediastream/RTCPeerConnection-localDescription.html:
* fast/mediastream/RTCPeerConnection-onnegotiationneeded.html:
* fast/mediastream/RTCPeerConnection-remoteDescription.html:
* fast/mediastream/RTCPeerConnection-stable.html:
* fast/mediastream/RTCPeerConnection-state-expected.txt:
* fast/mediastream/RTCPeerConnection-state.html:
* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:
* fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
* fast/mediastream/RTCPeerConnection-statsSelector.html:
* fast/mediastream/RTCPeerConnection.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename WKProcessClass to WKProcessPool
https://bugs.webkit.org/show_bug.cgi?id=129268

Reviewed by Dan Bernstein.

Stage this rename by adding back WKProcessClass and WKProcessClassConfiguration as subclasses of the renamed classes.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKProcessClass.h:
* UIProcess/API/Cocoa/WKProcessClass.mm:
* UIProcess/API/Cocoa/WKProcessClassConfiguration.h:
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
* UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKProcessClassPrivate.h:
* UIProcess/API/Cocoa/WKProcessPool.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.h.
* UIProcess/API/Cocoa/WKProcessPool.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm.
(-[WKProcessPool init]):
(-[WKProcessPool initWithConfiguration:]):
(-[WKProcessPool dealloc]):
(-[WKProcessPool description]):
(-[WKProcessPool configuration]):
(-[WKProcessPool API::]):
(-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.h.
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.mm.
(-[WKProcessPoolConfiguration _injectedBundleURL]):
(-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
(-[WKProcessPoolConfiguration description]):
(-[WKProcessPoolConfiguration copyWithZone:]):
* UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h.
* UIProcess/API/Cocoa/WKProcessPoolInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassInternal.h.
(WebKit::wrapper):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration description]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration processPool]):
(-[WKWebViewConfiguration setProcessPool:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
(-[WKWebViewConfiguration setProcessClass:]):
(-[WKWebViewConfiguration processClass]):
* UIProcess/API/mac/WKView.mm:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Give non-Mac platforms a default toolbar background so it isn't just white.

https://bugs.webkit.org/show_bug.cgi?id=129260

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Style the boby with platform classes.
* UserInterface/Base/Utilities.js:
(String.prototype.contains): Added.
* UserInterface/Views/Toolbar.css:
(body.docked .toolbar, body:not(.mac-platform) .toolbar): Added. Default toolbar background.
(body.docked.mac-platform.mavericks .toolbar, body.docked.mac-platform.mountain-lion): Added.
(body.mac-platform:not(.docked) .toolbar .item.button > .label): Only apply to Mac.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove PDFViewController.*, which is unused
https://bugs.webkit.org/show_bug.cgi?id=129270

Reviewed by Tim Horton.

* UIProcess/mac/PDFViewController.h: Removed.
* UIProcess/mac/PDFViewController.mm: Removed.

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