summaryrefslogtreecommitdiffstats
path: root/third_party/polymer/v1_0
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/polymer/v1_0')
-rw-r--r--third_party/polymer/v1_0/README.chromium4
-rw-r--r--third_party/polymer/v1_0/chromium.patch39
-rw-r--r--third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html10
-rwxr-xr-xthird_party/polymer/v1_0/reproduce.sh8
4 files changed, 51 insertions, 10 deletions
diff --git a/third_party/polymer/v1_0/README.chromium b/third_party/polymer/v1_0/README.chromium
index c1119a1..83b2a84 100644
--- a/third_party/polymer/v1_0/README.chromium
+++ b/third_party/polymer/v1_0/README.chromium
@@ -38,6 +38,10 @@ HTML elements to external JS files. This version of the Polymer is used in a web
UI, where CSP forbids an execution of inline scripts. The extraction was made
using Crisper (https://github.com/PolymerLabs/crisper).
- Replaced CRLF line endings with LF line endings in text files.
+- Apply chromium.patch with local modifications. The patch is applied to
+components-chromium (i.e. after extracting the inline scripts) so that the
+results of 'git diff' (after any new local changes are applied) can be appended
+to chromium.patch.
To restore the contents of the 'components' and 'components-chromium'
directories from scratch, run ./reproduce.sh (requires bower and crisper).
diff --git a/third_party/polymer/v1_0/chromium.patch b/third_party/polymer/v1_0/chromium.patch
index 362bbf3..231b205 100644
--- a/third_party/polymer/v1_0/chromium.patch
+++ b/third_party/polymer/v1_0/chromium.patch
@@ -1,7 +1,7 @@
-diff --git a/components/font-roboto/roboto.html b/components/font-roboto/roboto.html
+diff --git a/components-chromium/font-roboto/roboto.html b/components-chromium/font-roboto/roboto.html
index 7a24999..4eefcba 100644
---- a/components/font-roboto/roboto.html
-+++ b/components/font-roboto/roboto.html
+--- a/components-chromium/font-roboto/roboto.html
++++ b/components-chromium/font-roboto/roboto.html
@@ -7,5 +7,4 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
@@ -9,3 +9,36 @@ index 7a24999..4eefcba 100644
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700">
+<link rel="stylesheet" href="chrome://resources/css/roboto.css">
+diff --git a/components-chromium/paper-button/paper-button.html b/components-chromium/paper-button/paper-button.html
+index 3463659..f3ec42f 100644
+--- a/components-chromium/paper-button/paper-button.html
++++ b/components-chromium/paper-button/paper-button.html
+@@ -100,12 +100,12 @@ Custom property | Description | Default
+ @apply(--paper-button);
+ }
+
+- :host([raised]) .keyboard-focus {
++ :host([raised]) #content-wrapper.keyboard-focus {
+ font-weight: bold;
+ @apply(--paper-button-raised-keyboard-focus);
+ }
+
+- :host(:not([raised])) .keyboard-focus {
++ :host(:not([raised])) #content-wrapper.keyboard-focus {
+ font-weight: bold;
+ @apply(--paper-button-flat-keyboard-focus);
+ }
+@@ -139,9 +139,11 @@ Custom property | Description | Default
+
+ <paper-ripple></paper-ripple>
+
+- <paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated=""></paper-material>
++ <paper-material elevation="[[_elevation]]" animated></paper-material>
+
+- <content></content>
++ <div id="content-wrapper" class$="[[_computeContentClass(receivedFocusFromKeyboard)]]">
++ <content></content>
++ </div>
+
+ </template>
+ </dom-module>
diff --git a/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html b/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html
index 3463659..f3ec42f 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html
+++ b/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html
@@ -100,12 +100,12 @@ Custom property | Description | Default
@apply(--paper-button);
}
- :host([raised]) .keyboard-focus {
+ :host([raised]) #content-wrapper.keyboard-focus {
font-weight: bold;
@apply(--paper-button-raised-keyboard-focus);
}
- :host(:not([raised])) .keyboard-focus {
+ :host(:not([raised])) #content-wrapper.keyboard-focus {
font-weight: bold;
@apply(--paper-button-flat-keyboard-focus);
}
@@ -139,9 +139,11 @@ Custom property | Description | Default
<paper-ripple></paper-ripple>
- <paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated=""></paper-material>
+ <paper-material elevation="[[_elevation]]" animated></paper-material>
- <content></content>
+ <div id="content-wrapper" class$="[[_computeContentClass(receivedFocusFromKeyboard)]]">
+ <content></content>
+ </div>
</template>
</dom-module>
diff --git a/third_party/polymer/v1_0/reproduce.sh b/third_party/polymer/v1_0/reproduce.sh
index 87fff35..2590237 100755
--- a/third_party/polymer/v1_0/reproduce.sh
+++ b/third_party/polymer/v1_0/reproduce.sh
@@ -58,7 +58,9 @@ find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\
NBSP=$(python -c 'print u"\u00A0".encode("utf-8")')
sed -i 's/['"$NBSP"']/\\u00A0/g' components/polymer/polymer-mini.html
-# Remove import of external resource in font-roboto (fonts.googleapis.com).
-patch -p1 < chromium.patch
-
./extract_inline_scripts.sh components components-chromium
+
+# Remove import of external resource in font-roboto (fonts.googleapis.com)
+# and apply additional chrome specific patches. NOTE: Where possible create
+# a Polymer issue and/or pull request to minimize these patches.
+patch -p1 < chromium.patch