Bug 59846

Summary: Scrolling causes rounded bottom window corners to become square
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch that addresses Simon's comments simon.fraser: review+

Description Beth Dakin 2011-04-29 16:42:55 PDT
In a window with rounded corners, scrolling in WK2 causes the rounded corners to become square.

<rdar://problem/9234239>

Patch forthcoming.
Comment 1 Beth Dakin 2011-04-29 16:51:50 PDT
Created attachment 91767 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-04-29 16:58:14 PDT
Comment on attachment 91767 [details]
Patch

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

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm:145
> +        NSDisableScreenUpdates();

A comment explaining why disabling is required would be good

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm:161
> +    m_windowBottomCornerIntersectionRect = NSZeroRect;
> +    m_windowBottomCornerIntersectionRect = [[m_wkView window] _intersectBottomCornersWithRect:[m_wkView convertRect:[m_wkView visibleRect] toView:nil]];

Why the double assignment?
Comment 3 Simon Fraser (smfr) 2011-04-29 17:07:59 PDT
Comment on attachment 91767 [details]
Patch

Maybe move this code to WKView, too?
Comment 4 Beth Dakin 2011-04-29 17:48:10 PDT
Created attachment 91774 [details]
Patch that addresses Simon's comments
Comment 5 Simon Fraser (smfr) 2011-04-29 17:53:30 PDT
Comment on attachment 91774 [details]
Patch that addresses Simon's comments

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

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.h:127
> +    NSRect m_windowBottomCornerIntersectionRect;

This is unused?

> Source/WebKit2/UIProcess/API/mac/WKView.mm:933
> +    BOOL maskWindow = window && !NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect);

Would read better if this was shouldMaskWindow
Comment 6 Beth Dakin 2011-04-29 17:56:55 PDT
(In reply to comment #5)
> (From update of attachment 91774 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=91774&action=review
> 
> > Source/WebKit2/UIProcess/API/mac/PageClientImpl.h:127
> > +    NSRect m_windowBottomCornerIntersectionRect;
> 
> This is unused?
> 

Oops! Meant to remove that.

> > Source/WebKit2/UIProcess/API/mac/WKView.mm:933
> > +    BOOL maskWindow = window && !NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect);
> 
> Would read better if this was shouldMaskWindow

Will change.

Thanks!
Comment 7 Beth Dakin 2011-04-29 18:01:30 PDT
Committed fix with revision 85376.