| 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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 RefPtr<FrameView> protector(this); | 858 RefPtr<FrameView> protector(this); |
| 859 | 859 |
| 860 // Every scroll that happens during layout is programmatic. | 860 // Every scroll that happens during layout is programmatic. |
| 861 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); | 861 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); |
| 862 | 862 |
| 863 m_hasPendingLayout = false; | 863 m_hasPendingLayout = false; |
| 864 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Layo
utClean); | 864 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Layo
utClean); |
| 865 | 865 |
| 866 RELEASE_ASSERT(!isPainting()); | 866 RELEASE_ASSERT(!isPainting()); |
| 867 | 867 |
| 868 // Store the current maximal outline size to use when computing the old/new | |
| 869 // outline rects for repainting. | |
| 870 renderView()->setOldMaximalOutlineSize(renderView()->maximalOutlineSize()); | |
| 871 | |
| 872 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout
(m_frame.get()); | 868 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout
(m_frame.get()); |
| 873 | 869 |
| 874 if (!allowSubtree && isSubtreeLayout()) { | 870 if (!allowSubtree && isSubtreeLayout()) { |
| 875 m_layoutSubtreeRoot->markContainingBlocksForLayout(false); | 871 m_layoutSubtreeRoot->markContainingBlocksForLayout(false); |
| 876 m_layoutSubtreeRoot = 0; | 872 m_layoutSubtreeRoot = 0; |
| 877 } | 873 } |
| 878 | 874 |
| 879 performPreLayoutTasks(); | 875 performPreLayoutTasks(); |
| 880 | 876 |
| 881 // If there is only one ref to this view left, then its going to be destroye
d as soon as we exit, | 877 // If there is only one ref to this view left, then its going to be destroye
d as soon as we exit, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 | 1045 |
| 1050 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre
Order()) { | 1046 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre
Order()) { |
| 1051 // The repaint rectangles stored on the RenderObjects should all match | 1047 // The repaint rectangles stored on the RenderObjects should all match |
| 1052 // the current repaint rectangles for the renderers. | 1048 // the current repaint rectangles for the renderers. |
| 1053 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep
aint()) == renderer->newRepaintRect()); | 1049 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep
aint()) == renderer->newRepaintRect()); |
| 1054 | 1050 |
| 1055 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); | 1051 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); |
| 1056 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); | 1052 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); |
| 1057 | 1053 |
| 1058 LayoutRect oldOutlineRect = oldRepaintRect; | 1054 LayoutRect oldOutlineRect = oldRepaintRect; |
| 1059 oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize()); | |
| 1060 | 1055 |
| 1061 LayoutRect newOutlineRect = newRepaintRect; | 1056 LayoutRect newOutlineRect = newRepaintRect; |
| 1062 newOutlineRect.inflate(renderView()->maximalOutlineSize()); | |
| 1063 | 1057 |
| 1064 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. | 1058 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. |
| 1065 // That call should be broken apart to position the layers be done befor
e | 1059 // That call should be broken apart to position the layers be done befor
e |
| 1066 // the repaintTree call so this will repaint everything. | 1060 // the repaintTree call so this will repaint everything. |
| 1067 bool didFullRepaint = false; | 1061 bool didFullRepaint = false; |
| 1068 if (!renderer->hasLayer()) { | 1062 if (!renderer->hasLayer()) { |
| 1069 if (!renderer->layoutDidGetCalled()) { | 1063 if (!renderer->layoutDidGetCalled()) { |
| 1070 if (renderer->shouldDoFullRepaintAfterLayout()) { | 1064 if (renderer->shouldDoFullRepaintAfterLayout()) { |
| 1071 renderer->repaint(); | 1065 renderer->repaint(); |
| 1072 didFullRepaint = true; | 1066 didFullRepaint = true; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1093 } | 1087 } |
| 1094 } | 1088 } |
| 1095 // The list box has a verticalScrollbar we may need to repaint. | 1089 // The list box has a verticalScrollbar we may need to repaint. |
| 1096 if (renderer->isListBox()) { | 1090 if (renderer->isListBox()) { |
| 1097 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); | 1091 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); |
| 1098 listBox->repaintScrollbarIfNeeded(); | 1092 listBox->repaintScrollbarIfNeeded(); |
| 1099 } | 1093 } |
| 1100 | 1094 |
| 1101 renderer->clearRepaintRects(); | 1095 renderer->clearRepaintRects(); |
| 1102 } | 1096 } |
| 1103 renderView()->setOldMaximalOutlineSize(0); | |
| 1104 | 1097 |
| 1105 // Repaint the frameviews scrollbars if needed | 1098 // Repaint the frameviews scrollbars if needed |
| 1106 if (hasVerticalBarDamage()) | 1099 if (hasVerticalBarDamage()) |
| 1107 invalidateRect(verticalBarDamage()); | 1100 invalidateRect(verticalBarDamage()); |
| 1108 if (hasHorizontalBarDamage()) | 1101 if (hasHorizontalBarDamage()) |
| 1109 invalidateRect(horizontalBarDamage()); | 1102 invalidateRect(horizontalBarDamage()); |
| 1110 resetScrollbarDamage(); | 1103 resetScrollbarDamage(); |
| 1111 } | 1104 } |
| 1112 | 1105 |
| 1113 DocumentLifecycle& FrameView::lifecycle() const | 1106 DocumentLifecycle& FrameView::lifecycle() const |
| (...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3216 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3209 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
| 3217 { | 3210 { |
| 3218 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3211 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
| 3219 if (AXObjectCache* cache = axObjectCache()) { | 3212 if (AXObjectCache* cache = axObjectCache()) { |
| 3220 cache->remove(scrollbar); | 3213 cache->remove(scrollbar); |
| 3221 cache->handleScrollbarUpdate(this); | 3214 cache->handleScrollbarUpdate(this); |
| 3222 } | 3215 } |
| 3223 } | 3216 } |
| 3224 | 3217 |
| 3225 } // namespace WebCore | 3218 } // namespace WebCore |
| OLD | NEW |