| OLD | NEW |
| (Empty) | |
| 1 /* Copyright 2011 The Native Client SDK Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can |
| 3 * be found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /* These div ids are used together to implement a work-around for event |
| 7 * bubbling when using a NaCl module. Using these div ids allows you to |
| 8 * handle user events in the browser, instead of the events being passed into |
| 9 * the NaCl <embed> element. The event layer stacks on top of the NaCl layer |
| 10 * so that it captures the user events, like this: |
| 11 * |--------------------| |
| 12 * | |----------------| | |
| 13 * | | |------------| | | |
| 14 * | | | Event layer| | | |
| 15 * | | |------------| | | |
| 16 * | | NaCl layer | | |
| 17 * | |----------------| | |
| 18 * | Background layer | |
| 19 * |--------------------| |
| 20 */ |
| 21 |
| 22 /* The background layer. This establishes a Z-stack for the event and NaCl |
| 23 * layers. |
| 24 */ |
| 25 .background_layer { |
| 26 position: relative; |
| 27 z-index: 0; |
| 28 } |
| 29 |
| 30 /* The event layer. This layer has to completely cover the NaCl layer, and |
| 31 * have a higher z-order. This layer captures the user events and doesn't |
| 32 * let them get through to the NaCl layer. Note that |width| and |height| |
| 33 * need to match the corresponding attributes of the <embed> tag that |
| 34 * contains the NaCl module. |
| 35 */ |
| 36 .event_layer { |
| 37 position: absolute; |
| 38 top: 0; |
| 39 left: 0; |
| 40 width: 400; |
| 41 height: 400; |
| 42 z-index: 2; |
| 43 } |
| 44 |
| 45 /* The NaCl layer. This layer contains the NaCl module. It must have a |
| 46 * lower z-index than the event layer. |
| 47 */ |
| 48 .nacl_module_layer { |
| 49 position: absolute; |
| 50 top: 0; |
| 51 left: 0; |
| 52 z-index: 1; |
| 53 } |
| OLD | NEW |