зеркало из https://github.com/mozilla/gecko-dev.git
Bug 522529: Diagonal panning is jerky (and a few other issues) [r=mark.finkle]
This commit is contained in:
Родитель
4a0b52eec0
Коммит
ee526cd913
|
@ -193,51 +193,53 @@
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
<!-- Content Area -->
|
<!-- Content Area -->
|
||||||
<scrollbox id="tile-container-container" style="overflow: hidden; -moz-box-orient: vertical;">
|
<scrollbox id="tile-container-container" class="window-width window-height" style="overflow: hidden;">
|
||||||
<!-- Main Toolbar -->
|
<vbox>
|
||||||
<box id="toolbar-container" class="panel-dark toolbar-height">
|
<!-- Main Toolbar -->
|
||||||
<box id="toolbar-moveable-container">
|
<box id="toolbar-container" class="panel-dark toolbar-height">
|
||||||
<toolbar id="toolbar-main" class="panel-dark window-width">
|
<box id="toolbar-moveable-container">
|
||||||
|
<toolbar id="toolbar-main" class="panel-dark window-width">
|
||||||
#ifdef MOZ_PLATFORM_HILDON
|
#ifdef MOZ_PLATFORM_HILDON
|
||||||
<toolbarbutton id="tool-app-switch" class="button-image" oncommand="BrowserUI.switchTask();"/>
|
<toolbarbutton id="tool-app-switch" class="button-image" oncommand="BrowserUI.switchTask();"/>
|
||||||
#endif
|
#endif
|
||||||
<hbox id="urlbar-container" flex="1">
|
<hbox id="urlbar-container" flex="1">
|
||||||
<box id="identity-box"
|
<box id="identity-box"
|
||||||
onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
|
onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
|
||||||
onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
|
onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
|
||||||
<box id="urlbar-image-box">
|
<box id="urlbar-image-box">
|
||||||
<image id="urlbar-throbber"/>
|
<image id="urlbar-throbber"/>
|
||||||
<image id="urlbar-favicon" hidden="true"/>
|
<image id="urlbar-favicon" hidden="true"/>
|
||||||
|
</box>
|
||||||
</box>
|
</box>
|
||||||
</box>
|
<hbox id="urlbar-editarea" flex="1">
|
||||||
<hbox id="urlbar-editarea" flex="1">
|
<textbox id="urlbar-edit"
|
||||||
<textbox id="urlbar-edit"
|
type="autocomplete"
|
||||||
type="autocomplete"
|
autocompletesearch="history"
|
||||||
autocompletesearch="history"
|
autocompletepopup="popup_autocomplete"
|
||||||
autocompletepopup="popup_autocomplete"
|
enablehistory="false"
|
||||||
enablehistory="false"
|
maxrows="6"
|
||||||
maxrows="6"
|
completeselectedindex="true"
|
||||||
completeselectedindex="true"
|
minresultsforpopup="0"
|
||||||
minresultsforpopup="0"
|
flex="1"
|
||||||
flex="1"
|
ontextentered="BrowserUI.goToURI();"
|
||||||
ontextentered="BrowserUI.goToURI();"
|
clickSelectsAll="true"/>
|
||||||
clickSelectsAll="true"/>
|
</hbox>
|
||||||
|
<hbox id="urlbar-icons" mode="view">
|
||||||
|
<toolbarbutton id="tool-reload" class="urlbar-cap-button" command="cmd_reload"/>
|
||||||
|
<toolbarbutton id="tool-stop" class="urlbar-cap-button" command="cmd_stop"/>
|
||||||
|
<toolbarbutton id="tool-go" class="urlbar-cap-button" command="cmd_go"/>
|
||||||
|
</hbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox id="urlbar-icons" mode="view">
|
<toolbarbutton id="tool-app-close" class="urlbar-button button-image" command="cmd_close"/>
|
||||||
<toolbarbutton id="tool-reload" class="urlbar-cap-button" command="cmd_reload"/>
|
</toolbar>
|
||||||
<toolbarbutton id="tool-stop" class="urlbar-cap-button" command="cmd_stop"/>
|
</box>
|
||||||
<toolbarbutton id="tool-go" class="urlbar-cap-button" command="cmd_go"/>
|
|
||||||
</hbox>
|
|
||||||
</hbox>
|
|
||||||
<toolbarbutton id="tool-app-close" class="urlbar-button button-image" command="cmd_close"/>
|
|
||||||
</toolbar>
|
|
||||||
</box>
|
</box>
|
||||||
</box>
|
|
||||||
|
|
||||||
<notificationbox id="notifications"/>
|
<notificationbox id="notifications"/>
|
||||||
|
|
||||||
<!-- Content viewport -->
|
<!-- Content viewport -->
|
||||||
<html:div id="tile-container" class="window-height" style="overflow: hidden;"/>
|
<html:div id="tile-container" style="overflow: hidden;"/>
|
||||||
|
</vbox>
|
||||||
</scrollbox>
|
</scrollbox>
|
||||||
|
|
||||||
<!-- Right toolbar -->
|
<!-- Right toolbar -->
|
||||||
|
|
|
@ -6,12 +6,31 @@ const Ci = Components.interfaces;
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Entry point (must be named "test")
|
// Entry point (must be named "test")
|
||||||
function test() {
|
function test() {
|
||||||
is(window.location.href, "chrome://browser/content/browser.xul", "Main window should be browser.xul");
|
is(window.location.href, "chrome://browser/content/browser.xul", "Main window should be browser.xul");
|
||||||
|
|
||||||
window.focus();
|
window.focus();
|
||||||
|
|
||||||
let browser = Browser.selectedBrowser;
|
let browser = Browser.selectedBrowser;
|
||||||
isnot(browser, null, "Should have a browser");
|
isnot(browser, null, "Should have a browser");
|
||||||
|
|
||||||
is(browser.currentURI.spec, Browser.selectedTab.browser.currentURI.spec, "selectedBrowser == selectedTab.browser");
|
is(browser.currentURI.spec, Browser.selectedTab.browser.currentURI.spec, "selectedBrowser == selectedTab.browser");
|
||||||
|
|
||||||
|
testContentContainerSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testContentContainerSize() {
|
||||||
|
let tiles = document.getElementById("tile-container");
|
||||||
|
let oldtilesstyle = tiles.getAttribute("style");
|
||||||
|
|
||||||
|
try {
|
||||||
|
tiles.style.width = (window.innerWidth + 100) + "px";
|
||||||
|
tiles.style.height = (window.innerHeight + 100) + "px";
|
||||||
|
let container = document.getElementById("tile-container-container");
|
||||||
|
let rect = container.getBoundingClientRect();
|
||||||
|
ok(rect.width == window.innerWidth, "Content container is same width as window");
|
||||||
|
ok(rect.height == window.innerHeight, "Content container is same height as window");
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
tiles.setAttribute("style", oldtilesstyle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче