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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 // Until those states are fully fledged, I'll just disable the ASSERTS. | 1052 // Until those states are fully fledged, I'll just disable the ASSERTS. |
1053 DisableCompositingQueryAsserts disabler; | 1053 DisableCompositingQueryAsserts disabler; |
1054 | 1054 |
1055 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre
Order()) { | 1055 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre
Order()) { |
1056 // The repaint rectangles stored on the RenderObjects should all match | 1056 // The repaint rectangles stored on the RenderObjects should all match |
1057 // the current repaint rectangles for the renderers. | 1057 // the current repaint rectangles for the renderers. |
1058 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep
aint()) == renderer->newRepaintRect()); | 1058 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep
aint()) == renderer->newRepaintRect()); |
1059 | 1059 |
1060 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); | 1060 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); |
1061 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); | 1061 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); |
| 1062 LayoutRect oldOutlineRect; |
| 1063 LayoutRect newOutlineRect; |
1062 | 1064 |
1063 LayoutRect oldOutlineRect = oldRepaintRect; | 1065 if (renderer->hasOutline()) { |
1064 oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize()); | 1066 newOutlineRect = renderer->newOutlineRect(); |
1065 | 1067 oldOutlineRect = renderer->oldOutlineRect(); |
1066 LayoutRect newOutlineRect = newRepaintRect; | 1068 } |
1067 newOutlineRect.inflate(renderView()->maximalOutlineSize()); | |
1068 | 1069 |
1069 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. | 1070 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. |
1070 // That call should be broken apart to position the layers be done befor
e | 1071 // That call should be broken apart to position the layers be done befor
e |
1071 // the repaintTree call so this will repaint everything. | 1072 // the repaintTree call so this will repaint everything. |
1072 bool didFullRepaint = false; | 1073 bool didFullRepaint = false; |
1073 if (!renderer->hasLayer()) { | 1074 if (!renderer->layoutDidGetCalled()) { |
1074 if (!renderer->layoutDidGetCalled()) { | 1075 if (renderer->shouldDoFullRepaintAfterLayout()) { |
1075 if (renderer->shouldDoFullRepaintAfterLayout()) { | 1076 renderer->repaint(); |
1076 renderer->repaint(); | 1077 didFullRepaint = true; |
1077 didFullRepaint = true; | 1078 } |
1078 } | |
1079 | 1079 |
1080 } else { | 1080 } else { |
1081 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->
containerForRepaint(), | 1081 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->cont
ainerForRepaint(), |
1082 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect,
oldOutlineRect, | 1082 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldO
utlineRect, |
1083 &newRepaintRect, &newOutlineRect); | 1083 &newRepaintRect, &newOutlineRect); |
1084 } | |
1085 } | 1084 } |
1086 | 1085 |
1087 if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded()) | 1086 if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded()) |
1088 renderer->repaintOverflow(); | 1087 renderer->repaintOverflow(); |
1089 | 1088 |
1090 // Repaint any scrollbars if there is a scrollable area for this rendere
r. | 1089 // Repaint any scrollbars if there is a scrollable area for this rendere
r. |
1091 if (renderer->enclosingLayer()) { | 1090 if (renderer->enclosingLayer()) { |
1092 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc
rollableArea()) { | 1091 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc
rollableArea()) { |
1093 if (area->hasVerticalBarDamage()) | 1092 if (area->hasVerticalBarDamage()) |
1094 renderer->repaintRectangle(area->verticalBarDamage()); | 1093 renderer->repaintRectangle(area->verticalBarDamage()); |
1095 if (area->hasHorizontalBarDamage()) | 1094 if (area->hasHorizontalBarDamage()) |
1096 renderer->repaintRectangle(area->horizontalBarDamage()); | 1095 renderer->repaintRectangle(area->horizontalBarDamage()); |
1097 area->resetScrollbarDamage(); | 1096 area->resetScrollbarDamage(); |
1098 } | 1097 } |
1099 } | 1098 } |
1100 // The list box has a verticalScrollbar we may need to repaint. | 1099 // The list box has a verticalScrollbar we may need to repaint. |
1101 if (renderer->isListBox()) { | 1100 if (renderer->isListBox()) { |
1102 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); | 1101 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); |
1103 listBox->repaintScrollbarIfNeeded(); | 1102 listBox->repaintScrollbarIfNeeded(); |
1104 } | 1103 } |
1105 | 1104 |
1106 renderer->clearRepaintRects(); | 1105 renderer->clearRepaintState(); |
1107 } | 1106 } |
1108 renderView()->setOldMaximalOutlineSize(0); | 1107 renderView()->setOldMaximalOutlineSize(0); |
1109 | 1108 |
1110 // Repaint the frameviews scrollbars if needed | 1109 // Repaint the frameviews scrollbars if needed |
1111 if (hasVerticalBarDamage()) | 1110 if (hasVerticalBarDamage()) |
1112 invalidateRect(verticalBarDamage()); | 1111 invalidateRect(verticalBarDamage()); |
1113 if (hasHorizontalBarDamage()) | 1112 if (hasHorizontalBarDamage()) |
1114 invalidateRect(horizontalBarDamage()); | 1113 invalidateRect(horizontalBarDamage()); |
1115 resetScrollbarDamage(); | 1114 resetScrollbarDamage(); |
1116 } | 1115 } |
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3178 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3177 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3179 { | 3178 { |
3180 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3179 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3181 if (AXObjectCache* cache = axObjectCache()) { | 3180 if (AXObjectCache* cache = axObjectCache()) { |
3182 cache->remove(scrollbar); | 3181 cache->remove(scrollbar); |
3183 cache->handleScrollbarUpdate(this); | 3182 cache->handleScrollbarUpdate(this); |
3184 } | 3183 } |
3185 } | 3184 } |
3186 | 3185 |
3187 } // namespace WebCore | 3186 } // namespace WebCore |
OLD | NEW |