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

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

Issue 184963008: Pass the correct GlyphPage to glyphDataAndPageForNonCJKCharacterWithGlyphOrientation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ...and a newline. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/text/vertical-noncjk-non-existing-glyph-expected.txt ('k') | no next file » | 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) 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 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 } 492 }
493 if (characterFontData) { 493 if (characterFontData) {
494 // Got the fallback glyph and font. 494 // Got the fallback glyph and font.
495 GlyphPage* fallbackPage = GlyphPageTreeNode::getRootChild(characterFontD ata.get(), pageNumber)->page(); 495 GlyphPage* fallbackPage = GlyphPageTreeNode::getRootChild(characterFontD ata.get(), pageNumber)->page();
496 GlyphData data = fallbackPage && fallbackPage->fontDataForCharacter(c) ? fallbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData(); 496 GlyphData data = fallbackPage && fallbackPage->fontDataForCharacter(c) ? fallbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData();
497 // Cache it so we don't have to do system fallback again next time. 497 // Cache it so we don't have to do system fallback again next time.
498 if (variant == NormalVariant) { 498 if (variant == NormalVariant) {
499 page->setGlyphDataForCharacter(c, data.glyph, data.fontData); 499 page->setGlyphDataForCharacter(c, data.glyph, data.fontData);
500 data.fontData->setMaxGlyphPageTreeLevel(max(data.fontData->maxGlyphP ageTreeLevel(), node->level())); 500 data.fontData->setMaxGlyphPageTreeLevel(max(data.fontData->maxGlyphP ageTreeLevel(), node->level()));
501 if (!Character::isCJKIdeographOrSymbol(c) && data.fontData->platform Data().orientation() != Horizontal && !data.fontData->isTextOrientationFallback( )) 501 if (!Character::isCJKIdeographOrSymbol(c) && data.fontData->platform Data().orientation() != Horizontal && !data.fontData->isTextOrientationFallback( ))
502 return glyphDataAndPageForNonCJKCharacterWithGlyphOrientation(c, m_fontDescription.nonCJKGlyphOrientation(), data, fallbackPage, pageNumber); 502 return glyphDataAndPageForNonCJKCharacterWithGlyphOrientation(c, m_fontDescription.nonCJKGlyphOrientation(), data, page, pageNumber);
503 } 503 }
504 return make_pair(data, page); 504 return make_pair(data, page);
505 } 505 }
506 506
507 // Even system fallback can fail; use the missing glyph in that case. 507 // Even system fallback can fail; use the missing glyph in that case.
508 // FIXME: It would be nicer to use the missing glyph from the last resort fo nt instead. 508 // FIXME: It would be nicer to use the missing glyph from the last resort fo nt instead.
509 GlyphData data = primaryFont()->missingGlyphData(); 509 GlyphData data = primaryFont()->missingGlyphData();
510 if (variant == NormalVariant) { 510 if (variant == NormalVariant) {
511 page->setGlyphDataForCharacter(c, data.glyph, data.fontData); 511 page->setGlyphDataForCharacter(c, data.glyph, data.fontData);
512 data.fontData->setMaxGlyphPageTreeLevel(max(data.fontData->maxGlyphPageT reeLevel(), node->level())); 512 data.fontData->setMaxGlyphPageTreeLevel(max(data.fontData->maxGlyphPageT reeLevel(), node->level()));
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 if (delta <= 0) 818 if (delta <= 0)
819 break; 819 break;
820 } 820 }
821 } 821 }
822 } 822 }
823 823
824 return offset; 824 return offset;
825 } 825 }
826 826
827 } 827 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/text/vertical-noncjk-non-existing-glyph-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698