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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 } | 1057 } |
1058 | 1058 |
1059 ShadowRoot* Element::shadowRoot() const | 1059 ShadowRoot* Element::shadowRoot() const |
1060 { | 1060 { |
1061 ElementShadow* elementShadow = shadow(); | 1061 ElementShadow* elementShadow = shadow(); |
1062 if (!elementShadow) | 1062 if (!elementShadow) |
1063 return 0; | 1063 return 0; |
1064 return elementShadow->youngestShadowRoot(); | 1064 return elementShadow->youngestShadowRoot(); |
1065 } | 1065 } |
1066 | 1066 |
1067 bool Element::childTypeAllowed(NodeType type) const | |
1068 { | |
1069 switch (type) { | |
1070 case ELEMENT_NODE: | |
1071 case TEXT_NODE: | |
1072 return true; | |
1073 default: | |
1074 break; | |
1075 } | |
1076 return false; | |
1077 } | |
1078 | |
1079 void Element::childrenChanged(const ChildrenChange& change) | 1067 void Element::childrenChanged(const ChildrenChange& change) |
1080 { | 1068 { |
1081 ContainerNode::childrenChanged(change); | 1069 ContainerNode::childrenChanged(change); |
1082 | 1070 |
1083 if (ElementShadow* shadow = this->shadow()) | 1071 if (ElementShadow* shadow = this->shadow()) |
1084 shadow->setNeedsDistributionRecalc(); | 1072 shadow->setNeedsDistributionRecalc(); |
1085 } | 1073 } |
1086 | 1074 |
1087 #ifndef NDEBUG | 1075 #ifndef NDEBUG |
1088 void Element::formatForDebugger(char* buffer, unsigned length) const | 1076 void Element::formatForDebugger(char* buffer, unsigned length) const |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 return false; | 1790 return false; |
1803 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 1791 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
1804 // See comments in RenderObject::setStyle(). | 1792 // See comments in RenderObject::setStyle(). |
1805 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 1793 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
1806 if (isHTMLCanvasElement(*this)) | 1794 if (isHTMLCanvasElement(*this)) |
1807 return false; | 1795 return false; |
1808 return true; | 1796 return true; |
1809 } | 1797 } |
1810 | 1798 |
1811 } // namespace blink | 1799 } // namespace blink |
OLD | NEW |