 Chromium Code Reviews
 Chromium Code Reviews Issue 1158603003:
  CSS Independent Transform Properties  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1158603003:
  CSS Independent Transform Properties  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "config.h" | 5 #include "config.h" | 
| 6 #include "core/layout/compositing/CompositingReasonFinder.h" | 6 #include "core/layout/compositing/CompositingReasonFinder.h" | 
| 7 | 7 | 
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" | 
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" | 
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 reasons |= CompositingReasonReflectionWithCompositedDescendants; | 136 reasons |= CompositingReasonReflectionWithCompositedDescendants; | 
| 137 | 137 | 
| 138 ASSERT(!(reasons & ~CompositingReasonComboAllStyleDeterminedReasons)); | 138 ASSERT(!(reasons & ~CompositingReasonComboAllStyleDeterminedReasons)); | 
| 139 return reasons; | 139 return reasons; | 
| 140 } | 140 } | 
| 141 | 141 | 
| 142 bool CompositingReasonFinder::requiresCompositingForTransform(LayoutObject* layo utObject) const | 142 bool CompositingReasonFinder::requiresCompositingForTransform(LayoutObject* layo utObject) const | 
| 143 { | 143 { | 
| 144 // Note that we ask the layoutObject if it has a transform, because the styl e may have transforms, | 144 // Note that we ask the layoutObject if it has a transform, because the styl e may have transforms, | 
| 145 // but the layoutObject may be an inline that doesn't support them. | 145 // but the layoutObject may be an inline that doesn't support them. | 
| 146 return layoutObject->hasTransformRelatedProperty() && layoutObject->style()- >transform().has3DOperation(); | 146 return layoutObject->hasTransformRelatedProperty() && (layoutObject->style() ->transform().has3DOperation() || layoutObject->style()->has3DTransformPropertie s()); | 
| 
Eric Willigers
2015/06/05 01:58:23
Why not ensure hasTransformRelatedProperty returns
 
soonm
2015/06/10 04:09:32
hasTransformProperty will return True because I mo
 | |
| 147 } | 147 } | 
| 148 | 148 | 
| 149 CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons t DeprecatedPaintLayer* layer) const | 149 CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons t DeprecatedPaintLayer* layer) const | 
| 150 { | 150 { | 
| 151 CompositingReasons directReasons = CompositingReasonNone; | 151 CompositingReasons directReasons = CompositingReasonNone; | 
| 152 LayoutObject* layoutObject = layer->layoutObject(); | 152 LayoutObject* layoutObject = layer->layoutObject(); | 
| 153 | 153 | 
| 154 if (hasOverflowScrollTrigger()) { | 154 if (hasOverflowScrollTrigger()) { | 
| 155 if (layer->clipParent()) | 155 if (layer->clipParent()) | 
| 156 directReasons |= CompositingReasonOutOfFlowClipping; | 156 directReasons |= CompositingReasonOutOfFlowClipping; | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 // Either way, we don't need to require compositing for scroll block s on. This avoids | 230 // Either way, we don't need to require compositing for scroll block s on. This avoids | 
| 231 // enabling compositing by default, and avoids cluttering the root l ayers compositing reasons. | 231 // enabling compositing by default, and avoids cluttering the root l ayers compositing reasons. | 
| 232 return false; | 232 return false; | 
| 233 } | 233 } | 
| 234 } | 234 } | 
| 235 | 235 | 
| 236 return true; | 236 return true; | 
| 237 } | 237 } | 
| 238 | 238 | 
| 239 } | 239 } | 
| OLD | NEW |