Stop layers from snapping transforms for SVG content

REOPENED
Assigned to

Status

()

defect
REOPENED
6 years ago
5 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

Trunk
mozilla23
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Assignee

Description

6 years ago
The layers code sometimes snaps transforms to keep things on pixel boundaries. While we want that for HTML, we don't want it for SVG.
Assignee

Comment 1

6 years ago
Posted patch patch (obsolete) — Splinter Review
Attachment #737432 - Flags: review?(roc)
Comment on attachment 737432 [details] [diff] [review]
patch

Review of attachment 737432 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/Layers.h
@@ +873,5 @@
> +   * CONSTRUCTION PHASE ONLY
> +   * Used for SVG content which does not want the snapping behavior that is
> +   * desirable in HTML.
> +   */
> +  void DisableTransformSnapping();

I'd prefer to make this a CONTENT_ flag. Say CONTENT_DISABLE_TRANSFORM_SNAPPING.
Assignee

Comment 3

6 years ago
Posted patch patch (obsolete) — Splinter Review
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #2)
> I'd prefer to make this a CONTENT_ flag. Say
> CONTENT_DISABLE_TRANSFORM_SNAPPING.

Sure, sounds good.
Attachment #737432 - Attachment is obsolete: true
Attachment #737432 - Flags: review?(roc)
Attachment #737444 - Flags: review?(roc)
Comment on attachment 737444 [details] [diff] [review]
patch

Review of attachment 737444 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/Layers.h
@@ +665,5 @@
>    }
> +  void AddContentFlags(uint32_t aFlags)
> +  {
> +    SetContentFlags(mContentFlags | aFlags);
> +  }

You don't need this...

::: layout/base/FrameLayerBuilder.cpp
@@ +2946,5 @@
>    containerLayer->SetUserData(&gNotifySubDocInvalidationData, nullptr);
>  
> +  if (aContainerFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) {
> +    containerLayer->AddContentFlags(Layer::CONTENT_DISABLE_TRANSFORM_SNAPPING);
> +  }

Just fold this into the SetContentFlags call above.
Assignee

Comment 5

6 years ago
Posted patch patchSplinter Review
Attachment #737444 - Attachment is obsolete: true
Attachment #737444 - Flags: review?(roc)
Attachment #737454 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/644f16c3f87c
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23

Updated

6 years ago
Depends on: 871729
Backed out as https://hg.mozilla.org/integration/mozilla-inbound/rev/854310083421 for causing bug 871729.

This change didn't appear to change/fix any reftests, but it did cause a visible regression on a real world site.

It's not clear what this change was meant to fix either. We should discuss this again once jwatt returns from PTO.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee

Comment 11

5 years ago
Maybe another source of pixel snapping:

http://hg.mozilla.org/mozilla-central/rev/23ee0b1ce250#l6.2
Assignee

Comment 12

5 years ago
Another example of the snapping sucking is the horizontal animation in:

http://jeremie.patonnier.net/experiences/parisweb2011/animation.svg
You need to log in before you can comment on or make changes to this bug.