Closed Bug 455389 Opened 17 years ago Closed 17 years ago

SVG foreignObjects don't get NS_FRAME_MAY_BE_TRANSFORMED frame bit.

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b1

People

(Reporter: kschwarz, Assigned: kschwarz)

Details

Attachments

(1 file, 1 obsolete file)

The -moz-transform patch added a frame bit, NS_FRAME_MAY_BE_TRANSFORMED, which determines whether a frame can possibly have a transform on it. The current implementation only sets this bit if the frame has the -moz-transform property, but it should also be set for SVG foreignObjects or code that checks for transformed frames might not work correctly. Patch to follow.
Attached patch Potential Patch #1 (obsolete) — Splinter Review
Updated the IsTransformed function to allow the caller to bypass the frame bit check. Now, in nsFrame::Init, we determine whether or not to set the frame bit by calling IsTransformed(PR_FALSE), which should give back whether or not the frame is actually transformed. Since IsTransformed can be overridden by derived classes, any frame class that might have a transform on it can give their own implementation of IsTransformed and nsFrame::Init should take care of the frame bit.
Attachment #338720 - Flags: superreview?(roc)
Attachment #338720 - Flags: review?(roc)
OS: Linux → All
Hardware: PC → All
Why don't you just make nsSVGForeignObjectFrame set the bit?
(In reply to comment #2) > Why don't you just make nsSVGForeignObjectFrame set the bit? While I could modify nsSVGForeignObjectFrame to set the bit, I thought that it might be a good idea to unify the code paths for setting the frame bit and checking for transformation, since the two are basically identical. That way, if we ever introduce more frames that could be transformed, they just need to override IsTransformed and the frame bit will take care of itself. However, if it's easier to just change nsSVGForeignObjectFrame to set the bit, I can do that instead.
I think that's simpler, yeah. Thanks!
Simple fix - just adds the frame bit in the nsSVGForeignObjectFrame constructor.
Attachment #338720 - Attachment is obsolete: true
Attachment #339023 - Flags: superreview?(roc)
Attachment #339023 - Flags: review?(roc)
Attachment #338720 - Flags: superreview?(roc)
Attachment #338720 - Flags: review?(roc)
Attachment #339023 - Flags: superreview?(roc)
Attachment #339023 - Flags: superreview+
Attachment #339023 - Flags: review?(roc)
Attachment #339023 - Flags: review+
Attachment #339023 - Attachment description: Potential Patch #2 → Potential Patch #2 [Checkin: Comment 5]
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Version: unspecified → Trunk
Blocks: 696242
No longer blocks: 696242
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: