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

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

Issue 2251693003: Rename "ContinuousSpellChecking" to "SpellChecking" in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 { 226 {
227 ASSERT(page); 227 ASSERT(page);
228 228
229 if (!sFeaturesBackup) 229 if (!sFeaturesBackup)
230 sFeaturesBackup = new RuntimeEnabledFeatures::Backup; 230 sFeaturesBackup = new RuntimeEnabledFeatures::Backup;
231 sFeaturesBackup->restore(); 231 sFeaturesBackup->restore();
232 page->setIsCursorVisible(true); 232 page->setIsCursorVisible(true);
233 page->setPageScaleFactor(1); 233 page->setPageScaleFactor(1);
234 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se tScrollPosition(IntPoint(0, 0), ProgrammaticScroll); 234 page->deprecatedLocalMainFrame()->view()->layoutViewportScrollableArea()->se tScrollPosition(IntPoint(0, 0), ProgrammaticScroll);
235 overrideUserPreferredLanguages(Vector<AtomicString>()); 235 overrideUserPreferredLanguages(Vector<AtomicString>());
236 if (!page->deprecatedLocalMainFrame()->spellChecker().isContinuousSpellCheck ingEnabled()) 236 if (!page->deprecatedLocalMainFrame()->spellChecker().isSpellCheckingEnabled ())
237 page->deprecatedLocalMainFrame()->spellChecker().toggleContinuousSpellCh ecking(); 237 page->deprecatedLocalMainFrame()->spellChecker().toggleSpellCheckingEnab led();
238 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled()) 238 if (page->deprecatedLocalMainFrame()->editor().isOverwriteModeEnabled())
239 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled(); 239 page->deprecatedLocalMainFrame()->editor().toggleOverwriteModeEnabled();
240 240
241 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( )) 241 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator( ))
242 scrollingCoordinator->reset(); 242 scrollingCoordinator->reset();
243 243
244 page->deprecatedLocalMainFrame()->view()->clear(); 244 page->deprecatedLocalMainFrame()->view()->clear();
245 PlatformKeyboardEvent::setCurrentCapsLockState(PlatformKeyboardEvent::Overri deCapsLockState::Default); 245 PlatformKeyboardEvent::setCurrentCapsLockState(PlatformKeyboardEvent::Overri deCapsLockState::Default);
246 } 246 }
247 247
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 1541
1542 bool Internals::hasSpellingMarker(Document* document, int from, int length) 1542 bool Internals::hasSpellingMarker(Document* document, int from, int length)
1543 { 1543 {
1544 ASSERT(document); 1544 ASSERT(document);
1545 if (!document->frame()) 1545 if (!document->frame())
1546 return false; 1546 return false;
1547 1547
1548 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Spelling, from, length); 1548 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Spelling, from, length);
1549 } 1549 }
1550 1550
1551 void Internals::setContinuousSpellCheckingEnabled(bool enabled) 1551 void Internals::setSpellCheckingEnabled(bool enabled)
1552 { 1552 {
1553 if (!contextDocument() || !contextDocument()->frame()) 1553 if (!contextDocument() || !contextDocument()->frame())
1554 return; 1554 return;
1555 1555
1556 if (enabled != contextDocument()->frame()->spellChecker().isContinuousSpellC heckingEnabled()) 1556 if (enabled != contextDocument()->frame()->spellChecker().isSpellCheckingEna bled())
1557 contextDocument()->frame()->spellChecker().toggleContinuousSpellChecking (); 1557 contextDocument()->frame()->spellChecker().toggleSpellCheckingEnabled();
1558 } 1558 }
1559 1559
1560 bool Internals::canHyphenate(const AtomicString& locale) 1560 bool Internals::canHyphenate(const AtomicString& locale)
1561 { 1561 {
1562 return LayoutLocale::valueOrDefault(LayoutLocale::get(locale)) 1562 return LayoutLocale::valueOrDefault(LayoutLocale::get(locale))
1563 .getHyphenation(); 1563 .getHyphenation();
1564 } 1564 }
1565 1565
1566 void Internals::setMockHyphenation(const AtomicString& locale) 1566 void Internals::setMockHyphenation(const AtomicString& locale)
1567 { 1567 {
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 2619
2620 ClientRect* Internals::visualRect(Node* node) 2620 ClientRect* Internals::visualRect(Node* node)
2621 { 2621 {
2622 if (!node || !node->layoutObject()) 2622 if (!node || !node->layoutObject())
2623 return ClientRect::create(); 2623 return ClientRect::create();
2624 2624
2625 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 2625 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
2626 } 2626 }
2627 2627
2628 } // namespace blink 2628 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698