Changeset 122653 in webkit
- Timestamp:
- Jul 13, 2012 6:08:07 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r122651 r122653 1 2012-07-13 Kiran Muppala <cmuppala@apple.com> 2 3 REGRESSION: RenderInline boundingBox ignores relative position offset 4 https://bugs.webkit.org/show_bug.cgi?id=91168 5 6 Reviewed by Simon Fraser. 7 8 Add a regression test for boundingBox of an inline element with relative position offsets. 9 10 * fast/inline/inline-relative-offset-boundingbox-expected.txt: Added. 11 * fast/inline/inline-relative-offset-boundingbox.html: Added. 12 1 13 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r122652 r122653 1 2012-07-13 Kiran Muppala <cmuppala@apple.com> 2 3 REGRESSION: RenderInline boundingBox ignores relative position offset 4 https://bugs.webkit.org/show_bug.cgi?id=91168 5 6 Reviewed by Simon Fraser. 7 8 RenderGeometryMap, used for caching the transform to the view, 9 expects the first mapping pushed, to be that of the view itself. 10 RenderInline was instead pushing it's own offset first. Besides 11 the offset of the view itself was not being pushed. 12 13 Relaxed the RenderGeometryMap restriction that the first pushed 14 step should be of the view. It is sufficient that the view's mapping 15 is pushed in the first call to pushMappingsToAncestor. Modified 16 RenderInline to push the offset of the view also to the geometry map. 17 18 Test: fast/inline/inline-relative-offset-boundingbox.html 19 20 * rendering/RenderGeometryMap.cpp: 21 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to 22 check if mapping to view was pushed in first invocation. 23 (WebCore::RenderGeometryMap::pushView): Correct assertion that checks 24 if the view's mapping is the first one to be applied. 25 (WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if 26 a mapping step belongs to a view instead of using mapping size. 27 (WebCore::RenderGeometryMap::stepRemoved): Ditto. 28 * rendering/RenderInline.cpp: 29 (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext): 30 Push mappings all the way up to and including the view. 31 1 32 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org> 2 33 -
trunk/Source/WebCore/rendering/RenderGeometryMap.cpp
r122376 r122653 137 137 renderer = renderer->pushMappingToContainer(ancestorRenderer, *this); 138 138 } while (renderer && renderer != ancestorRenderer); 139 140 ASSERT(m_mapping.isEmpty() || m_mapping[0].m_renderer->isRenderView()); 139 141 } 140 142 … … 206 208 { 207 209 ASSERT(m_insertionPosition != notFound); 208 ASSERT(!m_ mapping.size()); // The view should always be the first thing pushed.210 ASSERT(!m_insertionPosition); // The view should always be the first step. 209 211 210 212 m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(view, false, false, false, t)); … … 236 238 void RenderGeometryMap::stepInserted(const RenderGeometryMapStep& step) 237 239 { 238 // Offset on the first step is the RenderView's offset, which is only applied when we have fixed-position.s239 if ( m_mapping.size() > 1)240 // RenderView's offset, is only applied when we have fixed-positions. 241 if (!step.m_renderer->isRenderView()) 240 242 m_accumulatedOffset += step.m_offset; 241 243 … … 252 254 void RenderGeometryMap::stepRemoved(const RenderGeometryMapStep& step) 253 255 { 254 // Offset on the first step is the RenderView's offset, which is only applied when we have fixed-position.s255 if ( m_mapping.size() > 1)256 // RenderView's offset, is only applied when we have fixed-positions. 257 if (!step.m_renderer->isRenderView()) 256 258 m_accumulatedOffset -= step.m_offset; 257 259 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r122191 r122653 653 653 , m_geometryMap() 654 654 { 655 RenderObject* root = renderer->parent(); 656 while (root && root->parent()) 657 root = root->parent(); 658 659 if (root) 660 m_geometryMap.pushMappingsToAncestor(renderer, toRenderBoxModelObject(root)); 655 m_geometryMap.pushMappingsToAncestor(renderer, 0); 661 656 } 662 657
Note: See TracChangeset
for help on using the changeset viewer.