OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) | 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // If WebVTT Regions are used, the regular WebVTT layout algorithm is no | 44 // If WebVTT Regions are used, the regular WebVTT layout algorithm is no |
45 // longer necessary, since cues having the region parameter set do not have | 45 // longer necessary, since cues having the region parameter set do not have |
46 // any positioning parameters. Also, in this case, the regions themselves | 46 // any positioning parameters. Also, in this case, the regions themselves |
47 // have positioning information. | 47 // have positioning information. |
48 if (!m_cue->regionId().isEmpty()) | 48 if (!m_cue->regionId().isEmpty()) |
49 return; | 49 return; |
50 | 50 |
51 LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransfo
rm() || hasReflection() || style()->isFlippedBlocksWritingMode()); | 51 LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransfo
rm() || hasReflection() || style()->isFlippedBlocksWritingMode()); |
52 | 52 |
53 if (m_cue->cueType() == TextTrackCue::WebVTT) { | 53 if (m_cue->snapToLines()) |
54 if (m_cue->snapToLines()) | 54 repositionCueSnapToLinesSet(); |
55 repositionCueSnapToLinesSet(); | 55 else |
56 else | 56 repositionCueSnapToLinesNotSet(); |
57 repositionCueSnapToLinesNotSet(); | |
58 } | |
59 | 57 |
60 statePusher.pop(); | 58 statePusher.pop(); |
61 } | 59 } |
62 | 60 |
63 bool RenderTextTrackCue::findFirstLineBox(InlineFlowBox*& firstLineBox) | 61 bool RenderTextTrackCue::findFirstLineBox(InlineFlowBox*& firstLineBox) |
64 { | 62 { |
65 if (firstChild()->isRenderInline()) | 63 if (firstChild()->isRenderInline()) |
66 firstLineBox = toRenderInline(firstChild())->firstLineBox(); | 64 firstLineBox = toRenderInline(firstChild())->firstLineBox(); |
67 else | 65 else |
68 return false; | 66 return false; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 } | 259 } |
262 } | 260 } |
263 | 261 |
264 void RenderTextTrackCue::repositionCueSnapToLinesNotSet() | 262 void RenderTextTrackCue::repositionCueSnapToLinesNotSet() |
265 { | 263 { |
266 // FIXME: Implement overlapping detection when snap-to-lines is not set. htt
p://wkb.ug/84296 | 264 // FIXME: Implement overlapping detection when snap-to-lines is not set. htt
p://wkb.ug/84296 |
267 } | 265 } |
268 | 266 |
269 } // namespace WebCore | 267 } // namespace WebCore |
270 | 268 |
OLD | NEW |