Changeset 25889

Show
Ignore:
Timestamp:
12/05/08 02:46:20 (4 years ago)
Author:
anekos
Message:

フルスクリーン関係の修正
etc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/stella.js

    r25786 r25889  
    127127              : '??:??'); 
    128128 
    129   function storeStyle (target, values) { 
     129  function storeStyle (target, values, overwrite) { 
    130130    let [style, cstyle] = [target.style, content.getComputedStyle(target, '')]; 
    131     let backup = style.__stella_backup = {}; 
     131    let backup = {}; 
    132132    for (let [name, value] in Iterator(values)) { 
    133133      backup[name] = cstyle[name]; 
    134134      style[name] = value; 
    135135    } 
     136    if(overwrite || !style.__stella_backup) 
     137      style.__stella_backup = backup; 
    136138  } 
    137139 
     
    154156    let clicked = 0; 
    155157    let original = {click: obj[click], dblClick: obj[dblClick]}; 
    156     liberator.log(original); 
    157158    obj[click] = function () { 
    158159      let self = this, args = arguments; 
     
    305306 
    306307    toggle: function (name) { 
    307       if (!this.has(name, 'rw')) 
     308      if (!this.has(name, 'rwt')) 
    308309        return; 
    309310      let v = this[name]; 
     
    474475    set fullscreen (value) { 
    475476      value = !!value; 
    476  
    477477      if (this.storage.fullscreen === value) 
    478478        return; 
     
    482482      let self = this, player = this.player, 
    483483          win = content.wrappedJSObject, doc = content.document.wrappedJSObject; 
     484 
     485      if (player.ext_getVideoSize() === 'fit') 
     486        player.ext_setVideoSize('normal'); 
    484487 
    485488      win.toggleMaximizePlayer(); 
     
    539542 
    540543      function turnOff () { 
    541         restoreStyle(content.document.wrappedJSObject.body); 
    542         //restoreStyle(player); 
     544        restoreStyle(doc.body, true); 
     545        restoreStyle(player, true); 
    543546        player.style.marginLeft = ''; 
    544547        player.style.marginTop  = '';