Changeset 125118 in webkit


Ignore:
Timestamp:
Aug 8, 2012 4:59:34 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

CanvasRenderContext2D::setFont() should ignore inherited properties and default keyword value
https://bugs.webkit.org/show_bug.cgi?id=93491

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Treat "inherit" as an invalid value. Also ignore the "default"
keyword that was previously treated as a font family. This second
change was done in the property validation and will also affect the
CSS font parsing, but it is probably harmless since font doesn't
recognize the default keyword anyway.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseFontFamily):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::setFont):

LayoutTests:

Unskipped tests that are now passing after this fix and removed wrong
expectations.

  • platform/chromium/TestExpectations:
  • platform/chromium/canvas/philip/tests/2d.text.font.parse.invalid-expected.txt: Removed.
  • platform/efl/Skipped:
  • platform/gtk/TestExpectations:
  • platform/mac/canvas/philip/tests/2d.text.font.parse.invalid-expected.txt: Removed.
  • platform/qt/Skipped:
Location:
trunk
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r125111 r125118  
     12012-08-08  Thiago Marcos P. Santos  <thiago.santos@intel.com>
     2
     3        CanvasRenderContext2D::setFont() should ignore inherited properties and default keyword value
     4        https://bugs.webkit.org/show_bug.cgi?id=93491
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Unskipped tests that are now passing after this fix and removed wrong
     9        expectations.
     10
     11        * platform/chromium/TestExpectations:
     12        * platform/chromium/canvas/philip/tests/2d.text.font.parse.invalid-expected.txt: Removed.
     13        * platform/efl/Skipped:
     14        * platform/gtk/TestExpectations:
     15        * platform/mac/canvas/philip/tests/2d.text.font.parse.invalid-expected.txt: Removed.
     16        * platform/qt/Skipped:
     17
    1182012-08-08  Roger Fong  <roger_fong@apple.com>
    219
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r125106 r125118  
    19111911BUGWK50859 : canvas/philip/tests/2d.text.font.parse.basic.html = TEXT
    19121912BUGWK50859 : canvas/philip/tests/2d.text.font.parse.complex.html = TEXT
    1913 BUGWK50859 : canvas/philip/tests/2d.text.font.parse.invalid.html = TEXT
    19141913BUGWK50859 : canvas/philip/tests/2d.text.font.parse.size.percentage.default.html = TEXT
    19151914BUGWK50859 : canvas/philip/tests/2d.text.font.parse.size.percentage.html = TEXT
     
    19171916BUGWK50859 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.font.parse.basic.html = TEXT
    19181917BUGWK50859 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.font.parse.complex.html = TEXT
    1919 BUGWK50859 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.font.parse.invalid.html = TEXT
    19201918BUGWK50859 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.font.parse.size.percentage.default.html = TEXT
    19211919BUGWK50859 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.font.parse.size.percentage.html = TEXT
  • trunk/LayoutTests/platform/efl/Skipped

    r124900 r125118  
    328328canvas/philip/tests/2d.text.font.parse.basic.html
    329329canvas/philip/tests/2d.text.font.parse.complex.html
    330 canvas/philip/tests/2d.text.font.parse.invalid.html
    331330canvas/philip/tests/2d.text.font.parse.size.percentage.html
    332331canvas/philip/tests/2d.text.font.parse.size.percentage.default.html
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r125062 r125118  
    901901BUGWKGTK : canvas/philip/tests/2d.text.font.parse.basic.html = TEXT
    902902BUGWKGTK : canvas/philip/tests/2d.text.font.parse.complex.html = TEXT
    903 BUGWKGTK : canvas/philip/tests/2d.text.font.parse.invalid.html = TEXT
    904903BUGWKGTK : canvas/philip/tests/2d.text.font.parse.size.percentage.html = TEXT
    905904BUGWKGTK : canvas/philip/tests/2d.text.font.parse.size.percentage.default.html = TEXT
  • trunk/LayoutTests/platform/qt/Skipped

    r124900 r125118  
    21162116canvas/philip/tests/2d.text.font.parse.basic.html
    21172117canvas/philip/tests/2d.text.font.parse.complex.html
    2118 canvas/philip/tests/2d.text.font.parse.invalid.html
    21192118canvas/philip/tests/2d.text.font.parse.size.percentage.default.html
    21202119canvas/philip/tests/2d.text.font.parse.size.percentage.html
  • trunk/Source/WebCore/ChangeLog

    r125116 r125118  
     12012-08-08  Thiago Marcos P. Santos  <thiago.santos@intel.com>
     2
     3        CanvasRenderContext2D::setFont() should ignore inherited properties and default keyword value
     4        https://bugs.webkit.org/show_bug.cgi?id=93491
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Treat "inherit" as an invalid value. Also ignore the "default"
     9        keyword that was previously treated as a font family. This second
     10        change was done in the property validation and will also affect the
     11        CSS font parsing, but it is probably harmless since font doesn't
     12        recognize the default keyword anyway.
     13
     14        * css/CSSParser.cpp:
     15        (WebCore::CSSParser::parseFontFamily):
     16        * html/canvas/CanvasRenderingContext2D.cpp:
     17        (WebCore::CanvasRenderingContext2D::setFont):
     18
    1192012-08-08  James Robinson  <jamesr@chromium.org>
    220
  • trunk/Source/WebCore/css/CSSParser.cpp

    r125016 r125118  
    48554855
    48564856    while (value) {
    4857         if (value->id == CSSValueInitial || value->id == CSSValueInherit)
     4857        if (value->id == CSSValueInitial || value->id == CSSValueInherit || value->id == CSSValueDefault)
    48584858            return 0;
    48594859        CSSParserValue* nextValue = m_valueList->next();
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r121987 r125118  
    19971997        return;
    19981998
     1999    RefPtr<CSSValue> fontValue = parsedStyle->getPropertyCSSValue(CSSPropertyFont);
     2000    if (fontValue && fontValue->isInheritedValue())
     2001        return;
     2002
    19992003    // The parse succeeded.
    20002004    realizeSaves();
Note: See TracChangeset for help on using the changeset viewer.