Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add support for W3 Gradients in QuickView #4261

Closed
wants to merge 11 commits into from
Closed

Conversation

JeffryBooher
Copy link
Contributor

CEF3.1453.1255 uses Chromium 27.0.1453.73. which has support for W3 and -web-kit tags for gradients. the W3 (or unprefixed) have a different syntax in some situations and are not compatible.

This pull request removes the incompatibility such that unprefixed tags are not given a -webkit- prefix and are previewed verbatim and the -moz-,-o-,-ms- tags are prefixed with -webkit- since their syntaxes are interchangeable but brackets' shell only displays -webkit- variants. .

@ghost ghost assigned RaymondLim and redmunds Jun 18, 2013
@@ -175,7 +175,7 @@ define(function (require, exports, module) {

// Check for gradient. -webkit-gradient() can have parens in parameters
// nested 2 levels. Other gradients can only nest 1 level.
var gradientRegEx = /-webkit-gradient\((?:[^\(]*?(?:\((?:[^\(]*?(?:\([^\)]*?\))*?)*?\))*?)*?\)|(?:(?:-moz-|-ms-|-o-|-webkit-|\s)(linear-gradient)|(?:-moz-|-ms-|-o-|-webkit-)(radial-gradient))(\((?:[^\)]*?(?:\([^\)]*?\))*?)*?\))/gi,
var gradientRegEx = /-webkit-gradient\((?:[^\(]*?(?:\((?:[^\(]*?(?:\([^\)]*?\))*?)*?\))*?)*?\)|(?:(?:-moz-|-ms-|-o-|-webkit-|\s)((repeating-)?linear-gradient)|(?:-moz-|-ms-|-o-|-webkit-|\s)((repeating-)?radial-gradient))(\((?:[^\)]*?(?:\([^\)]*?\))*?)*?\))/gi,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (repeating-)? expressions should use non-capturing parenthesis (?:repeating-)? so they are not added to the match array. We don't use that info, and then the array indexes won't need to be changed.

@redmunds
Copy link
Contributor

Done with review. Just 1 comment. Might want to squash the commits.

@JeffryBooher
Copy link
Contributor Author

closed in lieu of #4290

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants