Reviewed by Mitz.
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Nov 2006 21:49:13 +0000 (21:49 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Nov 2006 21:49:13 +0000 (21:49 +0000)
        Fix for http://bugs.webkit.org/show_bug.cgi?id=11474
        Rename the "p" member variable of the PaintInfo struct to "context"

        - Renames the 'p' and 'r' member variables of the PaintInfo struct to
          'context' and 'rect' respectively.

        - Assorted surrounding cleanups.

        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::paint):
        * rendering/EllipsisBox.h:
        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::paint):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paint):
        (WebCore::InlineFlowBox::paintBackground):
        (WebCore::InlineFlowBox::paintBackgroundAndBorder):
        (WebCore::InlineFlowBox::paintDecorations):
        * rendering/InlineFlowBox.h:
        * rendering/InlineRunBox.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        * rendering/InlineTextBox.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paint):
        (WebCore::RenderBlock::paintChildren):
        (WebCore::RenderBlock::paintCaret):
        (WebCore::RenderBlock::paintObject):
        (WebCore::RenderBlock::paintFloats):
        (WebCore::RenderBlock::paintEllipsisBoxes):
        (WebCore::RenderBlock::paintSelection):
        (WebCore::RenderBlock::fillSelectionGaps):
        (WebCore::RenderBlock::fillInlineSelectionGaps):
        (WebCore::RenderBlock::fillBlockSelectionGaps):
        (WebCore::RenderBlock::fillHorizontalSelectionGap):
        (WebCore::RenderBlock::fillVerticalSelectionGap):
        (WebCore::RenderBlock::fillLeftSelectionGap):
        (WebCore::RenderBlock::fillRightSelectionGap):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paint):
        (WebCore::RenderBox::paintRootBoxDecorations):
        (WebCore::RenderBox::paintBoxDecorations):
        * rendering/RenderBox.h:
        * rendering/RenderButton.cpp:
        (WebCore::RenderButton::paintObject):
        * rendering/RenderFieldset.cpp:
        (WebCore::RenderFieldset::paintBoxDecorations):
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::continuationBefore):
        (WebCore::RenderFlow::addChildWithContinuation):
        (WebCore::RenderFlow::addChild):
        (WebCore::RenderFlow::attachLineBox):
        (WebCore::RenderFlow::destroy):
        (WebCore::RenderFlow::dirtyLinesFromChangedChild):
        (WebCore::RenderFlow::dirtyLineBoxes):
        (WebCore::RenderFlow::createInlineBox):
        (WebCore::RenderFlow::paintLines):
        (WebCore::RenderFlow::getAbsoluteRepaintRect):
        (WebCore::RenderFlow::lowestPosition):
        (WebCore::RenderFlow::rightmostPosition):
        (WebCore::RenderFlow::leftmostPosition):
        (WebCore::RenderFlow::caretRect):
        (WebCore::RenderFlow::addFocusRingRects):
        (WebCore::RenderFlow::paintOutline):
        (WebCore::RenderFlow::paintOutlineForLine):
        * rendering/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::paint):
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::paint):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paint):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintObject):
        (WebCore::RenderListBox::paintScrollbar):
        (WebCore::RenderListBox::paintItemForeground):
        (WebCore::RenderListBox::paintItemBackground):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::paint):
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::paintObject):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::paint):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::PaintInfo::PaintInfo):
        (WebCore::RenderObject::paintBoxDecorations):
        (WebCore::RenderObject::paintingRootForChildren):
        (WebCore::RenderObject::shouldPaintWithinRoot):
        (WebCore::RenderObject::printBoxDecorations):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::shouldPaint):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::paint):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::paint):
        * rendering/RenderSVGText.h:
        (WebCore::RenderSVGText::renderName):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::paint):
        (WebCore::RenderTable::paintBoxDecorations):
        * rendering/RenderTable.h:
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paint):
        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
        (WebCore::RenderTableCell::paintBoxDecorations):
        * rendering/RenderTableCell.h:
        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::paint):
        * rendering/RenderTableRow.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paint):
        * rendering/RenderTableSection.h:
        (WebCore::RenderTableSection::getBaseline):
        (WebCore::RenderTableSection::setNeedCellRecalc):
        * rendering/RenderText.h:
        (WebCore::RenderText::renderName):
        (WebCore::RenderText::paint):
        (WebCore::RenderText::element):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paint):
        (WebCore::RenderTheme::paintBorderOnly):
        (WebCore::RenderTheme::paintDecorations):
        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::RenderTheme):
        (WebCore::RenderTheme::~RenderTheme):
        (WebCore::RenderTheme::controlSupportsTints):
        (WebCore::RenderTheme::adjustRepaintRect):
        (WebCore::RenderTheme::themeChanged):
        (WebCore::RenderTheme::supportsHover):
        (WebCore::RenderTheme::paintCheckbox):
        (WebCore::RenderTheme::setCheckboxSize):
        (WebCore::RenderTheme::paintRadio):
        (WebCore::RenderTheme::setRadioSize):
        (WebCore::RenderTheme::paintButton):
        (WebCore::RenderTheme::setButtonSize):
        (WebCore::RenderTheme::paintTextField):
        (WebCore::RenderTheme::paintTextArea):
        (WebCore::RenderTheme::paintMenuList):
        (WebCore::RenderTheme::paintMenuListButton):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintCheckbox):
        (WebCore::RenderThemeMac::paintRadio):
        (WebCore::RenderThemeMac::paintButton):
        (WebCore::RenderThemeMac::paintTextField):
        (WebCore::RenderThemeMac::paintTextArea):
        (WebCore::RenderThemeMac::paintMenuList):
        (WebCore::RenderThemeMac::paintMenuListButtonGradients):
        (WebCore::RenderThemeMac::paintMenuListButton):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::paint):
        (WebCore::RenderView::paintBoxDecorations):
        * rendering/RenderView.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::paint):
        * rendering/RenderWidget.h:
        (WebCore::RenderWidget::isWidget):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::paintEllipsisBox):
        (WebCore::RootInlineBox::paintCustomHighlight):
        (WebCore::RootInlineBox::paint):
        (WebCore::RootInlineBox::fillLineSelectionGap):
        * rendering/RootInlineBox.h:
        * rendering/SVGInlineFlowBox.cpp:
        (WebCore::paintSVGInlineFlow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

51 files changed:
WebCore/ChangeLog
WebCore/rendering/EllipsisBox.cpp
WebCore/rendering/EllipsisBox.h
WebCore/rendering/InlineBox.cpp
WebCore/rendering/InlineFlowBox.cpp
WebCore/rendering/InlineFlowBox.h
WebCore/rendering/InlineRunBox.h
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/InlineTextBox.h
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderButton.cpp
WebCore/rendering/RenderFieldset.cpp
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderFlow.cpp
WebCore/rendering/RenderForeignObject.cpp
WebCore/rendering/RenderHTMLCanvas.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderListMarker.cpp
WebCore/rendering/RenderMenuList.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderPath.cpp
WebCore/rendering/RenderReplaced.cpp
WebCore/rendering/RenderSVGContainer.cpp
WebCore/rendering/RenderSVGContainer.h
WebCore/rendering/RenderSVGImage.cpp
WebCore/rendering/RenderSVGText.cpp
WebCore/rendering/RenderSVGText.h
WebCore/rendering/RenderTable.cpp
WebCore/rendering/RenderTable.h
WebCore/rendering/RenderTableCell.cpp
WebCore/rendering/RenderTableCell.h
WebCore/rendering/RenderTableRow.cpp
WebCore/rendering/RenderTableRow.h
WebCore/rendering/RenderTableSection.cpp
WebCore/rendering/RenderTableSection.h
WebCore/rendering/RenderText.h
WebCore/rendering/RenderTheme.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.mm
WebCore/rendering/RenderView.cpp
WebCore/rendering/RenderView.h
WebCore/rendering/RenderWidget.cpp
WebCore/rendering/RenderWidget.h
WebCore/rendering/RootInlineBox.cpp
WebCore/rendering/RootInlineBox.h
WebCore/rendering/SVGInlineFlowBox.cpp

index d6d74de..6e43a2c 100644 (file)
@@ -1,3 +1,180 @@
+2006-11-01  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Mitz.
+
+        Fix for http://bugs.webkit.org/show_bug.cgi?id=11474
+        Rename the "p" member variable of the PaintInfo struct to "context"
+
+        - Renames the 'p' and 'r' member variables of the PaintInfo struct to
+          'context' and 'rect' respectively.
+
+        - Assorted surrounding cleanups.
+
+        * rendering/EllipsisBox.cpp:
+        (WebCore::EllipsisBox::paint):
+        * rendering/EllipsisBox.h:
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::paint):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::paint):
+        (WebCore::InlineFlowBox::paintBackground):
+        (WebCore::InlineFlowBox::paintBackgroundAndBorder):
+        (WebCore::InlineFlowBox::paintDecorations):
+        * rendering/InlineFlowBox.h:
+        * rendering/InlineRunBox.h:
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::paint):
+        * rendering/InlineTextBox.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paint):
+        (WebCore::RenderBlock::paintChildren):
+        (WebCore::RenderBlock::paintCaret):
+        (WebCore::RenderBlock::paintObject):
+        (WebCore::RenderBlock::paintFloats):
+        (WebCore::RenderBlock::paintEllipsisBoxes):
+        (WebCore::RenderBlock::paintSelection):
+        (WebCore::RenderBlock::fillSelectionGaps):
+        (WebCore::RenderBlock::fillInlineSelectionGaps):
+        (WebCore::RenderBlock::fillBlockSelectionGaps):
+        (WebCore::RenderBlock::fillHorizontalSelectionGap):
+        (WebCore::RenderBlock::fillVerticalSelectionGap):
+        (WebCore::RenderBlock::fillLeftSelectionGap):
+        (WebCore::RenderBlock::fillRightSelectionGap):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paint):
+        (WebCore::RenderBox::paintRootBoxDecorations):
+        (WebCore::RenderBox::paintBoxDecorations):
+        * rendering/RenderBox.h:
+        * rendering/RenderButton.cpp:
+        (WebCore::RenderButton::paintObject):
+        * rendering/RenderFieldset.cpp:
+        (WebCore::RenderFieldset::paintBoxDecorations):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        * rendering/RenderFlow.cpp:
+        (WebCore::RenderFlow::continuationBefore):
+        (WebCore::RenderFlow::addChildWithContinuation):
+        (WebCore::RenderFlow::addChild):
+        (WebCore::RenderFlow::attachLineBox):
+        (WebCore::RenderFlow::destroy):
+        (WebCore::RenderFlow::dirtyLinesFromChangedChild):
+        (WebCore::RenderFlow::dirtyLineBoxes):
+        (WebCore::RenderFlow::createInlineBox):
+        (WebCore::RenderFlow::paintLines):
+        (WebCore::RenderFlow::getAbsoluteRepaintRect):
+        (WebCore::RenderFlow::lowestPosition):
+        (WebCore::RenderFlow::rightmostPosition):
+        (WebCore::RenderFlow::leftmostPosition):
+        (WebCore::RenderFlow::caretRect):
+        (WebCore::RenderFlow::addFocusRingRects):
+        (WebCore::RenderFlow::paintOutline):
+        (WebCore::RenderFlow::paintOutlineForLine):
+        * rendering/RenderForeignObject.cpp:
+        (WebCore::RenderForeignObject::paint):
+        * rendering/RenderHTMLCanvas.cpp:
+        (WebCore::RenderHTMLCanvas::paint):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paint):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayer):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintObject):
+        (WebCore::RenderListBox::paintScrollbar):
+        (WebCore::RenderListBox::paintItemForeground):
+        (WebCore::RenderListBox::paintItemBackground):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::paint):
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::paintObject):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::paint):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::PaintInfo::PaintInfo):
+        (WebCore::RenderObject::paintBoxDecorations):
+        (WebCore::RenderObject::paintingRootForChildren):
+        (WebCore::RenderObject::shouldPaintWithinRoot):
+        (WebCore::RenderObject::printBoxDecorations):
+        * rendering/RenderPath.cpp:
+        (WebCore::RenderPath::paint):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        * rendering/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::paint):
+        * rendering/RenderSVGContainer.h:
+        * rendering/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::paint):
+        * rendering/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::paint):
+        * rendering/RenderSVGText.h:
+        (WebCore::RenderSVGText::renderName):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paint):
+        (WebCore::RenderTable::paintBoxDecorations):
+        * rendering/RenderTable.h:
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::paint):
+        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+        (WebCore::RenderTableCell::paintBoxDecorations):
+        * rendering/RenderTableCell.h:
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::paint):
+        * rendering/RenderTableRow.h:
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paint):
+        * rendering/RenderTableSection.h:
+        (WebCore::RenderTableSection::getBaseline):
+        (WebCore::RenderTableSection::setNeedCellRecalc):
+        * rendering/RenderText.h:
+        (WebCore::RenderText::renderName):
+        (WebCore::RenderText::paint):
+        (WebCore::RenderText::element):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::paint):
+        (WebCore::RenderTheme::paintBorderOnly):
+        (WebCore::RenderTheme::paintDecorations):
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::RenderTheme):
+        (WebCore::RenderTheme::~RenderTheme):
+        (WebCore::RenderTheme::controlSupportsTints):
+        (WebCore::RenderTheme::adjustRepaintRect):
+        (WebCore::RenderTheme::themeChanged):
+        (WebCore::RenderTheme::supportsHover):
+        (WebCore::RenderTheme::paintCheckbox):
+        (WebCore::RenderTheme::setCheckboxSize):
+        (WebCore::RenderTheme::paintRadio):
+        (WebCore::RenderTheme::setRadioSize):
+        (WebCore::RenderTheme::paintButton):
+        (WebCore::RenderTheme::setButtonSize):
+        (WebCore::RenderTheme::paintTextField):
+        (WebCore::RenderTheme::paintTextArea):
+        (WebCore::RenderTheme::paintMenuList):
+        (WebCore::RenderTheme::paintMenuListButton):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintCheckbox):
+        (WebCore::RenderThemeMac::paintRadio):
+        (WebCore::RenderThemeMac::paintButton):
+        (WebCore::RenderThemeMac::paintTextField):
+        (WebCore::RenderThemeMac::paintTextArea):
+        (WebCore::RenderThemeMac::paintMenuList):
+        (WebCore::RenderThemeMac::paintMenuListButtonGradients):
+        (WebCore::RenderThemeMac::paintMenuListButton):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::paint):
+        (WebCore::RenderView::paintBoxDecorations):
+        * rendering/RenderView.h:
+        * rendering/RenderWidget.cpp:
+        (WebCore::RenderWidget::paint):
+        * rendering/RenderWidget.h:
+        (WebCore::RenderWidget::isWidget):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::paintEllipsisBox):
+        (WebCore::RootInlineBox::paintCustomHighlight):
+        (WebCore::RootInlineBox::paint):
+        (WebCore::RootInlineBox::fillLineSelectionGap):
+        * rendering/RootInlineBox.h:
+        * rendering/SVGInlineFlowBox.cpp:
+        (WebCore::paintSVGInlineFlow):
+
 2006-11-01  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Oliver, Brady.
index f07a0cc..15efc66 100644 (file)
 
 namespace WebCore {
 
-void EllipsisBox::paint(RenderObject::PaintInfo& i, int _tx, int _ty)
+void EllipsisBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    GraphicsContext* p = i.p;
-    RenderStyle* _style = m_firstLine ? m_object->firstLineStyle() : m_object->style();
-    if (_style->font() != p->font())
-        p->setFont(_style->font());
+    GraphicsContext* context = paintInfo.context;
+    RenderStyle* style = m_object->style(m_firstLine);
+    if (style->font() != context->font())
+        context->setFont(style->font());
 
-    Color textColor = _style->color();
-    if (textColor != p->pen().color())
-        p->setPen(textColor);
+    Color textColor = style->color();
+    if (textColor != context->pen().color())
+        context->setPen(textColor);
     bool setShadow = false;
-    if (_style->textShadow()) {
-        p->setShadow(IntSize(_style->textShadow()->x, _style->textShadow()->y),
-                     _style->textShadow()->blur, _style->textShadow()->color);
+    if (style->textShadow()) {
+        context->setShadow(IntSize(style->textShadow()->x, style->textShadow()->y),
+                           style->textShadow()->blur, style->textShadow()->color);
         setShadow = true;
     }
 
     const String& str = m_str;
-    TextStyle textStyle(0, 0, 0, false, _style->visuallyOrdered());
-    p->drawText(TextRun(str.impl()), IntPoint(m_x + _tx, m_y + _ty + m_baseline), textStyle);
+    TextStyle textStyle(0, 0, 0, false, style->visuallyOrdered());
+    context->drawText(TextRun(str.impl()), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
 
     if (setShadow)
-        p->clearShadow();
+        context->clearShadow();
 
     if (m_markupBox) {
         // Paint the markup box
-        _tx += m_x + m_width - m_markupBox->xPos();
-        _ty += m_y + m_baseline - (m_markupBox->yPos() + m_markupBox->baseline());
-        m_markupBox->paint(i, _tx, _ty);
+        tx += m_x + m_width - m_markupBox->xPos();
+        ty += m_y + m_baseline - (m_markupBox->yPos() + m_markupBox->baseline());
+        m_markupBox->paint(paintInfo, tx, ty);
     }
 }
 
index 60cecc5..e83a031 100644 (file)
@@ -19,8 +19,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef EllipsisBox_H
-#define EllipsisBox_H
+#ifndef EllipsisBox_h
+#define EllipsisBox_h
 
 #include "InlineBox.h"
 
@@ -39,9 +39,9 @@ public:
         , m_markupBox(markupBox)
     {
     }
-    
-    virtual void paint(RenderObject::PaintInfo&, int _tx, int _ty);
-    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int _x, int _y, int _tx, int _ty);
+
+    virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty);
 
 private:
     AtomicString m_str;
@@ -50,4 +50,4 @@ private:
 
 } // namespace WebCore
 
-#endif // EllipsisBox_H
+#endif // EllipsisBox_h
index 1b76838..7bda229 100644 (file)
@@ -125,17 +125,17 @@ void InlineBox::adjustPosition(int dx, int dy)
         m_object->setPos(m_object->xPos() + dx, m_object->yPos() + dy);
 }
 
-void InlineBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
+void InlineBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    if (!object()->shouldPaintWithinRoot(i) || (i.phase != PaintPhaseForeground && i.phase != PaintPhaseSelection))
+    if (!object()->shouldPaintWithinRoot(paintInfo) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
         return;
 
     // Paint all phases of replaced elements atomically, as though the replaced element established its
     // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
     // specification.)
-    bool paintSelectionOnly = i.phase == PaintPhaseSelection;
-    RenderObject::PaintInfo info(i);
-    info.phase = paintSelectionOnly ? i.phase : PaintPhaseBlockBackground;
+    bool paintSelectionOnly = paintInfo.phase == PaintPhaseSelection;
+    RenderObject::PaintInfo info(paintInfo);
+    info.phase = paintSelectionOnly ? paintInfo.phase : PaintPhaseBlockBackground;
     object()->paint(info, tx, ty);
     if (!paintSelectionOnly) {
         info.phase = PaintPhaseChildBlockBackgrounds;
index 73086db..55845c1 100644 (file)
@@ -543,32 +543,30 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
     return false;
 }
 
-void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
+void InlineFlowBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    int xPos = tx + m_x - object()->maximalOutlineSize(i.phase);
-    int w = width() + 2 * object()->maximalOutlineSize(i.phase);
-    bool intersectsDamageRect = xPos < i.r.right() && xPos + w > i.r.x();
-    
-    if (intersectsDamageRect && i.phase != PaintPhaseChildOutlines) {
-        if (i.phase == PaintPhaseOutline || i.phase == PaintPhaseSelfOutline) {
+    int xPos = tx + m_x - object()->maximalOutlineSize(paintInfo.phase);
+    int w = width() + 2 * object()->maximalOutlineSize(paintInfo.phase);
+    bool intersectsDamageRect = xPos < paintInfo.rect.right() && xPos + w > paintInfo.rect.x();
+
+    if (intersectsDamageRect && paintInfo.phase != PaintPhaseChildOutlines) {
+        if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) {
             // Add ourselves to the paint info struct's list of inlines that need to paint their
             // outlines.
             if (object()->style()->visibility() == VISIBLE && object()->hasOutline() &&
-                !object()->isInlineContinuation() && !isRootInlineBox()) {
-                i.outlineObjects->add(flowObject());
-            }
-        }
-        else {
+                    !object()->isInlineContinuation() && !isRootInlineBox())
+                paintInfo.outlineObjects->add(flowObject());
+        } else {
             // 1. Paint our background and border.
-            paintBackgroundAndBorder(i, tx, ty);
-            
+            paintBackgroundAndBorder(paintInfo, tx, ty);
+
             // 2. Paint our underline and overline.
-            paintDecorations(i, tx, ty, false);
+            paintDecorations(paintInfo, tx, ty, false);
         }
     }
 
-    PaintPhase paintPhase = i.phase == PaintPhaseChildOutlines ? PaintPhaseOutline : i.phase;
-    RenderObject::PaintInfo childInfo(i);
+    PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPhaseOutline : paintInfo.phase;
+    RenderObject::PaintInfo childInfo(paintInfo);
     childInfo.phase = paintPhase;
 
     // 3. Paint our children.
@@ -580,8 +578,8 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
     }
 
     // 4. Paint our strike-through
