Changeset 156308 in webkit
- Timestamp:
- Sep 23, 2013, 4:55:20 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156307 r156308 1 2013-09-23 Andreas Kling <akling@apple.com> 2 3 CTTE: RenderObject::container() should return a RenderElement*. 4 <https://webkit.org/b/121811> 5 6 Reviewed by Antti Koivisto. 7 8 The containing renderer is always a RenderElement. 9 1 10 2013-09-23 Anders Carlsson <andersca@apple.com> 2 11 -
trunk/Source/WebCore/rendering/LayoutState.cpp
r155944 r156308 58 58 59 59 if (renderer->isOutOfFlowPositioned() && !fixed) { 60 if (Render Object* container = renderer->container()) {60 if (RenderElement* container = renderer->container()) { 61 61 if (container->isInFlowPositioned() && container->isRenderInline()) 62 62 m_paintOffset += toRenderInline(container)->offsetForInFlowPositionedInline(renderer); … … 157 157 #endif 158 158 { 159 Render Object* container = root->container();159 RenderElement* container = root->container(); 160 160 FloatPoint absContentPoint = container->localToAbsolute(FloatPoint(), UseTransforms); 161 161 m_paintOffset = LayoutSize(absContentPoint.x(), absContentPoint.y()); -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r156199 r156308 991 991 // FIXME: The math here is actually not really right. It's a best-guess approximation that 992 992 // will work for the common cases 993 Render Object* containerBlock = child->container();993 RenderElement* containerBlock = child->container(); 994 994 LayoutUnit blockHeight = block->logicalHeight(); 995 995 if (containerBlock->isRenderInline()) { -
trunk/Source/WebCore/rendering/RenderBox.cpp
r156297 r156308 1817 1817 1818 1818 bool containerSkipped; 1819 Render Object* o = container(repaintContainer, &containerSkipped);1819 RenderElement* o = container(repaintContainer, &containerSkipped); 1820 1820 if (!o) 1821 1821 return; … … 1866 1866 1867 1867 bool ancestorSkipped; 1868 Render Object* container = this->container(ancestorToStopAt, &ancestorSkipped);1868 RenderElement* container = this->container(ancestorToStopAt, &ancestorSkipped); 1869 1869 if (!container) 1870 1870 return 0; … … 2073 2073 2074 2074 bool containerSkipped; 2075 Render Object* o = container(repaintContainer, &containerSkipped);2075 RenderElement* o = container(repaintContainer, &containerSkipped); 2076 2076 if (!o) 2077 2077 return; … … 3074 3074 if (child->parent()->style()->direction() == LTR) { 3075 3075 LayoutUnit staticPosition = child->layer()->staticInlinePosition() - containerBlock->borderLogicalLeft(); 3076 for (Render Object* curr = child->parent(); curr && curr != containerBlock; curr = curr->container()) {3076 for (RenderElement* curr = child->parent(); curr && curr != containerBlock; curr = curr->container()) { 3077 3077 if (curr->isBox()) { 3078 3078 staticPosition += toRenderBox(curr)->logicalLeft(); … … 3090 3090 RenderBox* enclosingBox = child->parent()->enclosingBox(); 3091 3091 LayoutUnit staticPosition = child->layer()->staticInlinePosition() + containerLogicalWidth + containerBlock->borderLogicalLeft(); 3092 for (Render Object* curr = enclosingBox; curr; curr = curr->container()) {3092 for (RenderElement* curr = enclosingBox; curr; curr = curr->container()) { 3093 3093 if (curr->isBox()) { 3094 3094 if (curr != containerBlock) … … 3448 3448 // FIXME: The static distance computation has not been patched for mixed writing modes. 3449 3449 LayoutUnit staticLogicalTop = child->layer()->staticBlockPosition() - containerBlock->borderBefore(); 3450 for (Render Object* curr = child->parent(); curr && curr != containerBlock; curr = curr->container()) {3450 for (RenderElement* curr = child->parent(); curr && curr != containerBlock; curr = curr->container()) { 3451 3451 if (curr->isBox() && !curr->isTableRow()) 3452 3452 staticLogicalTop += toRenderBox(curr)->logicalTop(); -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r156278 r156308 2735 2735 void RenderBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const 2736 2736 { 2737 Render Object* o = container();2737 RenderElement* o = container(); 2738 2738 if (!o) 2739 2739 return; -
trunk/Source/WebCore/rendering/RenderInline.cpp
r156278 r156308 1106 1106 1107 1107 bool containerSkipped; 1108 Render Object* o = container(repaintContainer, &containerSkipped);1108 RenderElement* o = container(repaintContainer, &containerSkipped); 1109 1109 if (!o) 1110 1110 return; … … 1186 1186 1187 1187 bool containerSkipped; 1188 Render Object* o = container(repaintContainer, &containerSkipped);1188 RenderElement* o = container(repaintContainer, &containerSkipped); 1189 1189 if (!o) 1190 1190 return; … … 1224 1224 1225 1225 bool ancestorSkipped; 1226 Render Object* container = this->container(ancestorToStopAt, &ancestorSkipped);1226 RenderElement* container = this->container(ancestorToStopAt, &ancestorSkipped); 1227 1227 if (!container) 1228 1228 return 0; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r156291 r156308 2278 2278 return hasCoordinatedScrolling() && isViewportConstrainedFixedOrStickyLayer(layer); 2279 2279 2280 Render Object* container = renderer->container();2280 RenderElement* container = renderer->container(); 2281 2281 // If the renderer is not hooked up yet then we have to wait until it is. 2282 2282 if (!container) { -
trunk/Source/WebCore/rendering/RenderObject.cpp
r156285 r156308 658 658 ASSERT(!isSetNeedsLayoutForbidden()); 659 659 660 Render Object* object = container();660 RenderElement* object = container(); 661 661 RenderObject* last = this; 662 662 … … 671 671 // Don't mark the outermost object of an unrooted subtree. That object will be 672 672 // marked when the subtree is added to the document. 673 Render Object* container = object->container();673 RenderElement* container = object->container(); 674 674 if (!container && !object->isRenderView()) 675 675 return; … … 2251 2251 const RenderObject* currContainer = this; 2252 2252 do { 2253 Render Object* nextContainer = currContainer->container();2253 RenderElement* nextContainer = currContainer->container(); 2254 2254 ASSERT(nextContainer); // This means we reached the top without finding container. 2255 2255 if (!nextContainer) … … 2327 2327 } 2328 2328 2329 Render Object* RenderObject::container(const RenderLayerModelObject* repaintContainer, bool* repaintContainerSkipped) const2329 RenderElement* RenderObject::container(const RenderLayerModelObject* repaintContainer, bool* repaintContainerSkipped) const 2330 2330 { 2331 2331 if (repaintContainerSkipped) … … 2341 2341 // the layout of the positioned object. This does mean that computePositionedLogicalWidth and 2342 2342 // computePositionedLogicalHeight have to use container(). 2343 Render Object* o = parent();2343 RenderElement* o = parent(); 2344 2344 2345 2345 if (isText()) -
trunk/Source/WebCore/rendering/RenderObject.h
r156285 r156308 631 631 // If repaintContainer and repaintContainerSkipped are not null, on return *repaintContainerSkipped 632 632 // is true if the renderer returned is an ancestor of repaintContainer. 633 Render Object* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const;633 RenderElement* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; 634 634 635 635 virtual RenderObject* hoverAncestor() const; -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r155460 r156308 876 876 const RenderObject* renderer = partRenderer; 877 877 while (renderer && renderer != inputRenderer) { 878 Render Object* containingRenderer = renderer->container();878 RenderElement* containingRenderer = renderer->container(); 879 879 offsetFromInputRenderer -= roundedIntSize(renderer->offsetFromContainer(containingRenderer, LayoutPoint())); 880 880 renderer = containingRenderer;
Note:
See TracChangeset
for help on using the changeset viewer.