Bug 60596

Summary: Switch paintFillLayer and its progeny to use IntRect instead of four ints
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, eae, eric, hyatt, jamesr, mjs
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch
none
Patch for landing none

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.