Closed
Bug 34400
Opened 25 years ago
Closed 25 years ago
[skins/xbl] behavior property doesn't work with <window> tag
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: hyatt, Assigned: hyatt)
References
Details
(Whiteboard: [nsbeta2-][need info])
Attachments
(1 file)
2.92 KB,
patch
|
Details | Diff | Splinter Review |
If you try to attach behavior to the <window> tag it fails. The new style
context that is built for the gfx scroll frame somehow loses the information.
Seems to be a problem with the scroll frame's style resolution.
Assignee | ||
Comment 1•25 years ago
|
||
To test, you can add a style rule for window...
window {
behavior: url(whatever.you.want);
}
Then break in nsCSSFrameConstructor at COnstructDocElementFrame... the
styleContext prior to BeginBuildScrollFrame will have, in its mUserInterface
struct, the correct value for mBehavior.
After you call BuildScrollFrame, though, and set styleContext = newContext, then
mBehavior is now empty. Something is going wrong.
Pierre, if you have any ideas, or can help out, it would be much appreciated.
Summary: behavior property doesn't work with <window> tag → [skins/xbl] behavior property doesn't work with <window> tag
Comment 2•25 years ago
|
||
Adding 'skins' keyword to appropriate bugs en masse, sorry about any
mistakes...
Keywords: skins
Comment 3•25 years ago
|
||
I put a breakpoint on BeginBuildingScrollFrame() inside
ConstructDocElementFrame() but I never hit it. I tried pages with list elements
and dropdown lists too. Could you describe more exactly the steps to reproduce?
Assignee | ||
Comment 4•25 years ago
|
||
I wonder if it's just for XUL... hmmm...
If you go to resource:/res/samples/widgets.xul and MANUALLY EDIT the file
to add overflow: auto to the <window> tag (just use inline style), you should
hit the breakpoint.
Assignee | ||
Comment 5•25 years ago
|
||
You can also edit the file and put a behavior: on there and watch how it is gone
on the new context.
Comment 6•25 years ago
|
||
I have a fresh tree (around 9pm) and I applied the following patch:
Index: widgets.xul
===================================================================
RCS file: /m/pub/mozilla/xpfe/browser/samples/widgets.xul,v
retrieving revision 1.2
diff -r1.2 widgets.xul
33c33
< style="width: 250px;"
---
> style="width: 250px; overflow:auto; behavior: url(whatever.you.want);"
Then I put a breakpoint in nsCSSFrameConstructor.cpp line 3219, which is the call
to BeginBuildingScrollFrame() inside ConstructDocElementFrame(), launched the
app, went to the Bugzilla Query page and played with some widgets but I still did
not hit the breakpoint.
Please make sure you have a clean tree and send me the patch to apply in
widgets.xul.
Comment 7•25 years ago
|
||
Should this bug be targetted for M16 as part of the skinnability push for B2?
Could you please set the target so we know whether to expect it?
Assignee | ||
Updated•25 years ago
|
Target Milestone: --- → M16
Comment 9•25 years ago
|
||
PDT would like to know what required beta2 work this blocks.
Whiteboard: [NEED INFO]
Comment 10•25 years ago
|
||
cc hangas. still need info on what this blocks.
Comment 13•25 years ago
|
||
This bug looks completely dead. It was opened one day, almost 2 months ago, in
the middle of the night. Comments shows that it could not be reproduced during
the next couple of hours and ever since only the managers have added comments
wondering what to do with the goddamm thing. Reassigned to the reporter :-)
Assignee: evaughan → hyatt
Comment 14•25 years ago
|
||
need info: is this bug still a problem? We need to either nominate for nsbeta3
(with a compelling argument as to why we should plus it) or retarget to Future.
Whiteboard: [nsbeta2-] → [nsbeta2-][need info]
Assignee | ||
Comment 16•25 years ago
|
||
Assignee | ||
Comment 17•25 years ago
|
||
Wasn't CSS' fault as it turns out. (Go CSS!) :)
All that was wrong here is that the XBL code needed to be fixed to match the
same ordering that's used for normal frames. Here's the patch.
Looking for r= and a= for trunk landing.
Status: NEW → ASSIGNED
Comment 18•25 years ago
|
||
+ const nsStyleUserInterface* ui= (const nsStyleUserInterface*)
+ styleContext->GetStyleData(eStyleStruct_UserInterface);
NS_STATIC_CAST, please. I know, the other casts in there are old C-style. It
still seems worthwhile to plant a good seed.
Could you say more about why it's important to CreateAnonymousFrames before
SetInitialChildList here:
+ // Create any anonymous frames the doc element frame requires
+ CreateAnonymousFrames(aPresShell, aPresContext, nsnull, aState,
aDocElement, contentFrame,
+ childItems);
+
// Set the initial child lists
contentFrame->SetInitialChildList(aPresContext, nsnull,
childItems.childList);
- // Create any anonymous frames the doc element frame requires
- CreateAnonymousFrames(aPresShell, aPresContext, nsnull, aState,
aDocElement, contentFrame,
- childItems);
Looks ok to me otherwise, but I'm new to nsCSSFrameConstructor.cpp, which is WAY
too big for me to review and understand. How about getting waterson to bless
your change too?
/be
Assignee | ||
Comment 19•25 years ago
|
||
Sure. XBL hands you back a new child list of anonymous nodes and might even
move the explicit children (from the original list) down underneath the
anonymous nodes. Because I had the ordering wrong, all anonymous frames were
being lost, since I'd set the list before they were even made!
Comment 20•25 years ago
|
||
Ok, thanks -- that makes sense, I needed to wrap my brain around this top-level
contentFrame case.
cc'ing waterson for ultimate final sr=. Man is that file big! I don't feel so
bad about js_Interpret now.
/be
Assignee | ||
Comment 21•25 years ago
|
||
r=waterson.
Assignee | ||
Comment 22•25 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•