Diff
Modified: branches/subpixellayout/Source/WebCore/platform/Scrollbar.cpp (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/platform/Scrollbar.cpp 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/platform/Scrollbar.cpp 2011-11-15 19:48:46 UTC (rev 100302)
@@ -58,9 +58,9 @@
}
#endif
-LayoutUnit Scrollbar::maxOverlapBetweenPages()
+int Scrollbar::maxOverlapBetweenPages()
{
- static LayoutUnit maxOverlapBetweenPages = ScrollbarTheme::theme()->maxOverlapBetweenPages();
+ static int maxOverlapBetweenPages = ScrollbarTheme::theme()->maxOverlapBetweenPages();
return maxOverlapBetweenPages;
}
Modified: branches/subpixellayout/Source/WebCore/platform/Scrollbar.h (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/platform/Scrollbar.h 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/platform/Scrollbar.h 2011-11-15 19:48:46 UTC (rev 100302)
@@ -52,7 +52,7 @@
static int pixelsPerLineStep() { return 40; }
static float minFractionToStepWhenPaging() { return 0.875f; }
- static LayoutUnit maxOverlapBetweenPages();
+ static int maxOverlapBetweenPages();
void disconnectFromScrollableArea() { m_scrollableArea = 0; }
ScrollableArea* scrollableArea() const { return m_scrollableArea; }
Modified: branches/subpixellayout/Source/WebCore/platform/ScrollbarTheme.h (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/platform/ScrollbarTheme.h 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/platform/ScrollbarTheme.h 2011-11-15 19:48:46 UTC (rev 100302)
@@ -26,8 +26,8 @@
#ifndef ScrollbarTheme_h
#define ScrollbarTheme_h
+#include "IntRect.h"
#include "GraphicsContext.h"
-#include "LayoutTypes.h"
#include "ScrollTypes.h"
namespace WebCore {
@@ -44,7 +44,7 @@
virtual void updateEnabledState(Scrollbar*) { };
- virtual bool paint(Scrollbar*, GraphicsContext*, const LayoutRect& /*damageRect*/) { return false; }
+ virtual bool paint(Scrollbar*, GraphicsContext*, const IntRect& /*damageRect*/) { return false; }
virtual ScrollbarPart hitTest(Scrollbar*, const PlatformMouseEvent&) { return NoPart; }
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) { return 0; }
@@ -79,10 +79,10 @@
virtual void invalidatePart(Scrollbar*, ScrollbarPart) {}
- virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const FixedRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); }
- static void defaultPaintScrollCorner(GraphicsContext* context, const FixedRect& cornerRect) { context->fillRect(enclosingIntRect(cornerRect), Color::white, ColorSpaceDeviceRGB); }
+ virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); }
+ static void defaultPaintScrollCorner(GraphicsContext* context, const IntRect& cornerRect) { context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB); }
- virtual void paintOverhangAreas(ScrollView*, GraphicsContext*, const FixedRect&, const FixedRect&, const FixedRect&) { }
+ virtual void paintOverhangAreas(ScrollView*, GraphicsContext*, const IntRect&, const IntRect&, const IntRect&) { }
virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&) { return false; }
virtual bool shouldSnapBackToDragOrigin(Scrollbar*, const PlatformMouseEvent&) { return false; }
@@ -92,7 +92,7 @@
virtual int trackPosition(Scrollbar*) { return 0; } // The position of the track relative to the scrollbar.
virtual int trackLength(Scrollbar*) { return 0; } // The length of the track along the axis of the scrollbar.
- virtual LayoutUnit maxOverlapBetweenPages() { return std::numeric_limits<LayoutUnit>::max(); }
+ virtual int maxOverlapBetweenPages() { return std::numeric_limits<int>::max(); }
virtual double initialAutoscrollTimerDelay() { return 0.25; }
virtual double autoscrollTimerDelay() { return 0.05; }
Modified: branches/subpixellayout/Source/WebCore/platform/ScrollbarThemeComposite.h (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/platform/ScrollbarThemeComposite.h 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/platform/ScrollbarThemeComposite.h 2011-11-15 19:48:46 UTC (rev 100302)
@@ -26,7 +26,7 @@
#ifndef ScrollbarThemeComposite_h
#define ScrollbarThemeComposite_h
-#include "FixedRect.h"
+#include "IntRect.h"
#include "ScrollbarTheme.h"
namespace WebCore {
Modified: branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.h (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.h 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.h 2011-11-15 19:48:46 UTC (rev 100302)
@@ -43,7 +43,7 @@
virtual void updateEnabledState(Scrollbar*);
- virtual bool paint(Scrollbar*, GraphicsContext* context, const LayoutRect& damageRect);
+ virtual bool paint(Scrollbar*, GraphicsContext* context, const IntRect& damageRect);
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
@@ -73,7 +73,7 @@
virtual IntRect trackRect(Scrollbar*, bool painting = false);
// FIXME: Why is this 40 on Mac? All other platforms use LayoutUnit::max.
- virtual LayoutUnit maxOverlapBetweenPages() { return LayoutUnit(40); }
+ virtual int maxOverlapBetweenPages() { return 40; }
virtual int minimumThumbLength(Scrollbar*);
Modified: branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2011-11-15 19:48:46 UTC (rev 100302)
@@ -491,7 +491,7 @@
}
#endif
-bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const LayoutRect& damageRect)
+bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect)
{
#if USE(SCROLLBAR_PAINTER)
float value = 0;
@@ -507,7 +507,7 @@
overhang = scrollbar->currentPos() + scrollbar->visibleSize() - scrollbar->totalSize();
} else {
// Within the bounds of the scrollable area.
- LayoutUnit maximum = scrollbar->maximum();
+ int maximum = scrollbar->maximum();
if (maximum > 0)
value = scrollbar->currentPos() / maximum;
else
@@ -580,16 +580,16 @@
else {
trackInfo.bounds = IntRect(IntPoint(), expandedIntSize(scrollbar->frameRect().size()));
- LayoutRect bufferRect(scrollbar->frameRect());
+ IntRect bufferRect(scrollbar->frameRect());
bufferRect.intersect(damageRect);
OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(expandedIntSize(bufferRect.size()));
if (!imageBuffer)
return true;
- imageBuffer->context()->translate((scrollbar->frameRect().x() - bufferRect.x()).round(), (scrollbar->frameRect().y() - bufferRect.y()).round());
+ imageBuffer->context()->translate(scrollbar->frameRect().x() - bufferRect.x(), scrollbar->frameRect().y() - bufferRect.y());
HIThemeDrawTrack(&trackInfo, 0, imageBuffer->context()->platformContext(), kHIThemeOrientationNormal);
- context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, roundedIntPoint(bufferRect.location()));
+ context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, bufferRect.location());
}
return true;
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp 2011-11-15 19:48:46 UTC (rev 100302)
@@ -2330,14 +2330,14 @@
// Set up the range (and page step/line step).
if (m_hBar) {
- LayoutUnit clientWidth = box->clientWidth();
- LayoutUnit pageStep = max<LayoutUnit>(max<LayoutUnit>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
+ int clientWidth = box->clientWidth();
+ int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
m_hBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_hBar->setProportion(clientWidth, m_scrollSize.width());
}
if (m_vBar) {
- LayoutUnit clientHeight = box->clientHeight();
- LayoutUnit pageStep = max<LayoutUnit>(max<LayoutUnit>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
+ int clientHeight = box->clientHeight();
+ int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
m_vBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_vBar->setProportion(clientHeight, m_scrollSize.height());
}
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarTheme.cpp (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarTheme.cpp 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarTheme.cpp 2011-11-15 19:48:46 UTC (rev 100302)
@@ -106,7 +106,7 @@
return result;
}
-void RenderScrollbarTheme::paintScrollCorner(ScrollView*, GraphicsContext* context, const LayoutRect& cornerRect)
+void RenderScrollbarTheme::paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect)
{
// FIXME: Implement.
context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB);
@@ -117,22 +117,22 @@
toRenderScrollbar(scrollbar)->paintPart(context, ScrollbarBGPart, scrollbar->frameRect());
}
-void RenderScrollbarTheme::paintTrackBackground(GraphicsContext* context, Scrollbar* scrollbar, const LayoutRect& rect)
+void RenderScrollbarTheme::paintTrackBackground(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect)
{
toRenderScrollbar(scrollbar)->paintPart(context, TrackBGPart, rect);
}
-void RenderScrollbarTheme::paintTrackPiece(GraphicsContext* context, Scrollbar* scrollbar, const LayoutRect& rect, ScrollbarPart part)
+void RenderScrollbarTheme::paintTrackPiece(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart part)
{
toRenderScrollbar(scrollbar)->paintPart(context, part, rect);
}
-void RenderScrollbarTheme::paintButton(GraphicsContext* context, Scrollbar* scrollbar, const LayoutRect& rect, ScrollbarPart part)
+void RenderScrollbarTheme::paintButton(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart part)
{
toRenderScrollbar(scrollbar)->paintPart(context, part, rect);
}
-void RenderScrollbarTheme::paintThumb(GraphicsContext* context, Scrollbar* scrollbar, const LayoutRect& rect)
+void RenderScrollbarTheme::paintThumb(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect)
{
toRenderScrollbar(scrollbar)->paintPart(context, ThumbPart, rect);
}
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarTheme.h (100301 => 100302)
--- branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarTheme.h 2011-11-15 19:47:59 UTC (rev 100301)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarTheme.h 2011-11-15 19:48:46 UTC (rev 100302)
@@ -44,7 +44,7 @@
virtual bool supportsControlTints() const { return true; }
- virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const LayoutRect& cornerRect);
+ virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect);
virtual bool shouldCenterOnThumb(Scrollbar* scrollbar, const PlatformMouseEvent& event) { return ScrollbarTheme::theme()->shouldCenterOnThumb(scrollbar, event); }
@@ -69,10 +69,10 @@
virtual IntRect trackRect(Scrollbar*, bool painting = false);
virtual void paintScrollbarBackground(GraphicsContext*, Scrollbar*);
- virtual void paintTrackBackground(GraphicsContext*, Scrollbar*, const LayoutRect&);
- virtual void paintTrackPiece(GraphicsContext*, Scrollbar*, const LayoutRect&, ScrollbarPart);
- virtual void paintButton(GraphicsContext*, Scrollbar*, const LayoutRect&, ScrollbarPart);
- virtual void paintThumb(GraphicsContext*, Scrollbar*, const LayoutRect&);
+ virtual void paintTrackBackground(GraphicsContext*, Scrollbar*, const IntRect&);
+ virtual void paintTrackPiece(GraphicsContext*, Scrollbar*, const IntRect&, ScrollbarPart);
+ virtual void paintButton(GraphicsContext*, Scrollbar*, const IntRect&, ScrollbarPart);
+ virtual void paintThumb(GraphicsContext*, Scrollbar*, const IntRect&);
virtual IntRect constrainTrackRectToTrackPieces(Scrollbar*, const IntRect&);
};