| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 numWordEnds++; | 438 numWordEnds++; |
| 439 } | 439 } |
| 440 | 440 |
| 441 if (numWordEnds) | 441 if (numWordEnds) |
| 442 m_padPerWordBreak = m_padding / numWordEnds; | 442 m_padPerWordBreak = m_padding / numWordEnds; |
| 443 else | 443 else |
| 444 m_padPerWordBreak = 0; | 444 m_padPerWordBreak = 0; |
| 445 } | 445 } |
| 446 | 446 |
| 447 | 447 |
| 448 void HarfBuzzShaper::setDrawRange(unsigned from, unsigned to) | 448 void HarfBuzzShaper::setDrawRange(int from, int to) |
| 449 { | 449 { |
| 450 ASSERT_WITH_SECURITY_IMPLICATION(from >= 0); |
| 450 ASSERT_WITH_SECURITY_IMPLICATION(to <= m_run.length()); | 451 ASSERT_WITH_SECURITY_IMPLICATION(to <= m_run.length()); |
| 451 m_fromIndex = from; | 452 m_fromIndex = from; |
| 452 m_toIndex = to; | 453 m_toIndex = to; |
| 453 } | 454 } |
| 454 | 455 |
| 455 void HarfBuzzShaper::setFontFeatures() | 456 void HarfBuzzShaper::setFontFeatures() |
| 456 { | 457 { |
| 457 const FontDescription& description = m_font->fontDescription(); | 458 const FontDescription& description = m_font->fontDescription(); |
| 458 if (description.orientation() == Vertical) { | 459 if (description.orientation() == Vertical) { |
| 459 static hb_feature_t vert = { HarfBuzzFace::vertTag, 1, 0, static_cast<un
signed>(-1) }; | 460 static hb_feature_t vert = { HarfBuzzFace::vertTag, 1, 0, static_cast<un
signed>(-1) }; |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 point.x() + fromX, point.x() + toX, | 1156 point.x() + fromX, point.x() + toX, |
| 1156 point.y(), height); | 1157 point.y(), height); |
| 1157 } | 1158 } |
| 1158 | 1159 |
| 1159 return Font::pixelSnappedSelectionRect( | 1160 return Font::pixelSnappedSelectionRect( |
| 1160 point.x() + toX, point.x() + fromX, | 1161 point.x() + toX, point.x() + fromX, |
| 1161 point.y(), height); | 1162 point.y(), height); |
| 1162 } | 1163 } |
| 1163 | 1164 |
| 1164 } // namespace blink | 1165 } // namespace blink |
| OLD | NEW |