Index: Source/core/html/HTMLTablePartElement.cpp |
diff --git a/Source/core/html/HTMLTablePartElement.cpp b/Source/core/html/HTMLTablePartElement.cpp |
index 8146ae4181dd70f47a87d4fc148cad51f49046bc..a7740709278d0168b06955356cdf892d68daa4fa 100644 |
--- a/Source/core/html/HTMLTablePartElement.cpp |
+++ b/Source/core/html/HTMLTablePartElement.cpp |
@@ -34,6 +34,7 @@ |
#include "core/dom/NodeRenderingTraversal.h" |
#include "core/html/HTMLTableElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
+#include "platform/weborigin/Referrer.h" |
namespace WebCore { |
@@ -52,8 +53,11 @@ void HTMLTablePartElement::collectStyleForPresentationAttribute(const QualifiedN |
addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); |
else if (name == backgroundAttr) { |
String url = stripLeadingAndTrailingHTMLSpaces(value); |
- if (!url.isEmpty()) |
- style->setProperty(CSSProperty(CSSPropertyBackgroundImage, CSSImageValue::create(url, document().completeURL(url)))); |
+ if (!url.isEmpty()) { |
+ RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create(url, document().completeURL(url)); |
+ imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().referrerPolicy())); |
+ style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValue.release())); |
+ } |
} else if (name == valignAttr) { |
if (equalIgnoringCase(value, "top")) |
addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign, CSSValueTop); |