summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index a8de4907e0..8c0b1956fe 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1546,12 +1546,12 @@ CXFA_Font* CXFA_Node::GetOrCreateFont() {
return JSObject()->GetOrCreateProperty<CXFA_Font>(0, XFA_Element::Font);
}
-CXFA_Font* CXFA_Node::GetFont() const {
+CXFA_Font* CXFA_Node::GetFontIfExists() const {
return JSObject()->GetProperty<CXFA_Font>(0, XFA_Element::Font);
}
float CXFA_Node::GetFontSize() const {
- CXFA_Font* font = GetFont();
+ CXFA_Font* font = GetFontIfExists();
float fFontSize = font ? font->GetFontSize() : 10.0f;
return fFontSize < 0.1f ? 10.0f : fFontSize;
}
@@ -1568,7 +1568,7 @@ float CXFA_Node::GetLineHeight() const {
}
FX_ARGB CXFA_Node::GetTextColor() const {
- CXFA_Font* font = GetFont();
+ CXFA_Font* font = GetFontIfExists();
return font ? font->GetColor() : 0xFF000000;
}