OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. 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 30 matching lines...) Expand all Loading... |
41 return toHTMLMediaElement(node()); | 41 return toHTMLMediaElement(node()); |
42 } | 42 } |
43 | 43 |
44 void LayoutMedia::layout() { | 44 void LayoutMedia::layout() { |
45 LayoutSize oldSize = contentBoxRect().size(); | 45 LayoutSize oldSize = contentBoxRect().size(); |
46 | 46 |
47 LayoutImage::layout(); | 47 LayoutImage::layout(); |
48 | 48 |
49 LayoutRect newRect = contentBoxRect(); | 49 LayoutRect newRect = contentBoxRect(); |
50 | 50 |
51 LayoutState state(*this, locationOffset()); | 51 LayoutState state(*this); |
52 | 52 |
53 // Iterate the children in reverse order so that the media controls are laid | 53 // Iterate the children in reverse order so that the media controls are laid |
54 // out before the text track container. This is to ensure that the text | 54 // out before the text track container. This is to ensure that the text |
55 // track rendering has an up-to-date position of the media controls for | 55 // track rendering has an up-to-date position of the media controls for |
56 // overlap checking, see LayoutVTTCue. | 56 // overlap checking, see LayoutVTTCue. |
57 #if ENABLE(ASSERT) | 57 #if ENABLE(ASSERT) |
58 bool seenTextTrackContainer = false; | 58 bool seenTextTrackContainer = false; |
59 #endif | 59 #endif |
60 for (LayoutObject* child = m_children.lastChild(); child; | 60 for (LayoutObject* child = m_children.lastChild(); child; |
61 child = child->previousSibling()) { | 61 child = child->previousSibling()) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 void LayoutMedia::setRequestPositionUpdates(bool want) { | 135 void LayoutMedia::setRequestPositionUpdates(bool want) { |
136 if (want) | 136 if (want) |
137 view()->registerMediaForPositionChangeNotification(*this); | 137 view()->registerMediaForPositionChangeNotification(*this); |
138 else | 138 else |
139 view()->unregisterMediaForPositionChangeNotification(*this); | 139 view()->unregisterMediaForPositionChangeNotification(*this); |
140 } | 140 } |
141 | 141 |
142 } // namespace blink | 142 } // namespace blink |
OLD | NEW |