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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2722553003: [WIP] Test moving stacking context flag update on ComputedStyle (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('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 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1862 if (hasCustomStyleCallbacks()) 1862 if (hasCustomStyleCallbacks())
1863 style = customStyleForLayoutObject(); 1863 style = customStyleForLayoutObject();
1864 if (!style) 1864 if (!style)
1865 style = originalStyleForLayoutObject(); 1865 style = originalStyleForLayoutObject();
1866 DCHECK(style); 1866 DCHECK(style);
1867 1867
1868 // styleForElement() might add active animations so we need to get it again. 1868 // styleForElement() might add active animations so we need to get it again.
1869 if (ElementAnimations* elementAnimations = this->elementAnimations()) { 1869 if (ElementAnimations* elementAnimations = this->elementAnimations()) {
1870 elementAnimations->cssAnimations().maybeApplyPendingUpdate(this); 1870 elementAnimations->cssAnimations().maybeApplyPendingUpdate(this);
1871 elementAnimations->updateAnimationFlags(*style); 1871 elementAnimations->updateAnimationFlags(*style);
1872 // if (style->hasCurrentTransformAnimation()) {
1873 // style->setIsStackingContext(true);
1874 // }
1872 } 1875 }
1873 1876
1874 if (style->hasTransform()) { 1877 if (style->hasTransform()) {
1875 if (const StylePropertySet* inlineStyle = this->inlineStyle()) 1878 if (const StylePropertySet* inlineStyle = this->inlineStyle())
1876 style->setHasInlineTransform( 1879 style->setHasInlineTransform(
1877 inlineStyle->hasProperty(CSSPropertyTransform)); 1880 inlineStyle->hasProperty(CSSPropertyTransform));
1878 } 1881 }
1879 1882
1880 style->updateIsStackingContext(this == document().documentElement(),
1881 isInTopLayer());
1882
1883 return style.release(); 1883 return style.release();
1884 } 1884 }
1885 1885
1886 PassRefPtr<ComputedStyle> Element::originalStyleForLayoutObject() { 1886 PassRefPtr<ComputedStyle> Element::originalStyleForLayoutObject() {
1887 DCHECK(document().inStyleRecalc()); 1887 DCHECK(document().inStyleRecalc());
1888 return document().ensureStyleResolver().styleForElement(this); 1888 return document().ensureStyleResolver().styleForElement(this);
1889 } 1889 }
1890 1890
1891 void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling) { 1891 void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling) {
1892 DCHECK(document().inStyleRecalc()); 1892 DCHECK(document().inStyleRecalc());
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after
4228 } 4228 }
4229 4229
4230 DEFINE_TRACE_WRAPPERS(Element) { 4230 DEFINE_TRACE_WRAPPERS(Element) {
4231 if (hasRareData()) { 4231 if (hasRareData()) {
4232 visitor->traceWrappers(elementRareData()); 4232 visitor->traceWrappers(elementRareData());
4233 } 4233 }
4234 ContainerNode::traceWrappers(visitor); 4234 ContainerNode::traceWrappers(visitor);
4235 } 4235 }
4236 4236
4237 } // namespace blink 4237 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698