[Webkit-unassigned] [Bug 157117] New: Factor out the "paint item" logic in RenderListBox into a helper.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 27 20:01:45 PDT 2016


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

            Bug ID: 157117
           Summary: Factor out the "paint item" logic in RenderListBox
                    into a helper.
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tonikitoo at webkit.org
                CC: darin at apple.com, dbates at webkit.org,
                    simon.fraser at apple.com
            Blocks: 156590

The following code appears almost identical twice in ::paintObject.

As per the review comments in bug 156590 (https://bugs.webkit.org/show_bug.cgi?id=156590#c16 and https://bugs.webkit.org/show_bug.cgi?id=156590#c14),
it might be nice to factor out this block to avoid duplication.

void RenderListBox::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
    if (style().visibility() != VISIBLE)
        return;

    (...)
    if (paintInfo.phase == PaintPhaseForeground) {{
        int index = m_indexOffset;
        while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) {
            paintItemForeground(paintInfo, paintOffset, index);
            index++;
        }
    }

    (...)
    case PaintPhaseChildBlockBackground:
    case PaintPhaseChildBlockBackgrounds: {
        int index = m_indexOffset;
        while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) {
            paintItemBackground(paintInfo, paintOffset, index);
            index++;
        }
    }
    (...)
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160428/7adb05a7/attachment.html>


More information about the webkit-unassigned mailing list