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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h

Issue 1966703002: Support includePartialGlyphs=false in Font::offsetForPositionForComplexText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment as per eae review Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class PLATFORM_EXPORT CachingWordShaper final { 45 class PLATFORM_EXPORT CachingWordShaper final {
46 STACK_ALLOCATED(); 46 STACK_ALLOCATED();
47 WTF_MAKE_NONCOPYABLE(CachingWordShaper); 47 WTF_MAKE_NONCOPYABLE(CachingWordShaper);
48 public: 48 public:
49 CachingWordShaper(ShapeCache* cache) : m_shapeCache(cache) { } 49 CachingWordShaper(ShapeCache* cache) : m_shapeCache(cache) { }
50 ~CachingWordShaper() { } 50 ~CachingWordShaper() { }
51 51
52 float width(const Font*, const TextRun&, 52 float width(const Font*, const TextRun&,
53 HashSet<const SimpleFontData*>* fallbackFonts, 53 HashSet<const SimpleFontData*>* fallbackFonts,
54 FloatRect* glyphBounds); 54 FloatRect* glyphBounds);
55 int offsetForPosition(const Font*, const TextRun&, float targetX); 55 int offsetForPosition(const Font*, const TextRun&, float targetX, bool inclu dePartialGlyphs);
56 float fillGlyphBuffer(const Font*, const TextRun&, 56 float fillGlyphBuffer(const Font*, const TextRun&,
57 HashSet<const SimpleFontData*>*, GlyphBuffer*, 57 HashSet<const SimpleFontData*>*, GlyphBuffer*,
58 unsigned from, unsigned to); 58 unsigned from, unsigned to);
59 float fillGlyphBufferForTextEmphasis(const Font*, const TextRun&, 59 float fillGlyphBufferForTextEmphasis(const Font*, const TextRun&,
60 const GlyphData* emphasisData, GlyphBuffer*, 60 const GlyphData* emphasisData, GlyphBuffer*,
61 unsigned from, unsigned to); 61 unsigned from, unsigned to);
62 CharacterRange getCharacterRange(const Font*, const TextRun&, 62 CharacterRange getCharacterRange(const Font*, const TextRun&,
63 unsigned from, unsigned to); 63 unsigned from, unsigned to);
64 Vector<CharacterRange> individualCharacterRanges(const Font*, 64 Vector<CharacterRange> individualCharacterRanges(const Font*,
65 const TextRun&); 65 const TextRun&);
66 66
67 private: 67 private:
68 ShapeCache* m_shapeCache; 68 ShapeCache* m_shapeCache;
69 }; 69 };
70 70
71 } // namespace blink 71 } // namespace blink
72 72
73 #endif // CachingWordShaper_h 73 #endif // CachingWordShaper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698