diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-12-13 18:29:02 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-13 18:29:02 +0000 |
commit | 2614250d4f11ed02033a7da095a1694ece12ab78 (patch) | |
tree | cc41c5770c17ea47537856991fa44cd1e2acfeb8 /xfa/fxfa/cxfa_ffwidgethandler.cpp | |
parent | 14768f3264a4cff8ca0096a27e41f1861b2c422b (diff) | |
download | pdfium-2614250d4f11ed02033a7da095a1694ece12ab78.tar.xz |
Methods are on CJX_Object not CJX_Node now
This CL converts all of the JSNode() to JSObject() calls as all of the
original CJX_Node methods have been moved to CJX_Object. This fixes
potential bad casts from things like CJX_Content which do not inhert
from CJX_Node.
Bug: pdfium:793372
Change-Id: I6c7f63a78f3d47bb6bad74faed3fd8c535bf095e
Reviewed-on: https://pdfium-review.googlesource.com/21090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidgethandler.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidgethandler.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp index 372abffa96..c4483c6a1e 100644 --- a/xfa/fxfa/cxfa_ffwidgethandler.cpp +++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp @@ -314,31 +314,31 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent, CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField); CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption); CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue); - pText->JSNode()->SetContent(L"Button", L"Button", false, false, true); + pText->JSObject()->SetContent(L"Button", L"Button", false, false, true); CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption); - pPara->JSNode()->SetEnum(XFA_Attribute::VAlign, XFA_AttributeEnum::Middle, - false); - pPara->JSNode()->SetEnum(XFA_Attribute::HAlign, XFA_AttributeEnum::Center, - false); + pPara->JSObject()->SetEnum(XFA_Attribute::VAlign, XFA_AttributeEnum::Middle, + false); + pPara->JSObject()->SetEnum(XFA_Attribute::HAlign, XFA_AttributeEnum::Center, + false); CreateFontNode(pCaption); CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField); - pBorder->JSNode()->SetEnum(XFA_Attribute::Hand, XFA_AttributeEnum::Right, - false); + pBorder->JSObject()->SetEnum(XFA_Attribute::Hand, XFA_AttributeEnum::Right, + false); CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder); - pEdge->JSNode()->SetEnum(XFA_Attribute::Stroke, XFA_AttributeEnum::Raised, - false); + pEdge->JSObject()->SetEnum(XFA_Attribute::Stroke, XFA_AttributeEnum::Raised, + false); CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder); CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill); - pColor->JSNode()->SetCData(XFA_Attribute::Value, L"212, 208, 200", false, - false); + pColor->JSObject()->SetCData(XFA_Attribute::Value, L"212, 208, 200", false, + false); CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField); - pBind->JSNode()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None, - false); + pBind->JSObject()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None, + false); return pField; } @@ -358,8 +358,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateRadioButton(CXFA_Node* pParent, CXFA_Node* pField = CreateField(XFA_Element::CheckButton, pParent, pBefore); CXFA_Node* pUi = pField->GetFirstChildByClass(XFA_Element::Ui); CXFA_Node* pWidget = pUi->GetFirstChildByClass(XFA_Element::CheckButton); - pWidget->JSNode()->SetEnum(XFA_Attribute::Shape, XFA_AttributeEnum::Round, - false); + pWidget->JSObject()->SetEnum(XFA_Attribute::Shape, XFA_AttributeEnum::Round, + false); return pField; } @@ -402,10 +402,10 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateListBox(CXFA_Node* pParent, CXFA_Node* pField = CreateDropdownList(pParent, pBefore); CXFA_Node* pUi = pField->GetNodeItem(XFA_NODEITEM_FirstChild); CXFA_Node* pListBox = pUi->GetNodeItem(XFA_NODEITEM_FirstChild); - pListBox->JSNode()->SetEnum(XFA_Attribute::Open, XFA_AttributeEnum::Always, - false); - pListBox->JSNode()->SetEnum(XFA_Attribute::CommitOn, XFA_AttributeEnum::Exit, - false); + pListBox->JSObject()->SetEnum(XFA_Attribute::Open, XFA_AttributeEnum::Always, + false); + pListBox->JSObject()->SetEnum(XFA_Attribute::CommitOn, + XFA_AttributeEnum::Exit, false); return pField; } @@ -418,8 +418,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePasswordEdit(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateField(XFA_Element::PasswordEdit, pParent, pBefore); CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField); - pBind->JSNode()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None, - false); + pBind->JSObject()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None, + false); return pField; } @@ -513,8 +513,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_Element eElement, CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const { CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent); - pFont->JSNode()->SetCData(XFA_Attribute::Typeface, L"Myriad Pro", false, - false); + pFont->JSObject()->SetCData(XFA_Attribute::Typeface, L"Myriad Pro", false, + false); return pFont; } @@ -523,21 +523,21 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, float fInsets[4]) const { CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent); if (dwFlags & 0x01) - pMargin->JSNode()->SetMeasure(XFA_Attribute::LeftInset, - CXFA_Measurement(fInsets[0], XFA_Unit::Pt), - false); + pMargin->JSObject()->SetMeasure(XFA_Attribute::LeftInset, + CXFA_Measurement(fInsets[0], XFA_Unit::Pt), + false); if (dwFlags & 0x02) - pMargin->JSNode()->SetMeasure(XFA_Attribute::TopInset, - CXFA_Measurement(fInsets[1], XFA_Unit::Pt), - false); + pMargin->JSObject()->SetMeasure(XFA_Attribute::TopInset, + CXFA_Measurement(fInsets[1], XFA_Unit::Pt), + false); if (dwFlags & 0x04) - pMargin->JSNode()->SetMeasure(XFA_Attribute::RightInset, - CXFA_Measurement(fInsets[2], XFA_Unit::Pt), - false); + pMargin->JSObject()->SetMeasure(XFA_Attribute::RightInset, + CXFA_Measurement(fInsets[2], XFA_Unit::Pt), + false); if (dwFlags & 0x08) - pMargin->JSNode()->SetMeasure(XFA_Attribute::BottomInset, - CXFA_Measurement(fInsets[3], XFA_Unit::Pt), - false); + pMargin->JSObject()->SetMeasure(XFA_Attribute::BottomInset, + CXFA_Measurement(fInsets[3], XFA_Unit::Pt), + false); return pMargin; } |