Bug 162729 - RenderLayer::clipRects may return nullptr.
Summary: RenderLayer::clipRects may return nullptr.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-29 09:44 PDT by zalan
Modified: 2016-09-30 09:55 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.75 KB, patch)
2016-09-29 09:52 PDT, zalan
cdumez: review-
Details | Formatted Diff | Diff
Patch (12.48 KB, patch)
2016-09-29 12:30 PDT, zalan
cdumez: review+
Details | Formatted Diff | Diff
Patch (12.42 KB, patch)
2016-09-30 09:19 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2016-09-29 09:44:58 PDT
clipRects = *parent()->clipRects(clipRectsContext); is unsafe.
Comment 1 zalan 2016-09-29 09:52:18 PDT
Created attachment 290208 [details]
Patch
Comment 2 Chris Dumez 2016-09-29 10:04:01 PDT
Comment on attachment 290208 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.cpp:-5572
> -    clipRects = *parent()->clipRects(clipRectsContext);

This is actually safe although non obvious. I suggest we update updateClipRects() to return the cached value and return that.
Comment 3 zalan 2016-09-29 12:30:14 PDT
Created attachment 290232 [details]
Patch
Comment 4 Chris Dumez 2016-09-29 12:32:22 PDT
Comment on attachment 290232 [details]
Patch

Gorgeous, r=me
Comment 5 zalan 2016-09-30 09:19:45 PDT
Created attachment 290335 [details]
Patch
Comment 6 WebKit Commit Bot 2016-09-30 09:55:11 PDT
Comment on attachment 290335 [details]
Patch

Clearing flags on attachment: 290335

Committed r206639: <http://trac.webkit.org/changeset/206639>
Comment 7 WebKit Commit Bot 2016-09-30 09:55:15 PDT
All reviewed patches have been landed.  Closing bug.