| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 // make it update the rendering area when set | 475 // make it update the rendering area when set |
| 476 m_margins.setWidth(w); | 476 m_margins.setWidth(w); |
| 477 } | 477 } |
| 478 | 478 |
| 479 void FrameView::setMarginHeight(LayoutUnit h) | 479 void FrameView::setMarginHeight(LayoutUnit h) |
| 480 { | 480 { |
| 481 // make it update the rendering area when set | 481 // make it update the rendering area when set |
| 482 m_margins.setHeight(h); | 482 m_margins.setHeight(h); |
| 483 } | 483 } |
| 484 | 484 |
| 485 bool FrameView::avoidScrollbarCreation() const | |
| 486 { | |
| 487 ASSERT(m_frame); | |
| 488 | |
| 489 // with frame flattening no subframe can have scrollbars | |
| 490 // but we also cannot turn scrollbars off as we determine | |
| 491 // our flattening policy using that. | |
| 492 | |
| 493 if (!m_frame->ownerElement()) | |
| 494 return false; | |
| 495 | |
| 496 if (!m_frame->settings() || m_frame->settings()->frameFlatteningEnabled()) | |
| 497 return true; | |
| 498 | |
| 499 return false; | |
| 500 } | |
| 501 | |
| 502 void FrameView::setCanHaveScrollbars(bool canHaveScrollbars) | 485 void FrameView::setCanHaveScrollbars(bool canHaveScrollbars) |
| 503 { | 486 { |
| 504 m_canHaveScrollbars = canHaveScrollbars; | 487 m_canHaveScrollbars = canHaveScrollbars; |
| 505 ScrollView::setCanHaveScrollbars(canHaveScrollbars); | 488 ScrollView::setCanHaveScrollbars(canHaveScrollbars); |
| 506 } | 489 } |
| 507 | 490 |
| 508 void FrameView::updateCanHaveScrollbars() | 491 void FrameView::updateCanHaveScrollbars() |
| 509 { | 492 { |
| 510 ScrollbarMode hMode; | 493 ScrollbarMode hMode; |
| 511 ScrollbarMode vMode; | 494 ScrollbarMode vMode; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 hMode = ScrollbarAuto; | 663 hMode = ScrollbarAuto; |
| 681 // Seamless documents begin with heights of 0; we special case that here | 664 // Seamless documents begin with heights of 0; we special case that here |
| 682 // to correctly render documents that don't need scrollbars. | 665 // to correctly render documents that don't need scrollbars. |
| 683 IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size(); | 666 IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size(); |
| 684 bool isSeamlessDocument = frame() && frame()->document() && frame()->doc
ument()->shouldDisplaySeamlesslyWithParent(); | 667 bool isSeamlessDocument = frame() && frame()->document() && frame()->doc
ument()->shouldDisplaySeamlesslyWithParent(); |
| 685 vMode = (isSeamlessDocument && !fullVisibleSize.height()) ? ScrollbarAlw
aysOff : ScrollbarAuto; | 668 vMode = (isSeamlessDocument && !fullVisibleSize.height()) ? ScrollbarAlw
aysOff : ScrollbarAuto; |
| 686 } else { | 669 } else { |
| 687 hMode = ScrollbarAlwaysOff; | 670 hMode = ScrollbarAlwaysOff; |
| 688 vMode = ScrollbarAlwaysOff; | 671 vMode = ScrollbarAlwaysOff; |
| 689 } | 672 } |
| 690 | 673 |
| 691 if (!m_layoutRoot) { | 674 if (!m_layoutRoot) { |
| 692 Document* document = m_frame->document(); | 675 Document* document = m_frame->document(); |
| 693 Node* documentElement = document->documentElement(); | 676 Node* documentElement = document->documentElement(); |
| 694 RenderObject* rootRenderer = documentElement ? documentElement->renderer
() : 0; | 677 RenderObject* rootRenderer = documentElement ? documentElement->renderer
() : 0; |
| 695 Node* body = document->body(); | 678 Node* body = document->body(); |
| 696 if (body && body->renderer()) { | 679 if (body && body->renderer()) { |
| 697 if (body->hasTagName(framesetTag) && m_frame->settings() && !m_frame
->settings()->frameFlatteningEnabled()) { | 680 if (body->hasTagName(framesetTag)) { |
| 698 vMode = ScrollbarAlwaysOff; | 681 vMode = ScrollbarAlwaysOff; |
| 699 hMode = ScrollbarAlwaysOff; | 682 hMode = ScrollbarAlwaysOff; |
| 700 } else if (body->hasTagName(bodyTag)) { | 683 } else if (body->hasTagName(bodyTag)) { |
| 701 // It's sufficient to just check the X overflow, | 684 // It's sufficient to just check the X overflow, |
| 702 // since it's illegal to have visible in only one direction. | 685 // since it's illegal to have visible in only one direction. |
| 703 RenderObject* o = rootRenderer->style()->overflowX() == OVISIBLE
&& document->documentElement()->hasTagName(htmlTag) ? body->renderer() : rootRe
nderer; | 686 RenderObject* o = rootRenderer->style()->overflowX() == OVISIBLE
&& document->documentElement()->hasTagName(htmlTag) ? body->renderer() : rootRe
nderer; |
| 704 applyOverflowToViewport(o, hMode, vMode); | 687 applyOverflowToViewport(o, hMode, vMode); |
| 705 } | 688 } |
| 706 } else if (rootRenderer) | 689 } else if (rootRenderer) |
| 707 applyOverflowToViewport(rootRenderer, hMode, vMode); | 690 applyOverflowToViewport(rootRenderer, hMode, vMode); |
| 708 } | 691 } |
| 709 } | 692 } |
| 710 | 693 |
| 711 void FrameView::updateCompositingLayersAfterStyleChange() | 694 void FrameView::updateCompositingLayersAfterStyleChange() |
| 712 { | 695 { |
| 713 RenderView* renderView = this->renderView(); | 696 RenderView* renderView = this->renderView(); |
| 714 if (!renderView) | 697 if (!renderView) |
| 715 return; | 698 return; |
| 716 | 699 |
| 717 // If we expect to update compositing after an incipient layout, don't do so
here. | 700 // If we expect to update compositing after an incipient layout, don't do so
here. |
| 718 if (m_doingPreLayoutStyleUpdate || layoutPending() || renderView->needsLayou
t()) | 701 if (m_doingPreLayoutStyleUpdate || layoutPending() || renderView->needsLayou
t()) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 return; | 922 return; |
| 940 | 923 |
| 941 TRACE_EVENT0("webkit", "FrameView::layout"); | 924 TRACE_EVENT0("webkit", "FrameView::layout"); |
| 942 | 925 |
| 943 // Protect the view from being deleted during layout (in recalcStyle) | 926 // Protect the view from being deleted during layout (in recalcStyle) |
| 944 RefPtr<FrameView> protector(this); | 927 RefPtr<FrameView> protector(this); |
| 945 | 928 |
| 946 // Every scroll that happens during layout is programmatic. | 929 // Every scroll that happens during layout is programmatic. |
| 947 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); | 930 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); |
| 948 | 931 |
| 949 bool inChildFrameLayoutWithFrameFlattening = isInChildFrameWithFrameFlatteni
ng(); | |
| 950 | |
| 951 if (inChildFrameLayoutWithFrameFlattening) { | |
| 952 if (doLayoutWithFrameFlattening(allowSubtree)) | |
| 953 return; | |
| 954 } | |
| 955 | |
| 956 m_layoutTimer.stop(); | 932 m_layoutTimer.stop(); |
| 957 m_delayedLayout = false; | 933 m_delayedLayout = false; |
| 958 m_setNeedsLayoutWasDeferred = false; | 934 m_setNeedsLayoutWasDeferred = false; |
| 959 | 935 |
| 960 if (!m_frame) { | 936 if (!m_frame) { |
| 961 // FIXME: Do we need to set m_size.width here? | 937 // FIXME: Do we need to set m_size.width here? |
| 962 // FIXME: Should we set m_size.height here too? | 938 // FIXME: Should we set m_size.height here too? |
| 963 m_size.setWidth(layoutWidth()); | 939 m_size.setWidth(layoutWidth()); |
| 964 return; | 940 return; |
| 965 } | 941 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 979 ASSERT(m_frame->view() == this); | 955 ASSERT(m_frame->view() == this); |
| 980 | 956 |
| 981 Document* document = m_frame->document(); | 957 Document* document = m_frame->document(); |
| 982 ASSERT(!document->inPageCache()); | 958 ASSERT(!document->inPageCache()); |
| 983 bool subtree; | 959 bool subtree; |
| 984 RenderObject* root; | 960 RenderObject* root; |
| 985 | 961 |
| 986 { | 962 { |
| 987 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled,
false); | 963 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled,
false); |
| 988 | 964 |
| 989 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTa
sksTimer.isActive() && !inChildFrameLayoutWithFrameFlattening) { | 965 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTa
sksTimer.isActive()) { |
| 990 // This is a new top-level layout. If there are any remaining tasks
from the previous | 966 // This is a new top-level layout. If there are any remaining tasks
from the previous |
| 991 // layout, finish them now. | 967 // layout, finish them now. |
| 992 m_inSynchronousPostLayout = true; | 968 m_inSynchronousPostLayout = true; |
| 993 performPostLayoutTasks(); | 969 performPostLayoutTasks(); |
| 994 m_inSynchronousPostLayout = false; | 970 m_inSynchronousPostLayout = false; |
| 995 } | 971 } |
| 996 | 972 |
| 997 // Viewport-dependent media queries may cause us to need completely diff
erent style information. | 973 // Viewport-dependent media queries may cause us to need completely diff
erent style information. |
| 998 // Check that here. | 974 // Check that here. |
| 999 if (document->styleResolver()->affectedByViewportChange()) { | 975 if (document->styleResolver()->affectedByViewportChange()) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 RenderLayer* layer; | 1007 RenderLayer* layer; |
| 1032 { | 1008 { |
| 1033 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled,
false); | 1009 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled,
false); |
| 1034 | 1010 |
| 1035 m_nestedLayoutCount++; | 1011 m_nestedLayoutCount++; |
| 1036 | 1012 |
| 1037 if (!m_layoutRoot) { | 1013 if (!m_layoutRoot) { |
| 1038 Document* document = m_frame->document(); | 1014 Document* document = m_frame->document(); |
| 1039 Node* body = document->body(); | 1015 Node* body = document->body(); |
| 1040 if (body && body->renderer()) { | 1016 if (body && body->renderer()) { |
| 1041 if (body->hasTagName(framesetTag) && m_frame->settings() && !m_f
rame->settings()->frameFlatteningEnabled()) { | 1017 if (body->hasTagName(framesetTag)) { |
| 1042 body->renderer()->setChildNeedsLayout(true); | 1018 body->renderer()->setChildNeedsLayout(true); |
| 1043 } else if (body->hasTagName(bodyTag)) { | 1019 } else if (body->hasTagName(bodyTag)) { |
| 1044 if (!m_firstLayout && m_size.height() != layoutHeight() && b
ody->renderer()->enclosingBox()->stretchesToViewport()) | 1020 if (!m_firstLayout && m_size.height() != layoutHeight() && b
ody->renderer()->enclosingBox()->stretchesToViewport()) |
| 1045 body->renderer()->setChildNeedsLayout(true); | 1021 body->renderer()->setChildNeedsLayout(true); |
| 1046 } | 1022 } |
| 1047 } | 1023 } |
| 1048 | 1024 |
| 1049 #ifdef INSTRUMENT_LAYOUT_SCHEDULING | 1025 #ifdef INSTRUMENT_LAYOUT_SCHEDULING |
| 1050 if (m_firstLayout && !m_frame->ownerElement()) | 1026 if (m_firstLayout && !m_frame->ownerElement()) |
| 1051 printf("Elapsed time before first layout: %d\n", document->elaps
edTime()); | 1027 printf("Elapsed time before first layout: %d\n", document->elaps
edTime()); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 ASSERT(!root->needsLayout()); | 1139 ASSERT(!root->needsLayout()); |
| 1164 | 1140 |
| 1165 updateCanBlitOnScrollRecursively(); | 1141 updateCanBlitOnScrollRecursively(); |
| 1166 | 1142 |
| 1167 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) | 1143 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) |
| 1168 updateOverflowStatus(layoutWidth() < contentsWidth(), | 1144 updateOverflowStatus(layoutWidth() < contentsWidth(), |
| 1169 layoutHeight() < contentsHeight()); | 1145 layoutHeight() < contentsHeight()); |
| 1170 | 1146 |
| 1171 if (!m_postLayoutTasksTimer.isActive()) { | 1147 if (!m_postLayoutTasksTimer.isActive()) { |
| 1172 if (!m_inSynchronousPostLayout) { | 1148 if (!m_inSynchronousPostLayout) { |
| 1173 if (inChildFrameLayoutWithFrameFlattening) { | 1149 m_inSynchronousPostLayout = true; |
| 1174 if (RenderView* renderView = this->renderView()) | 1150 // Calls resumeScheduledEvents() |
| 1175 renderView->updateWidgetPositions(); | 1151 performPostLayoutTasks(); |
| 1176 } else { | 1152 m_inSynchronousPostLayout = false; |
| 1177 m_inSynchronousPostLayout = true; | |
| 1178 // Calls resumeScheduledEvents() | |
| 1179 performPostLayoutTasks(); | |
| 1180 m_inSynchronousPostLayout = false; | |
| 1181 } | |
| 1182 } | 1153 } |
| 1183 | 1154 |
| 1184 if (!m_postLayoutTasksTimer.isActive() && (needsLayout() || m_inSynchron
ousPostLayout || inChildFrameLayoutWithFrameFlattening)) { | 1155 if (!m_postLayoutTasksTimer.isActive() && (needsLayout() || m_inSynchron
ousPostLayout)) { |
| 1185 // If we need layout or are already in a synchronous call to postLay
outTasks(), | 1156 // If we need layout or are already in a synchronous call to postLay
outTasks(), |
| 1186 // defer widget updates and event dispatch until after we return. po
stLayoutTasks() | 1157 // defer widget updates and event dispatch until after we return. po
stLayoutTasks() |
| 1187 // can make us need to update again, and we can get stuck in a nasty
cycle unless | 1158 // can make us need to update again, and we can get stuck in a nasty
cycle unless |
| 1188 // we call it through the timer here. | 1159 // we call it through the timer here. |
| 1189 m_postLayoutTasksTimer.startOneShot(0); | 1160 m_postLayoutTasksTimer.startOneShot(0); |
| 1190 if (needsLayout()) { | 1161 if (needsLayout()) { |
| 1191 m_actionScheduler->pause(); | 1162 m_actionScheduler->pause(); |
| 1192 layout(); | 1163 layout(); |
| 1193 } | 1164 } |
| 1194 } | 1165 } |
| 1195 } else { | 1166 } else { |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 m_layoutRoot->markContainingBlocksForLayout(false); | 2003 m_layoutRoot->markContainingBlocksForLayout(false); |
| 2033 m_layoutRoot = 0; | 2004 m_layoutRoot = 0; |
| 2034 } | 2005 } |
| 2035 if (!m_layoutSchedulingEnabled) | 2006 if (!m_layoutSchedulingEnabled) |
| 2036 return; | 2007 return; |
| 2037 if (!needsLayout()) | 2008 if (!needsLayout()) |
| 2038 return; | 2009 return; |
| 2039 if (!m_frame->document()->shouldScheduleLayout()) | 2010 if (!m_frame->document()->shouldScheduleLayout()) |
| 2040 return; | 2011 return; |
| 2041 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); | 2012 InspectorInstrumentation::didInvalidateLayout(m_frame.get()); |
| 2042 // When frame flattening is enabled, the contents of the frame could affect
the layout of the parent frames. | 2013 |
| 2043 // Also invalidate parent frame starting from the owner element of this fram
e. | 2014 // When seamless mode is enabled, the contents of the frame could affect the
layout of the |
| 2044 if (m_frame->ownerRenderer() && isInChildFrameWithFrameFlattening()) | 2015 // parent frames. Also invalidate parent frame starting from the owner eleme
nt of this frame. |
| 2016 if (m_frame->ownerRenderer() && m_frame->document()->shouldDisplaySeamlessly
WithParent()) |
| 2045 m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain)
; | 2017 m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain)
; |
| 2046 | 2018 |
| 2047 int delay = m_frame->document()->minimumLayoutDelay(); | 2019 int delay = m_frame->document()->minimumLayoutDelay(); |
| 2048 if (m_layoutTimer.isActive() && m_delayedLayout && !delay) | 2020 if (m_layoutTimer.isActive() && m_delayedLayout && !delay) |
| 2049 unscheduleRelayout(); | 2021 unscheduleRelayout(); |
| 2050 if (m_layoutTimer.isActive()) | 2022 if (m_layoutTimer.isActive()) |
| 2051 return; | 2023 return; |
| 2052 | 2024 |
| 2053 m_delayedLayout = delay != 0; | 2025 m_delayedLayout = delay != 0; |
| 2054 | 2026 |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2967 { | 2939 { |
| 2968 if (!parent()) | 2940 if (!parent()) |
| 2969 return 0; | 2941 return 0; |
| 2970 | 2942 |
| 2971 if (Frame* parentFrame = m_frame->tree()->parent()) | 2943 if (Frame* parentFrame = m_frame->tree()->parent()) |
| 2972 return parentFrame->view(); | 2944 return parentFrame->view(); |
| 2973 | 2945 |
| 2974 return 0; | 2946 return 0; |
| 2975 } | 2947 } |
| 2976 | 2948 |
| 2977 bool FrameView::isInChildFrameWithFrameFlattening() const | |
| 2978 { | |
| 2979 if (!parent() || !m_frame->ownerElement()) | |
| 2980 return false; | |
| 2981 | |
| 2982 // Frame flattening applies when the owner element is either in a frameset o
r | |
| 2983 // an iframe with flattening parameters. | |
| 2984 if (m_frame->ownerElement()->hasTagName(iframeTag)) { | |
| 2985 RenderIFrame* iframeRenderer = toRenderIFrame(m_frame->ownerElement()->r
enderPart()); | |
| 2986 if (iframeRenderer->flattenFrame() || iframeRenderer->isSeamless()) | |
| 2987 return true; | |
| 2988 } | |
| 2989 | |
| 2990 if (!m_frame->settings() || !m_frame->settings()->frameFlatteningEnabled()) | |
| 2991 return false; | |
| 2992 | |
| 2993 if (m_frame->ownerElement()->hasTagName(frameTag)) | |
| 2994 return true; | |
| 2995 | |
| 2996 return false; | |
| 2997 } | |
| 2998 | |
| 2999 bool FrameView::doLayoutWithFrameFlattening(bool allowSubtree) | |
| 3000 { | |
| 3001 // Try initiating layout from the topmost parent. | |
| 3002 FrameView* parentView = parentFrameView(); | |
| 3003 | |
| 3004 if (!parentView) | |
| 3005 return false; | |
| 3006 | |
| 3007 // In the middle of parent layout, no need to restart from topmost. | |
| 3008 if (parentView->m_nestedLayoutCount) | |
| 3009 return false; | |
| 3010 | |
| 3011 // Parent tree is clean. Starting layout from it would have no effect. | |
| 3012 if (!parentView->needsLayout()) | |
| 3013 return false; | |
| 3014 | |
| 3015 while (parentView->parentFrameView()) | |
| 3016 parentView = parentView->parentFrameView(); | |
| 3017 | |
| 3018 parentView->layout(allowSubtree); | |
| 3019 | |
| 3020 RenderObject* root = m_layoutRoot ? m_layoutRoot : m_frame->document()->rend
erer(); | |
| 3021 ASSERT_UNUSED(root, !root->needsLayout()); | |
| 3022 | |
| 3023 return true; | |
| 3024 } | |
| 3025 | |
| 3026 void FrameView::updateControlTints() | 2949 void FrameView::updateControlTints() |
| 3027 { | 2950 { |
| 3028 // This is called when control tints are changed from aqua/graphite to clear
and vice versa. | 2951 // This is called when control tints are changed from aqua/graphite to clear
and vice versa. |
| 3029 // We do a "fake" paint, and when the theme gets a paint call, it can then d
o an invalidate. | 2952 // We do a "fake" paint, and when the theme gets a paint call, it can then d
o an invalidate. |
| 3030 // This is only done if the theme supports control tinting. It's up to the t
heme and platform | 2953 // This is only done if the theme supports control tinting. It's up to the t
heme and platform |
| 3031 // to define when controls get the tint and to call this function when that
changes. | 2954 // to define when controls get the tint and to call this function when that
changes. |
| 3032 | 2955 |
| 3033 // Optimize the common case where we bring a window to the front while it's
still empty. | 2956 // Optimize the common case where we bring a window to the front while it's
still empty. |
| 3034 if (!m_frame || m_frame->document()->url().isEmpty()) | 2957 if (!m_frame || m_frame->document()->url().isEmpty()) |
| 3035 return; | 2958 return; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3218 collectFrameViewChildren(this, frameViews); | 3141 collectFrameViewChildren(this, frameViews); |
| 3219 | 3142 |
| 3220 const Vector<RefPtr<FrameView> >::iterator end = frameViews.end(); | 3143 const Vector<RefPtr<FrameView> >::iterator end = frameViews.end(); |
| 3221 for (Vector<RefPtr<FrameView> >::iterator it = frameViews.begin(); it != end
; ++it) | 3144 for (Vector<RefPtr<FrameView> >::iterator it = frameViews.begin(); it != end
; ++it) |
| 3222 (*it)->updateLayoutAndStyleIfNeededRecursive(); | 3145 (*it)->updateLayoutAndStyleIfNeededRecursive(); |
| 3223 | 3146 |
| 3224 // updateLayoutAndStyleIfNeededRecursive is called when we need to make sure
style and layout are up-to-date before | 3147 // updateLayoutAndStyleIfNeededRecursive is called when we need to make sure
style and layout are up-to-date before |
| 3225 // painting, so we need to flush out any deferred repaints too. | 3148 // painting, so we need to flush out any deferred repaints too. |
| 3226 flushDeferredRepaints(); | 3149 flushDeferredRepaints(); |
| 3227 | 3150 |
| 3228 // When frame flattening is on, child frame can mark parent frame dirty. In
such case, child frame | 3151 // When seamless inner frames exist, child frame can mark the parent frame a
s dirty. In such case |
| 3229 // needs to call layout on parent frame recursively. | 3152 // the child frame needs to call layout on parent frame recursively. This as
sert ensures that |
| 3230 // This assert ensures that parent frames are clean, when child frames finis
hed updating layout and style. | 3153 // parent frames are clean, when child frames finished updating layout and s
tyle. |
| 3231 ASSERT(!needsLayout()); | 3154 ASSERT(!needsLayout()); |
| 3232 } | 3155 } |
| 3233 | 3156 |
| 3234 void FrameView::enableAutoSizeMode(bool enable, const IntSize& minSize, const In
tSize& maxSize) | 3157 void FrameView::enableAutoSizeMode(bool enable, const IntSize& minSize, const In
tSize& maxSize) |
| 3235 { | 3158 { |
| 3236 ASSERT(!enable || !minSize.isEmpty()); | 3159 ASSERT(!enable || !minSize.isEmpty()); |
| 3237 ASSERT(minSize.width() <= maxSize.width()); | 3160 ASSERT(minSize.width() <= maxSize.width()); |
| 3238 ASSERT(minSize.height() <= maxSize.height()); | 3161 ASSERT(minSize.height() <= maxSize.height()); |
| 3239 | 3162 |
| 3240 if (m_shouldAutoSize == enable && m_minAutoSize == minSize && m_maxAutoSize
== maxSize) | 3163 if (m_shouldAutoSize == enable && m_minAutoSize == minSize && m_maxAutoSize
== maxSize) |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3600 } | 3523 } |
| 3601 | 3524 |
| 3602 AXObjectCache* FrameView::axObjectCache() const | 3525 AXObjectCache* FrameView::axObjectCache() const |
| 3603 { | 3526 { |
| 3604 if (frame() && frame()->document()) | 3527 if (frame() && frame()->document()) |
| 3605 return frame()->document()->existingAXObjectCache(); | 3528 return frame()->document()->existingAXObjectCache(); |
| 3606 return 0; | 3529 return 0; |
| 3607 } | 3530 } |
| 3608 | 3531 |
| 3609 } // namespace WebCore | 3532 } // namespace WebCore |
| OLD | NEW |