-
hyatt@apple.com authored
Reviewed by Simon Fraser. WebCore: Make RenderLayers position properly inside multicolumn layout. (1) Create RenderLayers when column properties are specified. This allows descendant layers to easily know they are inside a multicolumn layout when positioning. (2) Patch updateLayerPosition to offset the layer into the first column that contains the layer. Splitting of a layer across columns still does not work, but the layer will now at least appear in the first column in which it occurs. (3) Fix pagination bugs caused by the fact that visual overflow doesn't propagate up the line box tree when layers are involved. Make sure to use lineTop and lineBottom in this case (it's not perfect, but it gets most cases working properly). With this change elements like <video> will paginate properly and not get split across pages. (4) Make column repainting and layer positioning work with RTL columns by fixing adjustForColumns to account for RTL. (5) Fix RTL pagination by making sure the column pagination rects are the content width of the whole block and not just the width of one column. Added fast/multicol/layers-in-multicol.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutColumns): (WebCore::RenderBlock::adjustForColumns): * rendering/RenderBox.h: (WebCore::RenderBox::locationOffset): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::requiresLayer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::convertToLayerCoords): (WebCore::RenderLayer::shouldBeNormalFlowOnly): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::requiresLayer): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::specifiesColumns): LayoutTests: Reset all multicolumn test results now that columns create RenderLayers. * fast/multicol/client-rects-expected.txt: * fast/multicol/layers-in-multicol.html: Added. * fast/multicol/single-line-expected.txt: * platform/mac/fast/multicol/column-rules-expected.txt: * platform/mac/fast/multicol/columns-shorthand-parsing-expected.txt: * platform/mac/fast/multicol/float-avoidance-expected.txt: * platform/mac/fast/multicol/float-multicol-expected.txt: Add a layout test for various types of RenderLayers inside multicol layouts. * platform/mac/fast/multicol/layers-in-multicol-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
hyatt@apple.com authoredReviewed by Simon Fraser. WebCore: Make RenderLayers position properly inside multicolumn layout. (1) Create RenderLayers when column properties are specified. This allows descendant layers to easily know they are inside a multicolumn layout when positioning. (2) Patch updateLayerPosition to offset the layer into the first column that contains the layer. Splitting of a layer across columns still does not work, but the layer will now at least appear in the first column in which it occurs. (3) Fix pagination bugs caused by the fact that visual overflow doesn't propagate up the line box tree when layers are involved. Make sure to use lineTop and lineBottom in this case (it's not perfect, but it gets most cases working properly). With this change elements like <video> will paginate properly and not get split across pages. (4) Make column repainting and layer positioning work with RTL columns by fixing adjustForColumns to account for RTL. (5) Fix RTL pagination by making sure the column pagination rects are the content width of the whole block and not just the width of one column. Added fast/multicol/layers-in-multicol.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutColumns): (WebCore::RenderBlock::adjustForColumns): * rendering/RenderBox.h: (WebCore::RenderBox::locationOffset): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::requiresLayer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::convertToLayerCoords): (WebCore::RenderLayer::shouldBeNormalFlowOnly): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::requiresLayer): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::specifiesColumns): LayoutTests: Reset all multicolumn test results now that columns create RenderLayers. * fast/multicol/client-rects-expected.txt: * fast/multicol/layers-in-multicol.html: Added. * fast/multicol/single-line-expected.txt: * platform/mac/fast/multicol/column-rules-expected.txt: * platform/mac/fast/multicol/columns-shorthand-parsing-expected.txt: * platform/mac/fast/multicol/float-avoidance-expected.txt: * platform/mac/fast/multicol/float-multicol-expected.txt: Add a layout test for various types of RenderLayers inside multicol layouts. * platform/mac/fast/multicol/layers-in-multicol-expected.txt: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loading