Changeset 46846 in webkit


Ignore:
Timestamp:
Aug 6, 2009 8:57:56 AM (15 years ago)
Author:
Simon Hausmann
Message:

2009-08-06 Laszlo Gombos <Laszlo Gombos>

Reviewed by Darin Adler.

cssgrammar.cpp fails to compile with RVCT compiler
https://bugs.webkit.org/show_bug.cgi?id=27952

  • css/CSSGrammar.y: Do not convert to String to get rid of the stray memory allocation
  • platform/text/StringImpl.cpp: (WebCore::equalIgnoringCase):
  • platform/text/StringImpl.h: (WebCore::equalIgnoringCase): Add charactersEqualIgnoringCase function that works with a character pointer and length
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r46845 r46846  
     12009-08-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        cssgrammar.cpp fails to compile with RVCT compiler
     6        https://bugs.webkit.org/show_bug.cgi?id=27952
     7
     8        * css/CSSGrammar.y: Do not convert to String to get rid of the stray
     9        memory allocation
     10
     11        * platform/text/StringImpl.cpp:
     12        (WebCore::equalIgnoringCase):
     13        * platform/text/StringImpl.h:
     14        (WebCore::equalIgnoringCase): Add charactersEqualIgnoringCase
     15          function that works with a character pointer and length
     16
    1172009-08-06  Drew Wilson  <atwilson@google.com>
    218
  • trunk/WebCore/css/CSSGrammar.y

    r45943 r46846  
    741741        $$.id = 0; $$.isInt = false; $$.unit = CSSPrimitiveValue::CSS_NUMBER;
    742742        CSSParserString& str = $1;
    743         if (equalIgnoringCase(static_cast<const String&>(str), "from"))
     743        if (equalIgnoringCase("from", str.characters, str.length))
    744744            $$.fValue = 0;
    745         else if (equalIgnoringCase(static_cast<const String&>(str), "to"))
     745        else if (equalIgnoringCase("to", str.characters, str.length))
    746746            $$.fValue = 100;
    747747        else
  • trunk/WebCore/platform/text/StringImpl.cpp

    r45946 r46846  
    540540}
    541541
    542 static bool equalIgnoringCase(const UChar* a, const char* b, int length)
     542bool equalIgnoringCase(const UChar* a, const char* b, unsigned length)
    543543{
    544544    ASSERT(length >= 0);
  • trunk/WebCore/platform/text/StringImpl.h

    r44831 r46846  
    221221bool equalIgnoringCase(StringImpl*, const char*);
    222222inline bool equalIgnoringCase(const char* a, StringImpl* b) { return equalIgnoringCase(b, a); }
     223bool equalIgnoringCase(const UChar* a, const char* b, unsigned length);
     224inline bool equalIgnoringCase(const char* a, const UChar* b, unsigned length) { return equalIgnoringCase(b, a, length); }
    223225
    224226// Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
Note: See TracChangeset for help on using the changeset viewer.