Bug 190457 - Hide RenderLayer z-order and normal flow lists behind iterators
Summary: Hide RenderLayer z-order and normal flow lists behind iterators
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-10 20:05 PDT by Simon Fraser (smfr)
Modified: 2018-11-07 07:03 PST (History)
6 users (show)

See Also:


Attachments
Patch (41.40 KB, patch)
2018-10-10 20:07 PDT, Simon Fraser (smfr)
zalan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-10-10 20:05:19 PDT
Hide RenderLayer z-order and normal flow lists behind iterators
Comment 1 Simon Fraser (smfr) 2018-10-10 20:07:17 PDT
Created attachment 352011 [details]
Patch
Comment 2 zalan 2018-10-10 21:04:49 PDT
Comment on attachment 352011 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.h:373
> +        iterator begin() { return m_layerList ? m_layerList->begin() : nullptr; }
> +        iterator end() { return m_layerList ? m_layerList->end() : nullptr; }
> +
> +        reverse_iterator rbegin() { return reverse_iterator(end()); }
> +        reverse_iterator rend() { return reverse_iterator(begin()); }

It's a bit odd that a class named Iterator has functions like these.
Comment 3 Simon Fraser (smfr) 2018-10-11 09:36:04 PDT
LayerIterable? LayerList?
Comment 4 zalan 2018-10-11 13:36:47 PDT
(In reply to Simon Fraser (smfr) from comment #3)
> LayerIterable? LayerList?

LayerList is fine.
Comment 5 Simon Fraser (smfr) 2018-11-07 07:01:29 PST
https://trac.webkit.org/changeset/237058/webkit
Comment 6 Radar WebKit Bug Importer 2018-11-07 07:03:17 PST
<rdar://problem/45874621>