Closed Bug 103925 Opened 23 years ago Closed 23 years ago

Need reflow debugging capability in blocks/inlines similar to tables

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: karnaze, Assigned: karnaze)

References

Details

(Whiteboard: PATCH CANDIDATE_094)

Attachments

(4 files, 1 obsolete file)

The reflow debugging code in tables is useful in determining if there are 
problems in table related frames and/or cell blocks. If this were extended to 
blocks and (some) inline elements, it would reveal similar problems inside 
blocks. All of this code needs to be unified in a single static object (e.g. 
nsFrameDebug) so that indentation is consistent. The code would be enabled 
either through #ifdef or environment variables. Although there is a lot of block 
debug code already in place, it tends to be overwhelming.
I think that GECKO_BLOCK_DEBUG_FLAGS=reflow is usually sufficient to deal with
most first-line problems. Then you can turn on other flags as you need 'em...
Summary: Need reflow debugging capability in blocks/inlines similar to tables → Need reflow debugging capability in blocks/inlines similar to tables
I want something to help me analyze table block problems by going deeper into 
blocks. I need output that will be easy to look at (e.g. consistent indentation) 
and also identify the reflows with a count so that when a particular reflow is 
identified as a problem, it can be easily identified upon restart. I also want 
it to be simple and general enough to diagnose other types of frames besides 
blocks (e.g. inside selects). I also want to be able to have someone less 
knowledeable than you or me to be able to use the output for bug triage 
purposes. If I turn on both the table reflow debugging and the the block reflow 
debugging, I'm probably not going to like what I see.





I'm still planning to keep the more esoteric table debugging code confined to 
tables (e.g. all of the nasty balancing stuff that nobody but me or bernd can 
decifer) and the same for blocks. 
Gotcha. Makes sense.
Status: NEW → ASSIGNED
Whiteboard: PATCH
Target Milestone: --- → mozilla0.9.6
Comment on attachment 54279 [details] [diff] [review]
patch to implement reflow display

r= alexsavulov

i'm eagger to use this new debug stuff... looks good to me (ok, that dr_cookie is a little bit insecure, but as long as no one touches it between  enter and exit everything will be ok)
Attachment #54279 - Flags: review+
Chris: 
In order to get the full power of this patch, could you make a cheat sheet how
to use it. (I know real: programmers don't write documentation, but I think it
is worth a try). Or at least a extensive checkin comment like brendans checkin
last week :-).
I think I promised Chris that I would write the doc if we wrote the patch, and I
will too. sr=attinasi for the patch, doc coming soon.
Comment on attachment 54279 [details] [diff] [review]
patch to implement reflow display

sr=attinasi
Attachment #54279 - Flags: superreview+
Attached patch revised patchSplinter Review
The patch is in. Until Marc writes some documentation, the env var 
GECKO_DISPLAY_REFLOW_RULES_FILE needs to point to a file containing rules.

<frame_id>   ::= <frametype name> | <frametype name abbrev> | *
<activation> ::= 0 | 1
<rule>       :: = <frame_id> { <frame_id> } activation

A simple rules file that will do what the old table reflow debugging stuff did 
is as follows:

tbl 1
rowG 1
row 1
cell 1
cell block 1

To get this plus everthing right inside the cell blocks, add:

cell block * 1

To get every frame (that currently has a frame type), use

* 1

An empty file is the same as

* 0


Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: PATCH → PATCH CANDIDATE_094
I haven't checked in the 3rd attachment yet. To flag errors where reflow values 
are not on pixel boundaries, one would set 
GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS=1. 
Comment on attachment 57696 [details] [diff] [review]
patch to flag pixel rounding errors

kewl - sr=attinasi
Attachment #57696 - Flags: superreview+
Comment on attachment 57696 [details] [diff] [review]
patch to flag pixel rounding errors

gooood
Attachment #57696 - Flags: review+
The 3rd attachement (2nd patch) is checked in.
Attachment #59245 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: