Closed Bug 168326 Opened 22 years ago Closed 4 years ago

Rework the preference stylesheet

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: perf)

The preference stylesheet has several issues in how its handled. The upshot is
that we have to do a lot more work than we should have to when a preference
changes.  Basically, we rebuild the whole sheet when any preference changes (we
should just poke the corresponding rule.

A simple patch that speeds up changing appearance prefs a lot without actually
addressing the underlying problem is:

-      ReconstructFrames();
+      //ReconstructFrames();
+      ReconstructStyleData(PR_TRUE);

in the presshell's SetPreferenceStyleRules
Blocks: 183899
Keywords: perf
Priority: -- → P3
Target Milestone: --- → mozilla1.7alpha
Blocks: 58048
Blocks: 214393
Blocks: 242738
Blocks: 243038
It looks like nsIPresShell::EnablePrefStyleRules and
nsIPresShell::ArePrefStyleRulesEnabled are basically unused.  They are there for
use by Editor, in theory (though they don't really work).

Would anyone object to me just removing them?
I don't object, but I don't know anything about the editor...
I have no idea why the editor uses it. We should ping Kin or Simon.
Maybe I wasn't clear... Editor does NOT use them.  The checkin comment that
added them says they are "for use by editor".  The only question I have is
whether editor has plans to use these in the future.
I think they are obsolete; maybe cmanske had plans for them, but if Daniel
doesn't need them now, then let's nuke 'em.
QA Contact: chrispetersen → layout
Priority: P3 → P2
Target Milestone: mozilla1.7alpha → ---
Priority: P2 → P3

We no longer unconditionally reconstruct when preference rules change (we RebuildAllStyleData instead, and do whatever that means hint-wise), and we now have a single shared preference sheet, so the "rebuild it from scratch" is a much smaller issue. Going to mark this worksforme.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.