Changeset 63074 in webkit


Ignore:
Timestamp:
Jul 12, 2010 5:31:36 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-12 François Sausset <François Sausset>

Reviewed by Kenneth Rohde Christiansen.

Update tests to check that msqrt and mfrac use style color to draw themselves
https://bugs.webkit.org/show_bug.cgi?id=41889

  • mathml/presentation/fractions.xhtml:
  • mathml/presentation/roots.xhtml:
  • platform/mac/mathml/presentation/fractions-expected.checksum:
  • platform/mac/mathml/presentation/fractions-expected.png:
  • platform/mac/mathml/presentation/fractions-expected.txt:
  • platform/mac/mathml/presentation/roots-expected.checksum:
  • platform/mac/mathml/presentation/roots-expected.png:
  • platform/mac/mathml/presentation/roots-expected.txt:

2010-07-12 François Sausset <François Sausset>

Reviewed by Kenneth Rohde Christiansen.

Fix a bug preventing msqrt and mfrac to use style color to draw themselves.
In mfrac, the fraction bar is now using the color defined by the element style instead of black.
In msqrt, the radical was always drawn in black due to a colorSpace problem.
https://bugs.webkit.org/show_bug.cgi?id=41889

Test: mathml/presentation/roots.xhtml
Test: mathml/presentation/fractions.xhtml

  • mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::paint):
  • mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::paint):
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63073 r63074  
     12010-07-12  François Sausset  <sausset@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Update tests to check that msqrt and mfrac use style color to draw themselves
     6        https://bugs.webkit.org/show_bug.cgi?id=41889
     7
     8        * mathml/presentation/fractions.xhtml:
     9        * mathml/presentation/roots.xhtml:
     10        * platform/mac/mathml/presentation/fractions-expected.checksum:
     11        * platform/mac/mathml/presentation/fractions-expected.png:
     12        * platform/mac/mathml/presentation/fractions-expected.txt:
     13        * platform/mac/mathml/presentation/roots-expected.checksum:
     14        * platform/mac/mathml/presentation/roots-expected.png:
     15        * platform/mac/mathml/presentation/roots-expected.txt:
     16
    1172010-07-12  Andreas Kling  <andreas.kling@nokia.com>
    218
  • trunk/LayoutTests/mathml/presentation/fractions.xhtml

    r56340 r63074  
    55<body>
    66<p id='t1'>simple: <math xmlns='http://www.w3.org/1998/Math/MathML'><mfrac><mn>1</mn>bad<mn>2</mn></mfrac></math></p>
    7 <p id='t2'>more complex:
     7<p id='t2'>more complex (should be red):
    88<math xmlns='http://www.w3.org/1998/Math/MathML'>
    9 <mfrac>
     9<mfrac style="color: red;">
    1010<mrow><mi>x</mi><mo>+</mo>bad<mn>1</mn></mrow>
    1111<mrow><mi>x</mi><mo>+</mo><mn>2</mn></mrow>
  • trunk/LayoutTests/mathml/presentation/roots.xhtml

    r58349 r63074  
    66</head>
    77<body>
    8 <p id='t1'>square root:
     8<p id='t1'>square root (should be red):
    99<math xmlns='http://www.w3.org/1998/Math/MathML'>
    10 <msqrt><mn>2</mn></msqrt>
     10<msqrt style="color: red;"><mn>2</mn></msqrt>
    1111</math></p>
    1212<p id='t2'>long square root:
  • trunk/LayoutTests/platform/mac/mathml/presentation/fractions-expected.checksum

    r62948 r63074  
    1 2a1263a431d687b0869eb38c4b4355f7
     107ca77e34591f0a4c83afb590a4cd258
  • trunk/LayoutTests/platform/mac/mathml/presentation/fractions-expected.txt

    r62948 r63074  
    1818                  text run at (3,2) width 8: "2"
    1919      RenderBlock {p} at (0,50) size 784x40
    20         RenderText {#text} at (0,10) size 98x18
    21           text run at (0,10) width 98: "more complex: "
    22         RenderBlock {math} at (98,0) size 34x40
    23           RenderBlock {mfrac} at (1,0) size 32x40
     20        RenderText {#text} at (0,10) size 197x18
     21          text run at (0,10) width 197: "more complex (should be red): "
     22        RenderBlock {math} at (197,0) size 34x40
     23          RenderBlock {mfrac} at (1,0) size 32x40 [color=#FF0000]
    2424            RenderBlock {mfrac} at (0,0) size 32x19
    2525              RenderBlock {mrow} at (3,0) size 26x19
  • trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.checksum

    r61861 r63074  
    1 9368f5f99f64929f293204b82b1ef74c
     132ee207ef5f9e6019f6bc7bf7ee6ed6f
  • trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.txt

    r61861 r63074  
    55    RenderBody {body} at (8,16) size 784x562
    66      RenderBlock {p} at (0,0) size 784x19
    7         RenderText {#text} at (0,0) size 78x18
    8           text run at (0,0) width 78: "square root: "
    9         RenderBlock {math} at (78,0) size 22x19
    10           RenderBlock {msqrt} at (1,0) size 20x19
     7        RenderText {#text} at (0,0) size 177x18
     8          text run at (0,0) width 177: "square root (should be red): "
     9        RenderBlock {math} at (177,0) size 22x19
     10          RenderBlock {msqrt} at (1,0) size 20x19 [color=#FF0000]
    1111            RenderInline {mn} at (0,0) size 8x16
    1212              RenderText {#text} at (12,3) size 8x16
  • trunk/WebCore/ChangeLog

    r63073 r63074  
     12010-07-12  François Sausset  <sausset@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Fix a bug preventing msqrt and mfrac to use style color to draw themselves.
     6        In mfrac, the fraction bar is now using the color defined by the element style instead of black.
     7        In msqrt, the radical was always drawn in black due to a colorSpace problem.
     8        https://bugs.webkit.org/show_bug.cgi?id=41889
     9
     10        Test: mathml/presentation/roots.xhtml
     11        Test: mathml/presentation/fractions.xhtml
     12
     13        * mathml/RenderMathMLFraction.cpp:
     14        (WebCore::RenderMathMLFraction::paint):
     15        * mathml/RenderMathMLSquareRoot.cpp:
     16        (WebCore::RenderMathMLSquareRoot::paint):
     17
    1182010-07-12  Andreas Kling  <andreas.kling@nokia.com>
    219
  • trunk/WebCore/mathml/RenderMathMLFraction.cpp

    r61861 r63074  
    169169    info.context->setStrokeThickness(static_cast<float>(m_lineThickness));
    170170    info.context->setStrokeStyle(SolidStroke);
    171     info.context->setStrokeColor(Color(0, 0, 0), sRGBColorSpace);
     171    info.context->setStrokeColor(style()->visitedDependentColor(CSSPropertyColor), sRGBColorSpace);
    172172   
    173173    info.context->drawLine(IntPoint(tx, ty), IntPoint(tx + offsetWidth(), ty));
  • trunk/WebCore/mathml/RenderMathMLSquareRoot.cpp

    r61861 r63074  
    118118    info.context->setStrokeThickness(gRadicalLineThickness * style()->fontSize());
    119119    info.context->setStrokeStyle(SolidStroke);
    120     info.context->setStrokeColor(style()->visitedDependentColor(CSSPropertyColor), sRGBColorSpace);
     120    info.context->setStrokeColor(style()->visitedDependentColor(CSSPropertyColor), DeviceColorSpace);
    121121    info.context->setLineJoin(MiterJoin);
    122122    info.context->setMiterLimit(style()->fontSize());
Note: See TracChangeset for help on using the changeset viewer.