Bug 127343

Summary: [CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
Product: WebKit Reporter: Mihai Maerean <mmaerean>
Component: WebCore Misc.Assignee: Mihai Maerean <mmaerean>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, mihnea, 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
sam: review+
patch for landing
none
patch for landing
commit-queue: commit-queue-
patch for landing none

Description Mihai Maerean 2014-01-21 06:17:29 PST
RenderNamedFlowFragment::layerOwner cannot return null because regions create stacking contexts which create layers.
Comment 1 Mihai Maerean 2014-01-21 07:23:57 PST
Created attachment 221741 [details]
patch
Comment 2 Sam Weinig 2014-01-21 22:05:22 PST
Comment on attachment 221741 [details]
patch

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

> Source/WebCore/rendering/RenderFlowThread.cpp:256
>      for (auto iter = m_regionList.begin(), end = m_regionList.end(); iter != end; ++iter)
> -        if (RenderLayerModelObject* layerOwner = toRenderNamedFlowFragment(*iter)->layerOwner())
> -            if (layerOwner->hasLayer() && layerOwner->layer()->hasCompositingDescendant())
> -                return true;
> +        if (toRenderNamedFlowFragment(*iter)->layerOwner().layer()->hasCompositingDescendant())
> +            return true;

You should totally convert this loop to for-range style while you are here.

> Source/WebCore/rendering/RenderLayer.cpp:6940
> +    LayoutRect regionContentBox = toRenderBox(&region->layerOwner())->contentBoxRect();

This can probably be:
LayoutRect regionContentBox = toRenderBox(region->layerOwner()).contentBoxRect();
Comment 3 Mihai Maerean 2014-01-22 03:46:29 PST
Created attachment 221855 [details]
patch for landing
Comment 4 Mihai Maerean 2014-01-22 04:50:23 PST
Created attachment 221859 [details]
patch for landing
Comment 5 WebKit Commit Bot 2014-01-22 04:55:56 PST
Comment on attachment 221859 [details]
patch for landing

Rejecting attachment 221859 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 221859, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/4584376553701376
Comment 6 Mihai Maerean 2014-01-22 05:22:08 PST
Created attachment 221862 [details]
patch for landing
Comment 7 WebKit Commit Bot 2014-01-22 09:25:52 PST
Comment on attachment 221862 [details]
patch for landing

Clearing flags on attachment: 221862

Committed r162523: <http://trac.webkit.org/changeset/162523>