| OLD | NEW |
| 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 4214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4225 | 4225 |
| 4226 void Element::AddPropertyToPresentationAttributeStyle( | 4226 void Element::AddPropertyToPresentationAttributeStyle( |
| 4227 MutableStylePropertySet* style, | 4227 MutableStylePropertySet* style, |
| 4228 CSSPropertyID property_id, | 4228 CSSPropertyID property_id, |
| 4229 const CSSValue* value) { | 4229 const CSSValue* value) { |
| 4230 DCHECK(IsStyledElement()); | 4230 DCHECK(IsStyledElement()); |
| 4231 style->SetProperty(property_id, *value); | 4231 style->SetProperty(property_id, *value); |
| 4232 } | 4232 } |
| 4233 | 4233 |
| 4234 bool Element::SupportsStyleSharing() const { | 4234 bool Element::SupportsStyleSharing() const { |
| 4235 if (!RuntimeEnabledFeatures::styleSharingEnabled()) |
| 4236 return false; |
| 4235 if (!IsStyledElement() || !ParentOrShadowHostElement()) | 4237 if (!IsStyledElement() || !ParentOrShadowHostElement()) |
| 4236 return false; | 4238 return false; |
| 4237 // If the element has inline style it is probably unique. | 4239 // If the element has inline style it is probably unique. |
| 4238 if (InlineStyle()) | 4240 if (InlineStyle()) |
| 4239 return false; | 4241 return false; |
| 4240 if (IsSVGElement() && ToSVGElement(this)->AnimatedSMILStyleProperties()) | 4242 if (IsSVGElement() && ToSVGElement(this)->AnimatedSMILStyleProperties()) |
| 4241 return false; | 4243 return false; |
| 4242 // Ids stop style sharing if they show up in the stylesheets. | 4244 // Ids stop style sharing if they show up in the stylesheets. |
| 4243 if (HasID() && | 4245 if (HasID() && |
| 4244 GetDocument().GetStyleEngine().HasRulesForId(IdForStyleResolution())) | 4246 GetDocument().GetStyleEngine().HasRulesForId(IdForStyleResolution())) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4337 } | 4339 } |
| 4338 | 4340 |
| 4339 DEFINE_TRACE_WRAPPERS(Element) { | 4341 DEFINE_TRACE_WRAPPERS(Element) { |
| 4340 if (HasRareData()) { | 4342 if (HasRareData()) { |
| 4341 visitor->TraceWrappers(GetElementRareData()); | 4343 visitor->TraceWrappers(GetElementRareData()); |
| 4342 } | 4344 } |
| 4343 ContainerNode::TraceWrappers(visitor); | 4345 ContainerNode::TraceWrappers(visitor); |
| 4344 } | 4346 } |
| 4345 | 4347 |
| 4346 } // namespace blink | 4348 } // namespace blink |
| OLD | NEW |