summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssdatatable.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-23 13:54:53 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-23 19:48:54 +0000
commit6414b273506f97012f82c8a32c020b483d5df31a (patch)
treef790a25f03e78fe084ee22cb16418d95deaf3dd3 /xfa/fde/css/fde_cssdatatable.cpp
parenta0b2d23d1121202d3821291483943a47a3c9e32e (diff)
downloadpdfium-6414b273506f97012f82c8a32c020b483d5df31a.tar.xz
Cleanup CSS parsing
This Cl removes unused CSS parsing code. The only caller of CFDE_CSSStyleSheet::LoadeBuffer is from CXFA_TextParser which provides a static string. So, we know there are no Media rules, Import rules, FontFace rules or Page rules in the input style. These rules are also not allowed in inline styles. This CL removes the supporting code. Change-Id: I3a559352b2dd0769c465cbd3da40d1db5f9577b0 Reviewed-on: https://pdfium-review.googlesource.com/2330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssdatatable.cpp')
-rw-r--r--xfa/fde/css/fde_cssdatatable.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp
index fd4ef6bffb..a8a0920afa 100644
--- a/xfa/fde/css/fde_cssdatatable.cpp
+++ b/xfa/fde/css/fde_cssdatatable.cpp
@@ -173,14 +173,6 @@ static_assert(g_iCSSPropertyValueCount ==
static_cast<int32_t>(FDE_CSSPropertyValue::LAST_MARKER),
"Property value table differs in size from property value enum");
-static const FDE_CSSMEDIATYPETABLE g_FDE_CSSMediaTypes[] = {
- {0xF09, FDE_CSSMEDIATYPE_Emboss}, {FDE_CSSMEDIATYPE_Screen},
- {0x536A, FDE_CSSMEDIATYPE_TV}, {0x741D, FDE_CSSMEDIATYPE_Projection},
- {0x76ED, FDE_CSSMEDIATYPE_Print}, {0x7CFB, FDE_CSSMEDIATYPE_Braille},
- {0x9578, FDE_CSSMEDIATYPE_Handheld}, {0xC8E1, FDE_CSSMEDIATYPE_TTY},
- {0xD0F9, FDE_CSSMEDIATYPE_ALL},
-};
-
static const FDE_CSSLengthUnitTable g_FDE_CSSLengthUnits[] = {
{0x0672, FDE_CSSNumberType::EMS},
{0x067D, FDE_CSSNumberType::EXS},
@@ -259,28 +251,6 @@ const FDE_CSSPropertyValueTable* FDE_GetCSSPropertyValueByName(
return nullptr;
}
-const FDE_CSSMEDIATYPETABLE* FDE_GetCSSMediaTypeByName(
- const CFX_WideStringC& wsName) {
- ASSERT(!wsName.IsEmpty());
- uint16_t wHash = FX_HashCode_GetW(wsName, true);
- int32_t iEnd =
- sizeof(g_FDE_CSSMediaTypes) / sizeof(FDE_CSSMEDIATYPETABLE) - 1;
- int32_t iMid, iStart = 0;
- uint16_t uMid;
- do {
- iMid = (iStart + iEnd) / 2;
- uMid = g_FDE_CSSMediaTypes[iMid].wHash;
- if (wHash == uMid) {
- return g_FDE_CSSMediaTypes + iMid;
- } else if (wHash > uMid) {
- iStart = iMid + 1;
- } else {
- iEnd = iMid - 1;
- }
- } while (iStart <= iEnd);
- return nullptr;
-}
-
const FDE_CSSLengthUnitTable* FDE_GetCSSLengthUnitByName(
const CFX_WideStringC& wsName) {
ASSERT(!wsName.IsEmpty());