Bug 154628

Summary: Use IndentTextOrNot instead of passing isFirstLine/shouldIndentText as bool.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, hyatt, kondapallykalyan, mmaxfield, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch simon.fraser: review+

Description zalan 2016-02-23 19:03:28 PST
In RenderBlock (availableLogicalWidthForLine etc) and through the dependencies.
Comment 1 zalan 2016-02-23 20:24:22 PST
Created attachment 272082 [details]
Patch

This patch has a source dependency on bug 154019.
Comment 2 zalan 2016-02-23 20:46:24 PST
Created attachment 272083 [details]
Patch
Comment 3 Simon Fraser (smfr) 2016-02-24 09:20:14 PST
Comment on attachment 272083 [details]
Patch

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

> Source/WebCore/rendering/RootInlineBox.cpp:724
> +        LayoutUnit nextLeft = blockFlow().logicalLeftOffsetForLine(nextTop, DoNotIndentText);
> +        LayoutUnit nextRight = blockFlow().logicalRightOffsetForLine(nextTop, DoNotIndentText);
> +        LayoutUnit newLeft = blockFlow().logicalLeftOffsetForLine(selectionBottom, DoNotIndentText);
> +        LayoutUnit newRight = blockFlow().logicalRightOffsetForLine(selectionBottom, DoNotIndentText);

Seems like DoNot is much more common; maybe make it a default parameter?
Comment 4 Myles C. Maxfield 2016-02-24 09:55:30 PST
Comment on attachment 272083 [details]
Patch

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

> Source/WebCore/rendering/RenderBlock.h:125
> +    LayoutUnit availableLogicalWidthForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const

I dislike names with "OrNot." How about ShouldIndentText? ShouldIndent? IndentionRequired?
Comment 5 zalan 2016-03-02 13:42:13 PST
Committed r197462: <http://trac.webkit.org/changeset/197462>
Comment 6 zalan 2016-03-02 13:45:14 PST
(In reply to comment #4)
> Comment on attachment 272083 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=272083&action=review
> 
> > Source/WebCore/rendering/RenderBlock.h:125
> > +    LayoutUnit availableLogicalWidthForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
> 
> I dislike names with "OrNot." How about ShouldIndentText? ShouldIndent?
> IndentionRequired?

I dislike it very much too, but i'd rather have it in a follow-up patch.