[webkit-changes] cvs commit: WebCore/kwq KWQKURL.mm KWQString.mm WebCoreTextRendererFactory.h

Maciej mjs at opensource.apple.com
Tue Oct 18 17:03:48 PDT 2005


mjs         05/10/18 17:03:47

  Modified:    .        ChangeLog
               khtml/css cssstyleselector.cpp
               khtml/rendering bidi.cpp
               kwq      KWQKURL.mm KWQString.mm
                        WebCoreTextRendererFactory.h
  Log:
          Reviewed and landed by Maciej.
  
          - some simple changes that amount to a < 1% speedup.
  
          * khtml/css/cssstyleselector.cpp:
          (khtml::CSSStyleSelector::applyProperty):
          * khtml/rendering/bidi.cpp:
          (khtml::BidiIterator::direction):
          * kwq/KWQKURL.mm:
          (hasSlashDotOrDotDot):
          * kwq/KWQString.mm:
          (QString::~QString):
          * kwq/WebCoreTextRendererFactory.h:
  
  Revision  Changes    Path
  1.251     +16 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.250
  retrieving revision 1.251
  diff -u -r1.250 -r1.251
  --- ChangeLog	18 Oct 2005 20:45:31 -0000	1.250
  +++ ChangeLog	19 Oct 2005 00:03:41 -0000	1.251
  @@ -1,3 +1,19 @@
  +2005-10-18  Darin Adler  <darin at apple.com>
  +
  +        Reviewed and landed by Maciej.
  +
  +        - some simple changes that amount to a < 1% speedup.
  +
  +        * khtml/css/cssstyleselector.cpp:
  +        (khtml::CSSStyleSelector::applyProperty):
  +        * khtml/rendering/bidi.cpp:
  +        (khtml::BidiIterator::direction):
  +        * kwq/KWQKURL.mm:
  +        (hasSlashDotOrDotDot):
  +        * kwq/KWQString.mm:
  +        (QString::~QString):
  +        * kwq/WebCoreTextRendererFactory.h:
  +
   2005-10-18  Maciej Stachowiak  <mjs at apple.com>
   
           - back out the last change, it caused a regression with painting of offscreen plugins
  
  
  
  1.210     +5 -4      WebCore/khtml/css/cssstyleselector.cpp
  
  Index: cssstyleselector.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.cpp,v
  retrieving revision 1.209
  retrieving revision 1.210
  diff -u -r1.209 -r1.210
  --- cssstyleselector.cpp	3 Oct 2005 21:12:07 -0000	1.209
  +++ cssstyleselector.cpp	19 Oct 2005 00:03:44 -0000	1.210
  @@ -1822,9 +1822,10 @@
       Length l;
       bool apply = false;
   
  -    bool isInherit = (parentNode && value->cssValueType() == CSSValue::CSS_INHERIT);
  -    bool isInitial = (value->cssValueType() == CSSValue::CSS_INITIAL) ||
  -                     (!parentNode && value->cssValueType() == CSSValue::CSS_INHERIT);
  +    unsigned short valueType = value->cssValueType();
  +
  +    bool isInherit = parentNode && valueType == CSSValue::CSS_INHERIT;
  +    bool isInitial = valueType == CSSValue::CSS_INITIAL || (!parentNode && valueType == CSSValue::CSS_INHERIT);
   
       // These properties are used to set the correct margins/padding on RTL lists.
       if (id == CSS_PROP__KHTML_MARGIN_START)
  @@ -3764,7 +3765,7 @@
               style->setBoxSizing(BORDER_BOX);
           break;
       case CSS_PROP__KHTML_MARQUEE:
  -        if (value->cssValueType() != CSSValue::CSS_INHERIT || !parentNode) return;
  +        if (valueType != CSSValue::CSS_INHERIT || !parentNode) return;
           style->setMarqueeDirection(parentStyle->marqueeDirection());
           style->setMarqueeIncrement(parentStyle->marqueeIncrement());
           style->setMarqueeSpeed(parentStyle->marqueeSpeed());
  
  
  
  1.151     +1 -1      WebCore/khtml/rendering/bidi.cpp
  
  Index: bidi.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/bidi.cpp,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- bidi.cpp	18 Oct 2005 03:15:30 -0000	1.150
  +++ bidi.cpp	19 Oct 2005 00:03:45 -0000	1.151
  @@ -353,7 +353,7 @@
       return text->text()[pos];
   }
   
  -inline QChar::Direction BidiIterator::direction() const
  +ALWAYS_INLINE QChar::Direction BidiIterator::direction() const
   {
       if (!obj)
           return QChar::DirON;
  
  
  
  1.94      +3 -3      WebCore/kwq/KWQKURL.mm
  
  Index: KWQKURL.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKURL.mm,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- KWQKURL.mm	3 Oct 2005 21:13:05 -0000	1.93
  +++ KWQKURL.mm	19 Oct 2005 00:03:46 -0000	1.94
  @@ -1056,11 +1056,11 @@
   
   static inline bool hasSlashDotOrDotDot(const char *str)
   {
  -    const char *p = str;
  +    const unsigned char *p = reinterpret_cast<const unsigned char *>(str);
       if (!*p)
           return false;
  -    char pc = *p;
  -    while (char c = *++p) {
  +    unsigned char pc = *p;
  +    while (unsigned char c = *++p) {
           if (c == '.' && (pc == '/' || pc == '.'))
               return true;
           pc = c;
  
  
  
  1.143     +2 -0      WebCore/kwq/KWQString.mm
  
  Index: KWQString.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQString.mm,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- KWQString.mm	3 Oct 2005 21:13:09 -0000	1.142
  +++ KWQString.mm	19 Oct 2005 00:03:46 -0000	1.143
  @@ -854,7 +854,9 @@
       if (needToFreeHandle)
           freeHandle(dataHandle);
   
  +#ifndef NDEBUG
       dataHandle = 0;
  +#endif
   }
   
   
  
  
  
  1.14      +3 -3      WebCore/kwq/WebCoreTextRendererFactory.h
  
  Index: WebCoreTextRendererFactory.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/WebCoreTextRendererFactory.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- WebCoreTextRendererFactory.h	6 Oct 2005 15:45:55 -0000	1.13
  +++ WebCoreTextRendererFactory.h	19 Oct 2005 00:03:47 -0000	1.14
  @@ -32,9 +32,9 @@
   
   typedef struct WebCoreFont {
       NSFont *font;
  -    unsigned syntheticBold : 1;
  -    unsigned syntheticOblique : 1;
  -    unsigned forPrinter : 1;
  +    bool syntheticBold;
  +    bool syntheticOblique;
  +    bool forPrinter;
   } WebCoreFont;
   
   #ifdef __cplusplus
  
  
  



More information about the webkit-changes mailing list