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