Closed Bug 1268404 Opened 9 years ago Closed 9 years ago

implement ServoStyleSet::ResolveStyleForNonElement for text nodes

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(2 files, 2 obsolete files)

No description provided.
Attachment #8746456 - Flags: review?(bobbyholley)
Comment on attachment 8746456 [details] [diff] [review] Part 1: Pass text node into ResolveStyleForNonElement. Review of attachment 8746456 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/style/nsStyleSet.h @@ +173,5 @@ > // any rule matching for them is a first step. > // When text-combine-upright is not present, we may also want to avoid > // resolving style contexts for text frames as well. > already_AddRefed<nsStyleContext> > + ResolveStyleForNonElement(nsIContent* aContent, Worth adding a comment about exactly what aContent refers to here, and when it is and isn't null. Though to be honest, I think it would be cleaner to just have ResolveStyleForTextNode(nsIContent* aTextNode, nsStyleContext* aParentContext), and leave ResolveStyleForNonElement the way it is. This would avoid having a bunch of callers pass nullptr for the contextually-meaningless parameter. The nsStyleSet implementation is pretty barebones, and our Servo implementation for these two cases seems like it's going to be pretty orthogonal. What do you think?
Attachment #8746456 - Flags: review?(bobbyholley)
Comment on attachment 8746457 [details] [diff] [review] Part 2: Implement ServoStyleSet::ResolveStyleForNonElement for text nodes. Review of attachment 8746457 [details] [diff] [review]: ----------------------------------------------------------------- r=me modulo the discussion regarding the previous patch.
Attachment #8746457 - Flags: review?(bobbyholley) → review+
(In reply to Bobby Holley (busy) from comment #4) > Though to be honest, I think it would be cleaner to just have > ResolveStyleForTextNode(nsIContent* aTextNode, nsStyleContext* > aParentContext), and leave ResolveStyleForNonElement the way it is. This > would avoid having a bunch of callers pass nullptr for the > contextually-meaningless parameter. Sounds fair.
Attachment #8746888 - Flags: review?(bobbyholley) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: