| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. | 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // When we're getting here with the last resort font, we have no other | 259 // When we're getting here with the last resort font, we have no other |
| 260 // choice than adding boxes to the ShapeResult. | 260 // choice than adding boxes to the ShapeResult. |
| 261 if ((currentClusterResult == NotDef && numCharacters) || isLastResort) { | 261 if ((currentClusterResult == NotDef && numCharacters) || isLastResort) { |
| 262 hb_direction_t direction = TextDirectionToHBDirection( | 262 hb_direction_t direction = TextDirectionToHBDirection( |
| 263 m_textDirection, font->getFontDescription().orientation(), | 263 m_textDirection, font->getFontDescription().orientation(), |
| 264 currentFont); | 264 currentFont); |
| 265 // Here we need to specify glyph positions. | 265 // Here we need to specify glyph positions. |
| 266 ShapeResult::RunInfo* run = new ShapeResult::RunInfo( | 266 ShapeResult::RunInfo* run = new ShapeResult::RunInfo( |
| 267 currentFont, direction, ICUScriptToHBScript(currentRunScript), | 267 currentFont, direction, ICUScriptToHBScript(currentRunScript), |
| 268 startIndex, numGlyphsToInsert, numCharacters); | 268 startIndex, numGlyphsToInsert, numCharacters); |
| 269 shapeResult->insertRun(wrapUnique(run), lastChangePosition, | 269 shapeResult->insertRun(WTF::wrapUnique(run), lastChangePosition, |
| 270 numGlyphsToInsert, harfBuzzBuffer); | 270 numGlyphsToInsert, harfBuzzBuffer); |
| 271 } | 271 } |
| 272 lastChangePosition = glyphIndex; | 272 lastChangePosition = glyphIndex; |
| 273 } | 273 } |
| 274 return true; | 274 return true; |
| 275 } | 275 } |
| 276 | 276 |
| 277 static inline const SimpleFontData* fontDataAdjustedForOrientation( | 277 static inline const SimpleFontData* fontDataAdjustedForOrientation( |
| 278 const SimpleFontData* originalFont, | 278 const SimpleFontData* originalFont, |
| 279 FontOrientation runOrientation, | 279 FontOrientation runOrientation, |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 segmentRange.script, !fallbackIterator->hasNext())) | 668 segmentRange.script, !fallbackIterator->hasNext())) |
| 669 DLOG(ERROR) << "Shape result extraction failed."; | 669 DLOG(ERROR) << "Shape result extraction failed."; |
| 670 | 670 |
| 671 hb_buffer_reset(harfBuzzBuffer.get()); | 671 hb_buffer_reset(harfBuzzBuffer.get()); |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 return result.release(); | 674 return result.release(); |
| 675 } | 675 } |
| 676 | 676 |
| 677 } // namespace blink | 677 } // namespace blink |
| OLD | NEW |