<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>56195</bug_id>
          
          <creation_ts>2011-03-11 08:12:49 -0800</creation_ts>
          <short_desc>line 259 in svg/SVGElement.cpp fails to compile on Solaris10/SS12</short_desc>
          <delta_ts>2011-03-19 06:09:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Ben Taylor">bentaylor.solx86</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>366011</commentid>
    <comment_count>0</comment_count>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-03-11 08:12:49 -0800</bug_when>
    <thetext>qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp

Compiling qt-4.7.1 on Solaris 10 with a relatively patched Sun Studio 12 compiler

247 void SVGElement::sendSVGLoadEventIfPossible(bool sendParentLoadEvents)
248 {
249    RefPtr&lt;SVGElement&gt; currentTarget = this;
250    while (currentTarget &amp;&amp; currentTarget-&gt;haveLoadedRequiredResources()) {
251        RefPtr&lt;Node&gt; parent;
252        if (sendParentLoadEvents)
253            parent = currentTarget-&gt;parentNode(); // save the next parent to dispatch too incase dispatching the event changes the tree
254        if (hasLoadListener(currentTarget.get())) {
255            RefPtr&lt;Event&gt; event = Event::create(eventNames().loadEvent, false, false);
256            event-&gt;setTarget(currentTarget);
257            currentTarget-&gt;dispatchGenericEvent(event.release());
258        }
259        currentTarget = (parent &amp;&amp; parent-&gt;isSVGElement()) ? static_pointer_cast&lt;SVGElement&gt;(parent) : 0;
260     }
261 }

The error emitted by the compiler is:

&quot;svg/SVGElement.cpp&quot;, line 259: Error: Ambiguous &quot;?:&quot; expression, second operand of type &quot;WTF::RefPtr&lt;WebCore::SVGElement&gt;&quot; and third operand of type &quot;int&quot; can be converted to one another.

This patch makes the compilation succeed.

--- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp.ORIG      2011-03-09 15:06:34.146973419 +0000
+++ qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp   2011-03-09 14:40:15.952738383 +0000
@@ -256,7 +256,7 @@
             event-&gt;setTarget(currentTarget);
             currentTarget-&gt;dispatchGenericEvent(event.release());
         }
-        currentTarget = (parent &amp;&amp; parent-&gt;isSVGElement()) ? static_pointer_cast&lt;SVGElement&gt;(parent) : 0;
+        currentTarget = (parent &amp;&amp; parent-&gt;isSVGElement()) ? static_pointer_cast&lt;SVGElement&gt;(parent) : RefPtr&lt;SVGElement&gt;();
     }
 }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366555</commentid>
    <comment_count>1</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-03-12 02:07:30 -0800</bug_when>
    <thetext>Can you submit a full patch please? http://www.webkit.org/coding/contributing.html
Flag it as r?, cq?, and I&apos;ll make sure it gets landed, thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366578</commentid>
    <comment_count>2</comment_count>
      <attachid>85592</attachid>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-03-12 07:12:52 -0800</bug_when>
    <thetext>Created attachment 85592
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

This fix is against webkit head, but works for the webkit distributed with qt-4.7.1.  This fix is similar to one in bug 56198 which passed muster.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>370111</commentid>
    <comment_count>3</comment_count>
      <attachid>85592</attachid>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-03-19 04:42:44 -0700</bug_when>
    <thetext>Comment on attachment 85592
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

r=me, sorry for the delay, I&apos;ve been ill.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>370125</commentid>
    <comment_count>4</comment_count>
      <attachid>85592</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-19 06:09:14 -0700</bug_when>
    <thetext>Comment on attachment 85592
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

Clearing flags on attachment: 85592

Committed r81549: &lt;http://trac.webkit.org/changeset/81549&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>370126</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-19 06:09:17 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>85592</attachid>
            <date>2011-03-12 07:12:52 -0800</date>
            <delta_ts>2011-03-19 06:09:14 -0700</delta_ts>
            <desc>Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler</desc>
            <filename>webkit-bug-56195-svg-SVGElement.cpp.diff</filename>
            <type>text/plain</type>
            <size>1442</size>
            <attacher name="Ben Taylor">bentaylor.solx86</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDgwOTM1KQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTEtMDMtMTIgIEJlbiBUYXls
b3IgIDxiZW50YXlsb3Iuc29seDg2QGdtYWlsLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9NTYxOTUKKyAgICAgICAgRml4IGNvbmRpdGlvbmFsIHdoaWNoIGhhZCBhbiBpbnQg
Zm9yIG9uZSBjYXNlIGFuZCBhIHBvaW50ZXIgZm9yIGFub3RoZXIuCisgICAgICAgIFNpbWlsYXIg
Zml4IGFzIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD01NjE5OAorCisg
ICAgICAgIE5vIG5ldyB0ZXN0cy4gRml4IGNvbXBpbGF0aW9uIG9uIFNvbGFyaXMgMTAgd2l0aCBT
dW4gU3R1ZGlvIEMrKworCisgICAgICAgICogc3ZnL1NWR0VsZW1lbnQuY3BwOgorICAgICAgICAo
V2ViQ29yZTo6U1ZHRWxlbWVudDo6c2VuZFNWR0xvYWRFdmVudElmUG9zc2libGUpOgorCiAyMDEx
LTAzLTEyICBQYXZlbCBGZWxkbWFuICA8cGZlbGRtYW5AY2hyb21pdW0ub3JnPgogCiAgICAgICAg
IE5vdCByZXZpZXdlZDogSW5zcGVjdCBFbGVtZW50IGFjdGlvbiByZWdyZXNzaW9uIGZpeC4KSW5k
ZXg6IFNvdXJjZS9XZWJDb3JlL3N2Zy9TVkdFbGVtZW50LmNwcAo9PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3Vy
Y2UvV2ViQ29yZS9zdmcvU1ZHRWxlbWVudC5jcHAJKHJldmlzaW9uIDgwOTM1KQorKysgU291cmNl
L1dlYkNvcmUvc3ZnL1NWR0VsZW1lbnQuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC0zMjEsNyArMzIx
LDcgQEAgdm9pZCBTVkdFbGVtZW50OjpzZW5kU1ZHTG9hZEV2ZW50SWZQb3NzaQogICAgICAgICAg
ICAgZXZlbnQtPnNldFRhcmdldChjdXJyZW50VGFyZ2V0KTsKICAgICAgICAgICAgIGN1cnJlbnRU
YXJnZXQtPmRpc3BhdGNoR2VuZXJpY0V2ZW50KGV2ZW50LnJlbGVhc2UoKSk7CiAgICAgICAgIH0K
LSAgICAgICAgY3VycmVudFRhcmdldCA9IChwYXJlbnQgJiYgcGFyZW50LT5pc1NWR0VsZW1lbnQo
KSkgPyBzdGF0aWNfcG9pbnRlcl9jYXN0PFNWR0VsZW1lbnQ+KHBhcmVudCkgOiAwOworICAgICAg
ICBjdXJyZW50VGFyZ2V0ID0gKHBhcmVudCAmJiBwYXJlbnQtPmlzU1ZHRWxlbWVudCgpKSA/IHN0
YXRpY19wb2ludGVyX2Nhc3Q8U1ZHRWxlbWVudD4ocGFyZW50KSA6IFJlZlB0cjxTVkdFbGVtZW50
PigpOwogICAgIH0KIH0KIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>