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

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

Issue 2727843004: needsPaintInvalidation() should not return true for selection. (Closed)
Patch Set: Renaming. 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 StyleDifference ComputedStyle::visualInvalidationDiff( 533 StyleDifference ComputedStyle::visualInvalidationDiff(
534 const ComputedStyle& other) const { 534 const ComputedStyle& other) const {
535 // Note, we use .get() on each DataRef below because DataRef::operator== will 535 // Note, we use .get() on each DataRef below because DataRef::operator== will
536 // do a deep compare, which is duplicate work when we're going to compare each 536 // do a deep compare, which is duplicate work when we're going to compare each
537 // property inside this function anyway. 537 // property inside this function anyway.
538 538
539 StyleDifference diff; 539 StyleDifference diff;
540 if (m_svgStyle.get() != other.m_svgStyle.get()) 540 if (m_svgStyle.get() != other.m_svgStyle.get())
541 diff = m_svgStyle->diff(other.m_svgStyle.get()); 541 diff = m_svgStyle->diff(other.m_svgStyle.get());
542 542
543 if ((!diff.needsFullLayout() || !diff.needsPaintInvalidation()) && 543 if ((!diff.needsFullLayout() || !diff.needsFullPaintInvalidation()) &&
544 diffNeedsFullLayoutAndPaintInvalidation(other)) { 544 diffNeedsFullLayoutAndPaintInvalidation(other)) {
545 diff.setNeedsFullLayout(); 545 diff.setNeedsFullLayout();
546 diff.setNeedsPaintInvalidationObject(); 546 diff.setNeedsPaintInvalidationObject();
547 } 547 }
548 548
549 if (!diff.needsFullLayout() && diffNeedsFullLayout(other)) 549 if (!diff.needsFullLayout() && diffNeedsFullLayout(other))
550 diff.setNeedsFullLayout(); 550 diff.setNeedsFullLayout();
551 551
552 if (!diff.needsFullLayout() && 552 if (!diff.needsFullLayout() &&
553 m_surround->margin != other.m_surround->margin) { 553 m_surround->margin != other.m_surround->margin) {
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 diff.setFilterChanged(); 1063 diff.setFilterChanged();
1064 1064
1065 if (!m_rareNonInheritedData->m_outline.visuallyEqual( 1065 if (!m_rareNonInheritedData->m_outline.visuallyEqual(
1066 other.m_rareNonInheritedData->m_outline)) 1066 other.m_rareNonInheritedData->m_outline))
1067 diff.setNeedsRecomputeOverflow(); 1067 diff.setNeedsRecomputeOverflow();
1068 } 1068 }
1069 1069
1070 if (!m_surround->border.visualOverflowEqual(other.m_surround->border)) 1070 if (!m_surround->border.visualOverflowEqual(other.m_surround->border))
1071 diff.setNeedsRecomputeOverflow(); 1071 diff.setNeedsRecomputeOverflow();
1072 1072
1073 if (!diff.needsPaintInvalidation()) { 1073 if (!diff.needsFullPaintInvalidation()) {
1074 if (m_styleInheritedData->color != other.m_styleInheritedData->color || 1074 if (m_styleInheritedData->color != other.m_styleInheritedData->color ||
1075 m_styleInheritedData->visitedLinkColor != 1075 m_styleInheritedData->visitedLinkColor !=
1076 other.m_styleInheritedData->visitedLinkColor || 1076 other.m_styleInheritedData->visitedLinkColor ||
1077 m_inheritedData.m_hasSimpleUnderline != 1077 m_inheritedData.m_hasSimpleUnderline !=
1078 other.m_inheritedData.m_hasSimpleUnderline || 1078 other.m_inheritedData.m_hasSimpleUnderline ||
1079 m_visual->textDecoration != other.m_visual->textDecoration) { 1079 m_visual->textDecoration != other.m_visual->textDecoration) {
1080 diff.setTextDecorationOrColorChanged(); 1080 diff.setTextDecorationOrColorChanged();
1081 } else if (m_rareNonInheritedData.get() != 1081 } else if (m_rareNonInheritedData.get() !=
1082 other.m_rareNonInheritedData.get() && 1082 other.m_rareNonInheritedData.get() &&
1083 (m_rareNonInheritedData->m_textDecorationStyle != 1083 (m_rareNonInheritedData->m_textDecorationStyle !=
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 if (value < 0) 2491 if (value < 0)
2492 fvalue -= 0.5f; 2492 fvalue -= 0.5f;
2493 else 2493 else
2494 fvalue += 0.5f; 2494 fvalue += 0.5f;
2495 } 2495 }
2496 2496
2497 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2497 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2498 } 2498 }
2499 2499
2500 } // namespace blink 2500 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698