Incorrect/Illegal static cast in FrameView.cpp
https://bugs.webkit.org/show_bug.cgi?id=98943

Reviewed by Eric Seidel.

HTMLFrameElementBase is the common base class for <frame> and <iframe>.

* page/FrameView.cpp:
(WebCore::FrameView::init):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel
https://bugs.webkit.org/show_bug.cgi?id=98571

Reviewed by Emil A Eklund.

Source/WebCore:

Refactoring all coordinate-switching functionality to use a single "mode" flag
as opposed to having a bunch of boolean values. This enables the same set of
options across the board, and a consistent interface. This was previously
done for mapLocalToContainer.

The imptetus for this for this stems from the one logical change in this patch
which only effects sub-pixel layout. FrameView::convertToRenderer and
convertFromRenderer return IntPoint coordinates, and need to also snap transform
offsets to determine proper rects for scrolling.

Unlabeled functions below are simply being updated to these new interfaces.

Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html

* WebCore.exp.in:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Element.cpp:
(WebCore::Element::boundsInRootViewSpace):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/Node.cpp:
(WebCore::Node::convertToPage):
(WebCore::Node::convertFromPage):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
them to TransformState, which transforms the coordinates.
(WebCore::FrameView::convertFromRenderer): Ditto.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteQuads):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteQuads):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::mapAbsoluteToLocalPoint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::userResize):
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absolutePoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::mapLocalToContainer):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::absoluteToContents):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::localToAbsolute):
(WebCore::RenderObject::absoluteToLocal):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::localToContainerQuad):
(WebCore::RenderObject::localToContainerPoint):
* rendering/RenderObject.h:
(RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
now used for other conversion methods.
(WebCore::RenderObject::localToAbsoluteQuad):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
* rendering/RenderView.h:
(RenderView):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer):
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer):
* rendering/svg/RenderSVGText.h:
(RenderSVGText):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):

LayoutTests:

Tests scrolling of sub-pixel layers on sub-pixel platforms (Chromium).

* fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html: Added.
* platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png: Added.
* platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt: Added.
* platform/chromium-linux/fast/repaint/repaint-across-writing-mode-boundary-expected.png:
The repaint rect shrinks safely by one pixel.
* platform/chromium/TestExpectations:
* platform/mac-lion/TestExpectations:
* platform/mac-snowleopard/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-4.8/TestExpectations:
* platform/qt/TestExpectations:
* platform/win-wk2/TestExpectations:
* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=99111
ScrollingStateNode should keep its Vector of children in an OwnPtr

Reviewed by Ada Chan.

Vector<OwnPtr<ScrollingStateNode> >* m_children; is now:
 OwnPtr<Vector<OwnPtr<ScrollingStateNode> > > m_children;
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::~ScrollingStateNode):
(WebCore::ScrollingStateNode::appendChild):
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using deprecatedSend for WebPageProxy::postMessageToInjectedBundle
https://bugs.webkit.org/show_bug.cgi?id=99120

Reviewed by Andreas Kling.

Instead of using deprecatedSend, just encode the data using a separate ArgumentEncoder and pass it along as a DataReference.

* Shared/CoreIPCSupport/InjectedBundleMessageKinds.h:
Remove PostMessageToPage.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::postMessageToInjectedBundle):
Stop using deprecatedSend.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::didReceiveMessage):
Remove code to handle PostMessageToPage.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::postInjectedBundleMessage):
Decode the APIObject and send it along to the injected bundle.

* WebProcess/WebPage/WebPage.messages.in:
Add PostInjectedBundleMessage message.

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