Closed Bug 562700 Opened 15 years ago Closed 15 years ago

Some more restyle APIs should take Element

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

Specifically: nsCSSFrameConstructor::MaybeRecreateFramesForContent nsCSSFrameConstructor::PostRestyleEventCommon nsStyleChangeList::AppendChange
Maybe I'm missing something, but don't we pass text nodes to PostRestyleEventCommon via RecreateFramesForContent sometimes?
That's one thing I'll have to check on, yes. Note that PostRestyleEventCommon currently has this code: NS_ASSERTION(aContent->IsNodeOfType(nsINode::eELEMENT), "Shouldn't be trying to restyle non-elements directly"); which suggests to me that in fact RecreateFramesForContent is not called on textnodes at the moment.... ;)
Okay. I was thinking of ReframeTextIfNeeded, but I see that it calls ContentInserted directly.
Depends on: 565809
Depends on: 565815
Depends on: 565818
Depends on: 565819
Depends on: 565820
Depends on: 565826
Attachment #445276 - Flags: review?(dbaron)
I think nsStyleChangeList::AppendChange is in fact used for non-elements at the moment (with a reconstruct hint), at least at first glance, so not touching that for now.
Attachment #445278 - Flags: review?(dbaron)
Comment on attachment 445276 [details] [diff] [review] Part 1: change some presshell APIs r=dbaron
Attachment #445276 - Flags: review?(dbaron) → review+
Comment on attachment 445277 [details] [diff] [review] Part 2: Change the restyle-event functions to take Element r=dbaron
Attachment #445277 - Flags: review?(dbaron) → review+
Comment on attachment 445278 [details] [diff] [review] Part 3: use element up through where we actually restyle In RestyleLaterSiblings, maybe rename the variable from |child| to |sibling|? r=dbaron with that
Attachment #445278 - Flags: review?(dbaron) → review+
> maybe rename the variable from |child| to |sibling|? Done locally.
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: