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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1065 // Until those states are fully fledged, I'll just disable the ASSERTS. | 1065 // Until those states are fully fledged, I'll just disable the ASSERTS. |
1066 DisableCompositingQueryAsserts disabler; | 1066 DisableCompositingQueryAsserts disabler; |
1067 | 1067 |
1068 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) { | 1068 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) { |
1069 // The repaint rectangles stored on the RenderObjects should all match | 1069 // The repaint rectangles stored on the RenderObjects should all match |
1070 // the current repaint rectangles for the renderers. | 1070 // the current repaint rectangles for the renderers. |
1071 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep aint()) == renderer->newRepaintRect()); | 1071 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep aint()) == renderer->newRepaintRect()); |
1072 | 1072 |
1073 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); | 1073 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); |
1074 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); | 1074 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); |
1075 LayoutRect oldOutlineRect; | |
1076 LayoutRect newOutlineRect; | |
1075 | 1077 |
1076 LayoutRect oldOutlineRect = oldRepaintRect; | 1078 if (renderer->hasOutline()) { |
1077 oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize()); | 1079 newOutlineRect = renderer->newOutlineRect(); |
1080 oldOutlineRect = renderer->oldOutlineRect(); | |
1081 } | |
Julien - ping for review
2014/03/07 18:26:38
Shouldn't we compute these only in the branch wher
dsinclair
2014/03/07 19:29:48
Done.
| |
1078 | 1082 |
1079 LayoutRect newOutlineRect = newRepaintRect; | 1083 if ((renderer->shouldDoFullRepaintIfNotComposited() && renderer->composi tingState() != PaintsIntoOwnBacking) |
1080 newOutlineRect.inflate(renderView()->maximalOutlineSize()); | 1084 || (renderer->shouldDoFullRepaintIfSelfPaintingLayer() |
1085 && renderer->hasLayer() | |
1086 && toRenderLayerModelObject(renderer)->layer()->isSelfPaintingLa yer())) { | |
1087 renderer->setShouldDoFullRepaintAfterLayout(true); | |
1088 } | |
1081 | 1089 |
1082 // FIXME: Currently renderers with layers will get repainted when we cal l updateLayerPositionsAfterLayout. | 1090 // FIXME: Currently renderers with layers will get repainted when we cal l updateLayerPositionsAfterLayout. |
1083 // That call should be broken apart to position the layers be done befor e | 1091 // That call should be broken apart to position the layers be done befor e |
1084 // the repaintTree call so this will repaint everything. | 1092 // the repaintTree call so this will repaint everything. |
1085 bool didFullRepaint = false; | 1093 bool didFullRepaint = false; |
1086 if (!renderer->hasLayer()) { | 1094 if (!renderer->layoutDidGetCalled()) { |
1087 if (!renderer->layoutDidGetCalled()) { | 1095 if (renderer->shouldDoFullRepaintAfterLayout()) { |
1088 if (renderer->shouldDoFullRepaintAfterLayout()) { | 1096 renderer->repaint(); |
1089 renderer->repaint(); | 1097 didFullRepaint = true; |
1090 didFullRepaint = true; | 1098 } |
1091 } | |
1092 | 1099 |
1093 } else { | 1100 } else { |
1094 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer-> containerForRepaint(), | 1101 didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->cont ainerForRepaint(), |
1095 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldOutlineRect, | 1102 renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldO utlineRect, |
1096 &newRepaintRect, &newOutlineRect); | 1103 &newRepaintRect, &newOutlineRect); |
1097 } | |
1098 } | 1104 } |
1099 | 1105 |
1100 if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded()) | 1106 if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded()) |
1101 renderer->repaintOverflow(); | 1107 renderer->repaintOverflow(); |
1102 | 1108 |
1103 // Repaint any scrollbars if there is a scrollable area for this rendere r. | 1109 // Repaint any scrollbars if there is a scrollable area for this rendere r. |
1104 if (renderer->enclosingLayer()) { | 1110 if (renderer->enclosingLayer()) { |
1105 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc rollableArea()) { | 1111 if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->sc rollableArea()) { |
1106 if (area->hasVerticalBarDamage()) | 1112 if (area->hasVerticalBarDamage()) |
1107 renderer->repaintRectangle(area->verticalBarDamage()); | 1113 renderer->repaintRectangle(area->verticalBarDamage()); |
1108 if (area->hasHorizontalBarDamage()) | 1114 if (area->hasHorizontalBarDamage()) |
1109 renderer->repaintRectangle(area->horizontalBarDamage()); | 1115 renderer->repaintRectangle(area->horizontalBarDamage()); |
1110 area->resetScrollbarDamage(); | 1116 area->resetScrollbarDamage(); |
1111 } | 1117 } |
1112 } | 1118 } |
1113 // The list box has a verticalScrollbar we may need to repaint. | 1119 // The list box has a verticalScrollbar we may need to repaint. |
1114 if (renderer->isListBox()) { | 1120 if (renderer->isListBox()) { |
1115 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); | 1121 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); |
1116 listBox->repaintScrollbarIfNeeded(); | 1122 listBox->repaintScrollbarIfNeeded(); |
1117 } | 1123 } |
1118 | 1124 |
1119 renderer->clearRepaintRects(); | 1125 renderer->clearRepaintState(); |
1120 } | 1126 } |
1121 renderView()->setOldMaximalOutlineSize(0); | 1127 renderView()->setOldMaximalOutlineSize(0); |
1122 | 1128 |
1123 // Repaint the frameviews scrollbars if needed | 1129 // Repaint the frameviews scrollbars if needed |
1124 if (hasVerticalBarDamage()) | 1130 if (hasVerticalBarDamage()) |
1125 invalidateRect(verticalBarDamage()); | 1131 invalidateRect(verticalBarDamage()); |
1126 if (hasHorizontalBarDamage()) | 1132 if (hasHorizontalBarDamage()) |
1127 invalidateRect(horizontalBarDamage()); | 1133 invalidateRect(horizontalBarDamage()); |
1128 resetScrollbarDamage(); | 1134 resetScrollbarDamage(); |
1129 } | 1135 } |
(...skipping 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3193 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) | 3199 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) |
3194 { | 3200 { |
3195 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3201 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3196 if (AXObjectCache* cache = axObjectCache()) { | 3202 if (AXObjectCache* cache = axObjectCache()) { |
3197 cache->remove(scrollbar); | 3203 cache->remove(scrollbar); |
3198 cache->handleScrollbarUpdate(this); | 3204 cache->handleScrollbarUpdate(this); |
3199 } | 3205 } |
3200 } | 3206 } |
3201 | 3207 |
3202 } // namespace WebCore | 3208 } // namespace WebCore |
OLD | NEW |