-    if (intersectsDamageRect && (i.phase == PaintPhaseForeground || i.phase == PaintPhaseSelection))
-        paintDecorations(i, tx, ty, true);
+    if (intersectsDamageRect && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
+        paintDecorations(paintInfo, tx, ty, true);
 }
 
 void InlineFlowBox::paintBackgrounds(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer,
@@ -593,13 +591,13 @@ void InlineFlowBox::paintBackgrounds(GraphicsContext* p, const Color& c, const B
     paintBackground(p, c, bgLayer, my, mh, _tx, _ty, w, h);
 }
 
-void InlineFlowBox::paintBackground(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer,
-                                    int my, int mh, int _tx, int _ty, int w, int h)
+void InlineFlowBox::paintBackground(GraphicsContext* context, const Color& c, const BackgroundLayer* bgLayer,
+                                    int my, int mh, int tx, int ty, int w, int h)
 {
     CachedImage* bg = bgLayer->backgroundImage();
     bool hasBackgroundImage = bg && bg->canRender();
     if (!hasBackgroundImage || (!prevLineBox() && !nextLineBox()) || !parent())
-        object()->paintBackgroundExtended(p, c, bgLayer, my, mh, _tx, _ty, w, h, 
+        object()->paintBackgroundExtended(context, c, bgLayer, my, mh, tx, ty, w, h, 
                                           borderLeft(), borderRight(), paddingLeft(), paddingRight());
     else {
         // We have a background image that spans multiple lines.
@@ -613,47 +611,47 @@ void InlineFlowBox::paintBackground(GraphicsContext* p, const Color& c, const Ba
         int xOffsetOnLine = 0;
         for (InlineRunBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
             xOffsetOnLine += curr->width();
-        int startX = _tx - xOffsetOnLine;
+        int startX = tx - xOffsetOnLine;
         int totalWidth = xOffsetOnLine;
         for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
             totalWidth += curr->width();
-        p->save();
-        p->clip(IntRect(_tx, _ty, width(), height()));
-        object()->paintBackgroundExtended(p, c, bgLayer, my, mh, startX, _ty,
+        context->save();
+        context->clip(IntRect(tx, ty, width(), height()));
+        object()->paintBackgroundExtended(context, c, bgLayer, my, mh, startX, ty,
                                           totalWidth, h, borderLeft(), borderRight(), paddingLeft(), paddingRight());
-        p->restore();
+        context->restore();
     }
 }
 
-void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx, int _ty)
+void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    if (!object()->shouldPaintWithinRoot(i) || object()->style()->visibility() != VISIBLE ||
-        i.phase != PaintPhaseForeground)
+    if (!object()->shouldPaintWithinRoot(paintInfo) || object()->style()->visibility() != VISIBLE ||
+            paintInfo.phase != PaintPhaseForeground)
         return;
 
     // Move x/y to our coordinates.
-    _tx += m_x;
-    _ty += m_y;
+    tx += m_x;
+    ty += m_y;
     
     int w = width();
     int h = height();
 
-    int my = max(_ty, i.r.y());
+    int my = max(ty, paintInfo.rect.y());
     int mh;
-    if (_ty < i.r.y())
-        mh = max(0, h - (i.r.y() - _ty));
+    if (ty < paintInfo.rect.y())
+        mh = max(0, h - (paintInfo.rect.y() - ty));
     else
-        mh = min(i.r.height(), h);
+        mh = min(paintInfo.rect.height(), h);
 
-    GraphicsContext* p = i.p;
+    GraphicsContext* context = paintInfo.context;
     
     // You can use p::first-line to specify a background. If so, the root line boxes for
     // a line may actually have to paint a background.
     RenderStyle* styleToUse = object()->style(m_firstLine);
     if ((!parent() && m_firstLine && styleToUse != object()->style()) || 
-        (parent() && object()->shouldPaintBackgroundOrBorder())) {
+            (parent() && object()->shouldPaintBackgroundOrBorder())) {
         Color c = styleToUse->backgroundColor();
-        paintBackgrounds(p, c, styleToUse->backgroundLayers(), my, mh, _tx, _ty, w, h);
+        paintBackgrounds(context, c, styleToUse->backgroundLayers(), my, mh, tx, ty, w, h);
 
         // :first-line cannot be used to put borders on a line. Always paint borders with our
         // non-first-line style.
@@ -662,11 +660,11 @@ void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx
             bool hasBorderImage = borderImage && borderImage->canRender();
             if (hasBorderImage && !borderImage->isLoaded())
                 return; // Don't paint anything while we wait for the image to load.
-            
+
             // The simple case is where we either have no border image or we are the only box for this object.  In those
             // cases only a single call to draw is required.
             if (!hasBorderImage || (!prevLineBox() && !nextLineBox()))
-                object()->paintBorder(p, _tx, _ty, w, h, object()->style(), includeLeftEdge(), includeRightEdge());
+                object()->paintBorder(context, tx, ty, w, h, object()->style(), includeLeftEdge(), includeRightEdge());
             else {
                 // We have a border image that spans multiple lines.
                 // We need to adjust _tx and _ty by the width of all previous lines.
@@ -679,14 +677,14 @@ void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx
                 int xOffsetOnLine = 0;
                 for (InlineRunBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
                     xOffsetOnLine += curr->width();
-                int startX = _tx - xOffsetOnLine;
+                int startX = tx - xOffsetOnLine;
                 int totalWidth = xOffsetOnLine;
                 for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
                     totalWidth += curr->width();
-                p->save();
-                p->clip(IntRect(_tx, _ty, width(), height()));
-                object()->paintBorder(p, startX, _ty, totalWidth, h, object()->style());
-                p->restore();
+                context->save();
+                context->clip(IntRect(tx, ty, width(), height()));
+                object()->paintBorder(context, startX, ty, totalWidth, h, object()->style());
+                context->restore();
             }
         }
     }
@@ -712,21 +710,21 @@ static bool shouldDrawDecoration(RenderObject* obj)
     return false;
 }
 
-void InlineFlowBox::paintDecorations(RenderObject::PaintInfo& i, int _tx, int _ty, bool paintedChildren)
+void InlineFlowBox::paintDecorations(RenderObject::PaintInfo& paintInfo, int tx, int ty, bool paintedChildren)
 {
     // Paint text decorations like underlines/overlines. We only do this if we aren't in quirks mode (i.e., in
     // almost-strict mode or strict mode).
-    if (object()->style()->htmlHacks() || !object()->shouldPaintWithinRoot(i) ||
-        object()->style()->visibility() != VISIBLE)
+    if (object()->style()->htmlHacks() || !object()->shouldPaintWithinRoot(paintInfo) ||
+            object()->style()->visibility() != VISIBLE)
         return;
     
     // We don't want underlines or other decorations when we're trying to draw nothing but the selection as white text.
-    if (i.phase == PaintPhaseSelection && i.forceWhiteText)
+    if (paintInfo.phase == PaintPhaseSelection && paintInfo.forceWhiteText)
         return;
 
-    GraphicsContext* p = i.p;
-    _tx += m_x;
-    _ty += m_y;
+    GraphicsContext* context = paintInfo.context;
+    tx += m_x;
+    ty += m_y;
     RenderStyle* styleToUse = object()->style(m_firstLine);
     int deco = parent() ? styleToUse->textDecoration() : styleToUse->textDecorationsInEffect();
     if (deco != TDNONE && 
@@ -743,51 +741,50 @@ void InlineFlowBox::paintDecorations(RenderObject::PaintInfo& i, int _tx, int _t
             if (rootLine == this) {
                 if (x + w >= ellipsisX + ellipsisWidth)
                     w -= (x + w - ellipsisX - ellipsisWidth);
-            }
-            else {
+            } else {
                 if (x >= ellipsisX)
                     return;
                 if (x + w >= ellipsisX)
                     w -= (x + w - ellipsisX);
             }
         }
-            
+
         // Set up the appropriate text-shadow effect for the decoration.
         // FIXME: Support multiple shadow effects.  Need more from the CG API before we can do this.
         bool setShadow = false;
         if (styleToUse->textShadow()) {
-            p->setShadow(IntSize(styleToUse->textShadow()->x, styleToUse->textShadow()->y),
-                         styleToUse->textShadow()->blur, styleToUse->textShadow()->color);
+            context->setShadow(IntSize(styleToUse->textShadow()->x, styleToUse->textShadow()->y),
+                               styleToUse->textShadow()->blur, styleToUse->textShadow()->color);
             setShadow = true;
         }
-        
+
         // We must have child boxes and have decorations defined.
-        _tx += borderLeft() + paddingLeft();
-        
+        tx += borderLeft() + paddingLeft();
+
         Color underline, overline, linethrough;
         underline = overline = linethrough = styleToUse->color();
         if (!parent())
             object()->getTextDecorationColors(deco, underline, overline, linethrough);
 
-        if (styleToUse->font() != p->font())
-            p->setFont(styleToUse->font());
+        if (styleToUse->font() != context->font())
+            context->setFont(styleToUse->font());
 
         bool isPrinting = object()->document()->printing();
         if (deco & UNDERLINE && !paintedChildren) {
-            p->setPen(underline);
-            p->drawLineForText(IntPoint(_tx, _ty), m_baseline, w, isPrinting);
+            context->setPen(underline);
+            context->drawLineForText(IntPoint(tx, ty), m_baseline, w, isPrinting);
         }
         if (deco & OVERLINE && !paintedChildren) {
-            p->setPen(overline);
-            p->drawLineForText(IntPoint(_tx, _ty), 0, w, isPrinting);
+            context->setPen(overline);
+            context->drawLineForText(IntPoint(tx, ty), 0, w, isPrinting);
         }
         if (deco & LINE_THROUGH && paintedChildren) {
-            p->setPen(linethrough);
-            p->drawLineForText(IntPoint(_tx, _ty), 2*m_baseline/3, w, isPrinting);
+            context->setPen(linethrough);
+            context->drawLineForText(IntPoint(tx, ty), 2 * m_baseline / 3, w, isPrinting);
         }
 
         if (setShadow)
-            p->clearShadow();
+            context->clearShadow();
     }
 }
 
index 88b9dca..074a7c6 100644 (file)
@@ -74,14 +74,14 @@ public:
 
     virtual void clearTruncation();
 
-    virtual void paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx, int _ty);
-    void paintBackgrounds(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer,
-                          int my, int mh, int _tx, int _ty, int w, int h);
-    void paintBackground(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer,
-                         int my, int mh, int _tx, int _ty, int w, int h);
-    virtual void paintDecorations(RenderObject::PaintInfo& i, int _tx, int _ty, bool paintedChildren = false);
-    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
-    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int);
+    virtual void paintBackgroundAndBorder(RenderObject::PaintInfo&, int tx, int ty);
+    void paintBackgrounds(GraphicsContext*, const Color&, const BackgroundLayer*,
+                          int my, int mh, int tx, int ty, int w, int h);
+    void paintBackground(GraphicsContext*, const Color&, const BackgroundLayer*,
+                         int my, int mh, int tx, int ty, int w, int h);
+    virtual void paintDecorations(RenderObject::PaintInfo&, int tx, int ty, bool paintedChildren = false);
+    virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty);
 
     int marginBorderPaddingLeft();
     int marginBorderPaddingRight();
index 6256269..d16d2ac 100644 (file)
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef InlineRunBox_H
-#define InlineRunBox_H
+#ifndef InlineRunBox_h
+#define InlineRunBox_h
 
 #include "InlineBox.h"
 
@@ -51,4 +51,4 @@ protected:
 
 } // namespace WebCore
 
-#endif // InlineRunBox_H
+#endif // InlineRunBox_h
index 4be0f7d..8a1a120 100644 (file)
@@ -233,29 +233,29 @@ bool InlineTextBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
     return false;
 }
 
-void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
+void InlineTextBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    if (isLineBreak() || !object()->shouldPaintWithinRoot(i) || object()->style()->visibility() != VISIBLE ||
-        m_truncation == cFullTruncation || i.phase == PaintPhaseOutline)
+    if (isLineBreak() || !object()->shouldPaintWithinRoot(paintInfo) || object()->style()->visibility() != VISIBLE ||
+            m_truncation == cFullTruncation || paintInfo.phase == PaintPhaseOutline)
         return;
     
-    assert(i.phase != PaintPhaseSelfOutline && i.phase != PaintPhaseChildOutlines);
+    ASSERT(paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines);
 
     int xPos = tx + m_x - parent()->maxHorizontalShadow();
     int w = width() + 2 * parent()->maxHorizontalShadow();
-    if (xPos >= i.r.right() || xPos + w <= i.r.x())
+    if (xPos >= paintInfo.rect.right() || xPos + w <= paintInfo.rect.x())
         return;
 
     bool isPrinting = textObject()->document()->printing();
     
     // Determine whether or not we're selected.
     bool haveSelection = !isPrinting && selectionState() != RenderObject::SelectionNone;
-    if (!haveSelection && i.phase == PaintPhaseSelection)
+    if (!haveSelection && paintInfo.phase == PaintPhaseSelection)
         // When only painting the selection, don't bother to paint if there is none.
         return;
 
     // Determine whether or not we have marked text.
-    Range *markedTextRange = object()->document()->frame()->markedTextRange();
+    RangemarkedTextRange = object()->document()->frame()->markedTextRange();
     int exception = 0;
     bool haveMarkedText = markedTextRange && markedTextRange->startContainer(exception) == object()->node();
     bool markedTextUsesUnderlines = object()->document()->frame()->markedTextUsesUnderlines();
@@ -264,30 +264,31 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
     RenderStyle* styleToUse = object()->style(m_firstLine);
     int d = styleToUse->textDecorationsInEffect();
     const Font* font = &styleToUse->font();
-    if (*font != i.p->font())
-        i.p->setFont(*font);
+    if (*font != paintInfo.context->font())
+        paintInfo.context->setFont(*font);
 
     // 1. Paint backgrounds behind text if needed.  Examples of such backgrounds include selection
     // and marked text.
