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