Bug 111178 - Changing "#define YYDEBUG 0" to 1 causing compilation error
Summary: Changing "#define YYDEBUG 0" to 1 causing compilation error
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Trivial
Assignee: Sergey Ryazanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-01 06:48 PST by Sergey Ryazanov
Modified: 2013-03-21 04:19 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.29 KB, patch)
2013-03-01 06:51 PST, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (2.99 KB, patch)
2013-03-20 00:22 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Ryazanov 2013-03-01 06:48:50 PST
Changing "#define YYDEBUG 0: in Source/WebCore/css/CSSGrammar.y.includes to 1 causes compilation error.
Comment 1 Sergey Ryazanov 2013-03-01 06:51:20 PST
Created attachment 190960 [details]
Patch
Comment 2 Mark Rowe (bdash) 2013-03-01 20:04:26 PST
Comment on attachment 190960 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190960&action=review

> Source/WebCore/ChangeLog:3
> +        Fixed.

This is  unnecessary.

> Source/WebCore/ChangeLog:5
> +        CSS debugging code is broken

This is too vague.

> Source/WebCore/ChangeLog:16
> +        * css/CSSGrammar.y.includes:
> +        * css/CSSParser.cpp:
> +        (WebCore::CSSParser::rewriteSpecifiers):
> +        * css/CSSParser.h:
> +        (WebCore):

These are here so you can provide a description of what changes you made, and why.

> Source/WebCore/css/CSSParser.cpp:11964
> +String yylvalToString(int yytype, const void* yylvalWithoutType)

Why is this implemented unconditionally when it's only ever used when YYDEBUG is > 0?

> Source/WebCore/css/CSSParser.h:713
> +

Why is this defined unconditionally when it's only ever used when YYDEBUG is > 0?
Comment 3 Sergey Ryazanov 2013-03-20 00:22:50 PDT
Created attachment 193992 [details]
Patch
Comment 4 Sergey Ryazanov 2013-03-20 00:29:14 PDT
Comment on attachment 190960 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190960&action=review

I moved this code to CSSGrammar.y.in. I hope it make it easier to understand.

>> Source/WebCore/css/CSSParser.cpp:11964
>> +String yylvalToString(int yytype, const void* yylvalWithoutType)
> 
> Why is this implemented unconditionally when it's only ever used when YYDEBUG is > 0?

Because YYDEBUG from CSSGrammar.y.include if completely different from one defined in CSSParser.cpp. Is inaccessible here. I prefer to use only one from CSSGrammar.y.include in order to have more precise contron on what stylesheet to debug.
Comment 5 WebKit Review Bot 2013-03-21 04:19:53 PDT
Comment on attachment 193992 [details]
Patch

Clearing flags on attachment: 193992

Committed r146451: <http://trac.webkit.org/changeset/146451>
Comment 6 WebKit Review Bot 2013-03-21 04:19:56 PDT
All reviewed patches have been landed.  Closing bug.