Bug 123725 - Use RenderAncestorIterator in a couple of places.
Summary: Use RenderAncestorIterator in a couple of places.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-04 01:37 PST by Andreas Kling
Modified: 2013-11-04 16:11 PST (History)
2 users (show)

See Also:


Attachments
Patch (8.37 KB, patch)
2013-11-04 01:46 PST, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-11-04 01:37:48 PST
Use RenderAncestorIterator in a couple of places.
Comment 1 Andreas Kling 2013-11-04 01:46:00 PST
Created attachment 215897 [details]
Patch
Comment 2 Antti Koivisto 2013-11-04 04:00:04 PST
Comment on attachment 215897 [details]
Patch

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

> Source/WebCore/rendering/RenderRegion.cpp:405
> +    if (auto closestFlowThreadAncestor = ancestorsOfType<RenderNamedFlowThread>(*this).first()) {
> +        m_parentNamedFlowThread = &*closestFlowThreadAncestor;
> +        // Do not take into account a region that links a flow with itself. The dependency
> +        // cannot change, so it is not worth adding it to the list.
> +        if (m_flowThread == m_parentNamedFlowThread)
> +            m_flowThread = nullptr;
> +    } else
> +        m_parentNamedFlowThread = nullptr;
>  }

I would reverse the test and do early return in the else case.
Comment 3 Andreas Kling 2013-11-04 16:11:12 PST
Committed r158611: <http://trac.webkit.org/changeset/158611>