Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2767783003: Incorporate ComputedStyle::hasTransform when diffing transform styles. (Closed)
Patch Set: Sync to head. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 } 1020 }
1021 1021
1022 void ComputedStyle::updatePropertySpecificDifferences( 1022 void ComputedStyle::updatePropertySpecificDifferences(
1023 const ComputedStyle& other, 1023 const ComputedStyle& other,
1024 StyleDifference& diff) const { 1024 StyleDifference& diff) const {
1025 if (m_box->zIndex() != other.m_box->zIndex() || 1025 if (m_box->zIndex() != other.m_box->zIndex() ||
1026 isStackingContext() != other.isStackingContext()) 1026 isStackingContext() != other.isStackingContext())
1027 diff.setZIndexChanged(); 1027 diff.setZIndexChanged();
1028 1028
1029 if (m_rareNonInheritedData.get() != other.m_rareNonInheritedData.get()) { 1029 if (m_rareNonInheritedData.get() != other.m_rareNonInheritedData.get()) {
1030 if (!transformDataEquivalent(other) || 1030 // It's possible for the old and new style transform data to be equivalent
1031 // while hasTransform() differs, as it checks a number of conditions aside
1032 // from just the matrix, including but not limited to animation state.
1033 if (hasTransform() != other.hasTransform() ||
1034 !transformDataEquivalent(other) ||
1031 m_rareNonInheritedData->m_perspective != 1035 m_rareNonInheritedData->m_perspective !=
1032 other.m_rareNonInheritedData->m_perspective || 1036 other.m_rareNonInheritedData->m_perspective ||
1033 m_rareNonInheritedData->m_perspectiveOrigin != 1037 m_rareNonInheritedData->m_perspectiveOrigin !=
1034 other.m_rareNonInheritedData->m_perspectiveOrigin) 1038 other.m_rareNonInheritedData->m_perspectiveOrigin)
1035 diff.setTransformChanged(); 1039 diff.setTransformChanged();
1036 1040
1037 if (m_rareNonInheritedData->opacity != 1041 if (m_rareNonInheritedData->opacity !=
1038 other.m_rareNonInheritedData->opacity) 1042 other.m_rareNonInheritedData->opacity)
1039 diff.setOpacityChanged(); 1043 diff.setOpacityChanged();
1040 1044
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2498 if (value < 0) 2502 if (value < 0)
2499 fvalue -= 0.5f; 2503 fvalue -= 0.5f;
2500 else 2504 else
2501 fvalue += 0.5f; 2505 fvalue += 0.5f;
2502 } 2506 }
2503 2507
2504 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2508 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2505 } 2509 }
2506 2510
2507 } // namespace blink 2511 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698