- Revision
- 163677
- Author
- simon.fra...@apple.com
- Date
- 2014-02-07 18:19:42 -0800 (Fri, 07 Feb 2014)
Log Message
Encode requestedScrollPosition on ScrollingStateScrollingNodes to send to the UI process
https://bugs.webkit.org/show_bug.cgi?id=128416
Source/WebCore:
Reviewed by Tim Horton.
Change requestedScrollPosition() to be a FloatPoint, and export
ScrollingStateScrollingNode::setRequestedScrollPosition(WebCore::FloatPoint const&, bool)
for WK2.
* WebCore.exp.in:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
* page/scrolling/ScrollingStateScrollingNode.h:
Source/WebKit2:
Reviewed by Tim Horton.
Encode and decode requestedScrollPosition() and requestedScrollPositionRepresentsProgrammaticScroll(),
which can't use the macros because the setter takes both arguments.
The UI process needs this to notice programmatic scrolls.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (163676 => 163677)
--- trunk/Source/WebCore/ChangeLog 2014-02-08 02:19:39 UTC (rev 163676)
+++ trunk/Source/WebCore/ChangeLog 2014-02-08 02:19:42 UTC (rev 163677)
@@ -1,3 +1,19 @@
+2014-02-07 Simon Fraser <simon.fra...@apple.com>
+
+ Encode requestedScrollPosition on ScrollingStateScrollingNodes to send to the UI process
+ https://bugs.webkit.org/show_bug.cgi?id=128416
+
+ Reviewed by Tim Horton.
+
+ Change requestedScrollPosition() to be a FloatPoint, and export
+ ScrollingStateScrollingNode::setRequestedScrollPosition(WebCore::FloatPoint const&, bool)
+ for WK2.
+
+ * WebCore.exp.in:
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
+ * page/scrolling/ScrollingStateScrollingNode.h:
+
2014-02-07 Beth Dakin <bda...@apple.com>
Should get rid of TileController's CoverageForSlowScrolling mode
Modified: trunk/Source/WebCore/WebCore.exp.in (163676 => 163677)
--- trunk/Source/WebCore/WebCore.exp.in 2014-02-08 02:19:39 UTC (rev 163676)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-02-08 02:19:42 UTC (rev 163677)
@@ -3047,6 +3047,7 @@
__ZN7WebCore27ScrollingStateScrollingNode24setCounterScrollingLayerERKNS_19LayerRepresentationE
__ZN7WebCore27ScrollingStateScrollingNode25setWheelEventHandlerCountEj
__ZN7WebCore27ScrollingStateScrollingNode26setNonFastScrollableRegionERKNS_6RegionE
+__ZN7WebCore27ScrollingStateScrollingNode26setRequestedScrollPositionERKNS_10FloatPointEb
__ZN7WebCore27ScrollingStateScrollingNode27setScrollableAreaParametersERKNS_24ScrollableAreaParametersE
__ZN7WebCore27ScrollingStateScrollingNode30setSynchronousScrollingReasonsEj
__ZN7WebCore27ScrollingStateScrollingNode33setScrollBehaviorForFixedElementsENS_30ScrollBehaviorForFixedElementsE
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (163676 => 163677)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2014-02-08 02:19:39 UTC (rev 163676)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2014-02-08 02:19:42 UTC (rev 163677)
@@ -186,7 +186,7 @@
setPropertyChanged(BehaviorForFixedElements);
}
-void ScrollingStateScrollingNode::setRequestedScrollPosition(const IntPoint& requestedScrollPosition, bool representsProgrammaticScroll)
+void ScrollingStateScrollingNode::setRequestedScrollPosition(const FloatPoint& requestedScrollPosition, bool representsProgrammaticScroll)
{
m_requestedScrollPosition = requestedScrollPosition;
m_requestedScrollPositionRepresentsProgrammaticScroll = representsProgrammaticScroll;
@@ -285,7 +285,7 @@
if (m_requestedScrollPosition != IntPoint()) {
writeIndent(ts, indent + 1);
- ts << "(requested scroll position " << m_requestedScrollPosition.x() << " " << m_requestedScrollPosition.y() << ")\n";
+ ts << "(requested scroll position " << TextStream::FormatNumberRespectingIntegers(m_requestedScrollPosition.x()) << " " << TextStream::FormatNumberRespectingIntegers(m_requestedScrollPosition.y()) << ")\n";
}
if (m_scrollOrigin != IntPoint()) {
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h (163676 => 163677)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h 2014-02-08 02:19:39 UTC (rev 163676)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h 2014-02-08 02:19:42 UTC (rev 163677)
@@ -99,9 +99,10 @@
ScrollBehaviorForFixedElements scrollBehaviorForFixedElements() const { return m_behaviorForFixed; }
void setScrollBehaviorForFixedElements(ScrollBehaviorForFixedElements);
- const IntPoint& requestedScrollPosition() const { return m_requestedScrollPosition; }
- void setRequestedScrollPosition(const IntPoint&, bool representsProgrammaticScroll);
-
+ const FloatPoint& requestedScrollPosition() const { return m_requestedScrollPosition; }
+ bool requestedScrollPositionRepresentsProgrammaticScroll() const { return m_requestedScrollPositionRepresentsProgrammaticScroll; }
+ void setRequestedScrollPosition(const FloatPoint&, bool representsProgrammaticScroll);
+
int headerHeight() const { return m_headerHeight; }
void setHeaderHeight(int);
@@ -126,8 +127,6 @@
#endif
void setScrollbarPaintersFromScrollbars(Scrollbar* verticalScrollbar, Scrollbar* horizontalScrollbar);
- bool requestedScrollPositionRepresentsProgrammaticScroll() const { return m_requestedScrollPositionRepresentsProgrammaticScroll; }
-
virtual void dumpProperties(TextStream&, int indent) const override;
private:
@@ -156,7 +155,7 @@
ScrollBehaviorForFixedElements m_behaviorForFixed;
int m_headerHeight;
int m_footerHeight;
- IntPoint m_requestedScrollPosition;
+ FloatPoint m_requestedScrollPosition;
bool m_requestedScrollPositionRepresentsProgrammaticScroll;
};
Modified: trunk/Source/WebKit2/ChangeLog (163676 => 163677)
--- trunk/Source/WebKit2/ChangeLog 2014-02-08 02:19:39 UTC (rev 163676)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-08 02:19:42 UTC (rev 163677)
@@ -1,5 +1,21 @@
2014-02-07 Simon Fraser <simon.fra...@apple.com>
+ Encode requestedScrollPosition on ScrollingStateScrollingNodes to send to the UI process
+ https://bugs.webkit.org/show_bug.cgi?id=128416
+
+ Reviewed by Tim Horton.
+
+ Encode and decode requestedScrollPosition() and requestedScrollPositionRepresentsProgrammaticScroll(),
+ which can't use the macros because the setter takes both arguments.
+
+ The UI process needs this to notice programmatic scrolls.
+
+ * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+ (ArgumentCoder<ScrollingStateScrollingNode>::encode):
+ (ArgumentCoder<ScrollingStateScrollingNode>::decode):
+
+2014-02-07 Simon Fraser <simon.fra...@apple.com>
+
Add typesafe casts for DrawingAreaProxy classes
https://bugs.webkit.org/show_bug.cgi?id=128419
Modified: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp (163676 => 163677)
--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp 2014-02-08 02:19:39 UTC (rev 163676)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp 2014-02-08 02:19:42 UTC (rev 163677)
@@ -118,7 +118,8 @@
SCROLLING_NODE_ENCODE(ReasonsForSynchronousScrolling, synchronousScrollingReasons)
SCROLLING_NODE_ENCODE(ScrollableAreaParams, scrollableAreaParameters)
SCROLLING_NODE_ENCODE_ENUM(BehaviorForFixedElements, scrollBehaviorForFixedElements)
- // FIXME: encode requestedScrollPosition?
+ SCROLLING_NODE_ENCODE(RequestedScrollPosition, requestedScrollPosition)
+ SCROLLING_NODE_ENCODE(RequestedScrollPosition, requestedScrollPositionRepresentsProgrammaticScroll)
SCROLLING_NODE_ENCODE(HeaderHeight, headerHeight)
SCROLLING_NODE_ENCODE(FooterHeight, footerHeight)
}
@@ -154,7 +155,19 @@
SCROLLING_NODE_DECODE(ReasonsForSynchronousScrolling, SynchronousScrollingReasons, setSynchronousScrollingReasons);
SCROLLING_NODE_DECODE(ScrollableAreaParams, ScrollableAreaParameters, setScrollableAreaParameters);
SCROLLING_NODE_DECODE_ENUM(BehaviorForFixedElements, ScrollBehaviorForFixedElements, setScrollBehaviorForFixedElements);
- // FIXME: decode requestedScrollPosition?
+
+ if (node.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) {
+ FloatPoint scrollPosition;
+ if (!decoder.decode(scrollPosition))
+ return false;
+
+ bool representsProgrammaticScroll;
+ if (!decoder.decode(representsProgrammaticScroll))
+ return false;
+
+ node.setRequestedScrollPosition(scrollPosition, representsProgrammaticScroll);
+ }
+
SCROLLING_NODE_DECODE(HeaderHeight, int, setHeaderHeight);
SCROLLING_NODE_DECODE(FooterHeight, int, setFooterHeight);