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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #include "core/editing/SpellCheckRequester.h" | 75 #include "core/editing/SpellCheckRequester.h" |
76 #include "core/editing/SpellChecker.h" | 76 #include "core/editing/SpellChecker.h" |
77 #include "core/editing/SurroundingText.h" | 77 #include "core/editing/SurroundingText.h" |
78 #include "core/editing/TextIterator.h" | 78 #include "core/editing/TextIterator.h" |
79 #include "core/fetch/MemoryCache.h" | 79 #include "core/fetch/MemoryCache.h" |
80 #include "core/fetch/ResourceFetcher.h" | 80 #include "core/fetch/ResourceFetcher.h" |
81 #include "core/frame/DOMPoint.h" | 81 #include "core/frame/DOMPoint.h" |
82 #include "core/frame/DOMWindow.h" | 82 #include "core/frame/DOMWindow.h" |
83 #include "core/frame/FrameView.h" | 83 #include "core/frame/FrameView.h" |
84 #include "core/frame/LocalFrame.h" | 84 #include "core/frame/LocalFrame.h" |
| 85 #include "core/frame/Screen.h" |
85 #include "core/frame/Settings.h" | 86 #include "core/frame/Settings.h" |
86 #include "core/html/HTMLContentElement.h" | 87 #include "core/html/HTMLContentElement.h" |
87 #include "core/html/HTMLIFrameElement.h" | 88 #include "core/html/HTMLIFrameElement.h" |
88 #include "core/html/HTMLInputElement.h" | 89 #include "core/html/HTMLInputElement.h" |
89 #include "core/html/HTMLMediaElement.h" | 90 #include "core/html/HTMLMediaElement.h" |
90 #include "core/html/HTMLSelectElement.h" | 91 #include "core/html/HTMLSelectElement.h" |
91 #include "core/html/HTMLTextAreaElement.h" | 92 #include "core/html/HTMLTextAreaElement.h" |
92 #include "core/html/forms/FormController.h" | 93 #include "core/html/forms/FormController.h" |
93 #include "core/html/shadow/ShadowElementNames.h" | 94 #include "core/html/shadow/ShadowElementNames.h" |
94 #include "core/html/shadow/TextControlInnerElements.h" | 95 #include "core/html/shadow/TextControlInnerElements.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 180 |
180 void Internals::resetToConsistentState(Page* page) | 181 void Internals::resetToConsistentState(Page* page) |
181 { | 182 { |
182 ASSERT(page); | 183 ASSERT(page); |
183 | 184 |
184 page->setDeviceScaleFactor(1); | 185 page->setDeviceScaleFactor(1); |
185 page->setIsCursorVisible(true); | 186 page->setIsCursorVisible(true); |
186 page->setPageScaleFactor(1, IntPoint(0, 0)); | 187 page->setPageScaleFactor(1, IntPoint(0, 0)); |
187 TextRun::setAllowsRoundingHacks(false); | 188 TextRun::setAllowsRoundingHacks(false); |
188 WebCore::overrideUserPreferredLanguages(Vector<AtomicString>()); | 189 WebCore::overrideUserPreferredLanguages(Vector<AtomicString>()); |
| 190 Screen::clearOverrideScreenData(); |
189 delete s_pagePopupDriver; | 191 delete s_pagePopupDriver; |
190 s_pagePopupDriver = 0; | 192 s_pagePopupDriver = 0; |
191 page->chrome().client().resetPagePopupDriver(); | 193 page->chrome().client().resetPagePopupDriver(); |
192 if (!page->mainFrame()->spellChecker().isContinuousSpellCheckingEnabled()) | 194 if (!page->mainFrame()->spellChecker().isContinuousSpellCheckingEnabled()) |
193 page->mainFrame()->spellChecker().toggleContinuousSpellChecking(); | 195 page->mainFrame()->spellChecker().toggleContinuousSpellChecking(); |
194 if (page->mainFrame()->editor().isOverwriteModeEnabled()) | 196 if (page->mainFrame()->editor().isOverwriteModeEnabled()) |
195 page->mainFrame()->editor().toggleOverwriteModeEnabled(); | 197 page->mainFrame()->editor().toggleOverwriteModeEnabled(); |
196 | 198 |
197 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) | 199 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) |
198 scrollingCoordinator->reset(); | 200 scrollingCoordinator->reset(); |
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2430 | 2432 |
2431 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2433 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
2432 { | 2434 { |
2433 if (!node) | 2435 if (!node) |
2434 return String(); | 2436 return String(); |
2435 blink::WebPoint point(x, y); | 2437 blink::WebPoint point(x, y); |
2436 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); | 2438 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); |
2437 return surroundingText.content(); | 2439 return surroundingText.content(); |
2438 } | 2440 } |
2439 | 2441 |
| 2442 void Internals::setOverrideScreenData(const Dictionary& overrideData) |
| 2443 { |
| 2444 Screen::setOverrideScreenData(overrideData); |
2440 } | 2445 } |
| 2446 |
| 2447 } |
OLD | NEW |