Bug 154919

Summary: Add support for the "first" value of the hanging-punctuation property
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, mmaxfield, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch simon.fraser: review+

Description Dave Hyatt 2016-03-02 09:35:33 PST
Add support for the "first" value of the hanging-punctuation property.
Comment 1 Dave Hyatt 2016-03-02 09:42:14 PST
Created attachment 272660 [details]
Patch
Comment 2 WebKit Commit Bot 2016-03-02 09:43:04 PST
Attachment 272660 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/line/BreakingContext.h:791:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/rendering/RenderBlockLineLayout.cpp:813:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/rendering/RenderBlockLineLayout.cpp:813:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/rendering/RenderBlockFlow.cpp:4186:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 4 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dave Hyatt 2016-03-02 09:48:36 PST
Created attachment 272661 [details]
Patch
Comment 4 WebKit Commit Bot 2016-03-02 09:49:42 PST
Attachment 272661 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/line/BreakingContext.h:791:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Dave Hyatt 2016-03-02 09:51:12 PST
Created attachment 272663 [details]
Patch
Comment 6 WebKit Commit Bot 2016-03-02 09:52:51 PST
Attachment 272663 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/line/BreakingContext.h:791:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Simon Fraser (smfr) 2016-03-02 09:59:37 PST
Comment on attachment 272663 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Reviewed by NOBODY (OOPS!).
> +
> +        New tests added in fast/text.

Can you reference the spec here please.

> Source/WebCore/rendering/RenderBlockFlow.cpp:4067
> +    bool canHangPunctuationAtStart = styleToUse.hangingPunctuation() & FirstHangingPunctuation;

Maybe add helpers like RenderStyle::hasFirstHangingPunctuation()

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:809
> +static bool inlineAncestorHasStartBorderPaddingOrMargin(const RenderBlockFlow& block, InlineBox* box)

const InlineBox&

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:820
> +static bool isLastInFlowRun(BidiRun* run)

const BidiRun&
Comment 8 Dave Hyatt 2016-03-02 14:29:31 PST
Landed in r197464.