OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |