Ignore:
Timestamp:
Aug 24, 2013, 9:33:15 AM (12 years ago)
Author:
akling@apple.com
Message:

RenderObject::view() should return a reference.
<https://webkit.org/b/120247>

Reviewed by Antti Koivisto.

Now that the lifetime and accessibility characteristics of RenderView are well-defined,
we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
null checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r154044 r154546  
    148148    // It would be nice to refactor some of the duplicate code.
    149149    LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
    150     LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
     150    LayoutStateMaintainer statePusher(&view(), this, locationOffset(), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
    151151
    152152    // Regions changing widths can force us to relayout our children.
     
    317317    // FIXME: We still need to support calc() here (https://webkit.org/b/103761).
    318318    ASSERT(trackLength.isFixed() || trackLength.isPercent() || trackLength.isViewportPercentage());
    319     return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight()), view());
     319    return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight()), &view());
    320320}
    321321
Note: See TracChangeset for help on using the changeset viewer.