Bug 131161 - [CSS Regions] Elements with overflow:auto are not painted inside regions when following a float
Summary: [CSS Regions] Elements with overflow:auto are not painted inside regions when...
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: 57312
  Show dependency treegraph
 
Reported: 2014-04-03 05:57 PDT by Radu Stavila
Modified: 2014-05-05 09:15 PDT (History)
6 users (show)

See Also:


Attachments
Test-case (1.03 KB, text/html)
2014-04-03 05:57 PDT, Radu Stavila
no flags Details
Patch (6.37 KB, patch)
2014-05-05 06:17 PDT, Radu Stavila
hyatt: review-
Details | Formatted Diff | Diff
Patch implementing reviewer feedback (15.94 KB, text/plain)
2014-05-05 07:57 PDT, Radu Stavila
no flags Details
Patch implementing reviewer feedback (6.44 KB, patch)
2014-05-05 07:59 PDT, 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 Radu Stavila 2014-04-03 05:57:16 PDT
Created attachment 228502 [details]
Test-case

Elements with overflow:auto are not painted inside regions when following a float. See attached test-case. The blue div should be painted next to the float but it doesn't appear at all.
Comment 1 Radu Stavila 2014-04-24 05:37:38 PDT
Further findings:
1. Adding margin-left to the overflow:auto element causes it to appear. However, hit-testing inside it is not working.
2. Setting scrollbar preferences to always show causes the element to appear. The float before it now has a strange disabled scrollbar. The same as above, hit-testing is not working in the overflow:auto element.
Comment 2 Radu Stavila 2014-05-05 06:17:33 PDT
Created attachment 230822 [details]
Patch
Comment 3 Radu Stavila 2014-05-05 06:36:47 PDT
Added patch for the painting of the overflow:auto elements.

Additional issues:
- invalid scrollbar appears in some situations: https://bugs.webkit.org/show_bug.cgi?id=132562
- hit-testing does not work properly on the overflow:auto element: https://bugs.webkit.org/show_bug.cgi?id=132563
Comment 4 Dave Hyatt 2014-05-05 07:52:21 PDT
Comment on attachment 230822 [details]
Patch

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

r-

> Source/WebCore/rendering/RenderLayer.cpp:5657
> +            // Boxes inside flow threads don't have their logical left computed to avoid
> +            // floats. Instead, that information is kept in their RenderBoxRegionInfo structure.
> +            // As such, the layer bounds must be enlarged to encompass their background rect
> +            // to ensure intersecting them won't result in an empty rect, which would eventually
> +            // cause paint rejection.
> +            if (flowThread) {
> +                if (flowThread->style().isHorizontalWritingMode())
> +                    layerBounds.shiftMaxXEdgeTo(std::max(layerBounds.maxX(), backgroundRect.rect().maxX()));
> +                else
> +                    layerBounds.shiftMaxYEdgeTo(std::max(layerBounds.maxY(), backgroundRect.rect().maxY()));
> +            }

Don't run this code for columns, so change to if (flowThread && flowThread->isNamedRenderFlowThread())
Comment 5 Radu Stavila 2014-05-05 07:57:31 PDT
Created attachment 230830 [details]
Patch implementing reviewer feedback
Comment 6 Radu Stavila 2014-05-05 07:59:46 PDT
Created attachment 230831 [details]
Patch implementing reviewer feedback
Comment 7 Dave Hyatt 2014-05-05 08:00:39 PDT
Comment on attachment 230831 [details]
Patch implementing reviewer feedback

r=me
Comment 8 WebKit Commit Bot 2014-05-05 09:15:16 PDT
Comment on attachment 230831 [details]
Patch implementing reviewer feedback

Clearing flags on attachment: 230831

Committed r168288: <http://trac.webkit.org/changeset/168288>
Comment 9 WebKit Commit Bot 2014-05-05 09:15:21 PDT
All reviewed patches have been landed.  Closing bug.