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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2468833002: Count visible password fields on a page (Closed)
Patch Set: fix comment wrapping Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 3011eaa553a9e220ba546d56e460a14eafe3574e..48919ef566a75d1820c4618e86b3fb99aed0655d 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -556,6 +556,18 @@ bool LocalFrame::isCrossOriginSubframe() const {
top->securityContext()->getSecurityOrigin());
}
+void LocalFrame::incrementPasswordCount() {
+ ++m_passwordCount;
+}
+
+void LocalFrame::decrementPasswordCount() {
+ --m_passwordCount;
+}
+
+uint64_t LocalFrame::passwordCount() const {
+ return m_passwordCount;
+}
+
void LocalFrame::setPrinting(bool printing,
const FloatSize& pageSize,
const FloatSize& originalPageSize,
@@ -870,7 +882,8 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client,
m_textZoomFactor(parentTextZoomFactor(this)),
m_inViewSourceMode(false),
m_interfaceProvider(interfaceProvider),
- m_interfaceRegistry(interfaceRegistry) {
+ m_interfaceRegistry(interfaceRegistry),
+ m_passwordCount(0) {
if (isLocalRoot())
m_instrumentingAgents = new InstrumentingAgents();
else

Powered by Google App Engine
This is Rietveld 408576698