Bug 127343 - [CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
Summary: [CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihai Maerean
URL:
Keywords: AdobeTracked
Depends on:
Blocks: 57312
  Show dependency treegraph
 
Reported: 2014-01-21 06:17 PST by Mihai Maerean
Modified: 2014-01-22 22:52 PST (History)
7 users (show)

See Also:


Attachments
patch (6.39 KB, patch)
2014-01-21 07:23 PST, Mihai Maerean
sam: review+
mmaerean: commit-queue?
Details | Formatted Diff | Diff
patch for landing (6.46 KB, patch)
2014-01-22 03:46 PST, Mihai Maerean
no flags Details | Formatted Diff | Diff
patch for landing (6.48 KB, patch)
2014-01-22 04:50 PST, Mihai Maerean
commit-queue: commit-queue-
Details | Formatted Diff | Diff
patch for landing (6.48 KB, patch)
2014-01-22 05:22 PST, Mihai Maerean
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 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>