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

Issue 1633603004: Add script to remove prefixed CSS from third_party/polymer. (Closed)

Created:
4 years, 11 months ago by dpapad
Modified:
3 years, 9 months ago
Reviewers:
Dan Beam
CC:
chromium-reviews, dcheng, michaelpg+watch-polymer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add script to remove prefixed CSS from third_party/polymer. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Patch Set 2 : Remove accidental file #

Patch Set 3 : Process CSS files too. #

Total comments: 3

Patch Set 4 : Rebase #

Patch Set 5 : Don't strip webkit-appearance #

Patch Set 6 : Rebase #

Patch Set 7 : add missing files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -599 lines) Patch
M third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea.html View 1 2 3 4 2 chunks +0 lines, -11 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/iron-flex-layout/classes/iron-flex-layout.html View 1 2 3 1 chunk +0 lines, -68 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/iron-flex-layout/classes/iron-shadow-flex-layout.html View 1 2 3 1 chunk +0 lines, -68 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/iron-flex-layout/iron-flex-layout.html View 1 2 3 2 chunks +0 lines, -88 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/iron-flex-layout/iron-flex-layout-classes.html View 1 2 3 7 chunks +0 lines, -97 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/iron-list/iron-list.html View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox.html View 1 2 3 2 chunks +0 lines, -12 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-drawer-panel/paper-drawer-panel.html View 1 2 3 4 chunks +0 lines, -5 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab.html View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-input/paper-input.html View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container.html View 1 2 3 4 7 chunks +0 lines, -14 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-progress/paper-progress.html View 1 2 3 2 chunks +0 lines, -40 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.html View 1 2 3 3 chunks +0 lines, -4 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-slider/paper-slider.html View 1 2 3 7 chunks +0 lines, -13 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-spinner/paper-spinner-styles.html View 1 2 3 10 chunks +0 lines, -75 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-styles/classes/shadow-layout.html View 1 2 3 1 chunk +0 lines, -68 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab.html View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tabs.html View 1 2 3 4 chunks +0 lines, -10 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html View 1 2 3 3 chunks +0 lines, -3 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-toolbar/paper-toolbar.html View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip.html View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
A third_party/polymer/v1_0/css_strip_prefixes.js View 1 2 3 4 5 6 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (3 generated)
Dan Beam
we depend on node because polymer does, but the fact that bower/crisper/vulcanize are written in ...
4 years, 11 months ago (2016-01-26 17:22:18 UTC) #2
Dan Beam
4 years, 11 months ago (2016-01-26 17:31:46 UTC) #3
https://codereview.chromium.org/1633603004/diff/40001/third_party/polymer/v1_...
File third_party/polymer/v1_0/css_strip_prefixes.js (right):

https://codereview.chromium.org/1633603004/diff/40001/third_party/polymer/v1_...
third_party/polymer/v1_0/css_strip_prefixes.js:30: var prefixRegex = new
RegExp(/-webkit-|-moz-|-ms-/);
new RegExp(/regexLiteral/) makes very little sense.  it should probably just be
/regexLiteral/

https://codereview.chromium.org/1633603004/diff/40001/third_party/polymer/v1_...
third_party/polymer/v1_0/css_strip_prefixes.js:34: new
RegExp(/@-webkit-keyframes/),
why are you removing this?

https://codereview.chromium.org/1633603004/diff/40001/third_party/polymer/v1_...
third_party/polymer/v1_0/css_strip_prefixes.js:88: }, []);
I have no idea what this code does, frankly, but the major problem is this:

#rule {
  -webkit-border-radius: 5px;
}

if you strip that ^ rule, you lose a style.

#rule {
  -webkit-border-radius: 5px;
  border-radius: 5px;
}

if you strip the -webkit one ^ here, you have the same style with less cruft.

so you basically need to end up writing a map of

_EXACTLY_EQUIVALENT_PREFIXED_RULES = {
  '-webkit-border-radius': 'border-radius',
}

and make sure that you only strip in the case that you're sure something doesn't
get messed up.

oh yeah: and pray that you don't tickle cases where the prefixed and unprefixed
versions aren't subtly different, as well as handle when shorthands and
"longhands"(?) override eachother in the same rule.

Powered by Google App Engine
This is Rietveld 408576698