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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 diff = m_svgStyle->diff(other.m_svgStyle.get()); | 388 diff = m_svgStyle->diff(other.m_svgStyle.get()); |
389 | 389 |
390 if ((!diff.needsFullLayout() || !diff.needsPaintInvalidation()) && diffNeeds
FullLayoutAndPaintInvalidation(other)) { | 390 if ((!diff.needsFullLayout() || !diff.needsPaintInvalidation()) && diffNeeds
FullLayoutAndPaintInvalidation(other)) { |
391 diff.setNeedsFullLayout(); | 391 diff.setNeedsFullLayout(); |
392 diff.setNeedsPaintInvalidationObject(); | 392 diff.setNeedsPaintInvalidationObject(); |
393 } | 393 } |
394 | 394 |
395 if (!diff.needsFullLayout() && diffNeedsFullLayout(other)) | 395 if (!diff.needsFullLayout() && diffNeedsFullLayout(other)) |
396 diff.setNeedsFullLayout(); | 396 diff.setNeedsFullLayout(); |
397 | 397 |
| 398 if (!diff.needsFullLayout() && surround->margin != other.surround->margin) { |
| 399 // Relative-positioned elements collapse their margins so need a full la
yout. |
| 400 if (position() == AbsolutePosition || position() == FixedPosition) |
| 401 diff.setNeedsPositionedMovementLayout(); |
| 402 else |
| 403 diff.setNeedsFullLayout(); |
| 404 } |
| 405 |
398 if (!diff.needsFullLayout() && position() != StaticPosition && surround->off
set != other.surround->offset) { | 406 if (!diff.needsFullLayout() && position() != StaticPosition && surround->off
set != other.surround->offset) { |
399 // Optimize for the case where a positioned layer is moving but not chan
ging size. | 407 // Optimize for the case where a positioned layer is moving but not chan
ging size. |
400 if (positionedObjectMovedOnly(surround->offset, other.surround->offset,
m_box->width())) | 408 if (positionedObjectMovedOnly(surround->offset, other.surround->offset,
m_box->width())) |
401 diff.setNeedsPositionedMovementLayout(); | 409 diff.setNeedsPositionedMovementLayout(); |
402 else | 410 else |
403 diff.setNeedsFullLayout(); | 411 diff.setNeedsFullLayout(); |
404 } | 412 } |
405 | 413 |
406 if (diffNeedsPaintInvalidationLayer(other)) | 414 if (diffNeedsPaintInvalidationLayer(other)) |
407 diff.setNeedsPaintInvalidationLayer(); | 415 diff.setNeedsPaintInvalidationLayer(); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 614 |
607 if (m_box->boxSizing() != other.m_box->boxSizing()) | 615 if (m_box->boxSizing() != other.m_box->boxSizing()) |
608 return true; | 616 return true; |
609 } | 617 } |
610 | 618 |
611 if (noninherited_flags.verticalAlign != other.noninherited_flags.verticalAli
gn | 619 if (noninherited_flags.verticalAlign != other.noninherited_flags.verticalAli
gn |
612 || noninherited_flags.position != other.noninherited_flags.position) | 620 || noninherited_flags.position != other.noninherited_flags.position) |
613 return true; | 621 return true; |
614 | 622 |
615 if (surround.get() != other.surround.get()) { | 623 if (surround.get() != other.surround.get()) { |
616 if (surround->margin != other.surround->margin) | |
617 return true; | |
618 | |
619 if (surround->padding != other.surround->padding) | 624 if (surround->padding != other.surround->padding) |
620 return true; | 625 return true; |
621 } | 626 } |
622 | 627 |
623 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { | 628 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { |
624 if (rareNonInheritedData->m_alignContent != other.rareNonInheritedData->
m_alignContent | 629 if (rareNonInheritedData->m_alignContent != other.rareNonInheritedData->
m_alignContent |
625 || rareNonInheritedData->m_alignItems != other.rareNonInheritedData-
>m_alignItems | 630 || rareNonInheritedData->m_alignItems != other.rareNonInheritedData-
>m_alignItems |
626 || rareNonInheritedData->m_alignSelf != other.rareNonInheritedData->
m_alignSelf) | 631 || rareNonInheritedData->m_alignSelf != other.rareNonInheritedData->
m_alignSelf) |
627 return true; | 632 return true; |
628 } | 633 } |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 horizontal || includeLogicalRightEdge); | 1754 horizontal || includeLogicalRightEdge); |
1750 | 1755 |
1751 edges[BSLeft] = BorderEdge(borderLeftWidth(), | 1756 edges[BSLeft] = BorderEdge(borderLeftWidth(), |
1752 visitedDependentColor(CSSPropertyBorderLeftColor), | 1757 visitedDependentColor(CSSPropertyBorderLeftColor), |
1753 borderLeftStyle(), | 1758 borderLeftStyle(), |
1754 borderLeftIsTransparent(), | 1759 borderLeftIsTransparent(), |
1755 !horizontal || includeLogicalLeftEdge); | 1760 !horizontal || includeLogicalLeftEdge); |
1756 } | 1761 } |
1757 | 1762 |
1758 } // namespace blink | 1763 } // namespace blink |
OLD | NEW |