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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 return; | 60 return; |
61 | 61 |
62 bool controlsNeedLayout = controlsRenderer->needsLayout(); | 62 bool controlsNeedLayout = controlsRenderer->needsLayout(); |
63 LayoutSize newSize = contentBoxRect().size(); | 63 LayoutSize newSize = contentBoxRect().size(); |
64 if (newSize == oldSize && !controlsNeedLayout) | 64 if (newSize == oldSize && !controlsNeedLayout) |
65 return; | 65 return; |
66 | 66 |
67 // When calling layout() on a child node, a parent must either push a Layout
StateMaintainter, or | 67 // When calling layout() on a child node, a parent must either push a Layout
StateMaintainter, or |
68 // instantiate LayoutStateDisabler. Since using a LayoutStateMaintainer is s
lightly more efficient, | 68 // instantiate LayoutStateDisabler. Since using a LayoutStateMaintainer is s
lightly more efficient, |
69 // and this method will be called many times per second during playback, use
a LayoutStateMaintainer: | 69 // and this method will be called many times per second during playback, use
a LayoutStateMaintainer: |
70 LayoutStateMaintainer statePusher(this, locationOffset(), hasTransform() ||
hasReflection() || style()->isFlippedBlocksWritingMode()); | 70 LayoutStateMaintainer statePusher(this, locationOffset()); |
71 | 71 |
72 controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + Layou
tSize(paddingLeft(), paddingTop())); | 72 controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + Layou
tSize(paddingLeft(), paddingTop())); |
73 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed)); | 73 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed)); |
74 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed)); | 74 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed)); |
75 controlsRenderer->forceLayout(); | 75 controlsRenderer->forceLayout(); |
76 clearNeedsLayout(); | 76 clearNeedsLayout(); |
77 | 77 |
78 statePusher.pop(); | 78 statePusher.pop(); |
79 } | 79 } |
80 | 80 |
81 void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&) | 81 void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&) |
82 { | 82 { |
83 } | 83 } |
84 | 84 |
85 } // namespace WebCore | 85 } // namespace WebCore |
OLD | NEW |