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

inline-block element pushed down if a absolute+inline element is present #8602

Open
paulrouget opened this issue Nov 19, 2015 · 3 comments
Open
Labels
A-layout/block A-layout/inline I-wrong An incorrect behaviour is observed.

Comments

@paulrouget
Copy link
Contributor

<div style="background:#0F0; height: 100px; padding: 0px 30px; width: 100px;">
  <div style="display:inline; position:absolute"></div>
  <div style="display:inline-block; background: #F00; height:100%; width:100%;"></div>
</div>

screen shot 2015-11-19 at 14 48 53

@pcwalton
Copy link
Contributor

I wonder if the hypothetical box is taking up space.

@pcwalton
Copy link
Contributor

┌ Post layout flow tree
│  ├─ Block(113c53590) pos=LogicalRect(H LTR, i800px×b608px, @ (i0px,b0px)), overflow=Rect(800px×608px at (0px,0px)) children=1 abs-descendents=1
│  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(10) [] border_box=LogicalRect(H LTR, i800px×b608px, @ (i0px,b0px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  ├─ Block(113c53310) pos=LogicalRect(H LTR, i800px×b100px, @ (i0px,b8px)), overflow=Rect(784px×100px at (8px,0px)) children=1
│  │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(8) [] border_box=LogicalRect(H LTR, i784px×b100px, @ (i8px,b0px)) margin=LogicalMargin(H LTR, i:8px..8px b:8px..8px) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  │  ├─ Block(113c52b90) pos=LogicalRect(H LTR, i784px×b100px, @ (i8px,b0px)), overflow=Rect(160px×117.98333333333333px at (0px,0px)) children=1
│  │  │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(4) [] border_box=LogicalRect(H LTR, i160px×b100px, @ (i0px,b0px)) border_padding=LogicalMargin(H LTR, i:30px..30px b:0px..0px) margin=LogicalMargin(H LTR, i:0px..624px b:0px..0px) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  │  │  ├─ Inline(113c73010) pos=LogicalRect(H LTR, i100px×b117.96666666666667px, @ (i30px,b0px)), overflow=Rect(100px×117.98333333333333px at (0px,0px)) children=2 damage=RECONSTRUCT_FLOW
│  │  │  │  │  ├─ SpecificFragmentInfo::InlineAbsoluteHypothetical(1) [] border_box=LogicalRect(H LTR, i0px×b0px, @ (i0px,b13.866666666666667px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  │  │  │  ├─ SpecificFragmentInfo::ScannedText(6) [""] border_box=LogicalRect(H LTR, i0px×b15.983333333333333px, @ (i0px,b1px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  │  │  │  ├─ SpecificFragmentInfo::InlineBlock(3) [] border_box=LogicalRect(H LTR, i100px×b100px, @ (i0px,b17.983333333333334px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  │  │  │  ├─ Block(113c51f10) pos=LogicalRect(H LTR, i0px×b0px, @ (i0px,b13.866666666666667px)), overflow=Rect(0px×0px at (0px,0px))
│  │  │  │  │  │  └─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(0) [] border_box=LogicalRect(H LTR, i0px×b0px, @ (i0px,b0px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
│  │  │  │  │  ├─ Block(113c52690) pos=LogicalRect(H LTR, i100px×b100px, @ (i0px,b0px)), overflow=Rect(100px×100px at (0px,0px))
│  │  │  │  │  │  └─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(2) [] border_box=LogicalRect(H LTR, i100px×b100px, @ (i0px,b0px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW

@mbrubeck
Copy link
Contributor

Interestingly, after forcing a reflow (e.g. by resizing the window), the test case is laid out correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout/block A-layout/inline I-wrong An incorrect behaviour is observed.
Projects
None yet
Development

No branches or pull requests

4 participants