Title: [173792] trunk/Source/WebInspectorUI
- Revision
- 173792
- Author
- [email protected]
- Date
- 2014-09-20 08:34:08 -0700 (Sat, 20 Sep 2014)
Log Message
Web Inspector: Option+Click on CSS url(...) should jump to resource view
https://bugs.webkit.org/show_bug.cgi?id=136965
Patch by Joseph Pecoraro <[email protected]> on 2014-09-20
Reviewed by Timothy Hatcher.
* UserInterface/Views/CodeMirrorAdditions.js:
When parsing CSS url(...) tokens, the contents of url(...)
are a "string" type, not "atom".
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (173791 => 173792)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-09-20 06:49:19 UTC (rev 173791)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-09-20 15:34:08 UTC (rev 173792)
@@ -1,3 +1,14 @@
+2014-09-20 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Option+Click on CSS url(...) should jump to resource view
+ https://bugs.webkit.org/show_bug.cgi?id=136965
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/CodeMirrorAdditions.js:
+ When parsing CSS url(...) tokens, the contents of url(...)
+ are a "string" type, not "atom".
+
2014-09-19 Daniel Bates <[email protected]>
Always assume internal SDK when building configuration Production
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js (173791 => 173792)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js 2014-09-20 06:49:19 UTC (rev 173791)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js 2014-09-20 15:34:08 UTC (rev 173792)
@@ -105,7 +105,7 @@
state._linkQuoteCharacter = quote === "'" || quote === "\"" ? quote : null;
- // Rewind the steam to the start of this token.
+ // Rewind the stream to the start of this token.
stream.pos = startPosition;
// Eat the open quote of the string so the string style
@@ -199,10 +199,12 @@
if (stream.current() === "url") {
// If the current text is "url" then we should expect the next string token to be a link.
state._expectLink = true;
- } else if (state._expectLink) {
- // We expected a string and got it. This is a link. Parse it the way we want it.
- delete state._expectLink;
+ } else if (hexColorRegex.test(stream.current()))
+ style = style + " hex-color";
+ } else if (state._expectLink) {
+ delete state._expectLink;
+ if (style === "string") {
// This is a link, so setup the state to process it next.
state._urlTokenize = tokenizeCSSURLString;
state._urlBaseStyle = style;
@@ -212,18 +214,14 @@
state._urlQuoteCharacter = quote === "'" || quote === "\"" ? quote : ")";
state._unquotedURLString = state._urlQuoteCharacter === ")";
- // Rewind the steam to the start of this token.
+ // Rewind the stream to the start of this token.
stream.pos = startPosition;
// Eat the open quote of the string so the string style
// will be used for the quote character.
if (!state._unquotedURLString)
stream.eat(state._urlQuoteCharacter);
- } else if (hexColorRegex.test(stream.current()))
- style = style + " hex-color";
- } else if (state._expectLink) {
- // We expected a string and didn't get one. Cleanup.
- delete state._expectLink;
+ }
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes