Closed Bug 280988 Opened 20 years ago Closed 19 years ago

SVG frames should implement GetFrameName

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: scootermorris)

References

Details

Attachments

(1 file, 1 obsolete file)

See nsIFrameDebug.h.

Implementing GetFrameName will have two main benefits benefits:

1)  Better accuracy of the regression tests if those start including SVG
2)  More useful output from Dump Frames in the layout debugger.

Note that the method should be both declared and implemented inside #ifdef DEBUG.
Blocks: 277146
Attachment #178649 - Flags: review?(tor)
So... with foreignobject you have to be a little careful.  You might want to
leave the type as-is until you've audited all existing places where the
blockFrame and areaFrame types are tested for (chances are that any place that
tests for both needs to test for foreignObject too....)

Alternately, you could just leave foreignObject claiming to be a block as far as
type goes, and audit code that checks display types to make sure it deals with
foreign objects that have display:inline on them.
(In reply to comment #2)
> So... with foreignobject you have to be a little careful.  You might want to
> leave the type as-is until you've audited all existing places where the
> blockFrame and areaFrame types are tested for (chances are that any place that
> tests for both needs to test for foreignObject too....)

If I take this approach, its going to mean adding #ifdef MOZ_SVG code into
several files in layout/generic and possibly tables/nsTableFrame.cpp.  I think
I'll resubmit the patch without GetType for foreignObject and handle that
separately.

> 
> Alternately, you could just leave foreignObject claiming to be a block as far as
> type goes, and audit code that checks display types to make sure it deals with
> foreign objects that have display:inline on them.

That looks like it touches a hole bunch more files.  If the first approach is
workable, it certainly seems like it would involve less.
Status: NEW → ASSIGNED
Attachment #178649 - Flags: review?(tor)
OK, here is an update that does not implement GetType for foreignObject until
we can make the other changes necessary -- perhaps wrapping it in with other
fixes to the foreignObject implementation.
Assignee: general → scootermorris
Attachment #178649 - Attachment is obsolete: true
Attachment #178655 - Flags: review?(tor)
> I think I'll resubmit the patch without GetType for foreignObject and handle
> that separately.

Yeah, definitely.

> If the first approach is workable

It's somewhat workable... Probably still need to audit code to see what things
are being cast to and where...
Attachment #178655 - Flags: review?(tor) → review+
Checked in for Scooter.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: