- Revision
- 121330
- Author
- hara...@chromium.org
- Date
- 2012-06-27 01:54:43 -0700 (Wed, 27 Jun 2012)
Log Message
Rename rareSVGData() to svgRareData()
https://bugs.webkit.org/show_bug.cgi?id=90051
Reviewed by Nikolas Zimmermann.
Since rareSVGData() returns SVGRareData, it would make sense to
rename rareSVGData() to svgRareData(). Similarly, we can rename
ensureRareSVGData() to ensureSVGRareData(), and hasRareSVGData()
to hasSVGRareData().
c.f. bug 90050 is trying to introduce elementRareData() and
ensureElementRareData().
No tests. No change in behavior.
* WebCore.order:
* dom/Node.h:
(WebCore::Node::hasSVGRareData):
(WebCore::Node::setHasSVGRareData):
(WebCore::Node::clearHasSVGRareData):
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::willRecalcStyle):
(WebCore::SVGElement::svgRareData):
(WebCore::SVGElement::ensureSVGRareData):
(WebCore::SVGElement::mapInstanceToElement):
(WebCore::SVGElement::removeInstanceMapping):
(WebCore::SVGElement::instancesForElement):
(WebCore::SVGElement::setCursorElement):
(WebCore::SVGElement::cursorElementRemoved):
(WebCore::SVGElement::setCursorImageValue):
(WebCore::SVGElement::cursorImageValueRemoved):
(WebCore::SVGElement::correspondingElement):
(WebCore::SVGElement::setCorrespondingElement):
(WebCore::SVGElement::animatedSMILStyleProperties):
(WebCore::SVGElement::ensureAnimatedSMILStyleProperties):
(WebCore::SVGElement::setUseOverrideComputedStyle):
(WebCore::SVGElement::computedStyle):
* svg/SVGElement.h:
(SVGElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::instanceUpdatesBlocked):
(WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
(WebCore::SVGStyledElement::hasPendingResources):
(WebCore::SVGStyledElement::setHasPendingResources):
(WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121329 => 121330)
--- trunk/Source/WebCore/ChangeLog 2012-06-27 08:30:09 UTC (rev 121329)
+++ trunk/Source/WebCore/ChangeLog 2012-06-27 08:54:43 UTC (rev 121330)
@@ -1,5 +1,54 @@
2012-06-27 Kentaro Hara <hara...@chromium.org>
+ Rename rareSVGData() to svgRareData()
+ https://bugs.webkit.org/show_bug.cgi?id=90051
+
+ Reviewed by Nikolas Zimmermann.
+
+ Since rareSVGData() returns SVGRareData, it would make sense to
+ rename rareSVGData() to svgRareData(). Similarly, we can rename
+ ensureRareSVGData() to ensureSVGRareData(), and hasRareSVGData()
+ to hasSVGRareData().
+
+ c.f. bug 90050 is trying to introduce elementRareData() and
+ ensureElementRareData().
+
+ No tests. No change in behavior.
+
+ * WebCore.order:
+ * dom/Node.h:
+ (WebCore::Node::hasSVGRareData):
+ (WebCore::Node::setHasSVGRareData):
+ (WebCore::Node::clearHasSVGRareData):
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::~SVGElement):
+ (WebCore::SVGElement::willRecalcStyle):
+ (WebCore::SVGElement::svgRareData):
+ (WebCore::SVGElement::ensureSVGRareData):
+ (WebCore::SVGElement::mapInstanceToElement):
+ (WebCore::SVGElement::removeInstanceMapping):
+ (WebCore::SVGElement::instancesForElement):
+ (WebCore::SVGElement::setCursorElement):
+ (WebCore::SVGElement::cursorElementRemoved):
+ (WebCore::SVGElement::setCursorImageValue):
+ (WebCore::SVGElement::cursorImageValueRemoved):
+ (WebCore::SVGElement::correspondingElement):
+ (WebCore::SVGElement::setCorrespondingElement):
+ (WebCore::SVGElement::animatedSMILStyleProperties):
+ (WebCore::SVGElement::ensureAnimatedSMILStyleProperties):
+ (WebCore::SVGElement::setUseOverrideComputedStyle):
+ (WebCore::SVGElement::computedStyle):
+ * svg/SVGElement.h:
+ (SVGElement):
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::instanceUpdatesBlocked):
+ (WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
+ (WebCore::SVGStyledElement::hasPendingResources):
+ (WebCore::SVGStyledElement::setHasPendingResources):
+ (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible):
+
+2012-06-27 Kentaro Hara <hara...@chromium.org>
+
LabelableElement.cpp should include not ElementRareData.h but NodeRareData.h
https://bugs.webkit.org/show_bug.cgi?id=90047
Modified: trunk/Source/WebCore/WebCore.order (121329 => 121330)
--- trunk/Source/WebCore/WebCore.order 2012-06-27 08:30:09 UTC (rev 121329)
+++ trunk/Source/WebCore/WebCore.order 2012-06-27 08:54:43 UTC (rev 121330)
@@ -28887,7 +28887,7 @@
__ZN7WebCore14SVGRenderStyle20setMarkerEndResourceERKN3WTF6StringE
__ZN7WebCore26StyleInheritedResourceDataC1ERKS0_
__ZN7WebCore16SVGStyledElement22setHasPendingResourcesEb
-__ZN7WebCore10SVGElement17ensureRareSVGDataEv
+__ZN7WebCore10SVGElement17ensureSVGRareDataEv
__ZThn128_NK7WebCore23RenderSVGResourceMarker12resourceTypeEv
__ZThn128_N7WebCore23RenderSVGResourceMarker25removeAllClientsFromCacheEb
__ZNK7WebCore26StyleInheritedResourceDataeqERKS0_
@@ -28961,7 +28961,7 @@
__ZNK7WebCore19SVGPathSegClosePath11pathSegTypeEv
__ZN7WebCore13createWrapperINS_21JSSVGPathSegClosePathENS_19SVGPathSegClosePathEEEPNS_12JSDOMWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPT0_
__ZN7WebCore21JSSVGPathSegClosePathC1EPN3JSC9StructureEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrINS_19SVGPathSegClosePathEEE
-__ZNK7WebCore10SVGElement11rareSVGDataEv
+__ZNK7WebCore10SVGElement11svgRareDataEv
__ZNK7WebCore16SVGStyledElement19hasPendingResourcesEv
__ZN3WTF6VectorINS_12AtomicStringELm0EE15reserveCapacityEm
__ZN3WTF9HashTableINS_12AtomicStringESt4pairIS1_PNS_7HashSetIPN7WebCore16SVGStyledElementENS_7PtrHashIS6_EENS_10HashTraitsIS6_EEEEENS_18PairFirstExtractorISD_EENS_16AtomicStringHashENS_14PairHashTraitsINS9_IS1_EENS9_ISC_EEEESI_E3addIS1_SC_NS_17HashMapTranslatorISD_SK_SG_EEEES2_INS_17HashTableIteratorIS1_SD_SF_SG_SK_SI_EEbERKT_RKT0_
Modified: trunk/Source/WebCore/dom/Node.h (121329 => 121330)
--- trunk/Source/WebCore/dom/Node.h 2012-06-27 08:30:09 UTC (rev 121329)
+++ trunk/Source/WebCore/dom/Node.h 2012-06-27 08:54:43 UTC (rev 121330)
@@ -808,9 +808,9 @@
bool isSynchronizingSVGAttributes() const { return getFlag(IsSynchronizingSVGAttributesFlag); }
void setIsSynchronizingSVGAttributes() const { setFlag(IsSynchronizingSVGAttributesFlag); }
void clearIsSynchronizingSVGAttributes() const { clearFlag(IsSynchronizingSVGAttributesFlag); }
- bool hasRareSVGData() const { return getFlag(HasSVGRareDataFlag); }
- void setHasRareSVGData() { setFlag(HasSVGRareDataFlag); }
- void clearHasRareSVGData() { clearFlag(HasSVGRareDataFlag); }
+ bool hasSVGRareData() const { return getFlag(HasSVGRareDataFlag); }
+ void setHasSVGRareData() { setFlag(HasSVGRareDataFlag); }
+ void clearHasSVGRareData() { clearFlag(HasSVGRareDataFlag); }
#endif
#if ENABLE(MICRODATA)
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (121329 => 121330)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2012-06-27 08:30:09 UTC (rev 121329)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2012-06-27 08:54:43 UTC (rev 121330)
@@ -61,7 +61,7 @@
SVGElement::~SVGElement()
{
- if (!hasRareSVGData())
+ if (!hasSVGRareData())
ASSERT(!SVGElementRareData::rareDataMap().contains(this));
else {
SVGElementRareData::SVGElementRareDataMap& rareDataMap = SVGElementRareData::rareDataMap();
@@ -84,30 +84,30 @@
bool SVGElement::willRecalcStyle(StyleChange change)
{
- if (!hasRareSVGData() || styleChangeType() == SyntheticStyleChange)
+ if (!hasSVGRareData() || styleChangeType() == SyntheticStyleChange)
return true;
// If the style changes because of a regular property change (not induced by SMIL animations themselves)
// reset the "computed style without SMIL style properties", so the base value change gets reflected.
if (change > NoChange || needsStyleRecalc())
- rareSVGData()->setNeedsOverrideComputedStyleUpdate();
+ svgRareData()->setNeedsOverrideComputedStyleUpdate();
return true;
}
-SVGElementRareData* SVGElement::rareSVGData() const
+SVGElementRareData* SVGElement::svgRareData() const
{
- ASSERT(hasRareSVGData());
+ ASSERT(hasSVGRareData());
return SVGElementRareData::rareDataFromMap(this);
}
-SVGElementRareData* SVGElement::ensureRareSVGData()
+SVGElementRareData* SVGElement::ensureSVGRareData()
{
- if (hasRareSVGData())
- return rareSVGData();
+ if (hasSVGRareData())
+ return svgRareData();
ASSERT(!SVGElementRareData::rareDataMap().contains(this));
SVGElementRareData* data = "" SVGElementRareData;
SVGElementRareData::rareDataMap().set(this, data);
- setHasRareSVGData();
+ setHasSVGRareData();
return data;
}
@@ -220,7 +220,7 @@
{
ASSERT(instance);
- HashSet<SVGElementInstance*>& instances = ensureRareSVGData()->elementInstances();
+ HashSet<SVGElementInstance*>& instances = ensureSVGRareData()->elementInstances();
ASSERT(!instances.contains(instance));
instances.add(instance);
@@ -229,9 +229,9 @@
void SVGElement::removeInstanceMapping(SVGElementInstance* instance)
{
ASSERT(instance);
- ASSERT(hasRareSVGData());
+ ASSERT(hasSVGRareData());
- HashSet<SVGElementInstance*>& instances = rareSVGData()->elementInstances();
+ HashSet<SVGElementInstance*>& instances = svgRareData()->elementInstances();
ASSERT(instances.contains(instance));
instances.remove(instance);
@@ -239,11 +239,11 @@
const HashSet<SVGElementInstance*>& SVGElement::instancesForElement() const
{
- if (!hasRareSVGData()) {
+ if (!hasSVGRareData()) {
DEFINE_STATIC_LOCAL(HashSet<SVGElementInstance*>, emptyInstances, ());
return emptyInstances;
}
- return rareSVGData()->elementInstances();
+ return svgRareData()->elementInstances();
}
bool SVGElement::boundingBox(FloatRect& rect, SVGLocatable::StyleUpdateStrategy styleUpdateStrategy)
@@ -261,7 +261,7 @@
void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
{
- SVGElementRareData* rareData = ensureRareSVGData();
+ SVGElementRareData* rareData = ensureSVGRareData();
if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) {
if (cursorElement == oldCursorElement)
return;
@@ -272,13 +272,13 @@
void SVGElement::cursorElementRemoved()
{
- ASSERT(hasRareSVGData());
- rareSVGData()->setCursorElement(0);
+ ASSERT(hasSVGRareData());
+ svgRareData()->setCursorElement(0);
}
void SVGElement::setCursorImageValue(CSSCursorImageValue* cursorImageValue)
{
- SVGElementRareData* rareData = ensureRareSVGData();
+ SVGElementRareData* rareData = ensureSVGRareData();
if (CSSCursorImageValue* oldCursorImageValue = rareData->cursorImageValue()) {
if (cursorImageValue == oldCursorImageValue)
return;
@@ -289,19 +289,19 @@
void SVGElement::cursorImageValueRemoved()
{
- ASSERT(hasRareSVGData());
- rareSVGData()->setCursorImageValue(0);
+ ASSERT(hasSVGRareData());
+ svgRareData()->setCursorImageValue(0);
}
SVGElement* SVGElement::correspondingElement()
{
- ASSERT(!hasRareSVGData() || !rareSVGData()->correspondingElement() || shadowRoot());
- return hasRareSVGData() ? rareSVGData()->correspondingElement() : 0;
+ ASSERT(!hasSVGRareData() || !svgRareData()->correspondingElement() || shadowRoot());
+ return hasSVGRareData() ? svgRareData()->correspondingElement() : 0;
}
void SVGElement::setCorrespondingElement(SVGElement* correspondingElement)
{
- ensureRareSVGData()->setCorrespondingElement(correspondingElement);
+ ensureSVGRareData()->setCorrespondingElement(correspondingElement);
}
void SVGElement::parseAttribute(const Attribute& attribute)
@@ -591,25 +591,25 @@
StylePropertySet* SVGElement::animatedSMILStyleProperties() const
{
- if (hasRareSVGData())
- return rareSVGData()->animatedSMILStyleProperties();
+ if (hasSVGRareData())
+ return svgRareData()->animatedSMILStyleProperties();
return 0;
}
StylePropertySet* SVGElement::ensureAnimatedSMILStyleProperties()
{
- return ensureRareSVGData()->ensureAnimatedSMILStyleProperties();
+ return ensureSVGRareData()->ensureAnimatedSMILStyleProperties();
}
void SVGElement::setUseOverrideComputedStyle(bool value)
{
- if (hasRareSVGData())
- rareSVGData()->setUseOverrideComputedStyle(value);
+ if (hasSVGRareData())
+ svgRareData()->setUseOverrideComputedStyle(value);
}
RenderStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier)
{
- if (!hasRareSVGData() || !rareSVGData()->useOverrideComputedStyle())
+ if (!hasSVGRareData() || !svgRareData()->useOverrideComputedStyle())
return Element::computedStyle(pseudoElementSpecifier);
RenderStyle* parentStyle = 0;
@@ -618,7 +618,7 @@
parentStyle = renderer->style();
}
- return rareSVGData()->overrideComputedStyle(this, parentStyle);
+ return svgRareData()->overrideComputedStyle(this, parentStyle);
}
#ifndef NDEBUG
Modified: trunk/Source/WebCore/svg/SVGElement.h (121329 => 121330)
--- trunk/Source/WebCore/svg/SVGElement.h 2012-06-27 08:30:09 UTC (rev 121329)
+++ trunk/Source/WebCore/svg/SVGElement.h 2012-06-27 08:54:43 UTC (rev 121330)
@@ -127,8 +127,8 @@
virtual void removedFrom(ContainerNode*) OVERRIDE;
- SVGElementRareData* rareSVGData() const;
- SVGElementRareData* ensureRareSVGData();
+ SVGElementRareData* svgRareData() const;
+ SVGElementRareData* ensureSVGRareData();
void reportAttributeParsingError(SVGParsingError, const Attribute&);
Modified: trunk/Source/WebCore/svg/SVGStyledElement.cpp (121329 => 121330)
--- trunk/Source/WebCore/svg/SVGStyledElement.cpp 2012-06-27 08:30:09 UTC (rev 121329)
+++ trunk/Source/WebCore/svg/SVGStyledElement.cpp 2012-06-27 08:54:43 UTC (rev 121330)
@@ -423,29 +423,29 @@
bool SVGStyledElement::instanceUpdatesBlocked() const
{
- return hasRareSVGData() && rareSVGData()->instanceUpdatesBlocked();
+ return hasSVGRareData() && svgRareData()->instanceUpdatesBlocked();
}
void SVGStyledElement::setInstanceUpdatesBlocked(bool value)
{
- if (hasRareSVGData())
- rareSVGData()->setInstanceUpdatesBlocked(value);
+ if (hasSVGRareData())
+ svgRareData()->setInstanceUpdatesBlocked(value);
}
bool SVGStyledElement::hasPendingResources() const
{
- return hasRareSVGData() && rareSVGData()->hasPendingResources();
+ return hasSVGRareData() && svgRareData()->hasPendingResources();
}
void SVGStyledElement::setHasPendingResources()
{
- ensureRareSVGData()->setHasPendingResources(true);
+ ensureSVGRareData()->setHasPendingResources(true);
}
void SVGStyledElement::clearHasPendingResourcesIfPossible()
{
if (!document()->accessSVGExtensions()->isElementPendingResources(this))
- ensureRareSVGData()->setHasPendingResources(false);
+ ensureSVGRareData()->setHasPendingResources(false);
}
AffineTransform SVGStyledElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope) const