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

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

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton Created 3 years, 10 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/HTMLTableElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
index 6d507ba3f0712a285d36db17bfa20c961dd39415..25f3a336aaf74344e74fd72cf56224a6804d0d4b 100644
--- a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
@@ -434,7 +434,7 @@ void HTMLTableElement::parseAttribute(
}
}
-static StylePropertySet* createBorderStyle(CSSValueID value) {
+static MutableStylePropertySet* createBorderStyle(CSSValueID value) {
MutableStylePropertySet* style =
MutableStylePropertySet::create(HTMLQuirksMode);
style->setProperty(CSSPropertyBorderTopStyle, value);
@@ -453,7 +453,8 @@ HTMLTableElement::additionalPresentationAttributeStyle() {
// Setting the border to 'hidden' allows it to win over any border
// set on the table's cells during border-conflict resolution.
if (m_rulesAttr != UnsetRules) {
- DEFINE_STATIC_LOCAL(StylePropertySet, solidBorderStyle,
+ ALLOW_UNSAFE_SINGLETON()
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, solidBorderStyle,
(createBorderStyle(CSSValueHidden)));
return &solidBorderStyle;
}
@@ -461,11 +462,13 @@ HTMLTableElement::additionalPresentationAttributeStyle() {
}
if (m_borderColorAttr) {
- DEFINE_STATIC_LOCAL(StylePropertySet, solidBorderStyle,
+ ALLOW_UNSAFE_SINGLETON()
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, solidBorderStyle,
(createBorderStyle(CSSValueSolid)));
return &solidBorderStyle;
}
- DEFINE_STATIC_LOCAL(StylePropertySet, outsetBorderStyle,
+ ALLOW_UNSAFE_SINGLETON()
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, outsetBorderStyle,
(createBorderStyle(CSSValueOutset)));
return &outsetBorderStyle;
}
@@ -547,7 +550,7 @@ const StylePropertySet* HTMLTableElement::additionalCellStyle() {
return m_sharedCellStyle.get();
}
-static StylePropertySet* createGroupBorderStyle(int rows) {
+static MutableStylePropertySet* createGroupBorderStyle(int rows) {
MutableStylePropertySet* style =
MutableStylePropertySet::create(HTMLQuirksMode);
if (rows) {
@@ -569,11 +572,13 @@ const StylePropertySet* HTMLTableElement::additionalGroupStyle(bool rows) {
return nullptr;
if (rows) {
- DEFINE_STATIC_LOCAL(StylePropertySet, rowBorderStyle,
+ ALLOW_UNSAFE_SINGLETON()
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, rowBorderStyle,
(createGroupBorderStyle(true)));
return &rowBorderStyle;
}
- DEFINE_STATIC_LOCAL(StylePropertySet, columnBorderStyle,
+ ALLOW_UNSAFE_SINGLETON()
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, columnBorderStyle,
(createGroupBorderStyle(false)));
return &columnBorderStyle;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698