-    if (i.phase != PaintPhaseSelection && !isPrinting) {
+    if (paintInfo.phase != PaintPhaseSelection && !isPrinting) {
 #if PLATFORM(MAC)
         // Custom highlighters go behind everything else.
-        if (styleToUse->highlight() != nullAtom && !i.p->paintingDisabled())
+        if (styleToUse->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
             paintCustomHighlight(tx, ty, styleToUse->highlight());
 #endif
 
         if (haveMarkedText  && !markedTextUsesUnderlines)
-            paintMarkedTextBackground(i.p, tx, ty, styleToUse, font, markedTextRange->startOffset(exception), markedTextRange->endOffset(exception));
+            paintMarkedTextBackground(paintInfo.context, tx, ty, styleToUse, font, markedTextRange->startOffset(exception), markedTextRange->endOffset(exception));
 
-        paintDocumentMarkers(i.p, tx, ty, styleToUse, font, true);
+        paintDocumentMarkers(paintInfo.context, tx, ty, styleToUse, font, true);
 
         if (haveSelection)
-            paintSelection(i.p, tx, ty, styleToUse, font);
+            paintSelection(paintInfo.context, tx, ty, styleToUse, font);
     }
-    
+
     // 2. Now paint the foreground, including text and decorations like underline/overline (in quirks mode only).
-    if (m_len <= 0) return;
-    
+    if (m_len <= 0)
+        return;
+
     const Vector<MarkedTextUnderline>* underlines = 0;
     size_t numUnderlines = 0;
     if (haveMarkedText && markedTextUsesUnderlines) {
@@ -296,8 +297,8 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
     }
 
     Color textColor;
-    
-    if (i.forceWhiteText)
+
+    if (paintInfo.forceWhiteText)
         textColor = Color::white;
     else {
         textColor = styleToUse->color();
@@ -307,23 +308,23 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
             textColor = correctedTextColor(textColor, Color::white);
     }
 
-    if (textColor != i.p->pen().color())
-        i.p->setPen(textColor);
+    if (textColor != paintInfo.context->pen().color())
+        paintInfo.context->setPen(textColor);
 
     // Set a text shadow if we have one.
     // FIXME: Support multiple shadow effects.  Need more from the CG API before
     // we can do this.
     bool setShadow = false;
     if (styleToUse->textShadow()) {
-        i.p->setShadow(IntSize(styleToUse->textShadow()->x, styleToUse->textShadow()->y),
-            styleToUse->textShadow()->blur, styleToUse->textShadow()->color);
+        paintInfo.context->setShadow(IntSize(styleToUse->textShadow()->x, styleToUse->textShadow()->y),
+                                     styleToUse->textShadow()->blur, styleToUse->textShadow()->color);
         setShadow = true;
     }
 
-    bool paintSelectedTextOnly = (i.phase == PaintPhaseSelection);
+    bool paintSelectedTextOnly = (paintInfo.phase == PaintPhaseSelection);
     bool paintSelectedTextSeparately = false; // Whether or not we have to do multiple paints.  Only
                                               // necessary when a custom ::selection foreground color is applied.
-    Color selectionColor = i.p->pen().color();
+    Color selectionColor = paintInfo.context->pen().color();
     ShadowData* selectionTextShadow = 0;
     if (haveSelection) {
         // Check foreground color first.
@@ -353,45 +354,44 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
         int endPoint = m_len;
         if (m_truncation != cNoTruncation)
             endPoint = m_truncation - m_start;
-        i.p->drawText(TextRun(textStr, m_start, endPoint), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
+        paintInfo.context->drawText(TextRun(textStr, m_start, endPoint), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
     } else {
         int sPos, ePos;
         selectionStartEnd(sPos, ePos);
         if (paintSelectedTextSeparately) {
             // paint only the text that is not selected
             if (sPos >= ePos)
-                i.p->drawText(TextRun(textStr, m_start, m_len), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
+                paintInfo.context->drawText(TextRun(textStr, m_start, m_len), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
             else {
                 if (sPos - 1 >= 0)
-                    i.p->drawText(TextRun(textStr, m_start, m_len, 0, sPos), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
+                    paintInfo.context->drawText(TextRun(textStr, m_start, m_len, 0, sPos), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
                 if (ePos < m_start + m_len)
-                    i.p->drawText(TextRun(textStr, m_start, m_len, ePos), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
+                    paintInfo.context->drawText(TextRun(textStr, m_start, m_len, ePos), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
             }
         }
-            
+
         if (sPos < ePos) {
             // paint only the text that is selected
-            if (selectionColor != i.p->pen().color())
-                i.p->setPen(selectionColor);
-            
+            if (selectionColor != paintInfo.context->pen().color())
+                paintInfo.context->setPen(selectionColor);
+
             if (selectionTextShadow)
-                i.p->setShadow(IntSize(selectionTextShadow->x, selectionTextShadow->y),
-                               selectionTextShadow->blur,
-                               selectionTextShadow->color);
-            i.p->drawText(TextRun(textStr, m_start, m_len, sPos, ePos), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
+                paintInfo.context->setShadow(IntSize(selectionTextShadow->x, selectionTextShadow->y),
+                                             selectionTextShadow->blur, selectionTextShadow->color);
+            paintInfo.context->drawText(TextRun(textStr, m_start, m_len, sPos, ePos), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);
             if (selectionTextShadow)
-                i.p->clearShadow();
+                paintInfo.context->clearShadow();
         }
     }
 
     // Paint decorations
-    if (d != TDNONE && i.phase != PaintPhaseSelection && styleToUse->htmlHacks()) {
-        i.p->setPen(styleToUse->color());
-        paintDecoration(i.p, tx, ty, d);
+    if (d != TDNONE && paintInfo.phase != PaintPhaseSelection && styleToUse->htmlHacks()) {
+        paintInfo.context->setPen(styleToUse->color());
+        paintDecoration(paintInfo.context, tx, ty, d);
     }
 
-    if (i.phase != PaintPhaseSelection) {
-        paintDocumentMarkers(i.p, tx, ty, styleToUse, font, false);
+    if (paintInfo.phase != PaintPhaseSelection) {
+        paintDocumentMarkers(paintInfo.context, tx, ty, styleToUse, font, false);
 
         for (size_t index = 0; index < numUnderlines; ++index) {
             const MarkedTextUnderline& underline = (*underlines)[index];
@@ -404,7 +404,7 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
             
             if (underline.startOffset <= end()) {
                 // underline intersects this run.  Paint it.
-                paintMarkedTextUnderline(i.p, tx, ty, underline);
+                paintMarkedTextUnderline(paintInfo.context, tx, ty, underline);
                 if (underline.endOffset > end() + 1)
                     // underline also runs into the next run. Bail now, no more marker advancement.
                     break;
@@ -415,7 +415,7 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
     }
 
     if (setShadow)
-        i.p->clearShadow();
+        paintInfo.context->clearShadow();
 }
 
 void InlineTextBox::selectionStartEnd(int& sPos, int& ePos)
index d68b220..7fec3fb 100644 (file)
@@ -22,8 +22,8 @@
  *
  */
 
-#ifndef InlineTextBox_H
-#define InlineTextBox_H
+#ifndef InlineTextBox_h
+#define InlineTextBox_h
 
 #include "DocumentMarker.h"
 #include "InlineRunBox.h"
@@ -70,9 +70,9 @@ public:
     IntRect selectionRect(int absx, int absy, int startPos, int endPos);
     bool isSelected(int startPos, int endPos) const;
     void selectionStartEnd(int& sPos, int& ePos);
-    
-    virtual void paint(RenderObject::PaintInfo& i, int tx, int ty);
-    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int);
+
+    virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty);
 
     RenderText* textObject() const;
 
@@ -89,7 +89,7 @@ public:
 
     // Overloaded new operator.  Derived classes must override operator new
     // in order to allocate out of the RenderArena.
-    void* operator new(size_t, RenderArena*) throw();  
+    void* operator new(size_t, RenderArena*) throw();
 
     // Overridden to prevent the normal delete from being called.
     void operator delete(void*, size_t);
@@ -148,4 +148,4 @@ inline RenderText* InlineTextBox::textObject() const
 
 } // namespace WebCore
 
-#endif // InlineTextBox_H
+#endif // InlineTextBox_h
index 5ca1688..7d7031a 100644 (file)
@@ -1243,35 +1243,35 @@ void RenderBlock::repaintObjectsBeforeLayout()
     }
 }
 
-void RenderBlock::paint(PaintInfo& i, int _tx, int _ty)
+void RenderBlock::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    _tx += m_x;
-    _ty += m_y;
+    tx += m_x;
+    ty += m_y;
 
     // Check if we need to do anything at all.
     // FIXME: Could eliminate the isRoot() check if we fix background painting so that the RenderView
     // paints the root's background.
     if (!isInlineFlow() && !isRoot()) {
         IntRect overflowBox = overflowRect(false);
-        overflowBox.inflate(maximalOutlineSize(i.phase));
-        overflowBox.move(_tx, _ty);
-        bool intersectsOverflowBox = overflowBox.intersects(i.r);
+        overflowBox.inflate(maximalOutlineSize(paintInfo.phase));
+        overflowBox.move(tx, ty);
+        bool intersectsOverflowBox = overflowBox.intersects(paintInfo.rect);
         if (!intersectsOverflowBox) {
             // Check floats next.
-            if (i.phase != PaintPhaseFloat && i.phase != PaintPhaseSelection)
+            if (paintInfo.phase != PaintPhaseFloat && paintInfo.phase != PaintPhaseSelection)
                 return;
             IntRect floatBox = floatRect();
-            floatBox.inflate(maximalOutlineSize(i.phase));
-            floatBox.move(_tx, _ty);
-            if (!floatBox.intersects(i.r))
+            floatBox.inflate(maximalOutlineSize(paintInfo.phase));
+            floatBox.move(tx, ty);
+            if (!floatBox.intersects(paintInfo.rect))
                 return;
         }
     }
 
-    return paintObject(i, _tx, _ty);
+    return paintObject(paintInfo, tx, ty);
 }
 
-void RenderBlock::paintChildren(PaintInfo& i, int _tx, int _ty)
+void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
 {
     // Avoid painting descendants of the root element when stylesheets haven't loaded.  This eliminates FOUC.
     // It's ok not to draw, because later on, when all the stylesheets do load, updateStyleSelector on the Document
@@ -1279,53 +1279,52 @@ void RenderBlock::paintChildren(PaintInfo& i, int _tx, int _ty)
     if (document()->didLayoutWithPendingStylesheets() && !isRenderView())
         return;
     
-    PaintPhase newPhase = (i.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : i.phase;
+    PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase;
     newPhase = (newPhase == PaintPhaseChildBlockBackgrounds) ? PaintPhaseChildBlockBackground : newPhase;
     
     // We don't paint our own background, but we do let the kids paint their backgrounds.
-    PaintInfo paintInfo(i);
-    paintInfo.phase = newPhase;
+    PaintInfo info(paintInfo);
+    info.phase = newPhase;
     bool isPrinting = document()->printing();
 
-    for (RenderObject *child = firstChild(); child; child = child->nextSibling()) {        
+    for (RenderObjectchild = firstChild(); child; child = child->nextSibling()) {        
         // Check for page-break-before: always, and if it's set, break and bail.
         if (isPrinting && !childrenInline() && child->style()->pageBreakBefore() == PBALWAYS &&
-            inRootBlockContext() && (_ty + child->yPos()) > i.r.y() && 
-            (_ty + child->yPos()) < i.r.bottom()) {
-            view()->setBestTruncatedAt(_ty + child->yPos(), this, true);
+            inRootBlockContext() && (ty + child->yPos()) > paintInfo.rect.y() && 
+            (ty + child->yPos()) < paintInfo.rect.bottom()) {
+            view()->setBestTruncatedAt(ty + child->yPos(), this, true);
             return;
         }
-        
+
         if (!child->layer() && !child->isFloating())
-            child->paint(paintInfo, _tx, _ty);
-        
+            child->paint(info, tx, ty);
+
         // Check for page-break-after: always, and if it's set, break and bail.
         if (isPrinting && !childrenInline() && child->style()->pageBreakAfter() == PBALWAYS && 
-            inRootBlockContext() && (_ty + child->yPos() + child->height()) > i.r.y() && 
-            (_ty + child->yPos() + child->height()) < i.r.bottom()) {
-            view()->setBestTruncatedAt(_ty + child->yPos() + child->height() + child->collapsedMarginBottom(), this, true);
+            inRootBlockContext() && (ty + child->yPos() + child->height()) > paintInfo.rect.y() && 
+            (ty + child->yPos() + child->height()) < paintInfo.rect.bottom()) {
+            view()->setBestTruncatedAt(ty + child->yPos() + child->height() + child->collapsedMarginBottom(), this, true);
             return;
         }
     }
 }
 
-void RenderBlock::paintCaret(PaintInfo& i, CaretType type)
+void RenderBlock::paintCaret(PaintInfo& paintInfo, CaretType type)
 {
     SelectionController* selectionController = type == CursorCaret ? document()->frame()->selectionController() : document()->frame()->dragCaretController();
-    Node *caretNode = selectionController->start().node();
-    RenderObject *renderer = caretNode ? caretNode->renderer() : 0;
+    NodecaretNode = selectionController->start().node();
+    RenderObjectrenderer = caretNode ? caretNode->renderer() : 0;
     if (renderer && (renderer == this || renderer->containingBlock() == this) && caretNode && caretNode->isContentEditable()) {
-        if (type == CursorCaret) {
-            document()->frame()->paintCaret(i.p, i.r);
-        } else {
-            document()->frame()->paintDragCaret(i.p, i.r);
-        }
+        if (type == CursorCaret)
+            document()->frame()->paintCaret(paintInfo.context, paintInfo.rect);
+        else
+            document()->frame()->paintDragCaret(paintInfo.context, paintInfo.rect);
     }
 }
 
-void RenderBlock::paintObject(PaintInfo& i, int _tx, int _ty)
+void RenderBlock::paintObject(PaintInfo& paintInfo, int tx, int ty)
 {
-    PaintPhase paintPhase = i.phase;
+    PaintPhase paintPhase = paintInfo.phase;
 
     // If we're a repositioned run-in or a compact, don't paint background/borders.
     bool inlineFlow = isInlineFlow();
@@ -1334,7 +1333,7 @@ void RenderBlock::paintObject(PaintInfo& i, int _tx, int _ty)
     if (!inlineFlow &&
         (paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) &&
         shouldPaintBackgroundOrBorder() && style()->visibility() == VISIBLE) {
-        paintBoxDecorations(i, _tx, _ty);
+        paintBoxDecorations(paintInfo, tx, ty);
     }
 
     // We're done.  We don't bother painting any children.
@@ -1342,103 +1341,103 @@ void RenderBlock::paintObject(PaintInfo& i, int _tx, int _ty)
         return;
 
     // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div).s
-    int scrolledX = _tx;
-    int scrolledY = _ty;
+    int scrolledX = tx;
+    int scrolledY = ty;
     if (hasOverflowClip())
         m_layer->subtractScrollOffset(scrolledX, scrolledY);
 
     // 2. paint contents
     if (paintPhase != PaintPhaseSelfOutline) {
         if (childrenInline())
-            paintLines(i, scrolledX, scrolledY);
+            paintLines(paintInfo, scrolledX, scrolledY);
         else
-            paintChildren(i, scrolledX, scrolledY);
+            paintChildren(paintInfo, scrolledX, scrolledY);
     }
-    
+
     // 3. paint selection
     bool isPrinting = document()->printing();
     if (!inlineFlow && !isPrinting)
-        paintSelection(i, scrolledX, scrolledY); // Fill in gaps in selection on lines and between blocks.
+        paintSelection(paintInfo, scrolledX, scrolledY); // Fill in gaps in selection on lines and between blocks.
 
     // 4. paint floats.
     if (!inlineFlow && (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection))
-        paintFloats(i, scrolledX, scrolledY, paintPhase == PaintPhaseSelection);
+        paintFloats(paintInfo, scrolledX, scrolledY, paintPhase == PaintPhaseSelection);
 
     // 5. paint outline.
     if (!inlineFlow && (paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) 
         && hasOutline() && style()->visibility() == VISIBLE)
-        RenderObject::paintOutline(i.p, _tx, _ty, width(), height(), style());
+        RenderObject::paintOutline(paintInfo.context, tx, ty, width(), height(), style());
 
     // 6. paint caret.
     // If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground,
     // then paint the caret.
     if (!inlineFlow && paintPhase == PaintPhaseForeground) {        
-        paintCaret(i, CursorCaret);
-        paintCaret(i, DragCaret);
+        paintCaret(paintInfo, CursorCaret);
+        paintCaret(paintInfo, DragCaret);
     }
 
 #ifdef BOX_DEBUG
-    if ( style() && style()->visibility() == VISIBLE ) {
+    if (style() && style()->visibility() == VISIBLE) {
         if(isAnonymous())
-            outlineBox(i.p, _tx, _ty, "green");
+            outlineBox(paintInfo.context, tx, ty, "green");
         if(isFloating())
-            outlineBox(i.p, _tx, _ty, "yellow");
+            outlineBox(paintInfo.context, tx, ty, "yellow");
         else
-            outlineBox(i.p, _tx, _ty);
+            outlineBox(paintInfo.context, tx, ty);
     }
 #endif
 }
 
-void RenderBlock::paintFloats(PaintInfo& i, int _tx, int _ty, bool paintSelection)
+void RenderBlock::paintFloats(PaintInfo& paintInfo, int tx, int ty, bool paintSelection)
 {
     if (!m_floatingObjects)
         return;
 
     FloatingObject* r;
     DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
-    for ( ; (r = it.current()); ++it) {
+    for (; (r = it.current()); ++it) {
         // Only paint the object if our noPaint flag isn't set.
         if (!r->noPaint && !r->node->layer()) {
-            PaintInfo info(i);
-            info.phase = paintSelection ? PaintPhaseSelection : PaintPhaseBlockBackground;
-            int tx = _tx + r->left - r->node->xPos() + r->node->marginLeft();
-            int ty = _ty + r->startY - r->node->yPos() + r->node->marginTop();
-            r->node->paint(info, tx, ty);
+            PaintInfo currentPaintInfo(paintInfo);
+            currentPaintInfo.phase = paintSelection ? PaintPhaseSelection : PaintPhaseBlockBackground;
+            int currentTX = tx + r->left - r->node->xPos() + r->node->marginLeft();
+            int currentTY = ty + r->startY - r->node->yPos() + r->node->marginTop();
+            r->node->paint(currentPaintInfo, currentTX, currentTY);
             if (!paintSelection) {
-                info.phase = PaintPhaseChildBlockBackgrounds;
-                r->node->paint(info, tx, ty);
-                info.phase = PaintPhaseFloat;
-                r->node->paint(info, tx, ty);
-                info.phase = PaintPhaseForeground;
-                r->node->paint(info, tx, ty);
-                info.phase = PaintPhaseOutline;
-                r->node->paint(info, tx, ty);
+                currentPaintInfo.phase = PaintPhaseChildBlockBackgrounds;
+                r->node->paint(currentPaintInfo, currentTX, currentTY);
+                currentPaintInfo.phase = PaintPhaseFloat;
+                r->node->paint(currentPaintInfo, currentTX, currentTY);
+                currentPaintInfo.phase = PaintPhaseForeground;
+                r->node->paint(currentPaintInfo, currentTX, currentTY);
+                currentPaintInfo.phase = PaintPhaseOutline;
+                r->node->paint(currentPaintInfo, currentTX, currentTY);
             }
         }
     }
 }
 
-void RenderBlock::paintEllipsisBoxes(PaintInfo& i, int _tx, int _ty)
+void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (!shouldPaintWithinRoot(i) || !firstLineBox())
+    if (!shouldPaintWithinRoot(paintInfo) || !firstLineBox())
         return;
 
-    if (style()->visibility() == VISIBLE && i.phase == PaintPhaseForeground) {
+    if (style()->visibility() == VISIBLE && paintInfo.phase == PaintPhaseForeground) {
         // We can check the first box and last box and avoid painting if we don't
         // intersect.
-        int yPos = _ty + firstLineBox()->yPos();;
+        int yPos = ty + firstLineBox()->yPos();;
         int h = lastLineBox()->yPos() + lastLineBox()->height() - firstLineBox()->yPos();
-        if (yPos >= i.r.bottom() || yPos + h <= i.r.y())
+        if (yPos >= paintInfo.rect.bottom() || yPos + h <= paintInfo.rect.y())
             return;
 
         // See if our boxes intersect with the dirty rect.  If so, then we paint
         // them.  Note that boxes can easily overlap, so we can't make any assumptions
         // based off positions of our first line box or our last line box.
         for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
-            yPos = _ty + curr->yPos();
+            yPos = ty + curr->yPos();
             h = curr->height();
-            if (curr->ellipsisBox() && yPos < i.r.bottom() && yPos + h > i.r.y())
-                curr->paintEllipsisBox(i, _tx, _ty);
+            if (curr->ellipsisBox() && yPos < paintInfo.rect.bottom() && yPos + h > paintInfo.rect.y())
+                curr->paintEllipsisBox(paintInfo, tx, ty);
         }
     }
 }
@@ -1504,18 +1503,18 @@ GapRects RenderBlock::selectionGapRects()
     return fillSelectionGaps(this, tx, ty, tx, ty, lastTop, lastLeft, lastRight);
 }
 
-void RenderBlock::paintSelection(PaintInfo& i, int tx, int ty)
+void RenderBlock::paintSelection(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (shouldPaintSelectionGaps() && i.phase == PaintPhaseForeground) {
+    if (shouldPaintSelectionGaps() && paintInfo.phase == PaintPhaseForeground) {
         int lastTop = -borderTopExtra();
         int lastLeft = leftSelectionOffset(this, lastTop);
         int lastRight = rightSelectionOffset(this, lastTop);
-        fillSelectionGaps(this, tx, ty, tx, ty, lastTop, lastLeft, lastRight, &i);
+        fillSelectionGaps(this, tx, ty, tx, ty, lastTop, lastLeft, lastRight, &paintInfo);
     }
 }
 
-GapRects RenderBlock::fillSelectionGaps(RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, int& lastTop, int& lastLeft, int& lastRight, 
-                                        const PaintInfo* i)
+GapRects RenderBlock::fillSelectionGaps(RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty,
+                                        int& lastTop, int& lastLeft, int& lastRight, const PaintInfo* paintInfo)
 {
     // FIXME: overflow: auto/scroll regions need more math here, since painting in the border box is different from painting in the padding box (one is scrolled, the other is
     // fixed).
@@ -1524,22 +1523,22 @@ GapRects RenderBlock::fillSelectionGaps(RenderBlock* rootBlock, int blockX, int
         return result;
 
     if (childrenInline())
-        result = fillInlineSelectionGaps(rootBlock, blockX, blockY, tx, ty, lastTop, lastLeft, lastRight, i);
+        result = fillInlineSelectionGaps(rootBlock, blockX, blockY, tx, ty, lastTop, lastLeft, lastRight, paintInfo);
     else
-        result = fillBlockSelectionGaps(rootBlock, blockX, blockY, tx, ty, lastTop, lastLeft, lastRight, i);
-        
+        result = fillBlockSelectionGaps(rootBlock, blockX, blockY, tx, ty, lastTop, lastLeft, lastRight, paintInfo);
+
     // Go ahead and fill the vertical gap all the way to the bottom of our block if the selection extends past our block.
     if (rootBlock == this && (m_selectionState != SelectionBoth && m_selectionState != SelectionEnd))
         result.uniteCenter(fillVerticalSelectionGap(lastTop, lastLeft, lastRight, ty + height() + borderBottomExtra(),
-                                                    rootBlock, blockX, blockY, i));
+                                                    rootBlock, blockX, blockY, paintInfo));
     return result;
 }
 
 GapRects RenderBlock::fillInlineSelectionGaps(RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, 
-                                              int& lastTop, int& lastLeft, int& lastRight, const PaintInfo* i)
+                                              int& lastTop, int& lastLeft, int& lastRight, const PaintInfo* paintInfo)
 {
     GapRects result;
-    
+
     RenderObject* selStart = view()->selectionStart();
     // If there is no selection, don't try to get the selection's containing block. 
     // If we do, we'll crash.
@@ -1568,10 +1567,10 @@ GapRects RenderBlock::fillInlineSelectionGaps(RenderBlock* rootBlock, int blockX
         if (!containsStart && !lastSelectedLine &&
             selectionState() != SelectionStart && selectionState() != SelectionBoth)
             result.uniteCenter(fillVerticalSelectionGap(lastTop, lastLeft, lastRight, ty + selTop,
-                                                        rootBlock, blockX, blockY, i));
+                                                        rootBlock, blockX, blockY, paintInfo));
 
-        if (!i || ty + selTop < i->r.bottom() && ty + selTop + selHeight > i->r.y())
-            result.unite(curr->fillLineSelectionGap(selTop, selHeight, rootBlock, blockX, blockY, tx, ty, i));
+        if (!paintInfo || ty + selTop < paintInfo->rect.bottom() && ty + selTop + selHeight > paintInfo->rect.y())
+            result.unite(curr->fillLineSelectionGap(selTop, selHeight, rootBlock, blockX, blockY, tx, ty, paintInfo));
 
         lastSelectedLine = curr;
     }
@@ -1589,15 +1588,15 @@ GapRects RenderBlock::fillInlineSelectionGaps(RenderBlock* rootBlock, int blockX
     return result;
 }
 
-GapRects RenderBlock::fillBlockSelectionGaps(RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, int& lastTop, int& lastLeft, int& lastRight,
-                                          const PaintInfo* i)
+GapRects RenderBlock::fillBlockSelectionGaps(RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty,
+                                             int& lastTop, int& lastLeft, int& lastRight, const PaintInfo* paintInfo)
 {
     GapRects result;
-    
+
     // Go ahead and jump right to the first block child that contains some selected objects.
     RenderObject* curr;
     for (curr = firstChild(); curr && curr->selectionState() == SelectionNone; curr = curr->nextSibling());
-    
+
     for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->nextSibling()) {
         SelectionState childState = curr->selectionState();
         if (childState == SelectionBoth || childState == SelectionEnd)
@@ -1605,7 +1604,7 @@ GapRects RenderBlock::fillBlockSelectionGaps(RenderBlock* rootBlock, int blockX,
 
         if (curr->isFloatingOrPositioned())
             continue; // We must be a normal flow object in order to even be considered.
-        
+
         if (curr->isRelPositioned() && curr->layer()) {
             // If the relposition offset is anything other than 0, then treat this just like an absolute positioned element.
             // Just disregard it completely.
@@ -1623,7 +1622,7 @@ GapRects RenderBlock::fillBlockSelectionGaps(RenderBlock* rootBlock, int blockX,
             if (childState == SelectionEnd || childState == SelectionInside)
                 // Fill the gap above the object.
                 result.uniteCenter(fillVerticalSelectionGap(lastTop, lastLeft, lastRight, 
-                                                            ty + curr->yPos(), rootBlock, blockX, blockY, i));
+                                                            ty + curr->yPos(), rootBlock, blockX, blockY, paintInfo));
 
             // Only fill side gaps for objects that paint their own selection if we know for sure the selection is going to extend all the way *past*
             // our object.  We know this if the selection did not end inside our object.
@@ -1633,11 +1632,11 @@ GapRects RenderBlock::fillBlockSelectionGaps(RenderBlock* rootBlock, int blockX,
             // Fill side gaps on this object based off its state.
             bool leftGap, rightGap;
             getHorizontalSelectionGapInfo(childState, leftGap, rightGap);
-            
+
             if (leftGap)
-                result.uniteLeft(fillLeftSelectionGap(this, curr->xPos(), curr->yPos(), curr->height(), rootBlock, blockX, blockY, tx, ty, i));
+                result.uniteLeft(fillLeftSelectionGap(this, curr->xPos(), curr->yPos(), curr->height(), rootBlock, blockX, blockY, tx, ty, paintInfo));
             if (rightGap)
-                result.uniteRight(fillRightSelectionGap(this, curr->xPos() + curr->width(), curr->yPos(), curr->height(), rootBlock, blockX, blockY, tx, ty, i));
+                result.uniteRight(fillRightSelectionGap(this, curr->xPos() + curr->width(), curr->yPos(), curr->height(), rootBlock, blockX, blockY, tx, ty, paintInfo));
 
             // Update lastTop to be just underneath the object.  lastLeft and lastRight extend as far as
             // they can without bumping into floating or positioned objects.  Ideally they will go right up
@@ -1645,35 +1644,32 @@ GapRects RenderBlock::fillBlockSelectionGaps(RenderBlock* rootBlock, int blockX,
             lastTop = (ty - blockY) + (curr->yPos() + curr->height());
             lastLeft = leftSelectionOffset(rootBlock, curr->yPos() + curr->height());
             lastRight = rightSelectionOffset(rootBlock, curr->yPos() + curr->height());
-        }
-        else if (childState != SelectionNone)
+        } else if (childState != SelectionNone)
             // We must be a block that has some selected object inside it.  Go ahead and recur.
             result.unite(static_cast<RenderBlock*>(curr)->fillSelectionGaps(rootBlock, blockX, blockY, tx + curr->xPos(), ty + curr->yPos(), 
-                                                                            lastTop, lastLeft, lastRight, i));
+                                                                            lastTop, lastLeft, lastRight, paintInfo));
     }
     return result;
 }
 
-IntRect RenderBlock::fillHorizontalSelectionGap(RenderObject* selObj, int xPos, int yPos, int width, int height,
-                                                const PaintInfo* i)
+IntRect RenderBlock::fillHorizontalSelectionGap(RenderObject* selObj, int xPos, int yPos, int width, int height, const PaintInfo* paintInfo)
 {
     if (width <= 0 || height <= 0)
         return IntRect();
     IntRect gapRect(xPos, yPos, width, height);
-    if (i)
-        i->p->fillRect(gapRect, selObj->selectionBackgroundColor());
+    if (paintInfo)
+        paintInfo->context->fillRect(gapRect, selObj->selectionBackgroundColor());
     return gapRect;
 }
 
-IntRect RenderBlock::fillVerticalSelectionGap(int lastTop, int lastLeft, int lastRight,
-                                              int bottomY, RenderBlock* rootBlock, int blockX, int blockY,
-                                              const PaintInfo* i)
+IntRect RenderBlock::fillVerticalSelectionGap(int lastTop, int lastLeft, int lastRight, int bottomY, RenderBlock* rootBlock,
+                                              int blockX, int blockY, const PaintInfo* paintInfo)
 {
     int top = blockY + lastTop;
     int height = bottomY - top;
     if (height <= 0)
         return IntRect();
-        
+
     // Get the selection offsets for the bottom of the gap
     int left = blockX + max(lastLeft, leftSelectionOffset(rootBlock, bottomY));
     int right = blockX + min(lastRight, rightSelectionOffset(rootBlock, bottomY));
@@ -1682,12 +1678,13 @@ IntRect RenderBlock::fillVerticalSelectionGap(int lastTop, int lastLeft, int las
         return IntRect();
 
     IntRect gapRect(left, top, width, height);
-    if (i)
-        i->p->fillRect(gapRect, selectionBackgroundColor());
+    if (paintInfo)
+        paintInfo->context->fillRect(gapRect, selectionBackgroundColor());
     return gapRect;
 }
 
-IntRect RenderBlock::fillLeftSelectionGap(RenderObject* selObj, int xPos, int yPos, int height, RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, const PaintInfo* i)
+IntRect RenderBlock::fillLeftSelectionGap(RenderObject* selObj, int xPos, int yPos, int height, RenderBlock* rootBlock,
+                                          int blockX, int blockY, int tx, int ty, const PaintInfo* paintInfo)
 {
     int top = yPos + ty;
     int left = blockX + max(leftSelectionOffset(rootBlock, yPos), leftSelectionOffset(rootBlock, yPos + height));
@@ -1696,12 +1693,13 @@ IntRect RenderBlock::fillLeftSelectionGap(RenderObject* selObj, int xPos, int yP
         return IntRect();
 
     IntRect gapRect(left, top, width, height);
-    if (i)
-        i->p->fillRect(gapRect, selObj->selectionBackgroundColor());
+    if (paintInfo)
+        paintInfo->context->fillRect(gapRect, selObj->selectionBackgroundColor());
     return gapRect;
 }
 
-IntRect RenderBlock::fillRightSelectionGap(RenderObject* selObj, int xPos, int yPos, int height, RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, const PaintInfo* i)
+IntRect RenderBlock::fillRightSelectionGap(RenderObject* selObj, int xPos, int yPos, int height, RenderBlock* rootBlock,
+                                           int blockX, int blockY, int tx, int ty, const PaintInfo* paintInfo)
 {
     int left = xPos + tx;
     int top = yPos + ty;
@@ -1711,8 +1709,8 @@ IntRect RenderBlock::fillRightSelectionGap(RenderObject* selObj, int xPos, int y
         return IntRect();
 
     IntRect gapRect(left, top, width, height);
-    if (i)
-        i->p->fillRect(gapRect, selObj->selectionBackgroundColor());
+    if (paintInfo)
+        paintInfo->context->fillRect(gapRect, selObj->selectionBackgroundColor());
     return gapRect;
 }
 
index bfffce7..c9f5a0d 100644 (file)
@@ -283,17 +283,17 @@ bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
 
 // --------------------- painting stuff -------------------------------
 
-void RenderBox::paint(PaintInfo& i, int _tx, int _ty)
+void RenderBox::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    _tx += m_x;
-    _ty += m_y;
+    tx += m_x;
+    ty += m_y;
 
     // default implementation. Just pass paint through to the children
     for (RenderObject* child = firstChild(); child; child = child->nextSibling())
-        child->paint(i, _tx, _ty);
+        child->paint(paintInfo, tx, ty);
 }
 
-void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
+void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
 {
     const BackgroundLayer* bgLayer = style()->backgroundLayers();
     Color bgColor = style()->backgroundColor();
@@ -317,14 +317,13 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
     if (view()->frameView()) {
         rw = view()->frameView()->contentsWidth();
         rh = view()->frameView()->contentsHeight();
-    }
-    else {
+    } else {
         rw = view()->width();
         rh = view()->height();
     }
-    
-    int bx = _tx - marginLeft();
-    int by = _ty - marginTop();
+
+    int bx = tx - marginLeft();
+    int by = ty - marginTop();
     int bw = max(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw);
     int bh = max(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh);
 
@@ -332,49 +331,49 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
     // " The background of the box generated by the root element covers the entire canvas."
     // hence, paint the background even in the margin areas (unlike for every other element!)
     // I just love these little inconsistencies .. :-( (Dirk)
-    int my = max(by, i.r.y());
+    int my = max(by, paintInfo.rect.y());
 
-    paintBackgrounds(i.p, bgColor, bgLayer, my, i.r.height(), bx, by, bw, bh);
+    paintBackgrounds(paintInfo.context, bgColor, bgLayer, my, paintInfo.rect.height(), bx, by, bw, bh);
 
     if (style()->hasBorder() && style()->display() != INLINE)
-        paintBorder( i.p, _tx, _ty, w, h, style() );
+        paintBorder(paintInfo.context, tx, ty, w, h, style());
 }
 
-void RenderBox::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
+void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (!shouldPaintWithinRoot(i))
+    if (!shouldPaintWithinRoot(paintInfo))
         return;
 
     if (isRoot())
-        return paintRootBoxDecorations(i, _tx, _ty);
-    
+        return paintRootBoxDecorations(paintInfo, tx, ty);
+
     int w = width();
     int h = height() + borderTopExtra() + borderBottomExtra();
-    _ty -= borderTopExtra();
+    ty -= borderTopExtra();
 
-    int my = max(_ty, i.r.y());
+    int my = max(ty, paintInfo.rect.y());
     int mh;
-    if (_ty < i.r.y())
-        mh = max(0, h - (i.r.y() - _ty));
+    if (ty < paintInfo.rect.y())
+        mh = max(0, h - (paintInfo.rect.y() - ty));
     else
-        mh = min(i.r.height(), h);
+        mh = min(paintInfo.rect.height(), h);
 
     // If we have a native theme appearance, paint that before painting our background.  
     // The theme will tell us whether or not we should also paint the CSS background.
-    bool themePainted = style()->hasAppearance() && !theme()->paint(this, i, IntRect(_tx, _ty, w, h));
+    bool themePainted = style()->hasAppearance() && !theme()->paint(this, paintInfo, IntRect(tx, ty, w, h));
     if (!themePainted) {
         // The <body> only paints its background if the root element has defined a background
         // independent of the body.  Go through the DOM to get to the root element's render object,
         // since the root could be inline and wrapped in an anonymous block.
         if (!isBody() || !document()->isHTMLDocument() || document()->documentElement()->renderer()->style()->hasBackground())
-            paintBackgrounds(i.p, style()->backgroundColor(), style()->backgroundLayers(), my, mh, _tx, _ty, w, h);
+            paintBackgrounds(paintInfo.context, style()->backgroundColor(), style()->backgroundLayers(), my, mh, tx, ty, w, h);
         if (style()->hasAppearance())
-            theme()->paintDecorations(this, i, IntRect(_tx, _ty, w, h));
+            theme()->paintDecorations(this, paintInfo, IntRect(tx, ty, w, h));
     }
-    
+
     // The theme will tell us whether or not we should also paint the CSS border.
-    if ((!style()->hasAppearance() || (!themePainted && theme()->paintBorderOnly(this, i, IntRect(_tx, _ty, w, h)))) && style()->hasBorder())
-        paintBorder(i.p, _tx, _ty, w, h, style());
+    if ((!style()->hasAppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, IntRect(tx, ty, w, h)))) && style()->hasBorder())
+        paintBorder(paintInfo.context, tx, ty, w, h, style());
 }
 
 void RenderBox::paintBackgrounds(GraphicsContext* p, const Color& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
index acafb54..9b79229 100644 (file)
@@ -150,8 +150,8 @@ public:
     virtual int staticY() const { return m_staticY; }
 
 protected:
-    virtual void paintBoxDecorations(PaintInfo& i, int _tx, int _ty);
-    void paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty);
+    virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
+    void paintRootBoxDecorations(PaintInfo&, int tx, int ty);
 
     void paintBackgrounds(GraphicsContext*, const Color&, const BackgroundLayer*, int clipy, int cliph, int _tx, int _ty, int w, int h);
     void paintBackground(GraphicsContext*, const Color&, const BackgroundLayer*, int clipy, int cliph, int _tx, int _ty, int w, int h);
index 1728783..83592b5 100644 (file)
@@ -116,8 +116,8 @@ void RenderButton::paintObject(PaintInfo& paintInfo, int tx, int ty)
             width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
-        paintInfo.p->save();
-        paintInfo.p->clip(clipRect);
+        paintInfo.context->save();
+        paintInfo.context->clip(clipRect);
     }
 
     // Paint the children.
@@ -125,7 +125,7 @@ void RenderButton::paintObject(PaintInfo& paintInfo, int tx, int ty)
 
     // Pop the clip.
     if (m_inner && paintInfo.phase == PaintPhaseForeground)
-        paintInfo.p->restore();
+        paintInfo.context->restore();
 }
 
 } // namespace WebCore
index dd2781c..8f66730 100644 (file)
@@ -82,14 +82,14 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
     h -= yOff;
     ty += yOff - borderTopExtra();
 
-    int my = max(ty, paintInfo.r.y());
-    int end = min(paintInfo.r.bottom(), ty + h);
+    int my = max(ty, paintInfo.rect.y());
+    int end = min(paintInfo.rect.bottom(), ty + h);
     int mh = end - my;
 
-    paintBackground(paintInfo.p, style()->backgroundColor(), style()->backgroundLayers(), my, mh, tx, ty, w, h);
+    paintBackground(paintInfo.context, style()->backgroundColor(), style()->backgroundLayers(), my, mh, tx, ty, w, h);
 
     if (style()->hasBorder())
-        paintBorderMinusLegend(paintInfo.p, tx, ty, w, h, style(), legend->xPos(), legend->width());
+        paintBorderMinusLegend(paintInfo.context, tx, ty, w, h, style(), legend->xPos(), legend->width());
 }
 
 void RenderFieldset::paintBorderMinusLegend(GraphicsContext* graphicsContext, int tx, int ty, int w, int h,
index 87615a5..e657967 100644 (file)
@@ -147,8 +147,8 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
                          width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
-        paintInfo.p->save();
-        paintInfo.p->clip(clipRect);
+        paintInfo.context->save();
+        paintInfo.context->clip(clipRect);
     }
 
     if (paintInfo.phase == PaintPhaseForeground) {
@@ -167,11 +167,11 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
         RenderButton* buttonRenderer = static_cast<RenderButton*>(m_button->renderer());
         int textY = buttonRenderer->absoluteBoundingBoxRect().y() + buttonRenderer->marginTop() + buttonRenderer->borderTop() + buttonRenderer->paddingTop() + buttonRenderer->baselinePosition(true, false);
 
-        paintInfo.p->setFont(style()->font());
-        paintInfo.p->setPen(style()->color());
+        paintInfo.context->setFont(style()->font());
+        paintInfo.context->setPen(style()->color());
 
         // Draw the filename
-        paintInfo.p->drawText(textRun, IntPoint(textX, textY));
+        paintInfo.context->drawText(textRun, IntPoint(textX, textY));
 
         if (m_fileChooser->icon()) {
             // Determine where the icon should be placed
@@ -183,7 +183,7 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
                 iconX = contentLeft + contentWidth() - m_button->renderer()->width() - afterButtonSpacing - iconWidth;
 
             // Draw the file icon
-            m_fileChooser->icon()->paint(paintInfo.p, IntRect(iconX, iconY, iconWidth, iconHeight));
+            m_fileChooser->icon()->paint(paintInfo.context, IntRect(iconX, iconY, iconWidth, iconHeight));
         }
     }
 
@@ -192,7 +192,7 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
 
     // Pop the clip.
     if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds)
