| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // FIXME: We should call a specialized version of this function. | 226 // FIXME: We should call a specialized version of this function. |
| 227 parentLayer->updateLayerPositionsAfterLayout(); | 227 parentLayer->updateLayerPositionsAfterLayout(); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 if (layer()) { | 231 if (layer()) { |
| 232 // FIXME: Ideally we shouldn't need this setter but we can't easily infe
r an overflow-only layer | 232 // FIXME: Ideally we shouldn't need this setter but we can't easily infe
r an overflow-only layer |
| 233 // from the style. | 233 // from the style. |
| 234 layer()->setLayerType(type); | 234 layer()->setLayerType(type); |
| 235 | 235 |
| 236 layer()->styleChanged(diff, oldStyle); | 236 layer()->styleDidChange(diff, oldStyle); |
| 237 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) | 237 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) |
| 238 setChildNeedsLayout(); | 238 setChildNeedsLayout(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) { | 241 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) { |
| 242 // Changing the getWritingMode() may change isOrthogonalWritingModeRoot(
) | 242 // Changing the getWritingMode() may change isOrthogonalWritingModeRoot(
) |
| 243 // of children. Make sure all children are marked/unmarked as orthogonal | 243 // of children. Make sure all children are marked/unmarked as orthogonal |
| 244 // writing-mode roots. | 244 // writing-mode roots. |
| 245 bool newHorizontalWritingMode = isHorizontalWritingMode(); | 245 bool newHorizontalWritingMode = isHorizontalWritingMode(); |
| 246 for (LayoutObject* child = slowFirstChild(); child; child = child->nextS
ibling()) { | 246 for (LayoutObject* child = slowFirstChild(); child; child = child->nextS
ibling()) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 frameView->addViewportConstrainedObject(this); | 289 frameView->addViewportConstrainedObject(this); |
| 290 else | 290 else |
| 291 frameView->removeViewportConstrainedObject(this); | 291 frameView->removeViewportConstrainedObject(this); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 void LayoutBoxModelObject::createLayer(PaintLayerType type) | 296 void LayoutBoxModelObject::createLayer(PaintLayerType type) |
| 297 { | 297 { |
| 298 // If the current paint invalidation container is not a stacking context and
this object is | 298 // If the current paint invalidation container is not a stacking context and
this object is |
| 299 // a or treated as a stacking context, creating this layer may cause this ob
ject and its | 299 // stacked content, creating this layer may cause this object and its |
| 300 // descendants to change paint invalidation container. Therefore we must eag
erly invalidate | 300 // descendants to change paint invalidation container. Therefore we must eag
erly invalidate |
| 301 // them on the original paint invalidation container before creating the lay
er. | 301 // them on the original paint invalidation container before creating the lay
er. |
| 302 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && style
Ref().isTreatedAsOrStackingContext()) { | 302 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && style
Ref().isStacked()) { |
| 303 const LayoutBoxModelObject& currentPaintInvalidationContainer = containe
rForPaintInvalidation(); | 303 const LayoutBoxModelObject& currentPaintInvalidationContainer = containe
rForPaintInvalidation(); |
| 304 if (!currentPaintInvalidationContainer.styleRef().isStackingContext()) | 304 if (!currentPaintInvalidationContainer.styleRef().isStackingContext()) |
| 305 invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaint
InvalidationContainer); | 305 invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaint
InvalidationContainer); |
| 306 } | 306 } |
| 307 | 307 |
| 308 ASSERT(!m_layer); | 308 ASSERT(!m_layer); |
| 309 m_layer = adoptPtr(new PaintLayer(this, type)); | 309 m_layer = adoptPtr(new PaintLayer(this, type)); |
| 310 setHasLayer(true); | 310 setHasLayer(true); |
| 311 m_layer->insertOnlyThisLayer(); | 311 m_layer->insertOnlyThisLayer(); |
| 312 } | 312 } |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 if (rootElementStyle->hasBackground()) | 960 if (rootElementStyle->hasBackground()) |
| 961 return false; | 961 return false; |
| 962 | 962 |
| 963 if (node() != document().firstBodyElement()) | 963 if (node() != document().firstBodyElement()) |
| 964 return false; | 964 return false; |
| 965 | 965 |
| 966 return true; | 966 return true; |
| 967 } | 967 } |
| 968 | 968 |
| 969 } // namespace blink | 969 } // namespace blink |
| OLD | NEW |