Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(672)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2225033003: Separate backgroundObscurationStatus and hasBoxDecorationBackground (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 PaintInvalidationReason invalidationReason = getPaintInvalidationReason(pain tInvalidationState, oldBounds, oldLocation, newBounds, newLocation); 1381 PaintInvalidationReason invalidationReason = getPaintInvalidationReason(pain tInvalidationState, oldBounds, oldLocation, newBounds, newLocation);
1382 1382
1383 // We need to invalidate the selection before checking for whether we are do ing a full invalidation. 1383 // We need to invalidate the selection before checking for whether we are do ing a full invalidation.
1384 // This is because we need to update the old rect regardless. 1384 // This is because we need to update the old rect regardless.
1385 invalidateSelectionIfNeeded(paintInvalidationContainer, paintInvalidationSta te, invalidationReason); 1385 invalidateSelectionIfNeeded(paintInvalidationContainer, paintInvalidationSta te, invalidationReason);
1386 1386
1387 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "LayoutObject: :invalidatePaintIfNeeded()", 1387 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "LayoutObject: :invalidatePaintIfNeeded()",
1388 "object", this->debugName().ascii(), 1388 "object", this->debugName().ascii(),
1389 "info", jsonObjectForOldAndNewRects(oldBounds, oldLocation, newBounds, n ewLocation)); 1389 "info", jsonObjectForOldAndNewRects(oldBounds, oldLocation, newBounds, n ewLocation));
1390 1390
1391 bool boxDecorationBackgroundObscured = boxDecorationBackgroundIsKnownToBeObs cured(); 1391 bool backgroundObscured = backgroundIsKnownToBeObscured();
1392 if (!isFullPaintInvalidationReason(invalidationReason) && boxDecorationBackg roundObscured != m_bitfields.lastBoxDecorationBackgroundObscured()) 1392 if (!isFullPaintInvalidationReason(invalidationReason) && backgroundObscured != m_bitfields.previousBackgroundObscured())
1393 invalidationReason = PaintInvalidationBackgroundObscurationChange; 1393 invalidationReason = PaintInvalidationBackgroundObscurationChange;
1394 m_bitfields.setLastBoxDecorationBackgroundObscured(boxDecorationBackgroundOb scured); 1394 m_bitfields.setPreviousBackgroundObscured(backgroundObscured);
1395 1395
1396 if (invalidationReason == PaintInvalidationNone) { 1396 if (invalidationReason == PaintInvalidationNone) {
1397 // TODO(trchen): Currently we don't keep track of paint offset of layout objects. 1397 // TODO(trchen): Currently we don't keep track of paint offset of layout objects.
1398 // There are corner cases that the display items need to be invalidated for paint offset 1398 // There are corner cases that the display items need to be invalidated for paint offset
1399 // mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based 1399 // mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based
1400 // invalidation is issued. See crbug.com/508383 and crbug.com/515977. 1400 // invalidation is issued. See crbug.com/508383 and crbug.com/515977.
1401 // This is a workaround to force display items to update paint offset. 1401 // This is a workaround to force display items to update paint offset.
1402 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && paint InvalidationState.forcedSubtreeInvalidationCheckingWithinContainer()) 1402 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && paint InvalidationState.forcedSubtreeInvalidationCheckingWithinContainer())
1403 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalida tionState, PaintInvalidationLocationChange); 1403 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalida tionState, PaintInvalidationLocationChange);
1404 1404
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
3650 const blink::LayoutObject* root = object1; 3650 const blink::LayoutObject* root = object1;
3651 while (root->parent()) 3651 while (root->parent())
3652 root = root->parent(); 3652 root = root->parent();
3653 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3653 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3654 } else { 3654 } else {
3655 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3655 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3656 } 3656 }
3657 } 3657 }
3658 3658
3659 #endif 3659 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698