Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 4 * reserved. | 4 * reserved. |
| 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1200 } | 1200 } |
| 1201 } | 1201 } |
| 1202 return false; | 1202 return false; |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 void ComputedStyle::updateIsStackingContext(bool isDocumentElement, | 1205 void ComputedStyle::updateIsStackingContext(bool isDocumentElement, |
| 1206 bool isInTopLayer) { | 1206 bool isInTopLayer) { |
| 1207 if (isStackingContext()) | 1207 if (isStackingContext()) |
| 1208 return; | 1208 return; |
| 1209 | 1209 |
| 1210 // Used value of transform-style other than 'flat' already forces stacking | |
|
chrishtr
2016/11/29 04:54:02
Suggest rephrasing for clarity:
"Force a stacking
trchen
2016/11/30 01:26:23
Done.
| |
| 1211 // context. This line checks the computed value in addition to used value to | |
| 1212 // match behavior prior to M53. More info at crbug.com/663650 . | |
| 1213 if (transformStyle3D() == TransformStyle3DPreserve3D) { | |
| 1214 setIsStackingContext(true); | |
| 1215 return; | |
| 1216 } | |
| 1217 | |
| 1210 if (isDocumentElement || isInTopLayer || styleType() == PseudoIdBackdrop || | 1218 if (isDocumentElement || isInTopLayer || styleType() == PseudoIdBackdrop || |
| 1211 hasOpacity() || hasTransformRelatedProperty() || hasMask() || | 1219 hasOpacity() || hasTransformRelatedProperty() || hasMask() || |
| 1212 clipPath() || boxReflect() || hasFilterInducingProperty() || | 1220 clipPath() || boxReflect() || hasFilterInducingProperty() || |
| 1213 hasBackdropFilter() || hasBlendMode() || hasIsolation() || | 1221 hasBackdropFilter() || hasBlendMode() || hasIsolation() || |
| 1214 hasViewportConstrainedPosition() || | 1222 hasViewportConstrainedPosition() || |
| 1215 hasPropertyThatCreatesStackingContext(willChangeProperties()) || | 1223 hasPropertyThatCreatesStackingContext(willChangeProperties()) || |
| 1216 containsPaint()) { | 1224 containsPaint()) { |
| 1217 setIsStackingContext(true); | 1225 setIsStackingContext(true); |
| 1218 } | 1226 } |
| 1219 } | 1227 } |
| (...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2445 if (value < 0) | 2453 if (value < 0) |
| 2446 fvalue -= 0.5f; | 2454 fvalue -= 0.5f; |
| 2447 else | 2455 else |
| 2448 fvalue += 0.5f; | 2456 fvalue += 0.5f; |
| 2449 } | 2457 } |
| 2450 | 2458 |
| 2451 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2459 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2452 } | 2460 } |
| 2453 | 2461 |
| 2454 } // namespace blink | 2462 } // namespace blink |
| OLD | NEW |