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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 LayoutRect oldOutlineRect = oldRepaintRect; | 1053 LayoutRect oldOutlineRect = oldRepaintRect; |
1054 oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize()); | 1054 oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize()); |
1055 | 1055 |
1056 LayoutRect newOutlineRect = newRepaintRect; | 1056 LayoutRect newOutlineRect = newRepaintRect; |
1057 newOutlineRect.inflate(renderView()->maximalOutlineSize()); | 1057 newOutlineRect.inflate(renderView()->maximalOutlineSize()); |
1058 | 1058 |
1059 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. | 1059 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. |
1060 // That call should be broken apart to position the layers be done befor
e | 1060 // That call should be broken apart to position the layers be done befor
e |
1061 // the repaintTree call so this will repaint everything. | 1061 // the repaintTree call so this will repaint everything. |
1062 bool didFullRepaint = false; | 1062 bool didFullRepaint = false; |
1063 if (!renderer->hasLayer()) { | 1063 if (!renderer->layoutDidGetCalled()) { |
1064 if (!renderer->layoutDidGetCalled()) { | 1064 if (renderer->shouldDoFullRepaintAfterLayout()) { |
1065 if (renderer->shouldDoFullRepaintAfterLayout()) { | 1065 renderer->repaint(); |
1066 renderer->repaint(); | 1066 didFullRepaint = true; |
1067 didFullRepaint = true; | 1067 } |
1068 } | |
1069 | 1068 |
1070 } else { | 1069 } else { |
1071 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->
containerForRepaint(), | 1070 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->cont
ainerForRepaint(), |
1072 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect,
oldOutlineRect, | 1071 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldO
utlineRect, |
1073 &newRepaintRect, &newOutlineRect); | 1072 &newRepaintRect, &newOutlineRect); |
1074 } | |
1075 } | 1073 } |
1076 | 1074 |
1077 if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded()) | 1075 if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded()) |
1078 renderer->repaintOverflow(); | 1076 renderer->repaintOverflow(); |
1079 | 1077 |
1080 // Repaint any scrollbars if there is a scrollable area for this rendere
r. | 1078 // Repaint any scrollbars if there is a scrollable area for this rendere
r. |
1081 if (renderer->enclosingLayer()) { | 1079 if (renderer->enclosingLayer()) { |
1082 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc
rollableArea()) { | 1080 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc
rollableArea()) { |
1083 if (area->hasVerticalBarDamage()) | 1081 if (area->hasVerticalBarDamage()) |
1084 renderer->repaintRectangle(area->verticalBarDamage()); | 1082 renderer->repaintRectangle(area->verticalBarDamage()); |
1085 if (area->hasHorizontalBarDamage()) | 1083 if (area->hasHorizontalBarDamage()) |
1086 renderer->repaintRectangle(area->horizontalBarDamage()); | 1084 renderer->repaintRectangle(area->horizontalBarDamage()); |
1087 area->resetScrollbarDamage(); | 1085 area->resetScrollbarDamage(); |
1088 } | 1086 } |
1089 } | 1087 } |
1090 // The list box has a verticalScrollbar we may need to repaint. | 1088 // The list box has a verticalScrollbar we may need to repaint. |
1091 if (renderer->isListBox()) { | 1089 if (renderer->isListBox()) { |
1092 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); | 1090 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); |
1093 listBox->repaintScrollbarIfNeeded(); | 1091 listBox->repaintScrollbarIfNeeded(); |
1094 } | 1092 } |
1095 | 1093 |
1096 renderer->clearRepaintRects(); | 1094 renderer->clearRepaintState(); |
1097 } | 1095 } |
1098 renderView()->setOldMaximalOutlineSize(0); | 1096 renderView()->setOldMaximalOutlineSize(0); |
1099 | 1097 |
1100 // Repaint the frameviews scrollbars if needed | 1098 // Repaint the frameviews scrollbars if needed |
1101 if (hasVerticalBarDamage()) | 1099 if (hasVerticalBarDamage()) |
1102 invalidateRect(verticalBarDamage()); | 1100 invalidateRect(verticalBarDamage()); |
1103 if (hasHorizontalBarDamage()) | 1101 if (hasHorizontalBarDamage()) |
1104 invalidateRect(horizontalBarDamage()); | 1102 invalidateRect(horizontalBarDamage()); |
1105 resetScrollbarDamage(); | 1103 resetScrollbarDamage(); |
1106 } | 1104 } |
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3191 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3189 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3192 { | 3190 { |
3193 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3191 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3194 if (AXObjectCache* cache = axObjectCache()) { | 3192 if (AXObjectCache* cache = axObjectCache()) { |
3195 cache->remove(scrollbar); | 3193 cache->remove(scrollbar); |
3196 cache->handleScrollbarUpdate(this); | 3194 cache->handleScrollbarUpdate(this); |
3197 } | 3195 } |
3198 } | 3196 } |
3199 | 3197 |
3200 } // namespace WebCore | 3198 } // namespace WebCore |
OLD | NEW |