cordova-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/CB-2650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13599521#comment-13599521
] 

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:

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

<style>
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}
</style>

<input type="search">
{noformat}

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

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

an exception will be thrown with the following stack:
{noformat}
"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 EventListeners.module.exports.EventListeners.fire (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)"
{noformat}

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: https://issues.apache.org/jira/browse/CB-2650
>             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.
> https://github.com/appleboy/normalize.scss/blob/master/normalize.css
> --
> /*
>  * 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: http://www.atlassian.com/software/jira

Mime
View raw message