Bug 128590

Summary: [CSS Regions] Overflow above the first region is not properly painted for regions with padding
Product: WebKit Reporter: Radu Stavila <stavila>
Component: CSSAssignee: Radu Stavila <stavila>
Status: RESOLVED FIXED    
Severity: Normal CC: abucur, commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser, WebkitBugTracker
Priority: P2 Keywords: AdobeTracked
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 57312    
Attachments:
Description Flags
Patch
abucur: review-
Patch with update CL none

Description Radu Stavila 2014-02-11 02:01:50 PST
[CSS Regions] Overflow above the first region is not properly painted for regions with padding
Comment 1 Radu Stavila 2014-02-11 03:06:07 PST
Created attachment 223833 [details]
Patch
Comment 2 Andrei Bucur 2014-02-11 05:59:48 PST
Comment on attachment 223833 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        anonymous regions, regions never have borders/padding/margins. All of these are found 

The CL should emphasize the technical problem is we use the layer of the region container (with a coordinate system) but we offset the content using the location of the region. If the anonymous region had a layer and we used that instead of the region container layer, there wouldn't have been any problems. It's less important the fact anonymous regions don't have borders/padding/margins.

> Source/WebCore/rendering/RenderLayer.cpp:5250
> +    LayoutRect regionContentBox = region->regionContainer()->contentBoxRect();

mapLayerClipRectsToFragmentationLayer can take just RenderNamedFlowThreadFragments as a parameter or generic RenderRegions?

> Source/WebCore/rendering/RenderRegion.cpp:153
> +RenderBlockFlow* RenderRegion::regionContainer() const

Can we move this on RenderNamedFlowFragment? It makes more sense considering we assert the parent is a RenderNamedFlowFragmentContainer.
Comment 3 Radu Stavila 2014-02-11 06:39:48 PST
Comment on attachment 223833 [details]
Patch

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

>> Source/WebCore/rendering/RenderLayer.cpp:5250
>> +    LayoutRect regionContentBox = region->regionContainer()->contentBoxRect();
> 
> mapLayerClipRectsToFragmentationLayer can take just RenderNamedFlowThreadFragments as a parameter or generic RenderRegions?

I'll create a new issue to use RenderNamedFlowFragment whenever possible instead of RenderRegion.
Comment 4 Radu Stavila 2014-02-11 06:43:22 PST
Created attachment 223849 [details]
Patch with update CL
Comment 5 Andrei Bucur 2014-02-11 06:44:53 PST
(In reply to comment #3)
> (From update of attachment 223833 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223833&action=review
> 
> >> Source/WebCore/rendering/RenderLayer.cpp:5250
> >> +    LayoutRect regionContentBox = region->regionContainer()->contentBoxRect();
> > 
> > mapLayerClipRectsToFragmentationLayer can take just RenderNamedFlowThreadFragments as a parameter or generic RenderRegions?
> 
> I'll create a new issue to use RenderNamedFlowFragment whenever possible instead of RenderRegion.

Great!
Comment 6 WebKit Commit Bot 2014-02-11 08:07:07 PST
Comment on attachment 223849 [details]
Patch with update CL

Clearing flags on attachment: 223849

Committed r163873: <http://trac.webkit.org/changeset/163873>
Comment 7 WebKit Commit Bot 2014-02-11 08:07:10 PST
All reviewed patches have been landed.  Closing bug.