Bug 141125 - Ambiguous naming: Do not call replacedContentRect()'s return value paint rect.
Summary: Ambiguous naming: Do not call replacedContentRect()'s return value paint rect.
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: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-31 15:05 PST by zalan
Modified: 2015-02-02 12:40 PST (History)
6 users (show)

See Also:


Attachments
Patch (6.09 KB, patch)
2015-01-31 15:11 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (6.28 KB, patch)
2015-02-02 11:47 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.