Show
Ignore:
Timestamp:
03/30/07 02:59:57 (22 months ago)
Author:
antti
Message:

Reviewed by Hyatt.

Render tree memory savings, part 1


  • Eliminate caching of monospace char width from RenderText. This optimization is not needed anymore since Font already caches space width (RenderText -4 bytes)
  • Eliminate caching of tab width from RenderBlock. Similary this optimization has become obsolete (RenderBlock -4 bytes)
  • platform/Font.cpp: (WebCore::WidthIterator::advance): (WebCore::Font::spaceWidth):
  • platform/Font.h: (WebCore::Font::tabWidth):
  • platform/TextStyle.h: (WebCore::TextStyle::TextStyle): (WebCore::TextStyle::allowTabs):
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintSelection): (WebCore::InlineTextBox::paintMarkedTextBackground): (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): (WebCore::InlineTextBox::paintTextMatchMarker): (WebCore::InlineTextBox::offsetForPosition): (WebCore::InlineTextBox::positionForOffset):
  • rendering/RenderBlock.cpp: (WebCore:::RenderFlow): (WebCore::RenderBlock::setStyle):
  • rendering/RenderBlock.h:
  • rendering/RenderObject.cpp:
  • rendering/RenderObject.h:
  • rendering/RenderText.cpp: (WebCore::RenderText::RenderText): (WebCore::RenderText::setStyle): (WebCore::RenderText::widthFromCache): (WebCore::RenderText::trimmedMinMaxWidth): (WebCore::RenderText::calcMinMaxWidthInternal): (WebCore::RenderText::setTextInternal): (WebCore::RenderText::width):
  • rendering/RenderText.h: (WebCore::RenderText::allowTabs):
  • rendering/bidi.cpp:
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/rendering/RenderBlock.h

    r20609 r20610  
    138138    RootInlineBox* constructLine(const BidiIterator& start, const BidiIterator& end); 
    139139    InlineFlowBox* createLineBoxes(RenderObject*); 
    140     int tabWidth(bool isWhitespacePre); 
    141140    void computeHorizontalPositionsForLine(RootInlineBox*, BidiState&); 
    142141    void computeVerticalPositionsForLine(RootInlineBox*); 
     
    460459 
    461460private: 
    462     // full width of a tab character 
    463     int m_tabWidth; 
    464      
     461 
    465462    // Column information. 
    466463    int m_desiredColumnWidth;