| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple 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 20 matching lines...) Expand all Loading... |
| 31 #include "platform/fonts/SimpleFontData.h" | 31 #include "platform/fonts/SimpleFontData.h" |
| 32 #include "platform/fonts/harfbuzz/HarfBuzzShaper.h" | 32 #include "platform/fonts/harfbuzz/HarfBuzzShaper.h" |
| 33 #include "platform/fonts/mac/ComplexTextController.h" | 33 #include "platform/fonts/mac/ComplexTextController.h" |
| 34 #include "platform/geometry/IntRect.h" | 34 #include "platform/geometry/IntRect.h" |
| 35 #include "platform/graphics/GraphicsContext.h" | 35 #include "platform/graphics/GraphicsContext.h" |
| 36 #include "platform/text/TextRun.h" | 36 #include "platform/text/TextRun.h" |
| 37 #include "wtf/MathExtras.h" | 37 #include "wtf/MathExtras.h" |
| 38 | 38 |
| 39 using namespace std; | 39 using namespace std; |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace blink { |
| 42 | 42 |
| 43 static bool preferHarfBuzz(const Font* font) | 43 static bool preferHarfBuzz(const Font* font) |
| 44 { | 44 { |
| 45 const FontDescription& description = font->fontDescription(); | 45 const FontDescription& description = font->fontDescription(); |
| 46 return description.featureSettings() && description.featureSettings()->size(
) > 0; | 46 return description.featureSettings() && description.featureSettings()->size(
) > 0; |
| 47 } | 47 } |
| 48 | 48 |
| 49 FloatRect Font::selectionRectForComplexText(const TextRun& run, const FloatPoint
& point, int h, | 49 FloatRect Font::selectionRectForComplexText(const TextRun& run, const FloatPoint
& point, int h, |
| 50 int from, int to) const | 50 int from, int to) const |
| 51 { | 51 { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 if (simpleFontData->canRenderCombiningCharacterSequence(characters, leng
th)) | 202 if (simpleFontData->canRenderCombiningCharacterSequence(characters, leng
th)) |
| 203 return simpleFontData; | 203 return simpleFontData; |
| 204 } | 204 } |
| 205 | 205 |
| 206 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh
aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt
h)) | 206 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh
aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt
h)) |
| 207 return baseCharacterGlyphData.fontData; | 207 return baseCharacterGlyphData.fontData; |
| 208 | 208 |
| 209 return SimpleFontData::systemFallback(); | 209 return SimpleFontData::systemFallback(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace WebCore | 212 } // namespace blink |
| OLD | NEW |