| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 if (dependenceOnContentHeightHasChanged(*this, other)) | 565 if (dependenceOnContentHeightHasChanged(*this, other)) |
| 566 diff.setNeedsFullLayout(); | 566 diff.setNeedsFullLayout(); |
| 567 else | 567 else |
| 568 diff.setNeedsPositionedMovementLayout(); | 568 diff.setNeedsPositionedMovementLayout(); |
| 569 } | 569 } |
| 570 | 570 |
| 571 if (diffNeedsPaintInvalidationSubtree(other)) | 571 if (diffNeedsPaintInvalidationSubtree(other)) |
| 572 diff.setNeedsPaintInvalidationSubtree(); | 572 diff.setNeedsPaintInvalidationSubtree(); |
| 573 else if (diffNeedsPaintInvalidationObject(other)) | 573 else if (diffNeedsPaintInvalidationObject(other)) |
| 574 diff.setNeedsPaintInvalidationObject(); | 574 diff.setNeedsPaintInvalidationObject(); |
| 575 else if (diffNeedsPaintInvalidationSelection(other)) |
| 576 diff.setNeedsPaintInvalidationSelection(); |
| 575 | 577 |
| 576 updatePropertySpecificDifferences(other, diff); | 578 updatePropertySpecificDifferences(other, diff); |
| 577 | 579 |
| 578 // The following condition needs to be at last, because it may depend on | 580 // The following condition needs to be at last, because it may depend on |
| 579 // conditions in diff computed above. | 581 // conditions in diff computed above. |
| 580 if (scrollAnchorDisablingPropertyChanged(other, diff)) | 582 if (scrollAnchorDisablingPropertyChanged(other, diff)) |
| 581 diff.setScrollAnchorDisablingPropertyChanged(); | 583 diff.setScrollAnchorDisablingPropertyChanged(); |
| 582 | 584 |
| 583 // Cursors are not checked, since they will be set appropriately in response | 585 // Cursors are not checked, since they will be set appropriately in response |
| 584 // to mouse events, so they don't need to cause any paint invalidation or | 586 // to mouse events, so they don't need to cause any paint invalidation or |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 for (const AtomicString& property : | 1015 for (const AtomicString& property : |
| 1014 *value->customInvalidationProperties()) { | 1016 *value->customInvalidationProperties()) { |
| 1015 if (!dataEquivalent(getVariable(property), other.getVariable(property))) | 1017 if (!dataEquivalent(getVariable(property), other.getVariable(property))) |
| 1016 return true; | 1018 return true; |
| 1017 } | 1019 } |
| 1018 } | 1020 } |
| 1019 | 1021 |
| 1020 return false; | 1022 return false; |
| 1021 } | 1023 } |
| 1022 | 1024 |
| 1025 bool ComputedStyle::diffNeedsPaintInvalidationSelection( |
| 1026 const ComputedStyle& other) const { |
| 1027 return hasPseudoStyle(PseudoIdSelection) || |
| 1028 other.hasPseudoStyle(PseudoIdSelection); |
| 1029 } |
| 1030 |
| 1023 void ComputedStyle::updatePropertySpecificDifferences( | 1031 void ComputedStyle::updatePropertySpecificDifferences( |
| 1024 const ComputedStyle& other, | 1032 const ComputedStyle& other, |
| 1025 StyleDifference& diff) const { | 1033 StyleDifference& diff) const { |
| 1026 if (m_box->zIndex() != other.m_box->zIndex() || | 1034 if (m_box->zIndex() != other.m_box->zIndex() || |
| 1027 isStackingContext() != other.isStackingContext()) | 1035 isStackingContext() != other.isStackingContext()) |
| 1028 diff.setZIndexChanged(); | 1036 diff.setZIndexChanged(); |
| 1029 | 1037 |
| 1030 if (m_rareNonInheritedData.get() != other.m_rareNonInheritedData.get()) { | 1038 if (m_rareNonInheritedData.get() != other.m_rareNonInheritedData.get()) { |
| 1031 if (!transformDataEquivalent(other) || | 1039 if (!transformDataEquivalent(other) || |
| 1032 m_rareNonInheritedData->m_perspective != | 1040 m_rareNonInheritedData->m_perspective != |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2470 if (value < 0) | 2478 if (value < 0) |
| 2471 fvalue -= 0.5f; | 2479 fvalue -= 0.5f; |
| 2472 else | 2480 else |
| 2473 fvalue += 0.5f; | 2481 fvalue += 0.5f; |
| 2474 } | 2482 } |
| 2475 | 2483 |
| 2476 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2484 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2477 } | 2485 } |
| 2478 | 2486 |
| 2479 } // namespace blink | 2487 } // namespace blink |
| OLD | NEW |