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()); |