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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 289273002: Oilpan: make DocumentFragment a heap allocated object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + add WillBeGarbageCollected FIXME. Created 6 years, 7 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 | « Source/core/dom/Range.cpp ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return createMarkup(this, ChildrenOnly); 119 return createMarkup(this, ChildrenOnly);
120 } 120 }
121 121
122 void ShadowRoot::setInnerHTML(const String& markup, ExceptionState& exceptionSta te) 122 void ShadowRoot::setInnerHTML(const String& markup, ExceptionState& exceptionSta te)
123 { 123 {
124 if (isOrphan()) { 124 if (isOrphan()) {
125 exceptionState.throwDOMException(InvalidAccessError, "The ShadowRoot doe s not have a host."); 125 exceptionState.throwDOMException(InvalidAccessError, "The ShadowRoot doe s not have a host.");
126 return; 126 return;
127 } 127 }
128 128
129 if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(mark up, host(), AllowScriptingContent, "innerHTML", exceptionState)) 129 if (RefPtrWillBeRawPtr<DocumentFragment> fragment = createFragmentForInnerOu terHTML(markup, host(), AllowScriptingContent, "innerHTML", exceptionState))
130 replaceChildrenWithFragment(this, fragment.release(), exceptionState); 130 replaceChildrenWithFragment(this, fragment.release(), exceptionState);
131 } 131 }
132 132
133 void ShadowRoot::recalcStyle(StyleRecalcChange change) 133 void ShadowRoot::recalcStyle(StyleRecalcChange change)
134 { 134 {
135 // ShadowRoot doesn't support custom callbacks. 135 // ShadowRoot doesn't support custom callbacks.
136 ASSERT(!hasCustomStyleCallbacks()); 136 ASSERT(!hasCustomStyleCallbacks());
137 137
138 StyleResolverParentScope parentScope(*this); 138 StyleResolverParentScope parentScope(*this);
139 139
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void ShadowRoot::trace(Visitor* visitor) 339 void ShadowRoot::trace(Visitor* visitor)
340 { 340 {
341 visitor->trace(m_prev); 341 visitor->trace(m_prev);
342 visitor->trace(m_next); 342 visitor->trace(m_next);
343 visitor->trace(m_shadowRootRareData); 343 visitor->trace(m_shadowRootRareData);
344 TreeScope::trace(visitor); 344 TreeScope::trace(visitor);
345 DocumentFragment::trace(visitor); 345 DocumentFragment::trace(visitor);
346 } 346 }
347 347
348 } 348 }
OLDNEW
« no previous file with comments | « Source/core/dom/Range.cpp ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698