Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 176953008: Include the outline into the visual overflow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 RefPtr<FrameView> protector(this); 854 RefPtr<FrameView> protector(this);
855 855
856 // Every scroll that happens during layout is programmatic. 856 // Every scroll that happens during layout is programmatic.
857 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); 857 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e);
858 858
859 m_hasPendingLayout = false; 859 m_hasPendingLayout = false;
860 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Layo utClean); 860 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Layo utClean);
861 861
862 RELEASE_ASSERT(!isPainting()); 862 RELEASE_ASSERT(!isPainting());
863 863
864 // Store the current maximal outline size to use when computing the old/new
865 // outline rects for repainting.
866 renderView()->setOldMaximalOutlineSize(renderView()->maximalOutlineSize());
867
868 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout (m_frame.get()); 864 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout (m_frame.get());
869 865
870 if (!allowSubtree && isSubtreeLayout()) { 866 if (!allowSubtree && isSubtreeLayout()) {
871 m_layoutSubtreeRoot->markContainingBlocksForLayout(false); 867 m_layoutSubtreeRoot->markContainingBlocksForLayout(false);
872 m_layoutSubtreeRoot = 0; 868 m_layoutSubtreeRoot = 0;
873 } 869 }
874 870
875 performPreLayoutTasks(); 871 performPreLayoutTasks();
876 872
877 // If there is only one ref to this view left, then its going to be destroye d as soon as we exit, 873 // If there is only one ref to this view left, then its going to be destroye d as soon as we exit,
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 1050
1055 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) { 1051 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) {
1056 // The repaint rectangles stored on the RenderObjects should all match 1052 // The repaint rectangles stored on the RenderObjects should all match
1057 // the current repaint rectangles for the renderers. 1053 // the current repaint rectangles for the renderers.
1058 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep aint()) == renderer->newRepaintRect()); 1054 ASSERT(renderer->clippedOverflowRectForRepaint(renderer->containerForRep aint()) == renderer->newRepaintRect());
1059 1055
1060 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); 1056 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect();
1061 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); 1057 const LayoutRect& newRepaintRect = renderer->newRepaintRect();
1062 1058
1063 LayoutRect oldOutlineRect = oldRepaintRect; 1059 LayoutRect oldOutlineRect = oldRepaintRect;
1064 oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize());
1065 1060
1066 LayoutRect newOutlineRect = newRepaintRect; 1061 LayoutRect newOutlineRect = newRepaintRect;
1067 newOutlineRect.inflate(renderView()->maximalOutlineSize());
1068 1062
1069 // FIXME: Currently renderers with layers will get repainted when we cal l updateLayerPositionsAfterLayout. 1063 // 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 1064 // That call should be broken apart to position the layers be done befor e
1071 // the repaintTree call so this will repaint everything. 1065 // the repaintTree call so this will repaint everything.
1072 bool didFullRepaint = false; 1066 bool didFullRepaint = false;
1073 if (!renderer->hasLayer()) { 1067 if (!renderer->hasLayer()) {
1074 if (!renderer->layoutDidGetCalled()) { 1068 if (!renderer->layoutDidGetCalled()) {
1075 if (renderer->shouldDoFullRepaintAfterLayout()) { 1069 if (renderer->shouldDoFullRepaintAfterLayout()) {
1076 renderer->repaint(); 1070 renderer->repaint();
1077 didFullRepaint = true; 1071 didFullRepaint = true;
(...skipping 20 matching lines...) Expand all
1098 } 1092 }
1099 } 1093 }
1100 // The list box has a verticalScrollbar we may need to repaint. 1094 // The list box has a verticalScrollbar we may need to repaint.
1101 if (renderer->isListBox()) { 1095 if (renderer->isListBox()) {
1102 RenderListBox* listBox = static_cast<RenderListBox*>(renderer); 1096 RenderListBox* listBox = static_cast<RenderListBox*>(renderer);
1103 listBox->repaintScrollbarIfNeeded(); 1097 listBox->repaintScrollbarIfNeeded();
1104 } 1098 }
1105 1099
1106 renderer->clearRepaintRects(); 1100 renderer->clearRepaintRects();
1107 } 1101 }
1108 renderView()->setOldMaximalOutlineSize(0);
1109 1102
1110 // Repaint the frameviews scrollbars if needed 1103 // Repaint the frameviews scrollbars if needed
1111 if (hasVerticalBarDamage()) 1104 if (hasVerticalBarDamage())
1112 invalidateRect(verticalBarDamage()); 1105 invalidateRect(verticalBarDamage());
1113 if (hasHorizontalBarDamage()) 1106 if (hasHorizontalBarDamage())
1114 invalidateRect(horizontalBarDamage()); 1107 invalidateRect(horizontalBarDamage());
1115 resetScrollbarDamage(); 1108 resetScrollbarDamage();
1116 } 1109 }
1117 1110
1118 DocumentLifecycle& FrameView::lifecycle() const 1111 DocumentLifecycle& FrameView::lifecycle() const
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
3180 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3173 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3181 { 3174 {
3182 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3175 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3183 if (AXObjectCache* cache = axObjectCache()) { 3176 if (AXObjectCache* cache = axObjectCache()) {
3184 cache->remove(scrollbar); 3177 cache->remove(scrollbar);
3185 cache->handleScrollbarUpdate(this); 3178 cache->handleScrollbarUpdate(this);
3186 } 3179 }
3187 } 3180 }
3188 3181
3189 } // namespace WebCore 3182 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/InlineFlowBox.h » ('j') | Source/core/rendering/InlineFlowBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698