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_cssdatatable.h" | 7 #include "xfa/fde/css/fde_cssdatatable.h" |
8 | 8 |
9 #include "core/fxcrt/fx_ext.h" | 9 #include "core/fxcrt/fx_ext.h" |
10 #include "xfa/fgas/crt/fgas_codepage.h" | 10 #include "xfa/fgas/crt/fgas_codepage.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 {0x031B47FE, 0xff000080}, {0x0BB8DF5B, 0xffff0000}, | 546 {0x031B47FE, 0xff000080}, {0x0BB8DF5B, 0xffff0000}, |
547 {0x0D82A78C, 0xff800000}, {0x2ACC82E8, 0xff00ffff}, | 547 {0x0D82A78C, 0xff800000}, {0x2ACC82E8, 0xff00ffff}, |
548 {0x2D083986, 0xff008080}, {0x4A6A6195, 0xffc0c0c0}, | 548 {0x2D083986, 0xff008080}, {0x4A6A6195, 0xffc0c0c0}, |
549 {0x546A8EF3, 0xff808080}, {0x65C9169C, 0xffffa500}, | 549 {0x546A8EF3, 0xff808080}, {0x65C9169C, 0xffffa500}, |
550 {0x8422BB61, 0xffffffff}, {0x9271A558, 0xff800080}, | 550 {0x8422BB61, 0xffffffff}, {0x9271A558, 0xff800080}, |
551 {0xA65A3EE3, 0xffff00ff}, {0xB1345708, 0xff0000ff}, | 551 {0xA65A3EE3, 0xffff00ff}, {0xB1345708, 0xff0000ff}, |
552 {0xB6D2CF1F, 0xff808000}, {0xD19B5E1C, 0xffffff00}, | 552 {0xB6D2CF1F, 0xff808000}, {0xD19B5E1C, 0xffffff00}, |
553 {0xDB64391D, 0xff000000}, {0xF616D507, 0xff00ff00}, | 553 {0xDB64391D, 0xff000000}, {0xF616D507, 0xff00ff00}, |
554 {0xF6EFFF31, 0xff008000}, | 554 {0xF6EFFF31, 0xff008000}, |
555 }; | 555 }; |
556 static const FDE_CSSPERSUDOTABLE g_FDE_CSSPersudoType[] = { | 556 static const FDE_CSSPSEUDOTABLE g_FDE_CSSPseudoType[] = { |
557 {FDE_CSSPERSUDO_After, L":after", 0x16EE1FEC}, | 557 {FDE_CSSPSEUDO_After, L":after", 0x16EE1FEC}, |
558 {FDE_CSSPERSUDO_Before, L":before", 0x7DCDDE2D}, | 558 {FDE_CSSPSEUDO_Before, L":before", 0x7DCDDE2D}, |
559 }; | 559 }; |
560 FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo) { | 560 FDE_LPCCSSPSEUDOTABLE FDE_GetCSSPseudoByEnum(FDE_CSSPSEUDO ePseudo) { |
561 return (ePersudo < FDE_CSSPERSUDO_NONE) ? (g_FDE_CSSPersudoType + ePersudo) | 561 return (ePseudo < FDE_CSSPSEUDO_NONE) ? (g_FDE_CSSPseudoType + ePseudo) |
562 : nullptr; | 562 : nullptr; |
563 } | 563 } |
564 const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByName( | 564 const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByName( |
565 const CFX_WideStringC& wsName) { | 565 const CFX_WideStringC& wsName) { |
566 ASSERT(!wsName.IsEmpty()); | 566 ASSERT(!wsName.IsEmpty()); |
567 uint32_t dwHash = FX_HashCode_GetW(wsName, true); | 567 uint32_t dwHash = FX_HashCode_GetW(wsName, true); |
568 int32_t iEnd = FDE_CSSPROPERTY_MAX - 1; | 568 int32_t iEnd = FDE_CSSPROPERTY_MAX - 1; |
569 int32_t iMid, iStart = 0; | 569 int32_t iMid, iStart = 0; |
570 uint32_t dwMid; | 570 uint32_t dwMid; |
571 do { | 571 do { |
572 iMid = (iStart + iEnd) / 2; | 572 iMid = (iStart + iEnd) / 2; |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 | 960 |
961 int32_t CFDE_CSSPrimitiveValue::CountArgs() const { | 961 int32_t CFDE_CSSPrimitiveValue::CountArgs() const { |
962 ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function); | 962 ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function); |
963 return m_pFunction->CountArgs(); | 963 return m_pFunction->CountArgs(); |
964 } | 964 } |
965 | 965 |
966 IFDE_CSSValue* CFDE_CSSPrimitiveValue::GetArgs(int32_t index) const { | 966 IFDE_CSSValue* CFDE_CSSPrimitiveValue::GetArgs(int32_t index) const { |
967 ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function); | 967 ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function); |
968 return m_pFunction->GetArgs(index); | 968 return m_pFunction->GetArgs(index); |
969 } | 969 } |
OLD | NEW |