[GTK] Make precedence of logical operators explicit

https://bugs.webkit.org/show_bug.cgi?id=117216

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-06-04
Reviewed by Martin Robinson.

There's a couple of cases where we mix && and || in the same
expression. In ChromeClient::contentsSizeChanged() the lack of
parentheses actually makes the expression wrong.

* WebCoreSupport/AcceleratedCompositingContextGL.cpp:
(WebKit::AcceleratedCompositingContext::renderLayersToWindow):
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::contentsSizeChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2fa156ed
2013-06-04 Alberto Garcia <agarcia@igalia.com>
[GTK] Make precedence of logical operators explicit
https://bugs.webkit.org/show_bug.cgi?id=117216
Reviewed by Martin Robinson.
There's a couple of cases where we mix && and || in the same
expression. In ChromeClient::contentsSizeChanged() the lack of
parentheses actually makes the expression wrong.
* WebCoreSupport/AcceleratedCompositingContextGL.cpp:
(WebKit::AcceleratedCompositingContext::renderLayersToWindow):
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::contentsSizeChanged):
2013-05-30 Enrique Ocana Gonzalez <eocanha@igalia.com>
[GTK] Fix pass_by_value coverity warning in ChromeClientGtk
......
......@@ -156,7 +156,7 @@ bool AcceleratedCompositingContext::renderLayersToWindow(cairo_t* cr, const IntR
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_fill(cr);
if (!m_layerFlushTimerCallbackId && toTextureMapperLayer(m_rootLayer.get())->descendantsOrSelfHaveRunningAnimations() || m_needsExtraFlush) {
if ((!m_layerFlushTimerCallbackId && toTextureMapperLayer(m_rootLayer.get())->descendantsOrSelfHaveRunningAnimations()) || m_needsExtraFlush) {
m_needsExtraFlush = false;
double nextFlush = max((1 / gFramesPerSecond) - (currentTime() - m_lastFlushTime), 0.0);
m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 1000 * nextFlush, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
......
......@@ -722,8 +722,8 @@ void ChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
GtkRequisition requisition;
gtk_widget_get_requisition(widget, &requisition);
if (gtk_widget_get_realized(widget)
&& (requisition.height != size.height())
|| (requisition.width != size.width()))
&& (requisition.height != size.height()
|| requisition.width != size.width()))
gtk_widget_queue_resize_no_redraw(widget);
// If this was a main frame size change, update the scrollbars.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment