• Raine Makelainen's avatar
    [embedlite-components] Simplify "mozorientationchange" listener registration. Fixes JB#36210 · 6dd2bc12
    Raine Makelainen authored
    Remove isRegistered guard and let EventListerManager (gecko) to
    take care of this. As we are adding listener for the same listener
    holder with the same type and arguments, only one will be added.
    Due to above unregistering code becomes obsolete. Just guard
    that initial orientation is send only if orientation has
    really changed. The lastOrientation is now initialized as
    "unknown" so that initial content orientation reporting
    Initial content orientation was not reported when web content
    requested a new window.
OrientationChangeHandler.jsm 6.24 KB