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

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

Issue 2769353002: Only create sticky position constraints for constrained sticky position. (Closed)
Patch Set: Merge with master. Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('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 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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 if (TransformStyle3D() == kTransformStyle3DPreserve3D) { 1190 if (TransformStyle3D() == kTransformStyle3DPreserve3D) {
1191 SetIsStackingContext(true); 1191 SetIsStackingContext(true);
1192 return; 1192 return;
1193 } 1193 }
1194 1194
1195 if (is_document_element || is_in_top_layer || 1195 if (is_document_element || is_in_top_layer ||
1196 StyleType() == kPseudoIdBackdrop || HasOpacity() || 1196 StyleType() == kPseudoIdBackdrop || HasOpacity() ||
1197 HasTransformRelatedProperty() || HasMask() || ClipPath() || 1197 HasTransformRelatedProperty() || HasMask() || ClipPath() ||
1198 BoxReflect() || HasFilterInducingProperty() || HasBackdropFilter() || 1198 BoxReflect() || HasFilterInducingProperty() || HasBackdropFilter() ||
1199 HasBlendMode() || HasIsolation() || HasViewportConstrainedPosition() || 1199 HasBlendMode() || HasIsolation() || HasViewportConstrainedPosition() ||
1200 GetPosition() == EPosition::kSticky ||
1200 HasPropertyThatCreatesStackingContext(WillChangeProperties()) || 1201 HasPropertyThatCreatesStackingContext(WillChangeProperties()) ||
1201 ContainsPaint()) { 1202 ContainsPaint()) {
1202 SetIsStackingContext(true); 1203 SetIsStackingContext(true);
1203 } 1204 }
1204 } 1205 }
1205 1206
1206 void ComputedStyle::AddCallbackSelector(const String& selector) { 1207 void ComputedStyle::AddCallbackSelector(const String& selector) {
1207 if (!rare_non_inherited_data_->callback_selectors_.Contains(selector)) 1208 if (!rare_non_inherited_data_->callback_selectors_.Contains(selector))
1208 rare_non_inherited_data_.Access()->callback_selectors_.push_back(selector); 1209 rare_non_inherited_data_.Access()->callback_selectors_.push_back(selector);
1209 } 1210 }
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 if (value < 0) 2504 if (value < 0)
2504 fvalue -= 0.5f; 2505 fvalue -= 0.5f;
2505 else 2506 else
2506 fvalue += 0.5f; 2507 fvalue += 0.5f;
2507 } 2508 }
2508 2509
2509 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2510 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2510 } 2511 }
2511 2512
2512 } // namespace blink 2513 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698