OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fde/css/fde_cssstyleselector.h" | 7 #include "xfa/fde/css/fde_cssstyleselector.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 } | 563 } |
564 } else if (eStatus == FDE_CSSSYNTAXSTATUS_PropertyValue) { | 564 } else if (eStatus == FDE_CSSSYNTAXSTATUS_PropertyValue) { |
565 if (args.pProperty != NULL) { | 565 if (args.pProperty != NULL) { |
566 psz = pSyntax->GetCurrentString(iLen); | 566 psz = pSyntax->GetCurrentString(iLen); |
567 if (iLen > 0) { | 567 if (iLen > 0) { |
568 pDecl->AddProperty(&args, psz, iLen); | 568 pDecl->AddProperty(&args, psz, iLen); |
569 } | 569 } |
570 } else if (iLen > 0) { | 570 } else if (iLen > 0) { |
571 psz = pSyntax->GetCurrentString(iLen); | 571 psz = pSyntax->GetCurrentString(iLen); |
572 if (iLen > 0) { | 572 if (iLen > 0) { |
573 pDecl->AddProperty(&args, wsName, wsName.GetLength(), psz, iLen); | 573 pDecl->AddProperty(&args, wsName.c_str(), wsName.GetLength(), psz, |
| 574 iLen); |
574 } | 575 } |
575 } | 576 } |
576 } else { | 577 } else { |
577 break; | 578 break; |
578 } | 579 } |
579 } | 580 } |
580 } | 581 } |
581 pSyntax->Release(); | 582 pSyntax->Release(); |
582 } | 583 } |
583 #define FDE_CSSNONINHERITS (pComputedStyle->m_NonInheritedData) | 584 #define FDE_CSSNONINHERITS (pComputedStyle->m_NonInheritedData) |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 return FDE_CSSTEXTTRANSFORM_LowerCase; | 1780 return FDE_CSSTEXTTRANSFORM_LowerCase; |
1780 default: | 1781 default: |
1781 return FDE_CSSTEXTTRANSFORM_None; | 1782 return FDE_CSSTEXTTRANSFORM_None; |
1782 } | 1783 } |
1783 } | 1784 } |
1784 FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant( | 1785 FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant( |
1785 FDE_CSSPROPERTYVALUE eValue) { | 1786 FDE_CSSPROPERTYVALUE eValue) { |
1786 return eValue == FDE_CSSPROPERTYVALUE_SmallCaps ? FDE_CSSFONTVARIANT_SmallCaps | 1787 return eValue == FDE_CSSPROPERTYVALUE_SmallCaps ? FDE_CSSFONTVARIANT_SmallCaps |
1787 : FDE_CSSFONTVARIANT_Normal; | 1788 : FDE_CSSFONTVARIANT_Normal; |
1788 } | 1789 } |
OLD | NEW |