Bug 32821 - types must match on ?: in css/CSSComputedStyleDeclaration.cpp
Summary: types must match on ?: in css/CSSComputedStyleDeclaration.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-21 04:41 PST by Ben Taylor
Modified: 2011-03-24 10:07 PDT (History)
4 users (show)

See Also:


Attachments
Patch to fix the problem with the conflicting types. (1.52 KB, patch)
2009-12-21 04:41 PST, Ben Taylor
no flags Details | Formatted Diff | Diff
Updated version of the patch to more correctly represent a "0" (as previously used in the conditional) to a type acceptable by the SS12 compiler (1.49 KB, patch)
2011-03-11 07:36 PST, Ben Taylor
no flags Details | Formatted Diff | Diff
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler (2.34 KB, patch)
2011-03-12 07:29 PST, Ben Taylor
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Taylor 2009-12-21 04:41:02 PST
Created attachment 45325 [details]
Patch to fix the problem with the conflicting types.

compiling qt-4.6.0 with webkit on Solaris 10 with Studio 12, I see the following error:

"css/CSSComputedStyleDeclaration.cpp", line 570: Error: Ambiguous "?:"expression, second operand of type "int" and third operand of type
"WTF::PassRefPtr<WebCore::CSSPrimitiveValue>" can be converted to one another.
"css/CSSComputedStyleDeclaration.cpp", line 571: Error: Ambiguous "?:"expression, second operand of type "int" and third operand of type
"WTF::PassRefPtr<WebCore::CSSPrimitiveValue>" can be converted to one another.

I've submitted a patch which has passed compilation.
Comment 1 Alexey Proskuryakov 2009-12-22 13:54:54 PST
Would you be willing to submit a patch for review, as described in <http://webkit.org/coding/contributing.html>?
Comment 2 Ben Taylor 2009-12-22 15:15:53 PST
(In reply to comment #1)
> Would you be willing to submit a patch for review, as described in
> <http://webkit.org/coding/contributing.html>?

Someone who actually knows something about the application might
be better to check the very small patch I submitted.  I'm just
trying to get QT compiled.  I don't know when I'll have the port
complete.
Comment 3 Ben Taylor 2011-03-11 07:36:14 PST
Created attachment 85472 [details]
Updated version of the patch to more correctly represent a "0" (as previously used in the conditional) to a type acceptable by the SS12 compiler

This is an updated patch that fixes a webkit component to compile on Solaris 10 with the SunStudio12 compiler.

Simply, a 0 (int) causes a problem for strongly typed SunStudio 12 C++ and this patch uses a more normalized form of an "empty" pointer so that the compilation will continue.
Comment 4 Alexey Proskuryakov 2011-03-11 11:51:51 PST
I'm sorry to sound like a broken record, but please do follow <http://webkit.org/coding/contributing.html> to contribute code. In particular, the patch lacks a ChangeLog, and doesn't have r? bit set for review.

Without a ChangeLog, the patch cannot be landed, and without being marked for review, it isn't visible in review queue.
Comment 5 Ben Taylor 2011-03-12 07:29:15 PST
Created attachment 85593 [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 the one in https://bugs.webkit.org/attachment.cgi?bugid=56198 which passed muster.
Comment 6 Alexey Proskuryakov 2011-03-24 08:46:28 PDT
Comment on attachment 85593 [details]
Proposed patch which compiles correctly in qt-4.7.1 with webkit enabled on Solaris 10 with SS12 C++ compiler

Thank you!
Comment 7 WebKit Commit Bot 2011-03-24 09:08:49 PDT
Comment on attachment 85593 [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: 85593

Committed r81869: <http://trac.webkit.org/changeset/81869>
Comment 8 WebKit Commit Bot 2011-03-24 09:08:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 WebKit Review Bot 2011-03-24 10:07:04 PDT
http://trac.webkit.org/changeset/81869 might have broken GTK Linux 64-bit Debug
The following tests are not passing:
loader/reload-subresource-when-type-changes.html