Bug 126917

Summary: Map RootInlineBox to containing region via bit+hashmap.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
koivisto: review+
Moon lander none

Description Andreas Kling 2014-01-13 10:43:13 PST
Map RootInlineBox to containing region via bit+hashmap.
Comment 1 Andreas Kling 2014-01-13 10:46:27 PST
Created attachment 221062 [details]
Patch
Comment 2 Antti Koivisto 2014-01-13 10:53:10 PST
Comment on attachment 221062 [details]
Patch

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

> Source/WebCore/rendering/RootInlineBox.cpp:279
>  void RootInlineBox::setContainingRegion(RenderRegion* region)
>  {
>      ASSERT(!isDirty());
>      ASSERT(blockFlow().flowThreadContainingBlock());
> -    m_containingRegion = region;
> +
> +    if (!region && !m_hasContainingRegion)
> +        return;
> +
> +    if (region)
> +        containingRegionMap().set(this, region);
> +    else
> +        containingRegionMap().remove(this);
> +
> +    m_hasContainingRegion = !!region;
>  }

It would be nicer to have setContainingRegion(RenderRegion&) and clearContainingRegion() separately.
Comment 3 Andreas Kling 2014-01-13 11:49:31 PST
Created attachment 221067 [details]
Moon lander
Comment 4 WebKit Commit Bot 2014-01-13 14:29:04 PST
Comment on attachment 221067 [details]
Moon lander

Clearing flags on attachment: 221067

Committed r161909: <http://trac.webkit.org/changeset/161909>
Comment 5 WebKit Commit Bot 2014-01-13 14:29:07 PST
All reviewed patches have been landed.  Closing bug.