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

Issue 1941303003: Simplify logical iteration in SVGTextLayoutEngine (Closed)

Created:
4 years, 7 months ago by fs
Modified:
4 years, 7 months ago
CC:
fs, blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, 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

Simplify logical iteration in SVGTextLayoutEngine By replacing m_logicalCharacterOffset == logicalTextNode->textLength() by the corresponding metrics list equivalent, it becomes obvious that we're just checking the same thing twice in succession. Remove the first check and block of code. Also reverse the test in the loop and refactor to avoid the 'continue' when skipping whitespace. The second part of the disjunction (w/ logicalMetrics.isEmpty()) does not do anything useful, so is removed. This makes the condition match what SVGTextLayoutAttributesBuilder does (which is the intention.) BUG=607906 Committed: https://crrev.com/2f349013b11f8906316b41de2867f253a81ad147 Cr-Commit-Position: refs/heads/master@{#391281}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -24 lines) Patch
M third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp View 1 chunk +13 lines, -24 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
fs
4 years, 7 months ago (2016-05-03 16:41:23 UTC) #2
Stephen Chennney
lgtm
4 years, 7 months ago (2016-05-03 16:46:45 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941303003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941303003/1
4 years, 7 months ago (2016-05-03 17:26:35 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-03 17:31:02 UTC) #6
commit-bot: I haz the power
4 years, 7 months ago (2016-05-03 17:33:52 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/2f349013b11f8906316b41de2867f253a81ad147
Cr-Commit-Position: refs/heads/master@{#391281}

Powered by Google App Engine
This is Rietveld 408576698