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

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

Issue 2957513002: Removed calls to RefPtr::Release in return statements with auto move. (Closed)
Patch Set: rebased Created 3 years, 5 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) 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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 1913
1914 if (style->HasTransform()) { 1914 if (style->HasTransform()) {
1915 if (const StylePropertySet* inline_style = this->InlineStyle()) 1915 if (const StylePropertySet* inline_style = this->InlineStyle())
1916 style->SetHasInlineTransform( 1916 style->SetHasInlineTransform(
1917 inline_style->HasProperty(CSSPropertyTransform)); 1917 inline_style->HasProperty(CSSPropertyTransform));
1918 } 1918 }
1919 1919
1920 style->UpdateIsStackingContext(this == GetDocument().documentElement(), 1920 style->UpdateIsStackingContext(this == GetDocument().documentElement(),
1921 IsInTopLayer()); 1921 IsInTopLayer());
1922 1922
1923 return style.Release(); 1923 return style;
1924 } 1924 }
1925 1925
1926 PassRefPtr<ComputedStyle> Element::OriginalStyleForLayoutObject() { 1926 PassRefPtr<ComputedStyle> Element::OriginalStyleForLayoutObject() {
1927 DCHECK(GetDocument().InStyleRecalc()); 1927 DCHECK(GetDocument().InStyleRecalc());
1928 return GetDocument().EnsureStyleResolver().StyleForElement(this); 1928 return GetDocument().EnsureStyleResolver().StyleForElement(this);
1929 } 1929 }
1930 1930
1931 void Element::RecalcStyle(StyleRecalcChange change) { 1931 void Element::RecalcStyle(StyleRecalcChange change) {
1932 DCHECK(GetDocument().InStyleRecalc()); 1932 DCHECK(GetDocument().InStyleRecalc());
1933 DCHECK(!GetDocument().Lifecycle().InDetach()); 1933 DCHECK(!GetDocument().Lifecycle().InDetach());
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 return nullptr; 3520 return nullptr;
3521 3521
3522 if (!parent_style) 3522 if (!parent_style)
3523 parent_style = style; 3523 parent_style = style;
3524 3524
3525 if (request.pseudo_id == kPseudoIdFirstLineInherited) { 3525 if (request.pseudo_id == kPseudoIdFirstLineInherited) {
3526 RefPtr<ComputedStyle> result = 3526 RefPtr<ComputedStyle> result =
3527 GetDocument().EnsureStyleResolver().StyleForElement( 3527 GetDocument().EnsureStyleResolver().StyleForElement(
3528 this, parent_style, parent_style, kDisallowStyleSharing); 3528 this, parent_style, parent_style, kDisallowStyleSharing);
3529 result->SetStyleType(kPseudoIdFirstLineInherited); 3529 result->SetStyleType(kPseudoIdFirstLineInherited);
3530 return result.Release(); 3530 return result;
3531 } 3531 }
3532 3532
3533 return GetDocument().EnsureStyleResolver().PseudoStyleForElement( 3533 return GetDocument().EnsureStyleResolver().PseudoStyleForElement(
3534 this, request, parent_style, parent_style); 3534 this, request, parent_style, parent_style);
3535 } 3535 }
3536 // For display: contents elements, we still need to generate ::before and 3536 // For display: contents elements, we still need to generate ::before and
3537 // ::after, but the rest of the pseudo-elements should only be used for elements 3537 // ::after, but the rest of the pseudo-elements should only be used for elements
3538 // with an actual layout object. 3538 // with an actual layout object.
3539 bool Element::CanGeneratePseudoElement(PseudoId pseudo_id) const { 3539 bool Element::CanGeneratePseudoElement(PseudoId pseudo_id) const {
3540 if (HasDisplayContentsStyle()) 3540 if (HasDisplayContentsStyle())
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
4411 } 4411 }
4412 4412
4413 DEFINE_TRACE_WRAPPERS(Element) { 4413 DEFINE_TRACE_WRAPPERS(Element) {
4414 if (HasRareData()) { 4414 if (HasRareData()) {
4415 visitor->TraceWrappers(GetElementRareData()); 4415 visitor->TraceWrappers(GetElementRareData());
4416 } 4416 }
4417 ContainerNode::TraceWrappers(visitor); 4417 ContainerNode::TraceWrappers(visitor);
4418 } 4418 }
4419 4419
4420 } // namespace blink 4420 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/html/FormData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698