Closed Bug 364821 Opened 18 years ago Closed 18 years ago

[FIX]Computed style should never have null style structs

Categories

(Core :: DOM: CSS Object Model, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 4 obsolete files)

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.
Attached patch Patch (obsolete) — Splinter Review
Attached patch Same as diff -w (obsolete) — Splinter Review
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)
Attached patch Updated to tip (obsolete) — Splinter Review
Attachment #249518 - Attachment is obsolete: true
Attachment #249519 - Attachment is obsolete: true
Attachment #249519 - Flags: superreview?(roc)
Attachment #249519 - Flags: review?(roc)
Attached patch Same as diff -w (obsolete) — Splinter Review
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+
Attachment #249741 - Attachment is obsolete: true
Attachment #249742 - Attachment is obsolete: true
Fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: