Ignore:
Timestamp:
Aug 24, 2013, 9:33:15 AM (12 years ago)
Author:
[email protected]
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/RenderScrollbarPart.cpp

    r154488 r154546  
    100100    if (!m_scrollbar->owningRenderer())
    101101        return;
    102     RenderView* renderView = view();
     102    RenderView* renderView = &view();
    103103    // FIXME: We are querying layout information but nothing guarantees that it's up-to-date, especially since we are called at style change.
    104104    // FIXME: Querying the style's border information doesn't work on table cells with collapsing borders.
     
    118118    if (!m_scrollbar->owningRenderer())
    119119        return;
    120     RenderView* renderView = view();
     120    RenderView* renderView = &view();
    121121    // FIXME: We are querying layout information but nothing guarantees that it's up-to-date, especially since we are called at style change.
    122122    // FIXME: Querying the style's border information doesn't work on table cells with collapsing borders.
     
    164164        m_scrollbar->theme()->invalidatePart(m_scrollbar, m_part);
    165165    else {
    166         if (view()->frameView().isFrameViewScrollCorner(this)) {
    167             view()->frameView().invalidateScrollCorner(view()->frameView().scrollCornerRect());
     166        if (view().frameView().isFrameViewScrollCorner(this)) {
     167            view().frameView().invalidateScrollCorner(view().frameView().scrollCornerRect());
    168168            return;
    169169        }
Note: See TracChangeset for help on using the changeset viewer.