Summary: | [LegacySVG] Margin collapsing should not occur at the foreignObject boundary | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | REOPENED --- | ||||||
Severity: | Normal | CC: | ahmad.saleem792, eric, hyatt, rbuis, robert, webkit-bug-importer, zimmermann | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=245908 | ||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2009-02-14 22:02:41 PST
Created attachment 27681 [details]
Testcase; compare with Firefox
Notes from irc: [10:54am] dhyatt:if (!parent()->isBoxModelObject()) [10:54am] dhyatt: would be good enough i would think [10:55am] dhyatt: m_canCollapseWithChildren = !block->isRenderView() && !block->isRoot() && !block->isPositioned() && [10:55am] dhyatt: !block->isFloating() && !block->isTableCell() && !block->hasOverflowClip() && !block->isInlineBlockOrInlineTable(); [10:55am] dhyatt: line 91 of RenderBlock.cpp dhyatt: we actually don't even let <html> collapse margins with its children [10:57am] dhyatt: could probably just ditch the isRenderView check and replace with !parent() || !parent()->isBoxModelObject() dhyatt: but before doing that would need to see if the <html> in a foreign object collapses with the <body> dhyatt: <html style="margin:100px;"><body style="margin:100px">Hello world dhyatt: in safari that will leave 200px of space above hello world dhyatt: if <html> is special we may end up just having to ask about <html> [11:00am] dhyatt: so yeah the first thing i suggested would fix the isrenderview check [11:00am] dhyatt: but would also need to do something about the isroot check *** Bug 205550 has been marked as a duplicate of this bug. *** It will be done with LBSE - https://bugs.webkit.org/show_bug.cgi?id=245908 *** This bug has been marked as a duplicate of bug 245908 *** I manage to fix this locally, will do new PR. Had to use - isSVGForeignObjectOrLegacySVGForeignObject(); |