summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-31 19:54:25 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-31 19:54:25 +0000
commit990c09373b733346a06b03167ca43252cb93e986 (patch)
treed737288e1d7aaee4dfe0519b5db2906e1573538d /xfa/fxfa/parser/cxfa_node.cpp
parent8a9f2e13d13f996c1138b0a0e890bdfffb0633c9 (diff)
downloadpdfium-990c09373b733346a06b03167ca43252cb93e986.tar.xz
Create CXFA_Node::PresenceRequiresSpace
This CL replaces XFA_ItemLayoutProcessor_IsTakingSpace with a PresenceRequiresSpace call on CXFA_Node. Change-Id: Ibf570f25eeb3404d72e87cb62e06a7ad70f0916f Reviewed-on: https://pdfium-review.googlesource.com/24850 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index ec9be78a5c..7cda5cae25 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -4673,3 +4673,11 @@ WideString CXFA_Node::NumericLimit(const WideString& wsValue) {
}
return wsRet;
}
+
+bool CXFA_Node::PresenceRequiresSpace() const {
+ XFA_AttributeEnum ePresence = JSObject()
+ ->TryEnum(XFA_Attribute::Presence, true)
+ .value_or(XFA_AttributeEnum::Visible);
+ return ePresence == XFA_AttributeEnum::Visible ||
+ ePresence == XFA_AttributeEnum::Invisible;
+}