Closed Bug 1567108 Opened 5 years ago Closed 5 years ago

display table and outline does not work together; needs a DOMRefresh.

Categories

(Core :: CSS Parsing and Computation, defect, P2)

68 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: deepti.jalgaonkar, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files, 1 obsolete file)

Attached file firefoxIssue.html (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36

Steps to reproduce:

-An element/table element with display:table property.

-Following outline css is added through javascript
outline = "1px solid red";
outline-offset = "0px";

Actual results:

Outline is not visible.
But it gets visible once we update some DOM element. (DOM refresh)

Expected results:

Outline should be visible.
And this issue is coming after the firefox update.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Mozregression points to bug 1527210. Brian or Hiro, can any of you take a look? Otherwise I can.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(hikezoe.birchill)
Flags: needinfo?(brian)
Keywords: regression
Priority: -- → P2
Regressed by: 1527210

Interesting, the problem doesn't happen on WebRender.

Anyways, I will take a look into this.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Flags: needinfo?(hikezoe.birchill)
Flags: needinfo?(brian)

Some of changes in https://hg.mozilla.org/mozilla-central/rev/5cf9e494f690 look overkill. Here and here and here. Probably I missed them during review.

We have to use the primary frame only if we process transform-related change
hints.

Per IRC conversation (https://mozilla.logbot.info/layout/20190719#c16479060) I can probably take this.

Attachment #9079219 - Attachment is obsolete: true
Assignee: hikezoe.birchill → emilio

This is IMO the right RestyleManager change for what bug 1527210 tried to fix.

We need to apply the animation hints to the primary frame, not the style frame.
The other non-RestyleManager bits of that bug still apply and look fine to me.

They're wrong. When a property that affects the parent frame changes, we get a
hint for both frames. This fixes this bug.

Depends on D38598

We get hints for both frames, so we tag both.

Depends on D38599

Attached file Bug 1567108 - Test. (deleted) —

I'm going to land this given I'm moderately confident this is the right way to fix it and so I can get this off my patch stacks, but Brian wanted to take a look at it so if he had the time to do that it'd be amazing.

Flags: needinfo?(brian)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #12)

I'm going to land this given I'm moderately confident this is the right way to fix it and so I can get this off my patch stacks, but Brian wanted to take a look at it so if he had the time to do that it'd be amazing.

Fair enough. Thanks for taking care of this.

I was hoping we could get slightly more thoroughgoing commit messages for one or two of the patches but on second look they're not so bad. (I spent quite a bit of time of code archaeology when I wrote the original patches so I want to make sure the next person who has to work out the interaction between tables + transforms + animations has as much help as they can get.)

Flags: needinfo?(brian)

Not a new issue, so I think this fix can just ride the trains. Let me know if you disagree :)

Thank you for solving the issue. But it will be available in firefox70 release; till then can you provide any alternate solution that i can add in our project.

Easiest fix is probably wrapping your table in a <div> or something of that sort, if you can do that. If you can't, setting outline-offset to -1px causes the outline to be inside of the table box and get properly repainted.

If none of those work I'm happy to try figure out something else, just let me know.

Thank you for reporting the issue :)

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: