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

Unified Diff: ios/web/web_state/js/resources/core.js

Issue 2790883004: Remove obsolete isInternaLink_() function. (Closed)
Patch Set: Remove obsolete isInternaLink_() function. The callers were removed in https://codereview.chromium.… 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: ios/web/web_state/js/resources/core.js
diff --git a/ios/web/web_state/js/resources/core.js b/ios/web/web_state/js/resources/core.js
index 2eaef1ebff88d01d0c2f65924da1a3f00f4daf53..652997168eafda3f1c050c94d3f574d7083fb1a7 100644
--- a/ios/web/web_state/js/resources/core.js
+++ b/ios/web/web_state/js/resources/core.js
@@ -481,66 +481,6 @@ goog.require('__crWeb.message');
invokeOnHost_({'command': 'window.hashchange'});
});
- // Returns if a frame with |name| is found in |currentWindow|.
- // Note frame.name is undefined for cross domain frames.
- var hasFrame_ = function(currentWindow, name) {
- if (currentWindow.name === name)
- return true;
-
- var frames = currentWindow.frames;
- for (var index = 0; index < frames.length; ++index) {
- var frame = frames[index];
- if (frame === undefined)
- continue;
- if (hasFrame_(frame, name))
- return true;
- }
- return false;
- };
-
- // Checks if |node| is an anchor to be opened in the current tab.
- var isInternaLink_ = function(node) {
- if (!(node instanceof HTMLAnchorElement))
- return false;
-
- // Anchor with href='javascript://.....' will be opened in the current tab
- // for simplicity.
- if (node.href.indexOf('javascript:') == 0)
- return true;
-
- // UIWebView will take care of the following cases.
- //
- // - If the given browsing context name is the empty string or '_self', then
- // the chosen browsing context must be the current one.
- //
- // - If the given browsing context name is '_parent', then the chosen
- // browsing context must be the parent browsing context of the current
- // one, unless there is no one, in which case the chosen browsing context
- // must be the current browsing context.
- //
- // - If the given browsing context name is '_top', then the chosen browsing
- // context must be the top-level browsing context of the current one, if
- // there is one, or else the current browsing context.
- //
- // Here an undefined target is considered in the same way as an empty
- // target.
- if (node.target === undefined || node.target === '' ||
- node.target === '_self' || node.target === '_parent' ||
- node.target === '_top') {
- return true;
- }
-
- // A new browsing context is being requested for an '_blank' target.
- if (node.target === '_blank')
- return false;
-
- // Otherwise UIWebView will take care of the case where there exists a
- // browsing context whose name is the same as the given browsing context
- // name. If there is no such a browsing context, a new browsing context is
- // being requested.
- return hasFrame_(window, node.target);
- };
-
var getComputedWebkitTouchCallout_ = function(element) {
return window.getComputedStyle(element, null)['webkitTouchCallout'];
};
« 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