Bug 117120 - [CSS Regions] Positioned elements in regions get clipped if they fall outside the region
Summary: [CSS Regions] Positioned elements in regions get clipped if they fall outside...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Radu Stavila
URL:
Keywords: AdobeTracked
Depends on:
Blocks: 116295
  Show dependency treegraph
 
Reported: 2013-06-02 07:29 PDT by Mihai Balan
Modified: 2013-12-17 12:10 PST (History)
6 users (show)

See Also:


Attachments
Patch (14.26 KB, patch)
2013-12-05 06:50 PST, Radu Stavila
mihnea: review-
Details | Formatted Diff | Diff
Patch integrating feedback (16.46 KB, patch)
2013-12-17 08:58 PST, Radu Stavila
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Balan 2013-06-02 07:29:06 PDT
Positioned elements in a named flow get clipped to the region rectangle. This effectively means that positioned elements outside of the region rectangle are not rendered at all.
Comment 1 Radu Stavila 2013-12-05 06:50:28 PST
Created attachment 218512 [details]
Patch
Comment 2 Mihnea Ovidenie 2013-12-17 07:15:41 PST
Comment on attachment 218512 [details]
Patch

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

r-
In general looks good but i have some comments.

> LayoutTests/ChangeLog:8
> +        Added tests for the correct painting of the borders of differently positioned elements overflowing regions.

Please add a link to the bug for all the tests and/or a description of what each test is trying to achieve - you only describe the passing condition.

> LayoutTests/fast/regions/sticky-border-overflow.html:1
> +<!DOCTYPE html>

The other 2 tests were testing the behaviour of static/absolute positioned elements inside the relative positioned element. This test is using a different pattern for testing - is this what you intended?

> Source/WebCore/ChangeLog:8
> +        Fixed the computing of the box decorations clip rect when having statically positioned

I would like to see a description of the problem - what was wrong and how this patch if fixing that problem.

> Source/WebCore/rendering/RenderFlowThread.cpp:1307
> +        if (containerBlock->style().writingMode() != iterBox->style().writingMode())

Where is this code path tested within your proposed tests for this patch? I do not see any writing modes declarations.

> Source/WebCore/rendering/RenderFlowThread.cpp:1316
> +    // point in restricting the X clipping rect (this also saves us the trouble

Do you mean " restricting the clipping rect dimensions perpendicular to the fragmentation direction" ?  From what i can tell you also adjust the width, not only the x.

> Source/WebCore/rendering/RenderFlowThread.cpp:1317
> +    // of handling percent-based widths and margins).

I do not understand this comment about handling percent-based widths and margins and i do not see any related tests on this.
Comment 3 Radu Stavila 2013-12-17 08:13:35 PST
Comment on attachment 218512 [details]
Patch

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

>> LayoutTests/ChangeLog:8
>> +        Added tests for the correct painting of the borders of differently positioned elements overflowing regions.
> 
> Please add a link to the bug for all the tests and/or a description of what each test is trying to achieve - you only describe the passing condition.

OK.

>> LayoutTests/fast/regions/sticky-border-overflow.html:1
>> +<!DOCTYPE html>
> 
> The other 2 tests were testing the behaviour of static/absolute positioned elements inside the relative positioned element. This test is using a different pattern for testing - is this what you intended?

Yes, tests for absolute-positioned elements and for relative-positioned elements were added in a previous patch (https://bugs.webkit.org/show_bug.cgi?id=124919). This test adds the same testing for sticky-positioned elements.

>> Source/WebCore/ChangeLog:8
>> +        Fixed the computing of the box decorations clip rect when having statically positioned
> 
> I would like to see a description of the problem - what was wrong and how this patch if fixing that problem.

OK, will update description.

>> Source/WebCore/rendering/RenderFlowThread.cpp:1307
>> +        if (containerBlock->style().writingMode() != iterBox->style().writingMode())
> 
> Where is this code path tested within your proposed tests for this patch? I do not see any writing modes declarations.

This is not new code. It just appears as if it was in the diff because it was indented.

>> Source/WebCore/rendering/RenderFlowThread.cpp:1316
>> +    // point in restricting the X clipping rect (this also saves us the trouble
> 
> Do you mean " restricting the clipping rect dimensions perpendicular to the fragmentation direction" ?  From what i can tell you also adjust the width, not only the x.

I meant the X axis, will update the comment.

>> Source/WebCore/rendering/RenderFlowThread.cpp:1317
>> +    // of handling percent-based widths and margins).
> 
> I do not understand this comment about handling percent-based widths and margins and i do not see any related tests on this.

Will update comment. This handles an existing test - positioned-objects-block-static-spanning-regions.html
Comment 4 Radu Stavila 2013-12-17 08:58:11 PST
Created attachment 219423 [details]
Patch integrating feedback
Comment 5 Mihnea Ovidenie 2013-12-17 09:17:17 PST
Comment on attachment 219423 [details]
Patch integrating feedback

r=me
Comment 6 WebKit Commit Bot 2013-12-17 12:10:38 PST
Comment on attachment 219423 [details]
Patch integrating feedback

Clearing flags on attachment: 219423

Committed r160721: <http://trac.webkit.org/changeset/160721>
Comment 7 WebKit Commit Bot 2013-12-17 12:10:41 PST
All reviewed patches have been landed.  Closing bug.