mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958596 - Print ScrollableLayerGuids of APZCs when printing the tree. r=kats
--HG-- extra : rebase_source : cc3688109bb8a8a074e24b2f0268fdc556f05c1f
This commit is contained in:
parent
3e3cbbe526
commit
4f03179492
@ -12,6 +12,7 @@
|
|||||||
#include "mozilla/gfx/BasePoint.h" // for BasePoint
|
#include "mozilla/gfx/BasePoint.h" // for BasePoint
|
||||||
#include "mozilla/gfx/Rect.h" // for RoundedIn
|
#include "mozilla/gfx/Rect.h" // for RoundedIn
|
||||||
#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor
|
#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor
|
||||||
|
#include "mozilla/gfx/Logging.h" // for Log
|
||||||
|
|
||||||
namespace IPC {
|
namespace IPC {
|
||||||
template <typename T> struct ParamTraits;
|
template <typename T> struct ParamTraits;
|
||||||
@ -425,6 +426,11 @@ struct ScrollableLayerGuid {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <int LogLevel>
|
||||||
|
gfx::Log<LogLevel>& operator<<(gfx::Log<LogLevel>& log, const ScrollableLayerGuid& aGuid) {
|
||||||
|
return log << '(' << aGuid.mLayersId << ',' << aGuid.mPresShellId << ',' << aGuid.mScrollId << ')';
|
||||||
|
}
|
||||||
|
|
||||||
struct ZoomConstraints {
|
struct ZoomConstraints {
|
||||||
bool mAllowZoom;
|
bool mAllowZoom;
|
||||||
bool mAllowDoubleTapZoom;
|
bool mAllowDoubleTapZoom;
|
||||||
|
@ -170,7 +170,8 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||||||
// be possible because of DLBI heuristics) then we don't want to keep using
|
// be possible because of DLBI heuristics) then we don't want to keep using
|
||||||
// the same old APZC for the new content. Null it out so we run through the
|
// the same old APZC for the new content. Null it out so we run through the
|
||||||
// code to find another one or create one.
|
// code to find another one or create one.
|
||||||
if (apzc && !apzc->Matches(ScrollableLayerGuid(aLayersId, container->GetFrameMetrics()))) {
|
ScrollableLayerGuid guid(aLayersId, container->GetFrameMetrics());
|
||||||
|
if (apzc && !apzc->Matches(guid)) {
|
||||||
apzc = nullptr;
|
apzc = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,9 +182,8 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||||||
// underlying content for which the APZC was originally created is still
|
// underlying content for which the APZC was originally created is still
|
||||||
// there. So it makes sense to pick up that APZC instance again and use it here.
|
// there. So it makes sense to pick up that APZC instance again and use it here.
|
||||||
if (apzc == nullptr) {
|
if (apzc == nullptr) {
|
||||||
ScrollableLayerGuid target(aLayersId, container->GetFrameMetrics());
|
|
||||||
for (size_t i = 0; i < aApzcsToDestroy->Length(); i++) {
|
for (size_t i = 0; i < aApzcsToDestroy->Length(); i++) {
|
||||||
if (aApzcsToDestroy->ElementAt(i)->Matches(target)) {
|
if (aApzcsToDestroy->ElementAt(i)->Matches(guid)) {
|
||||||
apzc = aApzcsToDestroy->ElementAt(i);
|
apzc = aApzcsToDestroy->ElementAt(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||||||
visible.width, visible.height,
|
visible.width, visible.height,
|
||||||
apzc);
|
apzc);
|
||||||
|
|
||||||
sApzcTreeLog << "APZC "
|
sApzcTreeLog << "APZC " << guid
|
||||||
<< "\tcb=" << visible
|
<< "\tcb=" << visible
|
||||||
<< "\tsr=" << container->GetFrameMetrics().mScrollableRect
|
<< "\tsr=" << container->GetFrameMetrics().mScrollableRect
|
||||||
<< "\t" << container->GetFrameMetrics().GetContentDescription();
|
<< "\t" << container->GetFrameMetrics().GetContentDescription();
|
||||||
|
Loading…
Reference in New Issue
Block a user