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

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

Issue 2800723002: Ensure we never remove the style attribute when syncing it from CSSOM. (Closed)
Patch Set: Nits 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/LayoutTests/platform/win/external/wpt/editing/run/underline-expected.txt ('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 3998 matching lines...) Expand 10 before | Expand all | Expand 10 after
4009 } 4009 }
4010 4010
4011 void Element::SynchronizeStyleAttributeInternal() const { 4011 void Element::SynchronizeStyleAttributeInternal() const {
4012 DCHECK(IsStyledElement()); 4012 DCHECK(IsStyledElement());
4013 DCHECK(GetElementData()); 4013 DCHECK(GetElementData());
4014 DCHECK(GetElementData()->style_attribute_is_dirty_); 4014 DCHECK(GetElementData()->style_attribute_is_dirty_);
4015 GetElementData()->style_attribute_is_dirty_ = false; 4015 GetElementData()->style_attribute_is_dirty_ = false;
4016 const StylePropertySet* inline_style = this->InlineStyle(); 4016 const StylePropertySet* inline_style = this->InlineStyle();
4017 const_cast<Element*>(this)->SetSynchronizedLazyAttribute( 4017 const_cast<Element*>(this)->SetSynchronizedLazyAttribute(
4018 styleAttr, 4018 styleAttr,
4019 inline_style ? AtomicString(inline_style->AsText()) : g_null_atom); 4019 inline_style ? AtomicString(inline_style->AsText()) : g_empty_atom);
4020 } 4020 }
4021 4021
4022 CSSStyleDeclaration* Element::style() { 4022 CSSStyleDeclaration* Element::style() {
4023 if (!IsStyledElement()) 4023 if (!IsStyledElement())
4024 return nullptr; 4024 return nullptr;
4025 return &EnsureElementRareData().EnsureInlineCSSStyleDeclaration(this); 4025 return &EnsureElementRareData().EnsureInlineCSSStyleDeclaration(this);
4026 } 4026 }
4027 4027
4028 StylePropertyMap* Element::styleMap() { 4028 StylePropertyMap* Element::styleMap() {
4029 if (!IsStyledElement()) 4029 if (!IsStyledElement())
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 } 4336 }
4337 4337
4338 DEFINE_TRACE_WRAPPERS(Element) { 4338 DEFINE_TRACE_WRAPPERS(Element) {
4339 if (HasRareData()) { 4339 if (HasRareData()) {
4340 visitor->TraceWrappers(GetElementRareData()); 4340 visitor->TraceWrappers(GetElementRareData());
4341 } 4341 }
4342 ContainerNode::TraceWrappers(visitor); 4342 ContainerNode::TraceWrappers(visitor);
4343 } 4343 }
4344 4344
4345 } // namespace blink 4345 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/underline-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698