| 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.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3026 } | 3026 } |
| 3027 | 3027 |
| 3028 void Element::setFloatingPointAttribute(const QualifiedName& attributeName, doub
le value) | 3028 void Element::setFloatingPointAttribute(const QualifiedName& attributeName, doub
le value) |
| 3029 { | 3029 { |
| 3030 setAttribute(attributeName, AtomicString::number(value)); | 3030 setAttribute(attributeName, AtomicString::number(value)); |
| 3031 } | 3031 } |
| 3032 | 3032 |
| 3033 void Element::setContainsFullScreenElement(bool flag) | 3033 void Element::setContainsFullScreenElement(bool flag) |
| 3034 { | 3034 { |
| 3035 setElementFlag(ContainsFullScreenElement, flag); | 3035 setElementFlag(ContainsFullScreenElement, flag); |
| 3036 document().styleEngine().ensureFullscreenUAStyle(); | 3036 document().styleEngine().ensureUAStyleForFullscreen(); |
| 3037 pseudoStateChanged(CSSSelector::PseudoFullScreenAncestor); | 3037 pseudoStateChanged(CSSSelector::PseudoFullScreenAncestor); |
| 3038 } | 3038 } |
| 3039 | 3039 |
| 3040 // Unlike Node::parentNode, this can cross frame boundaries. | 3040 // Unlike Node::parentNode, this can cross frame boundaries. |
| 3041 static Element* nextAncestorElement(Element* element) | 3041 static Element* nextAncestorElement(Element* element) |
| 3042 { | 3042 { |
| 3043 DCHECK(element); | 3043 DCHECK(element); |
| 3044 if (element->parentElement()) | 3044 if (element->parentElement()) |
| 3045 return element->parentElement(); | 3045 return element->parentElement(); |
| 3046 | 3046 |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3606 bool Element::supportsStyleSharing() const | 3606 bool Element::supportsStyleSharing() const |
| 3607 { | 3607 { |
| 3608 if (!isStyledElement() || !parentOrShadowHostElement()) | 3608 if (!isStyledElement() || !parentOrShadowHostElement()) |
| 3609 return false; | 3609 return false; |
| 3610 // If the element has inline style it is probably unique. | 3610 // If the element has inline style it is probably unique. |
| 3611 if (inlineStyle()) | 3611 if (inlineStyle()) |
| 3612 return false; | 3612 return false; |
| 3613 if (isSVGElement() && toSVGElement(this)->animatedSMILStyleProperties()) | 3613 if (isSVGElement() && toSVGElement(this)->animatedSMILStyleProperties()) |
| 3614 return false; | 3614 return false; |
| 3615 // Ids stop style sharing if they show up in the stylesheets. | 3615 // Ids stop style sharing if they show up in the stylesheets. |
| 3616 if (hasID() && document().ensureStyleResolver().hasRulesForId(idForStyleReso
lution())) | 3616 if (hasID() && document().styleEngine().hasRulesForId(idForStyleResolution()
)) |
| 3617 return false; | 3617 return false; |
| 3618 // :active and :hover elements always make a chain towards the document node | 3618 // :active and :hover elements always make a chain towards the document node |
| 3619 // and no siblings or cousins will have the same state. There's also only on
e | 3619 // and no siblings or cousins will have the same state. There's also only on
e |
| 3620 // :focus element per scope so we don't need to attempt to share. | 3620 // :focus element per scope so we don't need to attempt to share. |
| 3621 if (isUserActionElement()) | 3621 if (isUserActionElement()) |
| 3622 return false; | 3622 return false; |
| 3623 if (!parentOrShadowHostElement()->childrenSupportStyleSharing()) | 3623 if (!parentOrShadowHostElement()->childrenSupportStyleSharing()) |
| 3624 return false; | 3624 return false; |
| 3625 if (this == document().cssTarget()) | 3625 if (this == document().cssTarget()) |
| 3626 return false; | 3626 return false; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3704 | 3704 |
| 3705 DEFINE_TRACE_WRAPPERS(Element) | 3705 DEFINE_TRACE_WRAPPERS(Element) |
| 3706 { | 3706 { |
| 3707 if (hasRareData()) { | 3707 if (hasRareData()) { |
| 3708 visitor->traceWrappers(elementRareData()); | 3708 visitor->traceWrappers(elementRareData()); |
| 3709 } | 3709 } |
| 3710 ContainerNode::traceWrappers(visitor); | 3710 ContainerNode::traceWrappers(visitor); |
| 3711 } | 3711 } |
| 3712 | 3712 |
| 3713 } // namespace blink | 3713 } // namespace blink |
| OLD | NEW |