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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 1277583003: Restore scale even if scroll is not restored (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use window.scroll{X,y} Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/core/page/Page.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 Internals::~Internals() 203 Internals::~Internals()
204 { 204 {
205 } 205 }
206 206
207 void Internals::resetToConsistentState(Page* page) 207 void Internals::resetToConsistentState(Page* page)
208 { 208 {
209 ASSERT(page); 209 ASSERT(page);
210 210
211 page->setDeviceScaleFactor(1); 211 page->setDeviceScaleFactor(1);
212 page->setIsCursorVisible(true); 212 page->setIsCursorVisible(true);
213 page->setPageScaleFactor(1, IntPoint(0, 0)); 213 page->setPageScaleFactor(1);
214 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se tScrollPosition(IntPoint(0, 0), ProgrammaticScroll);
214 overrideUserPreferredLanguages(Vector<AtomicString>()); 215 overrideUserPreferredLanguages(Vector<AtomicString>());
215 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck ingEnabled()) 216 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck ingEnabled())
216 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh ecking(); 217 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh ecking();
217 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled()) 218 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled())
218 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); 219 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled();
219 220
220 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( )) 221 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( ))
221 scrollingCoordinator->reset(); 222 scrollingCoordinator->reset();
222 223
223 page->deprecatedLocalMainFrame()->view()->clear(); 224 page->deprecatedLocalMainFrame()->view()->clear();
(...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 2482
2482 return animator->setScrollbarsVisibleForTesting(visible); 2483 return animator->setScrollbarsVisibleForTesting(visible);
2483 } 2484 }
2484 2485
2485 void Internals::forceRestrictIFramePermissions() 2486 void Internals::forceRestrictIFramePermissions()
2486 { 2487 {
2487 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); 2488 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true);
2488 } 2489 }
2489 2490
2490 } // namespace blink 2491 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698