Bug 154919 - Add support for the "first" value of the hanging-punctuation property
Summary: Add support for the "first" value of the hanging-punctuation property
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: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 09:35 PST by Dave Hyatt
Modified: 2016-03-02 14:29 PST (History)
6 users (show)

See Also:


Attachments
Patch (20.57 KB, patch)
2016-03-02 09:42 PST, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (19.68 KB, patch)
2016-03-02 09:48 PST, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (19.68 KB, patch)
2016-03-02 09:51 PST, Dave Hyatt
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 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.