Bug 118531

Summary: [CSS Regions] In a region chain with auto-height regions, lines get their length based only on the first region
Product: WebKit Reporter: Mihai Balan <mibalan>
Component: CSSAssignee: Andrei Bucur <abucur>
Status: RESOLVED FIXED    
Severity: Normal CC: abucur, commit-queue, esprehn+autocc, glenn, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 118595    
Bug Blocks: 57312    
Attachments:
Description Flags
Test-case
none
Patch
none
Patch none

Description Mihai Balan 2013-07-10 08:39:34 PDT
Created attachment 206392 [details]
Test-case

If a region chain has regions with height: auto and specified widths, line breaking will not take into consideration the width of the current region, but the width of the first region. This can lead to text overflowing a region (if narrower than the first region) or to regions unnecessarily tall and with unneeded whitespace (if wider than the first region).
Comment 1 Andrei Bucur 2013-07-11 07:51:11 PDT
Created attachment 206463 [details]
Patch
Comment 2 Alexandru Chiculita 2013-07-11 08:02:38 PDT
Comment on attachment 206463 [details]
Patch

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

Looks good.

> Source/WebCore/rendering/RenderFlowThread.cpp:267
> +    ASSERT(computedValues.m_extent >= 0);

Looks like having no regions will hit this assert computedValues.m_extent >= 0

> Source/WebCore/rendering/RenderFlowThread.h:171
> +    static LayoutUnit maxFlowThreadSize() { return LayoutUnit::max() / 2; }

nit: I would not repeat the flowThread in the name and I think we should mention that it refers to the logicalHeight of the flow. What about maxLogicalHeight() ? Add a comment that it is used to estimate the size of the flow.
Comment 3 Andrei Bucur 2013-07-11 08:22:23 PDT
Created attachment 206467 [details]
Patch
Comment 4 WebKit Commit Bot 2013-07-11 09:18:34 PDT
Comment on attachment 206467 [details]
Patch

Clearing flags on attachment: 206467

Committed r152572: <http://trac.webkit.org/changeset/152572>
Comment 5 WebKit Commit Bot 2013-07-11 09:18:37 PDT
All reviewed patches have been landed.  Closing bug.