| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 #include "sky/engine/config.h" | 23 #include "sky/engine/config.h" |
| 24 #include "sky/engine/core/rendering/style/RenderStyle.h" | 24 #include "sky/engine/core/rendering/style/RenderStyle.h" |
| 25 | 25 |
| 26 #include <algorithm> | 26 #include <algorithm> |
| 27 #include "gen/sky/platform/RuntimeEnabledFeatures.h" | 27 #include "gen/sky/platform/RuntimeEnabledFeatures.h" |
| 28 #include "sky/engine/core/css/resolver/StyleResolver.h" | 28 #include "sky/engine/core/css/resolver/StyleResolver.h" |
| 29 #include "sky/engine/core/rendering/RenderTheme.h" | 29 #include "sky/engine/core/rendering/RenderTheme.h" |
| 30 #include "sky/engine/core/rendering/style/AppliedTextDecoration.h" | 30 #include "sky/engine/core/rendering/style/AppliedTextDecoration.h" |
| 31 #include "sky/engine/core/rendering/style/DataEquivalency.h" | 31 #include "sky/engine/core/rendering/style/DataEquivalency.h" |
| 32 #include "sky/engine/core/rendering/style/QuotesData.h" | |
| 33 #include "sky/engine/core/rendering/style/ShadowList.h" | 32 #include "sky/engine/core/rendering/style/ShadowList.h" |
| 34 #include "sky/engine/core/rendering/style/StyleImage.h" | 33 #include "sky/engine/core/rendering/style/StyleImage.h" |
| 35 #include "sky/engine/core/rendering/style/StyleInheritedData.h" | 34 #include "sky/engine/core/rendering/style/StyleInheritedData.h" |
| 36 #include "sky/engine/platform/LengthFunctions.h" | 35 #include "sky/engine/platform/LengthFunctions.h" |
| 37 #include "sky/engine/platform/fonts/Font.h" | 36 #include "sky/engine/platform/fonts/Font.h" |
| 38 #include "sky/engine/platform/fonts/FontSelector.h" | 37 #include "sky/engine/platform/fonts/FontSelector.h" |
| 39 #include "sky/engine/platform/geometry/FloatRoundedRect.h" | 38 #include "sky/engine/platform/geometry/FloatRoundedRect.h" |
| 40 #include "sky/engine/wtf/MathExtras.h" | 39 #include "sky/engine/wtf/MathExtras.h" |
| 41 | 40 |
| 42 namespace blink { | 41 namespace blink { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 || rareInheritedData->textEmphasisCustomMark != other.rareInheritedD
ata->textEmphasisCustomMark | 368 || rareInheritedData->textEmphasisCustomMark != other.rareInheritedD
ata->textEmphasisCustomMark |
| 370 || rareInheritedData->m_textJustify != other.rareInheritedData->m_te
xtJustify | 369 || rareInheritedData->m_textJustify != other.rareInheritedData->m_te
xtJustify |
| 371 || rareInheritedData->m_textOrientation != other.rareInheritedData->
m_textOrientation | 370 || rareInheritedData->m_textOrientation != other.rareInheritedData->
m_textOrientation |
| 372 || rareInheritedData->m_tabSize != other.rareInheritedData->m_tabSiz
e | 371 || rareInheritedData->m_tabSize != other.rareInheritedData->m_tabSiz
e |
| 373 || rareInheritedData->m_lineBoxContain != other.rareInheritedData->m
_lineBoxContain | 372 || rareInheritedData->m_lineBoxContain != other.rareInheritedData->m
_lineBoxContain |
| 374 || rareInheritedData->textStrokeWidth != other.rareInheritedData->te
xtStrokeWidth) | 373 || rareInheritedData->textStrokeWidth != other.rareInheritedData->te
xtStrokeWidth) |
| 375 return true; | 374 return true; |
| 376 | 375 |
| 377 if (!rareInheritedData->shadowDataEquivalent(*other.rareInheritedData.ge
t())) | 376 if (!rareInheritedData->shadowDataEquivalent(*other.rareInheritedData.ge
t())) |
| 378 return true; | 377 return true; |
| 379 | |
| 380 if (!rareInheritedData->quotesDataEquivalent(*other.rareInheritedData.ge
t())) | |
| 381 return true; | |
| 382 } | 378 } |
| 383 | 379 |
| 384 if (inherited.get() != other.inherited.get()) { | 380 if (inherited.get() != other.inherited.get()) { |
| 385 if (inherited->line_height != other.inherited->line_height | 381 if (inherited->line_height != other.inherited->line_height |
| 386 || inherited->font != other.inherited->font | 382 || inherited->font != other.inherited->font |
| 387 || inherited->horizontal_border_spacing != other.inherited->horizont
al_border_spacing | 383 || inherited->horizontal_border_spacing != other.inherited->horizont
al_border_spacing |
| 388 || inherited->vertical_border_spacing != other.inherited->vertical_b
order_spacing) | 384 || inherited->vertical_border_spacing != other.inherited->vertical_b
order_spacing) |
| 389 return true; | 385 return true; |
| 390 } | 386 } |
| 391 | 387 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 diff.setTransformChanged(); | 446 diff.setTransformChanged(); |
| 451 | 447 |
| 452 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity
) | 448 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity
) |
| 453 diff.setOpacityChanged(); | 449 diff.setOpacityChanged(); |
| 454 | 450 |
| 455 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt
er) | 451 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt
er) |
| 456 diff.setFilterChanged(); | 452 diff.setFilterChanged(); |
| 457 } | 453 } |
| 458 } | 454 } |
| 459 | 455 |
| 460 void RenderStyle::setQuotes(PassRefPtr<QuotesData> q) | |
| 461 { | |
| 462 rareInheritedData.access()->quotes = q; | |
| 463 } | |
| 464 | |
| 465 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) | 456 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) |
| 466 { | 457 { |
| 467 // transform-origin brackets the transform with translate operations. | 458 // transform-origin brackets the transform with translate operations. |
| 468 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant | 459 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant |
| 469 // in that case. | 460 // in that case. |
| 470 if (applyOrigin != RenderStyle::IncludeTransformOrigin) | 461 if (applyOrigin != RenderStyle::IncludeTransformOrigin) |
| 471 return false; | 462 return false; |
| 472 | 463 |
| 473 unsigned size = transformOperations.size(); | 464 unsigned size = transformOperations.size(); |
| 474 for (unsigned i = 0; i < size; ++i) { | 465 for (unsigned i = 0; i < size; ++i) { |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 // right | 1142 // right |
| 1152 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1143 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1153 if (radiiSum > rect.height()) | 1144 if (radiiSum > rect.height()) |
| 1154 factor = std::min(rect.height() / radiiSum, factor); | 1145 factor = std::min(rect.height() / radiiSum, factor); |
| 1155 | 1146 |
| 1156 ASSERT(factor <= 1); | 1147 ASSERT(factor <= 1); |
| 1157 return factor; | 1148 return factor; |
| 1158 } | 1149 } |
| 1159 | 1150 |
| 1160 } // namespace blink | 1151 } // namespace blink |
| OLD | NEW |