[FIX]Computed style should never have null style structs

RESOLVED FIXED in mozilla1.9alpha1

Status

()

RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla1.9alpha1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 4 obsolete attachments)

(Assignee)

Description

12 years ago
Since nsIFrame::GetStyleData and nsStyleContext::GetStyleData never return null, the only way nsComputedDOMStyle::GetStyleData can return null is if we fail to resolve a style context.  So the right thing to do is to resolve that up front if we'll need it, bail if that fails, and skip all the null-checks.
(Assignee)

Comment 2

12 years ago
Created attachment 249519 [details] [diff] [review]
Same as diff -w

The interesting changes are in GetStyleData and GetPropertyCSSValue.  The rest is basically null-check removal and ensuing code simplification.
Attachment #249519 - Flags: superreview?(roc)
Attachment #249519 - Flags: review?(roc)
(Assignee)

Comment 3

12 years ago
Created attachment 249741 [details] [diff] [review]
Updated to tip
Attachment #249518 - Attachment is obsolete: true
Attachment #249519 - Attachment is obsolete: true
Attachment #249519 - Flags: superreview?(roc)
Attachment #249519 - Flags: review?(roc)
(Assignee)

Comment 4

12 years ago
Created attachment 249742 [details] [diff] [review]
Same as diff -w
Attachment #249742 - Flags: superreview?(roc)
Attachment #249742 - Flags: review?(roc)
Attachment #249742 - Flags: superreview?(roc)
Attachment #249742 - Flags: superreview+
Attachment #249742 - Flags: review?(roc)
Attachment #249742 - Flags: review+
(Assignee)

Comment 5

12 years ago
Created attachment 249979 [details] [diff] [review]
Patch that I checked in
Attachment #249741 - Attachment is obsolete: true
Attachment #249742 - Attachment is obsolete: true
(Assignee)

Comment 6

12 years ago
Fixed.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.