Skip to content

Commit

Permalink
Update to latest version from bug 900908
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Apr 29, 2014
1 parent 2a28449 commit 90599b6
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 18 deletions.
Expand Up @@ -51,7 +51,7 @@ EmbedLiteAppThreadChild::EmbedLiteAppThreadChild(MessageLoop* aParentLoop)
sAppThreadChild = this;
}

NS_IMPL_ISUPPORTS1(EmbedLiteAppThreadChild, nsIObserver)
NS_IMPL_ISUPPORTS(EmbedLiteAppThreadChild, nsIObserver)

EmbedLiteAppThreadChild::~EmbedLiteAppThreadChild()
{
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedthread/EmbedLitePuppetWidget.cpp
Expand Up @@ -46,8 +46,8 @@ const size_t EmbedLitePuppetWidget::kMaxDimension = 4000;
static nsTArray<EmbedLitePuppetWidget*> gTopLevelWindows;
static bool sFailedToCreateGLContext = false;

NS_IMPL_ISUPPORTS_INHERITED1(EmbedLitePuppetWidget, nsBaseWidget,
nsISupportsWeakReference)
NS_IMPL_ISUPPORTS_INHERITED(EmbedLitePuppetWidget, nsBaseWidget,
nsISupportsWeakReference)

static bool
IsPopup(const nsWidgetInitData* aInitData)
Expand Down
Expand Up @@ -515,7 +515,7 @@ EmbedLiteViewThreadChild::RecvSetViewSize(const gfxSize& aSize)
baseWindow->SetPositionAndSize(0, 0, mViewSize.width, mViewSize.height, true);
baseWindow->SetVisibility(true);

mHelper->HandlePossibleViewportChange();
mHelper->ReportSizeUpdate(aSize);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/modules/EmbedLiteAppService.cpp
Expand Up @@ -74,7 +74,7 @@ EmbedLiteAppService::~EmbedLiteAppService()
{
}

NS_IMPL_ISUPPORTS2(EmbedLiteAppService, nsIObserver, nsIEmbedAppService)
NS_IMPL_ISUPPORTS(EmbedLiteAppService, nsIObserver, nsIEmbedAppService)

NS_IMETHODIMP
EmbedLiteAppService::Observe(nsISupports* aSubject,
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/modules/EmbedLiteJSON.cpp
Expand Up @@ -26,7 +26,7 @@ EmbedLiteJSON::~EmbedLiteJSON()
{
}

NS_IMPL_ISUPPORTS1(EmbedLiteJSON, nsIEmbedLiteJSON)
NS_IMPL_ISUPPORTS(EmbedLiteJSON, nsIEmbedLiteJSON)

nsresult
CreateObjectStatic(nsIWritablePropertyBag2 * *aObject)
Expand Down
6 changes: 3 additions & 3 deletions embedding/embedlite/utils/DirProvider.cpp
Expand Up @@ -16,9 +16,9 @@ nsCOMPtr<nsIFile> DirProvider::sProfileDir = 0;
nsCOMPtr<nsIFile> DirProvider::sGREDir = 0;
nsISupports* DirProvider::sProfileLock = 0;

NS_IMPL_QUERY_INTERFACE2(DirProvider,
nsIDirectoryServiceProvider,
nsIDirectoryServiceProvider2)
NS_IMPL_QUERY_INTERFACE(DirProvider,
nsIDirectoryServiceProvider,
nsIDirectoryServiceProvider2)

NS_IMETHODIMP_(MozExternalRefCountType)
DirProvider::AddRef()
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/utils/EmbedLiteXulAppInfo.cpp
Expand Up @@ -25,7 +25,7 @@ EmbedLiteXulAppInfo::~EmbedLiteXulAppInfo()
{
}

NS_IMPL_ISUPPORTS2(EmbedLiteXulAppInfo, nsIXULRuntime, nsIXULAppInfo)
NS_IMPL_ISUPPORTS(EmbedLiteXulAppInfo, nsIXULRuntime, nsIXULAppInfo)

NS_IMETHODIMP EmbedLiteXulAppInfo::GetID(nsACString& aID)
{
Expand Down
19 changes: 19 additions & 0 deletions embedding/embedlite/utils/TabChildHelper.cpp
Expand Up @@ -50,6 +50,7 @@ static bool sPostAZPCAsJsonViewport(false);

TabChildHelper::TabChildHelper(EmbedLiteViewThreadChild* aView)
: mView(aView)
, mHasValidInnerSize(false)
{
LOGT();

Expand Down Expand Up @@ -199,6 +200,12 @@ TabChildHelper::InitTabChildGlobal()
return true;
}

bool
TabChildHelper::HasValidInnerSize()
{
return mHasValidInnerSize;
}

NS_IMETHODIMP
TabChildHelper::Observe(nsISupports* aSubject,
const char* aTopic,
Expand Down Expand Up @@ -495,3 +502,15 @@ TabChildHelper::DoUpdateZoomConstraints(const uint32_t& aPresShellId,
aIsRoot,
aConstraints);
}

void
TabChildHelper::ReportSizeUpdate(const gfxSize& aSize)
{
bool initialSizing = !HasValidInnerSize()
&& (aSize.width != 0 && aSize.height != 0);
if (initialSizing) {
mHasValidInnerSize = true;
}

HandlePossibleViewportChange();
}
3 changes: 3 additions & 0 deletions embedding/embedlite/utils/TabChildHelper.h
Expand Up @@ -61,6 +61,7 @@ class TabChildHelper : public nsIDOMEventListener,
const mozilla::layers::FrameMetrics::ViewID& aViewId,
const bool& aIsRoot,
const mozilla::layers::ZoomConstraints& aConstraints) MOZ_OVERRIDE;
void ReportSizeUpdate(const gfxSize& aSize);

protected:
nsIWidget* GetWidget(nsPoint* aOffset);
Expand All @@ -69,6 +70,7 @@ class TabChildHelper : public nsIDOMEventListener,
bool ConvertMutiTouchInputToEvent(const mozilla::MultiTouchInput& aData,
WidgetTouchEvent& aEvent);
void CancelTapTracking();
bool HasValidInnerSize();

private:
bool InitTabChildGlobal();
Expand All @@ -78,6 +80,7 @@ class TabChildHelper : public nsIDOMEventListener,
friend class EmbedLiteViewThreadChild;
EmbedLiteViewThreadChild* mView;
mozilla::layers::FrameMetrics mLastSubFrameMetrics;
bool mHasValidInnerSize;
};

}
Expand Down
14 changes: 7 additions & 7 deletions embedding/embedlite/utils/WebBrowserChrome.cpp
Expand Up @@ -56,13 +56,13 @@ WebBrowserChrome::~WebBrowserChrome()
LOGT();
}

NS_IMPL_ISUPPORTS6(WebBrowserChrome,
nsIWebBrowserChrome,
nsIWebBrowserChromeFocus,
nsIInterfaceRequestor,
nsIEmbeddingSiteWindow,
nsIWebProgressListener,
nsSupportsWeakReference)
NS_IMPL_ISUPPORTS(WebBrowserChrome,
nsIWebBrowserChrome,
nsIWebBrowserChromeFocus,
nsIInterfaceRequestor,
nsIEmbeddingSiteWindow,
nsIWebProgressListener,
nsSupportsWeakReference)

NS_IMETHODIMP WebBrowserChrome::GetInterface(const nsIID& aIID, void** aInstancePtr)
{
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/utils/WindowCreator.cpp
Expand Up @@ -26,7 +26,7 @@ WindowCreator::~WindowCreator()
LOGT();
}

NS_IMPL_ISUPPORTS2(WindowCreator, nsIWindowCreator, nsIWindowCreator2)
NS_IMPL_ISUPPORTS(WindowCreator, nsIWindowCreator, nsIWindowCreator2)

NS_IMETHODIMP
WindowCreator::CreateChromeWindow2(nsIWebBrowserChrome* aParent,
Expand Down

0 comments on commit 90599b6

Please sign in to comment.