WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
109212
TDs not always removing border when losing CSS class that gives them the border
https://bugs.webkit.org/show_bug.cgi?id=109212
Summary
TDs not always removing border when losing CSS class that gives them the border
Karolis Dzeja
Reported
2013-02-07 10:58:16 PST
Created
attachment 187136
[details]
Screenshot of the Bug. That lone border shouldn't exist and disappears when those cells are selected with mouse. URL:
http://jsfiddle.net/7vhR7/
This jsfiddle was extracted from a real world example. In the newest Chrome and Safari browsers, when the highlighted TD is changed, sometimes there are borders remaining that disappear when the TDs are selected with the mouse. If you keep clicking the button, you'll eventually see the bug. It shouldn't take more than 10 or 20 clicks. I've seen this on latest Chrome & Chrome Canary on Windows XP, Windows 7 and latest Safari on Mountain Lion. This bug does not happen in IE or Firefox.
Attachments
Screenshot of the Bug. That lone border shouldn't exist and disappears when those cells are selected with mouse.
(6.20 KB, image/png)
2013-02-07 10:58 PST
,
Karolis Dzeja
no flags
Details
Patch
(8.46 KB, patch)
2013-06-12 21:44 PDT
,
Yuki Sekiguchi
no flags
Details
Formatted Diff
Diff
Patch
(8.85 KB, patch)
2013-06-12 23:06 PDT
,
Yuki Sekiguchi
no flags
Details
Formatted Diff
Diff
Patch
(8.53 KB, patch)
2013-06-13 19:12 PDT
,
Yuki Sekiguchi
simon.fraser
: review-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yuki Sekiguchi
Comment 1
2013-06-12 21:44:57 PDT
Created
attachment 204553
[details]
Patch
Darin Adler
Comment 2
2013-06-12 22:17:08 PDT
Comment on
attachment 204553
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=204553&action=review
> Source/WebCore/rendering/RenderTableCell.h:105 > + void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false);
This should be marked virtual and OVERRIDE. Also, this should be private, not public.
Yuki Sekiguchi
Comment 3
2013-06-12 23:06:24 PDT
Created
attachment 204555
[details]
Patch
Darin Adler
Comment 4
2013-06-13 09:58:38 PDT
Comment on
attachment 204555
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=204555&action=review
I’m not going to review this because it should probably be looked at by one of the layout experts, but I still have one small comment.
> Source/WebCore/rendering/RenderTableCell.h:216 > + virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false) OVERRIDE;
Why protected instead of private?
Yuki Sekiguchi
Comment 5
2013-06-13 19:12:32 PDT
Created
attachment 204663
[details]
Patch
Yuki Sekiguchi
Comment 6
2013-06-13 19:14:55 PDT
(In reply to
comment #4
)
> I’m not going to review this because it should probably be looked at by one of the layout experts, but I still have one small comment.
I see. I'm waiting for review from a layout expert :)
> > Source/WebCore/rendering/RenderTableCell.h:216 > > + virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false) OVERRIDE; > > Why protected instead of private?
Fixed.
Simon Fraser (smfr)
Comment 7
2013-06-14 11:47:09 PDT
Comment on
attachment 204663
[details]
Patch I'm not sure that stuffing the old repaint rect into visual overflow is the correct approach here. Visual overflow should only be used for things like shadows/outlines, and not just for temporary dirty rects around style changes.
Darin Adler
Comment 8
2013-06-14 17:47:28 PDT
Simon, could you point us at what the right direction would be?
Simon Fraser (smfr)
Comment 9
2013-06-14 17:54:28 PDT
Not sure, really. I'd investigate to see why this isn't a problem for other boxes when borders change.
Yuki Sekiguchi
Comment 10
2013-06-17 19:36:07 PDT
Hi Simon, Thank you for reviewing. (In reply to
comment #9
)
> Not sure, really. I'd investigate to see why this isn't a problem for other boxes when borders change.
The rect of RenderBox is always border box. This dose not depend on box-sizing property. When border-width of a block is changed, we need to re-layout. Before laying out the block, we save the original rect to LayoutRepainter at RenderBlock::layout(). After laying out the block, we repaint the original rect and the new rect. Therefore, this isn't a problem for normal boxes when borders change. However, the rect of RenderTableCell which border is collapsed contains half of its border width. Therefore, we need to add other half of the border width to its rect when we calculate repaint rect. I don't remember another CSS values which I need to investigate. If you have concern about another CSS values, I can investigate them. If adding RenderTableCell rect to visual overflow is not correct approach, I think we need to save the rect to a member of RenderTableCell.
Ahmad Saleem
Comment 11
2022-06-07 15:09:55 PDT
I am unable to reproduce this bug based on attached test case URL in Safari 15.5 on macOS 12.4. I tried to spam click "highlight random" and then zoom in and out and also change viewport to trigger "lone border" but I am unable to reproduce it. I think something along the lines got this fixed. Can we mark this as "RESOLVED CONFIGURATION CHANGED". Thanks! If this is reproducible on any other platform etc., please retest accordingly. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug