Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Issue 1978683002: Enable hyphens: auto and none in BreakingContext (Closed)

Created:
4 years, 7 months ago by kojii
Modified:
4 years, 7 months ago
Reviewers:
drott, eae
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, drott, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable hyphens: auto and none in BreakingContext This patch enables "hyphens: auto"[1] (automatic hyphenation using the dictionaries) and "hyphens: no" (disables soft-hyphens for heading and a11y) in BreakingContext, along with a mock hyphenation dictionary for testing. The code to support hyphenation in InlineTextBox, LayoutText, LayoutTreeAsText, etc. were still there and reused in this code. LayoutText::computePreferredLogicalWidths() needs to support the "hyphens" property to compute the min-content width[2]. This will be in following patches. Platform support for dictionaries will also be in following patches. Detailed control of hyphenation defined in CSS Text Level 4[3] is not included in this phase. [1] https://drafts.csswg.org/css-text-3/#hyphens-property [2] https://drafts.csswg.org/css-sizing-3/#min-content [3] https://drafts.csswg.org/css-text-4/#hyphenation BUG=605840 Committed: https://crrev.com/52bb31c6d49c5376103577363720410994e55113 Cr-Commit-Position: refs/heads/master@{#393972}

Patch Set 1 #

Patch Set 2 : tests #

Patch Set 3 : cleanup #

Patch Set 4 : locale test and missing files #

Patch Set 5 : Fix test #

Total comments: 4

Patch Set 6 : drott review #

Total comments: 9

Patch Set 7 : eae review #

Patch Set 8 : Add comments for heuristic, adjust widths of hyphens-auto-mock test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -26 lines) Patch
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-auto-mock.html View 1 2 3 4 5 6 7 1 chunk +81 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-auto-mock-expected.html View 1 2 3 4 5 6 7 1 chunk +79 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-locale.html View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-locale-expected.html View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-none.html View 1 1 chunk +25 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-none-expected.html View 1 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h View 1 2 3 4 5 6 7 12 chunks +92 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.idl View 1 chunk +2 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/core/testing/MockHyphenation.h View 1 2 3 1 chunk +9 lines, -4 lines 0 comments Download
A third_party/WebKit/Source/core/testing/MockHyphenation.cpp View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.cpp View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/text/Hyphenation.h View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/text/Hyphenation.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/text/HyphenationTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (9 generated)
kojii
PTAL. cc: drott@ as this include one argument removal from the API surface, and the ...
4 years, 7 months ago (2016-05-16 04:12:41 UTC) #3
drott
Looks well written and well tested to me, but I don't understand this part of ...
4 years, 7 months ago (2016-05-16 08:58:20 UTC) #8
kojii
https://codereview.chromium.org/1978683002/diff/80001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h File third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h (right): https://codereview.chromium.org/1978683002/diff/80001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h#newcode103 third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h:103: bool canBreakAtWhitespace(bool breakWords, WordMeasurement&, bool stoppedIgnoringSpaces, bool& hyphenated, float ...
4 years, 7 months ago (2016-05-16 10:21:53 UTC) #9
eae
https://codereview.chromium.org/1978683002/diff/100001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h File third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h (right): https://codereview.chromium.org/1978683002/diff/100001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h#newcode640 third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h:640: float maxPrefixWidth = m_width.availableWidth() + LayoutUnit::epsilon() Do we need ...
4 years, 7 months ago (2016-05-16 16:43:26 UTC) #10
kojii
https://codereview.chromium.org/1978683002/diff/100001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h File third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h (right): https://codereview.chromium.org/1978683002/diff/100001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h#newcode640 third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h:640: float maxPrefixWidth = m_width.availableWidth() + LayoutUnit::epsilon() On 2016/05/16 at ...
4 years, 7 months ago (2016-05-16 17:29:34 UTC) #11
eae
LGTM https://codereview.chromium.org/1978683002/diff/100001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h File third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h (right): https://codereview.chromium.org/1978683002/diff/100001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h#newcode640 third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h:640: float maxPrefixWidth = m_width.availableWidth() + LayoutUnit::epsilon() On 2016/05/16 ...
4 years, 7 months ago (2016-05-16 17:32:38 UTC) #12
kojii
On 2016/05/16 at 17:32:38, eae wrote: > > PS7 removes epsilon without > > modifying ...
4 years, 7 months ago (2016-05-16 18:29:28 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1978683002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1978683002/140001
4 years, 7 months ago (2016-05-16 23:09:12 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 7 months ago (2016-05-16 23:14:22 UTC) #17
commit-bot: I haz the power
4 years, 7 months ago (2016-05-16 23:16:41 UTC) #19
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/52bb31c6d49c5376103577363720410994e55113
Cr-Commit-Position: refs/heads/master@{#393972}

Powered by Google App Engine
This is Rietveld 408576698