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

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

Issue 2759343002: Generate inherited nonproperties insideLink and hasSimpleUnderline. (Closed)
Patch Set: Rebase 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // re-create the same structure for an accurate size comparison. 72 // re-create the same structure for an accurate size comparison.
73 struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> { 73 struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
74 struct ComputedStyleBase { 74 struct ComputedStyleBase {
75 unsigned m_bitfields[4]; 75 unsigned m_bitfields[4];
76 } m_base; 76 } m_base;
77 77
78 void* dataRefs[7]; 78 void* dataRefs[7];
79 void* ownPtrs[1]; 79 void* ownPtrs[1];
80 void* dataRefSvgStyle; 80 void* dataRefSvgStyle;
81 81
82 struct InheritedData {
83 unsigned m_bitfields[1];
84 } m_inheritedData;
85
86 struct NonInheritedData { 82 struct NonInheritedData {
87 unsigned m_bitfields[1]; 83 unsigned m_bitfields[1];
88 } m_nonInheritedData; 84 } m_nonInheritedData;
89 }; 85 };
90 86
91 // If this assert fails, it means that size of ComputedStyle has changed. Please 87 // If this assert fails, it means that size of ComputedStyle has changed. Please
92 // check that you really *do* what to increase the size of ComputedStyle, then 88 // check that you really *do* what to increase the size of ComputedStyle, then
93 // update the SameSizeAsComputedStyle struct to match the updated storage of 89 // update the SameSizeAsComputedStyle struct to match the updated storage of
94 // ComputedStyle. 90 // ComputedStyle.
95 ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle); 91 ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 : ComputedStyleBase(o), 142 : ComputedStyleBase(o),
147 RefCounted<ComputedStyle>(), 143 RefCounted<ComputedStyle>(),
148 m_box(o.m_box), 144 m_box(o.m_box),
149 m_visual(o.m_visual), 145 m_visual(o.m_visual),
150 m_background(o.m_background), 146 m_background(o.m_background),
151 m_surround(o.m_surround), 147 m_surround(o.m_surround),
152 m_rareNonInheritedData(o.m_rareNonInheritedData), 148 m_rareNonInheritedData(o.m_rareNonInheritedData),
153 m_rareInheritedData(o.m_rareInheritedData), 149 m_rareInheritedData(o.m_rareInheritedData),
154 m_styleInheritedData(o.m_styleInheritedData), 150 m_styleInheritedData(o.m_styleInheritedData),
155 m_svgStyle(o.m_svgStyle), 151 m_svgStyle(o.m_svgStyle),
156 m_inheritedData(o.m_inheritedData),
157 m_nonInheritedData(o.m_nonInheritedData) {} 152 m_nonInheritedData(o.m_nonInheritedData) {}
158 153
159 static StyleRecalcChange diffPseudoStyles(const ComputedStyle& oldStyle, 154 static StyleRecalcChange diffPseudoStyles(const ComputedStyle& oldStyle,
160 const ComputedStyle& newStyle) { 155 const ComputedStyle& newStyle) {
161 // If the pseudoStyles have changed, ensure layoutObject triggers setStyle. 156 // If the pseudoStyles have changed, ensure layoutObject triggers setStyle.
162 if (!oldStyle.hasAnyPublicPseudoStyles() && 157 if (!oldStyle.hasAnyPublicPseudoStyles() &&
163 !newStyle.hasAnyPublicPseudoStyles()) 158 !newStyle.hasAnyPublicPseudoStyles())
164 return NoChange; 159 return NoChange;
165 for (PseudoId pseudoId = FirstPublicPseudoId; 160 for (PseudoId pseudoId = FirstPublicPseudoId;
166 pseudoId < FirstInternalPseudoId; 161 pseudoId < FirstInternalPseudoId;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (isAtShadowBoundary == AtShadowBoundary) { 323 if (isAtShadowBoundary == AtShadowBoundary) {
329 // Even if surrounding content is user-editable, shadow DOM should act as a 324 // Even if surrounding content is user-editable, shadow DOM should act as a
330 // single unit, and not necessarily be editable 325 // single unit, and not necessarily be editable
331 EUserModify currentUserModify = userModify(); 326 EUserModify currentUserModify = userModify();
332 m_rareInheritedData = inheritParent.m_rareInheritedData; 327 m_rareInheritedData = inheritParent.m_rareInheritedData;
333 setUserModify(currentUserModify); 328 setUserModify(currentUserModify);
334 } else { 329 } else {
335 m_rareInheritedData = inheritParent.m_rareInheritedData; 330 m_rareInheritedData = inheritParent.m_rareInheritedData;
336 } 331 }
337 m_styleInheritedData = inheritParent.m_styleInheritedData; 332 m_styleInheritedData = inheritParent.m_styleInheritedData;
338 m_inheritedData = inheritParent.m_inheritedData;
339 if (m_svgStyle != inheritParent.m_svgStyle) 333 if (m_svgStyle != inheritParent.m_svgStyle)
340 m_svgStyle.access()->inheritFrom(inheritParent.m_svgStyle.get()); 334 m_svgStyle.access()->inheritFrom(inheritParent.m_svgStyle.get());
341 } 335 }
342 336
343 void ComputedStyle::copyNonInheritedFromCached(const ComputedStyle& other) { 337 void ComputedStyle::copyNonInheritedFromCached(const ComputedStyle& other) {
344 ComputedStyleBase::copyNonInheritedFromCached(other); 338 ComputedStyleBase::copyNonInheritedFromCached(other);
345 m_box = other.m_box; 339 m_box = other.m_box;
346 m_visual = other.m_visual; 340 m_visual = other.m_visual;
347 m_background = other.m_background; 341 m_background = other.m_background;
348 m_surround = other.m_surround; 342 m_surround = other.m_surround;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 464 }
471 465
472 bool ComputedStyle::independentInheritedEqual( 466 bool ComputedStyle::independentInheritedEqual(
473 const ComputedStyle& other) const { 467 const ComputedStyle& other) const {
474 return ComputedStyleBase::independentInheritedEqual(other); 468 return ComputedStyleBase::independentInheritedEqual(other);
475 } 469 }
476 470
477 bool ComputedStyle::nonIndependentInheritedEqual( 471 bool ComputedStyle::nonIndependentInheritedEqual(
478 const ComputedStyle& other) const { 472 const ComputedStyle& other) const {
479 return ComputedStyleBase::nonIndependentInheritedEqual(other) && 473 return ComputedStyleBase::nonIndependentInheritedEqual(other) &&
480 m_inheritedData == other.m_inheritedData &&
481 m_styleInheritedData == other.m_styleInheritedData && 474 m_styleInheritedData == other.m_styleInheritedData &&
482 m_svgStyle->inheritedEqual(*other.m_svgStyle) && 475 m_svgStyle->inheritedEqual(*other.m_svgStyle) &&
483 m_rareInheritedData == other.m_rareInheritedData; 476 m_rareInheritedData == other.m_rareInheritedData;
484 } 477 }
485 478
486 bool ComputedStyle::loadingCustomFontsEqual(const ComputedStyle& other) const { 479 bool ComputedStyle::loadingCustomFontsEqual(const ComputedStyle& other) const {
487 return font().loadingCustomFonts() == other.font().loadingCustomFonts(); 480 return font().loadingCustomFonts() == other.font().loadingCustomFonts();
488 } 481 }
489 482
490 bool ComputedStyle::nonInheritedEqual(const ComputedStyle& other) const { 483 bool ComputedStyle::nonInheritedEqual(const ComputedStyle& other) const {
491 // compare everything except the pseudoStyle pointer 484 // compare everything except the pseudoStyle pointer
492 return ComputedStyleBase::nonInheritedEqual(other) && 485 return ComputedStyleBase::nonInheritedEqual(other) &&
493 m_nonInheritedData == other.m_nonInheritedData && 486 m_nonInheritedData == other.m_nonInheritedData &&
494 m_box == other.m_box && m_visual == other.m_visual && 487 m_box == other.m_box && m_visual == other.m_visual &&
495 m_background == other.m_background && m_surround == other.m_surround && 488 m_background == other.m_background && m_surround == other.m_surround &&
496 m_rareNonInheritedData == other.m_rareNonInheritedData && 489 m_rareNonInheritedData == other.m_rareNonInheritedData &&
497 m_svgStyle->nonInheritedEqual(*other.m_svgStyle); 490 m_svgStyle->nonInheritedEqual(*other.m_svgStyle);
498 } 491 }
499 492
500 bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const { 493 bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const {
501 // This is a fast check that only looks if the data structures are shared. 494 // This is a fast check that only looks if the data structures are shared.
502 // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method? 495 // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method?
503 return ComputedStyleBase::inheritedEqual(other) && 496 return ComputedStyleBase::inheritedEqual(other) &&
504 m_inheritedData == other.m_inheritedData &&
505 m_styleInheritedData.get() == other.m_styleInheritedData.get() && 497 m_styleInheritedData.get() == other.m_styleInheritedData.get() &&
506 m_svgStyle.get() == other.m_svgStyle.get() && 498 m_svgStyle.get() == other.m_svgStyle.get() &&
507 m_rareInheritedData.get() == other.m_rareInheritedData.get(); 499 m_rareInheritedData.get() == other.m_rareInheritedData.get();
508 } 500 }
509 501
510 static bool dependenceOnContentHeightHasChanged(const ComputedStyle& a, 502 static bool dependenceOnContentHeightHasChanged(const ComputedStyle& a,
511 const ComputedStyle& b) { 503 const ComputedStyle& b) {
512 // If top or bottom become auto/non-auto then it means we either have to solve 504 // If top or bottom become auto/non-auto then it means we either have to solve
513 // height based on the content or stop doing so 505 // height based on the content or stop doing so
514 // (http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-height) 506 // (http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-height)
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 return true; 899 return true;
908 } 900 }
909 901
910 return false; 902 return false;
911 } 903 }
912 904
913 bool ComputedStyle::diffNeedsPaintInvalidationObject( 905 bool ComputedStyle::diffNeedsPaintInvalidationObject(
914 const ComputedStyle& other) const { 906 const ComputedStyle& other) const {
915 if (visibility() != other.visibility() || 907 if (visibility() != other.visibility() ||
916 printColorAdjust() != other.printColorAdjust() || 908 printColorAdjust() != other.printColorAdjust() ||
917 m_inheritedData.m_insideLink != other.m_inheritedData.m_insideLink || 909 insideLink() != other.insideLink() ||
918 !m_surround->border.visuallyEqual(other.m_surround->border) || 910 !m_surround->border.visuallyEqual(other.m_surround->border) ||
919 *m_background != *other.m_background) 911 *m_background != *other.m_background)
920 return true; 912 return true;
921 913
922 if (m_rareInheritedData.get() != other.m_rareInheritedData.get()) { 914 if (m_rareInheritedData.get() != other.m_rareInheritedData.get()) {
923 if (m_rareInheritedData->userModify != 915 if (m_rareInheritedData->userModify !=
924 other.m_rareInheritedData->userModify || 916 other.m_rareInheritedData->userModify ||
925 m_rareInheritedData->userSelect != 917 m_rareInheritedData->userSelect !=
926 other.m_rareInheritedData->userSelect || 918 other.m_rareInheritedData->userSelect ||
927 m_rareInheritedData->m_imageRendering != 919 m_rareInheritedData->m_imageRendering !=
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 diff.setNeedsRecomputeOverflow(); 1051 diff.setNeedsRecomputeOverflow();
1060 } 1052 }
1061 1053
1062 if (!m_surround->border.visualOverflowEqual(other.m_surround->border)) 1054 if (!m_surround->border.visualOverflowEqual(other.m_surround->border))
1063 diff.setNeedsRecomputeOverflow(); 1055 diff.setNeedsRecomputeOverflow();
1064 1056
1065 if (!diff.needsFullPaintInvalidation()) { 1057 if (!diff.needsFullPaintInvalidation()) {
1066 if (m_styleInheritedData->color != other.m_styleInheritedData->color || 1058 if (m_styleInheritedData->color != other.m_styleInheritedData->color ||
1067 m_styleInheritedData->visitedLinkColor != 1059 m_styleInheritedData->visitedLinkColor !=
1068 other.m_styleInheritedData->visitedLinkColor || 1060 other.m_styleInheritedData->visitedLinkColor ||
1069 m_inheritedData.m_hasSimpleUnderline != 1061 m_hasSimpleUnderline != other.m_hasSimpleUnderline ||
1070 other.m_inheritedData.m_hasSimpleUnderline ||
1071 m_visual->textDecoration != other.m_visual->textDecoration) { 1062 m_visual->textDecoration != other.m_visual->textDecoration) {
1072 diff.setTextDecorationOrColorChanged(); 1063 diff.setTextDecorationOrColorChanged();
1073 } else if (m_rareNonInheritedData.get() != 1064 } else if (m_rareNonInheritedData.get() !=
1074 other.m_rareNonInheritedData.get() && 1065 other.m_rareNonInheritedData.get() &&
1075 (m_rareNonInheritedData->m_textDecorationStyle != 1066 (m_rareNonInheritedData->m_textDecorationStyle !=
1076 other.m_rareNonInheritedData->m_textDecorationStyle || 1067 other.m_rareNonInheritedData->m_textDecorationStyle ||
1077 m_rareNonInheritedData->m_textDecorationColor != 1068 m_rareNonInheritedData->m_textDecorationColor !=
1078 other.m_rareNonInheritedData->m_textDecorationColor || 1069 other.m_rareNonInheritedData->m_textDecorationColor ||
1079 m_rareNonInheritedData->m_visitedLinkTextDecorationColor != 1070 m_rareNonInheritedData->m_visitedLinkTextDecorationColor !=
1080 other.m_rareNonInheritedData 1071 other.m_rareNonInheritedData
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 return getFontDescription().hasSizeAdjust(); 1694 return getFontDescription().hasSizeAdjust();
1704 } 1695 }
1705 FontWeight ComputedStyle::fontWeight() const { 1696 FontWeight ComputedStyle::fontWeight() const {
1706 return getFontDescription().weight(); 1697 return getFontDescription().weight();
1707 } 1698 }
1708 FontStretch ComputedStyle::fontStretch() const { 1699 FontStretch ComputedStyle::fontStretch() const {
1709 return getFontDescription().stretch(); 1700 return getFontDescription().stretch();
1710 } 1701 }
1711 1702
1712 TextDecoration ComputedStyle::textDecorationsInEffect() const { 1703 TextDecoration ComputedStyle::textDecorationsInEffect() const {
1713 if (m_inheritedData.m_hasSimpleUnderline) 1704 if (m_hasSimpleUnderline)
1714 return TextDecorationUnderline; 1705 return TextDecorationUnderline;
1715 if (!m_rareInheritedData->appliedTextDecorations) 1706 if (!m_rareInheritedData->appliedTextDecorations)
1716 return TextDecorationNone; 1707 return TextDecorationNone;
1717 1708
1718 int decorations = 0; 1709 int decorations = 0;
1719 1710
1720 const Vector<AppliedTextDecoration>& applied = appliedTextDecorations(); 1711 const Vector<AppliedTextDecoration>& applied = appliedTextDecorations();
1721 1712
1722 for (size_t i = 0; i < applied.size(); ++i) 1713 for (size_t i = 0; i < applied.size(); ++i)
1723 decorations |= applied[i].lines(); 1714 decorations |= applied[i].lines();
1724 1715
1725 return static_cast<TextDecoration>(decorations); 1716 return static_cast<TextDecoration>(decorations);
1726 } 1717 }
1727 1718
1728 const Vector<AppliedTextDecoration>& ComputedStyle::appliedTextDecorations() 1719 const Vector<AppliedTextDecoration>& ComputedStyle::appliedTextDecorations()
1729 const { 1720 const {
1730 if (m_inheritedData.m_hasSimpleUnderline) { 1721 if (m_hasSimpleUnderline) {
1731 DEFINE_STATIC_LOCAL( 1722 DEFINE_STATIC_LOCAL(
1732 Vector<AppliedTextDecoration>, underline, 1723 Vector<AppliedTextDecoration>, underline,
1733 (1, AppliedTextDecoration( 1724 (1, AppliedTextDecoration(
1734 TextDecorationUnderline, TextDecorationStyleSolid, 1725 TextDecorationUnderline, TextDecorationStyleSolid,
1735 visitedDependentColor(CSSPropertyTextDecorationColor)))); 1726 visitedDependentColor(CSSPropertyTextDecorationColor))));
1736 // Since we only have one of these in memory, just update the color before 1727 // Since we only have one of these in memory, just update the color before
1737 // returning. 1728 // returning.
1738 underline.at(0).setColor( 1729 underline.at(0).setColor(
1739 visitedDependentColor(CSSPropertyTextDecorationColor)); 1730 visitedDependentColor(CSSPropertyTextDecorationColor));
1740 return underline; 1731 return underline;
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 DCHECK(list); 1996 DCHECK(list);
2006 if (!list->hasOneRef()) 1997 if (!list->hasOneRef())
2007 list = list->copy(); 1998 list = list->copy();
2008 1999
2009 for (size_t i = 0; i < list->size(); ++i) 2000 for (size_t i = 0; i < list->size(); ++i)
2010 list->at(i).setColor(overrideColor); 2001 list->at(i).setColor(overrideColor);
2011 } 2002 }
2012 2003
2013 void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor, 2004 void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor,
2014 bool overrideExistingColors) { 2005 bool overrideExistingColors) {
2015 if (getTextDecoration() == TextDecorationNone && 2006 if (getTextDecoration() == TextDecorationNone && !m_hasSimpleUnderline &&
2016 !m_inheritedData.m_hasSimpleUnderline &&
2017 !m_rareInheritedData->appliedTextDecorations) 2007 !m_rareInheritedData->appliedTextDecorations)
2018 return; 2008 return;
2019 2009
2020 // If there are any color changes or decorations set by this element, stop 2010 // If there are any color changes or decorations set by this element, stop
2021 // using m_hasSimpleUnderline. 2011 // using m_hasSimpleUnderline.
2022 Color currentTextDecorationColor = 2012 Color currentTextDecorationColor =
2023 visitedDependentColor(CSSPropertyTextDecorationColor); 2013 visitedDependentColor(CSSPropertyTextDecorationColor);
2024 if (m_inheritedData.m_hasSimpleUnderline && 2014 if (m_hasSimpleUnderline &&
2025 (getTextDecoration() != TextDecorationNone || 2015 (getTextDecoration() != TextDecorationNone ||
2026 currentTextDecorationColor != parentTextDecorationColor)) { 2016 currentTextDecorationColor != parentTextDecorationColor)) {
2027 m_inheritedData.m_hasSimpleUnderline = false; 2017 m_hasSimpleUnderline = false;
2028 addAppliedTextDecoration(AppliedTextDecoration(TextDecorationUnderline, 2018 addAppliedTextDecoration(AppliedTextDecoration(TextDecorationUnderline,
2029 TextDecorationStyleSolid, 2019 TextDecorationStyleSolid,
2030 parentTextDecorationColor)); 2020 parentTextDecorationColor));
2031 } 2021 }
2032 if (overrideExistingColors && m_rareInheritedData->appliedTextDecorations) 2022 if (overrideExistingColors && m_rareInheritedData->appliedTextDecorations)
2033 overrideTextDecorationColors(currentTextDecorationColor); 2023 overrideTextDecorationColors(currentTextDecorationColor);
2034 if (getTextDecoration() == TextDecorationNone) 2024 if (getTextDecoration() == TextDecorationNone)
2035 return; 2025 return;
2036 DCHECK(!m_inheritedData.m_hasSimpleUnderline); 2026 DCHECK(!m_hasSimpleUnderline);
2037 // To save memory, we don't use AppliedTextDecoration objects in the common 2027 // To save memory, we don't use AppliedTextDecoration objects in the common
2038 // case of a single simple underline of currentColor. 2028 // case of a single simple underline of currentColor.
2039 TextDecoration decorationLines = getTextDecoration(); 2029 TextDecoration decorationLines = getTextDecoration();
2040 TextDecorationStyle decorationStyle = getTextDecorationStyle(); 2030 TextDecorationStyle decorationStyle = getTextDecorationStyle();
2041 bool isSimpleUnderline = decorationLines == TextDecorationUnderline && 2031 bool isSimpleUnderline = decorationLines == TextDecorationUnderline &&
2042 decorationStyle == TextDecorationStyleSolid && 2032 decorationStyle == TextDecorationStyleSolid &&
2043 textDecorationColor().isCurrentColor(); 2033 textDecorationColor().isCurrentColor();
2044 if (isSimpleUnderline && !m_rareInheritedData->appliedTextDecorations) { 2034 if (isSimpleUnderline && !m_rareInheritedData->appliedTextDecorations) {
2045 m_inheritedData.m_hasSimpleUnderline = true; 2035 m_hasSimpleUnderline = true;
2046 return; 2036 return;
2047 } 2037 }
2048 2038
2049 addAppliedTextDecoration(AppliedTextDecoration( 2039 addAppliedTextDecoration(AppliedTextDecoration(
2050 decorationLines, decorationStyle, currentTextDecorationColor)); 2040 decorationLines, decorationStyle, currentTextDecorationColor));
2051 } 2041 }
2052 2042
2053 void ComputedStyle::clearAppliedTextDecorations() { 2043 void ComputedStyle::clearAppliedTextDecorations() {
2054 m_inheritedData.m_hasSimpleUnderline = false; 2044 m_hasSimpleUnderline = false;
2055 2045
2056 if (m_rareInheritedData->appliedTextDecorations) 2046 if (m_rareInheritedData->appliedTextDecorations)
2057 m_rareInheritedData.access()->appliedTextDecorations = nullptr; 2047 m_rareInheritedData.access()->appliedTextDecorations = nullptr;
2058 } 2048 }
2059 2049
2060 void ComputedStyle::restoreParentTextDecorations( 2050 void ComputedStyle::restoreParentTextDecorations(
2061 const ComputedStyle& parentStyle) { 2051 const ComputedStyle& parentStyle) {
2062 m_inheritedData.m_hasSimpleUnderline = 2052 m_hasSimpleUnderline = parentStyle.m_hasSimpleUnderline;
2063 parentStyle.m_inheritedData.m_hasSimpleUnderline;
2064 if (m_rareInheritedData->appliedTextDecorations != 2053 if (m_rareInheritedData->appliedTextDecorations !=
2065 parentStyle.m_rareInheritedData->appliedTextDecorations) 2054 parentStyle.m_rareInheritedData->appliedTextDecorations)
2066 m_rareInheritedData.access()->appliedTextDecorations = 2055 m_rareInheritedData.access()->appliedTextDecorations =
2067 parentStyle.m_rareInheritedData->appliedTextDecorations; 2056 parentStyle.m_rareInheritedData->appliedTextDecorations;
2068 } 2057 }
2069 2058
2070 void ComputedStyle::clearMultiCol() { 2059 void ComputedStyle::clearMultiCol() {
2071 m_rareNonInheritedData.access()->m_multiCol = nullptr; 2060 m_rareNonInheritedData.access()->m_multiCol = nullptr;
2072 m_rareNonInheritedData.access()->m_multiCol.init(); 2061 m_rareNonInheritedData.access()->m_multiCol.init();
2073 } 2062 }
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2498 if (value < 0) 2487 if (value < 0)
2499 fvalue -= 0.5f; 2488 fvalue -= 0.5f;
2500 else 2489 else
2501 fvalue += 0.5f; 2490 fvalue += 0.5f;
2502 } 2491 }
2503 2492
2504 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2493 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2505 } 2494 }
2506 2495
2507 } // namespace blink 2496 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698