Changeset 152285 in webkit


Ignore:
Timestamp:
Jul 2, 2013 4:56:29 AM (11 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

Introduce toSVGInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=118289

Reviewed by Andreas Kling.

As a step to change static_cast with toXXX, static_cast<SVGInlineTextBox*> can
be changed with toSVGInlineTextBox().

Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153345

  • rendering/svg/RenderSVGInlineText.cpp:

(WebCore::RenderSVGInlineText::positionForPoint):

  • rendering/svg/SVGInlineFlowBox.cpp:

(WebCore::SVGInlineFlowBox::paintSelectionBackground):
(WebCore::SVGInlineFlowBox::paint):
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):

  • rendering/svg/SVGInlineTextBox.h:

(WebCore::toSVGInlineTextBox):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGInlineTextBoxes):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):

  • rendering/svg/SVGTextQuery.cpp:

(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152284 r152285  
     12013-07-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        Introduce toSVGInlineTextBox
     4        https://bugs.webkit.org/show_bug.cgi?id=118289
     5
     6        Reviewed by Andreas Kling.
     7
     8        As a step to change static_cast with toXXX, static_cast<SVGInlineTextBox*> can
     9        be changed with toSVGInlineTextBox().
     10
     11        Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153345
     12
     13        * rendering/svg/RenderSVGInlineText.cpp:
     14        (WebCore::RenderSVGInlineText::positionForPoint):
     15        * rendering/svg/SVGInlineFlowBox.cpp:
     16        (WebCore::SVGInlineFlowBox::paintSelectionBackground):
     17        (WebCore::SVGInlineFlowBox::paint):
     18        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
     19        * rendering/svg/SVGInlineTextBox.h:
     20        (WebCore::toSVGInlineTextBox):
     21        * rendering/svg/SVGRenderTreeAsText.cpp:
     22        (WebCore::writeSVGInlineTextBoxes):
     23        * rendering/svg/SVGRootInlineBox.cpp:
     24        (WebCore::SVGRootInlineBox::paint):
     25        (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
     26        (WebCore::SVGRootInlineBox::layoutChildBoxes):
     27        (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
     28        * rendering/svg/SVGTextQuery.cpp:
     29        (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
     30
    1312013-07-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    232
  • trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp

    r149392 r152285  
    186186            continue;
    187187
    188         SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(box);
     188        SVGInlineTextBox* textBox = toSVGInlineTextBox(box);
    189189        Vector<SVGTextFragment>& fragments = textBox->textFragments();
    190190
  • trunk/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp

    r110285 r152285  
    4444    for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
    4545        if (child->isSVGInlineTextBox())
    46             static_cast<SVGInlineTextBox*>(child)->paintSelectionBackground(childPaintInfo);
     46            toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo);
    4747        else if (child->isSVGInlineFlowBox())
    4848            static_cast<SVGInlineFlowBox*>(child)->paintSelectionBackground(childPaintInfo);
     
    6262        for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
    6363            if (child->isSVGInlineTextBox())
    64                 computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
     64                computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(toSVGInlineTextBox(child)->textRenderer()));
    6565
    6666            child->paint(paintInfo, LayoutPoint(), 0, 0);
     
    108108                continue;
    109109
    110             SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(box);
     110            SVGInlineTextBox* textBox = toSVGInlineTextBox(box);
    111111
    112112            int markerStartPosition = max<int>(marker->startOffset() - textBox->start(), 0);
  • trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h

    r150525 r152285  
    9090};
    9191
     92inline SVGInlineTextBox* toSVGInlineTextBox(InlineBox* box)
     93{
     94    ASSERT_WITH_SECURITY_IMPLICATION(!box || box->isSVGInlineTextBox());
     95    return static_cast<SVGInlineTextBox*>(box);
     96}
     97
    9298} // namespace WebCore
    9399
  • trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp

    r145596 r152285  
    460460            continue;
    461461
    462         writeSVGInlineTextBox(ts, static_cast<SVGInlineTextBox*>(box), indent);
     462        writeSVGInlineTextBox(ts, toSVGInlineTextBox(box), indent);
    463463    }
    464464}
  • trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp

    r141783 r152285  
    5252        for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
    5353            if (child->isSVGInlineTextBox())
    54                 static_cast<SVGInlineTextBox*>(child)->paintSelectionBackground(childPaintInfo);
     54                toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo);
    5555            else if (child->isSVGInlineFlowBox())
    5656                static_cast<SVGInlineFlowBox*>(child)->paintSelectionBackground(childPaintInfo);
     
    6262        for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
    6363            if (child->isSVGInlineTextBox())
    64                 SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
     64                SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(toSVGInlineTextBox(child)->textRenderer()));
    6565
    6666            child->paint(paintInfo, LayoutPoint(), 0, 0);
     
    102102            ASSERT(child->renderer()->isSVGInlineText());
    103103
    104             SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(child);
     104            SVGInlineTextBox* textBox = toSVGInlineTextBox(child);
    105105            characterLayout.layoutInlineTextBox(textBox);
    106106        } else {
     
    139139            ASSERT(child->renderer()->isSVGInlineText());
    140140
    141             SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(child);
     141            SVGInlineTextBox* textBox = toSVGInlineTextBox(child);
    142142            boxRect = textBox->calculateBoundaries();
    143143            textBox->setX(boxRect.x());
     
    279279        }
    280280
    281         SVGInlineTextBox* firstTextBox = static_cast<SVGInlineTextBox*>(*first);
    282         SVGInlineTextBox* lastTextBox = static_cast<SVGInlineTextBox*>(*last);
     281        SVGInlineTextBox* firstTextBox = toSVGInlineTextBox(*first);
     282        SVGInlineTextBox* lastTextBox = toSVGInlineTextBox(*last);
    283283
    284284        // Reordering is only necessary for BiDi text that is _absolutely_ positioned.
  • trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp

    r105143 r152285  
    102102
    103103        if (child->isSVGInlineTextBox())
    104             m_textBoxes.append(static_cast<SVGInlineTextBox*>(child));
     104            m_textBoxes.append(toSVGInlineTextBox(child));
    105105    }
    106106}
Note: See TracChangeset for help on using the changeset viewer.