Closed
Bug 1268404
Opened 9 years ago
Closed 9 years ago
implement ServoStyleSet::ResolveStyleForNonElement for text nodes
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(2 files, 2 obsolete files)
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8746456 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8746457 -
Flags: review?(bobbyholley)
Comment 4•9 years ago
|
||
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 5•9 years ago
|
||
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+
Assignee | ||
Comment 6•9 years ago
|
||
(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.
Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8746456 -
Attachment is obsolete: true
Attachment #8746888 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8746457 -
Attachment is obsolete: true
Updated•9 years ago
|
Attachment #8746888 -
Flags: review?(bobbyholley) → review+
Comment 10•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1befe70618d1
https://hg.mozilla.org/mozilla-central/rev/cadc30c3f197
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•