| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 , m_resetStyleInheritance(false) | 65 , m_resetStyleInheritance(false) |
| 66 , m_type(type) | 66 , m_type(type) |
| 67 , m_registeredWithParentShadowRoot(false) | 67 , m_registeredWithParentShadowRoot(false) |
| 68 , m_descendantInsertionPointsIsValid(false) | 68 , m_descendantInsertionPointsIsValid(false) |
| 69 { | 69 { |
| 70 ASSERT(document); | 70 ASSERT(document); |
| 71 ScriptWrappable::init(this); | 71 ScriptWrappable::init(this); |
| 72 | 72 |
| 73 if (type == ShadowRoot::AuthorShadowRoot) { | 73 if (type == ShadowRoot::AuthorShadowRoot) { |
| 74 ShadowRootUsageOriginType usageType = document->url().protocolIsInHTTPFa
mily() ? ShadowRootUsageOriginWeb : ShadowRootUsageOriginNotWeb; | 74 ShadowRootUsageOriginType usageType = document->url().protocolIsInHTTPFa
mily() ? ShadowRootUsageOriginWeb : ShadowRootUsageOriginNotWeb; |
| 75 WebKit::Platform::current()->histogramEnumeration("WebCore.ShadowRoot.co
nstructor", usageType, ShadowRootUsageOriginMax); | 75 blink::Platform::current()->histogramEnumeration("WebCore.ShadowRoot.con
structor", usageType, ShadowRootUsageOriginMax); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 ShadowRoot::~ShadowRoot() | 79 ShadowRoot::~ShadowRoot() |
| 80 { | 80 { |
| 81 ASSERT(!m_prev); | 81 ASSERT(!m_prev); |
| 82 ASSERT(!m_next); | 82 ASSERT(!m_next); |
| 83 | 83 |
| 84 if (m_shadowRootRareData && m_shadowRootRareData->styleSheets()) | 84 if (m_shadowRootRareData && m_shadowRootRareData->styleSheets()) |
| 85 m_shadowRootRareData->styleSheets()->detachFromDocument(); | 85 m_shadowRootRareData->styleSheets()->detachFromDocument(); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 StyleSheetList* ShadowRoot::styleSheets() | 411 StyleSheetList* ShadowRoot::styleSheets() |
| 412 { | 412 { |
| 413 if (!ensureShadowRootRareData()->styleSheets()) | 413 if (!ensureShadowRootRareData()->styleSheets()) |
| 414 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); | 414 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); |
| 415 | 415 |
| 416 return m_shadowRootRareData->styleSheets(); | 416 return m_shadowRootRareData->styleSheets(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 } | 419 } |
| OLD | NEW |