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

Issue 169163004: Allow click events to pass through the toolbar padding. (Closed)

Created:
6 years, 10 months ago by raymes
Modified:
6 years, 10 months ago
Reviewers:
ganetsky1
CC:
ganetsky1, Jelte, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/html-office-public.git@master
Visibility:
Public.

Description

Allow click events to pass through the toolbar padding. Previously triggering the toolbar to be displayed was achieved by adding an event listener to the toolbar and setting an element padding. When the mouse was moved over the padding, an event would be fired on the toolbar and we would display it. However, this also blocks click events from passing through the element to the underlying document. There is no way to ensure that events are passed to all siblings of a node in the DOM. In our case we have something like: <body> <viewer-toolbar>...</viewer-toolbar> <object ... /> </body> In this case, an event will only be fired on either the toolbar or the plugin, depending on which is topmost. We want the toolbar to show when the mouse moves over a region but we always want clicks to pass through to the plugin below. The solution used here is to attach an event listener to the parent listener and manually test if the mouse is moving over the toolbar in order to trigger it being shown. The toolbar is then set to ignore pointer events. This allows events to be dispatched properly. Buttons within the toolbar will recieve all pointer events. This CL also adds the ability to do an "initialFadeIn" of the page indicator and toolbar components, which should remain faded in longer when the page initially loads. BUG=303491 R=ganetsky@chromium.org Committed: c44e28a

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -36 lines) Patch
M elements/viewer-button/viewer-button.css View 1 chunk +1 line, -0 lines 0 comments Download
M elements/viewer-page-indicator/viewer-page-indicator.html View 1 1 chunk +19 lines, -17 lines 0 comments Download
M elements/viewer-toolbar/viewer-toolbar.css View 1 chunk +1 line, -0 lines 0 comments Download
M elements/viewer-toolbar/viewer-toolbar.html View 1 2 3 2 chunks +42 lines, -19 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
raymes
6 years, 10 months ago (2014-02-17 04:28:57 UTC) #1
ganetsky1
https://codereview.chromium.org/169163004/diff/40001/elements/viewer-page-indicator/viewer-page-indicator.html File elements/viewer-page-indicator/viewer-page-indicator.html (right): https://codereview.chromium.org/169163004/diff/40001/elements/viewer-page-indicator/viewer-page-indicator.html#newcode33 elements/viewer-page-indicator/viewer-page-indicator.html:33: } Where is the call to initialFadeIn? https://codereview.chromium.org/169163004/diff/40001/elements/viewer-toolbar/viewer-toolbar.html File ...
6 years, 10 months ago (2014-02-20 20:22:24 UTC) #2
raymes
https://codereview.chromium.org/169163004/diff/40001/elements/viewer-page-indicator/viewer-page-indicator.html File elements/viewer-page-indicator/viewer-page-indicator.html (right): https://codereview.chromium.org/169163004/diff/40001/elements/viewer-page-indicator/viewer-page-indicator.html#newcode33 elements/viewer-page-indicator/viewer-page-indicator.html:33: } It will be called from the owner of ...
6 years, 10 months ago (2014-02-21 03:03:42 UTC) #3
raymes
On 2014/02/21 03:03:42, raymes wrote: > https://codereview.chromium.org/169163004/diff/40001/elements/viewer-page-indicator/viewer-page-indicator.html > File elements/viewer-page-indicator/viewer-page-indicator.html (right): > > https://codereview.chromium.org/169163004/diff/40001/elements/viewer-page-indicator/viewer-page-indicator.html#newcode33 > ...
6 years, 10 months ago (2014-02-25 03:48:53 UTC) #4
ganetsky1
lgtm
6 years, 10 months ago (2014-02-25 04:51:51 UTC) #5
raymes
6 years, 10 months ago (2014-02-25 04:57:06 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 manually as rc44e28a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698