diff options
author | Lei Zhang <thestig@chromium.org> | 2017-06-26 15:28:15 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-30 18:51:27 +0000 |
commit | f3024c3b1fbbfe442f93da3459ea79e817d5b8fe (patch) | |
tree | 86652e7b9fc74c60bb966883d02ea14ca0d2995b /xfa/fde/css/cfde_cssstyleselector.cpp | |
parent | d24236a926deeb8b9589c330c27dbd300b7f8c9d (diff) | |
download | pdfium-f3024c3b1fbbfe442f93da3459ea79e817d5b8fe.tar.xz |
Split CFDE_CSSTextBuf in two.
For the external buffer use case, use a CFDE_CSSExtTextBuf instead. With
the split, both text buffer implementations are simpler now. As a
result, it becomes obvious where it never fails. Adjust callers
accordingly.
Change-Id: I7b53d36593172487b8c939e6a55af2437ea4ee5a
Reviewed-on: https://pdfium-review.googlesource.com/6932
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fde/css/cfde_cssstyleselector.cpp')
-rw-r--r-- | xfa/fde/css/cfde_cssstyleselector.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp index 461192e976..2fe306faec 100644 --- a/xfa/fde/css/cfde_cssstyleselector.cpp +++ b/xfa/fde/css/cfde_cssstyleselector.cpp @@ -142,10 +142,8 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl, const CFX_WideString& style) { ASSERT(pDecl && !style.IsEmpty()); - auto pSyntax = pdfium::MakeUnique<CFDE_CSSSyntaxParser>(); - if (!pSyntax->Init(style.c_str(), style.GetLength(), 32, true)) - return; - + auto pSyntax = pdfium::MakeUnique<CFDE_CSSSyntaxParser>( + style.c_str(), style.GetLength(), 32, true); int32_t iLen2 = 0; const FDE_CSSPropertyTable* table = nullptr; CFX_WideString wsName; |