Changeset 135851 in webkit
- Timestamp:
- Nov 27, 2012 5:23:10 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r135850 r135851 1 2012-11-27 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSS Regions] Absolutely positioned regions do not expand to fill their container 4 https://bugs.webkit.org/show_bug.cgi?id=102385 5 6 Reviewed by Julien Chaffraix. 7 8 Added new tests for the case of an absolutely positioned region inside a container. The region is anchored and it should expand to the container limits 9 in the anchored direction. 10 Also modified expectations for another test that has absolutely positioned auto-height regions, which now have height computed properly. 11 12 * fast/regions/autosize-abspos-anchoredregion-expected.txt: Added. 13 * fast/regions/autosize-abspos-anchoredregion-vertlr-expected.txt: Added. 14 * fast/regions/autosize-abspos-anchoredregion-vertlr.html: Added. 15 * fast/regions/autosize-abspos-anchoredregion.html: Added. 16 * platform/chromium/fast/regions/autoheight-regions-mark-expected.txt: 17 * platform/efl/fast/regions/autoheight-regions-mark-expected.txt: 18 * platform/gtk/fast/regions/autoheight-regions-mark-expected.txt: 19 * platform/mac/fast/regions/autoheight-regions-mark-expected.txt: 20 * platform/qt/fast/regions/autoheight-regions-mark-expected.txt: 21 1 22 2012-11-27 János Badics <jbadics@inf.u-szeged.hu> 2 23 -
trunk/LayoutTests/platform/chromium/fast/regions/autoheight-regions-mark-expected.txt
r131694 r135851 8 8 RenderRegion {DIV} at (0,50) size 50x0 9 9 RenderRegion {DIV} at (0,50) size 50x50 10 layer at (8,50) size 50x450 11 RenderRegion {DIV} at (8,50) size 50x450 12 layer at (50,8) size 650x50 13 RenderRegion {DIV} at (50,8) size 650x50 10 14 Flow Threads 11 15 Thread with flow-name 'flow' … … 18 22 RenderRegion {DIV} #region2 hasAutoLogicalHeight 19 23 Thread with flow-name 'flow3' 24 layer at (0,0) size 50x450 25 RenderNamedFlowThread at (0,0) size 50x450 20 26 Regions for flow 'flow3' 21 27 RenderRegion {DIV} #region3 22 28 Thread with flow-name 'flow4' 29 layer at (0,0) size 650x50 30 RenderNamedFlowThread at (0,0) size 650x50 23 31 Regions for flow 'flow4' 24 32 RenderRegion {DIV} #region4 -
trunk/LayoutTests/platform/efl/fast/regions/autoheight-regions-mark-expected.txt
r129395 r135851 8 8 RenderRegion {DIV} at (0,50) size 50x0 9 9 RenderRegion {DIV} at (0,50) size 50x50 10 layer at (8,50) size 50x450 11 RenderRegion {DIV} at (8,50) size 50x450 12 layer at (50,8) size 650x50 13 RenderRegion {DIV} at (50,8) size 650x50 10 14 Flow Threads 11 15 Thread with flow-name 'flow' … … 18 22 RenderRegion {DIV} #region2 hasAutoLogicalHeight 19 23 Thread with flow-name 'flow3' 24 layer at (0,0) size 50x450 25 RenderNamedFlowThread at (0,0) size 50x450 20 26 Regions for flow 'flow3' 21 27 RenderRegion {DIV} #region3 22 28 Thread with flow-name 'flow4' 29 layer at (0,0) size 650x50 30 RenderNamedFlowThread at (0,0) size 650x50 23 31 Regions for flow 'flow4' 24 32 RenderRegion {DIV} #region4 -
trunk/LayoutTests/platform/gtk/fast/regions/autoheight-regions-mark-expected.txt
r129008 r135851 8 8 RenderRegion {DIV} at (0,50) size 50x0 9 9 RenderRegion {DIV} at (0,50) size 50x50 10 layer at (8,50) size 50x450 11 RenderRegion {DIV} at (8,50) size 50x450 12 layer at (50,8) size 650x50 13 RenderRegion {DIV} at (50,8) size 650x50 10 14 Flow Threads 11 15 Thread with flow-name 'flow' … … 18 22 RenderRegion {DIV} #region2 hasAutoLogicalHeight 19 23 Thread with flow-name 'flow3' 24 layer at (0,0) size 50x450 25 RenderNamedFlowThread at (0,0) size 50x450 20 26 Regions for flow 'flow3' 21 27 RenderRegion {DIV} #region3 22 28 Thread with flow-name 'flow4' 29 layer at (0,0) size 650x50 30 RenderNamedFlowThread at (0,0) size 650x50 23 31 Regions for flow 'flow4' 24 32 RenderRegion {DIV} #region4 -
trunk/LayoutTests/platform/mac/fast/regions/autoheight-regions-mark-expected.txt
r128861 r135851 8 8 RenderRegion {DIV} at (0,50) size 50x0 9 9 RenderRegion {DIV} at (0,50) size 50x50 10 layer at (8,50) size 50x450 11 RenderRegion {DIV} at (8,50) size 50x450 12 layer at (50,8) size 650x50 13 RenderRegion {DIV} at (50,8) size 650x50 10 14 Flow Threads 11 15 Thread with flow-name 'flow' … … 18 22 RenderRegion {DIV} #region2 hasAutoLogicalHeight 19 23 Thread with flow-name 'flow3' 24 layer at (0,0) size 50x450 25 RenderNamedFlowThread at (0,0) size 50x450 20 26 Regions for flow 'flow3' 21 27 RenderRegion {DIV} #region3 22 28 Thread with flow-name 'flow4' 29 layer at (0,0) size 650x50 30 RenderNamedFlowThread at (0,0) size 650x50 23 31 Regions for flow 'flow4' 24 32 RenderRegion {DIV} #region4 -
trunk/LayoutTests/platform/qt/fast/regions/autoheight-regions-mark-expected.txt
r129126 r135851 8 8 RenderRegion {DIV} at (0,50) size 50x0 9 9 RenderRegion {DIV} at (0,50) size 50x50 10 layer at (8,50) size 50x450 11 RenderRegion {DIV} at (8,50) size 50x450 12 layer at (50,8) size 650x50 13 RenderRegion {DIV} at (50,8) size 650x50 10 14 Flow Threads 11 15 Thread with flow-name 'flow' … … 18 22 RenderRegion {DIV} #region2 hasAutoLogicalHeight 19 23 Thread with flow-name 'flow3' 24 layer at (0,0) size 50x450 25 RenderNamedFlowThread at (0,0) size 50x450 20 26 Regions for flow 'flow3' 21 27 RenderRegion {DIV} #region3 22 28 Thread with flow-name 'flow4' 29 layer at (0,0) size 650x50 30 RenderNamedFlowThread at (0,0) size 650x50 23 31 Regions for flow 'flow4' 24 32 RenderRegion {DIV} #region4 -
trunk/Source/WebCore/ChangeLog
r135848 r135851 1 2012-11-27 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSS Regions] Absolutely positioned regions do not expand to fill their container 4 https://bugs.webkit.org/show_bug.cgi?id=102385 5 6 Reviewed by Julien Chaffraix. 7 8 In the case of an absolutely positioned region with height auto, height computation should follow 9 the path of block elements instead of replaced elements. 10 11 Tests: fast/regions/autosize-abspos-anchoredregion-vertlr.html 12 fast/regions/autosize-abspos-anchoredregion.html 13 14 * rendering/RenderBox.cpp: 15 (WebCore::RenderBox::computePositionedLogicalHeight): Skip replaced element height computation when a region has height auto. 16 * rendering/RenderRegion.h: 17 (WebCore::RenderRegion::shouldHaveAutoLogicalHeight): Make it private since it is not accessed from outside. 18 1 19 2012-11-27 Alexander Pavlov <apavlov@chromium.org> 2 20 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r135741 r135851 2962 2962 { 2963 2963 if (isReplaced()) { 2964 computePositionedLogicalHeightReplaced(computedValues); 2965 return; 2964 // FIXME: For regions with height auto, we want to compute width using the normal block sizing code. 2965 // For now, regions are replaced elements and this code can be removed once the RenderRegion 2966 // will inherit from RenderBlock instead of RenderReplaced. 2967 // (see https://bugs.webkit.org/show_bug.cgi?id=74132 ) 2968 if (!isRenderRegion() || (isRenderRegion() && shouldComputeSizeAsReplaced())) { 2969 computePositionedLogicalHeightReplaced(computedValues); 2970 return; 2971 } 2966 2972 } 2967 2973 -
trunk/Source/WebCore/rendering/RenderRegion.h
r134425 r135851 115 115 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const; 116 116 117 bool hasAutoLogicalHeight() const { return m_hasAutoLogicalHeight; } 118 119 bool needsOverrideLogicalContentHeightComputation() const; 120 121 virtual void updateLogicalHeight() OVERRIDE; 122 123 // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the 124 // flow thread portion we contain. For sets, we have to figure out the top of the nearest column or 125 // page. 126 virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; 127 128 virtual void expandToEncompassFlowThreadContentsIfNeeded() { }; 129 130 // Whether or not this region is a set. 131 virtual bool isRenderRegionSet() const { return false; } 132 133 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect, bool immediate) const; 134 135 protected: 136 void setRegionObjectsRegionStyle(); 137 void restoreRegionObjectsOriginalStyle(); 138 139 LayoutRect overflowRectForFlowThreadPortion(LayoutRect flowThreadPortionRect, bool isFirstPortion, bool isLastPortion) const; 140 void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, bool immediate, const LayoutRect& flowThreadPortionRect, 141 const LayoutRect& flowThreadPortionOverflowRect, const LayoutPoint& regionLocation) const; 142 143 private: 144 virtual const char* renderName() const { return "RenderRegion"; } 145 146 // FIXME: these functions should be revisited once RenderRegion inherits from RenderBlock 147 // instead of RenderReplaced (see https://bugs.webkit.org/show_bug.cgi?id=74132 ) 148 // When width is auto, use normal block/box sizing code except when inline. 149 virtual bool isInlineBlockOrInlineTable() const OVERRIDE { return isInline() && !shouldComputeSizeAsReplaced(); } 150 virtual bool shouldComputeSizeAsReplaced() const OVERRIDE { return !style()->logicalWidth().isAuto() && !style()->logicalHeight().isAuto(); } 151 117 152 bool shouldHaveAutoLogicalHeight() const 118 153 { … … 121 156 return style()->logicalHeight().isAuto() && !hasAnchoredEndpointsForHeight; 122 157 } 123 bool hasAutoLogicalHeight() const { return m_hasAutoLogicalHeight; }124 125 bool needsOverrideLogicalContentHeightComputation() const;126 127 virtual void updateLogicalHeight() OVERRIDE;128 129 // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the130 // flow thread portion we contain. For sets, we have to figure out the top of the nearest column or131 // page.132 virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;133 134 virtual void expandToEncompassFlowThreadContentsIfNeeded() { };135 136 // Whether or not this region is a set.137 virtual bool isRenderRegionSet() const { return false; }138 139 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect, bool immediate) const;140 141 protected:142 void setRegionObjectsRegionStyle();143 void restoreRegionObjectsOriginalStyle();144 145 LayoutRect overflowRectForFlowThreadPortion(LayoutRect flowThreadPortionRect, bool isFirstPortion, bool isLastPortion) const;146 void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, bool immediate, const LayoutRect& flowThreadPortionRect,147 const LayoutRect& flowThreadPortionOverflowRect, const LayoutPoint& regionLocation) const;148 149 private:150 virtual const char* renderName() const { return "RenderRegion"; }151 152 // FIXME: these functions should be revisited once RenderRegion inherits from RenderBlock153 // instead of RenderReplaced (see https://bugs.webkit.org/show_bug.cgi?id=74132 )154 // When width is auto, use normal block/box sizing code except when inline.155 virtual bool isInlineBlockOrInlineTable() const OVERRIDE { return isInline() && style()->logicalWidth().isAuto(); }156 virtual bool shouldComputeSizeAsReplaced() const OVERRIDE { return !style()->logicalWidth().isAuto(); }157 158 158 159 virtual void insertedIntoTree() OVERRIDE;
Note: See TracChangeset
for help on using the changeset viewer.