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

Issue 1816073002: Optimize the characterNumberAtPositionCallback text query (Closed)

Created:
4 years, 9 months ago by fs
Modified:
4 years, 9 months ago
Reviewers:
pdr.
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@svg-textquery--cleanup-2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize the characterNumberAtPositionCallback text query Refactor the calculateGlyphPositionWithoutTransform and calculateGlyphBoundaries helpers to get logicalGlyphPositionToPhysical and physicalGlyphExtents. Use the new methods to implement characterNumberAtPositionCallback as an iteration over the contributing glyphs, thereby avoiding the O(n^2) for glyph bounds calculation. Also fold calculateFragmentBoundaries into characterNumberAtPositionCallback, because it is trivial, and most of it is needed for the remaining part of the function too. Committed: https://crrev.com/4be79e4d348ae00cd5ad7f78b3e3d9f5bf5d6842 Cr-Commit-Position: refs/heads/master@{#382557}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Tidy up comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -39 lines) Patch
M third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp View 1 5 chunks +47 lines, -39 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 10 (4 generated)
fs
4 years, 9 months ago (2016-03-21 14:10:03 UTC) #2
pdr.
LGTM https://codereview.chromium.org/1816073002/diff/1/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp File third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp (right): https://codereview.chromium.org/1816073002/diff/1/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp#newcode452 third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp:452: // Use the SVGTextMetrics computed by SVGTextMetricsBuilder (which ...
4 years, 9 months ago (2016-03-21 22:55:57 UTC) #3
fs
https://codereview.chromium.org/1816073002/diff/1/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp File third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp (right): https://codereview.chromium.org/1816073002/diff/1/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp#newcode452 third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp:452: // Use the SVGTextMetrics computed by SVGTextMetricsBuilder (which spends ...
4 years, 9 months ago (2016-03-22 10:55:30 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1816073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1816073002/20001
4 years, 9 months ago (2016-03-22 11:46:49 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-22 12:25:28 UTC) #8
commit-bot: I haz the power
4 years, 9 months ago (2016-03-22 12:26:24 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4be79e4d348ae00cd5ad7f78b3e3d9f5bf5d6842
Cr-Commit-Position: refs/heads/master@{#382557}

Powered by Google App Engine
This is Rietveld 408576698