-        paintInfo.p->restore();
+        paintInfo.context->restore();
 }
 
 void RenderFileUploadControl::calcMinMaxWidth()
index 0deaed3..1eb15f6 100644 (file)
@@ -53,7 +53,7 @@ RenderFlow* RenderFlow::continuationBefore(RenderObject* beforeChild)
 {
     if (beforeChild && beforeChild->parent() == this)
         return this;
-    
+
     RenderFlow* curr = continuation();
     RenderFlow* nextToLast = this;
     RenderFlow* last = this;
@@ -63,12 +63,12 @@ RenderFlow* RenderFlow::continuationBefore(RenderObject* beforeChild)
                 return last;
             return curr;
         }
-        
+
         nextToLast = last;
         last = curr;
         curr = curr->continuation();
     }
-    
+
     if (!beforeChild && !last->firstChild())
         return nextToLast;
     return last;
@@ -81,16 +81,16 @@ void RenderFlow::addChildWithContinuation(RenderObject* newChild, RenderObject*
                 beforeChild->parent()->isRenderInline());
     RenderFlow* beforeChildParent = beforeChild ? static_cast<RenderFlow*>(beforeChild->parent()) : 
                                     (flow->continuation() ? flow->continuation() : flow);
-    
+
     if (newChild->isFloatingOrPositioned())
         return beforeChildParent->addChildToFlow(newChild, beforeChild);
-    
+
     // A continuation always consists of two potential candidates: an inline or an anonymous
     // block box holding block children.
     bool childInline = newChild->isInline();
     bool bcpInline = beforeChildParent->isInline();
     bool flowInline = flow->isInline();
-    
+
     if (flow == beforeChildParent)
         return flow->addChildToFlow(newChild, beforeChild);
     else {
@@ -100,19 +100,13 @@ void RenderFlow::addChildWithContinuation(RenderObject* newChild, RenderObject*
             return beforeChildParent->addChildToFlow(newChild, beforeChild);
         else if (flowInline == childInline)
             return flow->addChildToFlow(newChild, 0); // Just treat like an append.
-        else 
+        else
             return beforeChildParent->addChildToFlow(newChild, beforeChild);
     }
 }
 
-void RenderFlow::addChild(RenderObject *newChild, RenderObject *beforeChild)
+void RenderFlow::addChild(RenderObject* newChild, RenderObject* beforeChild)
 {
-#ifdef DEBUG_LAYOUT
-    kdDebug( 6040 ) << renderName() << "(RenderFlow)::addChild( " << newChild->renderName() <<
-                       ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
-    kdDebug( 6040 ) << "current height = " << m_height << endl;
-#endif
-
     if (continuation())
         return addChildWithContinuation(newChild, beforeChild);
     return addChildToFlow(newChild, beforeChild);
@@ -135,8 +129,7 @@ void RenderFlow::attachLineBox(InlineFlowBox* box)
     if (m_lastLineBox) {
         m_lastLineBox->setNextLineBox(box);
         box->setPreviousLineBox(m_lastLineBox);
-    }
-    else
+    } else
         m_firstLineBox = box;
     InlineFlowBox* last = box;
     for (InlineFlowBox* curr = box; curr; curr = curr->nextFlowBox()) {
@@ -179,11 +172,11 @@ void RenderFlow::destroy()
     if (m_continuation)
         m_continuation->destroy();
     m_continuation = 0;
-    
+
     // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
     // properly dirty line boxes that they are removed from.  Effects that do :before/:after only on hover could crash otherwise.
     RenderContainer::destroyLeftoverChildren();
-    
+
     if (!documentBeingDestroyed()) {
         if (m_firstLineBox) {
             // We can't wait for RenderContainer::destroy to clear the selection,
@@ -208,13 +201,12 @@ void RenderFlow::destroy()
             // children will be destroyed by the time we return from this function.
             if (isAnonymousBlock()) {
                 for (InlineFlowBox* box = m_firstLineBox; box; box = box->nextFlowBox()) {
-                    while (InlineBox *childBox = box->firstChild()) {
+                    while (InlineBoxchildBox = box->firstChild()) {
                         childBox->remove();
                     }
                 }
             }
-        }
-        else if (isInline() && parent())
+        } else if (isInline() && parent())
             parent()->dirtyLinesFromChangedChild(this);
     }
 
@@ -240,23 +232,21 @@ void RenderFlow::dirtyLinesFromChangedChild(RenderObject* child)
     for (curr = child->previousSibling(); curr; curr = curr->previousSibling()) {
         if (curr->isFloatingOrPositioned())
             continue;
-        
+
         if (curr->isReplaced()) {
             InlineBox* wrapper = curr->inlineBoxWrapper();
             if (wrapper)
                 box = wrapper->root();
-        }
-        else if (curr->isText()) {
+        } else if (curr->isText()) {
             InlineTextBox* textBox = static_cast<RenderText*>(curr)->lastTextBox();
             if (textBox)
                 box = textBox->root();
-        }
-        else if (curr->isInlineFlow()) {
+        } else if (curr->isInlineFlow()) {
             InlineRunBox* runBox = static_cast<RenderFlow*>(curr)->lastLineBox();
             if (runBox)
                 box = runBox->root();
         }
-        
+
         if (box)
             break;
     }
@@ -267,7 +257,7 @@ void RenderFlow::dirtyLinesFromChangedChild(RenderObject* child)
     if (box) {
         RootInlineBox* adjacentBox;
         box->markDirty();
-        
+
         // dirty the adjacent lines that might be affected
         // NOTE: we dirty the previous line because RootInlineBox objects cache
         // the address of the first object on the next line after a BR, which we may be
@@ -313,7 +303,7 @@ void RenderFlow::dirtyLineBoxes(bool fullLayout, bool isRootLineBox)
 {
     if (!isRootLineBox && isReplaced())
         return RenderContainer::dirtyLineBoxes(fullLayout, isRootLineBox);
-    
+
     if (fullLayout)
         deleteLineBoxes();
     else {
@@ -333,7 +323,7 @@ InlineBox* RenderFlow::createInlineBox(bool makePlaceHolderBox, bool isRootLineB
         flowBox = new (renderArena()) InlineFlowBox(this);
     else
         flowBox = new (renderArena()) RootInlineBox(this);
-    
+
     if (!m_firstLineBox)
         m_firstLineBox = m_lastLineBox = flowBox;
     else {
@@ -345,13 +335,13 @@ InlineBox* RenderFlow::createInlineBox(bool makePlaceHolderBox, bool isRootLineB
     return flowBox;
 }
 
-void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
+void RenderFlow::paintLines(PaintInfo& paintInfo, int tx, int ty)
 {
     // Only paint during the foreground/selection phases.
-    if (i.phase != PaintPhaseForeground && i.phase != PaintPhaseSelection && i.phase != PaintPhaseOutline 
-        && i.phase != PaintPhaseSelfOutline && i.phase != PaintPhaseChildOutlines)
+    if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline 
+        && paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines)
         return;
-    
+
     bool inlineFlow = isInlineFlow();
     if (inlineFlow)
         ASSERT(m_layer); // The only way a compact/run-in/inline could paint like this is if it has a layer.
@@ -364,16 +354,16 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
     // intersect.  This is a quick short-circuit that we can take to avoid walking any lines.
     // FIXME: This check is flawed in the following extremely obscure way:
     // if some line in the middle has a huge overflow, it might actually extend below the last line.
-    int yPos = firstLineBox()->root()->topOverflow() - maximalOutlineSize(i.phase);
-    int h = maximalOutlineSize(i.phase) + lastLineBox()->root()->bottomOverflow() - yPos;
-    yPos += _ty;
-    if (yPos >= i.r.bottom() || yPos + h <= i.r.y())
+    int yPos = firstLineBox()->root()->topOverflow() - maximalOutlineSize(paintInfo.phase);
+    int h = maximalOutlineSize(paintInfo.phase) + lastLineBox()->root()->bottomOverflow() - yPos;
+    yPos += ty;
+    if (yPos >= paintInfo.rect.bottom() || yPos + h <= paintInfo.rect.y())
         return;
 
-    PaintInfo info(i);
+    PaintInfo info(paintInfo);
     RenderFlowSequencedSet outlineObjects;
     info.outlineObjects = &outlineObjects;
-    
+
     // See if our root lines intersect with the dirty rect.  If so, then we paint
     // them.  Note that boxes can easily overlap, so we can't make any assumptions
     // based off positions of our first line box or our last line box.
@@ -387,11 +377,11 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
             // Try to avoid splitting a line vertically, but only if it's less than the height
             // of the entire page.
             if (curr->root()->bottomOverflow() - curr->root()->topOverflow() <= c->printRect().height()) {
-                if (_ty + curr->root()->bottomOverflow() > c->printRect().bottom()) {
-                    if (_ty + curr->root()->topOverflow() < c->truncatedAt())
-                        c->setBestTruncatedAt(_ty + curr->root()->topOverflow(), this);
+                if (ty + curr->root()->bottomOverflow() > c->printRect().bottom()) {
+                    if (ty + curr->root()->topOverflow() < c->truncatedAt())
+                        c->setBestTruncatedAt(ty + curr->root()->topOverflow(), this);
                     // If we were able to truncate, don't paint.
-                    if (_ty + curr->root()->topOverflow() >= c->truncatedAt())
+                    if (ty + curr->root()->topOverflow() >= c->truncatedAt())
                         break;
                 }
             }
@@ -400,16 +390,16 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
         int top = min(curr->root()->topOverflow(), curr->root()->selectionTop()) - maximalOutlineSize(info.phase);
         int bottom = curr->root()->bottomOverflow() + maximalOutlineSize(info.phase);
         h = bottom - top;
-        yPos = _ty + top;
-        if (yPos < info.r.bottom() && yPos + h > info.r.y())
-            curr->paint(info, _tx, _ty);
+        yPos = ty + top;
+        if (yPos < info.rect.bottom() && yPos + h > info.rect.y())
+            curr->paint(info, tx, ty);
     }
 
     if (info.phase == PaintPhaseOutline || info.phase == PaintPhaseSelfOutline || info.phase == PaintPhaseChildOutlines) {
         RenderFlowSequencedSet::iterator end = info.outlineObjects->end();
         for (RenderFlowSequencedSet::iterator it = info.outlineObjects->begin(); it != end; ++it) {
             RenderFlow* flow = *it;
-            flow->paintOutline(info.p, _tx, _ty);
+            flow->paintOutline(info.context, tx, ty);
         }
         info.outlineObjects->clear();
     }
@@ -457,9 +447,10 @@ IntRect RenderFlow::getAbsoluteRepaintRect()
         // Find our leftmost position.
         int left = 0;
         int top = firstLineBox() ? firstLineBox()->yPos() : 0;
-        for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
+        for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
             if (curr == firstLineBox() || curr->xPos() < left)
                 left = curr->xPos();
+        }
 
         // Now invalidate a rectangle.
         int ow = style() ? style()->outlineSize() : 0;
@@ -475,7 +466,7 @@ IntRect RenderFlow::getAbsoluteRepaintRect()
                 inlineFlow->layer()->relativePositionOffset(left, top);
         }
 
-        IntRect r(-ow+left, -ow+top, width()+ow*2, height()+ow*2);
+        IntRect r(-ow + left, -ow + top, width() + ow * 2, height() + ow * 2);
         if (cb->hasOverflowClip()) {
             // cb->height() is inaccurate if we're in the middle of a layout of |cb|, so use the
             // layer's size instead.  Even if the layer's size is wrong, the layer itself will repaint
@@ -488,7 +479,7 @@ IntRect RenderFlow::getAbsoluteRepaintRect()
             r = intersection(repaintRect, boxRect);
         }
         cb->computeAbsoluteRepaintRect(r);
-        
+
         if (ow) {
             for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
                 if (!curr->isText()) {
@@ -496,22 +487,22 @@ IntRect RenderFlow::getAbsoluteRepaintRect()
                     r.unite(childRect);
                 }
             }
-            
+
             if (continuation() && !continuation()->isInline()) {
                 IntRect contRect = continuation()->getAbsoluteRepaintRectWithOutline(ow);
                 r.unite(contRect);
             }
         }
-        
+
         return r;
-    } else
-        return RenderContainer::getAbsoluteRepaintRect();
+    }
+
+    return RenderContainer::getAbsoluteRepaintRect();
 }
 
-int
-RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
+int RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    assert(!isInlineFlow());
+    ASSERT(!isInlineFlow());
     int bottom = includeSelf && m_width > 0 ? m_height : 0;
     if (!includeOverflowInterior && hasOverflowClip())
         return bottom;
@@ -520,22 +511,20 @@ RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
     // For now, we have to descend into all the children, since we may have a huge abs div inside
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have to get to
     // the abs div.
-    for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
-            int lp = c->yPos() + c->lowestPosition(false);
-            bottom = max(bottom, lp);
-        }
+    for (RenderObject* c = firstChild(); c; c = c->nextSibling()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow())
+            bottom = max(bottom, c->yPos() + c->lowestPosition(false));
     }
+
     if (isRelPositioned())
         bottom += relativePositionOffsetY();         
-    
+
     return bottom;
 }
 
 int RenderFlow::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    assert(!isInlineFlow());
+    ASSERT(!isInlineFlow());
     int right = includeSelf && m_height > 0 ? m_width : 0;
     if (!includeOverflowInterior && hasOverflowClip())
         return right;
@@ -544,44 +533,40 @@ int RenderFlow::rightmostPosition(bool includeOverflowInterior, bool includeSelf
     // For now, we have to descend into all the children, since we may have a huge abs div inside
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have to get to
     // the abs div.
-    for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
-            int rp = c->xPos() + c->rightmostPosition(false);
-            right = max(right, rp);
-        }
+    for (RenderObject* c = firstChild(); c; c = c->nextSibling()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow())
+            right = max(right, c->xPos() + c->rightmostPosition(false));
     }
-    
+
     if (isRelPositioned())
         right += relativePositionOffsetX();
-    
+
     return right;
 }
 
 int RenderFlow::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    assert(!isInlineFlow());
+    ASSERT(!isInlineFlow());
     int left = includeSelf && m_height > 0 ? 0 : m_width;
     if (!includeOverflowInterior && hasOverflowClip())
         return left;
-    
+
     // FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
     // For now, we have to descend into all the children, since we may have a huge abs div inside
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have to get to
     // the abs div.
-    for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
-            int lp = c->xPos() + c->leftmostPosition(false);
-            left = min(left, lp);
-        }
+    for (RenderObject* c = firstChild(); c; c = c->nextSibling()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow())
+            left = min(left, c->xPos() + c->leftmostPosition(false));
     }
-    
+
     if (isRelPositioned())
         left += relativePositionOffsetX(); 
-        
+
     return left;
 }
 
-IntRect RenderFlow::caretRect(int offset, EAffinity affinity, int *extraWidthToEndOfLine)
+IntRect RenderFlow::caretRect(int offset, EAffinity affinity, intextraWidthToEndOfLine)
 {
     // Do the normal calculation in most cases.
     if (firstChild() || style()->display() == INLINE)
@@ -595,7 +580,7 @@ IntRect RenderFlow::caretRect(int offset, EAffinity affinity, int *extraWidthToE
     // However, as soon as some content is entered, the line boxes will be
     // constructed and this kludge is not called any more. So only the caret size
     // of an empty :first-line'd block is wrong. I think we can live with that.
-    RenderStyle *currentStyle = firstLineStyle();
+    RenderStylecurrentStyle = firstLineStyle();
     int height = lineHeight(true);
     const int caretWidth = 1;
 
@@ -647,10 +632,10 @@ IntRect RenderFlow::caretRect(int offset, EAffinity affinity, int *extraWidthToE
             int myRight = x + caretWidth;
             int ignore;
             absolutePositionForContent(myRight, ignore);
-            
+
             int containerRight = containingBlock()->xPos() + containingBlockWidth();
             absolutePositionForContent(containerRight, ignore);
-            
+
             *extraWidthToEndOfLine = containerRight - myRight;
         }
     }
@@ -663,27 +648,27 @@ IntRect RenderFlow::caretRect(int offset, EAffinity affinity, int *extraWidthToE
     return IntRect(x, y, caretWidth, height);
 }
 
-void RenderFlow::addFocusRingRects(GraphicsContext* p, int _tx, int _ty)
+void RenderFlow::addFocusRingRects(GraphicsContext* graphicsContext, int tx, int ty)
 {
     if (isRenderBlock())
-       p->addFocusRingRect(IntRect(_tx, _ty, width(), height()));
+       graphicsContext->addFocusRingRect(IntRect(tx, ty, width(), height()));
 
     if (!hasOverflowClip()) {
         for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
-            p->addFocusRingRect(IntRect(_tx + curr->xPos(), _ty + curr->yPos(), curr->width(), curr->height()));
-        
+            graphicsContext->addFocusRingRect(IntRect(tx + curr->xPos(), ty + curr->yPos(), curr->width(), curr->height()));
+
         for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling())
             if (!curr->isText() && !curr->isListMarker())
-                curr->addFocusRingRects(p, _tx + curr->xPos(), _ty + curr->yPos());
+                curr->addFocusRingRects(graphicsContext, tx + curr->xPos(), ty + curr->yPos());
     }
-        
+
     if (continuation())
-        continuation()->addFocusRingRects(p
-                                          _tx - containingBlock()->xPos() + continuation()->xPos(),
-                                          _ty - containingBlock()->yPos() + continuation()->yPos());
+        continuation()->addFocusRingRects(graphicsContext
+                                          tx - containingBlock()->xPos() + continuation()->xPos(),
+                                          ty - containingBlock()->yPos() + continuation()->yPos());
 }
 
-void RenderFlow::paintOutline(GraphicsContext* p, int _tx, int _ty)
+void RenderFlow::paintOutline(GraphicsContext* graphicsContext, int tx, int ty)
 {
     if (!hasOutline())
         return;
@@ -693,20 +678,20 @@ void RenderFlow::paintOutline(GraphicsContext* p, int _tx, int _ty)
         Color oc = style()->outlineColor();
         if (!oc.isValid())
             oc = style()->color();
-        
-        p->initFocusRing(ow, style()->outlineOffset());
-        addFocusRingRects(p, _tx, _ty);
+
+        graphicsContext->initFocusRing(ow, style()->outlineOffset());
+        addFocusRingRects(graphicsContext, tx, ty);
         if (style()->outlineStyleIsAuto())
-            p->drawFocusRing(oc);
+            graphicsContext->drawFocusRing(oc);
         else
-            addPDFURLRect(p, p->focusRingBoundingRect());
-        p->clearFocusRing();
+            addPDFURLRect(graphicsContext, graphicsContext->focusRingBoundingRect());
+        graphicsContext->clearFocusRing();
     }
 
     if (style()->outlineStyleIsAuto() || style()->outlineStyle() <= BHIDDEN)
         return;
 
-    DeprecatedPtrList <IntRect> rects;
+    DeprecatedPtrList<IntRect> rects;
     rects.setAutoDelete(true);
 
     rects.append(new IntRect);
@@ -716,26 +701,27 @@ void RenderFlow::paintOutline(GraphicsContext* p, int _tx, int _ty)
     rects.append(new IntRect);
 
     for (unsigned int i = 1; i < rects.count() - 1; i++)
-        paintOutlineForLine(p, _tx, _ty, *rects.at(i-1), *rects.at(i), *rects.at(i+1));
+        paintOutlineForLine(graphicsContext, tx, ty, *rects.at(i - 1), *rects.at(i), *rects.at(i + 1));
 }
 
-void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const IntRect &lastline, const IntRect &thisline, const IntRect &nextline)
+void RenderFlow::paintOutlineForLine(GraphicsContext* graphicsContext, int tx, int ty,
+                                     const IntRect& lastline, const IntRect& thisline, const IntRect& nextline)
 {
     int ow = style()->outlineWidth();
     EBorderStyle os = style()->outlineStyle();
     Color oc = style()->outlineColor();
     if (!oc.isValid())
         oc = style()->color();
-    
+
     int offset = style()->outlineOffset();
-    
+
     int t = ty + thisline.y() - offset;
     int l = tx + thisline.x() - offset;
     int b = ty + thisline.bottom() + offset;
     int r = tx + thisline.right() + offset;
     
     // left edge
-    drawBorder(p,
+    drawBorder(graphicsContext,
                l - ow,
                t - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.right() - 1) <= thisline.x() ? ow : 0),
                l,
@@ -746,7 +732,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
                (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.right() - 1) <= thisline.x() ? ow : -ow));
     
     // right edge
