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

Side by Side Diff: Source/WebCore/platform/graphics/win/UniscribeController.cpp

Issue 7104146: Merge 88277 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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 | 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) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 { 94 {
95 // FIXME: We really want to be using a newer version of Uniscribe that suppo rts the new OpenType 95 // FIXME: We really want to be using a newer version of Uniscribe that suppo rts the new OpenType
96 // functions. Those functions would allow us to turn off kerning and ligatu res. Without being able 96 // functions. Those functions would allow us to turn off kerning and ligatu res. Without being able
97 // to do that, we will have buggy line breaking and metrics when simple and complex text are close 97 // to do that, we will have buggy line breaking and metrics when simple and complex text are close
98 // together (the complex code path will narrow the text because of kerning a nd ligatures and then 98 // together (the complex code path will narrow the text because of kerning a nd ligatures and then
99 // when bidi processing splits into multiple runs, the simple portions will get wider and cause us to 99 // when bidi processing splits into multiple runs, the simple portions will get wider and cause us to
100 // spill off the edge of a line). 100 // spill off the edge of a line).
101 if (static_cast<int>(offset) > m_end) 101 if (static_cast<int>(offset) > m_end)
102 offset = m_end; 102 offset = m_end;
103 103
104 // Itemize the string.
105 const UChar* cp = m_run.data(m_currentCharacter);
106 int length = offset - m_currentCharacter; 104 int length = offset - m_currentCharacter;
107 if (length <= 0) 105 if (length <= 0)
108 return; 106 return;
109 107
108 // Itemize the string.
109 const UChar* cp = m_run.data(m_currentCharacter);
110 unsigned baseCharacter = m_currentCharacter; 110 unsigned baseCharacter = m_currentCharacter;
111 111
112 // We break up itemization of the string by fontData and (if needed) the use of small caps. 112 // We break up itemization of the string by fontData and (if needed) the use of small caps.
113 113
114 // FIXME: It's inconsistent that we use logical order when itemizing, since this 114 // FIXME: It's inconsistent that we use logical order when itemizing, since this
115 // does not match normal RTL. 115 // does not match normal RTL.
116 116
117 // FIXME: This function should decode surrogate pairs. Currently it makes li ttle difference that 117 // FIXME: This function should decode surrogate pairs. Currently it makes li ttle difference that
118 // it does not because the font cache on Windows does not support non-BMP ch aracters. 118 // it does not because the font cache on Windows does not support non-BMP ch aracters.
119 Vector<UChar, 256> smallCapsBuffer; 119 Vector<UChar, 256> smallCapsBuffer;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (FAILED(shapeResult)) 409 if (FAILED(shapeResult))
410 return false; 410 return false;
411 411
412 glyphs.shrink(glyphCount); 412 glyphs.shrink(glyphCount);
413 visualAttributes.shrink(glyphCount); 413 visualAttributes.shrink(glyphCount);
414 414
415 return true; 415 return true;
416 } 416 }
417 417
418 } 418 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698