| OLD | NEW |
| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 } | 245 } |
| 246 | 246 |
| 247 // Fixed-position is painted using transform. In the case that the object | 247 // Fixed-position is painted using transform. In the case that the object |
| 248 // gets the same layout after changing position property, although no | 248 // gets the same layout after changing position property, although no |
| 249 // re-raster (rect-based invalidation) is needed, display items should | 249 // re-raster (rect-based invalidation) is needed, display items should |
| 250 // still update their paint offset. | 250 // still update their paint offset. |
| 251 if (oldStyle) { | 251 if (oldStyle) { |
| 252 bool newStyleIsFixedPosition = style()->position() == FixedPosition; | 252 bool newStyleIsFixedPosition = style()->position() == FixedPosition; |
| 253 bool oldStyleIsFixedPosition = oldStyle->position() == FixedPosition; | 253 bool oldStyleIsFixedPosition = oldStyle->position() == FixedPosition; |
| 254 if (newStyleIsFixedPosition != oldStyleIsFixedPosition) | 254 if (newStyleIsFixedPosition != oldStyleIsFixedPosition) |
| 255 invalidateDisplayItemClientsIncludingNonCompositingDescendants(nullp
tr, PaintInvalidationStyleChange); | 255 invalidateDisplayItemClientsIncludingNonCompositingDescendants(Paint
InvalidationStyleChange); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // The used style for body background may change due to computed style chang
e | 258 // The used style for body background may change due to computed style chang
e |
| 259 // on the document element because of background stealing. | 259 // on the document element because of background stealing. |
| 260 // Refer to backgroundStolenForBeingBody() and | 260 // Refer to backgroundStolenForBeingBody() and |
| 261 // http://www.w3.org/TR/css3-background/#body-background for more info. | 261 // http://www.w3.org/TR/css3-background/#body-background for more info. |
| 262 if (isDocumentElement()) { | 262 if (isDocumentElement()) { |
| 263 HTMLBodyElement* body = document().firstBodyElement(); | 263 HTMLBodyElement* body = document().firstBodyElement(); |
| 264 LayoutObject* bodyLayout = body ? body->layoutObject() : nullptr; | 264 LayoutObject* bodyLayout = body ? body->layoutObject() : nullptr; |
| 265 if (bodyLayout && bodyLayout->isBoxModelObject()) { | 265 if (bodyLayout && bodyLayout->isBoxModelObject()) { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 } else if (object.compositedScrollsWithRespectTo(*this)) { | 432 } else if (object.compositedScrollsWithRespectTo(*this)) { |
| 433 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayInRect
(r, invalidationReason, object); | 433 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayInRect
(r, invalidationReason, object); |
| 434 } else if (usesCompositedScrolling()) { | 434 } else if (usesCompositedScrolling()) { |
| 435 layer()->compositedLayerMapping()->setNonScrollingContentsNeedDisplayInR
ect(r, invalidationReason, object); | 435 layer()->compositedLayerMapping()->setNonScrollingContentsNeedDisplayInR
ect(r, invalidationReason, object); |
| 436 } else { | 436 } else { |
| 437 // Otherwise invalidate everything. | 437 // Otherwise invalidate everything. |
| 438 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason, object); | 438 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason, object); |
| 439 } | 439 } |
| 440 } | 440 } |
| 441 | 441 |
| 442 void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayIte
mClient& displayItemClient, PaintInvalidationReason invalidationReason, const La
youtObject* layoutObject) const | |
| 443 { | |
| 444 displayItemClient.setDisplayItemsUncached(); | |
| 445 | |
| 446 // We need to inform the GraphicsLayer about this paint invalidation only wh
en we are tracking | |
| 447 // paint invalidation or ENABLE(ASSERT). | |
| 448 #if !ENABLE(ASSERT) | |
| 449 if (!frameView()->isTrackingPaintInvalidations()) | |
| 450 return; | |
| 451 #endif | |
| 452 | |
| 453 if (layer()->groupedMapping()) { | |
| 454 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) | |
| 455 squashingLayer->displayItemClientWasInvalidated(displayItemClient, i
nvalidationReason); | |
| 456 } else if (CompositedLayerMapping* compositedLayerMapping = layer()->composi
tedLayerMapping()) { | |
| 457 if (layoutObject && layoutObject->compositedScrollsWithRespectTo(*this)) | |
| 458 compositedLayerMapping->scrollingDisplayItemClientWasInvalidated(dis
playItemClient, invalidationReason); | |
| 459 else | |
| 460 compositedLayerMapping->displayItemClientWasInvalidated(displayItemC
lient, invalidationReason); | |
| 461 } | |
| 462 } | |
| 463 | |
| 464 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>&
rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl
udeBlockOverflows) const | 442 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>&
rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl
udeBlockOverflows) const |
| 465 { | 443 { |
| 466 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 444 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
| 467 // Outlines of out-of-flow positioned descendants are handled in LayoutB
lock::addOutlineRects(). | 445 // Outlines of out-of-flow positioned descendants are handled in LayoutB
lock::addOutlineRects(). |
| 468 if (child->isOutOfFlowPositioned()) | 446 if (child->isOutOfFlowPositioned()) |
| 469 continue; | 447 continue; |
| 470 | 448 |
| 471 // Outline of an element continuation or anonymous block continuation is
added when we iterate the continuation chain. | 449 // Outline of an element continuation or anonymous block continuation is
added when we iterate the continuation chain. |
| 472 // See LayoutBlock::addOutlineRects() and LayoutInline::addOutlineRects(
). | 450 // See LayoutBlock::addOutlineRects() and LayoutInline::addOutlineRects(
). |
| 473 if (child->isElementContinuation() | 451 if (child->isElementContinuation() |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 if (rootElementStyle->hasBackground()) | 1111 if (rootElementStyle->hasBackground()) |
| 1134 return false; | 1112 return false; |
| 1135 | 1113 |
| 1136 if (node() != document().firstBodyElement()) | 1114 if (node() != document().firstBodyElement()) |
| 1137 return false; | 1115 return false; |
| 1138 | 1116 |
| 1139 return true; | 1117 return true; |
| 1140 } | 1118 } |
| 1141 | 1119 |
| 1142 } // namespace blink | 1120 } // namespace blink |
| OLD | NEW |