This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(panel): use class instead of style attribute to fix CSP violation #10321
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using a style attribute is prohibited when using strict CSP rules. Fixes angular#10085.
googlebot
added
the
cla: yes
PR author has signed Google's CLA: https://opensource.google.com/docs/cla/
label
Jan 28, 2017
@ErinCoughlan: could you please review? I have tried adding |
Frank3K
changed the title
fix(panel): use class instead of style attribute
fix(panel): use class instead of style attribute to fix CSP violation
Jan 28, 2017
ErinCoughlan
approved these changes
Jan 31, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Frank3K Out of curiosity, which tests were failing when you switched to using !important
? I think in terms of keeping the functionality the same as previous, it should be used and I'm not sure why it would fail since it's removed when we open the panel.
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2147 of 2769 (1 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should update the position of an open panel between two absolute positions FAILED
Expected 30 to be within 1 of -9999
@src/components/panel/panel.spec.js:1799:9
Expected 300 to be within 1 of -9999
@src/components/panel/panel.spec.js:1813:9
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2148 of 2769 (2 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should update the position of an open panel between two relative positions FAILED
Expected 100 to be within 1 of -9999
@src/components/panel/panel.spec.js:1828:9
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2149 of 2769 (3 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should update the position of an open panel from an absolute to a relative position FAILED
Expected 400 to be within 1 of -9999
@src/components/panel/panel.spec.js:1857:9
Expected 100 to be within 1 of -9999
@src/components/panel/panel.spec.js:1868:9
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2150 of 2769 (4 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should offset the panel horizontally FAILED
Expected 35 to be within 1 of -10014
@src/components/panel/panel.spec.js:1889:9
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2151 of 2769 (5 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should offset the panel horizontally with a function FAILED
Expected 35 to be within 1 of -10014
@src/components/panel/panel.spec.js:1917:9
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2152 of 2769 (6 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should offset the panel horizontally with centering FAILED
Expected 690 to be within 1 of -9984
@src/components/panel/panel.spec.js:1939:9
...
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2172 of 2769 (7 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should absolutely position the panel at center horizontally FAILED
Expected 675 to be within 1 of -9999
@src/components/panel/panel.spec.js:2199:9
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2173 of 2769 (8 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2174 of 2769 (8 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should absolutely position the panel at center horizontally and vertically FAILED
Expected 675 to be within 1 of -9999
@src/components/panel/panel.spec.js:2231:9
...
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2187 of 2769 (9 FAILED) (skipped 1) (0 Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel should keep the panel within the viewport on repeat openings FAILED
Expected -9999 to be 8.
@src/components/panel/panel.spec.js:2507:11
Expected -9999 to be 8.
@src/components/panel/panel.spec.js:2516:11
...
Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel should keep the panel within the viewport on repeat openings FAILED
Expected -9999 to be 8.
@src/components/panel/panel.spec.js:2507:11
Expected -9999 to be 8.
@src/components/panel/panel.spec.js:2516:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2188 of 2769 (10 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2189 of 2769 (10 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2190 of 2769 (10 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2191 of 2769 (10 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2192 of 2769 (10 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2193 of 2769 (10 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel vertically element outside the left boundry of the viewport FAILED
Expected -9999 to be 8.
@src/components/panel/panel.spec.js:2613:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2194 of 2769 (11 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2195 of 2769 (11 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally offset to the left of an element FAILED
Expected 100 to be within 1 of -9914
@src/components/panel/panel.spec.js:2652:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2196 of 2769 (12 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally right aligned with an element FAILED
Expected 203 to be within 1 of -9914
@src/components/panel/panel.spec.js:2666:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2197 of 2769 (13 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally centered with an element FAILED
Expected 151.5 to be within 1 of -9956.5
@src/components/panel/panel.spec.js:2683:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2198 of 2769 (14 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally left aligned with an element FAILED
Expected 100 to be within 1 of -9999
@src/components/panel/panel.spec.js:2697:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2199 of 2769 (15 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally offset to the right of an element FAILED
Expected 203 to be within 1 of -9999
@src/components/panel/panel.spec.js:2711:11
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2200 of 2769 (16 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2201 of 2769 (16 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2202 of 2769 (16 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally rtl offset to the right of an element FAILED
Expected 203 to be within 1 of -9999
@src/components/panel/panel.spec.js:2773:13
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2203 of 2769 (17 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally rtl left aligned with an element FAILED
Expected 100 to be within 1 of -9999
@src/components/panel/panel.spec.js:2787:13
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2204 of 2769 (18 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally rtl right aligned with an element FAILED
Expected 203 to be within 1 of -9914
@src/components/panel/panel.spec.js:2801:13
Firefox 51.0.0 (Ubuntu 0.0.0): Executed 2205 of 2769 (19 FAILED) (skipped 1) (0Firefox 51.0.0 (Ubuntu 0.0.0) $mdPanel positioning logic: should relatively position the panel horizontally rtl offset to the right of an element FAILED
Expected 100 to be within 1 of -9914
@src/components/panel/panel.spec.js:2815:13 Line numbers from panel.spec.js. Many failing tests have in common that |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using a style attribute is prohibited when using strict CSP rules. Fixes #10085.