WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
113175
Web Inspector: Remove console warnings for *_ prefixed CSS styles
https://bugs.webkit.org/show_bug.cgi?id=113175
Summary
Web Inspector: Remove console warnings for *_ prefixed CSS styles
Sergey Ryazanov
Reported
2013-03-25 01:38:57 PDT
This hack commonly used for IE-only declarations. It floods the console and should be ignored.
Attachments
Patch
(3.33 KB, patch)
2013-03-25 01:41 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Patch
(6.90 KB, patch)
2013-03-25 03:24 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Patch
(8.51 KB, patch)
2013-03-25 05:53 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Patch
(8.63 KB, patch)
2013-03-25 06:35 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Patch
(8.58 KB, patch)
2013-03-25 07:36 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Patch
(8.60 KB, patch)
2013-03-25 08:00 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Patch
(8.47 KB, patch)
2013-03-25 08:45 PDT
,
Sergey Ryazanov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Sergey Ryazanov
Comment 1
2013-03-25 01:41:53 PDT
Created
attachment 194801
[details]
Patch
Sergey Ryazanov
Comment 2
2013-03-25 03:24:55 PDT
Created
attachment 194816
[details]
Patch
Pavel Feldman
Comment 3
2013-03-25 04:24:44 PDT
Comment on
attachment 194816
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194816&action=review
> Source/WebCore/css/CSSParser.cpp:11288 > + // Ignore syntax error. This trick is used for IE7:
There should be no "IE7" in CSS parser. You should filter this error later.
Sergey Ryazanov
Comment 4
2013-03-25 05:53:24 PDT
Created
attachment 194834
[details]
Patch
Pavel Feldman
Comment 5
2013-03-25 06:00:28 PDT
Comment on
attachment 194834
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194834&action=review
> Source/WebCore/css/CSSParser.cpp:11273 > +static void AppendToken(StringBuilder* builder, const CSSParserString& token)
Methods start with lower case in WebKit.
> Source/WebCore/css/CSSParser.cpp:11294 > + builder.appendLiteral("Invalid CSS property declaration at: ");
I'd pass enum into single syntaxError and would choose title based on the enum value.
> Source/WebCore/inspector/InspectorConsoleAgent.cpp:191 > + if (source == CSSMessageSource && message == "Invalid CSS property declaration at: *")
I'd simply look for "*", please also add a comment explaining why this happens.
Sergey Ryazanov
Comment 6
2013-03-25 06:35:35 PDT
Created
attachment 194841
[details]
Patch
Pavel Feldman
Comment 7
2013-03-25 07:01:35 PDT
Comment on
attachment 194841
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194841&action=review
> Source/WebCore/css/CSSParser.cpp:11289 > + appendToken(&builder, location.token);
You don't need appendToken any longer, do you?
> Source/WebCore/css/CSSParser.h:80 > + InvalidPropertyDeclaration,
PropertyDeclarationError
> Source/WebCore/inspector/InspectorConsoleAgent.cpp:192 > + if (source == CSSMessageSource && message == "Invalid CSS property declaration at: *")
You should only look for "*" as I suggested.
Sergey Ryazanov
Comment 8
2013-03-25 07:36:56 PDT
Created
attachment 194851
[details]
Patch
Pavel Feldman
Comment 9
2013-03-25 07:54:59 PDT
Comment on
attachment 194851
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194851&action=review
> Source/WebCore/inspector/InspectorConsoleAgent.cpp:193 > + int index = message.find(": ");
size_t
> Source/WebCore/inspector/InspectorConsoleAgent.cpp:194 > + if (index >= 0 && (int)message.length() > index + 1 && message[index + 2] == '*')
static_cast<int>(...)
Sergey Ryazanov
Comment 10
2013-03-25 08:00:18 PDT
Comment on
attachment 194851
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194851&action=review
>> Source/WebCore/inspector/InspectorConsoleAgent.cpp:193 >> + int index = message.find(": "); > > size_t
WTF::STring::find has int return value and may return -1.
Sergey Ryazanov
Comment 11
2013-03-25 08:00:47 PDT
Created
attachment 194858
[details]
Patch
Pavel Feldman
Comment 12
2013-03-25 08:27:39 PDT
Comment on
attachment 194858
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194858&action=review
> Source/WebCore/inspector/InspectorConsoleAgent.cpp:194 > + if (index >= 0 && static_cast<int>(message.length()) > index + 1 && message[index + 2] == '*')
Even when message.length() > index + 1, it does not mean message[index + 2] is within range. Isn't it all just find(": *")?
Sergey Ryazanov
Comment 13
2013-03-25 08:45:17 PDT
Created
attachment 194866
[details]
Patch
WebKit Review Bot
Comment 14
2013-03-25 09:31:02 PDT
Comment on
attachment 194866
[details]
Patch Clearing flags on attachment: 194866 Committed
r146781
: <
http://trac.webkit.org/changeset/146781
>
WebKit Review Bot
Comment 15
2013-03-25 09:31:06 PDT
All reviewed patches have been landed. Closing bug.
PhistucK
Comment 16
2013-03-26 03:55:00 PDT
How about adding an option to enable all logging? We should encourage removing hacks, too.
Pavel Feldman
Comment 17
2013-03-26 04:42:24 PDT
(In reply to
comment #16
)
> How about adding an option to enable all logging? > We should encourage removing hacks, too.
Sure. This is a short term fix. The real one is to make it logged with verbose severity + filter it out on backend by default. Stay tuned.
PhistucK
Comment 18
2013-03-26 05:14:01 PDT
(In reply to
comment #17
)
> (In reply to
comment #16
) > > How about adding an option to enable all logging? > > We should encourage removing hacks, too. > > Sure. This is a short term fix. The real one is to make it logged with verbose severity + filter it out on backend by default. Stay tuned.
I say "Yay!". :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug