Commit e2b364f3 authored by leviw@chromium.org's avatar leviw@chromium.org

2011-05-12 Levi Weintraub <leviw@chromium.org>

        Reviewed by Eric Seidel.

        Switch paintBoxDecorationWithSize to IntRect
        https://bugs.webkit.org/show_bug.cgi?id=60679

        Switching paintBoxDecorationWithSize to take an IntRect instead of 4 ints.

        No new tests as this is simple refactoring.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintBoxDecorations): Cleaning up amazingly confusing logic.
        (WebCore::RenderBox::paintBoxDecorationsWithSize):
        * rendering/RenderBox.h:
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::paintBoxDecorations):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eea900e9
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintBoxDecorationWithSize to IntRect
https://bugs.webkit.org/show_bug.cgi?id=60679
Switching paintBoxDecorationWithSize to take an IntRect instead of 4 ints.
No new tests as this is simple refactoring.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations): Cleaning up amazingly confusing logic.
(WebCore::RenderBox::paintBoxDecorationsWithSize):
* rendering/RenderBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::paintBoxDecorations):
2011-05-12 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
......@@ -804,9 +804,8 @@ void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
if (!paintInfo.shouldPaintWithinRoot(this))
return;
return paintBoxDecorationsWithSize(paintInfo, tx, ty, width(), height());
if (paintInfo.shouldPaintWithinRoot(this))
paintBoxDecorationsWithSize(paintInfo, IntRect(tx, ty, width(), height()));
}
BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsContext* context) const
......@@ -832,9 +831,8 @@ BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsCo
return BackgroundBleedUseTransparencyLayer;
}
void RenderBox::paintBoxDecorationsWithSize(PaintInfo& paintInfo, int tx, int ty, int width, int height)
void RenderBox::paintBoxDecorationsWithSize(PaintInfo& paintInfo, IntRect paintRect)
{
IntRect paintRect = IntRect(tx, ty, width, height);
// border-fit can adjust where we paint our border and background. If set, we snugly fit our line box descendants. (The iChat
// balloon layout is an example of this).
borderFitAdjust(paintRect);
......
......@@ -408,7 +408,7 @@ protected:
void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, const IntRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgroundObject);
void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const IntRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
void paintBoxDecorationsWithSize(PaintInfo&, int tx, int ty, int width, int height);
void paintBoxDecorationsWithSize(PaintInfo&, IntRect);
void paintMaskImages(const PaintInfo&, const IntRect&);
#if PLATFORM(MAC)
......
......@@ -233,7 +233,7 @@ void RenderTextControlSingleLine::paint(PaintInfo& paintInfo, int tx, int ty)
void RenderTextControlSingleLine::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
paintBoxDecorationsWithSize(paintInfo, tx, ty, width() - decorationWidthRight(), height());
paintBoxDecorationsWithSize(paintInfo, IntRect(tx, ty, width() - decorationWidthRight(), height()));
}
void RenderTextControlSingleLine::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment