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

Side by Side Diff: Source/platform/fonts/mac/ComplexTextController.cpp

Issue 116423007: Moving Text Simple/Complex Path prefix from Font.cpp to new File (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing merge issues Created 6 years, 11 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 | « Source/platform/fonts/FontTest.cpp ('k') | Source/platform/text/TextPath.h » ('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) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 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 23 matching lines...) Expand all
34 #include "wtf/unicode/CharacterNames.h" 34 #include "wtf/unicode/CharacterNames.h"
35 35
36 using namespace std; 36 using namespace std;
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class TextLayout { 40 class TextLayout {
41 public: 41 public:
42 static bool isNeeded(const TextRun& run, const Font& font) 42 static bool isNeeded(const TextRun& run, const Font& font)
43 { 43 {
44 return font.codePath(run) == Font::Complex; 44 return font.codePath(run) == ComplexPath;
45 } 45 }
46 46
47 TextLayout(const TextRun& run, unsigned textLength, const Font& font, float xPos) 47 TextLayout(const TextRun& run, unsigned textLength, const Font& font, float xPos)
48 : m_font(font) 48 : m_font(font)
49 , m_run(constructTextRun(run, textLength, font, xPos)) 49 , m_run(constructTextRun(run, textLength, font, xPos))
50 , m_controller(adoptPtr(new ComplexTextController(&m_font, m_run, true)) ) 50 , m_controller(adoptPtr(new ComplexTextController(&m_font, m_run, true)) )
51 { 51 {
52 } 52 }
53 53
54 float width(unsigned from, unsigned len, HashSet<const SimpleFontData*>* fal lbackFonts) 54 float width(unsigned from, unsigned len, HashSet<const SimpleFontData*>* fal lbackFonts)
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 718
719 lastCharacterIndex = characterIndex; 719 lastCharacterIndex = characterIndex;
720 } 720 }
721 if (!isMonotonic) 721 if (!isMonotonic)
722 complexTextRun.setIsNonMonotonic(); 722 complexTextRun.setIsNonMonotonic();
723 } 723 }
724 m_totalWidth += widthSinceLastCommit; 724 m_totalWidth += widthSinceLastCommit;
725 } 725 }
726 726
727 } // namespace WebCore 727 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontTest.cpp ('k') | Source/platform/text/TextPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698