Bug 133092

Summary: REGRESSION: Standalone images need to take topContentInset into account
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, benjamin, commit-queue, esprehn+autocc, gyuyoung.kim, sam, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Beth Dakin 2014-05-19 16:26:50 PDT
Standalone images taller than the viewport are scaled to a size slightly taller than the viewport when there is a topContentInset.

<rdar://problem/16945791>
Comment 1 Beth Dakin 2014-05-19 16:36:13 PDT
Created attachment 231735 [details]
Patch
Comment 2 Benjamin Poulain 2014-05-19 16:46:32 PDT
Comment on attachment 231735 [details]
Patch

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

> Source/WebCore/html/ImageDocument.cpp:283
> +    IntSize viewportSize = view->visibleSize();

Doesn't this also account for the scale factor?
Comment 3 Beth Dakin 2014-05-19 16:53:36 PDT
(In reply to comment #2)
> (From update of attachment 231735 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=231735&action=review
> 
> > Source/WebCore/html/ImageDocument.cpp:283
> > +    IntSize viewportSize = view->visibleSize();
> 
> Doesn't this also account for the scale factor?

I don't see any differences introduced by this change based on scale factor.
Comment 4 Beth Dakin 2014-05-19 16:55:52 PDT
(In reply to comment #2)
> (From update of attachment 231735 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=231735&action=review
> 
> > Source/WebCore/html/ImageDocument.cpp:283
> > +    IntSize viewportSize = view->visibleSize();
> 
> Doesn't this also account for the scale factor?

Oh, and to more directly answer the question, it does not take scale factor into account. It ends up calling unscaledUnobscuredVisibleContentSize().
Comment 5 Beth Dakin 2014-05-19 16:58:23 PDT
Thanks, Darin!

http://trac.webkit.org/changeset/169084