| 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 const AtomicString Element::imageSourceURL() const | 750 const AtomicString Element::imageSourceURL() const |
| 751 { | 751 { |
| 752 return getAttribute(HTMLNames::srcAttr); | 752 return getAttribute(HTMLNames::srcAttr); |
| 753 } | 753 } |
| 754 | 754 |
| 755 RenderObject* Element::createRenderer(RenderStyle* style) | 755 RenderObject* Element::createRenderer(RenderStyle* style) |
| 756 { | 756 { |
| 757 return RenderObject::createObject(this, style); | 757 return RenderObject::createObject(this, style); |
| 758 } | 758 } |
| 759 | 759 |
| 760 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio
nPoint) | 760 void Element::insertedInto(ContainerNode* insertionPoint) |
| 761 { | 761 { |
| 762 // need to do superclass processing first so inDocument() is true | 762 // need to do superclass processing first so inDocument() is true |
| 763 // by the time we reach updateId | 763 // by the time we reach updateId |
| 764 ContainerNode::insertedInto(insertionPoint); | 764 ContainerNode::insertedInto(insertionPoint); |
| 765 | 765 |
| 766 if (!insertionPoint->isInTreeScope()) | 766 if (!insertionPoint->isInTreeScope()) |
| 767 return InsertionDone; | 767 return; |
| 768 | 768 |
| 769 if (isUpgradedCustomElement() && inDocument()) | 769 if (isUpgradedCustomElement() && inDocument()) |
| 770 CustomElement::didAttach(this, document()); | 770 CustomElement::didAttach(this, document()); |
| 771 | 771 |
| 772 TreeScope& scope = insertionPoint->treeScope(); | 772 TreeScope& scope = insertionPoint->treeScope(); |
| 773 if (scope != treeScope()) | 773 if (scope != treeScope()) |
| 774 return InsertionDone; | 774 return; |
| 775 | 775 |
| 776 const AtomicString& idValue = getIdAttribute(); | 776 const AtomicString& idValue = getIdAttribute(); |
| 777 if (!idValue.isNull()) | 777 if (!idValue.isNull()) |
| 778 updateId(scope, nullAtom, idValue); | 778 updateId(scope, nullAtom, idValue); |
| 779 | |
| 780 return InsertionDone; | |
| 781 } | 779 } |
| 782 | 780 |
| 783 void Element::removedFrom(ContainerNode* insertionPoint) | 781 void Element::removedFrom(ContainerNode* insertionPoint) |
| 784 { | 782 { |
| 785 bool wasInDocument = insertionPoint->inDocument(); | 783 bool wasInDocument = insertionPoint->inDocument(); |
| 786 | 784 |
| 787 setSavedLayerScrollOffset(IntSize()); | 785 setSavedLayerScrollOffset(IntSize()); |
| 788 | 786 |
| 789 if (insertionPoint->isInTreeScope() && treeScope() == document()) { | 787 if (insertionPoint->isInTreeScope() && treeScope() == document()) { |
| 790 const AtomicString& idValue = getIdAttribute(); | 788 const AtomicString& idValue = getIdAttribute(); |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1790 return false; | 1788 return false; |
| 1791 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 1789 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
| 1792 // See comments in RenderObject::setStyle(). | 1790 // See comments in RenderObject::setStyle(). |
| 1793 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 1791 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
| 1794 if (isHTMLCanvasElement(*this)) | 1792 if (isHTMLCanvasElement(*this)) |
| 1795 return false; | 1793 return false; |
| 1796 return true; | 1794 return true; |
| 1797 } | 1795 } |
| 1798 | 1796 |
| 1799 } // namespace blink | 1797 } // namespace blink |
| OLD | NEW |