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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // position as the text track container. (LayoutMedia::layout ensures this.) | 348 // position as the text track container. (LayoutMedia::layout ensures this.) |
349 return contentBoxRelativeToAncestor(toLayoutBox(*controlsLayout), | 349 return contentBoxRelativeToAncestor(toLayoutBox(*controlsLayout), |
350 toLayoutBox(*controlsContainer)); | 350 toLayoutBox(*controlsContainer)); |
351 } | 351 } |
352 | 352 |
353 void LayoutVTTCue::layout() { | 353 void LayoutVTTCue::layout() { |
354 LayoutBlockFlow::layout(); | 354 LayoutBlockFlow::layout(); |
355 | 355 |
356 DCHECK(firstChild()); | 356 DCHECK(firstChild()); |
357 | 357 |
358 LayoutState state(*this, locationOffset()); | 358 LayoutState state(*this); |
359 | 359 |
360 // http://dev.w3.org/html5/webvtt/#dfn-apply-webvtt-cue-settings - step 13. | 360 // http://dev.w3.org/html5/webvtt/#dfn-apply-webvtt-cue-settings - step 13. |
361 if (!std::isnan(m_snapToLinesPosition)) | 361 if (!std::isnan(m_snapToLinesPosition)) |
362 SnapToLinesLayouter(*this, computeControlsRect()).layout(); | 362 SnapToLinesLayouter(*this, computeControlsRect()).layout(); |
363 else | 363 else |
364 repositionCueSnapToLinesNotSet(); | 364 repositionCueSnapToLinesNotSet(); |
365 } | 365 } |
366 | 366 |
367 } // namespace blink | 367 } // namespace blink |
OLD | NEW |