summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssstylesheet.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-12 10:27:16 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-12 19:22:47 +0000
commit98d00b230aa14924dfde2eba3aaf69f86d18a45b (patch)
treef52e00fa9e69be083ecbfcdf795d534e79f07005 /xfa/fde/css/fde_cssstylesheet.cpp
parent6cf5ecae75a5cd6fea9ae7f4e28cc28abb3e69c6 (diff)
downloadpdfium-98d00b230aa14924dfde2eba3aaf69f86d18a45b.tar.xz
Remove used items from the CSS code.chromium/2980
This Cl cleans up the property and property value definitions which are never used in the FDE CSS parser code. A few other unused methods are also removed. Change-Id: Ib5a316d9c877d87f1d5e0003de4d85d59eab087a Reviewed-on: https://pdfium-review.googlesource.com/2175 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssstylesheet.cpp')
-rw-r--r--xfa/fde/css/fde_cssstylesheet.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index 1c780cd1c1..f48789533c 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -13,54 +13,6 @@
#include "xfa/fde/css/fde_csssyntax.h"
#include "xfa/fgas/crt/fgas_codepage.h"
-IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() {
- static const FX_WCHAR s_pStyle[] =
- L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset,"
- L"h1,h2,h3,h4,h5,h6,noframes,ol,p,ul,center,dir,hr,menu,pre{display:"
- L"block}"
- L"li{display:list-item}head{display:none}table{display:table}tr{display:"
- L"table-row}thead{display:table-header-group}tbody{display:table-row-"
- L"group}tfoot{display:table-footer-group}"
- L"col{display:table-column}colgroup{display:table-column-group}td,th{"
- L"display:table-cell}caption{display:table-caption}th{font-weight:bolder;"
- L"text-align:center}caption{text-align:center}"
- L"body{margin:0}h1{font-size:2em;margin:.67em "
- L"0}h2{font-size:1.5em;margin:.75em 0}h3{font-size:1.17em;margin:.83em "
- L"0}h4,p,blockquote,ul,fieldset,form,ol,dl,dir,menu{margin:1.12em 0}"
- L"h5{font-size:.83em;margin:1.5em 0}h6{font-size:.75em;margin:1.67em "
- L"0}h1,h2,h3,h4,h5,h6,b,strong{font-weight:bolder}blockquote{margin-left:"
- L"40px;margin-right:40px}i,cite,em,var,address{font-style:italic}"
- L"pre,tt,code,kbd,samp{font-family:monospace}pre{white-space:pre}button,"
- L"textarea,input,select{display:inline-block}big{font-size:1.17em}small,"
- L"sub,sup{font-size:.83em}sub{vertical-align:sub}"
- L"sup{vertical-align:super}table{border-spacing:2px}thead,tbody,tfoot{"
- L"vertical-align:middle}td,th,tr{vertical-align:inherit}s,strike,del{"
- L"text-decoration:line-through}hr{border:1px inset silver}"
- L"ol,ul,dir,menu,dd{margin-left:40px}ol{list-style-type:decimal}ol ul,ul "
- L"ol,ul ul,ol "
- L"ol{margin-top:0;margin-bottom:0}u,ins{text-decoration:underline}center{"
- L"text-align:center}"
- L"ruby{display:ruby}rt{display:ruby-text;font-size:.5em}rb{display:ruby-"
- L"base}rbc{display:ruby-base-group}rtc{display:ruby-text-group}"
- L"q:before{content:open-quote}q:after{content:close-quote}"
- L"rp{display:none}";
- return IFDE_CSSStyleSheet::LoadFromBuffer(
- CFX_WideString(), s_pStyle, FXSYS_wcslen(s_pStyle), FX_CODEPAGE_UTF8);
-}
-
-IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(
- const CFX_WideString& szUrl,
- const CFX_RetainPtr<IFGAS_Stream>& pStream,
- uint16_t wCodePage,
- uint32_t dwMediaList) {
- CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
- if (!pStyleSheet->LoadFromStream(szUrl, pStream, wCodePage)) {
- pStyleSheet->Release();
- pStyleSheet = nullptr;
- }
- return pStyleSheet;
-}
-
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(
const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
@@ -143,20 +95,6 @@ IFDE_CSSRule* CFDE_CSSStyleSheet::GetRule(int32_t index) {
return m_RuleArray.GetAt(index);
}
-bool CFDE_CSSStyleSheet::LoadFromStream(
- const CFX_WideString& szUrl,
- const CFX_RetainPtr<IFGAS_Stream>& pStream,
- uint16_t wCodePage) {
- auto pSyntax = pdfium::MakeUnique<CFDE_CSSSyntaxParser>();
- if (pStream->GetCodePage() != wCodePage)
- pStream->SetCodePage(wCodePage);
-
- bool bRet = pSyntax->Init(pStream, 4096) && LoadFromSyntax(pSyntax.get());
- m_wCodePage = wCodePage;
- m_szUrl = szUrl;
- return bRet;
-}
-
bool CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
int32_t iBufSize,