cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Mueller (JIRA)" <>
Subject [jira] [Commented] (CB-2650) [weinre] Weinre style inspection breaks with normalize.css
Date Tue, 12 Mar 2013 00:19:12 GMT


Patrick Mueller commented on CB-2650:

Interesting.  Apparently matchesSelector doesn't throw too many errors, otherwise we would
have seen this more often.

Here's a test case:

<script src="http://localhost:8081/target/target-script.js#anonymous"></script>

input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;

<input type="search">

When the following selector is passed to _webkitMatchesSelector (aka matchesSelector):

"input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration"

an exception will be thrown with the following stack:
"Error: An invalid or illegal string was specified.
    at _webkitMatchesSelector (weinre/target/CSSStore.amd.js:354:18)
    at CSSStore.module.exports.CSSStore.getMatchedCSSRules (weinre/target/CSSStore.amd.js:54:14)
    at WiCSSImpl.module.exports.WiCSSImpl.getStylesForNode (weinre/target/WiCSSImpl.amd.js:33:40)
    at MessageDispatcher.module.exports.MessageDispatcher._handleMessage (weinre/common/MessageDispatcher.amd.js:183:14)
    at eval (weinre/common/Binding.amd.js:19:21)
    at (weinre/common/EventListeners.amd.js:43:20)
    at WebSocketXhr.module.exports.WebSocketXhr._fireEventListeners (weinre/common/WebSocketXhr.amd.js:190:37)
    at WebSocketXhr.module.exports.WebSocketXhr._handleXhrResponseGet (weinre/common/WebSocketXhr.amd.js:118:26)
    at XMLHttpRequest._xhrEventHandler (weinre/common/WebSocketXhr.amd.js:243:32)"

We should be catching this exception and soldiering on.  If it's not a valid selector, it
can't possibly match, right???

> [weinre] Weinre style inspection breaks with normalize.css
> ----------------------------------------------------------
>                 Key: CB-2650
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: weinre
>    Affects Versions: 2.0.0
>         Environment: Mac OS 10.8.2
>            Reporter: Jeff Froom
>            Assignee: Patrick Mueller
>            Priority: Blocker
>              Labels: css, normalize, weinre
> The following lines in normalize.css cause weinre to throw the below error causing the
ability to inspect client styles to fail.
> --
> /*
>  * Remove inner padding and search cancel button in Safari 5 and Chrome
>  * on OS X.
>  */
> input[type="search"]::-webkit-search-cancel-button,
> input[type="search"]::-webkit-search-decoration {
>     -webkit-appearance: none;
> }
> --
> Weinre server error:
> 2013-03-11T23:18:19.932Z weinre: target t-113: weinre: invocation exception on WiCSSImpl.getStylesForNode():
Error: SyntaxError: DOM Exception 12
> --
> Result: client style inspection fails.
> --
> Version: 2.0.0-pre-HA5N9T49

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message