Revert styleForElement, pseudoStyleForElement, styleForRenderer back to
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 May 2006 21:44:50 +0000 (21:44 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 May 2006 21:44:50 +0000 (21:44 +0000)
        their old names, since the term "create" is not accurate.

        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::styleForElement):
        (WebCore::CSSStyleSelector::pseudoStyleForElement):
        * css/cssstyleselector.h:
        * dom/Element.cpp:
        (WebCore::Element::styleForRenderer):
        (WebCore::Element::recalcStyle):
        * dom/Element.h:
        * dom/Node.cpp:
        (WebCore::Node::createRendererIfNeeded):
        (WebCore::Node::styleForRenderer):
        * dom/Node.h:
        * ksvg2/svg/SVGClipPathElement.cpp:
        (SVGClipPathElement::canvasResource):
        * ksvg2/svg/SVGFEFloodElement.cpp:
        (SVGFEFloodElement::filterEffect):
        * ksvg2/svg/SVGGradientElement.cpp:
        (SVGGradientElement::rebuildStops):

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

WebCore/ChangeLog
WebCore/css/cssstyleselector.cpp
WebCore/css/cssstyleselector.h
WebCore/dom/Element.cpp
WebCore/dom/Element.h
WebCore/dom/Node.cpp
WebCore/dom/Node.h
WebCore/ksvg2/svg/SVGClipPathElement.cpp
WebCore/ksvg2/svg/SVGFEFloodElement.cpp
WebCore/ksvg2/svg/SVGGradientElement.cpp

index 560d718c9d1f65f30f3bb822add5dbf8872af2e4..d84165cadc070f2fa51dbac8da58996252ad0a0e 100644 (file)
@@ -1,3 +1,27 @@
+2006-05-09  David Hyatt  <hyatt@apple.com>
+
+        Revert styleForElement, pseudoStyleForElement, styleForRenderer back to
+        their old names, since the term "create" is not accurate.
+
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::styleForElement):
+        (WebCore::CSSStyleSelector::pseudoStyleForElement):
+        * css/cssstyleselector.h:
+        * dom/Element.cpp:
+        (WebCore::Element::styleForRenderer):
+        (WebCore::Element::recalcStyle):
+        * dom/Element.h:
+        * dom/Node.cpp:
+        (WebCore::Node::createRendererIfNeeded):
+        (WebCore::Node::styleForRenderer):
+        * dom/Node.h:
+        * ksvg2/svg/SVGClipPathElement.cpp:
+        (SVGClipPathElement::canvasResource):
+        * ksvg2/svg/SVGFEFloodElement.cpp:
+        (SVGFEFloodElement::filterEffect):
+        * ksvg2/svg/SVGGradientElement.cpp:
+        (SVGGradientElement::rebuildStops):
+
 2006-05-09  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Darin.
index 96d96bf81bdfbd54b460fb9e2105564a32fb3d8b..1405afc398fda84d12b20c25520c0d303adc5964 100644 (file)
@@ -684,7 +684,7 @@ RenderStyle* CSSStyleSelector::locateSharedStyle()
 }
 
 
