Source/WebInspectorUI:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 23:59:48 +0000 (23:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 23:59:48 +0000 (23:59 +0000)
commit8f8f75b52878d57fbc13f364e94e55924ce129f8
treea2f462c662f70b5c07255b5472401133cf4e7678
parentcdafacd00f4e2134d3d81a59974612fb61d0d237
Source/WebInspectorUI:
Web Inspector: WebInspector.Color should support #rgba and #rrggbbaa syntax
https://bugs.webkit.org/show_bug.cgi?id=150894

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-04
Reviewed by Timothy Hatcher.

Support for hex with alpha color syntax.

* UserInterface/Models/Color.js:
(WebInspector.Color.fromString):
(WebInspector.Color.prototype.nextFormat):
(WebInspector.Color.prototype.copy):
(WebInspector.Color.prototype.toString):
(WebInspector.Color.prototype._toShortHEXAlphaString):
(WebInspector.Color.prototype._toHEXAlphaString):
Add support for new hex syntax. Address some minor issues
like case insensitivity and extra comma separate values.

* UserInterface/Views/CodeMirrorTextMarkers.js:
This prevent trailing hex characters from showing up
when cycling through color variants.

* UserInterface/Views/CodeMirrorAdditions.js:
When CodeMirror stops treating the new values as error
this will give them our hex-color styles.

LayoutTests:
Web Inspector: Support #rgba and #rrggbbaa syntax
https://bugs.webkit.org/show_bug.cgi?id=150894

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-04
Reviewed by Timothy Hatcher.

* inspector/model/color-expected.txt: Added.
* inspector/model/color.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/model/color-expected.txt [new file with mode: 0644]
LayoutTests/inspector/model/color.html [new file with mode: 0644]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/Color.js
Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js
Source/WebInspectorUI/UserInterface/Views/CodeMirrorTextMarkers.js