| 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
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 { | 485 { |
| 486 rareInheritedData.access()->quotes = q; | 486 rareInheritedData.access()->quotes = q; |
| 487 } | 487 } |
| 488 | 488 |
| 489 void RenderStyle::clearCursorList() | 489 void RenderStyle::clearCursorList() |
| 490 { | 490 { |
| 491 if (rareInheritedData->cursorData) | 491 if (rareInheritedData->cursorData) |
| 492 rareInheritedData.access()->cursorData = nullptr; | 492 rareInheritedData.access()->cursorData = nullptr; |
| 493 } | 493 } |
| 494 | 494 |
| 495 bool RenderStyle::hasWillChangeCompositingHint() const | |
| 496 { | |
| 497 for (size_t i = 0; i < rareNonInheritedData->m_willChange->m_properties.size
(); ++i) { | |
| 498 switch (rareNonInheritedData->m_willChange->m_properties[i]) { | |
| 499 case CSSPropertyOpacity: | |
| 500 case CSSPropertyTransform: | |
| 501 case CSSPropertyWebkitTransform: | |
| 502 case CSSPropertyTop: | |
| 503 case CSSPropertyLeft: | |
| 504 case CSSPropertyBottom: | |
| 505 case CSSPropertyRight: | |
| 506 return true; | |
| 507 default: | |
| 508 break; | |
| 509 } | |
| 510 } | |
| 511 return false; | |
| 512 } | |
| 513 | |
| 514 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) | 495 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) |
| 515 { | 496 { |
| 516 // transform-origin brackets the transform with translate operations. | 497 // transform-origin brackets the transform with translate operations. |
| 517 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant | 498 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant |
| 518 // in that case. | 499 // in that case. |
| 519 if (applyOrigin != RenderStyle::IncludeTransformOrigin) | 500 if (applyOrigin != RenderStyle::IncludeTransformOrigin) |
| 520 return false; | 501 return false; |
| 521 | 502 |
| 522 unsigned size = transformOperations.size(); | 503 unsigned size = transformOperations.size(); |
| 523 for (unsigned i = 0; i < size; ++i) { | 504 for (unsigned i = 0; i < size; ++i) { |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 // right | 1188 // right |
| 1208 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1189 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1209 if (radiiSum > rect.height()) | 1190 if (radiiSum > rect.height()) |
| 1210 factor = std::min(rect.height() / radiiSum, factor); | 1191 factor = std::min(rect.height() / radiiSum, factor); |
| 1211 | 1192 |
| 1212 ASSERT(factor <= 1); | 1193 ASSERT(factor <= 1); |
| 1213 return factor; | 1194 return factor; |
| 1214 } | 1195 } |
| 1215 | 1196 |
| 1216 } // namespace blink | 1197 } // namespace blink |
| OLD | NEW |