RESOLVED FIXED117216
[GTK] Make precedence of logical operators explicit
https://bugs.webkit.org/show_bug.cgi?id=117216
Summary [GTK] Make precedence of logical operators explicit
Alberto Garcia
Reported 2013-06-04 16:27:47 PDT
There's a couple of cases where we're mixing && and || in the same expression without using parentheses. In particular ChromeClient::contentsSizeChanged() has this: if (gtk_widget_get_realized(widget) && (requisition.height != size.height()) || (requisition.width != size.width())) Due to the operator precedence rules, this means if ((A && B) || C) rather than if (A && (B || C)) which is what we want. AcceleratedCompositingContext::renderLayersToWindow() has a similar case. If I'm not wrong here the parentheses are not really necessary but I'd suggest using them as well to make the precedence explicit.
Attachments
Patch (2.82 KB, patch)
2013-06-04 16:33 PDT, Alberto Garcia
no flags
Alberto Garcia
Comment 1 2013-06-04 16:33:28 PDT
WebKit Commit Bot
Comment 2 2013-06-04 21:38:41 PDT
Comment on attachment 203739 [details] Patch Clearing flags on attachment: 203739 Committed r151198: <http://trac.webkit.org/changeset/151198>
WebKit Commit Bot
Comment 3 2013-06-04 21:38:43 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.