Pass a real FrameLoadRequest to Chrome::createWindow
https://bugs.webkit.org/show_bug.cgi?id=130795

Reviewed by Dan Bernstein.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose DownloadProxy::request()
https://bugs.webkit.org/show_bug.cgi?id=130796

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload request]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Remove no-longer-used shape-inside geometry code
https://bugs.webkit.org/show_bug.cgi?id=130740

Reviewed by David Hyatt.

This patch removes shape-padding support, since it can be used only with shape-inside.
Shape-inside support has been removed in r166301.

No new tests needed, existing tests have been removed by r166301.

* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::shapePaddingLogicalBoundingBox): Deleted.
(WebCore::BoxShape::shapePaddingBounds): Deleted.
(WebCore::BoxShape::getIncludedIntervals): Deleted.
(WebCore::BoxShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.cpp:
(WebCore::leftSide): Deleted.
(WebCore::isReflexVertex): Deleted.
(WebCore::computeShapePaddingBounds): Deleted.
(WebCore::PolygonShape::shapePaddingBounds): Deleted.
(WebCore::PolygonShape::getIncludedIntervals): Deleted.
(WebCore::firstFitRectInPolygon): Deleted.
(WebCore::aboveOrToTheLeft): Deleted.
(WebCore::PolygonShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/PolygonShape.h:
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::firstIncludedIntervalY): Deleted.
(WebCore::RasterShapeIntervals::getIncludedIntervals): Deleted.
(WebCore::RasterShape::paddingIntervals): Deleted.
(WebCore::RasterShape::getIncludedIntervals): Deleted.
(WebCore::RasterShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.cpp:
(WebCore::ellipseYIntercept): Deleted.
(WebCore::RectangleShape::shapePaddingBounds): Deleted.
(WebCore::RectangleShape::getIncludedIntervals): Deleted.
(WebCore::cornerInterceptForWidth): Deleted.
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/RectangleShape.h:
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
(WebCore::Shape::createRasterShape):
(WebCore::Shape::createBoxShape):
* rendering/shapes/Shape.h:
(WebCore::Shape::lineOverlapsShapePaddingBounds): Deleted.
(WebCore::Shape::shapePadding): Deleted.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Propagate the hiddenFromInspector flag on ResourceRequest in
places when a new request a made or passed between processes.

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

Reviewed by Joseph Pecoraro.

Source/WebCore:

* WebCore.exp.in: Updated symbols for updateFromDelegatePreservingOldProperties.
* platform/network/cf/ResourceRequest.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
(WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
(WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
(WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
(WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchWillSendRequest): Copy hiddenFromInspector to
the new request.

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest): Use updateFromDelegatePreservingOldProperties.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encode): Added hiddenFromInspector support.
(IPC::ArgumentCoder<ResourceRequest>::decode): Ditto.
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose DownloadProxy::cancel()
https://bugs.webkit.org/show_bug.cgi?id=130799

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload cancel]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. iOS build fix after r166312. Soft link CMTimeRangeGetEnd.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skipping underlines disregard points completely inside the underline rect
https://bugs.webkit.org/show_bug.cgi?id=130800

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-03-26
Reviewed by Dean Jackson.

Source/WebCore:

When determining bounds for underline skipping, endpoints of glyph contours
that lie entirely within the rect of the underline are ignored. This patch
makes these points affect the skipping regions the same way that intersections
do.

Test: fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html

* platform/graphics/mac/FontMac.mm:
(WebCore::updateX): Refactored common code into a function
(WebCore::findPathIntersections): Test for endpoints which lie entirely within
the underline bounds

LayoutTests:

This test draws a glyph entire inside the underline. It should render the same
as it would without any underline at all.

* fast/css3-text/css3-text-decoration/text-decoration-skip/resources/Litherum.svg: Added
an underscore glyph that would lie entirely within an underline
* fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Device scale factor should always be greater than 0.
https://bugs.webkit.org/show_bug.cgi?id=130798

Reviewed by David Kilzer.

Rendering context requires a device scale factor > 0 so that we can map CSS pixels
to device pixels properly. Neither 0 nor a negative device pixel ratio are considered to be valid.

* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add platform implementation for RTCOfferAnswerOptions and RTCOfferOptions
https://bugs.webkit.org/show_bug.cgi?id=130689

Reviewed by Eric Carlson.

RTCOfferAnswerOptions and RTCOfferOptions objects were being passed to platform class, causing a layer
violation.

* Modules/mediastream/RTCOfferAnswerOptions.cpp:
(WebCore::RTCOfferAnswerOptions::initialize):
(WebCore::RTCOfferOptions::initialize):
* Modules/mediastream/RTCOfferAnswerOptions.h:
(WebCore::RTCOfferAnswerOptions::requestIdentity):
(WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions):
(WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
(WebCore::RTCOfferOptions::offerToReceiveVideo):
(WebCore::RTCOfferOptions::offerToReceiveAudio):
(WebCore::RTCOfferOptions::voiceActivityDetection):
(WebCore::RTCOfferOptions::iceRestart):
(WebCore::RTCOfferOptions::privateOfferOptions):
(WebCore::RTCOfferOptions::RTCOfferOptions):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
(WebCore::RTCPeerConnection::createAnswer):
* platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Added.
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::createOffer):
(WebCore::RTCPeerConnectionHandlerMock::createAnswer):
* platform/mock/RTCPeerConnectionHandlerMock.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-[WKWebProcessPlugInNodeHandle HTMLInputElementIsUserEdited] and -HTMLTextAreaElementIsUserEdited do not return the correct values.

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

Patch by Cody Krieger <cjk@apple.com> on 2014-03-26
Reviewed by Dan Bernstein.

The existing implementations of these methods are mis-cased
("HTMLInputELementIsUserEdited" and "HTMLTextAreaELementIsUserEdited" —
note the "EL" in both cases). This results in us getting
auto-synthesized getters for the HTMLInputElementIsUserEdited and
HTMLTextAreaElementIsUserEdited properties, which will return NO
unconditionally.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
Fix the capitalization of -HTMLInputElementIsUserEdited and
-HTMLTextAreaElementIsUserEdited.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change MiniBrowser to hold on to window controllers instead of windows
https://bugs.webkit.org/show_bug.cgi?id=130797

Reviewed by Oliver Hunt.

* MiniBrowser/mac/AppDelegate.h:
* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate init]):
(-[BrowserAppDelegate newWindow:]):
(-[BrowserAppDelegate browserWindowWillClose:]):
(-[BrowserAppDelegate applicationWillTerminate:]):
(-[BrowserAppDelegate frontmostBrowserWindowController]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose DownloadClient::didFail() and DownloadClient::didCancel()
https://bugs.webkit.org/show_bug.cgi?id=130805

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/Cocoa/_WKDownloadDelegate.h:
* UIProcess/Cocoa/DownloadClient.h:
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
(-[DownloadDelegate _download:didReceiveResponse:]):
(-[DownloadDelegate _downloadDidFinish:]):
(runTest):
(TEST):
(-[FailingDownloadDelegate _downloadDidFinish:]):
(-[FailingDownloadDelegate _download:didFailWithError:]):
(-[FailingDownloadDelegate _downloadDidCancel:]):
(-[CancelledDownloadDelegate _downloadDidStart:]):
(-[CancelledDownloadDelegate _downloadDidFinish:]):
(-[CancelledDownloadDelegate _download:didFailWithError:]):
(-[CancelledDownloadDelegate _downloadDidCancel:]):
(-[DownloadDelegate initWithSourceURL:]): Deleted.
(-[DownloadDelegate sourceURL]): Deleted.
(runTestWithNavigationDelegate): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modernize the loops in InspectorPageAgent.cpp.

Also moves the check for hiddenFromInspector to a lower level.
This hides hidden resources from more places.

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

Reviewed by Joseph Pecoraro.

* inspector/InspectorPageAgent.cpp:
(WebCore::buildArrayForCookies):
(WebCore::cachedResourcesForFrame):
(WebCore::allResourcesURLsForFrame):
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
(WebCore::InspectorPageAgent::loaderDetachedFromFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r166307.

Not reviewed.

* runtime/JSCell.h:
- The inline function isAPIValueWrapper() should not be exported.  This
  was causing a linkage error when building for 32-bit x86 on Mac.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion failure in RemoteLayerBackingStore::flush
https://bugs.webkit.org/show_bug.cgi?id=130810
<rdar://problem/16439276>

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::flush):
We don't always have backing store to flush, if platformCALayerDrawsContent() is false.
We also can't assert that we have a back surface, because the very first paint will not.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add -[WKWebView stopLoading]
https://bugs.webkit.org/show_bug.cgi?id=130812

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView stopLoading]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hook up -webkit-overflow-scrolling:touch for iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=130809

