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

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: Rebaseline 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 3997 matching lines...) Expand 10 before | Expand all | Expand 10 after
4008 } 4008 }
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, AtomicString(inline_style ? inline_style->AsText() : ""));
esprehn 2017/04/18 01:57:01 inline_style ? AtomicString(inline_style->AsText()
4019 inline_style ? AtomicString(inline_style->AsText()) : g_null_atom);
4020 } 4019 }
4021 4020
4022 CSSStyleDeclaration* Element::style() { 4021 CSSStyleDeclaration* Element::style() {
4023 if (!IsStyledElement()) 4022 if (!IsStyledElement())
4024 return nullptr; 4023 return nullptr;
4025 return &EnsureElementRareData().EnsureInlineCSSStyleDeclaration(this); 4024 return &EnsureElementRareData().EnsureInlineCSSStyleDeclaration(this);
4026 } 4025 }
4027 4026
4028 StylePropertyMap* Element::styleMap() { 4027 StylePropertyMap* Element::styleMap() {
4029 if (!IsStyledElement()) 4028 if (!IsStyledElement())
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 } 4335 }
4337 4336
4338 DEFINE_TRACE_WRAPPERS(Element) { 4337 DEFINE_TRACE_WRAPPERS(Element) {
4339 if (HasRareData()) { 4338 if (HasRareData()) {
4340 visitor->TraceWrappers(GetElementRareData()); 4339 visitor->TraceWrappers(GetElementRareData());
4341 } 4340 }
4342 ContainerNode::TraceWrappers(visitor); 4341 ContainerNode::TraceWrappers(visitor);
4343 } 4342 }
4344 4343
4345 } // namespace blink 4344 } // 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