Bug 135031 - Fixed position elements are misplaced when a WK1 view has contentInsets set
Summary: Fixed position elements are misplaced when a WK1 view has contentInsets set
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 135056
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-17 15:49 PDT by Beth Dakin
Modified: 2015-09-14 11:13 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.98 KB, patch)
2014-07-17 15:53 PDT, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch that does not break Yosemite tests (3.95 KB, patch)
2014-07-18 14:48 PDT, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2014-07-17 15:49:03 PDT
Fixed position elements are misplaced when a WK1 view has contentInsets set.

<rdar://problem/17682335>
Comment 1 Beth Dakin 2014-07-17 15:53:21 PDT
Created attachment 235098 [details]
Patch
Comment 2 Tim Horton 2014-07-17 16:03:14 PDT
Comment on attachment 235098 [details]
Patch

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

> Source/WebCore/platform/mac/ScrollViewMac.mm:127
> +        IntSize frameSize = IntSize([scrollView() frame].size);

No need for the " = IntSize"

> Source/WebCore/platform/mac/ScrollViewMac.mm:135
>      END_BLOCK_OBJC_EXCEPTIONS;

does this need to be before return? I think it might, but I am not sure

> Source/WebCore/platform/mac/ScrollViewMac.mm:137
>      return IntRect();

why is this still here?
Comment 3 Beth Dakin 2014-07-17 16:08:01 PDT
(In reply to comment #2)
> (From update of attachment 235098 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=235098&action=review
> 
> > Source/WebCore/platform/mac/ScrollViewMac.mm:127
> > +        IntSize frameSize = IntSize([scrollView() frame].size);
> 
> No need for the " = IntSize"
> 

Fixed.

> > Source/WebCore/platform/mac/ScrollViewMac.mm:135
> >      END_BLOCK_OBJC_EXCEPTIONS;
> 
> does this need to be before return? I think it might, but I am not sure
> 
> > Source/WebCore/platform/mac/ScrollViewMac.mm:137
> >      return IntRect();
> 
> why is this still here?

Both of these have the same answer: this is what the function previously did. It had the normal return statement just before END_BLOCK_OBJC_EXCEPTIONS, and then a generic return after. Other functions in ScrollViewMac that return things follow this convention as well.
Comment 4 Tim Horton 2014-07-17 16:43:55 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 235098 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=235098&action=review
> > 
> > > Source/WebCore/platform/mac/ScrollViewMac.mm:127
> > > +        IntSize frameSize = IntSize([scrollView() frame].size);
> > 
> > No need for the " = IntSize"
> > 
> 
> Fixed.
> 
> > > Source/WebCore/platform/mac/ScrollViewMac.mm:135
> > >      END_BLOCK_OBJC_EXCEPTIONS;
> > 
> > does this need to be before return? I think it might, but I am not sure
> > 
> > > Source/WebCore/platform/mac/ScrollViewMac.mm:137
> > >      return IntRect();
> > 
> > why is this still here?
> 
> Both of these have the same answer: this is what the function previously did. It had the normal return statement just before END_BLOCK_OBJC_EXCEPTIONS, and then a generic return after. Other functions in ScrollViewMac that return things follow this convention as well.

Because that's what they do when they get an exception inside the blocking block. Okie!
Comment 5 Beth Dakin 2014-07-18 14:48:58 PDT
Created attachment 235148 [details]
Patch that does not break Yosemite tests
Comment 6 Csaba Osztrogonác 2015-09-14 11:13:24 PDT
Comment on attachment 235098 [details]
Patch

Cleared Tim Horton's review+ from obsolete attachment 235098 [details] so that this bug does not appear in http://webkit.org/pending-commit.