[Webkit-unassigned] [Bug 117216] New: [GTK] Make precedence of logical operators explicit
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 4 16:29:14 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=117216
Summary: [GTK] Make precedence of logical operators explicit
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: agarcia at igalia.com
CC: mrobinson at webkit.org
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list