D12665: Support additional widget actions in PDF Forms
Andre Heinecke
noreply at phabricator.kde.org
Mon May 28 10:01:43 UTC 2018
aheinecke planned changes to this revision.
aheinecke added inline comments.
INLINE COMMENTS
> aacid wrote in formwidgets.cpp:1073
> This still triggers if you press the button inside a form, move the mouse outside the form and release, not sure this is "according to spec", it says "An action to be performed when the mouse button is released inside the annotation’s active area."
> This still triggers if you press the button inside a form, move the mouse outside the form and release, not sure this is "according to spec", it says "An action to be performed when the mouse button is released inside the annotation’s active area."
Right. I also tested with Acrobat and it only triggers if the mouse is released in the annotation area.
> aacid wrote in formwidgets.cpp:1078
> Are you sure this should be an else? Why should activation action only be signaled if there's no mouse release action?
>
> Also, before we only did activation action for buttons, but now we do for lots of other forms, is that on purpose?
> Are you sure this should be an else? Why should activation action only be signaled if there's no mouse release action?
Good question. I checked in the spec and it should be the other way around. I was confused because Adobe Acrobat DC sets the "Mouse Released" action as the "A" entry of the annotation dictonary. This is parsed by poppler as the "Additional Action"
Page 649 (Table 8.44) in the spec Says about the mouse released event:
Note: For backward compatibility the A entry in an annotation dictionary, if present, takes precedence over this entry.
So it should be the other way around. Only execute the mouseReleased action if there is no activation action and execute the activation action otherwise.
I'll change it.
Checkboxes are handled differently because they trigger in the "doActivateAction" so that the action can also be triggered by scripts changing the checked state.
> Also, before we only did activation action for buttons, but now we do for lots of other forms, is that on purpose?
Yes this is on purpose. The activation action is not bound to buttons. I did not find it clearly stated in the spec but If I add a Mouse Release action on a textfield in Acrobat DC it is added as a Mouse Release action.
And the Example from bug306818 uses a mouse action on a read only text field to hide the warning in there.
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D12665
To: aheinecke, #okular
Cc: okular-devel, aacid, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180528/3e07f8c3/attachment-0001.html>
More information about the Okular-devel
mailing list