summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-28 08:51:48 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-28 15:27:49 +0000
commit9c392c82abee05ac2fd42e69984e2de8e48b797a (patch)
tree0922ea5a2db6b1d2df95e6129663a00ba47499a7 /xfa
parent94df367590a2ccd4f799df8958ddc014f496edb1 (diff)
downloadpdfium-9c392c82abee05ac2fd42e69984e2de8e48b797a.tar.xz
Simplify some OS checks to PLATFORM checks
This CL simplifies the OS == WIN{32|64} checks to be PLATFORM == WINDOWS checks. Change-Id: I1493d316dd457b0228e4ef39db4cf1d2b8abf97d Reviewed-on: https://pdfium-review.googlesource.com/14870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/cfwl_notedriver.cpp5
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp8
-rw-r--r--xfa/fwl/cfwl_widgetmgr.h8
3 files changed, 10 insertions, 11 deletions
diff --git a/xfa/fwl/cfwl_notedriver.cpp b/xfa/fwl/cfwl_notedriver.cpp
index e6b869da58..9a19f4b8a7 100644
--- a/xfa/fwl/cfwl_notedriver.cpp
+++ b/xfa/fwl/cfwl_notedriver.cpp
@@ -106,15 +106,14 @@ bool CFWL_NoteDriver::SetFocus(CFWL_Widget* pFocus) {
}
void CFWL_NoteDriver::Run() {
-#if _FX_OS_ == _FX_OS_LINUX_ || _FX_OS_ == _FX_OS_WIN32_ || \
- _FX_OS_ == _FX_OS_WIN64_
+#if _FX_OS_ == _FX_OS_LINUX_ || _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
for (;;) {
CFWL_NoteLoop* pTopLoop = GetTopLoop();
if (!pTopLoop || !pTopLoop->ContinueModal())
break;
UnqueueMessageAndProcess(pTopLoop);
}
-#endif
+#endif // _FX_OS_ == _FX_OS_LINUX_ || _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
}
void CFWL_NoteDriver::NotifyTargetHide(CFWL_Widget* pNoteTarget) {
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index e98233bebf..3082b182ad 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -33,9 +33,9 @@ CFWL_WidgetMgr::CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative)
m_pAdapter(pAdapterNative->GetFWLAdapterWidgetMgr()) {
ASSERT(m_pAdapter);
m_mapWidgetItem[nullptr] = pdfium::MakeUnique<Item>();
-#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
m_rtScreen.Reset();
-#endif
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
}
CFWL_WidgetMgr::~CFWL_WidgetMgr() {}
@@ -606,10 +606,10 @@ CFWL_WidgetMgr::Item::Item(CFWL_Widget* widget)
pNext(nullptr),
pWidget(widget),
iRedrawCounter(0)
-#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
,
bOutsideChanged(false)
-#endif
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
{
}
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 550f1d40bf..153d0a903e 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -81,9 +81,9 @@ class CFWL_WidgetMgr {
CFWL_Widget* const pWidget;
std::unique_ptr<CXFA_Graphics> pOffscreen;
int32_t iRedrawCounter;
-#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
bool bOutsideChanged;
-#endif
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
};
CFWL_Widget* GetFirstSiblingWidget(CFWL_Widget* pWidget) const;
@@ -114,9 +114,9 @@ class CFWL_WidgetMgr {
uint32_t m_dwCapability;
std::map<CFWL_Widget*, std::unique_ptr<Item>> m_mapWidgetItem;
UnownedPtr<CXFA_FWLAdapterWidgetMgr> const m_pAdapter;
-#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
CFX_RectF m_rtScreen;
-#endif
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
};
#endif // XFA_FWL_CFWL_WIDGETMGR_H_