Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool RenderBoxModelObject::hasAcceleratedCompositing() const | 97 bool RenderBoxModelObject::hasAcceleratedCompositing() const |
| 98 { | 98 { |
| 99 return view()->compositor()->hasAcceleratedCompositing(); | 99 return view()->compositor()->hasAcceleratedCompositing(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool RenderBoxModelObject::startTransition(double timeOffset, CSSPropertyID prop ertyId, const RenderStyle* fromStyle, const RenderStyle* toStyle) | 102 bool RenderBoxModelObject::startTransition(double timeOffset, CSSPropertyID prop ertyId, const RenderStyle* fromStyle, const RenderStyle* toStyle) |
| 103 { | 103 { |
| 104 ASSERT(hasLayer()); | 104 ASSERT(hasLayer()); |
| 105 ASSERT(isComposited()); | 105 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 106 return layer()->backing()->startTransition(timeOffset, propertyId, fromStyle , toStyle); | 106 return layer()->backing()->startTransition(timeOffset, propertyId, fromStyle , toStyle); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void RenderBoxModelObject::transitionPaused(double timeOffset, CSSPropertyID pro pertyId) | 109 void RenderBoxModelObject::transitionPaused(double timeOffset, CSSPropertyID pro pertyId) |
| 110 { | 110 { |
| 111 ASSERT(hasLayer()); | 111 ASSERT(hasLayer()); |
| 112 ASSERT(isComposited()); | 112 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 113 layer()->backing()->transitionPaused(timeOffset, propertyId); | 113 layer()->backing()->transitionPaused(timeOffset, propertyId); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void RenderBoxModelObject::transitionFinished(CSSPropertyID propertyId) | 116 void RenderBoxModelObject::transitionFinished(CSSPropertyID propertyId) |
| 117 { | 117 { |
| 118 ASSERT(hasLayer()); | 118 ASSERT(hasLayer()); |
| 119 ASSERT(isComposited()); | 119 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 120 layer()->backing()->transitionFinished(propertyId); | 120 layer()->backing()->transitionFinished(propertyId); |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool RenderBoxModelObject::startAnimation(double timeOffset, const CSSAnimationD ata* animation, const KeyframeList& keyframes) | 123 bool RenderBoxModelObject::startAnimation(double timeOffset, const CSSAnimationD ata* animation, const KeyframeList& keyframes) |
| 124 { | 124 { |
| 125 ASSERT(hasLayer()); | 125 ASSERT(hasLayer()); |
| 126 ASSERT(isComposited()); | 126 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 127 return layer()->backing()->startAnimation(timeOffset, animation, keyframes); | 127 return layer()->backing()->startAnimation(timeOffset, animation, keyframes); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void RenderBoxModelObject::animationPaused(double timeOffset, const String& name ) | 130 void RenderBoxModelObject::animationPaused(double timeOffset, const String& name ) |
| 131 { | 131 { |
| 132 ASSERT(hasLayer()); | 132 ASSERT(hasLayer()); |
| 133 ASSERT(isComposited()); | 133 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 134 layer()->backing()->animationPaused(timeOffset, name); | 134 layer()->backing()->animationPaused(timeOffset, name); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void RenderBoxModelObject::animationFinished(const String& name) | 137 void RenderBoxModelObject::animationFinished(const String& name) |
| 138 { | 138 { |
| 139 ASSERT(hasLayer()); | 139 ASSERT(hasLayer()); |
| 140 ASSERT(isComposited()); | 140 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 141 layer()->backing()->animationFinished(name); | 141 layer()->backing()->animationFinished(name); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void RenderBoxModelObject::suspendAnimations(double time) | 144 void RenderBoxModelObject::suspendAnimations(double time) |
| 145 { | 145 { |
| 146 ASSERT(hasLayer()); | 146 ASSERT(hasLayer()); |
| 147 ASSERT(isComposited()); | 147 ASSERT(compositingState() == PaintsIntoOwnBacking); |
| 148 layer()->backing()->suspendAnimations(time); | 148 layer()->backing()->suspendAnimations(time); |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool RenderBoxModelObject::shouldPaintAtLowQuality(GraphicsContext* context, Ima ge* image, const void* layer, const LayoutSize& size) | 151 bool RenderBoxModelObject::shouldPaintAtLowQuality(GraphicsContext* context, Ima ge* image, const void* layer, const LayoutSize& size) |
| 152 { | 152 { |
| 153 return ImageQualityController::imageQualityController()->shouldPaintAtLowQua lity(context, this, image, layer, size); | 153 return ImageQualityController::imageQualityController()->shouldPaintAtLowQua lity(context, this, image, layer, size); |
| 154 } | 154 } |
| 155 | 155 |
| 156 RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node) | 156 RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node) |
| 157 : RenderLayerModelObject(node) | 157 : RenderLayerModelObject(node) |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 976 | 976 |
| 977 bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const | 977 bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const |
| 978 { | 978 { |
| 979 if (!isRoot()) | 979 if (!isRoot()) |
| 980 return false; | 980 return false; |
| 981 | 981 |
| 982 if (view()->frameView() && view()->frameView()->paintBehavior() & PaintBehav iorFlattenCompositingLayers) | 982 if (view()->frameView() && view()->frameView()->paintBehavior() & PaintBehav iorFlattenCompositingLayers) |
| 983 return false; | 983 return false; |
| 984 | 984 |
| 985 RenderLayer* rootLayer = view()->layer(); | 985 RenderLayer* rootLayer = view()->layer(); |
| 986 if (!rootLayer || !rootLayer->isComposited()) | 986 if (!rootLayer || !rootLayer->backing()) |
|
Ian Vollick
2013/10/01 19:46:22
I think that checking backing is fine here, but yo
shawnsingh
2013/10/03 03:04:04
Done - except, it makes more sense to check if the
| |
| 987 return false; | 987 return false; |
| 988 | 988 |
| 989 return rootLayer->backing()->backgroundLayerPaintsFixedRootBackground(); | 989 return rootLayer->backing()->backgroundLayerPaintsFixedRootBackground(); |
| 990 } | 990 } |
| 991 | 991 |
| 992 void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil lLayer, const LayoutRect& paintRect, | 992 void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil lLayer, const LayoutRect& paintRect, |
| 993 BackgroundImageGeometry& geometry, RenderObject* backgroundObject) | 993 BackgroundImageGeometry& geometry, RenderObject* backgroundObject) |
| 994 { | 994 { |
| 995 LayoutUnit left = 0; | 995 LayoutUnit left = 0; |
| 996 LayoutUnit top = 0; | 996 LayoutUnit top = 0; |
| (...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2785 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2785 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 2786 for (RenderObject* child = startChild; child && child != endChild; ) { | 2786 for (RenderObject* child = startChild; child && child != endChild; ) { |
| 2787 // Save our next sibling as moveChildTo will clear it. | 2787 // Save our next sibling as moveChildTo will clear it. |
| 2788 RenderObject* nextSibling = child->nextSibling(); | 2788 RenderObject* nextSibling = child->nextSibling(); |
| 2789 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2789 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
| 2790 child = nextSibling; | 2790 child = nextSibling; |
| 2791 } | 2791 } |
| 2792 } | 2792 } |
| 2793 | 2793 |
| 2794 } // namespace WebCore | 2794 } // namespace WebCore |
| OLD | NEW |