| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 displayParameters.position.setY(computedLinePosition); | 749 displayParameters.position.setY(computedLinePosition); |
| 750 else | 750 else |
| 751 displayParameters.position.setX(computedLinePosition); | 751 displayParameters.position.setX(computedLinePosition); |
| 752 } else { | 752 } else { |
| 753 if (m_writingDirection == Horizontal) | 753 if (m_writingDirection == Horizontal) |
| 754 displayParameters.position.setY(0); | 754 displayParameters.position.setY(0); |
| 755 else | 755 else |
| 756 displayParameters.position.setX(0); | 756 displayParameters.position.setX(0); |
| 757 } | 757 } |
| 758 | 758 |
| 759 // FIXME: Remove this block. | |
| 760 if (!m_snapToLines) { | |
| 761 if (m_writingDirection == Horizontal && displayParameters.direction == C
SSValueLtr) | |
| 762 displayParameters.position.setX(computedTextPosition); | |
| 763 | |
| 764 if (m_writingDirection == Horizontal && displayParameters.direction == C
SSValueRtl) | |
| 765 displayParameters.position.setX(100 - computedTextPosition); | |
| 766 | |
| 767 if (m_writingDirection == VerticalGrowingLeft) | |
| 768 displayParameters.position = FloatPoint(100 - computedLinePosition,
computedTextPosition); | |
| 769 | |
| 770 if (m_writingDirection == VerticalGrowingRight) | |
| 771 displayParameters.position.setY(computedTextPosition); | |
| 772 } | |
| 773 | |
| 774 // Step 9 not implemented (margin == 0). | 759 // Step 9 not implemented (margin == 0). |
| 775 | 760 |
| 776 ASSERT(std::isfinite(displayParameters.size)); | 761 ASSERT(std::isfinite(displayParameters.size)); |
| 777 ASSERT(displayParameters.direction != CSSValueNone); | 762 ASSERT(displayParameters.direction != CSSValueNone); |
| 778 ASSERT(displayParameters.writingMode != CSSValueNone); | 763 ASSERT(displayParameters.writingMode != CSSValueNone); |
| 779 return displayParameters; | 764 return displayParameters; |
| 780 } | 765 } |
| 781 | 766 |
| 782 void VTTCue::markFutureAndPastNodes(ContainerNode* root, double previousTimestam
p, double movieTime) | 767 void VTTCue::markFutureAndPastNodes(ContainerNode* root, double previousTimestam
p, double movieTime) |
| 783 { | 768 { |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 | 1134 |
| 1150 void VTTCue::trace(Visitor* visitor) | 1135 void VTTCue::trace(Visitor* visitor) |
| 1151 { | 1136 { |
| 1152 visitor->trace(m_vttNodeTree); | 1137 visitor->trace(m_vttNodeTree); |
| 1153 visitor->trace(m_cueBackgroundBox); | 1138 visitor->trace(m_cueBackgroundBox); |
| 1154 visitor->trace(m_displayTree); | 1139 visitor->trace(m_displayTree); |
| 1155 TextTrackCue::trace(visitor); | 1140 TextTrackCue::trace(visitor); |
| 1156 } | 1141 } |
| 1157 | 1142 |
| 1158 } // namespace blink | 1143 } // namespace blink |
| OLD | NEW |