| 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 StyleDifference ComputedStyle::visualInvalidationDiff( | 540 StyleDifference ComputedStyle::visualInvalidationDiff( |
| 541 const ComputedStyle& other) const { | 541 const ComputedStyle& other) const { |
| 542 // Note, we use .get() on each DataRef below because DataRef::operator== will | 542 // Note, we use .get() on each DataRef below because DataRef::operator== will |
| 543 // do a deep compare, which is duplicate work when we're going to compare each | 543 // do a deep compare, which is duplicate work when we're going to compare each |
| 544 // property inside this function anyway. | 544 // property inside this function anyway. |
| 545 | 545 |
| 546 StyleDifference diff; | 546 StyleDifference diff; |
| 547 if (m_svgStyle.get() != other.m_svgStyle.get()) | 547 if (m_svgStyle.get() != other.m_svgStyle.get()) |
| 548 diff = m_svgStyle->diff(other.m_svgStyle.get()); | 548 diff = m_svgStyle->diff(other.m_svgStyle.get()); |
| 549 | 549 |
| 550 if ((!diff.needsFullLayout() || !diff.needsPaintInvalidation()) && | 550 if ((!diff.needsFullLayout() || !diff.needsFullPaintInvalidation()) && |
| 551 diffNeedsFullLayoutAndPaintInvalidation(other)) { | 551 diffNeedsFullLayoutAndPaintInvalidation(other)) { |
| 552 diff.setNeedsFullLayout(); | 552 diff.setNeedsFullLayout(); |
| 553 diff.setNeedsPaintInvalidationObject(); | 553 diff.setNeedsPaintInvalidationObject(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 if (!diff.needsFullLayout() && diffNeedsFullLayout(other)) | 556 if (!diff.needsFullLayout() && diffNeedsFullLayout(other)) |
| 557 diff.setNeedsFullLayout(); | 557 diff.setNeedsFullLayout(); |
| 558 | 558 |
| 559 if (!diff.needsFullLayout() && | 559 if (!diff.needsFullLayout() && |
| 560 m_surround->margin != other.m_surround->margin) { | 560 m_surround->margin != other.m_surround->margin) { |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 diff.setFilterChanged(); | 1070 diff.setFilterChanged(); |
| 1071 | 1071 |
| 1072 if (!m_rareNonInheritedData->m_outline.visuallyEqual( | 1072 if (!m_rareNonInheritedData->m_outline.visuallyEqual( |
| 1073 other.m_rareNonInheritedData->m_outline)) | 1073 other.m_rareNonInheritedData->m_outline)) |
| 1074 diff.setNeedsRecomputeOverflow(); | 1074 diff.setNeedsRecomputeOverflow(); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 if (!m_surround->border.visualOverflowEqual(other.m_surround->border)) | 1077 if (!m_surround->border.visualOverflowEqual(other.m_surround->border)) |
| 1078 diff.setNeedsRecomputeOverflow(); | 1078 diff.setNeedsRecomputeOverflow(); |
| 1079 | 1079 |
| 1080 if (!diff.needsPaintInvalidation()) { | 1080 if (!diff.needsFullPaintInvalidation()) { |
| 1081 if (m_styleInheritedData->color != other.m_styleInheritedData->color || | 1081 if (m_styleInheritedData->color != other.m_styleInheritedData->color || |
| 1082 m_styleInheritedData->visitedLinkColor != | 1082 m_styleInheritedData->visitedLinkColor != |
| 1083 other.m_styleInheritedData->visitedLinkColor || | 1083 other.m_styleInheritedData->visitedLinkColor || |
| 1084 m_inheritedData.m_hasSimpleUnderline != | 1084 m_inheritedData.m_hasSimpleUnderline != |
| 1085 other.m_inheritedData.m_hasSimpleUnderline || | 1085 other.m_inheritedData.m_hasSimpleUnderline || |
| 1086 m_visual->textDecoration != other.m_visual->textDecoration) { | 1086 m_visual->textDecoration != other.m_visual->textDecoration) { |
| 1087 diff.setTextDecorationOrColorChanged(); | 1087 diff.setTextDecorationOrColorChanged(); |
| 1088 } else if (m_rareNonInheritedData.get() != | 1088 } else if (m_rareNonInheritedData.get() != |
| 1089 other.m_rareNonInheritedData.get() && | 1089 other.m_rareNonInheritedData.get() && |
| 1090 (m_rareNonInheritedData->m_textDecorationStyle != | 1090 (m_rareNonInheritedData->m_textDecorationStyle != |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 if (value < 0) | 2498 if (value < 0) |
| 2499 fvalue -= 0.5f; | 2499 fvalue -= 0.5f; |
| 2500 else | 2500 else |
| 2501 fvalue += 0.5f; | 2501 fvalue += 0.5f; |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2504 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2505 } | 2505 } |
| 2506 | 2506 |
| 2507 } // namespace blink | 2507 } // namespace blink |
| OLD | NEW |