[Webkit-unassigned] [Bug 64479] New: RenderObject::containingBlock is a const method but it returns a non-const object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 13 12:40:29 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64479

           Summary: RenderObject::containingBlock is a const method but it
                    returns a non-const object
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: P4
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jchaffraix at webkit.org
                CC: darin at apple.com


See https://bugs.webkit.org/show_bug.cgi?id=64318#c2

This leads to ugly code like the following:

RenderBlock* RenderView::containingBlock() const
{
    return const_cast<RenderView*>(this);
}

Also it is a violation of const-ness.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list