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

Unified Diff: third_party/WebKit/Source/core/page/FrameTree.cpp

Issue 2785063002: Make browsing context keywords case-insensitive. (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/core/page/FrameTree.cpp
diff --git a/third_party/WebKit/Source/core/page/FrameTree.cpp b/third_party/WebKit/Source/core/page/FrameTree.cpp
index a5e7194bc0e3cc1bc4e24f4299f7861fd71edbcd..eba4a69bd6a9f854ecdc4811d9b0e8551d54084e 100644
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -132,18 +132,19 @@ unsigned FrameTree::childCount() const {
}
Frame* FrameTree::find(const AtomicString& name) const {
- if (name == "_self" || name == "_current" || name.isEmpty())
+ if (equalIgnoringCase(name, "_self") || equalIgnoringCase(name, "_current") ||
+ name.isEmpty())
return m_thisFrame;
- if (name == "_top")
+ if (equalIgnoringCase(name, "_top"))
return top();
- if (name == "_parent")
+ if (equalIgnoringCase(name, "_parent"))
return parent() ? parent() : m_thisFrame.get();
// Since "_blank" should never be any frame's name, the following just amounts
// to an optimization.
- if (name == "_blank")
+ if (equalIgnoringCase(name, "_blank"))
return nullptr;
// Search subtree starting with this frame first.

Powered by Google App Engine
This is Rietveld 408576698