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

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

Issue 2739573005: Rename Document::widgetForElement to frameViewBaseForElement (Closed)
Patch Set: Move frameViewBase back to Document Created 3 years, 9 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 | « no previous file | no next file » | 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 7b43059e98e5dfa347e8da67cdddecde9694b845..63422aa57bf18377df153723b7a017c919d65a2b 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -368,7 +368,7 @@ static inline bool isValidNamePart(UChar32 c) {
return true;
}
-static FrameViewBase* widgetForElement(const Element& focusedElement) {
+static FrameViewBase* frameViewBaseForElement(const Element& focusedElement) {
LayoutObject* layoutObject = focusedElement.layoutObject();
if (!layoutObject || !layoutObject->isLayoutPart())
return 0;
@@ -4040,7 +4040,8 @@ bool Document::setFocusedElement(Element* prpNewFocusedElement,
}
if (view()) {
- FrameViewBase* oldFrameViewBase = widgetForElement(*oldFocusedElement);
+ FrameViewBase* oldFrameViewBase =
+ frameViewBaseForElement(*oldFocusedElement);
if (oldFrameViewBase)
oldFrameViewBase->setFocused(false, params.type);
else
@@ -4114,14 +4115,15 @@ bool Document::setFocusedElement(Element* prpNewFocusedElement,
// eww, I suck. set the qt focus correctly
// ### find a better place in the code for this
if (view()) {
- FrameViewBase* focusFrameViewBase = widgetForElement(*m_focusedElement);
+ FrameViewBase* focusFrameViewBase =
+ frameViewBaseForElement(*m_focusedElement);
if (focusFrameViewBase) {
// Make sure a FrameViewBase has the right size before giving it focus.
// Otherwise, we are testing edge cases of the FrameViewBase code.
// Specifically, in WebCore this does not work well for text fields.
updateStyleAndLayout();
// Re-get the FrameViewBase in case updating the layout changed things.
- focusFrameViewBase = widgetForElement(*m_focusedElement);
+ focusFrameViewBase = frameViewBaseForElement(*m_focusedElement);
}
if (focusFrameViewBase)
focusFrameViewBase->setFocused(true, params.type);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698