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

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

Issue 2481553002: Move outline out of StyleBackgroundData into StyleRareNonInheritedData (Closed)
Patch Set: - Created 4 years, 1 month 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 m_rareNonInheritedData->m_maskBoxImage != 956 m_rareNonInheritedData->m_maskBoxImage !=
957 other.m_rareNonInheritedData->m_maskBoxImage) 957 other.m_rareNonInheritedData->m_maskBoxImage)
958 return true; 958 return true;
959 } 959 }
960 960
961 return false; 961 return false;
962 } 962 }
963 963
964 bool ComputedStyle::diffNeedsPaintInvalidationObject( 964 bool ComputedStyle::diffNeedsPaintInvalidationObject(
965 const ComputedStyle& other) const { 965 const ComputedStyle& other) const {
966 if (!m_background->outline().visuallyEqual(other.m_background->outline()))
967 return true;
968
969 if (visibility() != other.visibility() || 966 if (visibility() != other.visibility() ||
970 m_inheritedData.m_printColorAdjust != 967 m_inheritedData.m_printColorAdjust !=
971 other.m_inheritedData.m_printColorAdjust || 968 other.m_inheritedData.m_printColorAdjust ||
972 m_inheritedData.m_insideLink != other.m_inheritedData.m_insideLink || 969 m_inheritedData.m_insideLink != other.m_inheritedData.m_insideLink ||
973 !m_surround->border.visuallyEqual(other.m_surround->border) || 970 !m_surround->border.visuallyEqual(other.m_surround->border) ||
974 !m_background->visuallyEqual(*other.m_background)) 971 *m_background != *other.m_background)
975 return true; 972 return true;
976 973
977 if (m_rareInheritedData.get() != other.m_rareInheritedData.get()) { 974 if (m_rareInheritedData.get() != other.m_rareInheritedData.get()) {
978 if (m_rareInheritedData->userModify != 975 if (m_rareInheritedData->userModify !=
979 other.m_rareInheritedData->userModify || 976 other.m_rareInheritedData->userModify ||
980 m_rareInheritedData->userSelect != 977 m_rareInheritedData->userSelect !=
981 other.m_rareInheritedData->userSelect || 978 other.m_rareInheritedData->userSelect ||
982 m_rareInheritedData->m_imageRendering != 979 m_rareInheritedData->m_imageRendering !=
983 other.m_rareInheritedData->m_imageRendering) 980 other.m_rareInheritedData->m_imageRendering)
984 return true; 981 return true;
985 } 982 }
986 983
987 if (m_rareNonInheritedData.get() != other.m_rareNonInheritedData.get()) { 984 if (m_rareNonInheritedData.get() != other.m_rareNonInheritedData.get()) {
988 if (m_rareNonInheritedData->userDrag != 985 if (m_rareNonInheritedData->userDrag !=
989 other.m_rareNonInheritedData->userDrag || 986 other.m_rareNonInheritedData->userDrag ||
990 m_rareNonInheritedData->m_objectFit != 987 m_rareNonInheritedData->m_objectFit !=
991 other.m_rareNonInheritedData->m_objectFit || 988 other.m_rareNonInheritedData->m_objectFit ||
992 m_rareNonInheritedData->m_objectPosition != 989 m_rareNonInheritedData->m_objectPosition !=
993 other.m_rareNonInheritedData->m_objectPosition || 990 other.m_rareNonInheritedData->m_objectPosition ||
994 !m_rareNonInheritedData->shadowDataEquivalent( 991 !m_rareNonInheritedData->shadowDataEquivalent(
995 *other.m_rareNonInheritedData.get()) || 992 *other.m_rareNonInheritedData.get()) ||
996 !m_rareNonInheritedData->shapeOutsideDataEquivalent( 993 !m_rareNonInheritedData->shapeOutsideDataEquivalent(
997 *other.m_rareNonInheritedData.get()) || 994 *other.m_rareNonInheritedData.get()) ||
998 !m_rareNonInheritedData->clipPathDataEquivalent( 995 !m_rareNonInheritedData->clipPathDataEquivalent(
999 *other.m_rareNonInheritedData.get()) || 996 *other.m_rareNonInheritedData.get()) ||
997 !m_rareNonInheritedData->m_outline.visuallyEqual(
998 other.m_rareNonInheritedData->m_outline) ||
1000 (visitedLinkBorderLeftColor() != other.visitedLinkBorderLeftColor() && 999 (visitedLinkBorderLeftColor() != other.visitedLinkBorderLeftColor() &&
1001 borderLeftWidth()) || 1000 borderLeftWidth()) ||
1002 (visitedLinkBorderRightColor() != other.visitedLinkBorderRightColor() && 1001 (visitedLinkBorderRightColor() != other.visitedLinkBorderRightColor() &&
1003 borderRightWidth()) || 1002 borderRightWidth()) ||
1004 (visitedLinkBorderBottomColor() != 1003 (visitedLinkBorderBottomColor() !=
1005 other.visitedLinkBorderBottomColor() && 1004 other.visitedLinkBorderBottomColor() &&
1006 borderBottomWidth()) || 1005 borderBottomWidth()) ||
1007 (visitedLinkBorderTopColor() != other.visitedLinkBorderTopColor() && 1006 (visitedLinkBorderTopColor() != other.visitedLinkBorderTopColor() &&
1008 borderTopWidth()) || 1007 borderTopWidth()) ||
1009 (visitedLinkOutlineColor() != other.visitedLinkOutlineColor() && 1008 (visitedLinkOutlineColor() != other.visitedLinkOutlineColor() &&
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 *other.m_rareNonInheritedData.get())) 1079 *other.m_rareNonInheritedData.get()))
1081 diff.setNeedsRecomputeOverflow(); 1080 diff.setNeedsRecomputeOverflow();
1082 1081
1083 if (m_rareNonInheritedData->m_backdropFilter != 1082 if (m_rareNonInheritedData->m_backdropFilter !=
1084 other.m_rareNonInheritedData->m_backdropFilter) 1083 other.m_rareNonInheritedData->m_backdropFilter)
1085 diff.setBackdropFilterChanged(); 1084 diff.setBackdropFilterChanged();
1086 1085
1087 if (!m_rareNonInheritedData->reflectionDataEquivalent( 1086 if (!m_rareNonInheritedData->reflectionDataEquivalent(
1088 *other.m_rareNonInheritedData.get())) 1087 *other.m_rareNonInheritedData.get()))
1089 diff.setFilterChanged(); 1088 diff.setFilterChanged();
1089
1090 if (!m_rareNonInheritedData->m_outline.visuallyEqual(
1091 other.m_rareNonInheritedData->m_outline))
1092 diff.setNeedsRecomputeOverflow();
1090 } 1093 }
1091 1094
1092 if (!m_background->outline().visuallyEqual(other.m_background->outline()) || 1095 if (!m_surround->border.visualOverflowEqual(other.m_surround->border))
1093 !m_surround->border.visualOverflowEqual(other.m_surround->border))
1094 diff.setNeedsRecomputeOverflow(); 1096 diff.setNeedsRecomputeOverflow();
1095 1097
1096 if (!diff.needsPaintInvalidation()) { 1098 if (!diff.needsPaintInvalidation()) {
1097 if (m_styleInheritedData->color != other.m_styleInheritedData->color || 1099 if (m_styleInheritedData->color != other.m_styleInheritedData->color ||
1098 m_styleInheritedData->visitedLinkColor != 1100 m_styleInheritedData->visitedLinkColor !=
1099 other.m_styleInheritedData->visitedLinkColor || 1101 other.m_styleInheritedData->visitedLinkColor ||
1100 m_inheritedData.m_textUnderline != 1102 m_inheritedData.m_textUnderline !=
1101 other.m_inheritedData.m_textUnderline || 1103 other.m_inheritedData.m_textUnderline ||
1102 m_visual->textDecoration != other.m_visual->textDecoration) { 1104 m_visual->textDecoration != other.m_visual->textDecoration) {
1103 diff.setTextDecorationOrColorChanged(); 1105 diff.setTextDecorationOrColorChanged();
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 if (value < 0) 2399 if (value < 0)
2398 fvalue -= 0.5f; 2400 fvalue -= 0.5f;
2399 else 2401 else
2400 fvalue += 0.5f; 2402 fvalue += 0.5f;
2401 } 2403 }
2402 2404
2403 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2405 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2404 } 2406 }
2405 2407
2406 } // namespace blink 2408 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleBackgroundData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698