| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 { | 357 { |
| 358 return adoptPtr(new AutofocusTask()); | 358 return adoptPtr(new AutofocusTask()); |
| 359 } | 359 } |
| 360 virtual ~AutofocusTask() { } | 360 virtual ~AutofocusTask() { } |
| 361 | 361 |
| 362 private: | 362 private: |
| 363 AutofocusTask() { } | 363 AutofocusTask() { } |
| 364 virtual void performTask(ExecutionContext* context) OVERRIDE | 364 virtual void performTask(ExecutionContext* context) OVERRIDE |
| 365 { | 365 { |
| 366 Document* document = toDocument(context); | 366 Document* document = toDocument(context); |
| 367 if (RefPtr<Element> element = document->autofocusElement()) { | 367 if (RefPtrWillBeRawPtr<Element> element = document->autofocusElement())
{ |
| 368 document->setAutofocusElement(0); | 368 document->setAutofocusElement(0); |
| 369 element->focus(); | 369 element->focus(); |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 }; | 372 }; |
| 373 | 373 |
| 374 DocumentVisibilityObserver::DocumentVisibilityObserver(Document& document) | 374 DocumentVisibilityObserver::DocumentVisibilityObserver(Document& document) |
| 375 : m_document(0) | 375 : m_document(0) |
| 376 { | 376 { |
| 377 registerObserver(document); | 377 registerObserver(document); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 return DocumentType::create(this, doctype->name(), doctype->publicId(),
doctype->systemId()); | 954 return DocumentType::create(this, doctype->name(), doctype->publicId(),
doctype->systemId()); |
| 955 } | 955 } |
| 956 case ELEMENT_NODE: { | 956 case ELEMENT_NODE: { |
| 957 Element* oldElement = toElement(importedNode); | 957 Element* oldElement = toElement(importedNode); |
| 958 // FIXME: The following check might be unnecessary. Is it possible that | 958 // FIXME: The following check might be unnecessary. Is it possible that |
| 959 // oldElement has mismatched prefix/namespace? | 959 // oldElement has mismatched prefix/namespace? |
| 960 if (!hasValidNamespaceForElements(oldElement->tagQName())) { | 960 if (!hasValidNamespaceForElements(oldElement->tagQName())) { |
| 961 exceptionState.throwDOMException(NamespaceError, "The imported node
has an invalid namespace."); | 961 exceptionState.throwDOMException(NamespaceError, "The imported node
has an invalid namespace."); |
| 962 return nullptr; | 962 return nullptr; |
| 963 } | 963 } |
| 964 RefPtr<Element> newElement = createElement(oldElement->tagQName(), false
); | 964 RefPtrWillBeRawPtr<Element> newElement = createElement(oldElement->tagQN
ame(), false); |
| 965 | 965 |
| 966 newElement->cloneDataFromElement(*oldElement); | 966 newElement->cloneDataFromElement(*oldElement); |
| 967 | 967 |
| 968 if (deep) { | 968 if (deep) { |
| 969 if (!importContainerNodeChildren(oldElement, newElement, exceptionSt
ate)) | 969 if (!importContainerNodeChildren(oldElement, newElement, exceptionSt
ate)) |
| 970 return nullptr; | 970 return nullptr; |
| 971 if (isHTMLTemplateElement(*oldElement) | 971 if (isHTMLTemplateElement(*oldElement) |
| 972 && !importContainerNodeChildren(toHTMLTemplateElement(oldElement
)->content(), toHTMLTemplateElement(newElement)->content(), exceptionState)) | 972 && !importContainerNodeChildren(toHTMLTemplateElement(oldElement
)->content(), toHTMLTemplateElement(newElement)->content(), exceptionState)) |
| 973 return nullptr; | 973 return nullptr; |
| 974 } | 974 } |
| (...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3460 void Document::styleResolverMayHaveChanged() | 3460 void Document::styleResolverMayHaveChanged() |
| 3461 { | 3461 { |
| 3462 styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : Anal
yzedStyleUpdate); | 3462 styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : Anal
yzedStyleUpdate); |
| 3463 } | 3463 } |
| 3464 | 3464 |
| 3465 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) | 3465 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) |
| 3466 { | 3466 { |
| 3467 m_hoverNode = newHoverNode; | 3467 m_hoverNode = newHoverNode; |
| 3468 } | 3468 } |
| 3469 | 3469 |
| 3470 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement) | 3470 void Document::setActiveHoverElement(PassRefPtrWillBeRawPtr<Element> newActiveEl
ement) |
| 3471 { | 3471 { |
| 3472 if (!newActiveElement) { | 3472 if (!newActiveElement) { |
| 3473 m_activeHoverElement.clear(); | 3473 m_activeHoverElement.clear(); |
| 3474 return; | 3474 return; |
| 3475 } | 3475 } |
| 3476 | 3476 |
| 3477 m_activeHoverElement = newActiveElement; | 3477 m_activeHoverElement = newActiveElement; |
| 3478 } | 3478 } |
| 3479 | 3479 |
| 3480 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) | 3480 void Document::removeFocusedElementOfSubtree(Node* node, bool amongChildrenOnly) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3531 { | 3531 { |
| 3532 return m_annotatedRegions; | 3532 return m_annotatedRegions; |
| 3533 } | 3533 } |
| 3534 | 3534 |
| 3535 void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions) | 3535 void Document::setAnnotatedRegions(const Vector<AnnotatedRegionValue>& regions) |
| 3536 { | 3536 { |
| 3537 m_annotatedRegions = regions; | 3537 m_annotatedRegions = regions; |
| 3538 setAnnotatedRegionsDirty(false); | 3538 setAnnotatedRegionsDirty(false); |
| 3539 } | 3539 } |
| 3540 | 3540 |
| 3541 bool Document::setFocusedElement(PassRefPtr<Element> prpNewFocusedElement, Focus
Type type) | 3541 bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedEl
ement, FocusType type) |
| 3542 { | 3542 { |
| 3543 m_clearFocusedElementTimer.stop(); | 3543 m_clearFocusedElementTimer.stop(); |
| 3544 | 3544 |
| 3545 RefPtr<Element> newFocusedElement = prpNewFocusedElement; | 3545 RefPtrWillBeRawPtr<Element> newFocusedElement = prpNewFocusedElement; |
| 3546 | 3546 |
| 3547 // Make sure newFocusedNode is actually in this document | 3547 // Make sure newFocusedNode is actually in this document |
| 3548 if (newFocusedElement && (newFocusedElement->document() != this)) | 3548 if (newFocusedElement && (newFocusedElement->document() != this)) |
| 3549 return true; | 3549 return true; |
| 3550 | 3550 |
| 3551 if (NodeChildRemovalTracker::isBeingRemoved(newFocusedElement.get())) | 3551 if (NodeChildRemovalTracker::isBeingRemoved(newFocusedElement.get())) |
| 3552 return true; | 3552 return true; |
| 3553 | 3553 |
| 3554 if (m_focusedElement == newFocusedElement) | 3554 if (m_focusedElement == newFocusedElement) |
| 3555 return true; | 3555 return true; |
| (...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5787 visitor->trace(m_timeline); | 5787 visitor->trace(m_timeline); |
| 5788 visitor->trace(m_compositorPendingAnimations); | 5788 visitor->trace(m_compositorPendingAnimations); |
| 5789 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5789 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
| 5790 DocumentSupplementable::trace(visitor); | 5790 DocumentSupplementable::trace(visitor); |
| 5791 TreeScope::trace(visitor); | 5791 TreeScope::trace(visitor); |
| 5792 ContainerNode::trace(visitor); | 5792 ContainerNode::trace(visitor); |
| 5793 ExecutionContext::trace(visitor); | 5793 ExecutionContext::trace(visitor); |
| 5794 } | 5794 } |
| 5795 | 5795 |
| 5796 } // namespace WebCore | 5796 } // namespace WebCore |
| OLD | NEW |