| 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 21 matching lines...) Expand all Loading... |
| 32 #include "core/layout/LayoutBlock.h" | 32 #include "core/layout/LayoutBlock.h" |
| 33 #include "core/layout/LayoutFlexibleBox.h" | 33 #include "core/layout/LayoutFlexibleBox.h" |
| 34 #include "core/layout/LayoutGeometryMap.h" | 34 #include "core/layout/LayoutGeometryMap.h" |
| 35 #include "core/layout/LayoutInline.h" | 35 #include "core/layout/LayoutInline.h" |
| 36 #include "core/layout/LayoutView.h" | 36 #include "core/layout/LayoutView.h" |
| 37 #include "core/layout/compositing/CompositedLayerMapping.h" | 37 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 38 #include "core/layout/compositing/PaintLayerCompositor.h" | 38 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 39 #include "core/paint/PaintLayer.h" | 39 #include "core/paint/PaintLayer.h" |
| 40 #include "core/style/ShadowList.h" | 40 #include "core/style/ShadowList.h" |
| 41 #include "platform/LengthFunctions.h" | 41 #include "platform/LengthFunctions.h" |
| 42 #include "wtf/PtrUtil.h" |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 45 class FloatStateForStyleChange { | 46 class FloatStateForStyleChange { |
| 46 public: | 47 public: |
| 47 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo
ating) | 48 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo
ating) |
| 48 { | 49 { |
| 49 s_wasFloating = wasFloating; | 50 s_wasFloating = wasFloating; |
| 50 s_boxModelObject = boxModelObject; | 51 s_boxModelObject = boxModelObject; |
| 51 } | 52 } |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // input as if we have saved constraints for this layer they were saved | 320 // input as if we have saved constraints for this layer they were saved |
| 320 // in the previous frame. | 321 // in the previous frame. |
| 321 DisableCompositingQueryAsserts disabler; | 322 DisableCompositingQueryAsserts disabler; |
| 322 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer
()) | 323 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer
()) |
| 323 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain
ts(); | 324 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain
ts(); |
| 324 } | 325 } |
| 325 | 326 |
| 326 void LayoutBoxModelObject::createLayer() | 327 void LayoutBoxModelObject::createLayer() |
| 327 { | 328 { |
| 328 ASSERT(!m_layer); | 329 ASSERT(!m_layer); |
| 329 m_layer = adoptPtr(new PaintLayer(this)); | 330 m_layer = wrapUnique(new PaintLayer(this)); |
| 330 setHasLayer(true); | 331 setHasLayer(true); |
| 331 m_layer->insertOnlyThisLayerAfterStyleChange(); | 332 m_layer->insertOnlyThisLayerAfterStyleChange(); |
| 332 } | 333 } |
| 333 | 334 |
| 334 void LayoutBoxModelObject::destroyLayer() | 335 void LayoutBoxModelObject::destroyLayer() |
| 335 { | 336 { |
| 336 setHasLayer(false); | 337 setHasLayer(false); |
| 337 m_layer = nullptr; | 338 m_layer = nullptr; |
| 338 } | 339 } |
| 339 | 340 |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 if (rootElementStyle->hasBackground()) | 1112 if (rootElementStyle->hasBackground()) |
| 1112 return false; | 1113 return false; |
| 1113 | 1114 |
| 1114 if (node() != document().firstBodyElement()) | 1115 if (node() != document().firstBodyElement()) |
| 1115 return false; | 1116 return false; |
| 1116 | 1117 |
| 1117 return true; | 1118 return true; |
| 1118 } | 1119 } |
| 1119 | 1120 |
| 1120 } // namespace blink | 1121 } // namespace blink |
| OLD | NEW |