| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // both padding and border to the child's logical height here. | 108 // both padding and border to the child's logical height here. |
| 109 FrameView* childFrameView = toFrameView(widget()); | 109 FrameView* childFrameView = toFrameView(widget()); |
| 110 if (childFrameView) // Widget should never be null during layout(), but just
in case. | 110 if (childFrameView) // Widget should never be null during layout(), but just
in case. |
| 111 setLogicalHeight(childFrameView->contentsHeight() + borderTop() + border
Bottom() + paddingTop() + paddingBottom()); | 111 setLogicalHeight(childFrameView->contentsHeight() + borderTop() + border
Bottom() + paddingTop() + paddingBottom()); |
| 112 updateLogicalHeight(); | 112 updateLogicalHeight(); |
| 113 | 113 |
| 114 updateWidgetPosition(); // Notify the Widget of our final height. | 114 updateWidgetPosition(); // Notify the Widget of our final height. |
| 115 | 115 |
| 116 // Assert that the child document did a complete layout. | 116 // Assert that the child document did a complete layout. |
| 117 RenderView* childRoot = childFrameView ? childFrameView->frame()->contentRen
derer() : 0; | 117 RenderView* childRoot = childFrameView ? childFrameView->frame()->contentRen
derer() : 0; |
| 118 ASSERT(!childFrameView || !childFrameView->layoutPending()); | 118 ASSERT(!childFrameView || !childFrameView->layoutIsScheduledWithEmbedder()); |
| 119 ASSERT_UNUSED(childRoot, !childRoot || !childRoot->needsLayout()); | 119 ASSERT_UNUSED(childRoot, !childRoot || !childRoot->needsLayout()); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void RenderIFrame::layout() | 122 void RenderIFrame::layout() |
| 123 { | 123 { |
| 124 StackStats::LayoutCheckPoint layoutCheckPoint; | 124 StackStats::LayoutCheckPoint layoutCheckPoint; |
| 125 ASSERT(needsLayout()); | 125 ASSERT(needsLayout()); |
| 126 | 126 |
| 127 if (isSeamless()) { | 127 if (isSeamless()) { |
| 128 layoutSeamlessly(); | 128 layoutSeamlessly(); |
| 129 // Do not return so as to share the layer and overflow updates below. | 129 // Do not return so as to share the layer and overflow updates below. |
| 130 } else { | 130 } else { |
| 131 updateLogicalWidth(); | 131 updateLogicalWidth(); |
| 132 // No kids to layout as a replaced element. | 132 // No kids to layout as a replaced element. |
| 133 updateLogicalHeight(); | 133 updateLogicalHeight(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 m_overflow.clear(); | 136 m_overflow.clear(); |
| 137 addVisualEffectOverflow(); | 137 addVisualEffectOverflow(); |
| 138 updateLayerTransform(); | 138 updateLayerTransform(); |
| 139 | 139 |
| 140 setNeedsLayout(false); | 140 setNeedsLayout(false); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } | 143 } |
| OLD | NEW |