| 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/rendering/RenderInline.h" | 31 #include "core/rendering/RenderInline.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 RenderVTTCue::RenderVTTCue(VTTCueBox* element) | 35 RenderVTTCue::RenderVTTCue(VTTCueBox* element) |
| 36 : RenderBlockFlow(element) | 36 : RenderBlockFlow(element) |
| 37 , m_cue(element->getCue()) | 37 , m_cue(element->getCue()) |
| 38 { | 38 { |
| 39 } | 39 } |
| 40 | 40 |
| 41 void RenderVTTCue::trace(Visitor* visitor) | |
| 42 { | |
| 43 visitor->trace(m_cue); | |
| 44 RenderBlockFlow::trace(visitor); | |
| 45 } | |
| 46 | |
| 47 class SnapToLinesLayouter { | 41 class SnapToLinesLayouter { |
| 48 STACK_ALLOCATED(); | 42 STACK_ALLOCATED(); |
| 49 public: | 43 public: |
| 50 SnapToLinesLayouter(RenderVTTCue& cueBox, float linePosition) | 44 SnapToLinesLayouter(RenderVTTCue& cueBox, float linePosition) |
| 51 : m_cueBox(cueBox) | 45 : m_cueBox(cueBox) |
| 52 , m_linePosition(linePosition) | 46 , m_linePosition(linePosition) |
| 53 { | 47 { |
| 54 } | 48 } |
| 55 | 49 |
| 56 void layout(); | 50 void layout(); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 SnapToLinesLayouter(*this, m_cue->calculateComputedLinePosition()).layou
t(); | 322 SnapToLinesLayouter(*this, m_cue->calculateComputedLinePosition()).layou
t(); |
| 329 | 323 |
| 330 adjustForTopAndBottomMarginBorderAndPadding(); | 324 adjustForTopAndBottomMarginBorderAndPadding(); |
| 331 } else { | 325 } else { |
| 332 repositionCueSnapToLinesNotSet(); | 326 repositionCueSnapToLinesNotSet(); |
| 333 } | 327 } |
| 334 } | 328 } |
| 335 | 329 |
| 336 } // namespace blink | 330 } // namespace blink |
| 337 | 331 |
| OLD | NEW |