New issue
Advanced search Search tips

Issue 626404 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Incorrect calculation of interest rect for squashing and scrolling contents layer

Project Member Reported by brucedaw...@chromium.org, Jul 7 2016

Issue description

The Win32 /analyze builds report that:

third_party\webkit\source\core\layout\compositing\compositedlayermapping.cpp(2377) : warning C6287: Redundant code:  the left and right sub-expressions are identical.

This is correct. The original code from crrev.com/1462713002 looks like this:

    if (shouldPaintWholePage
        || (graphicsLayer != m_graphicsLayer && graphicsLayer != m_squashingLayer && graphicsLayer != m_squashingLayer && graphicsLayer != m_scrollingContentsLayer))
        return IntRect(IntPoint(), expandedIntSize(graphicsLayer->size()));

The updated code after hash 540e575dc43e718821bc4ac682735a9631e33c1f looks like this:

    if (shouldPaintWholePage
        || (graphicsLayer != m_graphicsLayer.get() && graphicsLayer != m_squashingLayer.get() && graphicsLayer != m_squashingLayer.get() && graphicsLayer != m_scrollingContentsLayer.get()))
        return wholeLayerRect;

In both cases the "graphicsLayer != m_squashingLayer" comparison is done twice. Either one should be removed or it should be changed.

Fix should be tagged with this bug number and with 427616.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/969a37dbd59256d636d6a061c265686d314769b4

commit 969a37dbd59256d636d6a061c265686d314769b4
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Fri Jul 08 09:35:35 2016

Remove duplicate condition in CompositedLayerMapping::computeInterestRect().

BUG= 626404 

Review-Url: https://codereview.chromium.org/2124363002
Cr-Commit-Position: refs/heads/master@{#404326}

[modify] https://crrev.com/969a37dbd59256d636d6a061c265686d314769b4/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment