I receive the following warning when I build. Reviewing the line in question reveals that we are comparing a boolean (the return value of "ancestorBacking->graphicsLayer->drawsContents()") to the float returned by the style's opacity property. This seems very strange. At the very least, we should do some casting here to make it clear that this is intentional (if it is). if (newStyle.opacity() != ancestorBacking->graphicsLayer()->drawsContent()) return true; Where: opacity is a float drawsContent is a boolean.
Based on Bug 138448, it looks like this was an intentional comparison, but I think a cast would make it clear that this is desired behavior.
Agreed it's odd. Would be fine to clarify.
I neglected to include the compiler error: 18>c:\projects\webkit\opensource\source\webcore\rendering\RenderLayerCompositor.cpp(888): warning C4805: '!=' : unsafe mix of type 'float' and type 'bool' in operation (..\rendering\RenderingAllInOne.cpp)
This code is checking for non-zero opacity.
Created attachment 244716 [details] Patch
Committed r178568: <http://trac.webkit.org/changeset/178568>