| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 Deque<blink::HolesQueueItem>* queue, | 331 Deque<blink::HolesQueueItem>* queue, |
| 332 blink::HolesQueueItem& currentQueueItem, | 332 blink::HolesQueueItem& currentQueueItem, |
| 333 SmallCapsIterator::SmallCapsBehavior& smallCapsBehavior) { | 333 SmallCapsIterator::SmallCapsBehavior& smallCapsBehavior) { |
| 334 unsigned numCharactersUntilCaseChange = 0; | 334 unsigned numCharactersUntilCaseChange = 0; |
| 335 SmallCapsIterator smallCapsIterator( | 335 SmallCapsIterator smallCapsIterator( |
| 336 normalizedBuffer + currentQueueItem.m_startIndex, | 336 normalizedBuffer + currentQueueItem.m_startIndex, |
| 337 currentQueueItem.m_numCharacters); | 337 currentQueueItem.m_numCharacters); |
| 338 smallCapsIterator.consume(&numCharactersUntilCaseChange, &smallCapsBehavior); | 338 smallCapsIterator.consume(&numCharactersUntilCaseChange, &smallCapsBehavior); |
| 339 if (numCharactersUntilCaseChange > 0 && | 339 if (numCharactersUntilCaseChange > 0 && |
| 340 numCharactersUntilCaseChange < currentQueueItem.m_numCharacters) { | 340 numCharactersUntilCaseChange < currentQueueItem.m_numCharacters) { |
| 341 queue->prepend(blink::HolesQueueItem( | 341 queue->push_front(blink::HolesQueueItem( |
| 342 blink::HolesQueueItemAction::HolesQueueRange, | 342 blink::HolesQueueItemAction::HolesQueueRange, |
| 343 currentQueueItem.m_startIndex + numCharactersUntilCaseChange, | 343 currentQueueItem.m_startIndex + numCharactersUntilCaseChange, |
| 344 currentQueueItem.m_numCharacters - numCharactersUntilCaseChange)); | 344 currentQueueItem.m_numCharacters - numCharactersUntilCaseChange)); |
| 345 currentQueueItem.m_numCharacters = numCharactersUntilCaseChange; | 345 currentQueueItem.m_numCharacters = numCharactersUntilCaseChange; |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 hb_feature_t createFeature(hb_tag_t tag, uint32_t value = 0) { | 349 hb_feature_t createFeature(hb_tag_t tag, uint32_t value = 0) { |
| 350 return {tag, value, 0 /* start */, static_cast<unsigned>(-1) /* end */}; | 350 return {tag, value, 0 /* start */, static_cast<unsigned>(-1) /* end */}; |
| 351 } | 351 } |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 shapeSegment(&rangeData, segmentRange, result.get()); | 702 shapeSegment(&rangeData, segmentRange, result.get()); |
| 703 } | 703 } |
| 704 return result.release(); | 704 return result.release(); |
| 705 } | 705 } |
| 706 | 706 |
| 707 PassRefPtr<ShapeResult> HarfBuzzShaper::shape(const Font* font, | 707 PassRefPtr<ShapeResult> HarfBuzzShaper::shape(const Font* font, |
| 708 TextDirection direction) const { | 708 TextDirection direction) const { |
| 709 return shape(font, direction, 0, m_textLength); | 709 return shape(font, direction, 0, m_textLength); |
| 710 } | 710 } |
| 711 } // namespace blink | 711 } // namespace blink |
| OLD | NEW |