2010-08-20 23:24:41 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-08-20 23:24:41 +00:00
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
#include "base/basictypes.h"
|
2010-08-20 23:24:41 +00:00
|
|
|
|
|
|
|
#include "BasicLayers.h"
|
2015-01-12 01:39:36 +00:00
|
|
|
#include "gfxPrefs.h"
|
2011-07-04 13:15:05 +00:00
|
|
|
#ifdef MOZ_ENABLE_D3D9_LAYER
|
2012-07-17 23:59:45 +00:00
|
|
|
# include "LayerManagerD3D9.h"
|
2011-07-04 13:15:05 +00:00
|
|
|
#endif //MOZ_ENABLE_D3D9_LAYER
|
2012-12-25 06:09:34 +00:00
|
|
|
#include "mozilla/BrowserElementParent.h"
|
2015-03-02 21:38:07 +00:00
|
|
|
#include "mozilla/EventForwards.h" // for Modifiers
|
2014-06-11 05:44:39 +00:00
|
|
|
#include "mozilla/dom/ContentChild.h"
|
2012-07-20 06:48:27 +00:00
|
|
|
#include "mozilla/dom/TabParent.h"
|
2013-07-30 18:03:40 +00:00
|
|
|
#include "mozilla/layers/APZCTreeManager.h"
|
2015-02-10 13:24:23 +00:00
|
|
|
#include "mozilla/layers/APZThreadUtils.h"
|
2012-07-17 23:59:45 +00:00
|
|
|
#include "mozilla/layers/CompositorParent.h"
|
2013-04-24 18:42:40 +00:00
|
|
|
#include "mozilla/layers/LayerTransactionParent.h"
|
2012-07-17 23:59:45 +00:00
|
|
|
#include "nsContentUtils.h"
|
2015-02-05 19:41:50 +00:00
|
|
|
#include "nsFocusManager.h"
|
2010-08-20 23:24:41 +00:00
|
|
|
#include "nsFrameLoader.h"
|
2011-05-19 10:53:02 +00:00
|
|
|
#include "nsIObserver.h"
|
2015-02-17 02:30:02 +00:00
|
|
|
#include "nsStyleStructInlines.h"
|
2012-07-17 23:59:45 +00:00
|
|
|
#include "nsSubDocumentFrame.h"
|
2013-06-10 21:00:00 +00:00
|
|
|
#include "nsView.h"
|
2012-07-17 23:59:45 +00:00
|
|
|
#include "nsViewportFrame.h"
|
|
|
|
#include "RenderFrameParent.h"
|
2013-04-28 06:46:30 +00:00
|
|
|
#include "mozilla/layers/LayerManagerComposite.h"
|
2013-07-12 02:32:09 +00:00
|
|
|
#include "mozilla/layers/CompositorChild.h"
|
|
|
|
#include "ClientLayerManager.h"
|
2014-08-06 05:19:25 +00:00
|
|
|
#include "FrameLayerBuilder.h"
|
2010-08-20 23:24:41 +00:00
|
|
|
|
2012-07-20 06:48:27 +00:00
|
|
|
using namespace mozilla::dom;
|
2014-08-01 12:31:47 +00:00
|
|
|
using namespace mozilla::gfx;
|
2010-08-20 23:24:41 +00:00
|
|
|
using namespace mozilla::layers;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layout {
|
|
|
|
|
2011-01-13 17:45:14 +00:00
|
|
|
typedef FrameMetrics::ViewID ViewID;
|
2011-01-13 17:45:14 +00:00
|
|
|
|
2012-11-05 06:11:25 +00:00
|
|
|
/**
|
|
|
|
* Gets the layer-pixel offset of aContainerFrame's content rect top-left
|
|
|
|
* from the nearest display item reference frame (which we assume will be inducing
|
|
|
|
* a ContainerLayer).
|
|
|
|
*/
|
2011-01-13 17:45:14 +00:00
|
|
|
static nsIntPoint
|
2012-11-05 06:11:25 +00:00
|
|
|
GetContentRectLayerOffset(nsIFrame* aContainerFrame, nsDisplayListBuilder* aBuilder)
|
2011-01-13 17:45:14 +00:00
|
|
|
{
|
|
|
|
nscoord auPerDevPixel = aContainerFrame->PresContext()->AppUnitsPerDevPixel();
|
|
|
|
|
|
|
|
// Offset to the content rect in case we have borders or padding
|
2012-11-05 06:11:25 +00:00
|
|
|
// Note that aContainerFrame could be a reference frame itself, so
|
|
|
|
// we need to be careful here to ensure that we call ToReferenceFrame
|
|
|
|
// on aContainerFrame and not its parent.
|
|
|
|
nsPoint frameOffset = aBuilder->ToReferenceFrame(aContainerFrame) +
|
2014-09-11 21:29:59 +00:00
|
|
|
aContainerFrame->GetContentRectRelativeToSelf().TopLeft();
|
2011-01-13 17:45:14 +00:00
|
|
|
|
|
|
|
return frameOffset.ToNearestPixels(auPerDevPixel);
|
|
|
|
}
|
|
|
|
|
2010-08-20 23:24:41 +00:00
|
|
|
// Return true iff |aManager| is a "temporary layer manager". They're
|
|
|
|
// used for small software rendering tasks, like drawWindow. That's
|
|
|
|
// currently implemented by a BasicLayerManager without a backing
|
|
|
|
// widget, and hence in non-retained mode.
|
2012-07-27 04:02:05 +00:00
|
|
|
inline static bool
|
2010-08-20 23:24:41 +00:00
|
|
|
IsTempLayerManager(LayerManager* aManager)
|
|
|
|
{
|
2014-01-23 18:26:41 +00:00
|
|
|
return (mozilla::layers::LayersBackend::LAYERS_BASIC == aManager->GetBackendType() &&
|
2010-08-20 23:24:41 +00:00
|
|
|
!static_cast<BasicLayerManager*>(aManager)->IsRetained());
|
|
|
|
}
|
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
already_AddRefed<LayerManager>
|
|
|
|
GetFrom(nsFrameLoader* aFrameLoader)
|
|
|
|
{
|
|
|
|
nsIDocument* doc = aFrameLoader->GetOwnerDoc();
|
2014-10-14 22:11:38 +00:00
|
|
|
if (!doc) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2012-07-17 23:59:45 +00:00
|
|
|
return nsContentUtils::LayerManagerForDocument(doc);
|
|
|
|
}
|
|
|
|
|
2012-07-20 06:48:27 +00:00
|
|
|
class RemoteContentController : public GeckoContentController {
|
|
|
|
public:
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit RemoteContentController(RenderFrameParent* aRenderFrame)
|
2012-07-20 06:48:27 +00:00
|
|
|
: mUILoop(MessageLoop::current())
|
|
|
|
, mRenderFrame(aRenderFrame)
|
|
|
|
{ }
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void RequestContentRepaint(const FrameMetrics& aFrameMetrics) override
|
2012-07-20 06:48:27 +00:00
|
|
|
{
|
2014-10-03 17:39:37 +00:00
|
|
|
MOZ_ASSERT(NS_IsMainThread());
|
|
|
|
if (mRenderFrame) {
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2014-10-03 17:39:37 +00:00
|
|
|
browser->UpdateFrame(aFrameMetrics);
|
|
|
|
}
|
2012-07-20 06:48:27 +00:00
|
|
|
}
|
|
|
|
|
2015-02-19 23:53:30 +00:00
|
|
|
virtual void RequestFlingSnap(const FrameMetrics::ViewID& aScrollId,
|
2015-03-21 16:28:04 +00:00
|
|
|
const mozilla::CSSPoint& aDestination) override
|
2015-02-19 23:53:30 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
// We have to send this message from the "UI thread" (main
|
|
|
|
// thread).
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this, &RemoteContentController::RequestFlingSnap,
|
|
|
|
aScrollId, aDestination));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mRenderFrame) {
|
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
|
|
|
browser->RequestFlingSnap(aScrollId, aDestination);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-05 22:43:20 +00:00
|
|
|
virtual void AcknowledgeScrollUpdate(const FrameMetrics::ViewID& aScrollId,
|
2015-03-21 16:28:04 +00:00
|
|
|
const uint32_t& aScrollGeneration) override
|
2014-02-05 22:43:20 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
// We have to send this message from the "UI thread" (main
|
|
|
|
// thread).
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this, &RemoteContentController::AcknowledgeScrollUpdate,
|
|
|
|
aScrollId, aScrollGeneration));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mRenderFrame) {
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2014-02-05 22:43:20 +00:00
|
|
|
browser->AcknowledgeScrollUpdate(aScrollId, aScrollGeneration);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-12 19:27:45 +00:00
|
|
|
virtual void HandleDoubleTap(const CSSPoint& aPoint,
|
2015-03-02 21:38:07 +00:00
|
|
|
Modifiers aModifiers,
|
2015-03-21 16:28:04 +00:00
|
|
|
const ScrollableLayerGuid& aGuid) override
|
2012-08-09 04:39:02 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
// We have to send this message from the "UI thread" (main
|
|
|
|
// thread).
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this, &RemoteContentController::HandleDoubleTap,
|
2014-02-07 17:13:50 +00:00
|
|
|
aPoint, aModifiers, aGuid));
|
2012-08-09 04:39:02 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mRenderFrame) {
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2014-02-07 17:13:50 +00:00
|
|
|
browser->HandleDoubleTap(aPoint, aModifiers, aGuid);
|
2012-08-09 04:39:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-12 19:27:45 +00:00
|
|
|
virtual void HandleSingleTap(const CSSPoint& aPoint,
|
2015-03-02 21:38:07 +00:00
|
|
|
Modifiers aModifiers,
|
2015-03-21 16:28:04 +00:00
|
|
|
const ScrollableLayerGuid& aGuid) override
|
2012-09-15 01:16:32 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
// We have to send this message from the "UI thread" (main
|
|
|
|
// thread).
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this, &RemoteContentController::HandleSingleTap,
|
2014-02-07 17:13:50 +00:00
|
|
|
aPoint, aModifiers, aGuid));
|
2012-09-15 01:16:32 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mRenderFrame) {
|
2015-02-05 19:41:50 +00:00
|
|
|
mRenderFrame->TakeFocusForClick();
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2014-02-07 17:13:50 +00:00
|
|
|
browser->HandleSingleTap(aPoint, aModifiers, aGuid);
|
2012-09-15 01:16:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-12 19:27:45 +00:00
|
|
|
virtual void HandleLongTap(const CSSPoint& aPoint,
|
2015-03-02 21:38:07 +00:00
|
|
|
Modifiers aModifiers,
|
2014-10-24 17:29:30 +00:00
|
|
|
const ScrollableLayerGuid& aGuid,
|
2015-03-21 16:28:04 +00:00
|
|
|
uint64_t aInputBlockId) override
|
2012-11-08 19:35:02 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
// We have to send this message from the "UI thread" (main
|
|
|
|
// thread).
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this, &RemoteContentController::HandleLongTap,
|
2014-10-24 17:29:30 +00:00
|
|
|
aPoint, aModifiers, aGuid, aInputBlockId));
|
2012-11-08 19:35:02 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mRenderFrame) {
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2014-10-24 17:29:30 +00:00
|
|
|
browser->HandleLongTap(aPoint, aModifiers, aGuid, aInputBlockId);
|
2012-11-08 19:35:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-30 14:20:58 +00:00
|
|
|
void ClearRenderFrame() { mRenderFrame = nullptr; }
|
2012-07-20 06:48:27 +00:00
|
|
|
|
2015-06-08 20:01:26 +00:00
|
|
|
virtual void SendAsyncScrollDOMEvent(bool aIsRootContent,
|
2013-07-30 18:03:42 +00:00
|
|
|
const CSSRect& aContentRect,
|
2015-03-21 16:28:04 +00:00
|
|
|
const CSSSize& aContentSize) override
|
2012-12-25 06:09:34 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this,
|
|
|
|
&RemoteContentController::SendAsyncScrollDOMEvent,
|
2015-06-08 20:01:26 +00:00
|
|
|
aIsRootContent, aContentRect, aContentSize));
|
2012-12-25 06:09:34 +00:00
|
|
|
return;
|
|
|
|
}
|
2015-06-08 20:01:26 +00:00
|
|
|
if (mRenderFrame && aIsRootContent) {
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2012-12-25 06:09:34 +00:00
|
|
|
BrowserElementParent::DispatchAsyncScrollEvent(browser, aContentRect,
|
|
|
|
aContentSize);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void PostDelayedTask(Task* aTask, int aDelayMs) override
|
2013-02-25 20:50:49 +00:00
|
|
|
{
|
2015-07-06 11:18:20 +00:00
|
|
|
(MessageLoop::current() ? MessageLoop::current() : mUILoop)->
|
|
|
|
PostDelayedTask(FROM_HERE, aTask, aDelayMs);
|
2013-02-25 20:50:49 +00:00
|
|
|
}
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual bool GetTouchSensitiveRegion(CSSRect* aOutRegion) override
|
2014-01-16 20:19:59 +00:00
|
|
|
{
|
|
|
|
if (mTouchSensitiveRegion.IsEmpty())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
*aOutRegion = CSSRect::FromAppUnits(mTouchSensitiveRegion.GetBounds());
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-04-15 17:39:20 +00:00
|
|
|
virtual void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
|
|
|
|
APZStateChange aChange,
|
2015-03-21 16:28:04 +00:00
|
|
|
int aArg) override
|
2013-12-10 03:14:55 +00:00
|
|
|
{
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
2014-04-15 17:39:20 +00:00
|
|
|
NewRunnableMethod(this, &RemoteContentController::NotifyAPZStateChange,
|
|
|
|
aGuid, aChange, aArg));
|
2013-12-10 03:14:55 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mRenderFrame) {
|
2015-01-26 05:49:13 +00:00
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
2014-04-15 17:39:20 +00:00
|
|
|
browser->NotifyAPZStateChange(aGuid.mScrollId, aChange, aArg);
|
2013-12-10 03:14:55 +00:00
|
|
|
}
|
2015-03-22 07:42:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent) override {
|
|
|
|
if (MessageLoop::current() != mUILoop) {
|
|
|
|
mUILoop->PostTask(
|
|
|
|
FROM_HERE,
|
|
|
|
NewRunnableMethod(this, &RemoteContentController::NotifyMozMouseScrollEvent, aScrollId, aEvent));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (mRenderFrame) {
|
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
|
|
|
browser->NotifyMouseScrollTestEvent(aScrollId, aEvent);
|
|
|
|
}
|
2013-12-10 03:14:55 +00:00
|
|
|
}
|
|
|
|
|
2015-06-19 12:25:41 +00:00
|
|
|
void NotifyFlushComplete() override {
|
|
|
|
MOZ_ASSERT(NS_IsMainThread());
|
|
|
|
if (mRenderFrame) {
|
|
|
|
TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager());
|
|
|
|
browser->NotifyFlushComplete();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-16 20:19:59 +00:00
|
|
|
// Methods used by RenderFrameParent to set fields stored here.
|
|
|
|
|
|
|
|
void SetTouchSensitiveRegion(const nsRegion& aRegion)
|
|
|
|
{
|
|
|
|
mTouchSensitiveRegion = aRegion;
|
|
|
|
}
|
2012-07-20 06:48:27 +00:00
|
|
|
private:
|
|
|
|
MessageLoop* mUILoop;
|
|
|
|
RenderFrameParent* mRenderFrame;
|
2013-09-13 14:18:33 +00:00
|
|
|
|
2014-01-16 20:19:59 +00:00
|
|
|
nsRegion mTouchSensitiveRegion;
|
2012-07-20 06:48:27 +00:00
|
|
|
};
|
|
|
|
|
2014-05-08 14:04:00 +00:00
|
|
|
RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
|
|
|
TextureFactoryIdentifier* aTextureFactoryIdentifier,
|
|
|
|
uint64_t* aId,
|
|
|
|
bool* aSuccess)
|
2012-07-17 23:59:45 +00:00
|
|
|
: mLayersId(0)
|
2014-05-08 14:04:00 +00:00
|
|
|
, mFrameLoader(aFrameLoader)
|
2011-09-27 18:35:23 +00:00
|
|
|
, mFrameLoaderDestroyed(false)
|
2011-10-20 22:17:09 +00:00
|
|
|
, mBackgroundColor(gfxRGBA(1, 1, 1))
|
2015-06-04 20:51:10 +00:00
|
|
|
, mAsyncPanZoomEnabled(false)
|
2010-10-26 17:51:08 +00:00
|
|
|
{
|
2014-05-08 14:04:00 +00:00
|
|
|
*aSuccess = false;
|
|
|
|
if (!mFrameLoader) {
|
|
|
|
return;
|
|
|
|
}
|
2014-01-15 21:10:39 +00:00
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
*aId = 0;
|
|
|
|
|
|
|
|
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
2015-06-04 20:51:10 +00:00
|
|
|
|
|
|
|
mAsyncPanZoomEnabled = lm && lm->AsyncPanZoomEnabled();
|
|
|
|
|
2013-01-10 10:02:21 +00:00
|
|
|
// Perhaps the document containing this frame currently has no presentation?
|
2014-01-23 18:26:41 +00:00
|
|
|
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
2013-12-09 01:40:59 +00:00
|
|
|
*aTextureFactoryIdentifier =
|
|
|
|
static_cast<ClientLayerManager*>(lm.get())->GetTextureFactoryIdentifier();
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 09:20:52 +00:00
|
|
|
} else {
|
|
|
|
*aTextureFactoryIdentifier = TextureFactoryIdentifier();
|
2013-01-10 10:02:21 +00:00
|
|
|
}
|
2012-07-17 23:59:45 +00:00
|
|
|
|
2015-07-04 01:29:00 +00:00
|
|
|
if (XRE_IsParentProcess()) {
|
2012-07-17 23:59:45 +00:00
|
|
|
// Our remote frame will push layers updates to the compositor,
|
|
|
|
// and we'll keep an indirect reference to that tree.
|
|
|
|
*aId = mLayersId = CompositorParent::AllocateLayerTreeId();
|
2014-01-23 18:26:41 +00:00
|
|
|
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
2014-06-14 07:25:02 +00:00
|
|
|
ClientLayerManager *clientManager =
|
|
|
|
static_cast<ClientLayerManager*>(lm.get());
|
2013-07-12 02:32:09 +00:00
|
|
|
clientManager->GetRemoteRenderer()->SendNotifyChildCreated(mLayersId);
|
|
|
|
}
|
2015-06-04 20:51:10 +00:00
|
|
|
if (mAsyncPanZoomEnabled) {
|
2012-07-20 06:48:27 +00:00
|
|
|
mContentController = new RemoteContentController(this);
|
2013-07-30 18:03:40 +00:00
|
|
|
CompositorParent::SetControllerForLayerTree(mLayersId, mContentController);
|
2012-07-20 06:48:27 +00:00
|
|
|
}
|
2015-07-04 01:29:00 +00:00
|
|
|
} else if (XRE_IsContentProcess()) {
|
2014-06-11 05:44:39 +00:00
|
|
|
ContentChild::GetSingleton()->SendAllocateLayerTreeId(aId);
|
|
|
|
mLayersId = *aId;
|
2014-06-14 07:25:02 +00:00
|
|
|
CompositorChild::Get()->SendNotifyChildCreated(mLayersId);
|
2011-08-09 19:38:26 +00:00
|
|
|
}
|
2014-05-08 14:04:00 +00:00
|
|
|
*aSuccess = true;
|
2010-10-26 17:51:08 +00:00
|
|
|
}
|
2010-08-20 23:24:41 +00:00
|
|
|
|
2013-07-30 18:03:40 +00:00
|
|
|
APZCTreeManager*
|
|
|
|
RenderFrameParent::GetApzcTreeManager()
|
|
|
|
{
|
|
|
|
// We can't get a ref to the APZCTreeManager until after the child is
|
|
|
|
// created and the static getter knows which CompositorParent is
|
|
|
|
// instantiated with this layers ID. That's why try to fetch it when
|
|
|
|
// we first need it and cache the result.
|
2015-06-04 20:51:10 +00:00
|
|
|
if (!mApzcTreeManager && mAsyncPanZoomEnabled) {
|
2013-07-30 18:03:40 +00:00
|
|
|
mApzcTreeManager = CompositorParent::GetAPZCTreeManager(mLayersId);
|
|
|
|
}
|
|
|
|
return mApzcTreeManager.get();
|
|
|
|
}
|
|
|
|
|
2010-08-20 23:24:41 +00:00
|
|
|
RenderFrameParent::~RenderFrameParent()
|
|
|
|
{}
|
|
|
|
|
2011-01-06 04:54:47 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::Destroy()
|
|
|
|
{
|
2011-09-27 18:35:23 +00:00
|
|
|
mFrameLoaderDestroyed = true;
|
2011-01-06 04:54:47 +00:00
|
|
|
}
|
|
|
|
|
2010-08-20 23:24:41 +00:00
|
|
|
already_AddRefed<Layer>
|
|
|
|
RenderFrameParent::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|
|
|
nsIFrame* aFrame,
|
2010-10-13 22:55:45 +00:00
|
|
|
LayerManager* aManager,
|
2012-08-07 03:00:41 +00:00
|
|
|
const nsIntRect& aVisibleRect,
|
2012-09-16 22:25:33 +00:00
|
|
|
nsDisplayItem* aItem,
|
2013-09-27 06:01:16 +00:00
|
|
|
const ContainerLayerParameters& aContainerParameters)
|
2010-08-20 23:24:41 +00:00
|
|
|
{
|
2015-02-09 22:34:50 +00:00
|
|
|
MOZ_ASSERT(aFrame,
|
|
|
|
"makes no sense to have a shadow tree without a frame");
|
|
|
|
MOZ_ASSERT(!mContainer ||
|
|
|
|
IsTempLayerManager(aManager) ||
|
|
|
|
mContainer->Manager() == aManager,
|
|
|
|
"retaining manager changed out from under us ... HELP!");
|
2010-08-20 23:24:41 +00:00
|
|
|
|
2012-11-13 19:55:52 +00:00
|
|
|
if (IsTempLayerManager(aManager) ||
|
|
|
|
(mContainer && mContainer->Manager() != aManager)) {
|
2010-08-20 23:24:41 +00:00
|
|
|
// This can happen if aManager is a "temporary" manager, or if the
|
|
|
|
// widget's layer manager changed out from under us. We need to
|
|
|
|
// FIXME handle the former case somehow, probably with an API to
|
2015-02-09 22:34:50 +00:00
|
|
|
// draw a manager's subtree. The latter is bad bad bad, but the the
|
|
|
|
// MOZ_ASSERT() above will flag it. Returning nullptr here will just
|
|
|
|
// cause the shadow subtree not to be rendered.
|
2012-11-13 19:55:52 +00:00
|
|
|
NS_WARNING("Remote iframe not rendered");
|
2012-07-30 14:20:58 +00:00
|
|
|
return nullptr;
|
2010-08-20 23:24:41 +00:00
|
|
|
}
|
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
uint64_t id = GetLayerTreeId();
|
2014-08-22 00:16:44 +00:00
|
|
|
if (!id) {
|
2012-07-30 14:20:58 +00:00
|
|
|
return nullptr;
|
2011-01-26 06:26:37 +00:00
|
|
|
}
|
|
|
|
|
2014-08-22 00:16:44 +00:00
|
|
|
nsRefPtr<Layer> layer =
|
|
|
|
(aManager->GetLayerBuilder()->GetLeafLayerFor(aBuilder, aItem));
|
|
|
|
if (!layer) {
|
|
|
|
layer = aManager->CreateRefLayer();
|
2010-08-20 23:24:41 +00:00
|
|
|
}
|
2014-08-22 00:16:44 +00:00
|
|
|
if (!layer) {
|
|
|
|
// Probably a temporary layer manager that doesn't know how to
|
|
|
|
// use ref layers.
|
|
|
|
return nullptr;
|
2011-02-23 17:45:09 +00:00
|
|
|
}
|
2014-08-22 00:16:44 +00:00
|
|
|
static_cast<RefLayer*>(layer.get())->SetReferentId(id);
|
|
|
|
nsIntPoint offset = GetContentRectLayerOffset(aFrame, aBuilder);
|
|
|
|
// We can only have an offset if we're a child of an inactive
|
|
|
|
// container, but our display item is LAYER_ACTIVE_FORCE which
|
|
|
|
// forces all layers above to be active.
|
|
|
|
MOZ_ASSERT(aContainerParameters.mOffset == nsIntPoint());
|
2014-10-16 09:51:12 +00:00
|
|
|
gfx::Matrix4x4 m = gfx::Matrix4x4::Translation(offset.x, offset.y, 0.0);
|
2014-08-22 00:16:44 +00:00
|
|
|
// Remote content can't be repainted by us, so we multiply down
|
|
|
|
// the resolution that our container expects onto our container.
|
2014-10-16 09:51:12 +00:00
|
|
|
m.PreScale(aContainerParameters.mXScale, aContainerParameters.mYScale, 1.0);
|
2014-08-22 00:16:44 +00:00
|
|
|
layer->SetBaseTransform(m);
|
2010-08-20 23:24:41 +00:00
|
|
|
|
2014-08-22 00:16:44 +00:00
|
|
|
return layer.forget();
|
2010-08-20 23:24:41 +00:00
|
|
|
}
|
|
|
|
|
2011-01-13 17:45:14 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::OwnerContentChanged(nsIContent* aContent)
|
|
|
|
{
|
2015-02-09 22:34:50 +00:00
|
|
|
MOZ_ASSERT(mFrameLoader->GetOwnerContent() == aContent,
|
|
|
|
"Don't build new map if owner is same!");
|
2014-10-14 22:11:38 +00:00
|
|
|
|
|
|
|
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
|
|
|
// Perhaps the document containing this frame currently has no presentation?
|
|
|
|
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
|
|
|
ClientLayerManager *clientManager =
|
|
|
|
static_cast<ClientLayerManager*>(lm.get());
|
|
|
|
clientManager->GetRemoteRenderer()->SendAdoptChild(mLayersId);
|
|
|
|
}
|
2011-01-13 17:45:14 +00:00
|
|
|
}
|
|
|
|
|
2010-08-20 23:24:41 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::ActorDestroy(ActorDestroyReason why)
|
|
|
|
{
|
2012-07-20 06:48:27 +00:00
|
|
|
if (mLayersId != 0) {
|
2015-07-04 01:29:00 +00:00
|
|
|
if (XRE_IsContentProcess()) {
|
2014-06-11 05:44:39 +00:00
|
|
|
ContentChild::GetSingleton()->SendDeallocateLayerTreeId(mLayersId);
|
|
|
|
} else {
|
|
|
|
CompositorParent::DeallocateLayerTreeId(mLayersId);
|
|
|
|
}
|
2012-07-20 06:48:27 +00:00
|
|
|
if (mContentController) {
|
|
|
|
// Stop our content controller from requesting repaints of our
|
|
|
|
// content.
|
|
|
|
mContentController->ClearRenderFrame();
|
2013-07-30 18:03:40 +00:00
|
|
|
// TODO: notify the compositor?
|
2012-07-20 06:48:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-30 14:20:58 +00:00
|
|
|
mFrameLoader = nullptr;
|
2010-08-20 23:24:41 +00:00
|
|
|
}
|
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
bool
|
|
|
|
RenderFrameParent::RecvNotifyCompositorTransaction()
|
2010-08-20 23:24:41 +00:00
|
|
|
{
|
2012-07-17 23:59:45 +00:00
|
|
|
TriggerRepaint();
|
|
|
|
return true;
|
|
|
|
}
|
2012-07-17 23:59:45 +00:00
|
|
|
|
2013-08-13 07:56:57 +00:00
|
|
|
bool
|
|
|
|
RenderFrameParent::RecvUpdateHitRegion(const nsRegion& aRegion)
|
|
|
|
{
|
|
|
|
mTouchRegion = aRegion;
|
2014-01-16 20:19:59 +00:00
|
|
|
if (mContentController) {
|
|
|
|
// Tell the content controller about the touch-sensitive region, so
|
|
|
|
// that it can provide it to APZ. This is required for APZ to do
|
|
|
|
// correct hit testing for a remote 'mozpasspointerevents' iframe
|
|
|
|
// until bug 928833 is fixed.
|
|
|
|
mContentController->SetTouchSensitiveRegion(aRegion);
|
|
|
|
}
|
2013-08-13 07:56:57 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::TriggerRepaint()
|
|
|
|
{
|
|
|
|
nsIFrame* docFrame = mFrameLoader->GetPrimaryFrameOfOwningContent();
|
|
|
|
if (!docFrame) {
|
|
|
|
// Bad, but nothing we can do about it (XXX/cjones: or is there?
|
|
|
|
// maybe bug 589337?). When the new frame is created, we'll
|
|
|
|
// probably still be the current render frame and will get to draw
|
|
|
|
// our content then. Or, we're shutting down and this update goes
|
|
|
|
// to /dev/null.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-05-01 00:42:05 +00:00
|
|
|
docFrame->InvalidateLayer(nsDisplayItem::TYPE_REMOTE);
|
2012-07-17 23:59:45 +00:00
|
|
|
}
|
|
|
|
|
2012-07-17 23:59:45 +00:00
|
|
|
uint64_t
|
|
|
|
RenderFrameParent::GetLayerTreeId() const
|
|
|
|
{
|
2012-07-17 23:59:45 +00:00
|
|
|
return mLayersId;
|
2012-07-17 23:59:45 +00:00
|
|
|
}
|
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
void
|
2011-01-13 17:45:14 +00:00
|
|
|
RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
nsSubDocumentFrame* aFrame,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists)
|
|
|
|
{
|
|
|
|
// We're the subdoc for <browser remote="true"> and it has
|
|
|
|
// painted content. Display its shadow layer tree.
|
2013-04-04 11:36:45 +00:00
|
|
|
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
2013-03-04 09:56:02 +00:00
|
|
|
|
|
|
|
nsPoint offset = aBuilder->ToReferenceFrame(aFrame);
|
|
|
|
nsRect bounds = aFrame->EnsureInnerView()->GetBounds() + offset;
|
2013-04-04 11:36:45 +00:00
|
|
|
clipState.ClipContentDescendants(bounds);
|
2013-03-04 09:56:02 +00:00
|
|
|
|
2014-08-22 00:16:44 +00:00
|
|
|
aLists.Content()->AppendToTop(
|
|
|
|
new (aBuilder) nsDisplayRemote(aBuilder, aFrame, this));
|
2011-01-13 17:45:14 +00:00
|
|
|
}
|
|
|
|
|
2012-08-09 04:39:02 +00:00
|
|
|
void
|
2013-11-13 18:20:30 +00:00
|
|
|
RenderFrameParent::ZoomToRect(uint32_t aPresShellId, ViewID aViewId,
|
|
|
|
const CSSRect& aRect)
|
2012-08-09 04:39:02 +00:00
|
|
|
{
|
2013-07-30 18:03:40 +00:00
|
|
|
if (GetApzcTreeManager()) {
|
2013-11-13 18:20:30 +00:00
|
|
|
GetApzcTreeManager()->ZoomToRect(ScrollableLayerGuid(mLayersId, aPresShellId, aViewId),
|
2013-07-30 18:03:40 +00:00
|
|
|
aRect);
|
2012-08-09 04:39:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-22 04:37:06 +00:00
|
|
|
void
|
2014-12-09 10:35:12 +00:00
|
|
|
RenderFrameParent::ContentReceivedInputBlock(const ScrollableLayerGuid& aGuid,
|
|
|
|
uint64_t aInputBlockId,
|
|
|
|
bool aPreventDefault)
|
2012-08-22 04:37:06 +00:00
|
|
|
{
|
2014-02-21 22:58:30 +00:00
|
|
|
if (aGuid.mLayersId != mLayersId) {
|
|
|
|
// Guard against bad data from hijacked child processes
|
2014-12-09 10:35:12 +00:00
|
|
|
NS_ERROR("Unexpected layers id in ContentReceivedInputBlock; dropping message...");
|
2014-02-21 22:58:30 +00:00
|
|
|
return;
|
|
|
|
}
|
2013-07-30 18:03:40 +00:00
|
|
|
if (GetApzcTreeManager()) {
|
2015-02-10 13:24:23 +00:00
|
|
|
APZThreadUtils::RunOnControllerThread(NewRunnableMethod(
|
|
|
|
GetApzcTreeManager(), &APZCTreeManager::ContentReceivedInputBlock,
|
|
|
|
aInputBlockId, aPreventDefault));
|
2012-08-22 04:37:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-22 02:36:25 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::SetTargetAPZC(uint64_t aInputBlockId,
|
|
|
|
const nsTArray<ScrollableLayerGuid>& aTargets)
|
|
|
|
{
|
|
|
|
for (size_t i = 0; i < aTargets.Length(); i++) {
|
|
|
|
if (aTargets[i].mLayersId != mLayersId) {
|
|
|
|
// Guard against bad data from hijacked child processes
|
|
|
|
NS_ERROR("Unexpected layers id in SetTargetAPZC; dropping message...");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (GetApzcTreeManager()) {
|
2015-02-10 13:24:23 +00:00
|
|
|
// need a local var to disambiguate between the SetTargetAPZC overloads.
|
|
|
|
void (APZCTreeManager::*setTargetApzcFunc)(uint64_t, const nsTArray<ScrollableLayerGuid>&)
|
|
|
|
= &APZCTreeManager::SetTargetAPZC;
|
|
|
|
APZThreadUtils::RunOnControllerThread(NewRunnableMethod(
|
|
|
|
GetApzcTreeManager(), setTargetApzcFunc,
|
|
|
|
aInputBlockId, aTargets));
|
2014-11-22 02:36:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-19 10:33:33 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::SetAllowedTouchBehavior(uint64_t aInputBlockId,
|
|
|
|
const nsTArray<TouchBehaviorFlags>& aFlags)
|
|
|
|
{
|
|
|
|
if (GetApzcTreeManager()) {
|
|
|
|
APZThreadUtils::RunOnControllerThread(NewRunnableMethod(
|
|
|
|
GetApzcTreeManager(), &APZCTreeManager::SetAllowedTouchBehavior,
|
|
|
|
aInputBlockId, aFlags));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-29 02:18:18 +00:00
|
|
|
void
|
2013-11-14 17:35:41 +00:00
|
|
|
RenderFrameParent::UpdateZoomConstraints(uint32_t aPresShellId,
|
|
|
|
ViewID aViewId,
|
2015-06-17 16:32:41 +00:00
|
|
|
const Maybe<ZoomConstraints>& aConstraints)
|
2012-09-29 02:18:18 +00:00
|
|
|
{
|
2013-07-30 18:03:40 +00:00
|
|
|
if (GetApzcTreeManager()) {
|
2013-11-14 17:35:41 +00:00
|
|
|
GetApzcTreeManager()->UpdateZoomConstraints(ScrollableLayerGuid(mLayersId, aPresShellId, aViewId),
|
2014-01-06 18:26:44 +00:00
|
|
|
aConstraints);
|
2012-09-29 02:18:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-13 07:56:57 +00:00
|
|
|
bool
|
|
|
|
RenderFrameParent::HitTest(const nsRect& aRect)
|
|
|
|
{
|
|
|
|
return mTouchRegion.Contains(aRect);
|
|
|
|
}
|
|
|
|
|
2014-11-16 18:23:22 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::GetTextureFactoryIdentifier(TextureFactoryIdentifier* aTextureFactoryIdentifier)
|
|
|
|
{
|
|
|
|
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
|
|
|
// Perhaps the document containing this frame currently has no presentation?
|
|
|
|
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
|
|
|
*aTextureFactoryIdentifier =
|
|
|
|
static_cast<ClientLayerManager*>(lm.get())->GetTextureFactoryIdentifier();
|
|
|
|
} else {
|
|
|
|
*aTextureFactoryIdentifier = TextureFactoryIdentifier();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-05 19:41:50 +00:00
|
|
|
void
|
|
|
|
RenderFrameParent::TakeFocusForClick()
|
|
|
|
{
|
|
|
|
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
|
|
|
if (!fm) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
nsCOMPtr<nsIContent> owner = mFrameLoader->GetOwnerContent();
|
|
|
|
if (!owner) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(owner);
|
|
|
|
if (!element) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
fm->SetFocus(element, nsIFocusManager::FLAG_BYMOUSE |
|
|
|
|
nsIFocusManager::FLAG_NOSCROLL);
|
|
|
|
}
|
|
|
|
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace layout
|
|
|
|
} // namespace mozilla
|
2010-08-20 23:24:41 +00:00
|
|
|
|
2015-02-10 21:28:07 +00:00
|
|
|
nsDisplayRemote::nsDisplayRemote(nsDisplayListBuilder* aBuilder,
|
2015-02-25 18:36:19 +00:00
|
|
|
nsSubDocumentFrame* aFrame,
|
2015-02-10 21:28:07 +00:00
|
|
|
RenderFrameParent* aRemoteFrame)
|
|
|
|
: nsDisplayItem(aBuilder, aFrame)
|
|
|
|
, mRemoteFrame(aRemoteFrame)
|
2015-02-17 02:30:02 +00:00
|
|
|
, mEventRegionsOverride(EventRegionsOverride::NoOverride)
|
2015-02-10 21:28:07 +00:00
|
|
|
{
|
2015-02-17 02:30:02 +00:00
|
|
|
if (aBuilder->IsBuildingLayerEventRegions()) {
|
2015-02-25 18:36:19 +00:00
|
|
|
bool frameIsPointerEventsNone = !aFrame->PassPointerEventsToChildren()
|
|
|
|
&& (aFrame->StyleVisibility()->GetEffectivePointerEvents(aFrame) == NS_STYLE_POINTER_EVENTS_NONE);
|
|
|
|
if (aBuilder->IsInsidePointerEventsNoneDoc() || frameIsPointerEventsNone) {
|
2015-02-17 02:30:02 +00:00
|
|
|
mEventRegionsOverride |= EventRegionsOverride::ForceEmptyHitRegion;
|
|
|
|
}
|
|
|
|
if (nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(aFrame->PresContext()->PresShell())) {
|
|
|
|
mEventRegionsOverride |= EventRegionsOverride::ForceDispatchToContent;
|
|
|
|
}
|
2015-02-17 02:30:02 +00:00
|
|
|
}
|
2015-02-10 21:28:07 +00:00
|
|
|
}
|
|
|
|
|
2010-08-20 23:24:41 +00:00
|
|
|
already_AddRefed<Layer>
|
|
|
|
nsDisplayRemote::BuildLayer(nsDisplayListBuilder* aBuilder,
|
2011-06-22 12:11:27 +00:00
|
|
|
LayerManager* aManager,
|
2013-09-27 06:01:16 +00:00
|
|
|
const ContainerLayerParameters& aContainerParameters)
|
2010-08-20 23:24:41 +00:00
|
|
|
{
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
|
2010-10-13 22:55:45 +00:00
|
|
|
nsIntRect visibleRect = GetVisibleRect().ToNearestPixels(appUnitsPerDevPixel);
|
2012-09-16 22:25:33 +00:00
|
|
|
visibleRect += aContainerParameters.mOffset;
|
|
|
|
nsRefPtr<Layer> layer = mRemoteFrame->BuildLayer(aBuilder, mFrame, aManager, visibleRect, this, aContainerParameters);
|
2015-02-10 21:28:07 +00:00
|
|
|
if (layer && layer->AsContainerLayer()) {
|
2015-02-17 02:30:02 +00:00
|
|
|
layer->AsContainerLayer()->SetEventRegionsOverride(mEventRegionsOverride);
|
2015-02-10 21:28:07 +00:00
|
|
|
}
|
2010-08-20 23:24:41 +00:00
|
|
|
return layer.forget();
|
|
|
|
}
|
2011-01-13 17:45:14 +00:00
|
|
|
|
2013-08-13 07:56:57 +00:00
|
|
|
void
|
|
|
|
nsDisplayRemote::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
|
|
|
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
|
|
|
|
{
|
|
|
|
if (mRemoteFrame->HitTest(aRect)) {
|
|
|
|
aOutFrames->AppendElement(mFrame);
|
|
|
|
}
|
|
|
|
}
|
2011-01-13 17:45:14 +00:00
|
|
|
|