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

Side by Side Diff: Source/platform/fonts/Font.h

Issue 648633003: Unify selection rect snapping logic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 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, 2007, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Holger Hans Peter Freyther 6 * Copyright (C) 2008 Holger Hans Peter Freyther
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 friend struct SimpleShaper; 159 friend struct SimpleShaper;
160 friend class SVGTextRunRenderingContext; 160 friend class SVGTextRunRenderingContext;
161 161
162 public: 162 public:
163 FontSelector* fontSelector() const; 163 FontSelector* fontSelector() const;
164 164
165 FontFallbackList* fontList() const { return m_fontFallbackList.get(); } 165 FontFallbackList* fontList() const { return m_fontFallbackList.get(); }
166 166
167 void willUseFontData(UChar32) const; 167 void willUseFontData(UChar32) const;
168 168
169 static FloatRect pixelSnappedSelectionRect(float fromX, float toX, float y, float height);
170 private: 169 private:
171 bool loadingCustomFonts() const 170 bool loadingCustomFonts() const
172 { 171 {
173 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 172 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
174 } 173 }
175 174
176 bool shouldSkipDrawing() const 175 bool shouldSkipDrawing() const
177 { 176 {
178 return m_fontFallbackList && m_fontFallbackList->shouldSkipDrawing(); 177 return m_fontFallbackList && m_fontFallbackList->shouldSkipDrawing();
179 } 178 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 { 212 {
214 if (!tabSize) 213 if (!tabSize)
215 return fontDescription().letterSpacing(); 214 return fontDescription().letterSpacing();
216 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing(); 215 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing();
217 return tabWidth - fmodf(position, tabWidth); 216 return tabWidth - fmodf(position, tabWidth);
218 } 217 }
219 218
220 } // namespace blink 219 } // namespace blink
221 220
222 #endif 221 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698