Bug 133522

Summary: [New Multicolumn] Hit testing of composited content is broken
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, esprehn+autocc, glenn, kondapallykalyan, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
hyatt: review-
Patch
none
Patch
simon.fraser: review+, buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
none
Patch simon.fraser: review+

Description Dave Hyatt 2014-06-04 11:54:35 PDT
This is because the pagination layers need to be temporarily set up just while hit testing.
Comment 1 Dave Hyatt 2014-06-04 12:01:55 PDT
Created attachment 232490 [details]
Patch
Comment 2 WebKit Commit Bot 2014-06-04 12:04:22 PDT
Attachment 232490 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/RenderLayer.cpp:132:  This { should be at the end of the previous line  [whitespace/braces] [4]
ERROR: Source/WebCore/rendering/RenderLayer.cpp:963:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dave Hyatt 2014-06-04 12:07:25 PDT
Comment on attachment 232490 [details]
Patch

Never mind. This isn't quite right.
Comment 4 Dave Hyatt 2014-06-05 07:45:54 PDT
Created attachment 232548 [details]
Patch
Comment 5 Dave Hyatt 2014-06-05 07:53:18 PDT
Created attachment 232550 [details]
Patch
Comment 6 Simon Fraser (smfr) 2014-06-05 09:07:56 PDT
Comment on attachment 232550 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.cpp:955
>          m_enclosingPaginationLayer = this;
> +        m_enclosingLayerIsPaginatedAndComposited = isComposited();

Do you actually need to cache m_enclosingLayerIsPaginatedAndComposited? Is m_enclosingLayerIsPaginatedAndComposited ever different from m_enclosingPaginationLayer->isComposited()?
Comment 7 Dave Hyatt 2014-06-05 09:44:43 PDT
(In reply to comment #6)
> (From update of attachment 232550 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232550&action=review
> 
> > Source/WebCore/rendering/RenderLayer.cpp:955
> >          m_enclosingPaginationLayer = this;
> > +        m_enclosingLayerIsPaginatedAndComposited = isComposited();
> 
> Do you actually need to cache m_enclosingLayerIsPaginatedAndComposited? Is m_enclosingLayerIsPaginatedAndComposited ever different from m_enclosingPaginationLayer->isComposited()?

Yes. An intermediate layer can be composited that sits in between the enclosing pagination layer and this layer.
Comment 8 Dave Hyatt 2014-06-05 09:45:33 PDT
I'll get a test case going if this passes, but I actually suspect it was covered by existing test cases. We'll see what the bots say. :)
Comment 9 Simon Fraser (smfr) 2014-06-05 10:24:11 PDT
Comment on attachment 232550 [details]
Patch

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

>>> Source/WebCore/rendering/RenderLayer.cpp:955
>>> +        m_enclosingLayerIsPaginatedAndComposited = isComposited();
>> 
>> Do you actually need to cache m_enclosingLayerIsPaginatedAndComposited? Is m_enclosingLayerIsPaginatedAndComposited ever different from m_enclosingPaginationLayer->isComposited()?
> 
> Yes. An intermediate layer can be composited that sits in between the enclosing pagination layer and this layer.

The name of m_enclosingLayerIsPaginatedAndComposited is a bit confusing then.

Is it worth caching this or could you just detect it on the fly by walking up the layer tree?

> Source/WebCore/rendering/RenderLayer.cpp:966
> +        m_enclosingPaginationLayer = parent()->enclosingPaginationLayer(IncludeCompositedPaginatedLayers);
> +        m_enclosingLayerIsPaginatedAndComposited = isComposited() ? true : parent()->enclosingLayerIsPaginatedAndComposited();
> +        if (parent()->hasTransform()) {
>              m_enclosingPaginationLayer = 0;

Why bother computing enclosingPaginationLayer() if you're just going to null it out? Also nullptr.

> Source/WebCore/rendering/RenderLayer.cpp:984
> +            m_enclosingPaginationLayer = containingBlock->layer()->enclosingPaginationLayer(IncludeCompositedPaginatedLayers);
> +            m_enclosingLayerIsPaginatedAndComposited = isComposited() ? true : containingBlock->layer()->enclosingLayerIsPaginatedAndComposited();
> +            if (containingBlock->layer()->hasTransform()) {
>                  m_enclosingPaginationLayer = 0;

Ditto.

> Source/WebCore/rendering/RenderLayer.cpp:5587
> +    const RenderLayer* paginationLayer = 0;

nullptr.

> Source/WebCore/rendering/RenderLayer.h:522
> +            return 0;

nullptr.
Comment 10 Build Bot 2014-06-05 10:30:08 PDT
Comment on attachment 232550 [details]
Patch

Attachment 232550 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6040815583363072

New failing tests:
compositing/columns/hittest-composited-in-paginated.html
Comment 11 Build Bot 2014-06-05 10:30:12 PDT
Created attachment 232563 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 12 Build Bot 2014-06-05 11:22:20 PDT
Comment on attachment 232550 [details]
Patch

Attachment 232550 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4926321163501568

New failing tests:
compositing/columns/hittest-composited-in-paginated.html
Comment 13 Build Bot 2014-06-05 11:22:25 PDT
Created attachment 232567 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 14 Build Bot 2014-06-05 13:12:26 PDT
Comment on attachment 232550 [details]
Patch

Attachment 232550 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6202437551521792

New failing tests:
compositing/columns/hittest-composited-in-paginated.html
Comment 15 Build Bot 2014-06-05 13:12:32 PDT
Created attachment 232576 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 16 Dave Hyatt 2014-06-06 10:39:08 PDT
Created attachment 232621 [details]
Patch
Comment 17 Simon Fraser (smfr) 2014-06-06 10:41:27 PDT
Comment on attachment 232621 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.h:522
> +            return 0;

nullptr
Comment 18 Dave Hyatt 2014-06-06 10:58:27 PDT
Fixed landed in r169651.