Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(1)

Issue 8041039: Merge 95071 - Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized re... (Closed)

Created:
7 years, 9 months ago by jschuh
Modified:
7 years, 9 months ago
Reviewers:
adamk
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/835/
Visibility:
Public.

Description

Merge 95071 - Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized readBUG=60653 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95991

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -2 lines) Patch
A + LayoutTests/fast/css/counters/counter-cssText.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/css/counters/counter-cssText-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/css/CSSPrimitiveValue.cpp View 1 chunk +14 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
jschuh
7 years, 9 months ago (2011-09-26 21:16:12 UTC) #1
adamk
7 years, 9 months ago (2011-09-26 21:19:58 UTC) #2
lgtm

On Mon, Sep 26, 2011 at 2:16 PM,  <jschuh@chromium.org> wrote:
> Reviewers: adamk,
>
> Description:
> Merge 95071 - Fix cssText property of counter-valued CSSPrimitiveValue and
> avoid
> uninitialized readBUG=60653
>
> Please review this at http://codereview.chromium.org/8041039/
>
> SVN Base: http://svn.webkit.org/repository/webkit/branches/chromium/835/
>
> Affected files:
>  A  +  LayoutTests/fast/css/counters/counter-cssText-expected.txt
>  A  +  LayoutTests/fast/css/counters/counter-cssText.html
>  M     Source/WebCore/css/CSSPrimitiveValue.cpp
>
>
> ### BEGIN SVN COPY METADATA
> #$ svn cp -r 95071 trunk/LayoutTests/fast/css/counters/counter-cssText.html
> LayoutTests\fast\css\counters\counter-cssText.html ### WARNING: note
> non-trunk copy
> #$ svn cp -r 95071
> trunk/LayoutTests/fast/css/counters/counter-cssText-expected.txt
> LayoutTests\fast\css\counters\counter-cssText-expected.txt ### WARNING: note
> non-trunk copy
> ### END SVN COPY METADATA
> Index: LayoutTests/fast/css/counters/counter-cssText-expected.txt
> Index: LayoutTests/fast/css/counters/counter-cssText.html
> Index: Source/WebCore/css/CSSPrimitiveValue.cpp
> ===================================================================
> --- Source/WebCore/css/CSSPrimitiveValue.cpp    (revision 95989)
> +++ Source/WebCore/css/CSSPrimitiveValue.cpp    (working copy)
> @@ -742,12 +742,22 @@
>             text += m_value.string;
>             text += ")";
>             break;
> -        case CSS_COUNTER:
> -            text = "counter(";
> -            text += String::number(m_value.num);
> +        case CSS_COUNTER: {
> +            String separator = m_value.counter->separator();
> +            text = separator.isEmpty() ? "counter(" : "counters(";
> +            text += m_value.counter->identifier();
> +            if (!separator.isEmpty()) {
> +                text += ", ";
> +                text += quoteCSSStringIfNeeded(separator);
> +            }
> +            const char* listStyleName =
> getValueName(m_value.counter->listStyleNumber() + CSSValueDisc);
> +            if (listStyleName) {
> +                text += ", ";
> +                text += listStyleName;
> +            }
>             text += ")";
> -            // FIXME: Add list-style and separator
>             break;
> +        }
>         case CSS_RECT: {
>             DEFINE_STATIC_LOCAL(const String, rectParen, ("rect("));
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698