| 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) 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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1187 } | 1187 } | 
| 1188 | 1188 | 
| 1189 void LayoutObject::invalidatePaintRectangle(const LayoutRect& r) const | 1189 void LayoutObject::invalidatePaintRectangle(const LayoutRect& r) const | 
| 1190 { | 1190 { | 
| 1191     if (const LayoutBoxModelObject* paintInvalidationContainer = invalidatePaint
      RectangleInternal(r)) { | 1191     if (const LayoutBoxModelObject* paintInvalidationContainer = invalidatePaint
      RectangleInternal(r)) { | 
| 1192         if (RuntimeEnabledFeatures::slimmingPaintEnabled()) | 1192         if (RuntimeEnabledFeatures::slimmingPaintEnabled()) | 
| 1193             invalidateDisplayItemClients(*paintInvalidationContainer); | 1193             invalidateDisplayItemClients(*paintInvalidationContainer); | 
| 1194     } | 1194     } | 
| 1195 } | 1195 } | 
| 1196 | 1196 | 
| 1197 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
      alidationState) | 1197 void LayoutObject::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidat
      ionState) | 
| 1198 { | 1198 { | 
| 1199     ASSERT(!needsLayout()); | 1199     ASSERT(!needsLayout()); | 
| 1200 | 1200 | 
| 1201     // If we didn't need paint invalidation then our children don't need as well
      . | 1201     // If we didn't need paint invalidation then our children don't need as well
      . | 
| 1202     // Skip walking down the tree as everything should be fine below us. | 1202     // Skip walking down the tree as everything should be fine below us. | 
| 1203     if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 1203     if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 
| 1204         return; | 1204         return; | 
| 1205 | 1205 | 
| 1206     invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paint
      InvalidationContainer()); | 1206     PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt
      ate, paintInvalidationState.paintInvalidationContainer()); | 
| 1207     clearPaintInvalidationState(paintInvalidationState); | 1207     clearPaintInvalidationState(paintInvalidationState); | 
|  | 1208 | 
|  | 1209     if (reason == PaintInvalidationDelayedFull) | 
|  | 1210         paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); | 
|  | 1211 | 
| 1208     invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); | 1212     invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); | 
| 1209 } | 1213 } | 
| 1210 | 1214 | 
| 1211 void LayoutObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationStat
      e& childPaintInvalidationState) | 1215 void LayoutObject::invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& chi
      ldPaintInvalidationState) | 
| 1212 { | 1216 { | 
| 1213     for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
      ng()) { | 1217     for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
      ng()) { | 
| 1214         if (!child->isOutOfFlowPositioned()) | 1218         if (!child->isOutOfFlowPositioned()) | 
| 1215             child->invalidateTreeIfNeeded(childPaintInvalidationState); | 1219             child->invalidateTreeIfNeeded(childPaintInvalidationState); | 
| 1216     } | 1220     } | 
| 1217 } | 1221 } | 
| 1218 | 1222 | 
| 1219 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe
      cts(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect&
       newRect, const LayoutPoint& newLocation) | 1223 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe
      cts(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect&
       newRect, const LayoutPoint& newLocation) | 
| 1220 { | 1224 { | 
| 1221     RefPtr<TracedValue> value = TracedValue::create(); | 1225     RefPtr<TracedValue> value = TracedValue::create(); | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1267 | 1271 | 
| 1268     if (RuntimeEnabledFeatures::slimmingPaintEnabled() && shouldInvalidateSelect
      ion()) | 1272     if (RuntimeEnabledFeatures::slimmingPaintEnabled() && shouldInvalidateSelect
      ion()) | 
| 1269         invalidateDisplayItemClients(paintInvalidationContainer); | 1273         invalidateDisplayItemClients(paintInvalidationContainer); | 
| 1270 | 1274 | 
| 1271     if (fullInvalidation) | 1275     if (fullInvalidation) | 
| 1272         return; | 1276         return; | 
| 1273 | 1277 | 
| 1274     fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection,
       oldSelectionRect, newSelectionRect); | 1278     fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection,
       oldSelectionRect, newSelectionRect); | 
| 1275 } | 1279 } | 
| 1276 | 1280 | 
| 1277 PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(const PaintInvalid
      ationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidatio
      nContainer) | 1281 PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
      tate& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationConta
      iner) | 
| 1278 { | 1282 { | 
| 1279     LayoutView* v = view(); | 1283     LayoutView* v = view(); | 
| 1280     if (v->document().printing()) | 1284     if (v->document().printing()) | 
| 1281         return PaintInvalidationNone; // Don't invalidate paints if we're printi
      ng. | 1285         return PaintInvalidationNone; // Don't invalidate paints if we're printi
      ng. | 
| 1282 | 1286 | 
| 1283     const LayoutRect oldBounds = previousPaintInvalidationRect(); | 1287     const LayoutRect oldBounds = previousPaintInvalidationRect(); | 
| 1284     const LayoutPoint oldLocation = previousPositionFromPaintInvalidationBacking
      (); | 1288     const LayoutPoint oldLocation = previousPositionFromPaintInvalidationBacking
      (); | 
| 1285     const LayoutRect newBounds = boundsRectForPaintInvalidation(&paintInvalidati
      onContainer, &paintInvalidationState); | 1289     const LayoutRect newBounds = boundsRectForPaintInvalidation(&paintInvalidati
      onContainer, &paintInvalidationState); | 
| 1286     const LayoutPoint newLocation = DeprecatedPaintLayer::positionFromPaintInval
      idationBacking(this, &paintInvalidationContainer, &paintInvalidationState); | 1290     const LayoutPoint newLocation = DeprecatedPaintLayer::positionFromPaintInval
      idationBacking(this, &paintInvalidationContainer, &paintInvalidationState); | 
| 1287     setPreviousPaintInvalidationRect(newBounds); | 1291     setPreviousPaintInvalidationRect(newBounds); | 
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3226 { | 3230 { | 
| 3227     if (object1) { | 3231     if (object1) { | 
| 3228         const blink::LayoutObject* root = object1; | 3232         const blink::LayoutObject* root = object1; | 
| 3229         while (root->parent()) | 3233         while (root->parent()) | 
| 3230             root = root->parent(); | 3234             root = root->parent(); | 
| 3231         root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3235         root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 
| 3232     } | 3236     } | 
| 3233 } | 3237 } | 
| 3234 | 3238 | 
| 3235 #endif | 3239 #endif | 
| OLD | NEW | 
|---|