Title: [184179] releases/WebKitGTK/webkit-2.8/Source/WebCore
- Revision
- 184179
- Author
- [email protected]
- Date
- 2015-05-12 01:53:39 -0700 (Tue, 12 May 2015)
Log Message
Merge r183891 - Avoid copies in scrollOffsetForFixedPosition() and inline it.
https://bugs.webkit.org/show_bug.cgi?id=144709
Reviewed by Simon Fraser.
* page/FrameView.cpp:
(WebCore::FrameView::frameScaleFactor):
Added so that scrollOffsetForFixedPosition() can be inlined without having to
reference Frame's implementation.
(WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
Moved this to the header.
* page/FrameView.h:
Inline scrollOffsetForFixedPosition() and get rid of all the copying
it was doing.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (184178 => 184179)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-05-12 08:48:04 UTC (rev 184178)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-05-12 08:53:39 UTC (rev 184179)
@@ -1,5 +1,24 @@
2015-05-06 David Hyatt <[email protected]>
+ Avoid copies in scrollOffsetForFixedPosition() and inline it.
+ https://bugs.webkit.org/show_bug.cgi?id=144709
+
+ Reviewed by Simon Fraser.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::frameScaleFactor):
+ Added so that scrollOffsetForFixedPosition() can be inlined without having to
+ reference Frame's implementation.
+
+ (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
+ Moved this to the header.
+
+ * page/FrameView.h:
+ Inline scrollOffsetForFixedPosition() and get rid of all the copying
+ it was doing.
+
+2015-05-06 David Hyatt <[email protected]>
+
RenderLayer::currentTransform computes a pixel snapped rect it doesn't use.
https://bugs.webkit.org/show_bug.cgi?id=144708
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/FrameView.cpp (184178 => 184179)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/FrameView.cpp 2015-05-12 08:48:04 UTC (rev 184178)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/FrameView.cpp 2015-05-12 08:53:39 UTC (rev 184179)
@@ -1621,6 +1621,11 @@
return viewportRect;
}
+float FrameView::frameScaleFactor() const
+{
+ return frame().frameScaleFactor();
+}
+
LayoutSize FrameView::scrollOffsetForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements behaviorForFixed, int headerHeight, int footerHeight)
{
LayoutPoint position;
@@ -1639,17 +1644,6 @@
return LayoutSize(position.x() * dragFactorX / frameScaleFactor, position.y() * dragFactorY / frameScaleFactor);
}
-LayoutSize FrameView::scrollOffsetForFixedPosition() const
-{
- IntRect visibleContentRect = this->visibleContentRect();
- IntSize totalContentsSize = this->totalContentsSize();
- IntPoint scrollPosition = this->scrollPosition();
- IntPoint scrollOrigin = this->scrollOrigin();
- float frameScaleFactor = frame().frameScaleFactor();
- ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements();
- return scrollOffsetForFixedPosition(visibleContentRect, totalContentsSize, scrollPosition, scrollOrigin, frameScaleFactor, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight());
-}
-
float FrameView::yPositionForInsetClipLayer(const FloatPoint& scrollPosition, float topContentInset)
{
if (!topContentInset)
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/FrameView.h (184178 => 184179)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/FrameView.h 2015-05-12 08:48:04 UTC (rev 184178)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/FrameView.h 2015-05-12 08:53:39 UTC (rev 184179)
@@ -273,10 +273,16 @@
void removeViewportConstrainedObject(RenderElement*);
const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { return m_viewportConstrainedObjects.get(); }
bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObjects && m_viewportConstrainedObjects->size() > 0; }
+
+ float frameScaleFactor() const;
// Functions for querying the current scrolled position, negating the effects of overhang
// and adjusting for page scale.
- LayoutSize scrollOffsetForFixedPosition() const;
+ LayoutSize scrollOffsetForFixedPosition() const
+ {
+ return scrollOffsetForFixedPosition(visibleContentRect(), totalContentsSize(), scrollPosition(), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), scrollBehaviorForFixedElements(), headerHeight(), footerHeight());
+ }
+
// Static function can be called from another thread.
static LayoutSize scrollOffsetForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes