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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( | 299 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( |
300 LayoutInvalidationReason::StyleChange); | 300 LayoutInvalidationReason::StyleChange); |
301 } | 301 } |
302 if (!needsLayout()) { | 302 if (!needsLayout()) { |
303 // FIXME: We should call a specialized version of this function. | 303 // FIXME: We should call a specialized version of this function. |
304 parentLayer->updateLayerPositionsAfterLayout(); | 304 parentLayer->updateLayerPositionsAfterLayout(); |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { | 308 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
309 // hasLayer status will affect whether to create localBorderBoxProperties. | 309 if ((oldStyle && oldStyle->position() != styleRef().position()) || |
310 // hasTransformRelatedProperty will affect whether to create transform node. | 310 hadLayer != hasLayer()) { |
311 if (hadLayer != hasLayer() || | 311 // This may affect paint properties of the current object, and descendants |
312 hadTransformRelatedProperty != hasTransformRelatedProperty()) { | 312 // even if paint properties of the current object won't change. E.g. the |
313 setNeedsPaintPropertyUpdate(); | 313 // stacking context and/or containing block of descendants may change. |
314 } else if (oldStyle && oldStyle->position() != styleRef().position() && | 314 setSubtreeNeedsPaintPropertyUpdate(); |
315 (oldStyle->position() == FixedPosition || | 315 } else if (hadTransformRelatedProperty != hasTransformRelatedProperty()) { |
316 styleRef().position() == FixedPosition)) { | 316 // This affects whether to create transform node. |
317 // Fixed-position status affects whether to create paintOffsetTranslation. | |
318 // TODO(chrishtr): Update the condition here when changing the condition | |
319 // in PaintPropertyTreeBuilder::updatePaintOffsetTranslation(). | |
320 setNeedsPaintPropertyUpdate(); | 317 setNeedsPaintPropertyUpdate(); |
321 } | 318 } |
322 } | 319 } |
323 | 320 |
324 if (layer()) { | 321 if (layer()) { |
325 layer()->styleDidChange(diff, oldStyle); | 322 layer()->styleDidChange(diff, oldStyle); |
326 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) | 323 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) |
327 setChildNeedsLayout(); | 324 setChildNeedsLayout(); |
328 } | 325 } |
329 | 326 |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 if (rootElementStyle->hasBackground()) | 1336 if (rootElementStyle->hasBackground()) |
1340 return false; | 1337 return false; |
1341 | 1338 |
1342 if (node() != document().firstBodyElement()) | 1339 if (node() != document().firstBodyElement()) |
1343 return false; | 1340 return false; |
1344 | 1341 |
1345 return true; | 1342 return true; |
1346 } | 1343 } |
1347 | 1344 |
1348 } // namespace blink | 1345 } // namespace blink |
OLD | NEW |