~ubuntu-branches/ubuntu/trusty/fennec/trusty

« back to all changes in this revision

Viewing changes to mobile/chrome/content/notification.xml

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-01-26 20:31:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110126203140-zcg54f8ost2vmrxr
Tags: 4.0~b3-0ubuntu1
* New upstream release v4.0 B3 (FENNEC_4_0b3_RELEASE)

* Update build-depends for xulrunner-2.0
  - update debian/control
* Update mozclient to point to the mobile-browser repo
  - update debian/mozclient/fennec.conf
* Build with "--with-system-libxul"
  - update debian/rules
* Add launcher script, based on the one used in Firefox but with the
  unnecessary bits stripped out
  - add debian/fennec.sh
  - update debian/rules
* Refresh patches for new version
  - update debian/patches/bump_gecko_versions_in_application.ini.patch
  - update debian/patches/ubuntu_codes_google.patch
  - update debian/patches/installer.patch
* Drop unneeded patches
  - remove debian/patches/nspr_flags_by_pkg_config_hack.patch
  - remove debian/patches/xul191_l10n.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<bindings
9
9
    xmlns="http://www.mozilla.org/xbl"
10
10
    xmlns:xbl="http://www.mozilla.org/xbl"
11
 
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
11
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
 
12
    xmlns:html="http://www.w3.org/1999/xhtml">
 
13
 
 
14
  <binding id="stacked-notificationbox" extends="chrome://global/content/bindings/notification.xml#notificationbox">
 
15
    <content>
 
16
      <xul:stack xbl:inherits="hidden=notificationshidden">
 
17
        <xul:spacer/>
 
18
        <children includes="notification"/>
 
19
      </xul:stack>
 
20
      <xul:stack flex="1">
 
21
        <children/>
 
22
        <html:canvas anonid="content-overlay"/>
 
23
        <html:div flex="1" class="input-overlay" anonid="input-overlay"/>
 
24
      </xul:stack>
 
25
    </content>
 
26
    <implementation>
 
27
      <property name="inputHandler">
 
28
        <getter>
 
29
          return document.getAnonymousElementByAttribute(this, "anonid", "input-overlay");
 
30
        </getter>
 
31
      </property>
 
32
 
 
33
      <property name="overlay">
 
34
        <getter>
 
35
          return document.getAnonymousElementByAttribute(this, "anonid", "content-overlay");
 
36
        </getter>
 
37
      </property>
 
38
 
 
39
      <property name="customDragger">
 
40
        <getter>
 
41
          return this.parentNode.customDragger;
 
42
        </getter>
 
43
      </property>
 
44
    </implementation>
 
45
  </binding>
12
46
 
13
47
  <binding id="notification" extends="chrome://global/content/bindings/notification.xml#notification">
14
48
    <resources>
34
68
    </content>
35
69
 
36
70
    <implementation implements="nsIDOMEventListener">
37
 
      <constructor>
38
 
        <![CDATA[
39
 
          this._chromeTab = Browser.selectedTab.chromeTab;
40
 
          document.addEventListener("TabSelect", this, true);
41
 
          document.addEventListener("TabClose", this, true);
42
 
        ]]>
43
 
      </constructor>
44
 
 
45
71
      // We need to override the close method here, otherwise the destructor
46
72
      // is not called on removeChild (see bug 230086)
47
73
      <method name="close">
48
74
        <body>
49
75
          <![CDATA[
50
76
            var control = this.control;
51
 
            if (control) {
52
 
              document.removeEventListener("TabClose", this, true);
53
 
              document.removeEventListener("TabSelect", this, true);
 
77
            if (control)
54
78
              control.removeNotification(this);
55
 
            } else {
56
 
              this.hidden = true;
57
 
            }
58
79
            
59
80
            // Fire an event when closing a notification
60
81
            let event = document.createEvent("Events");
63
84
          ]]>
64
85
        </body>
65
86
      </method>
66
 
 
67
 
      <method name="handleEvent">
68
 
        <parameter name="aEvent"/>
69
 
        <body>
70
 
          <![CDATA[
71
 
            switch(aEvent.type) {
72
 
              case "TabSelect":
73
 
                if (this._chromeTab == aEvent.target)
74
 
                  this.hidden = false;
75
 
                else
76
 
                  this.hidden = true;
77
 
                break;
78
 
 
79
 
              case "TabClose":
80
 
                if (this._chromeTab == aEvent.target)
81
 
                  this.close();
82
 
                break;
83
 
            }
84
 
          ]]>
85
 
        </body>
86
 
      </method>      
87
87
    </implementation>
88
88
  </binding>
89
89
 
90
90
  <binding id="geo-notification" extends="chrome://browser/content/notification.xml#notification">
91
 
 
92
91
    <resources>
93
92
      <stylesheet src="chrome://browser/skin/notification.css"/>
94
93
    </resources>