| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 244             // to marking entire layers instead. This may sometimes mark more th
     an necessary (when | 244             // to marking entire layers instead. This may sometimes mark more th
     an necessary (when | 
| 245             // a layer is made of disjoint objects) but in practice is a signifi
     cant performance | 245             // a layer is made of disjoint objects) but in practice is a signifi
     cant performance | 
| 246             // savings. | 246             // savings. | 
| 247             layer()->addLayerHitTestRects(rects); | 247             layer()->addLayerHitTestRects(rects); | 
| 248         } | 248         } | 
| 249     } else { | 249     } else { | 
| 250         LayoutObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
     tainerRect); | 250         LayoutObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
     tainerRect); | 
| 251     } | 251     } | 
| 252 } | 252 } | 
| 253 | 253 | 
| 254 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& 
     paintInvalidationState) | 254 void LayoutBoxModelObject::invalidateTreeIfNeeded(PaintInvalidationState& paintI
     nvalidationState) | 
| 255 { | 255 { | 
| 256     ASSERT(!needsLayout()); | 256     ASSERT(!needsLayout()); | 
| 257 | 257 | 
| 258     if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 258     if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 
| 259         return; | 259         return; | 
| 260 | 260 | 
| 261     bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer
     (); | 261     bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer
     (); | 
| 262     const LayoutBoxModelObject& newPaintInvalidationContainer = *adjustComposite
     dContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : 
     &paintInvalidationState.paintInvalidationContainer()); | 262     const LayoutBoxModelObject& newPaintInvalidationContainer = *adjustComposite
     dContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : 
     &paintInvalidationState.paintInvalidationContainer()); | 
| 263     // FIXME: This assert should be re-enabled when we move paint invalidation t
     o after compositing update. crbug.com/360286 | 263     // FIXME: This assert should be re-enabled when we move paint invalidation t
     o after compositing update. crbug.com/360286 | 
| 264     // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation())
     ; | 264     // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation())
     ; | 
| 265 | 265 | 
| 266     PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt
     ate, newPaintInvalidationContainer); | 266     PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt
     ate, newPaintInvalidationContainer); | 
| 267     clearPaintInvalidationState(paintInvalidationState); | 267     clearPaintInvalidationState(paintInvalidationState); | 
| 268 | 268 | 
|  | 269     if (reason == PaintInvalidationDelayedFull) | 
|  | 270         paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); | 
|  | 271 | 
| 269     PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new
     PaintInvalidationContainer); | 272     PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new
     PaintInvalidationContainer); | 
| 270     if (reason == PaintInvalidationLocationChange) | 273     if (reason == PaintInvalidationLocationChange) | 
| 271         childTreeWalkState.setForceCheckForPaintInvalidation(); | 274         childTreeWalkState.setForceCheckForPaintInvalidation(); | 
| 272     invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); | 275     invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); | 
| 273 } | 276 } | 
| 274 | 277 | 
| 275 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe
     ct& r, PaintInvalidationReason invalidationReason) const | 278 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe
     ct& r, PaintInvalidationReason invalidationReason) const | 
| 276 { | 279 { | 
| 277     // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
      crash here, | 280     // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
      crash here, | 
| 278     // so assert but check that the layer is composited. | 281     // so assert but check that the layer is composited. | 
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 876     ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 879     ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 
| 877     for (LayoutObject* child = startChild; child && child != endChild; ) { | 880     for (LayoutObject* child = startChild; child && child != endChild; ) { | 
| 878         // Save our next sibling as moveChildTo will clear it. | 881         // Save our next sibling as moveChildTo will clear it. | 
| 879         LayoutObject* nextSibling = child->nextSibling(); | 882         LayoutObject* nextSibling = child->nextSibling(); | 
| 880         moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 883         moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 
| 881         child = nextSibling; | 884         child = nextSibling; | 
| 882     } | 885     } | 
| 883 } | 886 } | 
| 884 | 887 | 
| 885 } // namespace blink | 888 } // namespace blink | 
| OLD | NEW | 
|---|