| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 break; | 520 break; |
| 521 } | 521 } |
| 522 | 522 |
| 523 FontFeatureSettings* settings = description.featureSettings(); | 523 FontFeatureSettings* settings = description.featureSettings(); |
| 524 if (!settings) | 524 if (!settings) |
| 525 return; | 525 return; |
| 526 | 526 |
| 527 unsigned numFeatures = settings->size(); | 527 unsigned numFeatures = settings->size(); |
| 528 for (unsigned i = 0; i < numFeatures; ++i) { | 528 for (unsigned i = 0; i < numFeatures; ++i) { |
| 529 hb_feature_t feature; | 529 hb_feature_t feature; |
| 530 String tag = settings->at(i).tag(); | 530 const AtomicString& tag = settings->at(i).tag(); |
| 531 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); | 531 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); |
| 532 feature.value = settings->at(i).value(); | 532 feature.value = settings->at(i).value(); |
| 533 feature.start = 0; | 533 feature.start = 0; |
| 534 feature.end = static_cast<unsigned>(-1); | 534 feature.end = static_cast<unsigned>(-1); |
| 535 m_features.append(feature); | 535 m_features.append(feature); |
| 536 } | 536 } |
| 537 } | 537 } |
| 538 | 538 |
| 539 bool HarfBuzzShaper::shape(GlyphBuffer* glyphBuffer) | 539 bool HarfBuzzShaper::shape(GlyphBuffer* glyphBuffer) |
| 540 { | 540 { |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 if (!foundToX) | 886 if (!foundToX) |
| 887 toX = m_run.rtl() ? 0 : m_totalWidth; | 887 toX = m_run.rtl() ? 0 : m_totalWidth; |
| 888 | 888 |
| 889 // Using floorf() and roundf() as the same as mac port. | 889 // Using floorf() and roundf() as the same as mac port. |
| 890 if (fromX < toX) | 890 if (fromX < toX) |
| 891 return FloatRect(floorf(point.x() + fromX), point.y(), roundf(toX - from
X), height); | 891 return FloatRect(floorf(point.x() + fromX), point.y(), roundf(toX - from
X), height); |
| 892 return FloatRect(floorf(point.x() + toX), point.y(), roundf(fromX - toX), he
ight); | 892 return FloatRect(floorf(point.x() + toX), point.y(), roundf(fromX - toX), he
ight); |
| 893 } | 893 } |
| 894 | 894 |
| 895 } // namespace WebCore | 895 } // namespace WebCore |
| OLD | NEW |