Bug 141125

Summary: Ambiguous naming: Do not call replacedContentRect()'s return value paint rect.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, sabouhallawa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2015-01-31 15:05:29 PST
It's the content rect.
Comment 1 zalan 2015-01-31 15:11:53 PST
Created attachment 245802 [details]
Patch
Comment 2 Simon Fraser (smfr) 2015-01-31 15:44:17 PST
Comment on attachment 245802 [details]
Patch

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

> Source/WebCore/rendering/RenderHTMLCanvas.cpp:73
> +    LayoutRect contentBoxRect = this->contentBoxRect();
> +    contentBoxRect.moveBy(paintOffset);
> +    LayoutRect contentRect = replacedContentRect(intrinsicSize());

I'm not sure "contentBoxRect" vs "contentRect" is much clearer.

Maybe "contentRect" could be "imageDestinationRect"?
Comment 3 zalan 2015-01-31 15:59:57 PST
(In reply to comment #2)
> Comment on attachment 245802 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=245802&action=review
> 
> > Source/WebCore/rendering/RenderHTMLCanvas.cpp:73
> > +    LayoutRect contentBoxRect = this->contentBoxRect();
> > +    contentBoxRect.moveBy(paintOffset);
> > +    LayoutRect contentRect = replacedContentRect(intrinsicSize());
> 
> I'm not sure "contentBoxRect" vs "contentRect" is much clearer.
> 
> Maybe "contentRect" could be "imageDestinationRect"?
Ok, but imageDestinationRect sounds too specific. This is a replaced element term where the content box rect is extended/shrunk/fit based on the object-fit property value. How about we just call it "replacedContentRect"?
Comment 4 zalan 2015-02-02 11:47:44 PST
Created attachment 245889 [details]
Patch
Comment 5 WebKit Commit Bot 2015-02-02 12:39:56 PST
Comment on attachment 245889 [details]
Patch

Clearing flags on attachment: 245889

Committed r179488: <http://trac.webkit.org/changeset/179488>
Comment 6 WebKit Commit Bot 2015-02-02 12:40:00 PST
All reviewed patches have been landed.  Closing bug.