OLD | NEW |
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 static RuntimeEnabledFeatures::Backup* sFeaturesBackup = nullptr; | 202 static RuntimeEnabledFeatures::Backup* sFeaturesBackup = nullptr; |
203 | 203 |
204 void Internals::resetToConsistentState(Page* page) | 204 void Internals::resetToConsistentState(Page* page) |
205 { | 205 { |
206 ASSERT(page); | 206 ASSERT(page); |
207 | 207 |
208 if (!sFeaturesBackup) | 208 if (!sFeaturesBackup) |
209 sFeaturesBackup = new RuntimeEnabledFeatures::Backup; | 209 sFeaturesBackup = new RuntimeEnabledFeatures::Backup; |
210 sFeaturesBackup->restore(); | 210 sFeaturesBackup->restore(); |
211 page->setDeviceScaleFactor(1); | |
212 page->setIsCursorVisible(true); | 211 page->setIsCursorVisible(true); |
213 page->setPageScaleFactor(1); | 212 page->setPageScaleFactor(1); |
214 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se
tScrollPosition(IntPoint(0, 0), ProgrammaticScroll); | 213 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se
tScrollPosition(IntPoint(0, 0), ProgrammaticScroll); |
215 overrideUserPreferredLanguages(Vector<AtomicString>()); | 214 overrideUserPreferredLanguages(Vector<AtomicString>()); |
216 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck
ingEnabled()) | 215 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck
ingEnabled()) |
217 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh
ecking(); | 216 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh
ecking(); |
218 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled()) | 217 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled()) |
219 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); | 218 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); |
220 | 219 |
221 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) | 220 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) |
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); | 2556 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); |
2558 } | 2557 } |
2559 | 2558 |
2560 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 2559 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
2561 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) | 2560 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) |
2562 { | 2561 { |
2563 element->triggerAutoplayViewportCheckForTesting(); | 2562 element->triggerAutoplayViewportCheckForTesting(); |
2564 } | 2563 } |
2565 | 2564 |
2566 } // namespace blink | 2565 } // namespace blink |
OLD | NEW |