| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 void Internals::resetToConsistentState(Page* page) | 190 void Internals::resetToConsistentState(Page* page) |
| 191 { | 191 { |
| 192 ASSERT(page); | 192 ASSERT(page); |
| 193 | 193 |
| 194 page->setDeviceScaleFactor(1); | 194 page->setDeviceScaleFactor(1); |
| 195 page->setIsCursorVisible(true); | 195 page->setIsCursorVisible(true); |
| 196 page->setPageScaleFactor(1, IntPoint(0, 0)); | 196 page->setPageScaleFactor(1, IntPoint(0, 0)); |
| 197 page->setPagination(Pagination()); | 197 page->setPagination(Pagination()); |
| 198 TextRun::setAllowsRoundingHacks(false); | 198 TextRun::setAllowsRoundingHacks(false); |
| 199 WebCore::overrideUserPreferredLanguages(Vector<String>()); | 199 WebCore::overrideUserPreferredLanguages(Vector<AtomicString>()); |
| 200 delete s_pagePopupDriver; | 200 delete s_pagePopupDriver; |
| 201 s_pagePopupDriver = 0; | 201 s_pagePopupDriver = 0; |
| 202 page->chrome().client().resetPagePopupDriver(); | 202 page->chrome().client().resetPagePopupDriver(); |
| 203 if (!page->mainFrame()->spellChecker().isContinuousSpellCheckingEnabled()) | 203 if (!page->mainFrame()->spellChecker().isContinuousSpellCheckingEnabled()) |
| 204 page->mainFrame()->spellChecker().toggleContinuousSpellChecking(); | 204 page->mainFrame()->spellChecker().toggleContinuousSpellChecking(); |
| 205 if (page->mainFrame()->editor().isOverwriteModeEnabled()) | 205 if (page->mainFrame()->editor().isOverwriteModeEnabled()) |
| 206 page->mainFrame()->editor().toggleOverwriteModeEnabled(); | 206 page->mainFrame()->editor().toggleOverwriteModeEnabled(); |
| 207 | 207 |
| 208 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) | 208 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) |
| 209 scrollingCoordinator->reset(); | 209 scrollingCoordinator->reset(); |
| (...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 SpellCheckRequester* requester = spellCheckRequester(document); | 1252 SpellCheckRequester* requester = spellCheckRequester(document); |
| 1253 | 1253 |
| 1254 if (!requester) { | 1254 if (!requester) { |
| 1255 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 1255 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 1256 return -1; | 1256 return -1; |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 return requester->lastProcessedSequence(); | 1259 return requester->lastProcessedSequence(); |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 Vector<String> Internals::userPreferredLanguages() const | 1262 Vector<AtomicString> Internals::userPreferredLanguages() const |
| 1263 { | 1263 { |
| 1264 return WebCore::userPreferredLanguages(); | 1264 return WebCore::userPreferredLanguages(); |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 // Optimally, the bindings generator would pass a Vector<AtomicString> here but |
| 1268 // this is not supported yet. |
| 1267 void Internals::setUserPreferredLanguages(const Vector<String>& languages) | 1269 void Internals::setUserPreferredLanguages(const Vector<String>& languages) |
| 1268 { | 1270 { |
| 1269 WebCore::overrideUserPreferredLanguages(languages); | 1271 Vector<AtomicString> atomicLanguages; |
| 1272 for (size_t i = 0; i < languages.size(); ++i) |
| 1273 atomicLanguages.append(AtomicString(languages[i])); |
| 1274 WebCore::overrideUserPreferredLanguages(atomicLanguages); |
| 1270 } | 1275 } |
| 1271 | 1276 |
| 1272 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e
xceptionState) | 1277 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e
xceptionState) |
| 1273 { | 1278 { |
| 1274 if (!document) { | 1279 if (!document) { |
| 1275 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 1280 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 1276 return 0; | 1281 return 0; |
| 1277 } | 1282 } |
| 1278 | 1283 |
| 1279 return WheelController::from(document)->wheelEventHandlerCount(); | 1284 return WheelController::from(document)->wheelEventHandlerCount(); |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 if (view->compositor()) | 2325 if (view->compositor()) |
| 2321 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); | 2326 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
| 2322 } | 2327 } |
| 2323 | 2328 |
| 2324 void Internals::setZoomFactor(float factor) | 2329 void Internals::setZoomFactor(float factor) |
| 2325 { | 2330 { |
| 2326 frame()->setPageZoomFactor(factor); | 2331 frame()->setPageZoomFactor(factor); |
| 2327 } | 2332 } |
| 2328 | 2333 |
| 2329 } | 2334 } |
| OLD | NEW |