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

Unified Diff: third_party/polymer/components-chromium/core-label/core-label-extracted.js

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 5 years, 6 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/components-chromium/core-label/core-label-extracted.js
diff --git a/third_party/polymer/components-chromium/core-label/core-label-extracted.js b/third_party/polymer/components-chromium/core-label/core-label-extracted.js
deleted file mode 100644
index bec4fe7552a6052568127c11bd321c59b0309778..0000000000000000000000000000000000000000
--- a/third_party/polymer/components-chromium/core-label/core-label-extracted.js
+++ /dev/null
@@ -1,74 +0,0 @@
-
- (function() {
-
- var ID = 0;
- function generate(node) {
- if (!node.id) {
- node.id = 'core-label-' + ID++;
- }
- return node.id;
- }
-
- Polymer('core-label', {
- /**
- * A query selector string for a "target" element not nested in the `<core-label>`
- *
- * @attribute for
- * @type string
- * @default ''
- */
- publish: {
- 'for': {reflect: true, value: ''}
- },
- eventDelegates: {
- 'tap': 'tapHandler'
- },
- created: function() {
- generate(this);
- this._forElement = null;
- },
- ready: function() {
- if (!this.for) {
- this._forElement = this.querySelector('[for]');
- this._tie();
- }
- },
- tapHandler: function(ev) {
- if (!this._forElement) {
- return;
- }
- if (ev.target === this._forElement) {
- return;
- }
- this._forElement.focus();
- this._forElement.click();
- this.fire('tap', null, this._forElement);
- },
- _tie: function() {
- if (this._forElement) {
- this._forElement.setAttribute('aria-labelledby', this.id);
- }
- },
- _findScope: function() {
- var n = this.parentNode;
- while(n && n.parentNode) {
- n = n.parentNode;
- }
- return n;
- },
- forChanged: function(oldFor, newFor) {
- if (this._forElement) {
- this._forElement.removeAttribute('aria-labelledby');
- }
- var scope = this._findScope();
- if (!scope) {
- return;
- }
- this._forElement = scope.querySelector(newFor);
- if (this._forElement) {
- this._tie();
- }
- }
- });
- })();
-

Powered by Google App Engine
This is Rietveld 408576698