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

Unified Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 6 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/paint/DeprecatedPaintLayer.h ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DeprecatedPaintLayer.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp
index a7f62fdf05878ef7e08871febc7ff75416491108..23f7f0a4238f480245b4c620d8f8344caf2a6137 100644
--- a/Source/core/paint/DeprecatedPaintLayer.cpp
+++ b/Source/core/paint/DeprecatedPaintLayer.cpp
@@ -171,6 +171,9 @@ DeprecatedPaintLayer::~DeprecatedPaintLayer()
if (m_reflectionInfo)
m_reflectionInfo->destroy();
+
+ if (m_scrollableArea)
+ m_scrollableArea->dispose();
}
String DeprecatedPaintLayer::debugName() const
@@ -1433,18 +1436,16 @@ void DeprecatedPaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle)
void DeprecatedPaintLayer::updateStackingNode()
{
+ ASSERT(!m_stackingNode);
if (requiresStackingNode())
m_stackingNode = adoptPtr(new DeprecatedPaintLayerStackingNode(*layoutObject()));
- else
- m_stackingNode = nullptr;
}
void DeprecatedPaintLayer::updateScrollableArea()
{
+ ASSERT(!m_scrollableArea);
if (requiresScrollableArea())
- m_scrollableArea = adoptPtr(new DeprecatedPaintLayerScrollableArea(*this));
- else
- m_scrollableArea = nullptr;
+ m_scrollableArea = DeprecatedPaintLayerScrollableArea::create(*this);
}
bool DeprecatedPaintLayer::hasOverflowControls() const
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayer.h ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698