Reviewed by Tim Horton.

Source/WebCore:

Get -webkit-overflow-scrolling: touch working for iOS WK2.

* WebCore.exp.in:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollingNode):
Send in ScrollingGeometry when we update scrolling nodes.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::updateScrollingNode):
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
Need to get to the scrolling layer in a subclass.
(WebCore::ScrollingTreeScrollingNodeIOS::scrollLayer):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasAcceleratedTouchScrolling): Remove code
that temporarily disabled touch-scrolling.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): When we
update scrolling nodes, send in the right scrolling geometry.

Source/WebKit2:

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
Set the content size of the UIScrollVIew based on the geometry.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer): Make a UIScrollView if the
layer properties tell us that we have the scrolling behavior.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
We need to allow user interaction in the _rootContentView so that events get to
nested UIScrollViews (this could be optimized in future).
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::createLayer): Need to pass RemoteLayerTreeTransaction::LayerProperties
in so we can get at the custom behavior.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build: include UIKit headers inside the iOS #ifdef.

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert more of HTMLConverter to C++
https://bugs.webkit.org/show_bug.cgi?id=130811

Reviewed by Anders Carlsson.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::HTMLConverter):
(HTMLConverter::~HTMLConverter):
(HTMLConverter::_blockLevelElementForNode):
(HTMLConverter::_colorForElement):
(HTMLConverter::_computedAttributesForElement):
(HTMLConverter::_attributesForElement):
(HTMLConverter::_fillInBlock):
(HTMLConverter::_enterElement):
(HTMLConverter::_addTableForElement):
(HTMLConverter::_addTableCellForElement):
(HTMLConverter::_processElement):
(HTMLConverter::_exitElement):
(HTMLConverter::_getFloat): Deleted.
(HTMLConverter::_elementIsBlockLevel): Deleted.
(HTMLConverter::_elementHasOwnBackgroundColor): Deleted.
(HTMLConverter::_colorForNode): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] Crashes on swipe
<rdar://problem/16440867>

Reviewed by Benjamin Poulain.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Get the IOSurfaceRef from the WebCore::IOSurface.


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