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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 String ShadowRoot::innerHTML() const | 115 String ShadowRoot::innerHTML() const |
116 { | 116 { |
117 return createMarkup(this, ChildrenOnly); | 117 return createMarkup(this, ChildrenOnly); |
118 } | 118 } |
119 | 119 |
120 void ShadowRoot::setInnerHTML(const String& markup, ExceptionCode& ec) | 120 void ShadowRoot::setInnerHTML(const String& markup, ExceptionCode& ec) |
121 { | 121 { |
122 if (isOrphan()) { | 122 if (isOrphan()) { |
123 ec = INVALID_ACCESS_ERR; | 123 ec = InvalidAccessError; |
124 return; | 124 return; |
125 } | 125 } |
126 | 126 |
127 if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(mark
up, host(), AllowScriptingContent, ec)) | 127 if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(mark
up, host(), AllowScriptingContent, ec)) |
128 replaceChildrenWithFragment(this, fragment.release(), ec); | 128 replaceChildrenWithFragment(this, fragment.release(), ec); |
129 } | 129 } |
130 | 130 |
131 bool ShadowRoot::childTypeAllowed(NodeType type) const | 131 bool ShadowRoot::childTypeAllowed(NodeType type) const |
132 { | 132 { |
133 switch (type) { | 133 switch (type) { |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 { | 293 { |
294 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 294 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
295 DocumentFragment::reportMemoryUsage(memoryObjectInfo); | 295 DocumentFragment::reportMemoryUsage(memoryObjectInfo); |
296 TreeScope::reportMemoryUsage(memoryObjectInfo); | 296 TreeScope::reportMemoryUsage(memoryObjectInfo); |
297 info.addMember(m_prev, "prev"); | 297 info.addMember(m_prev, "prev"); |
298 info.addMember(m_next, "next"); | 298 info.addMember(m_next, "next"); |
299 info.addMember(m_scopeDistribution, "scopeDistribution"); | 299 info.addMember(m_scopeDistribution, "scopeDistribution"); |
300 } | 300 } |
301 | 301 |
302 } | 302 } |
OLD | NEW |