Modified: trunk/Source/WebCore/ChangeLog (87436 => 87437)
--- trunk/Source/WebCore/ChangeLog 2011-05-26 21:58:57 UTC (rev 87436)
+++ trunk/Source/WebCore/ChangeLog 2011-05-26 22:06:54 UTC (rev 87437)
@@ -1,3 +1,21 @@
+2011-05-26 Levi Weintraub <[email protected]>
+
+ Reviewed by Eric Seidel.
+
+ Switch positionOverflowControls to IntSize
+ https://bugs.webkit.org/show_bug.cgi?id=61493
+
+ Switching positionOverflowControls to take a layerOffset IntSize
+ as opposed to a pair of ints.
+
+ No new tests since this is just refactoring.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ (WebCore::RenderLayer::positionOverflowControls):
+ (WebCore::RenderLayer::paintOverflowControls):
+ * rendering/RenderLayer.h:
+
2011-05-26 Sheriff Bot <[email protected]>
Unreviewed, rolling out r87368.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (87436 => 87437)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2011-05-26 21:58:57 UTC (rev 87436)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2011-05-26 22:06:54 UTC (rev 87437)
@@ -297,7 +297,7 @@
#endif
} else
convertToLayerCoords(root(), x, y);
- positionOverflowControls(x, y);
+ positionOverflowControls(IntSize(x, y));
updateVisibilityStatus();
@@ -2016,7 +2016,7 @@
return m_hBar || m_vBar || m_scrollCorner || renderer()->style()->resize() != RESIZE_NONE;
}
-void RenderLayer::positionOverflowControls(int tx, int ty)
+void RenderLayer::positionOverflowControls(const IntSize& offsetFromLayer)
{
if (!m_hBar && !m_vBar && (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE))
return;
@@ -2027,7 +2027,7 @@
const IntRect& borderBox = box->borderBoxRect();
const IntRect& scrollCorner = scrollCornerRect();
- IntRect absBounds(borderBox.x() + tx, borderBox.y() + ty, borderBox.width(), borderBox.height());
+ IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size());
if (m_vBar)
m_vBar->setFrameRect(IntRect(absBounds.maxX() - box->borderRight() - m_vBar->width(),
absBounds.y() + box->borderTop(),
@@ -2043,14 +2043,14 @@
#if USE(ACCELERATED_COMPOSITING)
if (GraphicsLayer* layer = layerForHorizontalScrollbar()) {
if (m_hBar) {
- layer->setPosition(IntPoint(m_hBar->frameRect().x() - tx, m_hBar->frameRect().y() - ty));
+ layer->setPosition(m_hBar->frameRect().location() - offsetFromLayer);
layer->setSize(m_hBar->frameRect().size());
}
layer->setDrawsContent(m_hBar);
}
if (GraphicsLayer* layer = layerForVerticalScrollbar()) {
if (m_vBar) {
- layer->setPosition(IntPoint(m_vBar->frameRect().x() - tx, m_vBar->frameRect().y() - ty));
+ layer->setPosition(m_vBar->frameRect().location() - offsetFromLayer);
layer->setSize(m_vBar->frameRect().size());
}
layer->setDrawsContent(m_vBar);
@@ -2301,7 +2301,7 @@
// Move the scrollbar widgets if necessary. We normally move and resize widgets during layout, but sometimes
// widgets can move without layout occurring (most notably when you scroll a document that
// contains fixed positioned elements).
- positionOverflowControls(offsetX, offsetY);
+ positionOverflowControls(IntSize(offsetX, offsetY));
// Now that we're sure the scrollbars are in the right place, paint them.
if (m_hBar
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (87436 => 87437)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2011-05-26 21:58:57 UTC (rev 87436)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2011-05-26 22:06:54 UTC (rev 87437)
@@ -590,7 +590,7 @@
// Convert a point in absolute coords into layer coords, taking transforms into account
IntPoint absoluteToContents(const IntPoint&) const;
- void positionOverflowControls(int tx, int ty);
+ void positionOverflowControls(const IntSize&);
void updateScrollCornerStyle();
void updateResizerStyle();