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

Unified Diff: third_party/WebKit/Source/core/css/CSSPageRule.cpp

Issue 1637273003: PageRule should not serialize @page in selectorText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V4 Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/css-element-attribute-js-null-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSPageRule.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPageRule.cpp b/third_party/WebKit/Source/core/css/CSSPageRule.cpp
index bee62d6d835914063f7707246220d33583963272..baa65e82bb150ee350fcc11797a7ccfdd3cf78ce 100644
--- a/third_party/WebKit/Source/core/css/CSSPageRule.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPageRule.cpp
@@ -55,14 +55,11 @@ CSSStyleDeclaration* CSSPageRule::style() const
String CSSPageRule::selectorText() const
{
StringBuilder text;
- text.appendLiteral("@page");
const CSSSelector* selector = m_pageRule->selector();
if (selector) {
String pageSpecification = selector->selectorText();
- if (!pageSpecification.isEmpty() && pageSpecification != starAtom) {
- text.append(' ');
+ if (!pageSpecification.isEmpty() && pageSpecification != starAtom)
rune 2016/01/28 18:15:47 starAtom? That shouldn't be allowed in @page selec
rwlbuis 2016/01/28 22:27:50 I removed it. Must be ancient code!
text.append(pageSpecification);
- }
}
return text.toString();
}
@@ -82,6 +79,7 @@ void CSSPageRule::setSelectorText(const String& selectorText)
String CSSPageRule::cssText() const
{
StringBuilder result;
+ result.appendLiteral("@page ");
result.append(selectorText());
result.appendLiteral(" { ");
rune 2016/01/28 18:15:47 If selectorText() is empty, this results in a doub
rwlbuis 2016/01/28 22:27:50 Done.
String decls = m_pageRule->properties().asText();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/css-element-attribute-js-null-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698