Last Comment Bug 731521 - border-width:0 interferes with inheritance of border-style
: border-width:0 interferes with inheritance of border-style
Status: RESOLVED FIXED
: testcase
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: x86_64 Mac OS X
: -- normal (vote)
: mozilla14
Assigned To: Boris Zbarsky [:bz] (still a bit busy)
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: randomstyles refdyn
  Show dependency treegraph
 
Reported: 2012-02-28 23:18 PST by Jesse Ruderman
Modified: 2012-09-07 16:51 PDT (History)
3 users (show)
bzbarsky: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (dynamic) (203 bytes, text/html)
2012-02-28 23:18 PST, Jesse Ruderman
no flags Details
reference (static) (124 bytes, text/html)
2012-02-28 23:18 PST, Jesse Ruderman
no flags Details
Computed border on our descendants can change due to a change of our specified border width or styles even if our computed border did not change. (2.50 KB, patch)
2012-02-29 08:52 PST, Boris Zbarsky [:bz] (still a bit busy)
no flags Details | Diff | Splinter Review
Computed border on our descendants can change due to a change of our specified border styles even if our computed border did not change. (2.49 KB, patch)
2012-02-29 08:57 PST, Boris Zbarsky [:bz] (still a bit busy)
dbaron: review+
Details | Diff | Splinter Review
Refix in the new setup for forcing comparison in nsStyleContext::CalcDifference, since we can no longer rely on nsStyleBorder::ForceCompare. (Bug 779968, patch 5) (6.35 KB, patch)
2012-09-07 00:40 PDT, David Baron :dbaron: ⌚️UTC-8
no flags Details | Diff | Splinter Review

Description Jesse Ruderman 2012-02-28 23:18:18 PST
Created attachment 601539 [details]
testcase (dynamic)
Comment 1 Jesse Ruderman 2012-02-28 23:18:44 PST
Created attachment 601540 [details]
reference (static)
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2012-02-29 08:28:25 PST
The actual nsStyleBorder for the <body> ends up correct.  What's not correct is the thing stored in UsedBorderProperty()....
Comment 3 Boris Zbarsky [:bz] (still a bit busy) 2012-02-29 08:36:22 PST
Oh, this is fun.

So for the <html> the computed border width does not change.  It's 0px both before and after.  Therefore for the <html> there is no reflow hint.

But nsStyleBorder returns false for ForceCompare(), so when we recompute the border for the <body> we skip comparing the old and new values, since mRuleNode is the same as before.  We thus don't notice that _its_ computed border has changed, don't trigger a reflow of the body, and thus don't update its used border.

I believe, per the documentation for ForceCompare(), that it should return true for nsStyleBorder.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2012-02-29 08:52:02 PST
Created attachment 601630 [details] [diff] [review]
Computed border on our descendants can change due to a change of our specified border width or styles even if our computed border did not change.
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2012-02-29 08:57:50 PST
Created attachment 601631 [details] [diff] [review]
Computed border on our descendants can change due to a change of our specified border styles even if our computed border did not change.
Comment 6 David Baron :dbaron: ⌚️UTC-8 2012-03-31 10:20:40 PDT
Comment on attachment 601631 [details] [diff] [review]
Computed border on our descendants can change due to a change of our specified border styles even if our computed border did not change.

r=dbaron.  Sorry for the delay.  (I managed to discover this too, in bug 741012; there may be some other issues there we need to fix.)
Comment 7 Boris Zbarsky [:bz] (still a bit busy) 2012-04-05 10:16:11 PDT
http://hg.mozilla.org/mozilla-central/rev/55ddaad4f602
Comment 8 Boris Zbarsky [:bz] (still a bit busy) 2012-04-05 19:26:27 PDT
Er, https://hg.mozilla.org/integration/mozilla-inbound/rev/55ddaad4f602
Comment 9 Matt Brubeck (:mbrubeck) 2012-04-06 11:32:04 PDT
https://hg.mozilla.org/mozilla-central/rev/55ddaad4f602
Comment 10 David Baron :dbaron: ⌚️UTC-8 2012-09-07 00:40:57 PDT
Created attachment 659157 [details] [diff] [review]
Refix  in the new setup for forcing comparison in nsStyleContext::CalcDifference, since we can no longer rely on nsStyleBorder::ForceCompare.  (Bug 779968, patch 5)
Comment 11 David Baron :dbaron: ⌚️UTC-8 2012-09-07 00:43:09 PDT
Comment on attachment 659157 [details] [diff] [review]
Refix  in the new setup for forcing comparison in nsStyleContext::CalcDifference, since we can no longer rely on nsStyleBorder::ForceCompare.  (Bug 779968, patch 5)

Aargh, hg bzexport put this on the wrong bug.
Comment 12 Ryan VanderMeulen [:RyanVM] 2012-09-07 16:51:10 PDT
https://hg.mozilla.org/mozilla-central/rev/309d87857ce0

Note You need to log in before you can comment on or make changes to this bug.