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

Unified Diff: Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1206793002: getComputedStyle(e).quotes always return empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating as per review comments Created 5 years, 6 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 | « LayoutTests/fast/css/quotes-computedstyle-expected.txt ('k') | Source/core/style/QuotesData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/ComputedStyleCSSValueMapping.cpp
diff --git a/Source/core/css/ComputedStyleCSSValueMapping.cpp b/Source/core/css/ComputedStyleCSSValueMapping.cpp
index 4c8e0e406815643bab17c6902817f83b2cf36407..8568bdd0f917eb31ecf3df7a7b588210068770f9 100644
--- a/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -50,6 +50,7 @@
#include "core/style/ContentData.h"
#include "core/style/ComputedStyle.h"
#include "core/style/PathStyleMotionPath.h"
+#include "core/style/QuotesData.h"
#include "core/style/ShadowList.h"
#include "platform/LengthFunctions.h"
@@ -1911,6 +1912,20 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
}
case CSSPropertyPosition:
return cssValuePool().createValue(style.position());
+ case CSSPropertyQuotes:
+ if (!style.quotes()) {
+ // TODO(ramya.v): We should return the quote values that we're actually using.
+ return nullptr;
+ }
+ if (style.quotes()->size()) {
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ for (int i = 0; i < style.quotes()->size(); i++) {
+ list->append(cssValuePool().createValue(style.quotes()->getOpenQuote(i), CSSPrimitiveValue::CSS_STRING));
+ list->append(cssValuePool().createValue(style.quotes()->getCloseQuote(i), CSSPrimitiveValue::CSS_STRING));
+ }
+ return list.release();
+ }
+ return cssValuePool().createIdentifierValue(CSSValueNone);
case CSSPropertyRight:
return valueForPositionOffset(style, CSSPropertyRight, layoutObject);
case CSSPropertyWebkitRubyPosition:
@@ -2482,7 +2497,6 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
// Other unimplemented properties.
case CSSPropertyPage: // for @page
- case CSSPropertyQuotes: // FIXME: needs implementation
case CSSPropertySize: // for @page
return nullptr;
« no previous file with comments | « LayoutTests/fast/css/quotes-computedstyle-expected.txt ('k') | Source/core/style/QuotesData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698