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

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

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased upto r183571 Created 6 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/frame/FrameViewAutoSizeInfo.cpp
diff --git a/Source/core/frame/FrameViewAutoSizeInfo.cpp b/Source/core/frame/FrameViewAutoSizeInfo.cpp
index 1dbd577e1a6c961335b0e7671e7c9bf1f295c75e..f94f494561e6e35340edb2dccea91135b72b8f3c 100644
--- a/Source/core/frame/FrameViewAutoSizeInfo.cpp
+++ b/Source/core/frame/FrameViewAutoSizeInfo.cpp
@@ -20,9 +20,11 @@ FrameViewAutoSizeInfo::FrameViewAutoSizeInfo(FrameView* view)
ASSERT(m_frameView);
}
-FrameViewAutoSizeInfo::~FrameViewAutoSizeInfo()
+DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameViewAutoSizeInfo);
+
+void FrameViewAutoSizeInfo::trace(Visitor* visitor)
{
- removeAutoSizeMode();
+ visitor->trace(m_frameView);
}
void FrameViewAutoSizeInfo::configureAutoSizeMode(const IntSize& minSize, const IntSize& maxSize)
@@ -37,22 +39,6 @@ void FrameViewAutoSizeInfo::configureAutoSizeMode(const IntSize& minSize, const
m_minAutoSize = minSize;
m_maxAutoSize = maxSize;
m_didRunAutosize = false;
-
- m_frameView->setLayoutSizeFixedToFrameSize(true);
- m_frameView->setNeedsLayout();
- m_frameView->scheduleRelayout();
-}
-
-void FrameViewAutoSizeInfo::removeAutoSizeMode()
-{
- m_frameView->setLayoutSizeFixedToFrameSize(false);
- m_frameView->setNeedsLayout();
- m_frameView->scheduleRelayout();
-
- // Since autosize mode forces the scrollbar mode, change them to being auto.
- m_frameView->setVerticalScrollbarLock(false);
- m_frameView->setHorizontalScrollbarLock(false);
- m_frameView->setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
}
void FrameViewAutoSizeInfo::autoSizeIfNeeded()
@@ -101,7 +87,7 @@ void FrameViewAutoSizeInfo::autoSizeIfNeeded()
// Since the dimensions are only for the view rectangle, once a
// dimension exceeds the maximum, there is no need to increase it further.
if (newSize.width() > m_maxAutoSize.width()) {
- RefPtr<Scrollbar> localHorizontalScrollbar = m_frameView->horizontalScrollbar();
+ RefPtrWillBeRawPtr<Scrollbar> localHorizontalScrollbar = m_frameView->horizontalScrollbar();
if (!localHorizontalScrollbar)
localHorizontalScrollbar = m_frameView->createScrollbar(HorizontalScrollbar);
if (!localHorizontalScrollbar->isOverlayScrollbar())
@@ -110,7 +96,7 @@ void FrameViewAutoSizeInfo::autoSizeIfNeeded()
// Don't bother checking for a vertical scrollbar because the width is at
// already greater the maximum.
} else if (newSize.height() > m_maxAutoSize.height()) {
- RefPtr<Scrollbar> localVerticalScrollbar = m_frameView->verticalScrollbar();
+ RefPtrWillBeRawPtr<Scrollbar> localVerticalScrollbar = m_frameView->verticalScrollbar();
if (!localVerticalScrollbar)
localVerticalScrollbar = m_frameView->createScrollbar(VerticalScrollbar);
if (!localVerticalScrollbar->isOverlayScrollbar())

Powered by Google App Engine
This is Rietveld 408576698