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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 215843002: Dispel the myth that enclosingLayer can return zero (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/MouseRelatedEvent.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 3a1ec6409f82112ae332983736e9b0e71a77c387..6cbec00921c0e759bcc6b3d4958b842a1b5a2238 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1067,15 +1067,14 @@ void FrameView::repaintTree(RenderObject* root)
renderer->repaintOverflowIfNeeded();
// Repaint any scrollbars if there is a scrollable area for this renderer.
- if (renderer->enclosingLayer()) {
- if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->scrollableArea()) {
- if (area->hasVerticalBarDamage())
- renderer->repaintRectangle(area->verticalBarDamage());
- if (area->hasHorizontalBarDamage())
- renderer->repaintRectangle(area->horizontalBarDamage());
- area->resetScrollbarDamage();
- }
+ if (RenderLayerScrollableArea* area = renderer->enclosingLayer()->scrollableArea()) {
+ if (area->hasVerticalBarDamage())
+ renderer->repaintRectangle(area->verticalBarDamage());
+ if (area->hasHorizontalBarDamage())
+ renderer->repaintRectangle(area->horizontalBarDamage());
+ area->resetScrollbarDamage();
}
+
// The list box has a verticalScrollbar we may need to repaint.
if (renderer->isListBox()) {
RenderListBox* listBox = static_cast<RenderListBox*>(renderer);
« no previous file with comments | « Source/core/events/MouseRelatedEvent.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698