| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 , m_prev(0) | 62 , m_prev(0) |
| 63 , m_next(0) | 63 , m_next(0) |
| 64 , m_numberOfStyles(0) | 64 , m_numberOfStyles(0) |
| 65 , m_applyAuthorStyles(false) | 65 , m_applyAuthorStyles(false) |
| 66 , m_resetStyleInheritance(false) | 66 , m_resetStyleInheritance(false) |
| 67 , m_type(type) | 67 , m_type(type) |
| 68 , m_registeredWithParentShadowRoot(false) | 68 , m_registeredWithParentShadowRoot(false) |
| 69 , m_descendantInsertionPointsIsValid(false) | 69 , m_descendantInsertionPointsIsValid(false) |
| 70 { | 70 { |
| 71 ScriptWrappable::init(this); | 71 ScriptWrappable::init(this); |
| 72 | |
| 73 if (type == ShadowRoot::AuthorShadowRoot) { | |
| 74 ShadowRootUsageOriginType usageType = document.url().protocolIsInHTTPFam
ily() ? ShadowRootUsageOriginWeb : ShadowRootUsageOriginNotWeb; | |
| 75 blink::Platform::current()->histogramEnumeration("WebCore.ShadowRoot.con
structor", usageType, ShadowRootUsageOriginMax); | |
| 76 } | |
| 77 } | 72 } |
| 78 | 73 |
| 79 ShadowRoot::~ShadowRoot() | 74 ShadowRoot::~ShadowRoot() |
| 80 { | 75 { |
| 81 ASSERT(!m_prev); | 76 ASSERT(!m_prev); |
| 82 ASSERT(!m_next); | 77 ASSERT(!m_next); |
| 83 | 78 |
| 84 if (m_shadowRootRareData && m_shadowRootRareData->styleSheets()) | 79 if (m_shadowRootRareData && m_shadowRootRareData->styleSheets()) |
| 85 m_shadowRootRareData->styleSheets()->detachFromDocument(); | 80 m_shadowRootRareData->styleSheets()->detachFromDocument(); |
| 86 | 81 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 { | 470 { |
| 476 ensureShadowRootRareData()->setChildrenAffectedByFirstChildRules(true); | 471 ensureShadowRootRareData()->setChildrenAffectedByFirstChildRules(true); |
| 477 } | 472 } |
| 478 | 473 |
| 479 void ShadowRoot::setChildrenAffectedByLastChildRules() | 474 void ShadowRoot::setChildrenAffectedByLastChildRules() |
| 480 { | 475 { |
| 481 ensureShadowRootRareData()->setChildrenAffectedByLastChildRules(true); | 476 ensureShadowRootRareData()->setChildrenAffectedByLastChildRules(true); |
| 482 } | 477 } |
| 483 | 478 |
| 484 } | 479 } |
| OLD | NEW |