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

Issue 1538453002: Refactor and comment BreakingContext::handleText() (Closed)

Created:
5 years ago by rhogan
Modified:
5 years ago
Reviewers:
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
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 from issue 1504083002 at patchset 60001 (http://crrev.com/1504083002#ps60001)

Patch Set 1 #

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 5 chunks +165 lines, -155 lines 0 comments Download

Dependent Patchsets:

Powered by Google App Engine
This is Rietveld 408576698