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

Issue 1504083002: Refactor BreakingContext::handleText (Closed)

Created:
5 years ago by rhogan
Modified:
5 years ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, 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

Refactor and comment BreakingContext::handleText() This is a large loop condition which spends a lot of its time working out whether the current whitespace character is breakable or not. Refactor it to make its operation clearer and add some comments that make it easier to take in at a glance what the loop is doing. This first part of the refactoring gets rid of a >100 line if-clause and converts it to an early |continue|. There is just no way of making this part of the refactoring easy to follow. :) (It's even worse if I duplicate the block of code I've here put into a prepareNewCharacter() function.) This is the first of a number of planned passes to make this function more friendly. BUG=567080 Committed: https://crrev.com/65ecdc54baece8049b76ee11a1ed69f9436d5be9 Cr-Commit-Position: refs/heads/master@{#365629}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Updated #

Patch Set 3 : Simplified #

Total comments: 2

Patch Set 4 : Updated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -155 lines) Patch
M third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h View 1 2 3 5 chunks +165 lines, -155 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
rhogan
5 years ago (2015-12-07 17:32:04 UTC) #3
leviw_travelin_and_unemployed
eae is out, kojii would be a good reviewer :)
5 years ago (2015-12-07 22:56:47 UTC) #5
kojii
https://codereview.chromium.org/1504083002/diff/1/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h File third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h (right): https://codereview.chromium.org/1504083002/diff/1/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h#newcode739 third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h:739: // We just entered a mode where we are ...
5 years ago (2015-12-08 08:02:10 UTC) #6
rhogan
On 2015/12/08 at 08:02:10, kojii wrote: > https://codereview.chromium.org/1504083002/diff/1/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h > File third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h (right): > > https://codereview.chromium.org/1504083002/diff/1/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h#newcode739 ...
5 years ago (2015-12-08 10:01:56 UTC) #7
kojii
non-owner LGTM. Levi?
5 years ago (2015-12-08 10:18:59 UTC) #8
leviw_travelin_and_unemployed
I have little doubt this is a good patch. Thanks for doing this! Honestly though, ...
5 years ago (2015-12-08 19:46:39 UTC) #9
rhogan
On 2015/12/08 at 19:46:39, leviw wrote: > I have little doubt this is a good ...
5 years ago (2015-12-08 19:51:40 UTC) #10
leviw_travelin_and_unemployed
On 2015/12/08 at 19:51:40, robhogan wrote: > On 2015/12/08 at 19:46:39, leviw wrote: > > ...
5 years ago (2015-12-08 19:59:25 UTC) #11
rhogan
On 2015/12/08 at 19:59:25, leviw wrote: > On 2015/12/08 at 19:51:40, robhogan wrote: > > ...
5 years ago (2015-12-08 21:08:51 UTC) #12
kojii
I ended up loading the patch locally, but code are moved around so much that ...
5 years ago (2015-12-10 08:47:47 UTC) #13
rhogan
On 2015/12/10 at 08:47:47, kojii wrote: > I ended up loading the patch locally, but ...
5 years ago (2015-12-12 16:56:00 UTC) #17
leviw_travelin_and_unemployed
This is still pretty tricky to follow, but lgtm with a couple nits. https://codereview.chromium.org/1504083002/diff/40001/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h File ...
5 years ago (2015-12-15 21:40:07 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1504083002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1504083002/60001
5 years ago (2015-12-16 21:23:22 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years ago (2015-12-16 21:48:28 UTC) #22
commit-bot: I haz the power
5 years ago (2015-12-16 21:50:13 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/65ecdc54baece8049b76ee11a1ed69f9436d5be9
Cr-Commit-Position: refs/heads/master@{#365629}

Powered by Google App Engine
This is Rietveld 408576698