| 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 #include <memory> | 10 #include <memory> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 0x00100000, 0x01000000}; | 99 0x00100000, 0x01000000}; |
| 100 for (; pSel; pSel = pSel->GetNextSelector()) { | 100 for (; pSel; pSel = pSel->GetNextSelector()) { |
| 101 FDE_CSSSELECTORTYPE eType = pSel->GetType(); | 101 FDE_CSSSELECTORTYPE eType = pSel->GetType(); |
| 102 if (eType > FDE_CSSSELECTORTYPE_Descendant || | 102 if (eType > FDE_CSSSELECTORTYPE_Descendant || |
| 103 pSel->GetNameHash() != FDE_CSSUNIVERSALHASH) { | 103 pSel->GetNameHash() != FDE_CSSUNIVERSALHASH) { |
| 104 dwPriority += s_Specific[eType]; | 104 dwPriority += s_Specific[eType]; |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr) | 109 CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr) |
| 110 : m_pFontMgr(pFontMgr), m_fDefFontSize(12.0f) { | 110 : m_pFontMgr(pFontMgr), m_fDefFontSize(12.0f) { |
| 111 m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_High] = FDE_CSSSTYLESHEETGROUP_Author; | 111 m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_High] = FDE_CSSSTYLESHEETGROUP_Author; |
| 112 m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_Mid] = FDE_CSSSTYLESHEETGROUP_User; | 112 m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_Mid] = FDE_CSSSTYLESHEETGROUP_User; |
| 113 m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_Low] = | 113 m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_Low] = |
| 114 FDE_CSSSTYLESHEETGROUP_UserAgent; | 114 FDE_CSSSTYLESHEETGROUP_UserAgent; |
| 115 } | 115 } |
| 116 | 116 |
| 117 CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector() { | 117 CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector() { |
| 118 Reset(); | 118 Reset(); |
| 119 } | 119 } |
| (...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 m_MaxBoxSize.Set(FDE_CSSLENGTHUNIT_None); | 1930 m_MaxBoxSize.Set(FDE_CSSLENGTHUNIT_None); |
| 1931 m_eDisplay = FDE_CSSDISPLAY_Inline; | 1931 m_eDisplay = FDE_CSSDISPLAY_Inline; |
| 1932 m_fVerticalAlign = 0.0f; | 1932 m_fVerticalAlign = 0.0f; |
| 1933 m_ColumnCount.Set(FDE_CSSLENGTHUNIT_Auto); | 1933 m_ColumnCount.Set(FDE_CSSLENGTHUNIT_Auto); |
| 1934 m_ColumnGap.Set(FDE_CSSLENGTHUNIT_Normal); | 1934 m_ColumnGap.Set(FDE_CSSLENGTHUNIT_Normal); |
| 1935 m_bColumnRuleColorSame = true; | 1935 m_bColumnRuleColorSame = true; |
| 1936 m_ColumnWidth.Set(FDE_CSSLENGTHUNIT_Auto); | 1936 m_ColumnWidth.Set(FDE_CSSLENGTHUNIT_Auto); |
| 1937 m_ColumnRuleWidth.Set(FDE_CSSLENGTHUNIT_Auto); | 1937 m_ColumnRuleWidth.Set(FDE_CSSLENGTHUNIT_Auto); |
| 1938 m_eTextCombine = FDE_CSSTEXTCOMBINE_None; | 1938 m_eTextCombine = FDE_CSSTEXTCOMBINE_None; |
| 1939 } | 1939 } |
| OLD | NEW |