| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "core/page/scrolling/ScrollingCoordinator.h" | 56 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 57 #include "core/platform/ScrollAnimator.h" | 57 #include "core/platform/ScrollAnimator.h" |
| 58 #include "core/platform/graphics/FloatRect.h" | 58 #include "core/platform/graphics/FloatRect.h" |
| 59 #include "core/platform/graphics/FontCache.h" | 59 #include "core/platform/graphics/FontCache.h" |
| 60 #include "core/platform/graphics/GraphicsContext.h" | 60 #include "core/platform/graphics/GraphicsContext.h" |
| 61 #include "core/platform/text/TextStream.h" | 61 #include "core/platform/text/TextStream.h" |
| 62 #include "core/rendering/RenderEmbeddedObject.h" | 62 #include "core/rendering/RenderEmbeddedObject.h" |
| 63 #include "core/rendering/RenderLayer.h" | 63 #include "core/rendering/RenderLayer.h" |
| 64 #include "core/rendering/RenderLayerBacking.h" | 64 #include "core/rendering/RenderLayerBacking.h" |
| 65 #include "core/rendering/RenderLayerCompositor.h" | 65 #include "core/rendering/RenderLayerCompositor.h" |
| 66 #include "core/rendering/RenderLazyBlock.h" | |
| 67 #include "core/rendering/RenderPart.h" | 66 #include "core/rendering/RenderPart.h" |
| 68 #include "core/rendering/RenderScrollbar.h" | 67 #include "core/rendering/RenderScrollbar.h" |
| 69 #include "core/rendering/RenderScrollbarPart.h" | 68 #include "core/rendering/RenderScrollbarPart.h" |
| 70 #include "core/rendering/RenderTheme.h" | 69 #include "core/rendering/RenderTheme.h" |
| 71 #include "core/rendering/RenderView.h" | 70 #include "core/rendering/RenderView.h" |
| 72 #include "core/rendering/TextAutosizer.h" | 71 #include "core/rendering/TextAutosizer.h" |
| 73 #include "core/rendering/style/RenderStyle.h" | 72 #include "core/rendering/style/RenderStyle.h" |
| 74 #include "core/rendering/svg/RenderSVGRoot.h" | 73 #include "core/rendering/svg/RenderSVGRoot.h" |
| 75 #include "core/svg/SVGDocument.h" | 74 #include "core/svg/SVGDocument.h" |
| 76 #include "core/svg/SVGSVGElement.h" | 75 #include "core/svg/SVGSVGElement.h" |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 endDeferredRepaints(); | 1027 endDeferredRepaints(); |
| 1029 | 1028 |
| 1030 updateCompositingLayersAfterLayout(); | 1029 updateCompositingLayersAfterLayout(); |
| 1031 | 1030 |
| 1032 m_layoutCount++; | 1031 m_layoutCount++; |
| 1033 | 1032 |
| 1034 if (AXObjectCache* cache = rootForThisLayout->document()->existingAXObjectCa
che()) | 1033 if (AXObjectCache* cache = rootForThisLayout->document()->existingAXObjectCa
che()) |
| 1035 cache->postNotification(rootForThisLayout, AXObjectCache::AXLayoutComple
te, true); | 1034 cache->postNotification(rootForThisLayout, AXObjectCache::AXLayoutComple
te, true); |
| 1036 updateAnnotatedRegions(); | 1035 updateAnnotatedRegions(); |
| 1037 | 1036 |
| 1038 layoutLazyBlocks(); | |
| 1039 | |
| 1040 ASSERT(!rootForThisLayout->needsLayout()); | 1037 ASSERT(!rootForThisLayout->needsLayout()); |
| 1041 | 1038 |
| 1042 updateCanBlitOnScrollRecursively(); | 1039 updateCanBlitOnScrollRecursively(); |
| 1043 | 1040 |
| 1044 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) | 1041 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) |
| 1045 updateOverflowStatus(layoutWidth() < contentsWidth(), layoutHeight() < c
ontentsHeight()); | 1042 updateOverflowStatus(layoutWidth() < contentsWidth(), layoutHeight() < c
ontentsHeight()); |
| 1046 | 1043 |
| 1047 if (!m_postLayoutTasksTimer.isActive()) { | 1044 if (!m_postLayoutTasksTimer.isActive()) { |
| 1048 if (!m_inSynchronousPostLayout) { | 1045 if (!m_inSynchronousPostLayout) { |
| 1049 if (frame()->document()->shouldDisplaySeamlesslyWithParent()) { | 1046 if (frame()->document()->shouldDisplaySeamlesslyWithParent()) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 // however m_inLayout is not set for most of this function, so none of our R
ELEASE_ASSERTS | 1085 // however m_inLayout is not set for most of this function, so none of our R
ELEASE_ASSERTS |
| 1089 // in Frame/Page will fire. One of the post-layout tasks is disconnecting th
e Frame from | 1086 // in Frame/Page will fire. One of the post-layout tasks is disconnecting th
e Frame from |
| 1090 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht
ml | 1087 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht
ml |
| 1091 // necessitating this check here. | 1088 // necessitating this check here. |
| 1092 ASSERT(frame()); | 1089 ASSERT(frame()); |
| 1093 // ASSERT(frame()->page()); | 1090 // ASSERT(frame()->page()); |
| 1094 if (frame() && frame()->page()) | 1091 if (frame() && frame()->page()) |
| 1095 frame()->page()->chrome().client()->layoutUpdated(frame()); | 1092 frame()->page()->chrome().client()->layoutUpdated(frame()); |
| 1096 } | 1093 } |
| 1097 | 1094 |
| 1098 void FrameView::layoutLazyBlocks() | |
| 1099 { | |
| 1100 // FIXME: This infinite recursion protection would seem to break plugins | |
| 1101 // doing things that require lazy blocks to layout. | |
| 1102 if (m_nestedLayoutCount != 1) | |
| 1103 return; | |
| 1104 | |
| 1105 if (!renderView()->firstLazyBlock()) | |
| 1106 return; | |
| 1107 | |
| 1108 // First mark all lazy blocks as needing layout and perform another layout. | |
| 1109 for (RenderLazyBlock* block = renderView()->firstLazyBlock(); block; block =
block->next()) | |
| 1110 block->markForNestedLayout(); | |
| 1111 | |
| 1112 layout(); | |
| 1113 | |
| 1114 // FIXME: This is pretty awful if you start nesting lazy blocks, we should | |
| 1115 // signal to the nested blocks to avoid doing work until the second pass. | |
| 1116 | |
| 1117 // Next walk all lazy blocks and find nested ones, these need another layout | |
| 1118 // since the first one would not have placed them correctly inside the viewp
ort. | |
| 1119 for (RenderLazyBlock* block = renderView()->firstLazyBlock(); block; block =
block->next()) { | |
| 1120 if (!block->isNested()) | |
| 1121 continue; | |
| 1122 block->setNeedsLayout(); | |
| 1123 layout(); | |
| 1124 } | |
| 1125 } | |
| 1126 | |
| 1127 RenderBox* FrameView::embeddedContentBox() const | 1095 RenderBox* FrameView::embeddedContentBox() const |
| 1128 { | 1096 { |
| 1129 RenderView* renderView = this->renderView(); | 1097 RenderView* renderView = this->renderView(); |
| 1130 if (!renderView) | 1098 if (!renderView) |
| 1131 return 0; | 1099 return 0; |
| 1132 | 1100 |
| 1133 RenderObject* firstChild = renderView->firstChild(); | 1101 RenderObject* firstChild = renderView->firstChild(); |
| 1134 if (!firstChild || !firstChild->isBox()) | 1102 if (!firstChild || !firstChild->isBox()) |
| 1135 return 0; | 1103 return 0; |
| 1136 | 1104 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 | 1543 |
| 1576 | 1544 |
| 1577 void FrameView::scrollPositionChanged() | 1545 void FrameView::scrollPositionChanged() |
| 1578 { | 1546 { |
| 1579 frame()->eventHandler()->sendScrollEvent(); | 1547 frame()->eventHandler()->sendScrollEvent(); |
| 1580 frame()->eventHandler()->dispatchFakeMouseMoveEventSoon(); | 1548 frame()->eventHandler()->dispatchFakeMouseMoveEventSoon(); |
| 1581 | 1549 |
| 1582 if (RenderView* renderView = this->renderView()) { | 1550 if (RenderView* renderView = this->renderView()) { |
| 1583 if (renderView->usesCompositing()) | 1551 if (renderView->usesCompositing()) |
| 1584 renderView->compositor()->frameViewDidScroll(); | 1552 renderView->compositor()->frameViewDidScroll(); |
| 1585 | |
| 1586 renderView->markLazyBlocksForLayout(); | |
| 1587 } | 1553 } |
| 1588 } | 1554 } |
| 1589 | 1555 |
| 1590 void FrameView::repaintFixedElementsAfterScrolling() | 1556 void FrameView::repaintFixedElementsAfterScrolling() |
| 1591 { | 1557 { |
| 1592 // For fixed position elements, update widget positions and compositing laye
rs after scrolling, | 1558 // For fixed position elements, update widget positions and compositing laye
rs after scrolling, |
| 1593 // but only if we're not inside of layout. | 1559 // but only if we're not inside of layout. |
| 1594 if (!m_nestedLayoutCount && hasViewportConstrainedObjects()) { | 1560 if (!m_nestedLayoutCount && hasViewportConstrainedObjects()) { |
| 1595 if (RenderView* renderView = this->renderView()) { | 1561 if (RenderView* renderView = this->renderView()) { |
| 1596 renderView->updateWidgetPositions(); | 1562 renderView->updateWidgetPositions(); |
| (...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3356 } | 3322 } |
| 3357 | 3323 |
| 3358 AXObjectCache* FrameView::axObjectCache() const | 3324 AXObjectCache* FrameView::axObjectCache() const |
| 3359 { | 3325 { |
| 3360 if (frame() && frame()->document()) | 3326 if (frame() && frame()->document()) |
| 3361 return frame()->document()->existingAXObjectCache(); | 3327 return frame()->document()->existingAXObjectCache(); |
| 3362 return 0; | 3328 return 0; |
| 3363 } | 3329 } |
| 3364 | 3330 |
| 3365 } // namespace WebCore | 3331 } // namespace WebCore |
| OLD | NEW |