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

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

Issue 2716583005: Do not promote position sticky or fixed elements unless they move with scroll. (Closed)
Patch Set: Avoid computing constraints for non-anchored sticky and add/update tests. 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 // See crbug.com/663650 for more details." 1179 // See crbug.com/663650 for more details."
1180 if (transformStyle3D() == TransformStyle3DPreserve3D) { 1180 if (transformStyle3D() == TransformStyle3DPreserve3D) {
1181 setIsStackingContext(true); 1181 setIsStackingContext(true);
1182 return; 1182 return;
1183 } 1183 }
1184 1184
1185 if (isDocumentElement || isInTopLayer || styleType() == PseudoIdBackdrop || 1185 if (isDocumentElement || isInTopLayer || styleType() == PseudoIdBackdrop ||
1186 hasOpacity() || hasTransformRelatedProperty() || hasMask() || 1186 hasOpacity() || hasTransformRelatedProperty() || hasMask() ||
1187 clipPath() || boxReflect() || hasFilterInducingProperty() || 1187 clipPath() || boxReflect() || hasFilterInducingProperty() ||
1188 hasBackdropFilter() || hasBlendMode() || hasIsolation() || 1188 hasBackdropFilter() || hasBlendMode() || hasIsolation() ||
1189 hasViewportConstrainedPosition() || 1189 hasViewportConstrainedPosition() || position() == EPosition::kSticky ||
1190 hasPropertyThatCreatesStackingContext(willChangeProperties()) || 1190 hasPropertyThatCreatesStackingContext(willChangeProperties()) ||
1191 containsPaint()) { 1191 containsPaint()) {
1192 setIsStackingContext(true); 1192 setIsStackingContext(true);
1193 } 1193 }
1194 } 1194 }
1195 1195
1196 void ComputedStyle::addCallbackSelector(const String& selector) { 1196 void ComputedStyle::addCallbackSelector(const String& selector) {
1197 if (!m_rareNonInheritedData->m_callbackSelectors.contains(selector)) 1197 if (!m_rareNonInheritedData->m_callbackSelectors.contains(selector))
1198 m_rareNonInheritedData.access()->m_callbackSelectors.push_back(selector); 1198 m_rareNonInheritedData.access()->m_callbackSelectors.push_back(selector);
1199 } 1199 }
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 if (value < 0) 2479 if (value < 0)
2480 fvalue -= 0.5f; 2480 fvalue -= 0.5f;
2481 else 2481 else
2482 fvalue += 0.5f; 2482 fvalue += 0.5f;
2483 } 2483 }
2484 2484
2485 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2485 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2486 } 2486 }
2487 2487
2488 } // namespace blink 2488 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698