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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2876973003: Rename *Focus*-methods of FrameSelection to clarify its public API (Closed)
Patch Set: Created 3 years, 7 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
Index: third_party/WebKit/Source/core/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index 54daa8e576628fe5f714472a03123bd96cdba958..c8124ae169984a86595ea44ee8f4796ac07a70e7 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -750,7 +750,7 @@ void FrameSelection::NotifyEventHandlerForSelectionChange() {
}
void FrameSelection::FocusedOrActiveStateChanged() {
- bool active_and_focused = IsFocusedAndActive();
+ bool active_and_focused = FrameIsFocusedAndActive();
// Trigger style invalidation from the focused element. Even though
// the focused element hasn't changed, the evaluation of focus pseudo
@@ -789,7 +789,7 @@ void FrameSelection::PageActivationChanged() {
}
void FrameSelection::UpdateSecureKeyboardEntryIfActive() {
- if (!IsFocusedAndActive())
+ if (!FrameIsFocusedAndActive())
return;
SetUseSecureKeyboardEntry(use_secure_keyboard_entry_when_active_);
}
@@ -809,7 +809,7 @@ void FrameSelection::SetUseSecureKeyboardEntry(bool enable) {
DisableSecureTextInput();
}
-void FrameSelection::SetFocused(bool flag) {
+void FrameSelection::SetFrameIsFocused(bool flag) {
if (focused_ == flag)
return;
focused_ = flag;
@@ -817,7 +817,7 @@ void FrameSelection::SetFocused(bool flag) {
FocusedOrActiveStateChanged();
}
-bool FrameSelection::IsFocusedAndActive() const {
+bool FrameSelection::FrameIsFocusedAndActive() const {
return focused_ && frame_->GetPage() &&
frame_->GetPage()->GetFocusController().IsActive();
}
@@ -861,7 +861,8 @@ static bool IsFrameElement(const Node* n) {
}
void FrameSelection::SetFocusedNodeIfNeeded() {
- if (ComputeVisibleSelectionInDOMTreeDeprecated().IsNone() || !IsFocused())
+ if (ComputeVisibleSelectionInDOMTreeDeprecated().IsNone() ||
+ !FrameIsFocused())
return;
if (Element* target =
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698