Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: fpdfsdk/fsdk_mgr.cpp

Issue 2273893002: Display content of the annotation when mouse hover. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Display content of the annotation when mouse hover. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/fsdk_mgr.cpp
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 9f16098e12459ac8018e6f62bdb9e43e719885bf..fda00e0e6ea2082d9717408f2288e4a02e30a8f3 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -602,6 +602,8 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFXAnnotAtPoint(FX_FLOAT pageX,
CPDFSDK_AnnotIterator annotIterator(this, false);
while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) {
CFX_FloatRect rc = pAnnotMgr->Annot_OnGetViewBBox(this, pSDKAnnot);
+ if (pSDKAnnot->GetAnnotSubtype() == "Popup")
+ continue;
if (rc.Contains(pageX, pageY))
return pSDKAnnot;
}
@@ -833,13 +835,13 @@ FX_BOOL CPDFSDK_PageView::OnLButtonUp(const CFX_FloatPoint& point,
FX_BOOL CPDFSDK_PageView::OnMouseMove(const CFX_FloatPoint& point, int nFlag) {
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
- if (CPDFSDK_Annot* pFXAnnot = GetFXWidgetAtPoint(point.x, point.y)) {
+ if (CPDFSDK_Annot* pFXAnnot = GetFXAnnotAtPoint(point.x, point.y)) {
if (m_CaptureWidget && m_CaptureWidget != pFXAnnot) {
m_bExitWidget = TRUE;
m_bEnterWidget = FALSE;
pAnnotHandlerMgr->Annot_OnMouseExit(this, m_CaptureWidget, nFlag);
}
- m_CaptureWidget = (CPDFSDK_Widget*)pFXAnnot;
+ m_CaptureWidget = pFXAnnot;
m_bOnWidget = TRUE;
if (!m_bEnterWidget) {
m_bEnterWidget = TRUE;

Powered by Google App Engine
This is Rietveld 408576698