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

Unified Diff: Source/core/rendering/RenderWidget.cpp

Issue 26936002: Remove Widget's dependency upon its own inheritor aka ScrollView. This was nasty from an OO design… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Fix for clang compile error Created 7 years, 2 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
Index: Source/core/rendering/RenderWidget.cpp
diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp
index e501f7d46b21a17fd93f4db6b36d6eebcd4e109d..8bd1a9e045baec053f2f2352dcb44f1b31ce6e46 100644
--- a/Source/core/rendering/RenderWidget.cpp
+++ b/Source/core/rendering/RenderWidget.cpp
@@ -60,7 +60,7 @@ RenderWidget::UpdateSuspendScope::~UpdateSuspendScope()
WidgetToParentMap::iterator end = map.end();
for (WidgetToParentMap::iterator it = map.begin(); it != end; ++it) {
Widget* child = it->key.get();
- ScrollView* currentParent = child->parent();
+ ScrollView* currentParent = toScrollView(child->parent());
FrameView* newParent = it->value;
if (newParent != currentParent) {
if (currentParent)
@@ -79,7 +79,7 @@ static void moveWidgetToParentSoon(Widget* child, FrameView* parent)
if (parent)
parent->addChild(child);
else
- child->removeFromParent();
+ toScrollView(child->parent())->removeChild(child);
return;
}
widgetNewParentMap().set(child, parent);
« no previous file with comments | « Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.cpp ('k') | Source/platform/scroll/ScrollbarThemeClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698