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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Issue 2327743002: Rename Node::shadowHost() to Node::ownerShadowHost() (Closed)
Patch Set: fix Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return; 158 return;
159 159
160 TRACE_EVENT0("blink", "ReplacementFragment constructor"); 160 TRACE_EVENT0("blink", "ReplacementFragment constructor");
161 Element* editableRoot = selection.rootEditableElement(); 161 Element* editableRoot = selection.rootEditableElement();
162 DCHECK(editableRoot); 162 DCHECK(editableRoot);
163 if (!editableRoot) 163 if (!editableRoot)
164 return; 164 return;
165 165
166 Element* shadowAncestorElement; 166 Element* shadowAncestorElement;
167 if (editableRoot->isInShadowTree()) 167 if (editableRoot->isInShadowTree())
168 shadowAncestorElement = editableRoot->shadowHost(); 168 shadowAncestorElement = editableRoot->ownerShadowHost();
169 else 169 else
170 shadowAncestorElement = editableRoot; 170 shadowAncestorElement = editableRoot;
171 171
172 if (!editableRoot->getAttributeEventListener(EventTypeNames::webkitBeforeTex tInserted) 172 if (!editableRoot->getAttributeEventListener(EventTypeNames::webkitBeforeTex tInserted)
173 // FIXME: Remove these checks once textareas and textfields actually reg ister an event handler. 173 // FIXME: Remove these checks once textareas and textfields actually reg ister an event handler.
174 && !(shadowAncestorElement && shadowAncestorElement->layoutObject() && s hadowAncestorElement->layoutObject()->isTextControl()) 174 && !(shadowAncestorElement && shadowAncestorElement->layoutObject() && s hadowAncestorElement->layoutObject()->isTextControl())
175 && hasRichlyEditableStyle(*editableRoot)) { 175 && hasRichlyEditableStyle(*editableRoot)) {
176 removeInterchangeNodes(m_fragment.get()); 176 removeInterchangeNodes(m_fragment.get());
177 return; 177 return;
178 } 178 }
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 visitor->trace(m_startOfInsertedContent); 1758 visitor->trace(m_startOfInsertedContent);
1759 visitor->trace(m_endOfInsertedContent); 1759 visitor->trace(m_endOfInsertedContent);
1760 visitor->trace(m_insertionStyle); 1760 visitor->trace(m_insertionStyle);
1761 visitor->trace(m_documentFragment); 1761 visitor->trace(m_documentFragment);
1762 visitor->trace(m_startOfInsertedRange); 1762 visitor->trace(m_startOfInsertedRange);
1763 visitor->trace(m_endOfInsertedRange); 1763 visitor->trace(m_endOfInsertedRange);
1764 CompositeEditCommand::trace(visitor); 1764 CompositeEditCommand::trace(visitor);
1765 } 1765 }
1766 1766
1767 } // namespace blink 1767 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698