-    drawBorder(p,
+    drawBorder(graphicsContext,
                r,
                t - (lastline.isEmpty() || lastline.right() < thisline.right() || (thisline.right() - 1) <= lastline.x() ? ow : 0),
                r + ow,
@@ -757,7 +743,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
                (nextline.isEmpty() || nextline.right() <= thisline.right() || (thisline.right() - 1) <= nextline.x() ? ow : -ow));
     // upper edge
     if (thisline.x() < lastline.x())
-        drawBorder(p,
+        drawBorder(graphicsContext,
                    l - ow,
                    t - ow,
                    min(r+ow, (lastline.isEmpty() ? 1000000 : tx + lastline.x())),
@@ -767,7 +753,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
                    (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow);
     
     if (lastline.right() < thisline.right())
-        drawBorder(p,
+        drawBorder(graphicsContext,
                    max(lastline.isEmpty() ? -1000000 : tx + lastline.right(), l - ow),
                    t - ow,
                    r + ow,
@@ -778,7 +764,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
     
     // lower edge
     if (thisline.x() < nextline.x())
-        drawBorder(p,
+        drawBorder(graphicsContext,
                    l - ow,
                    b,
                    min(r + ow, !nextline.isEmpty() ? tx + nextline.x() + 1 : 1000000),
@@ -788,7 +774,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
                    (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow);
     
     if (nextline.right() < thisline.right())
-        drawBorder(p,
+        drawBorder(graphicsContext,
                    max(!nextline.isEmpty() ? tx + nextline.right() : -1000000, l - ow),
                    b,
                    r + ow,
index 301c265..ef7cfc9 100644 (file)
@@ -46,7 +46,7 @@ AffineTransform RenderForeignObject::translationForAttributes()
 
 void RenderForeignObject::paint(PaintInfo& paintInfo, int parentX, int parentY)
 {
-    if (paintInfo.p->paintingDisabled())
+    if (paintInfo.context->paintingDisabled())
         return;
 
     KRenderingDevice* device = renderingDevice();
@@ -54,37 +54,37 @@ void RenderForeignObject::paint(PaintInfo& paintInfo, int parentX, int parentY)
     bool shouldPopContext = false;
     if (!context) {
         // Only need to setup for KCanvas rendering if it hasn't already been done.
-        context = paintInfo.p->createRenderingDeviceContext();
+        context = paintInfo.context->createRenderingDeviceContext();
         device->pushContext(context);
         shouldPopContext = true;
     }
 
-    paintInfo.p->save();
+    paintInfo.context->save();
 
     context->concatCTM(AffineTransform().translate(parentX, parentY));
     context->concatCTM(localTransform());
     context->concatCTM(translationForAttributes());
 
-    paintInfo.p->clip(getClipRect(parentX, parentY));
+    paintInfo.context->clip(getClipRect(parentX, parentY));
 
     float opacity = style()->opacity();
     if (opacity < 1.0f)
         // FIXME: Possible optimization by clipping to bbox here, once relativeBBox is implemented & clip, mask and filter support added.
-        paintInfo.p->beginTransparencyLayer(opacity);
+        paintInfo.context->beginTransparencyLayer(opacity);
 
     PaintInfo pi(paintInfo);
-    pi.r = absoluteTransform().invert().mapRect(paintInfo.r);
+    pi.rect = absoluteTransform().invert().mapRect(paintInfo.rect);
     RenderBlock::paint(pi, 0, 0);
 
     if (opacity < 1.0f)
-        paintInfo.p->endTransparencyLayer();
+        paintInfo.context->endTransparencyLayer();
 
     if (shouldPopContext) {
         device->popContext();
         delete context;
     }
 
-    paintInfo.p->restore();
+    paintInfo.context->restore();
 }
 
 void RenderForeignObject::computeAbsoluteRepaintRect(IntRect& r, bool f)
index 433eb52..2c92e6c 100644 (file)
@@ -52,7 +52,7 @@ void RenderHTMLCanvas::paint(PaintInfo& paintInfo, int tx, int ty)
         paintBoxDecorations(paintInfo, x, y);
 
     if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && style()->visibility() == VISIBLE)
-        paintOutline(paintInfo.p, x, y, width(), height(), style());
+        paintOutline(paintInfo.context, x, y, width(), height(), style());
 
     if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
         return;
@@ -68,11 +68,11 @@ void RenderHTMLCanvas::paint(PaintInfo& paintInfo, int tx, int ty)
     }
 
     if (element() && element()->hasTagName(canvasTag))
-        static_cast<HTMLCanvasElement*>(element())->paint(paintInfo.p,
+        static_cast<HTMLCanvasElement*>(element())->paint(paintInfo.context,
             IntRect(x + borderLeft() + paddingLeft(), y + borderTop() + paddingTop(), contentWidth(), contentHeight()));
 
     if (drawSelectionTint)
-        paintInfo.p->fillRect(selectionRect(), selectionBackgroundColor());
+        paintInfo.context->fillRect(selectionRect(), selectionBackgroundColor());
 }
 
 void RenderHTMLCanvas::layout()
index 97753f2..64e852c 100644 (file)
@@ -185,10 +185,10 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
     if (shouldPaintBackgroundOrBorder() && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline) 
         paintBoxDecorations(paintInfo, tx, ty);
 
-    GraphicsContext* p = paintInfo.p;
+    GraphicsContext* context = paintInfo.context;
 
     if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && style()->visibility() == VISIBLE)
-        paintOutline(p, tx, ty, width(), height(), style());
+        paintOutline(context, tx, ty, width(), height(), style());
 
     if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
         return;
@@ -220,9 +220,9 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
 
         if (cWidth > 2 && cHeight > 2) {
             if (!errorOccurred()) {
-                p->setPen(Color::lightGray);
-                p->setFillColor(Color::transparent);
-                p->drawRect(IntRect(tx + leftBorder + leftPad, ty + topBorder + topPad, cWidth, cHeight));
+                context->setPen(Color::lightGray);
+                context->setFillColor(Color::transparent);
+                context->drawRect(IntRect(tx + leftBorder + leftPad, ty + topBorder + topPad, cWidth, cHeight));
             }
 
             bool errorPictureDrawn = false;
@@ -241,34 +241,34 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
                     centerY = 0;
                 imageX = leftBorder + leftPad + centerX;
                 imageY = topBorder + topPad + centerY;
-                p->drawImage(image(), IntPoint(tx + imageX, ty + imageY));
+                context->drawImage(image(), IntPoint(tx + imageX, ty + imageY));
                 errorPictureDrawn = true;
             }
 
             if (!m_altText.isEmpty()) {
                 DeprecatedString text = m_altText.deprecatedString();
                 text.replace('\\', backslashAsCurrencySymbol());
-                p->setFont(style()->font());
-                p->setPen(style()->color());
+                context->setFont(style()->font());
+                context->setPen(style()->color());
                 int ax = tx + leftBorder + leftPad;
                 int ay = ty + topBorder + topPad;
                 const Font& font = style()->font();
                 int ascent = font.ascent();
-                
+
                 // Only draw the alt text if it'll fit within the content box,
                 // and only if it fits above the error image.
                 TextRun textRun(reinterpret_cast<const UChar*>(text.unicode()), text.length());
                 int textWidth = font.width(textRun);
                 if (errorPictureDrawn) {
                     if (usableWidth >= textWidth && font.height() <= imageY)
-                        p->drawText(textRun, IntPoint(ax, ay + ascent));
+                        context->drawText(textRun, IntPoint(ax, ay + ascent));
                 } else if (usableWidth >= textWidth && cHeight >= font.height())
-                    p->drawText(textRun, IntPoint(ax, ay + ascent));
+                    context->drawText(textRun, IntPoint(ax, ay + ascent));
             }
         }
     } else if (m_cachedImage) {
 #if PLATFORM(MAC)
-        if (style()->highlight() != nullAtom && !paintInfo.p->paintingDisabled())
+        if (style()->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
             paintCustomHighlight(tx - m_x, ty - m_y, style()->highlight(), true);
 #endif
 
@@ -276,10 +276,10 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
 
         HTMLImageElement* imageElt = (element() && element()->hasTagName(imgTag)) ? static_cast<HTMLImageElement*>(element()) : 0;
         CompositeOperator compositeOperator = imageElt ? imageElt->compositeOperator() : CompositeSourceOver;
-        p->drawImage(image(), rect, compositeOperator);
+        context->drawImage(image(), rect, compositeOperator);
 
         if (drawSelectionTint)
-            p->fillRect(selectionRect(), selectionBackgroundColor());
+            context->fillRect(selectionRect(), selectionBackgroundColor());
     }
 }
 
index fd7731c..0ae604b 100644 (file)
@@ -1399,8 +1399,8 @@ RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
         setClip(p, paintDirtyRect, damageRect);
 
         // Paint the background.
-        RenderObject::PaintInfo info(p, damageRect, PaintPhaseBlockBackground, false, paintingRootForRenderer, 0);
-        renderer()->paint(info, tx, ty);
+        RenderObject::PaintInfo paintInfo(p, damageRect, PaintPhaseBlockBackground, false, paintingRootForRenderer, 0);
+        renderer()->paint(paintInfo, tx, ty);
 
         // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
         // z-index.  We paint after we painted the background/border, so that the scrollbars will
@@ -1424,18 +1424,17 @@ RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
 
         // Set up the clip used when painting our children.
         setClip(p, paintDirtyRect, clipRectToApply);
-        RenderObject::PaintInfo info(p, clipRectToApply, 
-                                     selectionOnly ? PaintPhaseSelection : PaintPhaseChildBlockBackgrounds,
-                                     forceWhiteText,
-                                     paintingRootForRenderer, 0);
-        renderer()->paint(info, tx, ty);
+        RenderObject::PaintInfo paintInfo(p, clipRectToApply, 
+                                          selectionOnly ? PaintPhaseSelection : PaintPhaseChildBlockBackgrounds,
+                                          forceWhiteText, paintingRootForRenderer, 0);
+        renderer()->paint(paintInfo, tx, ty);
         if (!selectionOnly) {
-            info.phase = PaintPhaseFloat;
-            renderer()->paint(info, tx, ty);
-            info.phase = PaintPhaseForeground;
-            renderer()->paint(info, tx, ty);
-            info.phase = PaintPhaseChildOutlines;
-            renderer()->paint(info, tx, ty);
+            paintInfo.phase = PaintPhaseFloat;
+            renderer()->paint(paintInfo, tx, ty);
+            paintInfo.phase = PaintPhaseForeground;
+            renderer()->paint(paintInfo, tx, ty);
+            paintInfo.phase = PaintPhaseChildOutlines;
+            renderer()->paint(paintInfo, tx, ty);
         }
 
         // Now restore our clip.
@@ -1444,9 +1443,9 @@ RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
     
     if (!outlineRect.isEmpty()) {
         // Paint our own outline
-        RenderObject::PaintInfo info(p, outlineRect, PaintPhaseSelfOutline, false, paintingRootForRenderer, 0);
+        RenderObject::PaintInfo paintInfo(p, outlineRect, PaintPhaseSelfOutline, false, paintingRootForRenderer, 0);
         setClip(p, paintDirtyRect, outlineRect);
-        renderer()->paint(info, tx, ty);
+        renderer()->paint(paintInfo, tx, ty);
         restoreClip(p, paintDirtyRect, outlineRect);
     }
     
index cd88fd5..514c70b 100644 (file)
@@ -209,64 +209,64 @@ IntRect RenderListBox::itemBoundingBoxRect(int tx, int ty, int index)
                    style()->font().height() + optionsSpacingMiddle);
 }
     
-void RenderListBox::paintObject(PaintInfo& i, int tx, int ty)
+void RenderListBox::paintObject(PaintInfo& paintInfo, int tx, int ty)
 {
     // Push a clip.
     IntRect clipRect(tx + borderLeft(), ty + borderTop(),
          width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
-    if (i.phase == PaintPhaseForeground || i.phase == PaintPhaseChildBlockBackgrounds) {
+    if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
-        i.p->save();
-        i.p->clip(clipRect);
+        paintInfo.context->save();
+        paintInfo.context->clip(clipRect);
     }
     
     HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
     int listItemsSize = select->listItems().size();
 
-    if (i.phase == PaintPhaseForeground) {
+    if (paintInfo.phase == PaintPhaseForeground) {
         int index = m_indexOffset;
         while (index < listItemsSize && index < m_indexOffset + size()) {
-            paintItemForeground(i, tx, ty, index);
+            paintItemForeground(paintInfo, tx, ty, index);
             index++;
         }
     }
-    
+
     // Paint the children.
-    RenderBlock::paintObject(i, tx, ty);
-    
-    if (i.phase == PaintPhaseBlockBackground) {
+    RenderBlock::paintObject(paintInfo, tx, ty);
+
+    if (paintInfo.phase == PaintPhaseBlockBackground) {
         int index = m_indexOffset;
         while (index < listItemsSize && index < m_indexOffset + size()) {
-            paintItemBackground(i, tx, ty, index);
+            paintItemBackground(paintInfo, tx, ty, index);
             index++;
         }
-        paintScrollbar(i);
+        paintScrollbar(paintInfo);
     }
     // Pop the clip.
-    if (i.phase == PaintPhaseForeground || i.phase == PaintPhaseChildBlockBackgrounds)
-        i.p->restore();
+    if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds)
+        paintInfo.context->restore();
 }
 
-void RenderListBox::paintScrollbar(PaintInfo& i)
+void RenderListBox::paintScrollbar(PaintInfo& paintInfo)
 {
     if (m_vBar) {
         IntRect absBounds = absoluteBoundingBoxRect();
         IntRect scrollRect(absBounds.right() - borderRight() - m_vBar->width(),
-                absBounds.y() + borderTop(),
-                m_vBar->width(),
-                absBounds.height() - (borderTop() + borderBottom()));
+                           absBounds.y() + borderTop(),
+                           m_vBar->width(),
+                           absBounds.height() - (borderTop() + borderBottom()));
         m_vBar->setRect(scrollRect);
-        m_vBar->paint(i.p, scrollRect);
+        m_vBar->paint(paintInfo.context, scrollRect);
     }
 }
 
-void RenderListBox::paintItemForeground(PaintInfo& i, int tx, int ty, int listIndex)
+void RenderListBox::paintItemForeground(PaintInfo& paintInfo, int tx, int ty, int listIndex)
 {
     HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
     const Vector<HTMLElement*>& listItems = select->listItems();
     HTMLElement* element = listItems[listIndex];
-            
+
     String itemText;
     if (element->hasTagName(optionTag))
         itemText = static_cast<HTMLOptionElement*>(element)->optionText();
@@ -290,11 +290,10 @@ void RenderListBox::paintItemForeground(PaintInfo& i, int tx, int ty, int listIn
         // Honor the foreground color for disabled items
         else if (!element->disabled())
             textColor = theme()->inactiveListBoxSelectionForegroundColor();
-          
     }
-        
-    i.p->setPen(textColor);
-    
+
+    paintInfo.context->setPen(textColor);
+
     Font itemFont = style()->font();
     if (element->hasTagName(optgroupTag)) {
         FontDescription d = itemFont.fontDescription();
@@ -302,14 +301,14 @@ void RenderListBox::paintItemForeground(PaintInfo& i, int tx, int ty, int listIn
         itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing());
         itemFont.update();
     }
-    i.p->setFont(itemFont);
+    paintInfo.context->setFont(itemFont);
     
     // Draw the item text
     if (itemStyle->visibility() != HIDDEN)
-        i.p->drawText(textRun, r.location());
+        paintInfo.context->drawText(textRun, r.location());
 }
 
-void RenderListBox::paintItemBackground(PaintInfo& i, int tx, int ty, int listIndex)
+void RenderListBox::paintItemBackground(PaintInfo& paintInfo, int tx, int ty, int listIndex)
 {
     HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
     const Vector<HTMLElement*>& listItems = select->listItems();
@@ -326,7 +325,7 @@ void RenderListBox::paintItemBackground(PaintInfo& i, int tx, int ty, int listIn
 
     // Draw the background for this list box item
     if (!element->renderStyle() || element->renderStyle()->visibility() != HIDDEN)
-        i.p->fillRect(itemBoundingBoxRect(tx, ty, listIndex), backColor);
+        paintInfo.context->fillRect(itemBoundingBoxRect(tx, ty, listIndex), backColor);
 }
 
 bool RenderListBox::isPointInScrollbar(HitTestResult& result, int _x, int _y, int _tx, int _ty)
index 3d348de..b89acce 100644 (file)
@@ -149,30 +149,30 @@ InlineBox* RenderListMarker::createInlineBox(bool, bool isRootLineBox, bool)
     return box;
 }
 
-void RenderListMarker::paint(PaintInfo& i, int _tx, int _ty)
+void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (i.phase != PaintPhaseForeground)
+    if (paintInfo.phase != PaintPhaseForeground)
         return;
     
     if (style()->visibility() != VISIBLE)
         return;
 
     IntRect marker = getRelativeMarkerRect();
-    marker.move(_tx, _ty);
+    marker.move(tx, ty);
 
-    IntRect box(_tx + m_x, _ty + m_y, m_width, m_height);
+    IntRect box(tx + m_x, ty + m_y, m_width, m_height);
 
-    if (box.y() > i.r.bottom() || box.y() + box.height() < i.r.y())
+    if (box.y() > paintInfo.rect.bottom() || box.y() + box.height() < paintInfo.rect.y())
         return;
 
     if (shouldPaintBackgroundOrBorder()) 
-        paintBoxDecorations(i, box.x(), box.y());
+        paintBoxDecorations(paintInfo, box.x(), box.y());
 
-    GraphicsContext* p = i.p;
-    p->setFont(style()->font());
+    GraphicsContext* context = paintInfo.context;
+    context->setFont(style()->font());
 
     if (document()->printing()) {
-        if (box.y() < i.r.y())
+        if (box.y() < paintInfo.rect.y())
             // This has been printed already we suppose.
             return;
         
@@ -187,44 +187,44 @@ void RenderListMarker::paint(PaintInfo& i, int _tx, int _ty)
 
     if (m_listImage && !m_listImage->isErrorImage()) {
 #if PLATFORM(MAC)
-        if (style()->highlight() != nullAtom && !i.p->paintingDisabled())
-            paintCustomHighlight(_tx, _ty, style()->highlight(), true);
+        if (style()->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
+            paintCustomHighlight(tx, ty, style()->highlight(), true);
 #endif
-        p->drawImage(m_listImage->image(), marker.location());
+        context->drawImage(m_listImage->image(), marker.location());
         if (selectionState() != SelectionNone)
-            p->fillRect(selectionRect(), selectionBackgroundColor());
+            context->fillRect(selectionRect(), selectionBackgroundColor());
         return;
     }
 
 #ifdef BOX_DEBUG
-    p->setPen(red);
-    p->drawRect(box.x(), box.y(), box.width(), box.height());
+    context->setPen(red);
+    context->drawRect(box.x(), box.y(), box.width(), box.height());
 #endif
 
 #if PLATFORM(MAC)
     // FIXME: paint gap between marker and list item proper
-    if (style()->highlight() != nullAtom && !i.p->paintingDisabled())
-        paintCustomHighlight(_tx, _ty, style()->highlight(), true);
+    if (style()->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
+        paintCustomHighlight(tx, ty, style()->highlight(), true);
 #endif
 
     if (selectionState() != SelectionNone)
-        p->fillRect(selectionRect(), selectionBackgroundColor());
+        context->fillRect(selectionRect(), selectionBackgroundColor());
 
     const Color color(style()->color());
-    p->setPen(color);
+    context->setPen(color);
 
     switch(style()->listStyleType()) {
     case DISC:
-        p->setFillColor(color.rgb());
-        p->drawEllipse(marker);
+        context->setFillColor(color);
+        context->drawEllipse(marker);
         return;
     case CIRCLE:
-        p->setFillColor(Color::transparent);
-        p->drawEllipse(marker);
+        context->setFillColor(Color::transparent);
+        context->drawEllipse(marker);
         return;
     case SQUARE:
-        p->setFillColor(color.rgb());
-        p->drawRect(marker);
+        context->setFillColor(color);
+        context->drawRect(marker);
         return;
     case LNONE:
         return;
@@ -234,15 +234,15 @@ void RenderListMarker::paint(PaintInfo& i, int _tx, int _ty)
             TextRun textRun(reinterpret_cast<const UChar*>(m_item.unicode()), m_item.length());
             if (style()->direction() == LTR) {
                 int width = font.width(textRun);
-                p->drawText(textRun, marker.location());
+                context->drawText(textRun, marker.location());
                 UChar periodSpace[2] = { '.', ' ' };
-                p->drawText(TextRun(periodSpace, 2), marker.location() + IntSize(width, 0));
+                context->drawText(TextRun(periodSpace, 2), marker.location() + IntSize(width, 0));
             } else {
                 UChar spacePeriod[2] = { ' ', '.' };
                 TextRun spacePeriodRun(spacePeriod, 2);
                 int width = font.width(spacePeriodRun);
-                p->drawText(spacePeriodRun, marker.location());
-                p->drawText(textRun, marker.location() + IntSize(width, 0));
+                context->drawText(spacePeriodRun, marker.location());
+                context->drawText(textRun, marker.location() + IntSize(width, 0));
             }
         }
     }
index f546257..3368971 100644 (file)
@@ -167,25 +167,25 @@ String RenderMenuList::text()
     return m_buttonText ? m_buttonText->data() : String();
 }
 
-void RenderMenuList::paintObject(PaintInfo& i, int x, int y)
+void RenderMenuList::paintObject(PaintInfo& paintInfo, int x, int y)
 {
     // Push a clip.
-    if (i.phase == PaintPhaseForeground) {
+    if (paintInfo.phase == PaintPhaseForeground) {
         IntRect clipRect(x + borderLeft() + paddingLeft(), y + borderTop() + paddingTop(),
             width() - borderLeft() - borderRight() - paddingLeft() - paddingRight(),
             height() - borderBottom() - borderTop() - paddingTop() - paddingBottom());
         if (clipRect.isEmpty())
             return;
-        i.p->save();
-        i.p->clip(clipRect);
+        paintInfo.context->save();
+        paintInfo.context->clip(clipRect);
     }
 
     // Paint the children.
-    RenderBlock::paintObject(i, x, y);
+    RenderBlock::paintObject(paintInfo, x, y);
 
     // Pop the clip.
-    if (i.phase == PaintPhaseForeground)
-        i.p->restore();
+    if (paintInfo.phase == PaintPhaseForeground)
+        paintInfo.context->restore();
 }
 
 void RenderMenuList::calcMinMaxWidth()
index 12b65f8..f04aa87 100644 (file)
@@ -1732,7 +1732,7 @@ void RenderObject::paintOutline(GraphicsContext* p, int _tx, int _ty, int w, int
 
 }
 
-void RenderObject::paint(PaintInfo& i, int tx, int ty)
+void RenderObject::paint(PaintInfo& /*paintInfo*/, int /*tx*/, int /*ty*/)
 {
 }
 
index b129a7f..5b9ea44 100644 (file)
@@ -421,22 +421,31 @@ public:
      * (tx|ty) is the calculated position of the parent
      */
     struct PaintInfo {
-        PaintInfo(GraphicsContext* _p, const IntRect& _r, PaintPhase _phase, bool _forceWhiteText, RenderObject* _paintingRoot, RenderFlowSequencedSet* _outlineObjects)
-            : p(_p), r(_r), phase(_phase), forceWhiteText(_forceWhiteText), paintingRoot(_paintingRoot), outlineObjects(_outlineObjects) {}
-        GraphicsContext* p;
-        IntRect r;
+        PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase newPhase, bool newForceWhiteText, RenderObject* newPaintingRoot, RenderFlowSequencedSet* newOutlineObjects)
+            : context(newContext)
+            , rect(newRect)
+            , phase(newPhase)
+            , forceWhiteText(newForceWhiteText)
+            , paintingRoot(newPaintingRoot)
+            , outlineObjects(newOutlineObjects)
+        {
+        }
+
+        GraphicsContext* context;
+        IntRect rect;
         PaintPhase phase;
         bool forceWhiteText;
         RenderObject* paintingRoot; // used to draw just one element and its visual kids
         RenderFlowSequencedSet* outlineObjects; // used to list outlines that should be painted by a block with inline children
     };
+
     virtual void paint(PaintInfo&, int tx, int ty);
     void paintBorder(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, bool begin = true, bool end = true);
     bool paintBorderImage(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle* style);
     void paintOutline(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle* style);
 
     // RenderBox implements this.
-    virtual void paintBoxDecorations(PaintInfo&, int tx, int ty) {}
+    virtual void paintBoxDecorations(PaintInfo&, int tx, int ty) { }
 
     virtual void paintBackgroundExtended(GraphicsContext*, const Color&, const BackgroundLayer*, int clipy, int cliph,
         int tx, int ty, int w, int height, int bleft, int bright, int pleft, int pright) {}
@@ -861,18 +870,19 @@ public:
 
     virtual void selectionStartEnd(int& spos, int& epos);
 
-    RenderObject* paintingRootForChildren(PaintInfo &i) const {
+    RenderObject* paintingRootForChildren(PaintInfo& paintInfo) const
+    {
         // if we're the painting root, kids draw normally, and see root of 0
-        return (!i.paintingRoot || i.paintingRoot == this) ? 0 : i.paintingRoot;
+        return (!paintInfo.paintingRoot || paintInfo.paintingRoot == this) ? 0 : paintInfo.paintingRoot;
     }
 
-    bool shouldPaintWithinRoot(PaintInfo &i) const {
-        return !i.paintingRoot || i.paintingRoot == this;
+    bool shouldPaintWithinRoot(PaintInfo& paintInfo) const
+    {
+        return !paintInfo.paintingRoot || paintInfo.paintingRoot == this;
     }
-    
+
 protected:
-    virtual void printBoxDecorations(GraphicsContext*, int /*x*/, int /*y*/,
-        int /*w*/, int /*h*/, int /*tx*/, int /*ty*/) {}
+    virtual void printBoxDecorations(GraphicsContext*, int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*tx*/, int /*ty*/) { }
 
     virtual IntRect viewRect() const;
 
index c299656..b6cb9de 100644 (file)
@@ -163,23 +163,23 @@ short RenderPath::baselinePosition(bool b, bool isRootLineBox) const
     return static_cast<short>(relativeBBox(true).height());
 }
 
-void RenderPath::paint(PaintInfo &paintInfo, int parentX, int parentY)
+void RenderPath::paint(PaintInfopaintInfo, int parentX, int parentY)
 {
     // No one should be transforming us via these.
     //ASSERT(parentX == 0);
     //ASSERT(parentY == 0);
 
-    if (paintInfo.p->paintingDisabled() || (paintInfo.phase != PaintPhaseForeground) || style()->visibility() == HIDDEN || path().isEmpty())
+    if (paintInfo.context->paintingDisabled() || (paintInfo.phase != PaintPhaseForeground) || style()->visibility() == HIDDEN || path().isEmpty())
         return;
     
     KRenderingDevice* device = renderingDevice();
     KRenderingDeviceContext* context = device->currentContext();
     bool shouldPopContext = false;
     if (context)
-        paintInfo.p->save();
+        paintInfo.context->save();
     else {
         // Need to set up KCanvas rendering if it hasn't already been done.
-        context = paintInfo.p->createRenderingDeviceContext();
+        context = paintInfo.context->createRenderingDeviceContext();
         device->pushContext(context);
         shouldPopContext = true;
     }
@@ -201,20 +201,20 @@ void RenderPath::paint(PaintInfo &paintInfo, int parentX, int parentY)
 
     context->clearPath();
     
-    KRenderingPaintServer *fillPaintServer = KSVGPainterFactory::fillPaintServer(style(), this);
+    KRenderingPaintServerfillPaintServer = KSVGPainterFactory::fillPaintServer(style(), this);
     if (fillPaintServer) {
         context->addPath(path());
         fillPaintServer->setActiveClient(this);
         fillPaintServer->draw(context, this, APPLY_TO_FILL);
     }
-    KRenderingPaintServer *strokePaintServer = KSVGPainterFactory::strokePaintServer(style(), this);
+    KRenderingPaintServerstrokePaintServer = KSVGPainterFactory::strokePaintServer(style(), this);
     if (strokePaintServer) {
         context->addPath(path()); // path is cleared when filled.
         strokePaintServer->setActiveClient(this);
         strokePaintServer->draw(context, this, APPLY_TO_STROKE);
     }
 
-    drawMarkersIfNeeded(paintInfo.p, paintInfo.r, path());
+    drawMarkersIfNeeded(paintInfo.context, paintInfo.rect, path());
 
     // actually apply the filter
     if (filter)
@@ -222,7 +222,7 @@ void RenderPath::paint(PaintInfo &paintInfo, int parentX, int parentY)
 
     // restore drawing state
     if (!shouldPopContext)
-        paintInfo.p->restore();
+        paintInfo.context->restore();
     else {
         device->popContext();
         delete context;
index 8daf736..d96263f 100644 (file)
@@ -41,36 +41,36 @@ RenderReplaced::RenderReplaced(Node* node)
     m_selectionState = SelectionNone;
 }
 
-bool RenderReplaced::shouldPaint(PaintInfo& i, int& _tx, int& _ty)
+bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, int& tx, int& ty)
 {
-    if (i.phase != PaintPhaseForeground && i.phase != PaintPhaseOutline && i.phase != PaintPhaseSelfOutline 
-        && i.phase != PaintPhaseSelection)
+    if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline 
+            && paintInfo.phase != PaintPhaseSelection)
         return false;
 
-    if (!shouldPaintWithinRoot(i))
+    if (!shouldPaintWithinRoot(paintInfo))
         return false;
         
     // if we're invisible or haven't received a layout yet, then just bail.
     if (style()->visibility() != VISIBLE)
         return false;
 
-    int tx = _tx + m_x;
-    int ty = _ty + m_y;
+    int currentTX = tx + m_x;
+    int currentTY = ty + m_y;
 
     // Early exit if the element touches the edges.
-    int top = ty;
-    int bottom = ty + m_height;
+    int top = currentTY;
+    int bottom = currentTY + m_height;
     if (isSelected() && m_inlineBoxWrapper) {
-        int selTop = _ty + m_inlineBoxWrapper->root()->selectionTop();
-        int selBottom = _ty + selTop + m_inlineBoxWrapper->root()->selectionHeight();
+        int selTop = ty + m_inlineBoxWrapper->root()->selectionTop();
+        int selBottom = ty + selTop + m_inlineBoxWrapper->root()->selectionHeight();
         top = min(selTop, top);
         bottom = max(selBottom, bottom);
     }
     
-    int os = 2*maximalOutlineSize(i.phase);
-    if (tx >= i.r.right() + os || tx + m_width <= i.r.x() - os)
+    int os = 2 * maximalOutlineSize(paintInfo.phase);
+    if (currentTX >= paintInfo.rect.right() + os || currentTX + m_width <= paintInfo.rect.x() - os)
         return false;
-    if (top >= i.r.bottom() + os || bottom <= i.r.y() - os)
+    if (top >= paintInfo.rect.bottom() + os || bottom <= paintInfo.rect.y() - os)
         return false;
 
     return true;
index 8369836..13b050a 100644 (file)
@@ -127,18 +127,18 @@ void RenderSVGContainer::layout()
 
 void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
 {
-    if (paintInfo.p->paintingDisabled())
+    if (paintInfo.context->paintingDisabled())
         return;
-    
+
     // No one should be transforming us via these.
     //ASSERT(m_x == 0);
     //ASSERT(m_y == 0);
-        
+
     if (shouldPaintBackgroundOrBorder() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection)) 
         paintBoxDecorations(paintInfo, parentX, parentY);
-    
+
     if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && style()->visibility() == VISIBLE)
-        paintOutline(paintInfo.p, parentX, parentY, width(), height(), style());
+        paintOutline(paintInfo.context, parentX, parentY, width(), height(), style());
     
     if (paintInfo.phase != PaintPhaseForeground || !drawsContents() || style()->visibility() == HIDDEN)
         return;
@@ -152,12 +152,12 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
     bool shouldPopContext = false;
     if (!deviceContext) {
         // I only need to setup for KCanvas rendering if it hasn't already been done.
-        deviceContext = paintInfo.p->createRenderingDeviceContext();
+        deviceContext = paintInfo.context->createRenderingDeviceContext();
         device->pushContext(deviceContext);
         shouldPopContext = true;
     } else
-        paintInfo.p->save();
-    
+        paintInfo.context->save();
+
     if (parentX != 0 || parentY != 0) {
         // Translate from parent offsets (html renderers) to a relative transform (svg renderers)
         deviceContext->concatCTM(AffineTransform().translate(parentX, parentY));
@@ -166,10 +166,10 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
     
     if (!viewport().isEmpty()) {
         if (style()->overflowX() != OVISIBLE)
-            paintInfo.p->clip(enclosingIntRect(viewport())); // FIXME: Eventually we'll want float-precision clipping
+            paintInfo.context->clip(enclosingIntRect(viewport())); // FIXME: Eventually we'll want float-precision clipping
         deviceContext->concatCTM(AffineTransform().translate(viewport().x(), viewport().y()));
     }
-    
+
     if (!localTransform().isIdentity())
         deviceContext->concatCTM(localTransform());
     
@@ -183,8 +183,8 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
 
     float opacity = style()->opacity();
     if (opacity < 1.0f) {
-        paintInfo.p->clip(enclosingIntRect(strokeBBox));
-        paintInfo.p->beginTransparencyLayer(opacity);
+        paintInfo.context->clip(enclosingIntRect(strokeBBox));
+        paintInfo.context->beginTransparencyLayer(opacity);
     }
 
     if (filter)
@@ -192,21 +192,21 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
     
     if (!viewBox().isEmpty())
         deviceContext->concatCTM(viewportTransform());
-    
+
     RenderContainer::paint(paintInfo, 0, 0);
-    
+
     if (filter)
         filter->applyFilter(strokeBBox);
-    
+
     if (opacity < 1.0f)
-        paintInfo.p->endTransparencyLayer();
-    
+        paintInfo.context->endTransparencyLayer();
+
     // restore drawing state
     if (shouldPopContext) {
         device->popContext();
         delete deviceContext;
     } else
-        paintInfo.p->restore();
+        paintInfo.context->restore();
 }
 
 FloatRect RenderSVGContainer::viewport() const
index 8919e6a..d979adc 100644 (file)
@@ -66,7 +66,7 @@ public:
     
     virtual void calcMinMaxWidth();
     virtual void layout();
-    virtual void paint(PaintInfo &paintInfo, int parentX, int parentY);
+    virtual void paint(PaintInfo&, int parentX, int parentY);
     
     virtual IntRect getAbsoluteRepaintRect();
 
index 786a247..a96f774 100644 (file)
@@ -124,17 +124,17 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s
 
 void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
 {
-    if (paintInfo.p->paintingDisabled() || (paintInfo.phase != PaintPhaseForeground) || style()->visibility() == HIDDEN)
+    if (paintInfo.context->paintingDisabled() || (paintInfo.phase != PaintPhaseForeground) || style()->visibility() == HIDDEN)
         return;
     
     KRenderingDevice* device = renderingDevice();
     KRenderingDeviceContext* context = device->currentContext();
     bool shouldPopContext = false;
     if (context)
-        paintInfo.p->save();
+        paintInfo.context->save();
     else {
         // Need to push a device context on the stack if empty.
-        context = paintInfo.p->createRenderingDeviceContext();
+        context = paintInfo.context->createRenderingDeviceContext();
         device->pushContext(context);
         shouldPopContext = true;
     }
@@ -145,7 +145,7 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
     
     FloatRect boundingBox = FloatRect(0, 0, width(), height());
     const SVGRenderStyle* svgStyle = style()->svgStyle();
-            
+
     if (SVGResourceClipper* clipper = getClipperById(document(), svgStyle->clipPath().substring(1)))
         clipper->applyClip(boundingBox);
 
@@ -165,13 +165,13 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
     }
 
     PaintInfo pi(paintInfo);
-    pi.p = c.get();
-    pi.r = absoluteTransform().invert().mapRect(paintInfo.r);
+    pi.context = c.get();
+    pi.rect = absoluteTransform().invert().mapRect(paintInfo.rect);
 
     int x = 0, y = 0;
     if (shouldPaint(pi, x, y)) {
-        SVGImageElement *imageElt = static_cast<SVGImageElement*>(node());
-        
+        SVGImageElementimageElt = static_cast<SVGImageElement*>(node());
+
         if (imageElt->preserveAspectRatio()->align() == SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_NONE)
             RenderImage::paint(pi, 0, 0);
         else {
@@ -190,7 +190,7 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
 
     // restore drawing state
     if (!shouldPopContext)
-        paintInfo.p->restore();
+        paintInfo.context->restore();
     else {
         device->popContext();
         delete context;
index 64722e8..329c124 100644 (file)
@@ -113,14 +113,14 @@ void RenderSVGText::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
     rects.append(enclosingIntRect(boxTransform.mapRect(boxRect)));
 }
 
-void RenderSVGText::paint(PaintInfo& paintInfo, int _tx, int _ty)
+void RenderSVGText::paint(PaintInfo& paintInfo, int tx, int ty)
 {    
     KRenderingDevice* device = renderingDevice();
     RenderObject::PaintInfo pi = paintInfo;
     OwnPtr<GraphicsContext> c(device->currentContext()->createGraphicsContext());
-    pi.p = c.get();
-    pi.r = (absoluteTransform()).invert().mapRect(paintInfo.r);
-    RenderBlock::paint(pi, _tx, _ty);
+    pi.context = c.get();
+    pi.rect = (absoluteTransform()).invert().mapRect(paintInfo.rect);
+    RenderBlock::paint(pi, tx, ty);
 }
 
 FloatRect RenderSVGText::relativeBBox(bool includeStroke) const
index 65c83d3..3f2b605 100644 (file)
@@ -31,16 +31,15 @@ namespace WebCore {
 
 class SVGTextElement;
 
-class RenderSVGText : public RenderBlock
-{
+class RenderSVGText : public RenderBlock {
 public:
     RenderSVGText(SVGTextElement* node);
 
-    virtual const char *renderName() const { return "RenderSVGText"; }
+    virtual const charrenderName() const { return "RenderSVGText"; }
     
     virtual AffineTransform localTransform() const { return m_transform; }
     virtual void setLocalTransform(const AffineTransform& transform) { m_transform = transform; }
-    virtual void paint(PaintInfo& i, int _tx, int _ty);
+    virtual void paint(PaintInfo&, int tx, int ty);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
     virtual void computeAbsoluteRepaintRect(IntRect& r, bool f);
index 8296fc1..d7c7ce5 100644 (file)
@@ -380,22 +380,22 @@ void RenderTable::setCellWidths()
             static_cast<RenderTableSection *>(child)->setCellWidths();
 }
 
-void RenderTable::paint(PaintInfo& i, int _tx, int _ty)
+void RenderTable::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    _tx += xPos();
-    _ty += yPos();
+    tx += xPos();
+    ty += yPos();
 
-    PaintPhase paintPhase = i.phase;
-    
-    int os = 2*maximalOutlineSize(paintPhase);
-    if (_ty >= i.r.bottom() + os || _ty + height() <= i.r.y() - os)
+    PaintPhase paintPhase = paintInfo.phase;
+
+    int os = 2 * maximalOutlineSize(paintPhase);
+    if (ty >= paintInfo.rect.bottom() + os || ty + height() <= paintInfo.rect.y() - os)
         return;
-    if (_tx >= i.r.right() + os || _tx + width() <= i.r.x() - os)
+    if (tx >= paintInfo.rect.right() + os || tx + width() <= paintInfo.rect.x() - os)
         return;
 
     if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground)
         && shouldPaintBackgroundOrBorder() && style()->visibility() == VISIBLE)
-        paintBoxDecorations(i, _tx, _ty);
+        paintBoxDecorations(paintInfo, tx, ty);
 
     // We're done.  We don't bother painting any children.
     if (paintPhase == PaintPhaseBlockBackground)
@@ -404,12 +404,13 @@ void RenderTable::paint(PaintInfo& i, int _tx, int _ty)
     // We don't paint our own background, but we do let the kids paint their backgrounds.
     if (paintPhase == PaintPhaseChildBlockBackgrounds)
         paintPhase = PaintPhaseChildBlockBackground;
-    PaintInfo paintInfo(i);
-    paintInfo.phase = paintPhase;
-    
-    for (RenderObject *child = firstChild(); child; child = child->nextSibling())
+    PaintInfo info(paintInfo);
+    info.phase = paintPhase;
+
+    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
         if (!child->layer() && (child->isTableSection() || child == tCaption))
-            child->paint(paintInfo, _tx, _ty);
+            child->paint(info, tx, ty);
+    }
 
     if (collapseBorders() && paintPhase == PaintPhaseChildBlockBackground && style()->visibility() == VISIBLE) {
         // Collect all the unique border styles that we want to paint in a sorted list.  Once we
@@ -422,41 +423,42 @@ void RenderTable::paint(PaintInfo& i, int _tx, int _ty)
         DeprecatedValueListIterator<CollapsedBorderValue> end = borderStyles.end();
         for (; it != end; ++it) {
             m_currentBorder = &(*it);
-            for (RenderObject* child = firstChild(); child; child = child->nextSibling())
+            for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
                 if (child->isTableSection())
-                    child->paint(paintInfo, _tx, _ty);
+                    child->paint(info, tx, ty);
+            }
         }
     }
-        
+
 #ifdef BOX_DEBUG
-    outlineBox(i.p, _tx, _ty, "blue");
+    outlineBox(paintInfo.context, tx, ty, "blue");
 #endif
 }
 
-void RenderTable::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
+void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
 {
     int w = width();
     int h = height();
-    
+
     // Account for the caption.
     if (tCaption) {
         int captionHeight = (tCaption->height() + tCaption->marginBottom() +  tCaption->marginTop());
         h -= captionHeight;
         if (tCaption->style()->captionSide() != CAPBOTTOM)
-            _ty += captionHeight;
+            ty += captionHeight;
     }
 
-    int my = max(_ty, i.r.y());
+    int my = max(ty, paintInfo.rect.y());
     int mh;
-    if (_ty < i.r.y())
-        mh= max(0, h - (i.r.y() - _ty));
+    if (ty < paintInfo.rect.y())
+        mh = max(0, h - (paintInfo.rect.y() - ty));
     else
-        mh = min(i.r.height(), h);
-    
-    paintBackground(i.p, style()->backgroundColor(), style()->backgroundLayers(), my, mh, _tx, _ty, w, h);
-    
+        mh = min(paintInfo.rect.height(), h);
+
+    paintBackground(paintInfo.context, style()->backgroundColor(), style()->backgroundLayers(), my, mh, tx, ty, w, h);
+
     if (style()->hasBorder() && !collapseBorders())
-        paintBorder(i.p, _tx, _ty, w, h, style());
+        paintBorder(paintInfo.context, tx, ty, w, h, style());
 }
 
 void RenderTable::calcMinMaxWidth()
index 30bc2ce..988fe1a 100644 (file)
@@ -101,7 +101,7 @@ public:
     virtual int overflowHeight(bool includeInterior = true) const { return height(); }
     virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
     virtual void paint(PaintInfo&, int tx, int ty);
-    virtual void paintBoxDecorations(PaintInfo&, int _tx, int _ty);
+    virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
     virtual void layout();
     virtual void calcMinMaxWidth();
 
index 6e184f0..fff531e 100644 (file)
@@ -537,28 +537,29 @@ static void outlineBox(GraphicsContext* p, int _tx, int _ty, int w, int h)
 }
 #endif
 
-void RenderTableCell::paint(PaintInfo& i, int _tx, int _ty)
+void RenderTableCell::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    _tx += m_x;
-    _ty += m_y;
+    tx += m_x;
+    ty += m_y;
 
     // check if we need to do anything at all...
-    int os = 2*maximalOutlineSize(i.phase);
+    int os = 2 * maximalOutlineSize(paintInfo.phase);
 
-    if (i.phase == PaintPhaseCollapsedTableBorders && style()->visibility() == VISIBLE) {
-        if (_ty - table()->outerBorderTop() >= i.r.bottom() + os || _ty + _topExtra + m_height + _bottomExtra + table()->outerBorderBottom() <= i.r.y() - os)
+    if (paintInfo.phase == PaintPhaseCollapsedTableBorders && style()->visibility() == VISIBLE) {
+        if (ty - table()->outerBorderTop() >= paintInfo.rect.bottom() + os ||
+                ty + _topExtra + m_height + _bottomExtra + table()->outerBorderBottom() <= paintInfo.rect.y() - os)
             return;
         int w = width();
         int h = height() + borderTopExtra() + borderBottomExtra();
-        paintCollapsedBorder(i.p, _tx, _ty, w, h);
+        paintCollapsedBorder(paintInfo.context, tx, ty, w, h);
     } else {
-        if (_ty >= i.r.bottom() + os || _ty + _topExtra + m_height + _bottomExtra <= i.r.y() - os)
+        if (ty >= paintInfo.rect.bottom() + os || ty + _topExtra + m_height + _bottomExtra <= paintInfo.rect.y() - os)
             return;
-        RenderBlock::paintObject(i, _tx, _ty + _topExtra);
+        RenderBlock::paintObject(paintInfo, tx, ty + _topExtra);
     }
 
 #ifdef BOX_DEBUG
-    ::outlineBox( i.p, _tx, _ty, width(), height() + borderTopExtra() + borderBottomExtra());
+    ::outlineBox(paintInfo.context, tx, ty, width(), height() + borderTopExtra() + borderBottomExtra());
 #endif
 }
 
@@ -700,7 +701,7 @@ void RenderTableCell::paintCollapsedBorder(GraphicsContext* p, int _tx, int _ty,
     }
 }
 
-void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty, RenderObject* backgroundObject)
+void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, int tx, int ty, RenderObject* backgroundObject)
 {
     if (!backgroundObject)
         return;
@@ -710,18 +711,18 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty,
         return;
 
     if (backgroundObject != this) {
-        _tx += m_x;
-        _ty += m_y + _topExtra;
+        tx += m_x;
+        ty += m_y + _topExtra;
     }
 
     int w = width();
     int h = height() + borderTopExtra() + borderBottomExtra();
-    _ty -= borderTopExtra();
-    
-    int my = max(_ty, i.r.y());
-    int end = min(i.r.bottom(), _ty + h);
+    ty -= borderTopExtra();
+
+    int my = max(ty, paintInfo.rect.y());
+    int end = min(paintInfo.rect.bottom(), ty + h);
     int mh = end - my;
-    
+
     Color c = backgroundObject->style()->backgroundColor();
     const BackgroundLayer* bgLayer = backgroundObject->style()->backgroundLayers();
 
@@ -730,32 +731,32 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty,
         // on top of the borders otherwise.  This only matters for cells and rows.
         bool hasLayer = backgroundObject->layer() && (backgroundObject == this || backgroundObject == parent());
         if (hasLayer && tableElt->collapseBorders()) {
-            IntRect clipRect(_tx + borderLeft(), _ty + borderTop(),
+            IntRect clipRect(tx + borderLeft(), ty + borderTop(),
                 w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
-            i.p->save();
-            i.p->clip(clipRect);
+            paintInfo.context->save();
+            paintInfo.context->clip(clipRect);
         }
-        paintBackground(i.p, c, bgLayer, my, mh, _tx, _ty, w, h);
+        paintBackground(paintInfo.context, c, bgLayer, my, mh, tx, ty, w, h);
         if (hasLayer && tableElt->collapseBorders())
-            i.p->restore();
+            paintInfo.context->restore();
     }
 }
 
-void RenderTableCell::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
+void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
 {
     RenderTable* tableElt = table();
     if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
         return;
+
     // Paint our cell background.
-    paintBackgroundsBehindCell(i, _tx, _ty, this);
+    paintBackgroundsBehindCell(paintInfo, tx, ty, this);
 
     int w = width();
     int h = height() + borderTopExtra() + borderBottomExtra();
-    _ty -= borderTopExtra();
+    ty -= borderTopExtra();
 
     if (style()->hasBorder() && !tableElt->collapseBorders())
-        paintBorder(i.p, _tx, _ty, w, h, style());
+        paintBorder(paintInfo.context, tx, ty, w, h, style());
 }
 
 #ifndef NDEBUG
index 4be8420..f16e93d 100644 (file)
@@ -84,9 +84,9 @@ public:
     void setCellTopExtra(int p) { _topExtra = p; }
     void setCellBottomExtra(int p) { _bottomExtra = p; }
 
-    virtual void paint(PaintInfo& i, int tx, int ty);
+    virtual void paint(PaintInfo&, int tx, int ty);
 
-    void paintCollapsedBorder(GraphicsContext* p, int x, int y, int w, int h);
+    void paintCollapsedBorder(GraphicsContext*, int x, int y, int w, int h);
     
     // lie about position to outside observers
     virtual int yPos() const { return m_y + _topExtra; }
index e669d0a..06981e5 100644 (file)
@@ -156,7 +156,7 @@ bool RenderTableRow::nodeAtPoint(const HitTestRequest& request, HitTestResult& r
     return false;
 }
 
-void RenderTableRow::paint(PaintInfo& i, int tx, int ty)
+void RenderTableRow::paint(PaintInfo& paintInfo, int tx, int ty)
 {
     assert(m_layer);
     if (!m_layer)
@@ -165,14 +165,14 @@ void RenderTableRow::paint(PaintInfo& i, int tx, int ty)
     for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
         if (child->isTableCell()) {
             // Paint the row background behind the cell.
-            if (i.phase == PaintPhaseBlockBackground || i.phase == PaintPhaseChildBlockBackground) {
+            if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground) {
                 RenderTableCell* cell = static_cast<RenderTableCell*>(child);
-                cell->paintBackgroundsBehindCell(i, tx, ty, this);
+                cell->paintBackgroundsBehindCell(paintInfo, tx, ty, this);
             }
             if (!child->layer())
-                child->paint(i, tx, ty);
+                child->paint(paintInfo, tx, ty);
         }
     }
 }
 
