RESOLVED FIXED 56195
line 259 in svg/SVGElement.cpp fails to compile on Solaris10/SS12
https://bugs.webkit.org/show_bug.cgi?id=56195
Summary line 259 in svg/SVGElement.cpp fails to compile on Solaris10/SS12
Ben Taylor
Reported 2011-03-11 08:12:49 PST
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<SVGElement> currentTarget = this; 250 while (currentTarget && currentTarget->haveLoadedRequiredResources()) { 251 RefPtr<Node> parent; 252 if (sendParentLoadEvents) 253 parent = currentTarget->parentNode(); // save the next parent to dispatch too incase dispatching the event changes the tree 254 if (hasLoadListener(currentTarget.get())) { 255 RefPtr<Event> event = Event::create(eventNames().loadEvent, false, false); 256 event->setTarget(currentTarget); 257 currentTarget->dispatchGenericEvent(event.release()); 258 } 259 currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : 0; 260 } 261 } The error emitted by the compiler is: "svg/SVGElement.cpp", line 259: Error: Ambiguous "?:" expression, second operand of type "WTF::RefPtr<WebCore::SVGElement>" and third operand of type "int" 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->setTarget(currentTarget); currentTarget->dispatchGenericEvent(event.release()); } - currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : 0; + currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : RefPtr<SVGElement>(); } }
Attachments
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler (1.41 KB, patch)
2011-03-12 07:12 PST, Ben Taylor
no flags
Nikolas Zimmermann
Comment 1 2011-03-12 02:07:30 PST
Can you submit a full patch please? http://www.webkit.org/coding/contributing.html Flag it as r?, cq?, and I'll make sure it gets landed, thanks!
Ben Taylor
Comment 2 2011-03-12 07:12:52 PST
Created attachment 85592 [details] 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.
Nikolas Zimmermann
Comment 3 2011-03-19 04:42:44 PDT
Comment on attachment 85592 [details] 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've been ill.
WebKit Commit Bot
Comment 4 2011-03-19 06:09:14 PDT
Comment on attachment 85592 [details] 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: <http://trac.webkit.org/changeset/81549>
WebKit Commit Bot
Comment 5 2011-03-19 06:09:17 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.