Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Side by Side Diff: Source/WebCore/dom/Document.cpp

Issue 11884035: Merge 139345 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/events/touch/nested-document-with-touch-handler-detached-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 m_focusedNode = 0; 2131 m_focusedNode = 0;
2132 m_activeElement = 0; 2132 m_activeElement = 0;
2133 2133
2134 ContainerNode::detach(); 2134 ContainerNode::detach();
2135 2135
2136 unscheduleStyleRecalc(); 2136 unscheduleStyleRecalc();
2137 2137
2138 if (render) 2138 if (render)
2139 render->destroy(); 2139 render->destroy();
2140 2140
2141 #if ENABLE(TOUCH_EVENTS)
2142 if (m_touchEventTargets && m_touchEventTargets->size() && parentDocument())
2143 parentDocument()->didRemoveEventTargetNode(this);
2144 #endif
2145
2141 // This is required, as our Frame might delete itself as soon as it detaches 2146 // This is required, as our Frame might delete itself as soon as it detaches
2142 // us. However, this violates Node::detach() semantics, as it's never 2147 // us. However, this violates Node::detach() semantics, as it's never
2143 // possible to re-attach. Eventually Document::detach() should be renamed, 2148 // possible to re-attach. Eventually Document::detach() should be renamed,
2144 // or this setting of the frame to 0 could be made explicit in each of the 2149 // or this setting of the frame to 0 could be made explicit in each of the
2145 // callers of Document::detach(). 2150 // callers of Document::detach().
2146 m_frame = 0; 2151 m_frame = 0;
2147 m_renderArena.clear(); 2152 m_renderArena.clear();
2148 2153
2149 if (m_mediaQueryMatcher) 2154 if (m_mediaQueryMatcher)
2150 m_mediaQueryMatcher->documentDestroyed(); 2155 m_mediaQueryMatcher->documentDestroyed();
(...skipping 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after
5667 } 5672 }
5668 page->chrome()->client()->needTouchEvents(false); 5673 page->chrome()->client()->needTouchEvents(false);
5669 #else 5674 #else
5670 UNUSED_PARAM(handler); 5675 UNUSED_PARAM(handler);
5671 #endif 5676 #endif
5672 } 5677 }
5673 5678
5674 #if ENABLE(TOUCH_EVENTS) 5679 #if ENABLE(TOUCH_EVENTS)
5675 void Document::didRemoveEventTargetNode(Node* handler) 5680 void Document::didRemoveEventTargetNode(Node* handler)
5676 { 5681 {
5677 if (m_touchEventTargets.get()) 5682 if (m_touchEventTargets) {
5678 m_touchEventTargets->removeAll(handler); 5683 m_touchEventTargets->removeAll(handler);
5679 if (handler == this) 5684 if ((handler == this || m_touchEventTargets->isEmpty()) && parentDocumen t())
5680 if (Document* parentDocument = this->parentDocument()) 5685 parentDocument()->didRemoveEventTargetNode(this);
5681 parentDocument->didRemoveEventTargetNode(this); 5686 }
5682 } 5687 }
5683 #endif 5688 #endif
5684 5689
5685 HTMLIFrameElement* Document::seamlessParentIFrame() const 5690 HTMLIFrameElement* Document::seamlessParentIFrame() const
5686 { 5691 {
5687 if (!shouldDisplaySeamlesslyWithParent()) 5692 if (!shouldDisplaySeamlesslyWithParent())
5688 return 0; 5693 return 0;
5689 5694
5690 HTMLFrameOwnerElement* ownerElement = this->ownerElement(); 5695 HTMLFrameOwnerElement* ownerElement = this->ownerElement();
5691 ASSERT(ownerElement->hasTagName(iframeTag)); 5696 ASSERT(ownerElement->hasTagName(iframeTag));
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5992 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL() ); 5997 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL() );
5993 else 5998 else
5994 m_templateContentsOwnerDocument = Document::create(0, blankURL()); 5999 m_templateContentsOwnerDocument = Document::create(0, blankURL());
5995 } 6000 }
5996 6001
5997 return m_templateContentsOwnerDocument.get(); 6002 return m_templateContentsOwnerDocument.get();
5998 } 6003 }
5999 #endif 6004 #endif
6000 6005
6001 } // namespace WebCore 6006 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/touch/nested-document-with-touch-handler-detached-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698