-}
+} // namespace WebCore
index a946a3a..c5eef98 100644 (file)
@@ -50,7 +50,7 @@ public:
     // The only time rows get a layer is when they have transparency.
     virtual bool requiresLayer() { return isTransparent() || hasOverflowClip(); }
 
-    virtual void paint(PaintInfo& i, int tx, int ty);
+    virtual void paint(PaintInfo&, int tx, int ty);
 
     RenderTable* table() const { return static_cast<RenderTable*>(parent()->parent()); }
     RenderTableSection* section() const { return static_cast<RenderTableSection*>(parent()); }
index 8a6fb44..433a7b9 100644 (file)
@@ -829,7 +829,7 @@ void RenderTableSection::recalcOuterBorder()
 }
 
 
-void RenderTableSection::paint(PaintInfo& i, int tx, int ty)
+void RenderTableSection::paint(PaintInfo& paintInfo, int tx, int ty)
 {
     unsigned int totalRows = gridRows;
     unsigned int totalCols = table()->columns.size();
@@ -842,24 +842,26 @@ void RenderTableSection::paint(PaintInfo& i, int tx, int ty)
 
     // check which rows and cols are visible and only paint these
     // ### fixme: could use a binary search here
-    PaintPhase paintPhase = i.phase;
-    int x = i.r.x();
-    int y = i.r.y();
-    int w = i.r.width();
-    int h = i.r.height();
+    PaintPhase paintPhase = paintInfo.phase;
+    int x = paintInfo.rect.x();
+    int y = paintInfo.rect.y();
+    int w = paintInfo.rect.width();
+    int h = paintInfo.rect.height();
 
     int os = 2 * maximalOutlineSize(paintPhase);
     unsigned int startrow = 0;
     unsigned int endrow = totalRows;
-    for (; startrow < totalRows; startrow++)
+    for (; startrow < totalRows; startrow++) {
         if (ty + rowPos[startrow+1] >= y - os)
             break;
+    }
     if (startrow == totalRows && ty + rowPos[totalRows] + table()->outerBorderBottom() >= y - os)
         startrow--;
 
-    for (; endrow > 0; endrow--)
-        if ( ty + rowPos[endrow-1] <= y + h + os)
+    for (; endrow > 0; endrow--) {
+        if (ty + rowPos[endrow-1] <= y + h + os)
             break;
+    }
     if (endrow == 0 && ty + rowPos[0] - table()->outerBorderTop() <= y + h + os)
         endrow++;
 
@@ -872,7 +874,7 @@ void RenderTableSection::paint(PaintInfo& i, int tx, int ty)
         }
         if (startcol == totalCols && tx + table()->columnPos[totalCols] + table()->outerBorderRight() >= x - os)
             startcol--;
