| 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 30 matching lines...) Expand all Loading... |
| 41 { | 41 { |
| 42 RenderBlockFlow::layout(); | 42 RenderBlockFlow::layout(); |
| 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(*this, locationOffset()); | 51 LayoutState state(*this, locationOffset()); |
| 52 | 52 |
| 53 if (m_cue->snapToLines()) | 53 if (m_cue->snapToLines()) |
| 54 repositionCueSnapToLinesSet(); | 54 repositionCueSnapToLinesSet(); |
| 55 else | 55 else |
| 56 repositionCueSnapToLinesNotSet(); | 56 repositionCueSnapToLinesNotSet(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool RenderVTTCue::findFirstLineBox(InlineFlowBox*& firstLineBox) | 59 bool RenderVTTCue::findFirstLineBox(InlineFlowBox*& firstLineBox) |
| 60 { | 60 { |
| 61 if (firstChild()->isRenderInline()) | 61 if (firstChild()->isRenderInline()) |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 void RenderVTTCue::repositionCueSnapToLinesNotSet() | 263 void RenderVTTCue::repositionCueSnapToLinesNotSet() |
| 264 { | 264 { |
| 265 // FIXME: Implement overlapping detection when snap-to-lines is not set. htt
p://wkb.ug/84296 | 265 // FIXME: Implement overlapping detection when snap-to-lines is not set. htt
p://wkb.ug/84296 |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace WebCore | 268 } // namespace WebCore |
| 269 | 269 |
| OLD | NEW |