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

Unified Diff: Source/core/testing/Internals.cpp

Issue 1177043016: [SP] Add a drawing recorder before painting caps lock indicator in password fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Need to rebaseline new tests under virtual/antialiasedtext as well. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index ab643c9f17c894ddb04e088a97fdc0386aa955bf..3cecee2be8b4fbdafda459a24b8696c3f28c88e5 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -130,6 +130,7 @@
#include "core/workers/WorkerThread.h"
#include "platform/Cursor.h"
#include "platform/Language.h"
+#include "platform/PlatformKeyboardEvent.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/TraceEvent.h"
#include "platform/geometry/IntRect.h"
@@ -218,6 +219,7 @@ void Internals::resetToConsistentState(Page* page)
scrollingCoordinator->reset();
page->deprecatedLocalMainFrame()->view()->clear();
+ PlatformKeyboardEvent::setCurrentCapsLockState(PlatformKeyboardEvent::OverrideCapsLockState::Default);
}
Internals::Internals(Document* document)
@@ -2436,4 +2438,10 @@ ClientRectList* Internals::focusRingRects(Element* element)
return ClientRectList::create(rects);
}
+void Internals::setCapsLockState(bool enabled)
+{
+ PlatformKeyboardEvent::setCurrentCapsLockState(enabled ?
+ PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent::OverrideCapsLockState::Off);
+}
+
} // namespace blink
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698