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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 136903004: Changing from opacity less than 1 to opacity 1 should not trigger layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/layers/opacity-change-stacking-context-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 // If the counter directives change, trigger a relayout to re-calculate coun ter values and rebuild the counter node tree. 564 // If the counter directives change, trigger a relayout to re-calculate coun ter values and rebuild the counter node tree.
565 const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirectives. get(); 565 const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirectives. get();
566 const CounterDirectiveMap* mapB = other->rareNonInheritedData->m_counterDire ctives.get(); 566 const CounterDirectiveMap* mapB = other->rareNonInheritedData->m_counterDire ctives.get();
567 if (!(mapA == mapB || (mapA && mapB && *mapA == *mapB))) 567 if (!(mapA == mapB || (mapA && mapB && *mapA == *mapB)))
568 return StyleDifferenceLayout; 568 return StyleDifferenceLayout;
569 569
570 if ((visibility() == COLLAPSE) != (other->visibility() == COLLAPSE)) 570 if ((visibility() == COLLAPSE) != (other->visibility() == COLLAPSE))
571 return StyleDifferenceLayout; 571 return StyleDifferenceLayout;
572 572
573 if (rareNonInheritedData->hasOpacity() != other->rareNonInheritedData->hasOp acity()) { 573 // We only need do layout for opacity changes if adding or losing opacity co uld trigger a change
574 // in us being a stacking context.
575 if (hasAutoZIndex() != other->hasAutoZIndex() && rareNonInheritedData->hasOp acity() != other->rareNonInheritedData->hasOpacity()) {
574 // FIXME: We would like to use SimplifiedLayout here, but we can't quite do that yet. 576 // FIXME: We would like to use SimplifiedLayout here, but we can't quite do that yet.
575 // We need to make sure SimplifiedLayout can operate correctly on Render Inlines (we will need 577 // We need to make sure SimplifiedLayout can operate correctly on Render Inlines (we will need
576 // to add a selfNeedsSimplifiedLayout bit in order to not get confused a nd taint every line). 578 // to add a selfNeedsSimplifiedLayout bit in order to not get confused a nd taint every line).
577 // In addition we need to solve the floating object issue when layers co me and go. Right now 579 // In addition we need to solve the floating object issue when layers co me and go. Right now
578 // a full layout is necessary to keep floating object lists sane. 580 // a full layout is necessary to keep floating object lists sane.
579 return StyleDifferenceLayout; 581 return StyleDifferenceLayout;
580 } 582 }
581 583
582 if (rareNonInheritedData->hasFilters() != other->rareNonInheritedData->hasFi lters()) 584 if (rareNonInheritedData->hasFilters() != other->rareNonInheritedData->hasFi lters())
583 return StyleDifferenceLayout; 585 return StyleDifferenceLayout;
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 } 1604 }
1603 1605
1604 void RenderStyle::setBorderImageOutset(const BorderImageLengthBox& outset) 1606 void RenderStyle::setBorderImageOutset(const BorderImageLengthBox& outset)
1605 { 1607 {
1606 if (surround->border.m_image.outset() == outset) 1608 if (surround->border.m_image.outset() == outset)
1607 return; 1609 return;
1608 surround.access()->border.m_image.setOutset(outset); 1610 surround.access()->border.m_image.setOutset(outset);
1609 } 1611 }
1610 1612
1611 } // namespace WebCore 1613 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/layers/opacity-change-stacking-context-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698