Bug 72488 - Remove unnecessary if check from RenderListBox::paintItemForeground
Summary: Remove unnecessary if check from RenderListBox::paintItemForeground
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-16 04:35 PST by Antaryami Pandia
Modified: 2011-11-16 07:05 PST (History)
3 users (show)

See Also:


Attachments
Proposed Patch (1.26 KB, patch)
2011-11-16 04:40 PST, Antaryami Pandia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antaryami Pandia 2011-11-16 04:35:48 PST
There is a if check which checks for visibility before drawing text.

    if (itemStyle->visibility() != HIDDEN)
        paintInfo.context->drawBidiText(itemFont, textRun, r.location());

I think this if check is unnecessary, since there is already an early return available for the visibility and the itemStyle is not modified in between.

The early return is as follows:-
    if (itemStyle->visibility() == HIDDEN)
        return;
Comment 1 Antaryami Pandia 2011-11-16 04:40:58 PST
Created attachment 115359 [details]
Proposed Patch

Proposed Patch.
Comment 2 Andreas Kling 2011-11-16 06:19:15 PST
Comment on attachment 115359 [details]
Proposed Patch

r=me
Comment 3 WebKit Review Bot 2011-11-16 07:05:13 PST
Comment on attachment 115359 [details]
Proposed Patch

Clearing flags on attachment: 115359

Committed r100447: <http://trac.webkit.org/changeset/100447>
Comment 4 WebKit Review Bot 2011-11-16 07:05:17 PST
All reviewed patches have been landed.  Closing bug.