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

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 433923003: Revert BidiResolver::createBidiRunsForLine changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/svg/SVGTextMetricsBuilder.cpp ('k') | Source/platform/text/BidiResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 8aed1412403504887e2bfc5ad5e1b4af336df393..afa1c9c24ddf8e311674bb67babfd614034818e9 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -962,8 +962,10 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run
bidiResolver.setStatus(BidiStatus(run.direction(), run.directionalOverride()));
bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&run, 0));
- BidiRunList<BidiCharacterRun> bidiRuns;
- bidiResolver.createBidiRunsForLine(TextRunIterator(&run, run.length()), bidiRuns);
+ // FIXME: This ownership should be reversed. We should pass BidiRunList
+ // to BidiResolver in createBidiRunsForLine.
+ BidiRunList<BidiCharacterRun>& bidiRuns = bidiResolver.runs();
+ bidiResolver.createBidiRunsForLine(TextRunIterator(&run, run.length()));
if (!bidiRuns.runCount())
return;
@@ -984,6 +986,8 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run
if (bidiRun)
currPoint.move(font.width(subrun), 0);
}
+
+ bidiRuns.deleteRuns();
}
void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run, const FloatPoint& point, int h, const Color& backgroundColor, int from, int to)
« no previous file with comments | « Source/core/rendering/svg/SVGTextMetricsBuilder.cpp ('k') | Source/platform/text/BidiResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698