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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 DisableCompositingQueryAsserts disabler; | 1043 DisableCompositingQueryAsserts disabler; |
1044 | 1044 |
1045 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre
Order()) { | 1045 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre
Order()) { |
1046 // The repaint rectangles stored on the RenderObjects should all match | 1046 // The repaint rectangles stored on the RenderObjects should all match |
1047 // the current repaint rectangles for the renderers. | 1047 // the current repaint rectangles for the renderers. |
1048 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep
aint()) == renderer->newRepaintRect()); | 1048 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep
aint()) == renderer->newRepaintRect()); |
1049 | 1049 |
1050 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); | 1050 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); |
1051 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); | 1051 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); |
1052 | 1052 |
1053 LayoutRect oldOutlineRect = oldRepaintRect; | 1053 if ((renderer->onlyNeededPositionedMovementLayout() && renderer->composi
tingState() != PaintsIntoOwnBacking) |
1054 | 1054 || (renderer->shouldDoFullRepaintIfSelfPaintingLayer() |
1055 LayoutRect newOutlineRect = newRepaintRect; | 1055 && renderer->hasLayer() |
| 1056 && toRenderLayerModelObject(renderer)->layer()->isSelfPaintingLa
yer())) { |
| 1057 renderer->setShouldDoFullRepaintAfterLayout(true); |
| 1058 } |
1056 | 1059 |
1057 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. | 1060 // FIXME: Currently renderers with layers will get repainted when we cal
l updateLayerPositionsAfterLayout. |
1058 // That call should be broken apart to position the layers be done befor
e | 1061 // That call should be broken apart to position the layers be done befor
e |
1059 // the repaintTree call so this will repaint everything. | 1062 // the repaintTree call so this will repaint everything. |
1060 bool didFullRepaint = false; | 1063 bool didFullRepaint = false; |
1061 if (!renderer->hasLayer()) { | 1064 if (!renderer->layoutDidGetCalled()) { |
1062 if (!renderer->layoutDidGetCalled()) { | 1065 if (renderer->shouldDoFullRepaintAfterLayout()) { |
1063 if (renderer->shouldDoFullRepaintAfterLayout()) { | 1066 renderer->repaint(); |
1064 renderer->repaint(); | 1067 didFullRepaint = true; |
1065 didFullRepaint = true; | 1068 } |
1066 } | |
1067 | 1069 |
1068 } else { | 1070 } else { |
1069 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->
containerForRepaint(), | 1071 LayoutRect oldOutlineRect; |
1070 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect,
oldOutlineRect, | 1072 LayoutRect newOutlineRect; |
1071 &newRepaintRect, &newOutlineRect); | 1073 |
| 1074 if (renderer->hasOutline()) { |
| 1075 newOutlineRect = renderer->newOutlineRect(); |
| 1076 oldOutlineRect = renderer->oldOutlineRect(); |
1072 } | 1077 } |
| 1078 |
| 1079 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->cont
ainerForRepaint(), |
| 1080 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldO
utlineRect, |
| 1081 &newRepaintRect, &newOutlineRect); |
1073 } | 1082 } |
1074 | 1083 |
1075 if (!didFullRepaint) | 1084 if (!didFullRepaint) |
1076 renderer->repaintOverflowIfNeeded(); | 1085 renderer->repaintOverflowIfNeeded(); |
1077 | 1086 |
1078 // Repaint any scrollbars if there is a scrollable area for this rendere
r. | 1087 // Repaint any scrollbars if there is a scrollable area for this rendere
r. |
1079 if (renderer->enclosingLayer()) { | 1088 if (renderer->enclosingLayer()) { |
1080 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc
rollableArea()) { | 1089 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc
rollableArea()) { |
1081 if (area->hasVerticalBarDamage()) | 1090 if (area->hasVerticalBarDamage()) |
1082 renderer->repaintRectangle(area->verticalBarDamage()); | 1091 renderer->repaintRectangle(area->verticalBarDamage()); |
1083 if (area->hasHorizontalBarDamage()) | 1092 if (area->hasHorizontalBarDamage()) |
1084 renderer->repaintRectangle(area->horizontalBarDamage()); | 1093 renderer->repaintRectangle(area->horizontalBarDamage()); |
1085 area->resetScrollbarDamage(); | 1094 area->resetScrollbarDamage(); |
1086 } | 1095 } |
1087 } | 1096 } |
1088 // The list box has a verticalScrollbar we may need to repaint. | 1097 // The list box has a verticalScrollbar we may need to repaint. |
1089 if (renderer->isListBox()) { | 1098 if (renderer->isListBox()) { |
1090 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); | 1099 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); |
1091 listBox->repaintScrollbarIfNeeded(); | 1100 listBox->repaintScrollbarIfNeeded(); |
1092 } | 1101 } |
1093 | 1102 |
1094 renderer->clearRepaintRects(); | 1103 renderer->clearRepaintState(); |
1095 } | 1104 } |
1096 | 1105 |
1097 // Repaint the frameviews scrollbars if needed | 1106 // Repaint the frameviews scrollbars if needed |
1098 if (hasVerticalBarDamage()) | 1107 if (hasVerticalBarDamage()) |
1099 invalidateRect(verticalBarDamage()); | 1108 invalidateRect(verticalBarDamage()); |
1100 if (hasHorizontalBarDamage()) | 1109 if (hasHorizontalBarDamage()) |
1101 invalidateRect(horizontalBarDamage()); | 1110 invalidateRect(horizontalBarDamage()); |
1102 resetScrollbarDamage(); | 1111 resetScrollbarDamage(); |
1103 } | 1112 } |
1104 | 1113 |
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3208 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3217 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3209 { | 3218 { |
3210 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3219 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3211 if (AXObjectCache* cache = axObjectCache()) { | 3220 if (AXObjectCache* cache = axObjectCache()) { |
3212 cache->remove(scrollbar); | 3221 cache->remove(scrollbar); |
3213 cache->handleScrollbarUpdate(this); | 3222 cache->handleScrollbarUpdate(this); |
3214 } | 3223 } |
3215 } | 3224 } |
3216 | 3225 |
3217 } // namespace WebCore | 3226 } // namespace WebCore |
OLD | NEW |