Closed
Bug 196805
Opened 23 years ago
Closed 2 years ago
Remove GFX nsITheme dependencies on content and layout
Categories
(Core Graveyard :: GFX, defect)
Core Graveyard
GFX
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: bryner, Unassigned)
References
Details
Currently, nsITheme implementations on all platforms have dependencies on
content and layout. This isn't a clean separation - gfx should only contain
low-level drawing code.
I see 2 ways we could fix this up:
- Move the entire nsITheme implementation into layout, with platform-specific
source files. This would involve adding an additional API on
nsIRenderingContext or nsIDrawingSurface to get the "native" drawing surface
(the HDC on win32, the CGrafPtr on Mac, or the GdkWindow on unix).
- Split up the nsITheme implementation such that the part of it that needs to
inspect the frame and the element attributes lives in layout, and fills in a
generic struct containing, for example, the disabled, hover, and focus state.
Then have the platform-specific code in gfx which gets handed this struct,
instead of the frame.
Comment 1•23 years ago
|
||
There's also the problem that nsITheme needs to know whether the node is styled
by author/user sheets or not. If it is, we need to drop theming altogether...
At the moment this is done by hardcoding knowledge of the values in forms.css
and comparing the computed values to those. We may want a better method....
| Reporter | ||
Comment 2•23 years ago
|
||
Is there a way we can ask the style system what the value in forms.css is?
Comment 3•23 years ago
|
||
Alec might have some comments here.
Comment 4•23 years ago
|
||
Brian, not at the moment. It would basically require recomputing style for the
node and all its ancestors without including user and author stylesheets in the
current arch, as far as I can tell.
| Reporter | ||
Updated•20 years ago
|
Assignee: bryner → general
Depends on: 240117
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•