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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/Font.cpp

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Rebase after reopen Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bidiResolver.createBidiRunsForLine(TextRunIterator(&run, run.length())); 173 bidiResolver.createBidiRunsForLine(TextRunIterator(&run, run.length()));
174 if (!bidiRuns.runCount()) 174 if (!bidiRuns.runCount())
175 return true; 175 return true;
176 176
177 FloatPoint currPoint = point; 177 FloatPoint currPoint = point;
178 BidiCharacterRun* bidiRun = bidiRuns.firstRun(); 178 BidiCharacterRun* bidiRun = bidiRuns.firstRun();
179 while (bidiRun) { 179 while (bidiRun) {
180 TextRun subrun = 180 TextRun subrun =
181 run.subRun(bidiRun->start(), bidiRun->stop() - bidiRun->start()); 181 run.subRun(bidiRun->start(), bidiRun->stop() - bidiRun->start());
182 bool isRTL = bidiRun->level() % 2; 182 bool isRTL = bidiRun->level() % 2;
183 subrun.setDirection(isRTL ? RTL : LTR); 183 subrun.setDirection(isRTL ? TextDirection::Rtl : TextDirection::Ltr);
184 subrun.setDirectionalOverride(bidiRun->dirOverride(false)); 184 subrun.setDirectionalOverride(bidiRun->dirOverride(false));
185 185
186 TextRunPaintInfo subrunInfo(subrun); 186 TextRunPaintInfo subrunInfo(subrun);
187 subrunInfo.bounds = runInfo.bounds; 187 subrunInfo.bounds = runInfo.bounds;
188 188
189 // TODO: investigate blob consolidation/caching (technically, 189 // TODO: investigate blob consolidation/caching (technically,
190 // all subruns could be part of the same blob). 190 // all subruns could be part of the same blob).
191 GlyphBuffer glyphBuffer; 191 GlyphBuffer glyphBuffer;
192 float runWidth = buildGlyphBuffer(subrunInfo, glyphBuffer); 192 float runWidth = buildGlyphBuffer(subrunInfo, glyphBuffer);
193 drawGlyphBuffer(canvas, paint, subrunInfo, glyphBuffer, currPoint, 193 drawGlyphBuffer(canvas, paint, subrunInfo, glyphBuffer, currPoint,
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 bool Font::loadingCustomFonts() const { 621 bool Font::loadingCustomFonts() const {
622 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 622 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
623 } 623 }
624 624
625 bool Font::isFallbackValid() const { 625 bool Font::isFallbackValid() const {
626 return !m_fontFallbackList || m_fontFallbackList->isValid(); 626 return !m_fontFallbackList || m_fontFallbackList->isValid();
627 } 627 }
628 628
629 } // namespace blink 629 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698