Modified: trunk/Source/WebCore/ChangeLog (165232 => 165233)
--- trunk/Source/WebCore/ChangeLog 2014-03-07 00:54:34 UTC (rev 165232)
+++ trunk/Source/WebCore/ChangeLog 2014-03-07 01:31:53 UTC (rev 165233)
@@ -1,3 +1,16 @@
+2014-03-06 Simon Fraser <[email protected]>
+
+ Minor optimization in ScrollingTreeScrollingNodeMac
+ https://bugs.webkit.org/show_bug.cgi?id=129848
+
+ Reviewed by Dean Jackson.
+
+ No need to call scrollOffsetForFixedPosition() again if we don't have header
+ and footer layers.
+
+ * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
+ (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
+
2014-03-06 Mark Lam <[email protected]>
XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED.
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm (165232 => 165233)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm 2014-03-07 00:54:34 UTC (rev 165232)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm 2014-03-07 01:31:53 UTC (rev 165233)
@@ -348,18 +348,20 @@
if (m_counterScrollingLayer)
m_counterScrollingLayer.get().position = FloatPoint(scrollOffsetForFixedChildren);
- // Generally the banners should have the same horizontal-position computation as a fixed element. However,
- // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor()
- // then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
- float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
- if (frameScaleFactor() != 1)
- horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingIntRect(viewportConstrainedObjectRect()), totalContentsSize(), flooredIntPoint(scrollOffset), scrollOrigin(), 1, false, behaviorForFixed, headerHeight(), footerHeight()).width();
+ if (m_headerLayer || m_footerLayer) {
+ // Generally the banners should have the same horizontal-position computation as a fixed element. However,
+ // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor()
+ // then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
+ float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
+ if (frameScaleFactor() != 1)
+ horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(enclosingIntRect(viewportConstrainedObjectRect()), totalContentsSize(), flooredIntPoint(scrollOffset), scrollOrigin(), 1, false, behaviorForFixed, headerHeight(), footerHeight()).width();
- if (m_headerLayer)
- m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, 0);
+ if (m_headerLayer)
+ m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, 0);
- if (m_footerLayer)
- m_footerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight());
+ if (m_footerLayer)
+ m_footerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight());
+ }
FloatRect viewportRect = viewportConstrainedObjectRect();