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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp

Issue 2607403002: Disallow setting invalid values for registered properties via CSSOM (Closed)
Patch Set: fix comments Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp b/third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp
index 6423c14eb29e627b0dba368792d7644215206fbe..b3911cc1e6cfe84106f9b57f9047de260d4b9bf0 100644
--- a/third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp
@@ -359,11 +359,11 @@ HTMLMarqueeElement::Metrics HTMLMarqueeElement::getMetrics() {
}
if (isHorizontal()) {
- m_mover->style()->setProperty("width", "-webkit-max-content", "important",
- ASSERT_NO_EXCEPTION);
+ m_mover->style()->setProperty(nullptr, "width", "-webkit-max-content",
+ "important", ASSERT_NO_EXCEPTION);
} else {
- m_mover->style()->setProperty("height", "-webkit-max-content", "important",
- ASSERT_NO_EXCEPTION);
+ m_mover->style()->setProperty(nullptr, "height", "-webkit-max-content",
+ "important", ASSERT_NO_EXCEPTION);
}
CSSStyleDeclaration* moverStyle =
document().domWindow()->getComputedStyle(m_mover, String());
@@ -374,11 +374,9 @@ HTMLMarqueeElement::Metrics HTMLMarqueeElement::getMetrics() {
metrics.marqueeHeight = marqueeStyle->getPropertyValue("height").toDouble();
if (isHorizontal()) {
- m_mover->style()->setProperty("width", "", "important",
- ASSERT_NO_EXCEPTION);
+ m_mover->style()->removeProperty("width", ASSERT_NO_EXCEPTION);
} else {
- m_mover->style()->setProperty("height", "", "important",
- ASSERT_NO_EXCEPTION);
+ m_mover->style()->removeProperty("height", ASSERT_NO_EXCEPTION);
}
return metrics;

Powered by Google App Engine
This is Rietveld 408576698