Bug 60596 - Switch paintFillLayer and its progeny to use IntRect instead of four ints
Summary: Switch paintFillLayer and its progeny to use IntRect instead of four ints
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks: 60318
  Show dependency treegraph
 
Reported: 2011-05-10 16:44 PDT by Levi Weintraub
Modified: 2011-05-11 20:18 PDT (History)
7 users (show)

See Also:


Attachments
Patch (26.57 KB, patch)
2011-05-11 15:47 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff
Patch for landing (26.54 KB, patch)
2011-05-11 16:35 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2011-05-10 16:44:13 PDT
paintFillLayer, paintFillLayers, and paintFillLayerExtended (deep breaths) all take four ints instead of an IntRect.
Comment 1 Eric Seidel (no email) 2011-05-10 16:49:07 PDT
Amen, brother.  Amen.
Comment 2 Levi Weintraub 2011-05-11 12:16:57 PDT
Also switching paintFillLayersExtended's InlineBox width and height parameters to an IntSize (duh! :)
Comment 3 Levi Weintraub 2011-05-11 15:47:36 PDT
Created attachment 93200 [details]
Patch
Comment 4 Eric Seidel (no email) 2011-05-11 16:00:23 PDT
Comment on attachment 93200 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=93200&action=review

OK.

> Source/WebCore/rendering/InlineFlowBox.cpp:1061
> +        paintInfo.context->clip(IntRect(rect.x(), rect.y(), width(), height()));

rect.location(), size()?

> Source/WebCore/rendering/InlineFlowBox.cpp:1062
> +        boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, IntRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op);

looks like stripRect is gonna be next. :)
Comment 5 Levi Weintraub 2011-05-11 16:03:09 PDT
Comment on attachment 93200 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=93200&action=review

>> Source/WebCore/rendering/InlineFlowBox.cpp:1061
>> +        paintInfo.context->clip(IntRect(rect.x(), rect.y(), width(), height()));
> 
> rect.location(), size()?

It's weird, but because width() and height() look at if we're horizontal, and because there's currently no size() function for InlineBox I had to go with this. One could be added tho ;)
Comment 6 Levi Weintraub 2011-05-11 16:03:53 PDT
(In reply to comment #4)
> (From update of attachment 93200 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=93200&action=review
> 
> OK.
> 
> > Source/WebCore/rendering/InlineFlowBox.cpp:1061
> > +        paintInfo.context->clip(IntRect(rect.x(), rect.y(), width(), height()));
> 
> rect.location(), size()?
> 
> > Source/WebCore/rendering/InlineFlowBox.cpp:1062
> > +        boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, IntRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op);
> 
> looks like stripRect is gonna be next. :)

Also major thanks for all the reviewing work, dude! You're really keeping us clipping along.
Comment 7 Levi Weintraub 2011-05-11 16:35:06 PDT
Created attachment 93210 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2011-05-11 20:18:08 PDT
Comment on attachment 93210 [details]
Patch for landing

Clearing flags on attachment: 93210

Committed r86303: <http://trac.webkit.org/changeset/86303>
Comment 9 WebKit Commit Bot 2011-05-11 20:18:13 PDT
All reviewed patches have been landed.  Closing bug.