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

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

Issue 193683002: Remove histogram in ShadowRoot constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698