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

Side by Side Diff: sky/engine/core/css/resolver/StyleAdjuster.cpp

Issue 893093002: Delete remaining masks dead code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 else 142 else
143 style->setDisplay(equivalentInlineDisplay(style->display())); 143 style->setDisplay(equivalentInlineDisplay(style->display()));
144 } 144 }
145 145
146 // Make sure our z-index value is only applied if the object is positioned. 146 // Make sure our z-index value is only applied if the object is positioned.
147 if (style->position() == StaticPosition && !parentStyleForcesZIndexToCreateS tackingContext(parentStyle)) 147 if (style->position() == StaticPosition && !parentStyleForcesZIndexToCreateS tackingContext(parentStyle))
148 style->setHasAutoZIndex(); 148 style->setHasAutoZIndex();
149 149
150 // Auto z-index becomes 0 for the root element and transparent objects. This prevents 150 // Auto z-index becomes 0 for the root element and transparent objects. This prevents
151 // cases where objects that should be blended as a single unit end up with a non-transparent 151 // cases where objects that should be blended as a single unit end up with a non-transparent
152 // object wedged in between them. Auto z-index also becomes 0 for objects th at specify transforms/masks/reflections. 152 // object wedged in between them. Auto z-index also becomes 0 for objects th at specify transforms.
153 if (style->hasAutoZIndex() && ((element.document().documentElement() == elem ent) 153 if (style->hasAutoZIndex() && ((element.document().documentElement() == elem ent)
154 || style->hasOpacity() 154 || style->hasOpacity()
155 || style->hasTransformRelatedProperty() 155 || style->hasTransformRelatedProperty()
156 || style->hasMask()
157 || style->clipPath() 156 || style->clipPath()
158 || style->hasFilter() 157 || style->hasFilter()
159 || hasWillChangeThatCreatesStackingContext(style))) 158 || hasWillChangeThatCreatesStackingContext(style)))
160 style->setZIndex(0); 159 style->setZIndex(0);
161 160
162 // will-change:transform should result in the same rendering behavior as hav ing a transform, 161 // will-change:transform should result in the same rendering behavior as hav ing a transform,
163 // including the creation of a containing block for fixed position descendan ts. 162 // including the creation of a containing block for fixed position descendan ts.
164 if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPro pertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTrans form))) { 163 if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPro pertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTrans form))) {
165 bool makeIdentity = true; 164 bool makeIdentity = true;
166 style->setTransform(TransformOperations(makeIdentity)); 165 style->setTransform(TransformOperations(makeIdentity));
167 } 166 }
168 167
169 if (doesNotInheritTextDecoration(style, element)) 168 if (doesNotInheritTextDecoration(style, element))
170 style->clearAppliedTextDecorations(); 169 style->clearAppliedTextDecorations();
171 170
172 style->applyTextDecorations(); 171 style->applyTextDecorations();
173 172
174 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) 173 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE)
175 adjustOverflow(style); 174 adjustOverflow(style);
176 175
177 // Cull out any useless layers and also repeat patterns into additional laye rs. 176 // Cull out any useless layers and also repeat patterns into additional laye rs.
178 style->adjustBackgroundLayers(); 177 style->adjustBackgroundLayers();
179 style->adjustMaskLayers();
180 178
181 // If we have transitions, or animations, do not share this style. 179 // If we have transitions, or animations, do not share this style.
182 if (style->transitions() || style->animations()) 180 if (style->transitions() || style->animations())
183 style->setUnique(); 181 style->setUnique();
184 182
185 // FIXME: when dropping the -webkit prefix on transform-style, we should als o have opacity < 1 cause flattening. 183 // FIXME: when dropping the -webkit prefix on transform-style, we should als o have opacity < 1 cause flattening.
186 if (style->preserves3D() && (style->overflowX() != OVISIBLE 184 if (style->preserves3D() && (style->overflowX() != OVISIBLE
187 || style->overflowY() != OVISIBLE 185 || style->overflowY() != OVISIBLE
188 || style->hasFilter())) 186 || style->hasFilter()))
189 style->setTransformStyle3D(TransformStyle3DFlat); 187 style->setTransformStyle3D(TransformStyle3DFlat);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden 250 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden
253 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it 251 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it
254 // default to auto so we can at least scroll through the pages. 252 // default to auto so we can at least scroll through the pages.
255 style->setOverflowX(OAUTO); 253 style->setOverflowX(OAUTO);
256 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE) { 254 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE) {
257 style->setOverflowY(OAUTO); 255 style->setOverflowY(OAUTO);
258 } 256 }
259 } 257 }
260 258
261 } 259 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/CSSToStyleMap.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698