| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 diff.setTransformChanged(); | 460 diff.setTransformChanged(); |
| 461 | 461 |
| 462 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity
) | 462 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity
) |
| 463 diff.setOpacityChanged(); | 463 diff.setOpacityChanged(); |
| 464 | 464 |
| 465 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt
er) | 465 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt
er) |
| 466 diff.setFilterChanged(); | 466 diff.setFilterChanged(); |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 void RenderStyle::addCursor(PassRefPtr<StyleImage> image, const IntPoint& hotSpo
t) | |
| 471 { | |
| 472 if (!rareInheritedData.access()->cursorData) | |
| 473 rareInheritedData.access()->cursorData = CursorList::create(); | |
| 474 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpot)); | |
| 475 } | |
| 476 | |
| 477 void RenderStyle::setCursorList(PassRefPtr<CursorList> other) | |
| 478 { | |
| 479 rareInheritedData.access()->cursorData = other; | |
| 480 } | |
| 481 | |
| 482 void RenderStyle::setQuotes(PassRefPtr<QuotesData> q) | 470 void RenderStyle::setQuotes(PassRefPtr<QuotesData> q) |
| 483 { | 471 { |
| 484 rareInheritedData.access()->quotes = q; | 472 rareInheritedData.access()->quotes = q; |
| 485 } | 473 } |
| 486 | 474 |
| 487 void RenderStyle::clearCursorList() | |
| 488 { | |
| 489 if (rareInheritedData->cursorData) | |
| 490 rareInheritedData.access()->cursorData = nullptr; | |
| 491 } | |
| 492 | |
| 493 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) | 475 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) |
| 494 { | 476 { |
| 495 // transform-origin brackets the transform with translate operations. | 477 // transform-origin brackets the transform with translate operations. |
| 496 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant | 478 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant |
| 497 // in that case. | 479 // in that case. |
| 498 if (applyOrigin != RenderStyle::IncludeTransformOrigin) | 480 if (applyOrigin != RenderStyle::IncludeTransformOrigin) |
| 499 return false; | 481 return false; |
| 500 | 482 |
| 501 unsigned size = transformOperations.size(); | 483 unsigned size = transformOperations.size(); |
| 502 for (unsigned i = 0; i < size; ++i) { | 484 for (unsigned i = 0; i < size; ++i) { |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 // right | 1168 // right |
| 1187 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1169 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1188 if (radiiSum > rect.height()) | 1170 if (radiiSum > rect.height()) |
| 1189 factor = std::min(rect.height() / radiiSum, factor); | 1171 factor = std::min(rect.height() / radiiSum, factor); |
| 1190 | 1172 |
| 1191 ASSERT(factor <= 1); | 1173 ASSERT(factor <= 1); |
| 1192 return factor; | 1174 return factor; |
| 1193 } | 1175 } |
| 1194 | 1176 |
| 1195 } // namespace blink | 1177 } // namespace blink |
| OLD | NEW |