зеркало из https://github.com/mozilla/pjs.git
Bug 617539 - Fold in nsIFrameLoader_MOZILLA_2_0_BRANCH, r=bz
This commit is contained in:
Родитель
503cc431e0
Коммит
686fbaaabb
|
@ -141,7 +141,7 @@ interface nsIContentViewManager : nsISupports
|
|||
readonly attribute nsIContentView rootContentView;
|
||||
};
|
||||
|
||||
[scriptable, uuid(50a67436-bb44-11df-8d9a-001e37d2764a)]
|
||||
[scriptable, uuid(13c512d6-fba0-402a-9244-fe7941c43965)]
|
||||
interface nsIFrameLoader : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -217,16 +217,23 @@ interface nsIFrameLoader : nsISupports
|
|||
|
||||
attribute boolean delayRemoteDialogs;
|
||||
|
||||
/**
|
||||
* The default rendering mode is synchronous scrolling. In this
|
||||
* mode, it's an error to try to set a target viewport.
|
||||
*/
|
||||
const unsigned long RENDER_MODE_DEFAULT = 0x00000000;
|
||||
|
||||
/**
|
||||
* DEPRECATED. Please QI to nsIContentViewManager.
|
||||
* FIXME 615368
|
||||
* When asynchronous scrolling is enabled, a target viewport can be
|
||||
* set to transform content pixels wrt its CSS viewport.
|
||||
*
|
||||
* NB: when async scrolling is enabled, it's the *user's*
|
||||
* responsibility to update the target scroll offset. In effect,
|
||||
* the platform hands over control of scroll offset to the user.
|
||||
*/
|
||||
void scrollViewportTo(in float xPx, in float yPx);
|
||||
void scrollViewportBy(in float dxPx, in float dyPx);
|
||||
void setViewportScale(in float xScale, in float yScale);
|
||||
readonly attribute float viewportScrollX;
|
||||
readonly attribute float viewportScrollY;
|
||||
const unsigned long RENDER_MODE_ASYNC_SCROLL = 0x00000001;
|
||||
|
||||
attribute unsigned long renderMode;
|
||||
};
|
||||
|
||||
native alreadyAddRefed_nsFrameLoader(already_AddRefed<nsFrameLoader>);
|
||||
|
@ -252,25 +259,3 @@ interface nsIFrameLoaderOwner : nsISupports
|
|||
*/
|
||||
void swapFrameLoaders(in nsIFrameLoaderOwner aOtherOwner);
|
||||
};
|
||||
|
||||
/** Please merge me into something else after 2.0 branches. */
|
||||
[scriptable, uuid(e3e2d3f8-1397-4984-abb3-435c29a1ca55)]
|
||||
interface nsIFrameLoader_MOZILLA_2_0_BRANCH : nsISupports
|
||||
{
|
||||
/**
|
||||
* The default rendering mode is synchronous scrolling. In this
|
||||
* mode, it's an error to try to set a target viewport.
|
||||
*/
|
||||
const unsigned long RENDER_MODE_DEFAULT = 0x00000000;
|
||||
/**
|
||||
* When asynchronous scrolling is enabled, a target viewport can be
|
||||
* set to transform content pixels wrt its CSS viewport.
|
||||
*
|
||||
* NB: when async scrolling is enabled, it's the *user's*
|
||||
* responsibility to update the target scroll offset. In effect,
|
||||
* the platform hands over control of scroll offset to the user.
|
||||
*/
|
||||
const unsigned long RENDER_MODE_ASYNC_SCROLL = 0x00000001;
|
||||
|
||||
attribute unsigned long renderMode;
|
||||
};
|
||||
|
|
|
@ -310,7 +310,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_AMBIGUOUS(nsFrameLoader, nsIFrameLoader)
|
|||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFrameLoader)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFrameLoader)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIFrameLoader_MOZILLA_2_0_BRANCH)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewManager)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIFrameLoader)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
@ -1684,36 +1683,6 @@ nsFrameLoader::UpdateBaseWindowPositionAndSize(nsIFrame *aIFrame)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::ScrollViewportTo(float aXpx, float aYpx)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::ScrollViewportBy(float aDXpx, float aDYpx)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::SetViewportScale(float aXScale, float aYScale)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::GetViewportScrollX(float* aViewportScrollX)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::GetViewportScrollY(float* aViewportScrollY)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::GetRenderMode(PRUint32* aRenderMode)
|
||||
{
|
||||
|
|
|
@ -164,7 +164,6 @@ private:
|
|||
|
||||
|
||||
class nsFrameLoader : public nsIFrameLoader,
|
||||
public nsIFrameLoader_MOZILLA_2_0_BRANCH,
|
||||
public nsIContentViewManager
|
||||
{
|
||||
friend class AutoResetInShow;
|
||||
|
@ -196,7 +195,6 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsFrameLoader, nsIFrameLoader)
|
||||
NS_DECL_NSIFRAMELOADER
|
||||
NS_DECL_NSIFRAMELOADER_MOZILLA_2_0_BRANCH
|
||||
NS_DECL_NSICONTENTVIEWMANAGER
|
||||
NS_HIDDEN_(nsresult) CheckForRecursiveLoad(nsIURI* aURI);
|
||||
nsresult ReallyStartLoading();
|
||||
|
|
|
@ -22,9 +22,7 @@ function rootView() {
|
|||
}
|
||||
|
||||
function enableAsyncScrolling() {
|
||||
var i = Components.interfaces.nsIFrameLoader_MOZILLA_2_0_BRANCH;
|
||||
var enabler = frameLoader().QueryInterface(i);
|
||||
enabler.renderMode = i.RENDER_MODE_ASYNC_SCROLL;
|
||||
frameLoader().renderMode = Components.interfaces.nsIFrameLoaer.RENDER_MODE_ASYNC_SCROLL;
|
||||
}
|
||||
|
||||
// Functions affecting the content window.
|
||||
|
|
|
@ -120,11 +120,6 @@ function windowUtils() {
|
|||
.getInterface(CI.nsIDOMWindowUtils);
|
||||
}
|
||||
|
||||
function windowUtils20() {
|
||||
return windowUtils()
|
||||
.QueryInterface(Components.interfaces.nsIDOMWindowUtils_MOZILLA_2_0_BRANCH);
|
||||
}
|
||||
|
||||
function IDForEventTarget(event)
|
||||
{
|
||||
try {
|
||||
|
@ -258,7 +253,7 @@ function setupDisplayport(contentRootElement) {
|
|||
var dph = attrOrDefault("reftest-displayport-h", 0);
|
||||
if (dpw !== 0 || dph !== 0) {
|
||||
LogInfo("Setting displayport to <x=0, y=0, w="+ dpw +", h="+ dph +">");
|
||||
windowUtils20().setDisplayPortForElement(0, 0, dpw, dph, content.document.documentElement);
|
||||
windowUtils().setDisplayPortForElement(0, 0, dpw, dph, content.document.documentElement);
|
||||
}
|
||||
|
||||
// XXX support resolution when needed
|
||||
|
|
Загрузка…
Ссылка в новой задаче