Closed
Bug 1266249
Opened 8 years ago
Closed 8 years ago
Remove mHasCachedOutline
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file)
6.98 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
outline-width never takes a percentage, so this is always true.
Assignee | ||
Comment 1•8 years ago
|
||
Comment on attachment 8743602 [details] [diff] [review] Remove mHasCachedOutline. v1 > nsComputedDOMStyle::DoGetOutlineWidth() > { > RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue; > > const nsStyleOutline* outline = StyleOutline(); > > nscoord width; > if (outline->GetOutlineStyle() == NS_STYLE_BORDER_STYLE_NONE) { >- NS_ASSERTION(outline->GetOutlineWidth(width) && width == 0, >- "unexpected width"); You should rewrite this assertion (outline->GetOutlineWidth() == 0) rather than deleting. > void > nsStyleOutline::RecalcData(nsPresContext* aContext) > { > if (NS_STYLE_BORDER_STYLE_NONE == GetOutlineStyle()) { > mCachedOutlineWidth = 0; >- mHasCachedOutline = true; > } else if (IsFixedUnit(mOutlineWidth, true)) { This IsFixedUnit() check should become an assertion that IsFixedUnit() is true, rather than a test. >@@ -1286,23 +1286,20 @@ struct nsStyleOutline ... >- bool GetOutlineWidth(nscoord& aWidth) const >+ nscoord GetOutlineWidth() const > { >- if (mHasCachedOutline) { >- aWidth = mCachedOutlineWidth; >- return true; >- } >- return false; >+ MOZ_ASSERT(GetOutlineStyle() != NS_STYLE_BORDER_STYLE_NONE); >+ return mCachedOutlineWidth; > } Please don't add this MOZ_ASSERT; this should be usable (and return 0) when the outline-style is none. r=dbaron with that
Attachment #8743602 -
Flags: review+
Assignee | ||
Comment 3•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1d2084e94598
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/413ad396d8a4
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•