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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1420693006: Introduce a struct to store arguments of Element::focus(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index e5f1af47564bcea6cf9aecc7eac78882e0eed148..fb40bcc7293062708da780b915cbdf6b64823e3e 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -404,8 +404,8 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_parsingState(FinishedParsing)
, m_gotoAnchorNeededAfterStylesheetsLoad(false)
, m_containsValidityStyleRules(false)
- , m_updateFocusAppearanceRestoresSelection(false)
, m_containsPlugins(false)
+ , m_updateFocusAppearanceSelectionBahavior(SelectionBehaviorOnFocus::Reset)
, m_ignoreDestructiveWriteCount(0)
, m_markers(adoptPtrWillBeNoop(new DocumentMarkerController))
, m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFired)
@@ -4902,9 +4902,9 @@ bool Document::isContextThread() const
return isMainThread();
}
-void Document::updateFocusAppearanceSoon(bool restorePreviousSelection)
+void Document::updateFocusAppearanceSoon(SelectionBehaviorOnFocus selectionbehavioronfocus)
{
- m_updateFocusAppearanceRestoresSelection = restorePreviousSelection;
+ m_updateFocusAppearanceSelectionBahavior = selectionbehavioronfocus;
if (!m_updateFocusAppearanceTimer.isActive())
m_updateFocusAppearanceTimer.startOneShot(0, BLINK_FROM_HERE);
}
@@ -4921,7 +4921,7 @@ void Document::updateFocusAppearanceTimerFired(Timer<Document>*)
return;
updateLayout();
if (element->isFocusable())
- element->updateFocusAppearance(m_updateFocusAppearanceRestoresSelection);
+ element->updateFocusAppearance(m_updateFocusAppearanceSelectionBahavior);
}
void Document::attachRange(Range* range)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698