Skip to content

Commit

Permalink
状態保存の処理のミスを修正
Browse files Browse the repository at this point in the history
git-svn-id: http://www.cozmixng.org/repos/piro/splitbrowser/trunk@100 599a83e7-65a4-db11-8015-0010dcdd6dc2
  • Loading branch information
piro committed Jan 29, 2007
1 parent 8a5e5a4 commit 1c17789
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions content/splitbrowser/splitbrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ var SplitBrowser = {
}
}
if (originalContent.localName == 'subbrowser') {
state.content = this.serializeBrowserState(originalContent.browser);
state.content = this.serializeSubBrowserState(originalContent);
state.content.type = 'subbrowser';
state.content.lastWidth = aContainer.lastwidth;
state.content.lastHeight = aContainer.lastheight;
Expand Down Expand Up @@ -584,7 +584,7 @@ var SplitBrowser = {
}
}
if (originalContent.localName == 'subbrowser') {
state.content = this.serializeBrowserState(originalContent.browser);
state.content = this.serializeSubBrowserState(originalContent);
state.content.type = 'subbrowser';
state.content.lastWidth = aContainer.lastwidth;
state.content.lastHeight = aContainer.lastheight;
Expand Down Expand Up @@ -626,13 +626,20 @@ var SplitBrowser = {
return state;
},

serializeSubBrowserState : function(aBrowser) {
var state = this.serializeBrowserState(aBrowser.browser);

state.uri = aBrowser.src;
state.width = aBrowser.boxObject.width;
state.height = aBrowser.boxObject.height;
state.collapsed = aBrowser.contentCollapsed;
state.toolbarMode = (aBrowser.getAttribute('toolbar-mode') == 'vertical' ? 'vertical' : 'horizontal' );

return state;
},

serializeBrowserState : function(aBrowser) {
var state = {
uri : aBrowser.uri,
width : aBrowser.boxObject.width,
height : aBrowser.boxObject.height,
collapsed : aBrowser.contentCollapsed,
toolbarMode : (aBrowser.getAttribute('toolbar-mode') == 'vertical' ? 'vertical' : 'horizontal' ),
textZoom : [aBrowser.markupDocumentViewer.textZoom],
histories : this.serializeBrowserSessionHistories(aBrowser)
};
Expand Down

0 comments on commit 1c17789

Please sign in to comment.