Bug 154628 - Use IndentTextOrNot instead of passing isFirstLine/shouldIndentText as bool.
Summary: Use IndentTextOrNot instead of passing isFirstLine/shouldIndentText as bool.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-23 19:03 PST by zalan
Modified: 2016-03-02 13:45 PST (History)
7 users (show)

See Also:


Attachments
Patch (32.41 KB, patch)
2016-02-23 20:24 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (33.44 KB, patch)
2016-02-23 20:46 PST, zalan
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.