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

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

Issue 1958563002: Do not use LayoutProgress for a UA shadow element of a PROGRESS element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { 60 {
61 if (!style.hasAppearance() || openShadowRoot()) 61 if (!style.hasAppearance() || openShadowRoot())
62 return LayoutObject::createObject(this, style); 62 return LayoutObject::createObject(this, style);
63 return new LayoutProgress(this); 63 return new LayoutProgress(this);
64 } 64 }
65 65
66 LayoutProgress* HTMLProgressElement::layoutProgress() const 66 LayoutProgress* HTMLProgressElement::layoutProgress() const
67 { 67 {
68 if (layoutObject() && layoutObject()->isProgress()) 68 if (layoutObject() && layoutObject()->isProgress())
69 return toLayoutProgress(layoutObject()); 69 return toLayoutProgress(layoutObject());
70 70 return nullptr;
71 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje ct();
72 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress() );
73 return toLayoutProgress(layoutObject);
74 } 71 }
75 72
76 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic String& oldValue, const AtomicString& value) 73 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic String& oldValue, const AtomicString& value)
77 { 74 {
78 if (name == valueAttr) { 75 if (name == valueAttr) {
79 if (oldValue.isNull() != value.isNull()) 76 if (oldValue.isNull() != value.isNull())
80 pseudoStateChanged(CSSSelector::PseudoIndeterminate); 77 pseudoStateChanged(CSSSelector::PseudoIndeterminate);
81 didElementStateChange(); 78 didElementStateChange();
82 } else if (name == maxAttr) { 79 } else if (name == maxAttr) {
83 didElementStateChange(); 80 didElementStateChange();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return !isDeterminate(); 164 return !isDeterminate();
168 } 165 }
169 166
170 DEFINE_TRACE(HTMLProgressElement) 167 DEFINE_TRACE(HTMLProgressElement)
171 { 168 {
172 visitor->trace(m_value); 169 visitor->trace(m_value);
173 LabelableElement::trace(visitor); 170 LabelableElement::trace(visitor);
174 } 171 }
175 172
176 } // namespace blink 173 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/html.css ('k') | third_party/WebKit/Source/core/html/shadow/ProgressShadowElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698