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

Unified Diff: Source/core/testing/Internals.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Android/Mac fixes Created 6 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
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 760ec5fb3ca694f8408889b177226aedc70fcbfa..982422b1606fd7d2aa2d59805eeb42642a8603cb 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -191,15 +191,15 @@ void Internals::resetToConsistentState(Page* page)
delete s_pagePopupDriver;
s_pagePopupDriver = 0;
page->chrome().client().resetPagePopupDriver();
- if (!page->mainFrame()->spellChecker().isContinuousSpellCheckingEnabled())
- page->mainFrame()->spellChecker().toggleContinuousSpellChecking();
- if (page->mainFrame()->editor().isOverwriteModeEnabled())
- page->mainFrame()->editor().toggleOverwriteModeEnabled();
+ if (!toLocalFrame(page->mainFrame())->spellChecker().isContinuousSpellCheckingEnabled())
+ toLocalFrame(page->mainFrame())->spellChecker().toggleContinuousSpellChecking();
+ if (toLocalFrame(page->mainFrame())->editor().isOverwriteModeEnabled())
+ toLocalFrame(page->mainFrame())->editor().toggleOverwriteModeEnabled();
if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
scrollingCoordinator->reset();
- page->mainFrame()->view()->clear();
+ toLocalFrame(page->mainFrame())->view()->clear();
}
Internals::Internals(Document* document)
@@ -728,7 +728,7 @@ void Internals::setEnableMockPagePopup(bool enabled, ExceptionState& exceptionSt
return;
}
if (!s_pagePopupDriver)
- s_pagePopupDriver = MockPagePopupDriver::create(page->mainFrame()).leakPtr();
+ s_pagePopupDriver = MockPagePopupDriver::create(toLocalFrame(page->mainFrame())).leakPtr();
page->chrome().client().setPagePopupDriver(s_pagePopupDriver);
}
@@ -899,7 +899,7 @@ String Internals::viewportAsText(Document* document, float, int availableWidth,
// Update initial viewport size.
IntSize initialViewportSize(availableWidth, availableHeight);
- document->page()->mainFrame()->view()->setFrameRect(IntRect(IntPoint::zero(), initialViewportSize));
+ toLocalFrame(document->page()->mainFrame())->view()->setFrameRect(IntRect(IntPoint::zero(), initialViewportSize));
ViewportDescription description = page->viewportDescription();
PageScaleConstraints constraints = description.resolve(initialViewportSize, Length());

Powered by Google App Engine
This is Rietveld 408576698