Changeset 152491 in webkit


Ignore:
Timestamp:
Jul 9, 2013 4:31:14 AM (11 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

Use toSVGFontElement() instead of static_cast<SVGFontElement*>
https://bugs.webkit.org/show_bug.cgi?id=118496

Reviewed by Andreas Kling.

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

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

  • svg/SVGFontElement.h:

(WebCore::toSVGFontElement):

  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::rebuildFontFace):

  • svg/SVGGlyphElement.cpp:

(WebCore::SVGGlyphElement::invalidateGlyphCache):

  • svg/SVGHKernElement.cpp:

(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):

  • svg/SVGVKernElement.cpp:

(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152490 r152491  
     12013-07-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        Use toSVGFontElement() instead of static_cast<SVGFontElement*>
     4        https://bugs.webkit.org/show_bug.cgi?id=118496
     5
     6        Reviewed by Andreas Kling.
     7
     8        As a step to change static_cast with toXXX, static_cast<SVGFontElement*> can
     9        be changed with toSVGFontElement().
     10
     11        Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153761
     12
     13        * svg/SVGFontElement.h:
     14        (WebCore::toSVGFontElement):
     15        * svg/SVGFontFaceElement.cpp:
     16        (WebCore::SVGFontFaceElement::rebuildFontFace):
     17        * svg/SVGGlyphElement.cpp:
     18        (WebCore::SVGGlyphElement::invalidateGlyphCache):
     19        * svg/SVGHKernElement.cpp:
     20        (WebCore::SVGHKernElement::insertedInto):
     21        (WebCore::SVGHKernElement::removedFrom):
     22        * svg/SVGVKernElement.cpp:
     23        (WebCore::SVGVKernElement::insertedInto):
     24        (WebCore::SVGVKernElement::removedFrom):
     25
    1262013-07-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    227
  • trunk/Source/WebCore/svg/SVGFontElement.h

    r149960 r152491  
    2828#include "SVGGlyphElement.h"
    2929#include "SVGGlyphMap.h"
     30#include "SVGNames.h"
    3031#include "SVGParserUtilities.h"
    3132#include "SVGStyledElement.h"
     
    9091};
    9192
     93inline SVGFontElement* toSVGFontElement(Node* node)
     94{
     95    ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::fontTag));
     96    return static_cast<SVGFontElement*>(node);
     97}
     98
    9299} // namespace WebCore
    93100
  • trunk/Source/WebCore/svg/SVGFontFaceElement.cpp

    r148397 r152491  
    289289
    290290    if (describesParentFont) {
    291         m_fontElement = static_cast<SVGFontElement*>(parentNode());
     291        m_fontElement = toSVGFontElement(parentNode());
    292292
    293293        list = CSSValueList::createCommaSeparated();
  • trunk/Source/WebCore/svg/SVGGlyphElement.cpp

    r135069 r152491  
    4848{
    4949    ContainerNode* fontNode = parentNode();
    50     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
    51         if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
    52             element->invalidateGlyphCache();
    53     }
     50    if (fontNode && fontNode->hasTagName(SVGNames::fontTag))
     51        toSVGFontElement(fontNode)->invalidateGlyphCache();
    5452}
    5553
  • trunk/Source/WebCore/svg/SVGHKernElement.cpp

    r118192 r152491  
    4545{
    4646    ContainerNode* fontNode = parentNode();
    47     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
    48         if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
    49             element->invalidateGlyphCache();
    50     }
     47    if (fontNode && fontNode->hasTagName(SVGNames::fontTag))
     48        toSVGFontElement(fontNode)->invalidateGlyphCache();
    5149
    5250    return SVGElement::insertedInto(rootParent);
     
    5654{
    5755    ContainerNode* fontNode = parentNode();
    58     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
    59         if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
    60             element->invalidateGlyphCache();
    61     }
     56    if (fontNode && fontNode->hasTagName(SVGNames::fontTag))
     57        toSVGFontElement(fontNode)->invalidateGlyphCache();
    6258
    6359    SVGElement::removedFrom(rootParent);
  • trunk/Source/WebCore/svg/SVGVKernElement.cpp

    r118192 r152491  
    4444    if (rootParent->inDocument()) {
    4545        ContainerNode* fontNode = parentNode();
    46         if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
    47             if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
    48                 element->invalidateGlyphCache();
    49         }
     46        if (fontNode && fontNode->hasTagName(SVGNames::fontTag))
     47            toSVGFontElement(fontNode)->invalidateGlyphCache();
    5048    }
    5149
     
    5654{
    5755    ContainerNode* fontNode = parentNode();
    58     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
    59         if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
    60             element->invalidateGlyphCache();
    61     }
     56    if (fontNode && fontNode->hasTagName(SVGNames::fontTag))
     57        toSVGFontElement(fontNode)->invalidateGlyphCache();
     58
    6259    SVGElement::removedFrom(rootParent);
    6360}
Note: See TracChangeset for help on using the changeset viewer.