Closed Bug 1036400 Opened 10 years ago Closed 10 years ago

Background tab hit region too small in Nightly

Categories

(Core :: SVG, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: mstange, Assigned: jwatt)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached image illustration
In yesterday's Nightly, the mouse hit region for background tabs is too small.
See the attached screenshot.

phlsa tells me that it's bigger in Beta, so this is hopefully not intentional.
Looks like bug 1034115. Jonathan, could you have a look?
Depends on: 1034115
Flags: needinfo?(jwatt)
Oh. Hmm. Or bug 1031726, because this is clip:rect, not SVG? Maybe? Mats?
Depends on: 1031726
Flags: needinfo?(mats)
Backing out both of Mats' commits in that window didn't fix this. I tried backing out all the SVG changes (by now there's also bug 988808) but that no longer compiles. Still, I guess that means this is sooner to do with the SVG changes than with the clip:rect changes. :-\
Flags: needinfo?(mats)
Probably me. I'll take a look.
Assignee: nobody → jwatt
Flags: needinfo?(jwatt)
Fwiw, I can't reproduce this in Linux64 Nightly 33.0a1 (2014-07-09).
Attached patch patchSplinter Review
I'll work on knocking up a mochitest for this before landing.
Attachment #8453211 - Flags: review?(longsonr)
What's the point of the #if 1 change. You can have an r=longsonr for the other bit but not that part.
Comment on attachment 8453211 [details] [diff] [review]
patch

># HG changeset patch
># Parent 3a090599c39ef7d6ef0c66af45d55cb163c06f4f
># User Jonathan Watt <jwatt@jwatt.org>
>diff --git a/layout/svg/nsSVGPathGeometryFrame.cpp b/layout/svg/nsSVGPathGeometryFrame.cpp
>--- a/layout/svg/nsSVGPathGeometryFrame.cpp
>+++ b/layout/svg/nsSVGPathGeometryFrame.cpp
>@@ -445,30 +445,34 @@ nsSVGPathGeometryFrame::GetBBoxContribut
>   SVGBBox bbox;
> 
>   if (aToBBoxUserspace.IsSingular()) {
>     // XXX ReportToConsole
>     return bbox;
>   }
> 
>   RefPtr<DrawTarget> tmpDT;
>+#if 1
> #ifdef XP_WIN
>   // Unfortunately D2D backed DrawTarget produces bounds with rounding errors
>   // when whole number results are expected, even in the case of trivial
>   // calculations. To avoid that and meet the expectations of web content we
>   // have to use a CAIRO DrawTarget. The most efficient way to do that is to
>   // wrap the cached cairo_surface_t from ScreenReferenceSurface():
>   nsRefPtr<gfxASurface> refSurf =
>     gfxPlatform::GetPlatform()->ScreenReferenceSurface();
>   tmpDT = gfxPlatform::GetPlatform()->
>     CreateDrawTargetForSurface(refSurf, IntSize(1, 1));
> #else
>   tmpDT = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
> #endif
>   nsRefPtr<gfxContext> tmpCtx = new gfxContext(tmpDT);
>+#else
>+  nsRefPtr<gfxContext> tmpCtx = new gfxContext(gfxPlatform::GetPlatform()->ScreenReferenceSurface());
>+#endif
> 
>   GeneratePath(tmpCtx, aToBBoxUserspace);
>   tmpCtx->IdentityMatrix();
> 
>   // Be careful when replacing the following logic to get the fill and stroke
>   // extents independently (instead of computing the stroke extents from the
>   // path extents). You may think that you can just use the stroke extents if
>   // there is both a fill and a stroke. In reality it's necessary to calculate
>diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp
>--- a/layout/svg/nsSVGUtils.cpp
>+++ b/layout/svg/nsSVGUtils.cpp
>@@ -367,16 +367,20 @@ nsSVGUtils::GetOuterSVGFrameAndCoveredRe
> 
> gfxMatrix
> nsSVGUtils::GetCanvasTM(nsIFrame *aFrame, uint32_t aFor,
>                         nsIFrame* aTransformRoot)
> {
>   // XXX yuck, we really need a common interface for GetCanvasTM
> 
>   if (!aFrame->IsFrameOfType(nsIFrame::eSVG)) {
>+    if (aFor == nsISVGChildFrame::FOR_HIT_TESTING &&
>+        NS_SVGDisplayListHitTestingEnabled()) {
>+      return gfxMatrix();
>+    }
>     return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(aFrame);
>   }
> 
>   if (!(aFrame->GetStateBits() & NS_FRAME_IS_NONDISPLAY) &&
>       !aTransformRoot) {
>     if (aFor == nsISVGChildFrame::FOR_PAINTING &&
>         NS_SVGDisplayListPaintingEnabled()) {
>       return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(aFrame);
Attachment #8453211 - Flags: review?(longsonr) → review+
Component: Theme → SVG
Product: Firefox → Core
(In reply to Robert Longson from comment #8)
> What's the point of the #if 1 change. You can have an r=longsonr for the
> other bit but not that part.

Oops. That has nothing to do with this bug. ;)
https://hg.mozilla.org/mozilla-central/rev/8abc07984f2f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
No longer depends on: 1031726
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: