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

Unified Diff: Source/WebCore/rendering/RenderQuote.cpp

Issue 10919103: Merge 125476 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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 | « Source/WebCore/rendering/RenderQuote.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderQuote.cpp
===================================================================
--- Source/WebCore/rendering/RenderQuote.cpp (revision 127623)
+++ Source/WebCore/rendering/RenderQuote.cpp (working copy)
@@ -1,5 +1,6 @@
/**
* Copyright (C) 2011 Nokia Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -56,16 +57,165 @@
DEFINE_STATIC_LOCAL(QuotesMap, staticQuotesMap, ());
if (staticQuotesMap.size())
return staticQuotesMap;
- // FIXME: Expand this table to include all the languages in https://bug-3234-attachments.webkit.org/attachment.cgi?id=2135
- staticQuotesMap.set("en", QuotesData::create(U("\x201C"), U("\x201D"), U("\x2018"), U("\x2019")).leakRef());
- staticQuotesMap.set("no", QuotesData::create(U("\x00AB"), U("\x00BB"), U("\x2039"), U("\x203A")).leakRef());
- staticQuotesMap.set("ro", QuotesData::create(U("\x201E"), U("\x201D")).leakRef());
- staticQuotesMap.set("ru", QuotesData::create(U("\x00AB"), U("\x00BB"), U("\x201E"), U("\x201C")).leakRef());
+
+ // Table of quotes from http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#quotes
+ #define QUOTES_LANG(lang, o1, c1, o2, c2) staticQuotesMap.set(lang, QuotesData::create(U(o1), U(c1), U(o2), U(c2)).leakRef())
+ QUOTES_LANG("af", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("agq", "\x201e", "\x201d", "\x201a", "\x2019");
+ QUOTES_LANG("ak", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("am", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("ar", "\x201d", "\x201c", "\x2019", "\x2018");
+ QUOTES_LANG("asa", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("az-Cyrl", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("bas", "\x00ab", "\x00bb", "\x201e", "\x201c");
+ QUOTES_LANG("bem", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("bez", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("bg", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("bm", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("bn", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("br", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("brx", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("bs-Cyrl", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("ca", "\x201c", "\x201d", "\x00ab", "\x00bb");
+ QUOTES_LANG("cgg", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("chr", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("cs", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("da", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("dav", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("de", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("de-CH", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("dje", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("dua", "\x00ab", "\x00bb", "\x2018", "\x2019");
+ QUOTES_LANG("dyo", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("dz", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ebu", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ee", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("el", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("en", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("en-GB", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("es", "\x201c", "\x201d", "\x00ab", "\x00bb");
+ QUOTES_LANG("et", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("eu", "\x201c", "\x201d", "\x00ab", "\x00bb");
+ QUOTES_LANG("ewo", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("fa", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("ff", "\x201e", "\x201d", "\x201a", "\x2019");
+ QUOTES_LANG("fi", "\x201d", "\x201d", "\x2019", "\x2019");
+ QUOTES_LANG("fr", "\x00ab", "\x00bb", "\x00ab", "\x00bb");
+ QUOTES_LANG("fr-CA", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("fr-CH", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("gsw", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("gu", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("guz", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ha", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("he", "\x0022", "\x0022", "\x0027", "\x0027");
+ QUOTES_LANG("hi", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("hr", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("hu", "\x201e", "\x201d", "\x00bb", "\x00ab");
+ QUOTES_LANG("id", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ig", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("it", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("ja", "\x300c", "\x300d", "\x300e", "\x300f");
+ QUOTES_LANG("jgo", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("jmc", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("kab", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("kam", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("kde", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("kea", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("khq", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ki", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("kkj", "\x00ab", "\x00bb", "\x2039", "\x203a");
+ QUOTES_LANG("kln", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("km", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("kn", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ko", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ksb", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ksf", "\x00ab", "\x00bb", "\x2018", "\x2019");
+ QUOTES_LANG("lag", "\x201d", "\x201d", "\x2019", "\x2019");
+ QUOTES_LANG("lg", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ln", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("lo", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("lt", "\x201e", "\x201c", "\x201e", "\x201c");
+ QUOTES_LANG("lu", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("luo", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("luy", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("lv", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mas", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mer", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mfe", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mg", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("mgo", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mk", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("ml", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mr", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ms", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("mua", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("my", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("naq", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("nb", "\x00ab", "\x00bb", "\x2018", "\x2019");
+ QUOTES_LANG("nd", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("nl", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("nmg", "\x201e", "\x201d", "\x00ab", "\x00bb");
+ QUOTES_LANG("nn", "\x00ab", "\x00bb", "\x2018", "\x2019");
+ QUOTES_LANG("nnh", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("nus", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("nyn", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("pl", "\x201e", "\x201d", "\x00ab", "\x00bb");
+ QUOTES_LANG("pt", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("pt-PT", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("rn", "\x201d", "\x201d", "\x2019", "\x2019");
+ QUOTES_LANG("ro", "\x201e", "\x201d", "\x00ab", "\x00bb");
+ QUOTES_LANG("rof", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ru", "\x00ab", "\x00bb", "\x201e", "\x201c");
+ QUOTES_LANG("rw", "\x00ab", "\x00bb", "\x2018", "\x2019");
+ QUOTES_LANG("rwk", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("saq", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("sbp", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("seh", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ses", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("sg", "\x00ab", "\x00bb", "\x201c", "\x201d");
+ QUOTES_LANG("shi", "\x00ab", "\x00bb", "\x201e", "\x201d");
+ QUOTES_LANG("shi-Tfng", "\x00ab", "\x00bb", "\x201e", "\x201d");
+ QUOTES_LANG("si", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("sk", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("sl", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("sn", "\x201d", "\x201d", "\x2019", "\x2019");
+ QUOTES_LANG("so", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("sq", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("sr", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("sr-Latn", "\x201e", "\x201c", "\x201a", "\x2018");
+ QUOTES_LANG("sv", "\x201d", "\x201d", "\x2019", "\x2019");
+ QUOTES_LANG("sw", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("swc", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ta", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("te", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("teo", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("th", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("ti-ER", "\x2018", "\x2019", "\x201c", "\x201d");
+ QUOTES_LANG("to", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("tr", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("twq", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("tzm", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("uk", "\x00ab", "\x00bb", "\x201e", "\x201c");
+ QUOTES_LANG("ur", "\x201d", "\x201c", "\x2019", "\x2018");
+ QUOTES_LANG("vai", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("vai-Latn", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("vi", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("vun", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("xh", "\x2018", "\x2019", "\x201c", "\x201d");
+ QUOTES_LANG("xog", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("yav", "\x00ab", "\x00bb", "\x00ab", "\x00bb");
+ QUOTES_LANG("yo", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("zh", "\x201c", "\x201d", "\x2018", "\x2019");
+ QUOTES_LANG("zh-Hant", "\x300c", "\x300d", "\x300e", "\x300f");
+ QUOTES_LANG("zu", "\x201c", "\x201d", "\x2018", "\x2019");
+ #undef QUOTES_LANG
+
return staticQuotesMap;
}
static const QuotesData* basicQuotesData()
{
+ // FIXME: The default quotes should be the fancy quotes for "en".
static const QuotesData* staticBasicQuotes = QuotesData::create(U("\""), U("\""), U("'"), U("'")).leakRef();
return staticBasicQuotes;
}
« no previous file with comments | « Source/WebCore/rendering/RenderQuote.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698