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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js

Issue 2158913007: Roll Polymer from 1.5.0 -> 1.6.0 to pick up native CSS custom props (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js
index 15e6cef8badc8fc87a9b3e90d1e8f2307c55f291..7bf2c00e1234742525d8813286da9013fb330c58 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js
@@ -179,9 +179,14 @@
if (!href) {
return;
}
+ event.preventDefault();
+ // If the navigation is to the current page we shouldn't add a history
+ // entry or fire a change event.
+ if (href === window.location.href) {
+ return;
+ }
window.history.pushState({}, '', href);
this.fire('location-changed', {}, {node: window});
- event.preventDefault();
},
/**
* Returns the absolute URL of the link (if any) that this click event
@@ -264,11 +269,6 @@
// Need to use a full URL in case the containing page has a base URI.
var fullNormalizedHref = new URL(
normalizedHref, window.location.href).href;
- // If the navigation is to the current page we shouldn't add a history
- // entry.
- if (fullNormalizedHref === window.location.href) {
- return null;
- }
return fullNormalizedHref;
},
_makeRegExp: function(urlSpaceRegex) {

Powered by Google App Engine
This is Rietveld 408576698