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

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

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 // Fixed-position is painted using transform. In the case that the object 396 // Fixed-position is painted using transform. In the case that the object
397 // gets the same layout after changing position property, although no 397 // gets the same layout after changing position property, although no
398 // re-raster (rect-based invalidation) is needed, display items should 398 // re-raster (rect-based invalidation) is needed, display items should
399 // still update their paint offset. 399 // still update their paint offset.
400 if (old_style) { 400 if (old_style) {
401 bool new_style_is_fixed_position = 401 bool new_style_is_fixed_position =
402 Style()->GetPosition() == EPosition::kFixed; 402 Style()->GetPosition() == EPosition::kFixed;
403 bool old_style_is_fixed_position = 403 bool old_style_is_fixed_position =
404 old_style->GetPosition() == EPosition::kFixed; 404 old_style->GetPosition() == EPosition::kFixed;
405 if (new_style_is_fixed_position != old_style_is_fixed_position) 405 if (new_style_is_fixed_position != old_style_is_fixed_position) {
406 ObjectPaintInvalidator(*this) 406 ObjectPaintInvalidator(*this)
407 .InvalidateDisplayItemClientsIncludingNonCompositingDescendants( 407 .InvalidateDisplayItemClientsIncludingNonCompositingDescendants(
408 kPaintInvalidationStyleChange); 408 PaintInvalidationReason::kStyle);
409 }
409 } 410 }
410 411
411 // The used style for body background may change due to computed style change 412 // The used style for body background may change due to computed style change
412 // on the document element because of background stealing. 413 // on the document element because of background stealing.
413 // Refer to backgroundStolenForBeingBody() and 414 // Refer to backgroundStolenForBeingBody() and
414 // http://www.w3.org/TR/css3-background/#body-background for more info. 415 // http://www.w3.org/TR/css3-background/#body-background for more info.
415 if (IsDocumentElement()) { 416 if (IsDocumentElement()) {
416 HTMLBodyElement* body = GetDocument().FirstBodyElement(); 417 HTMLBodyElement* body = GetDocument().FirstBodyElement();
417 LayoutObject* body_layout = body ? body->GetLayoutObject() : nullptr; 418 LayoutObject* body_layout = body ? body->GetLayoutObject() : nullptr;
418 if (body_layout && body_layout->IsBoxModelObject()) { 419 if (body_layout && body_layout->IsBoxModelObject()) {
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 if (root_element_style->HasBackground()) 1482 if (root_element_style->HasBackground())
1482 return false; 1483 return false;
1483 1484
1484 if (GetNode() != GetDocument().FirstBodyElement()) 1485 if (GetNode() != GetDocument().FirstBodyElement())
1485 return false; 1486 return false;
1486 1487
1487 return true; 1488 return true;
1488 } 1489 }
1489 1490
1490 } // namespace blink 1491 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698