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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLProgressElement.cpp

Issue 1964223002: Merge "Count usage of PROGRESS element with -webkit-appearance:none." to M51 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | 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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 RawPtr<HTMLProgressElement> HTMLProgressElement::create(Document& document) 53 RawPtr<HTMLProgressElement> HTMLProgressElement::create(Document& document)
54 { 54 {
55 RawPtr<HTMLProgressElement> progress = new HTMLProgressElement(document); 55 RawPtr<HTMLProgressElement> progress = new HTMLProgressElement(document);
56 progress->ensureUserAgentShadowRoot(); 56 progress->ensureUserAgentShadowRoot();
57 return progress.release(); 57 return progress.release();
58 } 58 }
59 59
60 LayoutObject* HTMLProgressElement::createLayoutObject(const ComputedStyle& style ) 60 LayoutObject* HTMLProgressElement::createLayoutObject(const ComputedStyle& style )
61 { 61 {
62 if (!style.hasAppearance() || openShadowRoot()) 62 if (!style.hasAppearance()) {
63 UseCounter::count(document(), UseCounter::ProgressElementWithNoneAppeara nce);
63 return LayoutObject::createObject(this, style); 64 return LayoutObject::createObject(this, style);
65 }
66 UseCounter::count(document(), UseCounter::ProgressElementWithProgressBarAppe arance);
64 return new LayoutProgress(this); 67 return new LayoutProgress(this);
65 } 68 }
66 69
67 LayoutProgress* HTMLProgressElement::layoutProgress() const 70 LayoutProgress* HTMLProgressElement::layoutProgress() const
68 { 71 {
69 if (layoutObject() && layoutObject()->isProgress()) 72 if (layoutObject() && layoutObject()->isProgress())
70 return toLayoutProgress(layoutObject()); 73 return toLayoutProgress(layoutObject());
71 74
72 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje ct(); 75 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje ct();
73 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress() ); 76 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress() );
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 return !isDeterminate(); 172 return !isDeterminate();
170 } 173 }
171 174
172 DEFINE_TRACE(HTMLProgressElement) 175 DEFINE_TRACE(HTMLProgressElement)
173 { 176 {
174 visitor->trace(m_value); 177 visitor->trace(m_value);
175 LabelableElement::trace(visitor); 178 LabelableElement::trace(visitor);
176 } 179 }
177 180
178 } // namespace blink 181 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698