-        
+
         for (; endcol > 0; endcol--) {
             if (tx + table()->columnPos[endcol - 1] <= x + w + os)
                 break;
@@ -890,12 +892,12 @@ void RenderTableSection::paint(PaintInfo& i, int tx, int ty)
                 c--;
             for (; c < endcol; c++) {
                 CellStruct current = cellAt(r, c);
-                RenderTableCell *cell = current.cell;
+                RenderTableCellcell = current.cell;
                     
                 // Cells must always paint in the order in which they appear taking into account
                 // their upper left originating row/column.  For cells with rowspans, avoid repainting
                 // if we've already seen the cell.
-                if (!cell || (r > startrow && (cellAt(r-1, c).cell == cell)))
+                if (!cell || (r > startrow && (cellAt(r - 1, c).cell == cell)))
                     continue;
 
                 if (paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) {
@@ -909,26 +911,26 @@ void RenderTableSection::paint(PaintInfo& i, int tx, int ty)
                             colGroup = col->parent();
                     }
                     RenderObject* row = cell->parent();
-                    
+
                     // Column groups and columns first.
                     // FIXME: Columns and column groups do not currently support opacity, and they are being painted "too late" in
                     // the stack, since we have already opened a transparency layer (potentially) for the table row group.
                     // Note that we deliberately ignore whether or not the cell has a layer, since these backgrounds paint "behind" the
                     // cell.
-                    cell->paintBackgroundsBehindCell(i, tx, ty, colGroup);
-                    cell->paintBackgroundsBehindCell(i, tx, ty, col);
-                    
+                    cell->paintBackgroundsBehindCell(paintInfo, tx, ty, colGroup);
+                    cell->paintBackgroundsBehindCell(paintInfo, tx, ty, col);
+
                     // Paint the row group next.
-                    cell->paintBackgroundsBehindCell(i, tx, ty, this);
-                    
+                    cell->paintBackgroundsBehindCell(paintInfo, tx, ty, this);
+
                     // Paint the row next, but only if it doesn't have a layer.  If a row has a layer, it will be responsible for
                     // painting the row background for the cell.
                     if (!row->layer())
-                        cell->paintBackgroundsBehindCell(i, tx, ty, row);
+                        cell->paintBackgroundsBehindCell(paintInfo, tx, ty, row);
                 }
 
-                if ((!cell->layer() && !cell->parent()->layer()) || i.phase == PaintPhaseCollapsedTableBorders)
-                    cell->paint(i, tx, ty);
+                if ((!cell->layer() && !cell->parent()->layer()) || paintInfo.phase == PaintPhaseCollapsedTableBorders)
+                    cell->paint(paintInfo, tx, ty);
             }
         }
     }
index e48adca..652599c 100644 (file)
@@ -98,13 +98,14 @@ public:
     int outerBorderLeft() const { return m_outerBorderLeft; }
     int outerBorderRight() const { return m_outerBorderRight; }
 
-    virtual void paint(PaintInfo& i, int tx, int ty);
+    virtual void paint(PaintInfo&, int tx, int ty);
 
     int numRows() const { return gridRows; }
     int numColumns() const;
-    int getBaseline(int row) {return grid[row].baseLine;}
+    int getBaseline(int row) { return grid[row].baseLine; }
 
-    void setNeedCellRecalc() {
+    void setNeedCellRecalc()
+    {
         needCellRecalc = true;
         table()->setNeedSectionRecalc();
     }
index 5a31694..85a61ad 100644 (file)
@@ -51,13 +51,13 @@ public:
     virtual bool isTextFragment() const;
     virtual PassRefPtr<StringImpl> originalString() const;
     
-    virtual const char *renderName() const { return "RenderText"; }
+    virtual const charrenderName() const { return "RenderText"; }
 
-    virtual void setStyle(RenderStyle *style);
+    virtual void setStyle(RenderStyle*);
 
-    void extractTextBox(InlineTextBox* textBox);
-    void attachTextBox(InlineTextBox* textBox);
-    void removeTextBox(InlineTextBox* textBox);
+    void extractTextBox(InlineTextBox*);
+    void attachTextBox(InlineTextBox*);
+    void removeTextBox(InlineTextBox*);
     void deleteTextBoxes();
     virtual void destroy();
     
@@ -67,7 +67,7 @@ public:
     virtual InlineBox* createInlineBox(bool,bool, bool isOnlyRun = false);
     virtual void dirtyLineBoxes(bool fullLayout, bool isRootInlineBox = false);
     
-    virtual void paint(PaintInfo& i, int tx, int ty) { assert(false); }
+    virtual void paint(PaintInfo&, int tx, int ty) { assert(false); }
     virtual void layout() { assert(false); }
 
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction) { assert(false); return false; }
@@ -104,7 +104,7 @@ public:
                                     int& minW, int& maxW, bool& stripFrontSpaces);
     
     bool containsOnlyWhitespace(unsigned from, unsigned len) const;
-    
+
     // returns the minimum x position of all runs relative to the parent.
     // defaults to 0.
     int minXPos() const;
@@ -113,7 +113,7 @@ public:
     virtual int yPos() const;
 
     virtual const Font& font();
-    virtual short verticalPositionHint( bool firstLine ) const;
+    virtual short verticalPositionHint(bool firstLine) const;
 
     void setText(StringImpl*, bool force = false);
     void setTextWithOffset(StringImpl*, unsigned offset, unsigned len, bool force = false);
@@ -122,8 +122,8 @@ public:
     virtual SelectionState selectionState() const { return m_selectionState; }
     virtual void setSelectionState(SelectionState s);
     virtual IntRect selectionRect();
-    virtual IntRect caretRect(int offset, EAffinity affinity, int *extraWidthToEndOfLine = 0);
-    void posOfChar(int ch, int &x, int &y);
+    virtual IntRect caretRect(int offset, EAffinity, int* extraWidthToEndOfLine = 0);
+    void posOfChar(int ch, int& x, int& y);
 
     virtual int marginLeft() const { return style()->marginLeft().calcMinValue(0); }
     virtual int marginRight() const { return style()->marginRight().calcMinValue(0); }
@@ -132,15 +132,15 @@ public:
 
     const Font* font(bool firstLine) const;
 
-    Text *element() const { return static_cast<Text*>(RenderObject::element()); }
+    Textelement() const { return static_cast<Text*>(RenderObject::element()); }
 
     InlineTextBox* firstTextBox() const { return m_firstTextBox; }
     InlineTextBox* lastTextBox() const { return m_lastTextBox; }
-    
-    virtual InlineBox *inlineBox(int offset, EAffinity affinity = UPSTREAM);
+
+    virtual InlineBox* inlineBox(int offset, EAffinity = UPSTREAM);
 
     int widthFromCache(const Font*, int start, int len, int tabWidth, int xpos) const;
-    bool shouldUseMonospaceCache(const Font *) const;
+    bool shouldUseMonospaceCache(const Font*) const;
     void cacheWidths();
     bool allAscii() const;
 
@@ -153,27 +153,27 @@ public:
     
     bool containsReversedText() const { return m_containsReversedText; }
     
-public:
-    InlineTextBox * findNextInlineTextBox( int offset, int &pos ) const;
+    InlineTextBox* findNextInlineTextBox(int offset, int& pos) const;
 
-protected: // members
+protected:
+    // members
     RefPtr<StringImpl> str;
-    
+
     InlineTextBox* m_firstTextBox;
     InlineTextBox* m_lastTextBox;
-    
+
     int m_minWidth;
     int m_maxWidth;
     int m_beginMinWidth;
     int m_endMinWidth;
-    
+
     SelectionState m_selectionState : 3 ;
     bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.
     bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> with '\n').
     bool m_hasTab : 1; // Whether or not we have a variable width tab character (e.g., <pre> with '\t').
     bool m_hasBeginWS : 1; // Whether or not we begin with WS (only true if we aren't pre)
     bool m_hasEndWS : 1; // Whether or not we end with WS (only true if we aren't pre)
-    
+
     bool m_linesDirty : 1; // This bit indicates that the text run has already dirtied specific
                            // line boxes, and this hint will enable layoutInlineChildren to avoid
                            // just dirtying everything when character data is modified (e.g., appended/inserted
@@ -188,6 +188,6 @@ protected: // members
 
 UBreakIterator* characterBreakIterator(const StringImpl*);
 
-}
+} // namespace WebCore
 
-#endif
+#endif // RenderText_h
index 2a3a2bd..d06cc07 100644 (file)
@@ -77,31 +77,31 @@ void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, El
     }
 }
 
-bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
+bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
     // If painting is disabled, but we aren't updating control tints, then just bail.
     // If we are updating control tints, just schedule a repaint if the theme supports tinting
     // for that control.
-    if (i.p->updatingControlTints()) {
+    if (paintInfo.context->updatingControlTints()) {
         if (controlSupportsTints(o))
             o->repaint();
         return false;
     }
-    if (i.p->paintingDisabled())
+    if (paintInfo.context->paintingDisabled())
         return false;
-        
+
     // Call the appropriate paint method based off the appearance value.
     switch (o->style()->appearance()) {
         case CheckboxAppearance:
-            return paintCheckbox(o, i, r);
+            return paintCheckbox(o, paintInfo, r);
         case RadioAppearance:
-            return paintRadio(o, i, r);
+            return paintRadio(o, paintInfo, r);
         case PushButtonAppearance:
         case SquareButtonAppearance:
         case ButtonAppearance:
-            return paintButton(o, i, r);
+            return paintButton(o, paintInfo, r);
         case MenulistAppearance:
-            return paintMenuList(o, i, r);
+            return paintMenuList(o, paintInfo, r);
         case MenulistButtonAppearance:
         case TextFieldAppearance:
         case TextAreaAppearance:
@@ -110,22 +110,22 @@ bool RenderTheme::paint(RenderObject* o, const RenderObject::PaintInfo& i, const
         default:
             break;
     }
-    
+
     return true; // We don't support the appearance, so let the normal background/border paint.
 }
 
-bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
+bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    if (i.p->paintingDisabled())
+    if (paintInfo.context->paintingDisabled())
         return false;
-        
+
     // Call the appropriate paint method based off the appearance value.
     switch (o->style()->appearance()) {
         case TextFieldAppearance:
-            return paintTextField(o, i, r);
+            return paintTextField(o, paintInfo, r);
         case ListboxAppearance:
         case TextAreaAppearance:
-            return paintTextArea(o, i, r);
+            return paintTextArea(o, paintInfo, r);
         case MenulistButtonAppearance:
             return true;
         case CheckboxAppearance:
@@ -137,19 +137,19 @@ bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo
         default:
             break;
     }
-    
+
     return false;
 }
 
-bool RenderTheme::paintDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
+bool RenderTheme::paintDecorations(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    if (i.p->paintingDisabled())
+    if (paintInfo.context->paintingDisabled())
         return false;
-        
+
     // Call the appropriate paint method based off the appearance value.
     switch (o->style()->appearance()) {
         case MenulistButtonAppearance:
-            return paintMenuListButton(o, i, r);
+            return paintMenuListButton(o, paintInfo, r);
         case TextFieldAppearance:
         case TextAreaAppearance:
         case ListboxAppearance:
@@ -162,7 +162,7 @@ bool RenderTheme::paintDecorations(RenderObject* o, const RenderObject::PaintInf
         default:
             break;
     }
-    
+
     return false;
 }
 
index a67f0ea..a34d85c 100644 (file)
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef RENDER_THEME_H
-#define RENDER_THEME_H
+#ifndef RenderTheme_h
+#define RenderTheme_h
 
 #include "RenderObject.h"
 
@@ -35,63 +35,62 @@ enum ControlState { HoverState, PressedState, FocusState, EnabledState, CheckedS
 
 class RenderTheme {
 public:
-    RenderTheme() {}
-    virtual ~RenderTheme() {}
+    RenderTheme() { }
+    virtual ~RenderTheme() { }
 
     // This method is called whenever style has been computed for an element and the appearance
     // property has been set to a value other than "none".  The theme should map in all of the appropriate
     // metrics and defaults given the contents of the style.  This includes sophisticated operations like
     // selection of control size based off the font, the disabling of appearance when certain other properties like
     // "border" are set, or if the appearance is not supported by the theme.
-    void adjustStyle(CSSStyleSelector*, RenderStyle*, Element*, 
-                    bool UAHasAppearance, const BorderData&, const BackgroundLayer&, const Color& backgroundColor);
-    
+    void adjustStyle(CSSStyleSelector*, RenderStyle*, Element*,  bool UAHasAppearance, 
+                     const BorderData&, const BackgroundLayer&, const Color& backgroundColor);
+
     // This method is called to paint the widget as a background of the RenderObject.  A widget's foreground, e.g., the
     // text of a button, is always rendered by the engine itself.  The boolean return value indicates
     // whether the CSS border/background should also be painted.
-    bool paint(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
-    bool paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
-    bool paintDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
+    bool paint(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+    bool paintBorderOnly(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+    bool paintDecorations(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
 
     // The remaining methods should be implemented by the platform-specific portion of the theme, e.g.,
     // RenderThemeMac.cpp for Mac OS X.
-    
+
     // A method to obtain the baseline position for a "leaf" control.  This will only be used if a baseline
     // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
     // controls that need to do this.
-    virtual short baselinePosition(const RenderObject* o) const;
+    virtual short baselinePosition(const RenderObject*) const;
 
     // A method for asking if a control is a container or not.  Leaf controls have to have some special behavior (like
     // the baseline position API above).
-    virtual bool isControlContainer(EAppearance appearance) const;
+    virtual bool isControlContainer(EAppearance) const;
 
     // A method asking if the control changes its tint when the window has focus or not.
-    virtual bool controlSupportsTints(const RenderObject* o) const { return false; }
+    virtual bool controlSupportsTints(const RenderObject*) const { return false; }
 
     // Whether or not the control has been styled enough by the author to disable the native appearance.
-    virtual bool isControlStyled(const RenderStyle* style, const BorderData& border, 
-                                 const BackgroundLayer& background, const Color& backgroundColor) const;
+    virtual bool isControlStyled(const RenderStyle*, const BorderData&, const BackgroundLayer&, const Color& backgroundColor) const;
 
     // A general method asking if any control tinting is supported at all.
     virtual bool supportsControlTints() const { return false; }
 
     // Some controls may spill out of their containers (e.g., the check on an OS X checkbox).  When these controls repaint,
     // the theme needs to communicate this inflated rect to the engine so that it can invalidate the whole control.
-    virtual void adjustRepaintRect(const RenderObject* o, IntRect& r) { }
-    
+    virtual void adjustRepaintRect(const RenderObject*, IntRect&) { }
+
     // This method is called whenever a relevant state changes on a particular themed object, e.g., the mouse becomes pressed
     // or a control becomes disabled.
-    virtual bool stateChanged(RenderObject* o, ControlState state) const;
+    virtual bool stateChanged(RenderObject*, ControlState) const;
 
     // This method is called whenever the theme changes on the system in order to flush cached resources from the
     // old theme.
-    virtual void themeChanged() {};
+    virtual void themeChanged() { }
 
     // A method asking if the theme is able to draw the focus ring.
-    virtual bool supportsFocusRing(const RenderStyle* style) const;
-    
+    virtual bool supportsFocusRing(const RenderStyle*) const;
+
     // A method asking if the theme's controls actually care about redrawing when hovered.
-    virtual bool supportsHover(const RenderStyle* style) const { return false; }
+    virtual bool supportsHover(const RenderStyle*) const { return false; }
 
     // The selection color.
     Color activeSelectionBackgroundColor() const;
@@ -102,14 +101,13 @@ public:
     virtual Color platformInactiveSelectionBackgroundColor() const;
     virtual Color platformActiveSelectionForegroundColor() const;
     virtual Color platformInactiveSelectionForegroundColor() const;
-    
+
     // List Box selection color
     virtual Color activeListBoxSelectionBackgroundColor() const;
     virtual Color activeListBoxSelectionForegroundColor() const;
     virtual Color inactiveListBoxSelectionBackgroundColor() const;
     virtual Color inactiveListBoxSelectionForegroundColor() const;
 
-
     // System fonts.
     virtual void systemFont(int propId, FontDescription&) const = 0;
 
@@ -117,44 +115,44 @@ public:
 
 protected:
     // Methods for state querying
-    bool isChecked(const RenderObject* o) const;
-    bool isIndeterminate(const RenderObject* o) const;
-    bool isEnabled(const RenderObject* o) const;
-    bool isFocused(const RenderObject* o) const;
-    bool isPressed(const RenderObject* o) const;
-    bool isHovered(const RenderObject* o) const;
-    bool isReadOnlyControl(const RenderObject* o) const;
+    bool isChecked(const RenderObject*) const;
+    bool isIndeterminate(const RenderObject*) const;
+    bool isEnabled(const RenderObject*) const;
+    bool isFocused(const RenderObject*) const;
+    bool isPressed(const RenderObject*) const;
+    bool isHovered(const RenderObject*) const;
+    bool isReadOnlyControl(const RenderObject*) const;
 
     // Methods for each appearance value.
-    virtual void adjustCheckboxStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
-    virtual void setCheckboxSize(RenderStyle* style) const {};
+    virtual void adjustCheckboxStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintCheckbox(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+    virtual void setCheckboxSize(RenderStyle*) const { }
     
-    virtual void adjustRadioStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
-    virtual void setRadioSize(RenderStyle* style) const {};
+    virtual void adjustRadioStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintRadio(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+    virtual void setRadioSize(RenderStyle*) const { }
     
-    virtual void adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
-    virtual void setButtonSize(RenderStyle* style) const {};
+    virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
+    virtual void setButtonSize(RenderStyle*) const { }
 
-    virtual void adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
+    virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustTextAreaStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintTextArea(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
+    virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
+    virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintMenuList(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
 
-    virtual void adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
-    virtual bool paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
+    virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual bool paintMenuListButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }
 };
 
 // Function to obtain the theme.  This is implemented in your platform-specific theme implementation to hand
 // back the appropriate platform theme.
 RenderTheme* theme();
 
-}
+} // namespace WebCore
 
-#endif
+#endif // RenderTheme_h
index 74f8ac8..d6c012c 100644 (file)
@@ -338,7 +338,7 @@ void RenderThemeMac::setFontFromControlSize(CSSStyleSelector* selector, RenderSt
         style->font().update();
 }
 
-bool RenderThemeMac::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
+bool RenderThemeMac::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo&, const IntRect& r)
 {
     // Determine the width and height needed for the control and prepare the cell for painting.
     setCheckboxCellState(o, r);
@@ -398,7 +398,7 @@ void RenderThemeMac::setCheckboxSize(RenderStyle* style) const
     setSizeFromFont(style, checkboxSizes());
 }
 
-bool RenderThemeMac::paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
+bool RenderThemeMac::paintRadio(RenderObject* o, const RenderObject::PaintInfo&, const IntRect& r)
 {
     // Determine the width and height needed for the control and prepare the cell for painting.
     setRadioCellState(o, r);
@@ -571,11 +571,11 @@ void RenderThemeMac::setButtonCellState(const RenderObject* o, const IntRect& r)
 
 bool RenderThemeMac::paintButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    LocalCurrentGraphicsContext LocalCurrentGraphicsContext(paintInfo.p);
+    LocalCurrentGraphicsContext LocalCurrentGraphicsContext(paintInfo.context);
 
     // Determine the width and height needed for the control and prepare the cell for painting.
     setButtonCellState(o, r);
-    
+
     // We inflate the rect as needed to account for padding included in the cell to accommodate the button
     // shadow.  We don't consider this part of the bounds of the control in WebKit.
     IntSize size = buttonSizes()[[button controlSize]];
@@ -587,7 +587,7 @@ bool RenderThemeMac::paintButton(RenderObject* o, const RenderObject::PaintInfo&
             inflatedRect.setY(inflatedRect.y() + (inflatedRect.height() - size.height()) / 2);
             inflatedRect.setHeight(size.height());
         }
-        
+
         // Now inflate it to account for the shadow.
         inflatedRect = inflateRect(inflatedRect, size, buttonMargins());
     }
@@ -600,7 +600,7 @@ bool RenderThemeMac::paintButton(RenderObject* o, const RenderObject::PaintInfo&
 
 bool RenderThemeMac::paintTextField(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    LocalCurrentGraphicsContext LocalCurrentGraphicsContext(paintInfo.p);
+    LocalCurrentGraphicsContext LocalCurrentGraphicsContext(paintInfo.context);
     wkDrawBezeledTextFieldCell(r, isEnabled(o) && !isReadOnlyControl(o));
     return false;
 }
@@ -611,7 +611,7 @@ void RenderThemeMac::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyl
 
 bool RenderThemeMac::paintTextArea(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    LocalCurrentGraphicsContext LocalCurrentGraphicsContext(paintInfo.p);
+    LocalCurrentGraphicsContext LocalCurrentGraphicsContext(paintInfo.context);
     wkDrawBezeledTextArea(r, isEnabled(o) && !isReadOnlyControl(o));
     return false;
 }
@@ -659,14 +659,14 @@ void RenderThemeMac::setPopupPaddingFromControlSize(RenderStyle* style, NSContro
 bool RenderThemeMac::paintMenuList(RenderObject* o, const RenderObject::PaintInfo&, const IntRect& r)
 {
     setPopupButtonCellState(o, r);
-    
+
     IntRect inflatedRect = r;
     IntSize size = popupButtonSizes()[[popupButton controlSize]];
     size.setWidth(r.width());
 
     // Now inflate it to account for the shadow.
     inflatedRect = inflateRect(inflatedRect, size, popupButtonMargins());
-        
+
     [popupButton drawWithFrame:inflatedRect inView:o->view()->frameView()->getDocumentView()];
     [popupButton setControlView:nil];
     return false;
@@ -714,124 +714,126 @@ static void MainGradientInterpolate( void *info, const CGFloat *inData, CGFloat
         outData[i] = ( 1.0 - a ) * dark[i] + a * light[i];
 }
 
-void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
+void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    CGContextRef context = i.p->platformContext();
-        
-    i.p->save();
+    CGContextRef context = paintInfo.context->platformContext();
+
+    paintInfo.context->save();
 
     int radius = o->style()->borderTopLeftRadius().width();
-    
+
     CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB();    
 
     FloatRect topGradient(r.x(), r.y(), r.width(), r.height() / 2.0);
     struct CGFunctionCallbacks topCallbacks = { 0, TopGradientInterpolate, NULL };
-    CGFunctionRef topFunction = CGFunctionCreate( NULL, 1, NULL, 4, NULL, &topCallbacks );
-    CGShadingRef topShading = CGShadingCreateAxial( cspace, CGPointMake(topGradient.x(),  topGradient.y()), 
-                            CGPointMake(topGradient.x(), topGradient.bottom()), topFunction, false, false );
+    CGFunctionRef topFunction = CGFunctionCreate(NULL, 1, NULL, 4, NULL, &topCallbacks);
+    CGShadingRef topShading = CGShadingCreateAxial(cspace, CGPointMake(topGradient.x(), topGradient.y()), 
+                                                   CGPointMake(topGradient.x(), topGradient.bottom()), topFunction, false, false);
 
     FloatRect bottomGradient(r.x() + radius, r.y() + r.height() / 2.0, r.width() - 2 * radius, r.height() / 2.0);
     struct CGFunctionCallbacks bottomCallbacks = { 0, BottomGradientInterpolate, NULL };
-    CGFunctionRef bottomFunction = CGFunctionCreate( NULL, 1, NULL, 4, NULL, &bottomCallbacks );
-    CGShadingRef bottomShading = CGShadingCreateAxial( cspace, CGPointMake(bottomGradient.x(),  bottomGradient.y()), 
-                            CGPointMake(bottomGradient.x(), bottomGradient.bottom()), bottomFunction, false, false );
+    CGFunctionRef bottomFunction = CGFunctionCreate(NULL, 1, NULL, 4, NULL, &bottomCallbacks);
+    CGShadingRef bottomShading = CGShadingCreateAxial(cspace, CGPointMake(bottomGradient.x(),  bottomGradient.y()),
+                                                      CGPointMake(bottomGradient.x(), bottomGradient.bottom()), bottomFunction, false, false);
 
     struct CGFunctionCallbacks mainCallbacks = { 0, MainGradientInterpolate, NULL };
-    CGFunctionRef mainFunction = CGFunctionCreate( NULL, 1, NULL, 4, NULL, &mainCallbacks );
-    CGShadingRef mainShading = CGShadingCreateAxial( cspace, CGPointMake(r.x(),  r.y()), 
-                            CGPointMake(r.x(), r.bottom()), mainFunction, false, false );
+    CGFunctionRef mainFunction = CGFunctionCreate(NULL, 1, NULL, 4, NULL, &mainCallbacks);
+    CGShadingRef mainShading = CGShadingCreateAxial(cspace, CGPointMake(r.x(),  r.y()), 
+                                                    CGPointMake(r.x(), r.bottom()), mainFunction, false, false);
 
-    CGShadingRef leftShading = CGShadingCreateAxial( cspace, CGPointMake(r.x(),  r.y()), 
-                            CGPointMake(r.x() + radius, r.y()), mainFunction, false, false );                        
+    CGShadingRef leftShading = CGShadingCreateAxial(cspace, CGPointMake(r.x(),  r.y()), 
+                                                    CGPointMake(r.x() + radius, r.y()), mainFunction, false, false);
 
-    CGShadingRef rightShading = CGShadingCreateAxial( cspace, CGPointMake(r.right(),  r.y()), 
-                            CGPointMake(r.right() - radius, r.y()), mainFunction, false, false );                             
-    i.p->save();
+    CGShadingRef rightShading = CGShadingCreateAxial(cspace, CGPointMake(r.right(),  r.y()), 
+                                                     CGPointMake(r.right() - radius, r.y()), mainFunction, false, false );            
+    paintInfo.context->save();
     CGContextClipToRect(context, r);
-    i.p->addRoundedRectClip(r, 
+    paintInfo.context->addRoundedRectClip(r, 
         o->style()->borderTopLeftRadius(), o->style()->borderTopRightRadius(),
         o->style()->borderBottomLeftRadius(), o->style()->borderBottomRightRadius());
     CGContextDrawShading(context, mainShading);  
-    i.p->restore();      
+    paintInfo.context->restore();      
 
-    i.p->save();
+    paintInfo.context->save();
     CGContextClipToRect(context, topGradient);
-    i.p->addRoundedRectClip(enclosingIntRect(topGradient), 
+    paintInfo.context->addRoundedRectClip(enclosingIntRect(topGradient), 
         o->style()->borderTopLeftRadius(), o->style()->borderTopRightRadius(),
         IntSize(), IntSize());
     CGContextDrawShading(context, topShading);  
-    i.p->restore();      
+    paintInfo.context->restore();      
 
-    i.p->save();
+    paintInfo.context->save();
     CGContextClipToRect(context, bottomGradient);
-    i.p->addRoundedRectClip(enclosingIntRect(bottomGradient), 
+    paintInfo.context->addRoundedRectClip(enclosingIntRect(bottomGradient), 
         IntSize(), IntSize(),
         o->style()->borderBottomLeftRadius(), o->style()->borderBottomRightRadius());
     CGContextDrawShading(context, bottomShading); 
-    i.p->restore();
-    
-    i.p->save();
+    paintInfo.context->restore();
+
+    paintInfo.context->save();
     CGContextClipToRect(context, r);
-    i.p->addRoundedRectClip(r, 
+    paintInfo.context->addRoundedRectClip(r, 
         o->style()->borderTopLeftRadius(), o->style()->borderTopRightRadius(),
         o->style()->borderBottomLeftRadius(), o->style()->borderBottomRightRadius());
     CGContextDrawShading(context, leftShading);
     CGContextDrawShading(context, rightShading);
-    i.p->restore();
-    
-    i.p->restore();
+    paintInfo.context->restore();
+
+    paintInfo.context->restore();
 }
 
-bool RenderThemeMac::paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
-{        
-    i.p->save();
-        
-    IntRect bounds = IntRect(r.x() + o->style()->borderLeftWidth(), 
-                             r.y() + o->style()->borderTopWidth(), 
+bool RenderThemeMac::paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+{
+    paintInfo.context->save();
+
+    IntRect bounds = IntRect(r.x() + o->style()->borderLeftWidth(),
+                             r.y() + o->style()->borderTopWidth(),
                              r.width() - o->style()->borderLeftWidth() - o->style()->borderRightWidth(),
                              r.height() - o->style()->borderTopWidth() - o->style()->borderBottomWidth());
     // Draw the gradients to give the styled popup menu a button appearance
-    paintMenuListButtonGradients(o, i, bounds);
-                
+    paintMenuListButtonGradients(o, paintInfo, bounds);
+
     float fontScale = o->style()->fontSize() / baseFontSize;
     float centerY = bounds.y() + bounds.height() / 2.0;
     float arrowHeight = baseArrowHeight * fontScale;
-    float arrowWidth = baseArrowWidth * fontScale;    
+    float arrowWidth = baseArrowWidth * fontScale;
     float leftEdge = bounds.right() - arrowPaddingRight - arrowWidth;
     float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale;
-    
-    i.p->setFillColor(o->style()->color());
-    i.p->setPen(Pen(o->style()->color()));
-    
+
+    paintInfo.context->setFillColor(o->style()->color());
+    paintInfo.context->setPen(o->style()->color());
+
     FloatPoint arrow1[3];
     arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0);
     arrow1[1] = FloatPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows / 2.0);
     arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0, centerY - spaceBetweenArrows / 2.0 - arrowHeight);
 
     // Draw the top arrow
-    i.p->drawConvexPolygon(3, arrow1, true);
+    paintInfo.context->drawConvexPolygon(3, arrow1, true);
 
     FloatPoint arrow2[3];
     arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0);
     arrow2[1] = FloatPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows / 2.0);
-    arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0, centerY + spaceBetweenArrows / 2.0 + arrowHeight);   
-    
+    arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0, centerY + spaceBetweenArrows / 2.0 + arrowHeight);
+
     // Draw the bottom arrow
-    i.p->drawConvexPolygon(3, arrow2, true); 
-    
+    paintInfo.context->drawConvexPolygon(3, arrow2, true);
+
     Color leftSeparatorColor(0, 0, 0, 40);
     Color rightSeparatorColor(255, 255, 255, 40);
     int separatorSpace = 2;
-    int leftEdgeOfSeparator = int(leftEdge - arrowPaddingLeft); // FIXME: Round?
-    
+    int leftEdgeOfSeparator = static_cast<int>(leftEdge - arrowPaddingLeft); // FIXME: Round?
+
     // Draw the separator to the left of the arrows
-    i.p->setPen(Pen(leftSeparatorColor));
-    i.p->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()), IntPoint(leftEdgeOfSeparator, bounds.bottom()));
+    paintInfo.context->setPen(leftSeparatorColor);
+    paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()),
+                                IntPoint(leftEdgeOfSeparator, bounds.bottom()));
 
-    i.p->setPen(Pen(rightSeparatorColor));
-    i.p->drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.y()), IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.bottom()));
+    paintInfo.context->setPen(rightSeparatorColor);
+    paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.y()),
+                                IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.bottom()));
 
