Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty table with borders has incorrect layout #5886

Open
mbrubeck opened this issue Apr 28, 2015 · 3 comments
Open

Empty table with borders has incorrect layout #5886

mbrubeck opened this issue Apr 28, 2015 · 3 comments

Comments

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Apr 28, 2015

Similar to #5873, Servo renders the following test case incorrectly. The table should be invisible, with zero width and and zero height, but Servo renders it as an 8px × 8px black square.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <style>
      table {
        border: 4px solid black;
        background: lightblue;
      }
    </style>
  </head>
  <body>
    <table></table>
  </body>
</html>
@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Apr 3, 2016

Can confirm this is still an issue.

screen shot 2016-04-03 at 3 30 07 pm

Flow tree:

┌ Post layout flow tree
│  ├─ Block(121446510) sc=StackingContextId(FragmentBody, 0) pos=LogicalRect(H LTR, i800px×b600px, @ (i0px,b0px)), floatspec-in=L 0px R 0px, floatspec-out=L 0px R 0px, overflow=Overflow { scroll: Rect(800px×600px at (0px,0px)), paint: Rect(800px×600px at (0px,0px)) } children=1
│  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(8) [] border_box=LogicalRect(H LTR, i800px×b600px, @ (i0px,b0px)) damage=STORE_OVERFLOW
│  │  ├─ Block(121446290) sc=StackingContextId(FragmentBody, 0) pos=LogicalRect(H LTR, i800px×b16px, @ (i0px,b8px)), floatspec-in=L 0px R 0px, floatspec-out=L 0px R 0px, overflow=Overflow { scroll: Rect(784px×16px at (8px,0px)), paint: Rect(784px×16px at (8px,0px)) } children=1
│  │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(2) [] border_box=LogicalRect(H LTR, i784px×b16px, @ (i8px,b0px)) margin=LogicalMargin(H LTR, i:8px..8px b:8px..8px) damage=STORE_OVERFLOW
│  │  │  ├─ TableWrapperFlow: Block(121446010) sc=StackingContextId(FragmentBody, 0) pos=LogicalRect(H LTR, i792px×b16px, @ (i8px,b0px)), floatspec-in=L 0px R 0px, floatspec-out=L 0px R 0px, overflow=Overflow { scroll: Rect(8px×16px at (0px,0px)), paint: Rect(8px×16px at (0px,0px)) } children=1
│  │  │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::TableWrapper(0) [] border_box=LogicalRect(H LTR, i8px×b16px, @ (i0px,b0px)) border_padding=LogicalMargin(H LTR, i:4px..4px b:4px..4px) margin=LogicalMargin(H LTR, i:0px..784px b:0px..0px) damage=STORE_OVERFLOW
│  │  │  │  ├─ TableFlow: Block(12144b010) sc=StackingContextId(FragmentBody, 0) pos=LogicalRect(H LTR, i8px×b8px, @ (i0px,b4px)), floatspec-in=L 0px R 0px, floatspec-out=L 0px R 0px, overflow=Overflow { scroll: Rect(8px×8px at (0px,0px)), paint: Rect(8px×8px at (0px,0px)) }
│  │  │  │  │  └─ ↑↑ Fragment for block: SpecificFragmentInfo::Table(1) [] border_box=LogicalRect(H LTR, i8px×b8px, @ (i0px,b0px)) border_padding=LogicalMargin(H LTR, i:4px..4px b:4px..4px) damage=REPAINT | STORE_OVERFLOW | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW
@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Apr 3, 2016

Is this the relevant section that needs to be changed? If so, should there be a check for emptiness?


Worth mentioning that <table><tr></tr></table> also differs:

screen shot 2016-04-03 at 4 14 11 pm
screen shot 2016-04-03 at 4 14 05 pm

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

It should be noted that Safari and Chrome both display a black square with the sample from the issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.