REGRESSION(r145169): [Mac][WK2] http/tests/security/cross-frame-access-put.html fails.
<http://webkit.org/b/111815>
<rdar://problem/13380145>

Reviewed by Anders Carlsson.

Source/WebKit2:

Call getWindowFrame() to see if the UI client wants to override the window frame before sending
a WindowAndViewFramesChanged message to the web process.
This fixes a glitch in WTR and the Web Inspector where incorrect window frames were being used.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):

Tools:

Add PlatformWebView::didInitializeClients() and call it after setting up all the clients
after creating a PlatformWebView. Otherwise, the initial WindowAndViewFramesChanged message
will be sent before there's a UI client set up to adjust the frame with WTR's fake origin.

* WebKitTestRunner/PlatformWebView.h:
(PlatformWebView):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::didInitializeClients):

LayoutTests:

* platform/mac-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clickable area is incorrect for elements with border-radius
https://bugs.webkit.org/show_bug.cgi?id=95373

Patch by Xidorn Quan <quanxunzhen@gmail.com> on 2013-03-14
Reviewed by Simon Fraser.

Source/WebCore:

As RenderBlock doesn't see rounded rect which comes from border-radius
in nodeAtPoint, the rounded corner seems to have an 'invisible' square
box which catches hits. So we added check on whether hitTestPoint also
intersects the rounded rect when hasBorderRadius is set.

This patch is based on Takashi Sakamoto's work in
https://bugs.webkit.org/show_bug.cgi?id=95373

Test: fast/borders/border-radius-position.html

* platform/graphics/FloatQuad.cpp:
(WebCore):
(WebCore::lineIntersectsCircle):
(WebCore::FloatQuad::intersectsCircle):
(WebCore::FloatQuad::intersectsEllipse):
* platform/graphics/FloatQuad.h:
(FloatQuad):
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::intersectsQuad):
(WebCore):
* platform/graphics/RoundedRect.h:
(RoundedRect):
* rendering/HitTestLocation.cpp:
(WebCore::HitTestLocation::intersects):
(WebCore):
* rendering/HitTestLocation.h:
(HitTestLocation):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):

LayoutTests:

This test is based on Takashi Sakamoto's work in
https://bugs.webkit.org/show_bug.cgi?id=95373

* fast/borders/border-radius-position-expected.txt: Added.
* fast/borders/border-radius-position.html: Added.

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