зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical
--HG-- extra : rebase_source : 1cab46638599d8c4e6183c42a6fa9d41702392cb extra : source : cabc28a2200b9b4e5e137d331ee5b86b3c09f065
This commit is contained in:
Родитель
b5484d8a9f
Коммит
a592a77364
|
@ -807,9 +807,9 @@ IMEContentObserver::OnMouseButtonEvent(nsPresContext* aPresContext,
|
|||
notification.mMouseButtonEventData.mEventMessage = aMouseEvent->mMessage;
|
||||
notification.mMouseButtonEventData.mOffset = charAtPt.mReply.mOffset;
|
||||
notification.mMouseButtonEventData.mCursorPos.Set(
|
||||
LayoutDeviceIntPoint::ToUntyped(charAtPt.refPoint));
|
||||
charAtPt.refPoint.ToUnknownPoint());
|
||||
notification.mMouseButtonEventData.mCharRect.Set(
|
||||
LayoutDevicePixel::ToUntyped(charAtPt.mReply.mRect));
|
||||
charAtPt.mReply.mRect.ToUnknownRect());
|
||||
notification.mMouseButtonEventData.mButton = aMouseEvent->button;
|
||||
notification.mMouseButtonEventData.mButtons = aMouseEvent->buttons;
|
||||
notification.mMouseButtonEventData.mModifiers = aMouseEvent->modifiers;
|
||||
|
|
|
@ -338,8 +338,8 @@ WheelTransaction::GetScreenPoint(WidgetGUIEvent* aEvent)
|
|||
{
|
||||
NS_ASSERTION(aEvent, "aEvent is null");
|
||||
NS_ASSERTION(aEvent->widget, "aEvent-widget is null");
|
||||
return LayoutDeviceIntPoint::ToUntyped(aEvent->refPoint +
|
||||
aEvent->widget->WidgetToScreenOffset());
|
||||
return (aEvent->refPoint + aEvent->widget->WidgetToScreenOffset())
|
||||
.ToUnknownPoint();
|
||||
}
|
||||
|
||||
/* static */ uint32_t
|
||||
|
|
|
@ -224,7 +224,7 @@ struct LayerPropertiesBase : public LayerProperties
|
|||
if (!mClipRect.IsEqualInterior(*otherClip)) {
|
||||
aGeometryChanged = true;
|
||||
nsIntRegion tmp;
|
||||
tmp.Xor(ParentLayerIntRect::ToUntyped(mClipRect), ParentLayerIntRect::ToUntyped(*otherClip));
|
||||
tmp.Xor(mClipRect.ToUnknownRect(), otherClip->ToUnknownRect());
|
||||
AddRegion(result, tmp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1041,7 +1041,7 @@ Layer::GetVisibleRegionRelativeToRootLayer(nsIntRegion& aResult,
|
|||
// If the parent layer clips its lower layers, clip the visible region
|
||||
// we're accumulating.
|
||||
if (layer->GetEffectiveClipRect()) {
|
||||
aResult.AndWith(ParentLayerIntRect::ToUntyped(*layer->GetEffectiveClipRect()));
|
||||
aResult.AndWith(layer->GetEffectiveClipRect()->ToUnknownRect());
|
||||
}
|
||||
|
||||
// Now we need to walk across the list of siblings for this parent layer,
|
||||
|
@ -1067,7 +1067,7 @@ Layer::GetVisibleRegionRelativeToRootLayer(nsIntRegion& aResult,
|
|||
// Layer clip rects are not affected by the layer's transform.
|
||||
Maybe<ParentLayerIntRect> clipRect = sibling->GetEffectiveClipRect();
|
||||
if (clipRect) {
|
||||
siblingVisibleRegion.AndWith(ParentLayerIntRect::ToUntyped(*clipRect));
|
||||
siblingVisibleRegion.AndWith(clipRect->ToUnknownRect());
|
||||
}
|
||||
// Subtract the sibling visible region from the visible region of |this|.
|
||||
aResult.SubOut(siblingVisibleRegion);
|
||||
|
|
|
@ -306,7 +306,7 @@ GetEventRegions(const LayerMetricsWrapper& aLayer)
|
|||
{
|
||||
if (aLayer.IsScrollInfoLayer()) {
|
||||
ParentLayerIntRect compositionBounds(RoundedToInt(aLayer.Metrics().GetCompositionBounds()));
|
||||
nsIntRegion hitRegion(ParentLayerIntRect::ToUntyped(compositionBounds));
|
||||
nsIntRegion hitRegion(compositionBounds.ToUnknownRect());
|
||||
EventRegions eventRegions(hitRegion);
|
||||
eventRegions.mDispatchToContentHitRegion = eventRegions.mHitRegion;
|
||||
return eventRegions;
|
||||
|
|
|
@ -1928,7 +1928,7 @@ protected:
|
|||
// case of a scrollable frame with the event regions and clip. This lets
|
||||
// us exercise the hit-testing code in APZCTreeManager
|
||||
EventRegions er = aLayer->GetEventRegions();
|
||||
IntRect scrollRect = LayerIntRect::ToUntyped(RoundedToInt(aScrollableRect * metrics.LayersPixelsPerCSSPixel()));
|
||||
IntRect scrollRect = RoundedToInt(aScrollableRect * metrics.LayersPixelsPerCSSPixel()).ToUnknownRect();
|
||||
er.mHitRegion = nsIntRegion(IntRect(layerBound.TopLeft(), scrollRect.Size()));
|
||||
aLayer->SetEventRegions(er);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ BasicContainerLayer::ChildrenPartitionVisibleRegion(const gfx::IntRect& aInRect)
|
|||
childRegion.MoveBy(int32_t(childTransform._31), int32_t(childTransform._32));
|
||||
childRegion.And(childRegion, rect);
|
||||
if (l->GetClipRect()) {
|
||||
childRegion.And(childRegion, ParentLayerIntRect::ToUntyped(*l->GetClipRect()) + offset);
|
||||
childRegion.And(childRegion, l->GetClipRect()->ToUnknownRect() + offset);
|
||||
}
|
||||
nsIntRegion intersection;
|
||||
intersection.And(covered, childRegion);
|
||||
|
|
|
@ -401,7 +401,7 @@ MarkLayersHidden(Layer* aLayer, const IntRect& aClipRect,
|
|||
{
|
||||
const Maybe<ParentLayerIntRect>& clipRect = aLayer->GetEffectiveClipRect();
|
||||
if (clipRect) {
|
||||
IntRect cr = ParentLayerIntRect::ToUntyped(*clipRect);
|
||||
IntRect cr = clipRect->ToUnknownRect();
|
||||
// clipRect is in the container's coordinate system. Get it into the
|
||||
// global coordinate system.
|
||||
if (aLayer->GetParent()) {
|
||||
|
@ -481,7 +481,7 @@ ApplyDoubleBuffering(Layer* aLayer, const IntRect& aVisibleRect)
|
|||
{
|
||||
const Maybe<ParentLayerIntRect>& clipRect = aLayer->GetEffectiveClipRect();
|
||||
if (clipRect) {
|
||||
IntRect cr = ParentLayerIntRect::ToUntyped(*clipRect);
|
||||
IntRect cr = clipRect->ToUnknownRect();
|
||||
// clipRect is in the container's coordinate system. Get it into the
|
||||
// global coordinate system.
|
||||
if (aLayer->GetParent()) {
|
||||
|
|
|
@ -306,7 +306,7 @@ ClientTiledPaintedLayer::RenderHighPrecision(nsIntRegion& aInvalidRegion,
|
|||
nsIntRegion oldValidRegion = mContentClient->GetTiledBuffer()->GetValidRegion();
|
||||
oldValidRegion.And(oldValidRegion, aVisibleRegion);
|
||||
if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {
|
||||
oldValidRegion.And(oldValidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
|
||||
oldValidRegion.And(oldValidRegion, mPaintData.mCriticalDisplayPort.ToUnknownRect());
|
||||
}
|
||||
|
||||
TILING_LOG("TILING %p: Progressive update with old valid region %s\n", this, Stringify(oldValidRegion).c_str());
|
||||
|
@ -319,7 +319,7 @@ ClientTiledPaintedLayer::RenderHighPrecision(nsIntRegion& aInvalidRegion,
|
|||
|
||||
mValidRegion = aVisibleRegion;
|
||||
if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {
|
||||
mValidRegion.And(mValidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
|
||||
mValidRegion.And(mValidRegion, mPaintData.mCriticalDisplayPort.ToUnknownRect());
|
||||
}
|
||||
|
||||
TILING_LOG("TILING %p: Non-progressive paint invalid region %s\n", this, Stringify(aInvalidRegion).c_str());
|
||||
|
@ -340,7 +340,7 @@ ClientTiledPaintedLayer::RenderLowPrecision(nsIntRegion& aInvalidRegion,
|
|||
{
|
||||
// Render the low precision buffer, if the visible region is larger than the
|
||||
// critical display port.
|
||||
if (!nsIntRegion(LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort)).Contains(aVisibleRegion)) {
|
||||
if (!nsIntRegion(mPaintData.mCriticalDisplayPort.ToUnknownRect()).Contains(aVisibleRegion)) {
|
||||
nsIntRegion oldValidRegion = mContentClient->GetLowPrecisionTiledBuffer()->GetValidRegion();
|
||||
oldValidRegion.And(oldValidRegion, aVisibleRegion);
|
||||
|
||||
|
@ -487,15 +487,15 @@ ClientTiledPaintedLayer::RenderLayer()
|
|||
// only draw stuff inside the critical displayport on the first update.
|
||||
mValidRegion.And(mValidRegion, neededRegion);
|
||||
if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {
|
||||
mValidRegion.And(mValidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
|
||||
invalidRegion.And(invalidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
|
||||
mValidRegion.And(mValidRegion, mPaintData.mCriticalDisplayPort.ToUnknownRect());
|
||||
invalidRegion.And(invalidRegion, mPaintData.mCriticalDisplayPort.ToUnknownRect());
|
||||
}
|
||||
|
||||
TILING_LOG("TILING %p: First-transaction valid region %s\n", this, Stringify(mValidRegion).c_str());
|
||||
TILING_LOG("TILING %p: First-transaction invalid region %s\n", this, Stringify(invalidRegion).c_str());
|
||||
} else {
|
||||
if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {
|
||||
invalidRegion.And(invalidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
|
||||
invalidRegion.And(invalidRegion, mPaintData.mCriticalDisplayPort.ToUnknownRect());
|
||||
}
|
||||
TILING_LOG("TILING %p: Repeat-transaction invalid region %s\n", this, Stringify(invalidRegion).c_str());
|
||||
}
|
||||
|
|
|
@ -1508,13 +1508,13 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
|
|||
// make the progressive paint more visible to the user while scrolling.
|
||||
// On B2G uploads are cheaper and we value coherency more, especially outside
|
||||
// the browser, so we always use the entire user-visible area.
|
||||
IntRect coherentUpdateRect(LayerIntRect::ToUntyped(RoundedOut(
|
||||
IntRect coherentUpdateRect(RoundedOut(
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
transformedCompositionBounds->Intersect(aPaintData->mCompositionBounds)
|
||||
#else
|
||||
*transformedCompositionBounds
|
||||
#endif
|
||||
)));
|
||||
).ToUnknownRect());
|
||||
|
||||
TILING_LOG("TILING %p: Progressive update final coherency rect %s\n", mPaintedLayer, Stringify(coherentUpdateRect).c_str());
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ ContainerPrepare(ContainerT* aContainer,
|
|||
surface = CreateOrRecycleTarget(aContainer, aManager);
|
||||
|
||||
MOZ_PERFORMANCE_WARNING("gfx", "[%p] Container layer requires intermediate surface rendering\n", aContainer);
|
||||
RenderIntermediate(aContainer, aManager, RenderTargetPixel::ToUntyped(aClipRect), surface);
|
||||
RenderIntermediate(aContainer, aManager, aClipRect.ToUnknownRect(), surface);
|
||||
aContainer->SetChildrenChanged(false);
|
||||
}
|
||||
|
||||
|
@ -561,7 +561,7 @@ RenderLayers(ContainerT* aContainer,
|
|||
layerToRender->SetClearRect(gfx::IntRect(0, 0, 0, 0));
|
||||
}
|
||||
} else {
|
||||
layerToRender->RenderLayer(RenderTargetPixel::ToUntyped(clipRect));
|
||||
layerToRender->RenderLayer(clipRect.ToUnknownRect());
|
||||
}
|
||||
|
||||
if (gfxPrefs::UniformityInfo()) {
|
||||
|
|
|
@ -247,7 +247,7 @@ LayerManagerComposite::ApplyOcclusionCulling(Layer* aLayer, nsIntRegion& aOpaque
|
|||
localOpaque.MoveBy(transform2d._31, transform2d._32);
|
||||
const Maybe<ParentLayerIntRect>& clip = aLayer->GetEffectiveClipRect();
|
||||
if (clip) {
|
||||
localOpaque.And(localOpaque, ParentLayerIntRect::ToUntyped(*clip));
|
||||
localOpaque.And(localOpaque, clip->ToUnknownRect());
|
||||
}
|
||||
aOpaqueRegion.Or(aOpaqueRegion, localOpaque);
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion)
|
|||
|
||||
// Render our layers.
|
||||
RootLayer()->Prepare(ViewAs<RenderTargetPixel>(clipRect, PixelCastJustification::RenderTargetIsParentLayerForRoot));
|
||||
RootLayer()->RenderLayer(ParentLayerIntRect::ToUntyped(clipRect));
|
||||
RootLayer()->RenderLayer(clipRect.ToUnknownRect());
|
||||
|
||||
if (!mRegionToClear.IsEmpty()) {
|
||||
nsIntRegionRectIterator iter(mRegionToClear);
|
||||
|
@ -805,7 +805,7 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion)
|
|||
|
||||
if (mTwoPassTmpTarget) {
|
||||
MOZ_ASSERT(haveLayerEffects);
|
||||
PopGroupForLayerEffects(previousTarget, ParentLayerIntRect::ToUntyped(clipRect),
|
||||
PopGroupForLayerEffects(previousTarget, clipRect.ToUnknownRect(),
|
||||
grayscaleVal, invertVal, contrastVal);
|
||||
}
|
||||
|
||||
|
|
|
@ -3961,7 +3961,7 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
|
|||
itemContent.IntersectRect(itemContent, itemClip.GetClipRect());
|
||||
clipRect = ViewAs<ParentLayerPixel>(ScaleToNearestPixels(itemClip.GetClipRect()));
|
||||
if (!prerenderedTransform) {
|
||||
itemDrawRect.IntersectRect(itemDrawRect, ParentLayerIntRect::ToUntyped(clipRect));
|
||||
itemDrawRect.IntersectRect(itemDrawRect, clipRect.ToUnknownRect());
|
||||
}
|
||||
clipRect.MoveBy(ViewAs<ParentLayerPixel>(mParameters.mOffset));
|
||||
}
|
||||
|
@ -4048,7 +4048,7 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
|
|||
if (layerClip.HasClip()) {
|
||||
layerClipRect = ViewAs<ParentLayerPixel>(
|
||||
ScaleToNearestPixels(layerClip.GetClipRect()) + mParameters.mOffset);
|
||||
clipRectUntyped = ParentLayerIntRect::ToUntyped(layerClipRect);
|
||||
clipRectUntyped = layerClipRect.ToUnknownRect();
|
||||
clipPtr = &clipRectUntyped;
|
||||
}
|
||||
if (animatedGeometryRoot == item->Frame() &&
|
||||
|
@ -4888,7 +4888,7 @@ ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer
|
|||
} else if (!e->mLayer->IsScrollbarContainer()) {
|
||||
const Maybe<ParentLayerIntRect>& clipRect = GetStationaryClipInContainer(e->mLayer);
|
||||
if (clipRect && opaqueRegionForContainer >= 0 &&
|
||||
opaqueRegions[opaqueRegionForContainer].mOpaqueRegion.Contains(ParentLayerIntRect::ToUntyped(*clipRect))) {
|
||||
opaqueRegions[opaqueRegionForContainer].mOpaqueRegion.Contains(clipRect->ToUnknownRect())) {
|
||||
e->mVisibleRegion.SetEmpty();
|
||||
} else if (data) {
|
||||
e->mVisibleRegion.Sub(e->mVisibleRegion, data->mOpaqueRegion);
|
||||
|
@ -4929,7 +4929,7 @@ ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer
|
|||
nsIntRegion clippedOpaque = e->mOpaqueRegion;
|
||||
Maybe<ParentLayerIntRect> clipRect = e->mLayer->GetCombinedClipRect();
|
||||
if (clipRect) {
|
||||
clippedOpaque.AndWith(ParentLayerIntRect::ToUntyped(*clipRect));
|
||||
clippedOpaque.AndWith(clipRect->ToUnknownRect());
|
||||
}
|
||||
if (e->mLayer->GetIsFixedPosition() && !e->mLayer->IsClipFixed()) {
|
||||
// The clip can move asynchronously, so we can't rely on opaque parts
|
||||
|
|
|
@ -239,18 +239,10 @@ struct LayoutDevicePixel {
|
|||
return LayoutDeviceIntPoint(aPoint.x, aPoint.y);
|
||||
}
|
||||
|
||||
static nsIntPoint ToUntyped(const LayoutDeviceIntPoint& aPoint) {
|
||||
return nsIntPoint(aPoint.x, aPoint.y);
|
||||
}
|
||||
|
||||
static LayoutDeviceIntRect FromUntyped(const nsIntRect& aRect) {
|
||||
return LayoutDeviceIntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
|
||||
static nsIntRect ToUntyped(const LayoutDeviceIntRect& aRect) {
|
||||
return nsIntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
|
||||
static LayoutDeviceRect FromAppUnits(const nsRect& aRect, nscoord aAppUnitsPerDevPixel) {
|
||||
return LayoutDeviceRect(NSAppUnitsToFloatPixels(aRect.x, float(aAppUnitsPerDevPixel)),
|
||||
NSAppUnitsToFloatPixels(aRect.y, float(aAppUnitsPerDevPixel)),
|
||||
|
@ -322,14 +314,6 @@ struct LayoutDevicePixel {
|
|||
* 4) rasterizing at a different scale in the presence of some CSS transforms
|
||||
*/
|
||||
struct LayerPixel {
|
||||
static nsIntRect ToUntyped(const LayerIntRect& aRect) {
|
||||
return nsIntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
|
||||
static nsIntPoint ToUntyped(const LayerIntPoint& aPoint) {
|
||||
return nsIntPoint(aPoint.x, aPoint.y);
|
||||
}
|
||||
|
||||
static gfx::IntRect ToUnknown(const LayerIntRect& aRect) {
|
||||
return gfx::IntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
|
@ -355,14 +339,6 @@ struct LayerPixel {
|
|||
* have RenderTargetPixel == LayerPixel.
|
||||
*/
|
||||
struct RenderTargetPixel {
|
||||
static nsIntPoint ToUntyped(const RenderTargetIntPoint& aPoint) {
|
||||
return nsIntPoint(aPoint.x, aPoint.y);
|
||||
}
|
||||
|
||||
static nsIntRect ToUntyped(const RenderTargetIntRect& aRect) {
|
||||
return nsIntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
|
||||
static gfx::IntRect ToUnknown(const RenderTargetIntRect& aRect) {
|
||||
return gfx::IntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
|
@ -390,10 +366,6 @@ struct RenderTargetPixel {
|
|||
* generally be represented in ScreenPixel units.
|
||||
*/
|
||||
struct ScreenPixel {
|
||||
static nsIntSize ToUntyped(const ScreenIntSize& aSize) {
|
||||
return nsIntSize(aSize.width, aSize.height);
|
||||
}
|
||||
|
||||
static ScreenIntPoint FromUntyped(const nsIntPoint& aPoint) {
|
||||
return ScreenIntPoint(aPoint.x, aPoint.y);
|
||||
}
|
||||
|
@ -412,9 +384,6 @@ struct ScreenPixel {
|
|||
* to get a picture of how the various coordinate systems relate to each other.
|
||||
*/
|
||||
struct ParentLayerPixel {
|
||||
static nsIntRect ToUntyped(const ParentLayerIntRect& aRect) {
|
||||
return nsIntRect(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
}
|
||||
};
|
||||
|
||||
// Operators to apply ScaleFactors directly to Coords, Points, Rects, Sizes and Margins
|
||||
|
|
|
@ -1190,9 +1190,9 @@ nsDisplayListBuilder::AdjustWindowDraggingRegion(nsIFrame* aFrame)
|
|||
if (transformedDevPixelBorderBox.ToIntRect(&transformedDevPixelBorderBoxInt)) {
|
||||
const nsStyleUserInterface* styleUI = aFrame->StyleUserInterface();
|
||||
if (styleUI->mWindowDragging == NS_STYLE_WINDOW_DRAGGING_DRAG) {
|
||||
mWindowDraggingRegion.OrWith(LayoutDevicePixel::ToUntyped(transformedDevPixelBorderBoxInt));
|
||||
mWindowDraggingRegion.OrWith(transformedDevPixelBorderBoxInt.ToUnknownRect());
|
||||
} else {
|
||||
mWindowDraggingRegion.SubOut(LayoutDevicePixel::ToUntyped(transformedDevPixelBorderBoxInt));
|
||||
mWindowDraggingRegion.SubOut(transformedDevPixelBorderBoxInt.ToUnknownRect());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
|
|||
// direction, don't allow the new size to be less that the resizer's
|
||||
// size. This ensures that content isn't resized too small as to make
|
||||
// the resizer invisible.
|
||||
nsRect appUnitsRect = ToAppUnits(LayoutDevicePixel::ToUntyped(rect), aPresContext->AppUnitsPerDevPixel());
|
||||
nsRect appUnitsRect = ToAppUnits(rect.ToUnknownRect(), aPresContext->AppUnitsPerDevPixel());
|
||||
if (appUnitsRect.width < mRect.width && mouseMove.x)
|
||||
appUnitsRect.width = mRect.width;
|
||||
if (appUnitsRect.height < mRect.height && mouseMove.y)
|
||||
|
|
|
@ -1155,7 +1155,7 @@ PuppetWidget::GetChromeDimensions()
|
|||
NS_WARNING("PuppetWidget without Tab does not have chrome information.");
|
||||
return nsIntPoint();
|
||||
}
|
||||
return LayoutDeviceIntPoint::ToUntyped(GetOwningTabChild()->GetChromeDisplacement());
|
||||
return GetOwningTabChild()->GetChromeDisplacement().ToUnknownPoint();
|
||||
}
|
||||
|
||||
nsIntPoint
|
||||
|
|
|
@ -3316,7 +3316,7 @@ IMEInputHandler::FirstRectForCharacterRange(NSRange& aRange,
|
|||
if (!rootWindow || !rootView) {
|
||||
return rect;
|
||||
}
|
||||
rect = nsCocoaUtils::DevPixelsToCocoaPoints(LayoutDevicePixel::ToUntyped(r),
|
||||
rect = nsCocoaUtils::DevPixelsToCocoaPoints(r.ToUnknownRect(),
|
||||
mWidget->BackingScaleFactor());
|
||||
rect = [rootView convertRect:rect toView:nil];
|
||||
rect.origin = [rootWindow convertBaseToScreen:rect.origin];
|
||||
|
|
|
@ -300,8 +300,7 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer,
|
|||
}
|
||||
|
||||
nsIntRect clip;
|
||||
nsIntRect layerClip = aLayer->GetEffectiveClipRect() ?
|
||||
ParentLayerIntRect::ToUntyped(*aLayer->GetEffectiveClipRect()) : nsIntRect();
|
||||
nsIntRect layerClip = aLayer->GetEffectiveClipRect().valueOr(ParentLayerIntRect()).ToUnknownRect();
|
||||
nsIntRect* layerClipPtr = aLayer->GetEffectiveClipRect() ? &layerClip : nullptr;
|
||||
if (!HwcUtils::CalculateClipRect(aParentTransform,
|
||||
layerClipPtr,
|
||||
|
|
|
@ -1871,7 +1871,7 @@ IMContextWrapper::SetCursorPosition(GtkIMContext* aContext)
|
|||
LayoutDeviceIntRect rect = charRect.mReply.mRect + root - owner;
|
||||
rect.width = 0;
|
||||
GdkRectangle area = rootWindow->DevicePixelsToGdkRectRoundOut(
|
||||
LayoutDeviceIntRect::ToUntyped(rect));
|
||||
rect.ToUnknownRect());
|
||||
|
||||
gtk_im_context_set_cursor_location(aContext, &area);
|
||||
}
|
||||
|
|
|
@ -1476,7 +1476,7 @@ nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
|
|||
// use the point including window decorations
|
||||
gint x, y;
|
||||
gdk_window_get_root_origin(gtk_widget_get_window(GTK_WIDGET(mContainer)), &x, &y);
|
||||
aRect.MoveTo(LayoutDevicePixel::ToUntyped(GdkPointToDevicePixels({ x, y })));
|
||||
aRect.MoveTo(GdkPointToDevicePixels({ x, y }).ToUnknownPoint());
|
||||
}
|
||||
else {
|
||||
aRect.MoveTo(WidgetToScreenOffsetUntyped());
|
||||
|
|
|
@ -1374,7 +1374,7 @@ class nsIWidget : public nsISupports {
|
|||
|
||||
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() = 0;
|
||||
virtual nsIntPoint WidgetToScreenOffsetUntyped() {
|
||||
return mozilla::LayoutDeviceIntPoint::ToUntyped(WidgetToScreenOffset());
|
||||
return WidgetToScreenOffset().ToUnknownPoint();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1662,8 +1662,7 @@ IMMHandler::HandleQueryCharPosition(nsWindow* aWindow,
|
|||
("IMM: HandleQueryCharPosition, eQueryEditorRect failed"));
|
||||
::GetWindowRect(aWindow->GetWindowHandle(), &pCharPosition->rcDocument);
|
||||
} else {
|
||||
nsIntRect editorRectInWindow =
|
||||
LayoutDevicePixel::ToUntyped(editorRect.mReply.mRect);
|
||||
nsIntRect editorRectInWindow = editorRect.mReply.mRect.ToUnknownRect();
|
||||
nsWindow* window = editorRect.mReply.mFocusedWidget ?
|
||||
static_cast<nsWindow*>(editorRect.mReply.mFocusedWidget) : aWindow;
|
||||
nsIntRect editorRectInScreen;
|
||||
|
@ -2170,7 +2169,7 @@ IMMHandler::GetCharacterRectOfSelectedTextAt(nsWindow* aWindow,
|
|||
aWindow->InitEvent(charRect, &point);
|
||||
aWindow->DispatchWindowEvent(&charRect);
|
||||
if (charRect.mSucceeded) {
|
||||
aCharRect = LayoutDevicePixel::ToUntyped(charRect.mReply.mRect);
|
||||
aCharRect = charRect.mReply.mRect.ToUnknownRect();
|
||||
if (aWritingMode) {
|
||||
*aWritingMode = charRect.GetWritingMode();
|
||||
}
|
||||
|
@ -2211,7 +2210,7 @@ IMMHandler::GetCaretRect(nsWindow* aWindow,
|
|||
("IMM: GetCaretRect, FAILED, due to eQueryCaretRect failure"));
|
||||
return false;
|
||||
}
|
||||
aCaretRect = LayoutDevicePixel::ToUntyped(caretRect.mReply.mRect);
|
||||
aCaretRect = caretRect.mReply.mRect.ToUnknownRect();
|
||||
if (aWritingMode) {
|
||||
*aWritingMode = caretRect.GetWritingMode();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче