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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1473773002: Clarify naming for fast-path in setLogicalWidthForTextRun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutText.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 2769ce4aa7677d610b11012db7e306298b7010f8..3d7b00a155cc56f05ddcf3cbe3f00a7405d4368f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -447,12 +447,12 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru
#if OS(MACOSX)
// FIXME: Having any font feature settings enabled can lead to selection gaps on
// Chromium-mac. https://bugs.webkit.org/show_bug.cgi?id=113418
- bool canUseSimpleFontCodePath = layoutText->canUseSimpleFontCodePath() && !font.fontDescription().featureSettings();
+ bool canUseCachedWordMeasurements = layoutText->canUseSimpleFontCodePath() && !font.fontDescription().featureSettings();
drott 2015/11/25 12:46:24 I am trying to understand what this line actually
#else
- bool canUseSimpleFontCodePath = layoutText->canUseSimpleFontCodePath();
+ bool canUseCachedWordMeasurements = layoutText->canUseSimpleFontCodePath();
#endif
- if (canUseSimpleFontCodePath) {
+ if (canUseCachedWordMeasurements) {
int lastEndOffset = run->m_start;
for (size_t i = 0, size = wordMeasurements.size(); i < size && lastEndOffset < run->m_stop; ++i) {
const WordMeasurement& wordMeasurement = wordMeasurements[i];
@@ -481,13 +481,13 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru
}
if (lastEndOffset != run->m_stop) {
// If we don't have enough cached data, we'll measure the run again.
- canUseSimpleFontCodePath = false;
+ canUseCachedWordMeasurements = false;
fallbackFonts.clear();
}
}
- // Don't put this into 'else' part of the above 'if' because canUseSimpleFontCodePath may be modified in the 'if' block.
- if (!canUseSimpleFontCodePath)
+ // Don't put this into 'else' part of the above 'if' because canUseCachedWordMeasurements may be modified in the 'if' block.
+ if (!canUseCachedWordMeasurements)
measuredWidth = layoutText->width(run->m_start, run->m_stop - run->m_start, xPos, run->direction(), lineInfo.isFirstLine(), &fallbackFonts, &glyphBounds);
// Negative word-spacing and/or letter-spacing may cause some glyphs to overflow the left boundary and result
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698