-    i.p->restore();
+    paintInfo.context->restore();
     return false;
 }
 
index 14fe441..8813cf1 100644 (file)
@@ -145,16 +145,16 @@ bool RenderView::absolutePosition(int &xPos, int &yPos, bool f)
     return true;
 }
 
-void RenderView::paint(PaintInfo& i, int _tx, int _ty)
+void RenderView::paint(PaintInfo& paintInfo, int tx, int ty)
 {
     // Cache the print rect because the dirty rect could get changed during painting.
     if (m_printingMode)
-        setPrintRect(i.r);
+        setPrintRect(paintInfo.rect);
     
-    paintObject(i, _tx, _ty);
+    paintObject(paintInfo, tx, ty);
 }
 
-void RenderView::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
+void RenderView::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
 {
     // Check to see if we are enclosed by a transparent layer.  If so, we cannot blit
     // when scrolling, and we need to use slow repaints.
@@ -164,7 +164,7 @@ void RenderView::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
         if (layer->isTransparent() || layer->transparentAncestor())
             frameView()->setUseSlowRepaints();
     }
-    
+
     if (elt || (firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view())
         return;
 
@@ -176,12 +176,12 @@ void RenderView::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
     else {
         Color baseColor = frameView()->baseBackgroundColor();
         if (baseColor.alpha() > 0) {
-            i.p->save();
-            i.p->setCompositeOperation(CompositeCopy);
-            i.p->fillRect(i.r, baseColor);
-            i.p->restore();
+            paintInfo.context->save();
+            paintInfo.context->setCompositeOperation(CompositeCopy);
+            paintInfo.context->fillRect(paintInfo.rect, baseColor);
+            paintInfo.context->restore();
         } else
-            i.p->clearRect(i.r);
+            paintInfo.context->clearRect(paintInfo.rect);
     }
 }
 
index 13c9e1d..f89f1f5 100644 (file)
@@ -54,8 +54,8 @@ public:
     
     virtual void repaintViewRectangle(const IntRect& r, bool immediate = false);
     
-    virtual void paint(PaintInfo& i, int tx, int ty);
-    virtual void paintBoxDecorations(PaintInfo& i, int _tx, int _ty);
+    virtual void paint(PaintInfo&, int tx, int ty);
+    virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
     
     void setSelection(RenderObject *s, int sp, RenderObject *e, int ep);
     void clearSelection();
index 8485671..5a755dc 100644 (file)
@@ -166,22 +166,22 @@ void RenderWidget::setStyle(RenderStyle *_style)
     }
 }
 
-void RenderWidget::paint(PaintInfo& i, int tx, int ty)
+void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (!shouldPaint(i, tx, ty))
+    if (!shouldPaint(paintInfo, tx, ty))
         return;
 
     tx += m_x;
     ty += m_y;
 
-    if (shouldPaintBackgroundOrBorder() && i.phase != PaintPhaseOutline && i.phase != PaintPhaseSelfOutline) 
-        paintBoxDecorations(i, tx, ty);
+    if (shouldPaintBackgroundOrBorder() && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline) 
+        paintBoxDecorations(paintInfo, tx, ty);
 
-    if (!m_view || i.phase != PaintPhaseForeground || style()->visibility() != VISIBLE)
+    if (!m_view || paintInfo.phase != PaintPhaseForeground || style()->visibility() != VISIBLE)
         return;
 
 #if PLATFORM(MAC)
-    if (style()->highlight() != nullAtom && !i.p->paintingDisabled())
+    if (style()->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
         paintCustomHighlight(tx - m_x, ty - m_y, style()->highlight(), true);
 #endif
 
@@ -193,12 +193,12 @@ void RenderWidget::paint(PaintInfo& i, int tx, int ty)
 
         // Tell the widget to paint now.  This is the only time the widget is allowed
         // to paint itself.  That way it will composite properly with z-indexed layers.
-        m_widget->paint(i.p, i.r);
+        m_widget->paint(paintInfo.context, paintInfo.rect);
     }
 
     // Paint a partially transparent wash over selected widgets.
     if (isSelected() && !document()->printing())
-        i.p->fillRect(selectionRect(), selectionBackgroundColor());
+        paintInfo.context->fillRect(selectionRect(), selectionBackgroundColor());
 }
 
 void RenderWidget::focusIn(Widget*)
index 40ed7b2..6953823 100644 (file)
  *
  */
 
-#ifndef RenderWidget_H
-#define RenderWidget_H
+#ifndef RenderWidget_h
+#define RenderWidget_h
 
 #include "RenderReplaced.h"
 #include "WidgetClient.h"
 
 namespace WebCore {
 
-class RenderWidget : public RenderReplaced, public WidgetClient
-{
+class RenderWidget : public RenderReplaced, public WidgetClient {
 public:
     RenderWidget(Node*);
     virtual ~RenderWidget();
 
+    virtual bool isWidget() const { return true; }
+
     virtual void setStyle(RenderStyle*);
 
     virtual void paint(PaintInfo&, int tx, int ty);
 
-    virtual bool isWidget() const { return true; };
-
     virtual void destroy();
     virtual void layout( );
 
@@ -48,7 +47,7 @@ public:
 
     RenderArena* ref() { ++m_refCount; return renderArena(); }
     void deref(RenderArena*);
-    
+
     virtual void setSelectionState(SelectionState);
 
     virtual void updateWidgetPosition();
@@ -72,10 +71,11 @@ private:
 protected:
     Widget* m_widget;
     FrameView* m_view;
+
 private:
     int m_refCount;
 };
 
-}
+} // namespace WebCore
 
-#endif
+#endif // RenderWidget_h
index 32b520d..bf466f2 100644 (file)
@@ -99,11 +99,11 @@ int RootInlineBox::placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth,
     return result;
 }
 
-void RootInlineBox::paintEllipsisBox(RenderObject::PaintInfo& i, int _tx, int _ty) const
+void RootInlineBox::paintEllipsisBox(RenderObject::PaintInfo& paintInfo, int tx, int ty) const
 {
-    if (m_ellipsisBox && object()->shouldPaintWithinRoot(i) && object()->style()->visibility() == VISIBLE &&
-        i.phase == PaintPhaseForeground)
-        m_ellipsisBox->paint(i, _tx, _ty);
+    if (m_ellipsisBox && object()->shouldPaintWithinRoot(paintInfo) && object()->style()->visibility() == VISIBLE &&
+            paintInfo.phase == PaintPhaseForeground)
+        m_ellipsisBox->paint(paintInfo, tx, ty);
 }
 
 #if PLATFORM(MAC)
@@ -118,27 +118,27 @@ void RootInlineBox::addHighlightOverflow()
     m_bottomOverflow = max(m_bottomOverflow, inflatedRect.bottom());
 }
 
-void RootInlineBox::paintCustomHighlight(RenderObject::PaintInfo& i, int tx, int ty, const AtomicString& highlightType)
+void RootInlineBox::paintCustomHighlight(RenderObject::PaintInfo& paintInfo, int tx, int ty, const AtomicString& highlightType)
 {
-    if (!object()->shouldPaintWithinRoot(i) || object()->style()->visibility() != VISIBLE || i.phase != PaintPhaseForeground)
+    if (!object()->shouldPaintWithinRoot(paintInfo) || object()->style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
         return;
 
     // Get the inflated rect so that we can properly hit test.
     FloatRect rootRect(tx + xPos(), ty + selectionTop(), width(), selectionHeight());
     FloatRect inflatedRect = Mac(object()->document()->frame())->customHighlightLineRect(highlightType, rootRect);
-    if (inflatedRect.intersects(i.r))
+    if (inflatedRect.intersects(paintInfo.rect))
         Mac(object()->document()->frame())->paintCustomHighlight(highlightType, rootRect, rootRect, false, true);
 }
 #endif
 
-void RootInlineBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
+void RootInlineBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    InlineFlowBox::paint(i, tx, ty);
-    paintEllipsisBox(i, tx, ty);
+    InlineFlowBox::paint(paintInfo, tx, ty);
+    paintEllipsisBox(paintInfo, tx, ty);
 #if PLATFORM(MAC)
     RenderStyle* styleToUse = object()->style(m_firstLine);
-    if (styleToUse->highlight() != nullAtom && !i.p->paintingDisabled())
-        paintCustomHighlight(i, tx, ty, styleToUse->highlight());
+    if (styleToUse->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
+        paintCustomHighlight(paintInfo, tx, ty, styleToUse->highlight());
 #endif
 }
 
@@ -176,7 +176,7 @@ void RootInlineBox::childRemoved(InlineBox* box)
 }
 
 GapRects RootInlineBox::fillLineSelectionGap(int selTop, int selHeight, RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, 
-                                             const RenderObject::PaintInfo* i)
+                                             const RenderObject::PaintInfo* paintInfo)
 {
     GapRects result;
     RenderObject::SelectionState lineState = selectionState();
@@ -189,11 +189,11 @@ GapRects RootInlineBox::fillLineSelectionGap(int selTop, int selHeight, RenderBl
     if (leftGap)
         result.uniteLeft(block()->fillLeftSelectionGap(firstBox->parent()->object(), 
                                                        firstBox->xPos(), selTop, selHeight, 
-                                                       rootBlock, blockX, blockY, tx, ty, i));
+                                                       rootBlock, blockX, blockY, tx, ty, paintInfo));
     if (rightGap)
         result.uniteRight(block()->fillRightSelectionGap(lastBox->parent()->object(), 
                                                          lastBox->xPos() + lastBox->width(), selTop, selHeight, 
-                                                         rootBlock, blockX, blockY, tx, ty, i));
+                                                         rootBlock, blockX, blockY, tx, ty, paintInfo));
 
     if (firstBox && firstBox != lastBox) {
         // Now fill in any gaps on the line that occurred between two selected elements.
@@ -202,14 +202,14 @@ GapRects RootInlineBox::fillLineSelectionGap(int selTop, int selHeight, RenderBl
             if (box->selectionState() != RenderObject::SelectionNone) {
                 result.uniteCenter(block()->fillHorizontalSelectionGap(box->parent()->object(),
                                                                        lastX + tx, selTop + ty,
-                                                                       box->xPos() - lastX, selHeight, i));
+                                                                       box->xPos() - lastX, selHeight, paintInfo));
                 lastX = box->xPos() + box->width();
             }
             if (box == lastBox)
                 break;
         }
     }
-      
+
     return result;
 }
 
index b5b9668..530a437 100644 (file)
@@ -88,8 +88,8 @@ public:
 
     EllipsisBox* ellipsisBox() const { return m_ellipsisBox; }
 
-    void paintEllipsisBox(RenderObject::PaintInfo&, int _tx, int _ty) const;
-    bool hitTestEllipsisBox(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction, bool);
+    void paintEllipsisBox(RenderObject::PaintInfo&, int tx, int ty) const;
+    bool hitTestEllipsisBox(HitTestResult&, int x, int y, int tx, int ty, HitTestAction, bool);
     
     virtual void clearTruncation();
 
@@ -98,7 +98,7 @@ public:
     void paintCustomHighlight(RenderObject::PaintInfo&, int tx, int ty, const AtomicString& highlightType);
 #endif
 
-    virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
+    virtual void paint(RenderObject::PaintInfo&, int tx, int ty);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int);
 
     bool hasSelectedChildren() const { return m_hasSelectedChildren; }
@@ -107,10 +107,10 @@ public:
     virtual RenderObject::SelectionState selectionState();
     InlineBox* firstSelectedBox();
     InlineBox* lastSelectedBox();
-    
+
     GapRects fillLineSelectionGap(int selTop, int selHeight, RenderBlock* rootBlock, int blockX, int blockY, 
                                   int tx, int ty, const RenderObject::PaintInfo*);
-    
+
     RenderBlock* block() const;
 
     int selectionTop();
index 87af885..2e959c9 100644 (file)
@@ -59,43 +59,42 @@ void SVGInlineFlowBox::verticallyAlignBoxes(int& heightOfBlock)
 
 void paintSVGInlineFlow(InlineFlowBox* flow, RenderObject* object, RenderObject::PaintInfo& paintInfo, int tx, int ty)
 {
-    if (paintInfo.p->paintingDisabled())
+    if (paintInfo.context->paintingDisabled())
         return;
     
     KRenderingDevice* device = renderingDevice();
     KRenderingDeviceContext* context = device->currentContext();
     bool shouldPopContext = false;
     if (context)
-        paintInfo.p->save();
+        paintInfo.context->save();
     else {
         // Need to set up KCanvas rendering if it hasn't already been done.
-        context = paintInfo.p->createRenderingDeviceContext();
+        context = paintInfo.context->createRenderingDeviceContext();
         device->pushContext(context);
         shouldPopContext = true;
     }
-    
 
     context->concatCTM(object->localTransform());
-    
-    FloatRect boundingBox(tx+flow->xPos() , ty+flow->yPos(), flow->width(), flow->height());
-    
+
+    FloatRect boundingBox(tx + flow->xPos(), ty + flow->yPos(), flow->width(), flow->height());
+
     const SVGRenderStyle* svgStyle = object->style()->svgStyle();
     if (SVGResourceClipper* clipper = getClipperById(object->document(), svgStyle->clipPath().substring(1)))
         clipper->applyClip(boundingBox);
-    
+
     if (SVGResourceMasker* masker = getMaskerById(object->document(), svgStyle->maskElement().substring(1)))
         masker->applyMask(boundingBox);
-    
+
     KCanvasFilter* filter = getFilterById(object->document(), svgStyle->filter().substring(1));
     if (filter)
         filter->prepareFilter(boundingBox);
-    
+
     RenderObject::PaintInfo pi = paintInfo;
     OwnPtr<GraphicsContext> c(device->currentContext()->createGraphicsContext());
-    pi.p = c.get();
+    pi.context = c.get();
     if (!flow->isRootInlineBox())
-        pi.r = (object->localTransform()).invert().mapRect(paintInfo.r);
-    
+        pi.rect = (object->localTransform()).invert().mapRect(paintInfo.rect);
+
     float opacity = object->style()->opacity();
     if (opacity < 1.0f) {
         c->clip(enclosingIntRect(boundingBox));
@@ -120,16 +119,16 @@ void paintSVGInlineFlow(InlineFlowBox* flow, RenderObject* object, RenderObject:
         }
         strokePaintServer->setPaintingText(false);
     }
-    
+
     if (filter) 
         filter->applyFilter(boundingBox);
-    
+
     if (opacity < 1.0f)
         c->endTransparencyLayer();
 
     // restore drawing state
     if (!shouldPopContext)
-        paintInfo.p->restore();
+        paintInfo.context->restore();
     else {
         device->popContext();
         delete context;