-RenderStyle* CSSStyleSelector::createStyleForElement(Element* e, RenderStyle* defaultParent, bool allowSharing)
+RenderStyle* CSSStyleSelector::styleForElement(Element* e, RenderStyle* defaultParent, bool allowSharing)
 {
     if (!e->document()->haveStylesheetsLoaded()) {
         if (!styleNotYetAvailable) {
@@ -830,7 +830,7 @@ RenderStyle* CSSStyleSelector::createStyleForElement(Element* e, RenderStyle* de
     return style;
 }
 
-RenderStyle* CSSStyleSelector::createPseudoStyleForElement(RenderStyle::PseudoId pseudo, Element* e, RenderStyle* parentStyle)
+RenderStyle* CSSStyleSelector::pseudoStyleForElement(RenderStyle::PseudoId pseudo, Element* e, RenderStyle* parentStyle)
 {
     if (!e)
         return 0;
index 6aaf105e2f06539988be31ba7757e62d0716591d..2cc37e30148247a753ce065d96c64f06972fa1c2 100644 (file)
@@ -88,8 +88,8 @@ class StyledElement;
 
         void initElementAndPseudoState(Element* e);
         void initForStyleResolve(Element* e, RenderStyle* parentStyle);
-        RenderStyle *createStyleForElement(Element*, RenderStyle* parentStyle=0, bool allowSharing=true);
-        RenderStyle* createPseudoStyleForElement(RenderStyle::PseudoId, Element*, RenderStyle* parentStyle=0);
+        RenderStyle *styleForElement(Element*, RenderStyle* parentStyle=0, bool allowSharing=true);
+        RenderStyle* pseudoStyleForElement(RenderStyle::PseudoId, Element*, RenderStyle* parentStyle=0);
 
         RenderStyle* locateSharedStyle();
         Node* locateCousinList(Element* parent);
index ffaa07985edf889f495cb4c86f6247a92ae77b62..ca9da0fbc1a2688ef36b0802b74fd1638cf465b3 100644 (file)
@@ -439,9 +439,9 @@ bool Element::isURLAttribute(Attribute *attr) const
     return false;
 }
 
-RenderStyle *Element::createStyleForRenderer(RenderObject *parentRenderer)
+RenderStyle *Element::styleForRenderer(RenderObject *parentRenderer)
 {
-    return document()->styleSelector()->createStyleForElement(this);
+    return document()->styleSelector()->styleForElement(this);
 }
 
 RenderObject *Element::createRenderer(RenderArena *arena, RenderStyle *style)
@@ -501,7 +501,7 @@ void Element::recalcStyle( StyleChange change )
     bool hasParentRenderer = parent() ? parent()->renderer() : false;
     
     if ( hasParentRenderer && (change >= Inherit || changed()) ) {
-        RenderStyle *newStyle = document()->styleSelector()->createStyleForElement(this);
+        RenderStyle *newStyle = document()->styleSelector()->styleForElement(this);
         StyleChange ch = diff( _style, newStyle );
         if (ch == Detach) {
             if (attached())
index 9674af6669a48907c5698ade290ea15eb6ef5e23..b032cdfa0c9635d720c8885760b091b01e4c12ed 100644 (file)
@@ -132,7 +132,7 @@ public:
     virtual void copyNonAttributeProperties(const Element *source) {}
 
     virtual void attach();
-    virtual RenderStyle *createStyleForRenderer(RenderObject *parent);
+    virtual RenderStyle *styleForRenderer(RenderObject *parent);
     virtual RenderObject *createRenderer(RenderArena *, RenderStyle *);
     virtual void recalcStyle( StyleChange = NoChange );
 
index cfe404ad5b801e34dee4391125894f2399e0651e..a740057d49d48e2d65a193b47fa55d8f27c4e812 100644 (file)
@@ -873,14 +873,14 @@ void Node::createRendererIfNeeded()
         && parent->childShouldCreateRenderer(this)
 #endif
         ) {
-        RenderStyle* style = createStyleForRenderer(parentRenderer);
+        RenderStyle* style = styleForRenderer(parentRenderer);
 #ifndef KHTML_NO_XBL
         bool resolveStyle = false;
         if (document()->bindingManager()->loadBindings(this, style->bindingURIs(), true, &resolveStyle) && 
             rendererIsNeeded(style)) {
             if (resolveStyle) {
                 style->deref(document()->renderArena());
-                style = createStyleForRenderer(parentRenderer);
+                style = styleForRenderer(parentRenderer);
             }
 #else
         if (rendererIsNeeded(style)) {
@@ -899,7 +899,7 @@ void Node::createRendererIfNeeded()
     }
 }
 
-RenderStyle *Node::createStyleForRenderer(RenderObject *parent)
+RenderStyle *Node::styleForRenderer(RenderObject *parent)
 {
     RenderStyle *style = parent->style();
     style->ref();
index d02352301521b5aeedd5d13f6f5311eacc2d2d6f..1f68f7f2bffcf9046fa7416b4d7682a1bbaff31e 100644 (file)
@@ -357,7 +357,7 @@ public:
 
     virtual void willRemove();
     void createRendererIfNeeded();
-    virtual RenderStyle* createStyleForRenderer(RenderObject* parent);
+    virtual RenderStyle* styleForRenderer(RenderObject* parent);
     virtual bool rendererIsNeeded(RenderStyle*);
 #if SVG_SUPPORT
     virtual bool childShouldCreateRenderer(Node*) const { return true; }
index cd2d7dd6a967e2a723178413e2ee515e94360bee..094d47063485fe04af6889d7d3dc2f2c3d54de50 100644 (file)
@@ -90,12 +90,12 @@ KCanvasClipper *SVGClipPathElement::canvasResource()
 
     bool bbox = clipPathUnits()->baseVal() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
 
-    RenderStyle *clipPathStyle = createStyleForRenderer(parent()->renderer()); // FIXME: Manual style resolution is a hack
+    RenderStyle *clipPathStyle = styleForRenderer(parent()->renderer()); // FIXME: Manual style resolution is a hack
     for (Node *n = firstChild(); n != 0; n = n->nextSibling()) {
         SVGElement *e = svg_dynamic_cast(n);
         if (e && e->isStyled()) {
             SVGStyledElement *styled = static_cast<SVGStyledElement *>(e);
-            RenderStyle *pathStyle = document()->styleSelector()->createStyleForElement(styled, clipPathStyle);
+            RenderStyle *pathStyle = document()->styleSelector()->styleForElement(styled, clipPathStyle);
             if (KCanvasPath* pathData = styled->toPathData())
                 m_clipper->addClipData(pathData, (KCWindRule) pathStyle->svgStyle()->clipRule(), bbox);
             pathStyle->deref(canvas()->renderArena());
index 983c9707b233ff4c7c23ae9dd02c1d6bc56539fc..da540587e0f70e3ed1b6c6063eccd1612d9f7979 100644 (file)
@@ -71,7 +71,7 @@ KCanvasFEFlood *SVGFEFloodElement::filterEffect() const
         return 0;
     m_filterEffect->setIn(String(in1()->baseVal()).deprecatedString());
     setStandardAttributes(m_filterEffect);
-    RenderStyle *filterStyle = const_cast<SVGFEFloodElement *>(this)->createStyleForRenderer(parentNode()->renderer());
+    RenderStyle *filterStyle = const_cast<SVGFEFloodElement *>(this)->styleForRenderer(parentNode()->renderer());
     const SVGRenderStyle *svgStyle = filterStyle->svgStyle();
     m_filterEffect->setFloodColor(svgStyle->floodColor());
     m_filterEffect->setFloodOpacity(svgStyle->floodOpacity());
index 0533744c490cc1af268b6c2c8358eb2775f14a93..657ba42e3fee6684a9019948e9eeb5aeef1f5bad 100644 (file)
@@ -144,14 +144,14 @@ void SVGGradientElement::rebuildStops() const
     if (m_resource && !ownerDocument()->parsing()) {
         Vector<KCGradientStop> stops;
          // FIXME: Manual style resolution is a hack
-        RenderStyle* gradientStyle = const_cast<SVGGradientElement*>(this)->createStyleForRenderer(parent()->renderer());
+        RenderStyle* gradientStyle = const_cast<SVGGradientElement*>(this)->styleForRenderer(parent()->renderer());
         for (Node *n = firstChild(); n; n = n->nextSibling()) {
             SVGElement *element = svg_dynamic_cast(n);
             if (element && element->isGradientStop()) {
                 SVGStopElement *stop = static_cast<SVGStopElement *>(element);
                 float stopOffset = stop->offset()->baseVal();
                 
-                RenderStyle *stopStyle = document()->styleSelector()->createStyleForElement(stop, gradientStyle);
+                RenderStyle *stopStyle = document()->styleSelector()->styleForElement(stop, gradientStyle);
                 Color c = stopStyle->svgStyle()->stopColor();
                 float opacity = stopStyle->svgStyle()->stopOpacity();