Bug 70074 - Redundant comparison in AccessibilityObject.cpp updateAXLineStartForVisiblePosition
Summary: Redundant comparison in AccessibilityObject.cpp updateAXLineStartForVisiblePo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 16:41 PDT by Ryan Sleevi
Modified: 2011-10-14 10:56 PDT (History)
5 users (show)

See Also:


Attachments
cleanup (1.37 KB, patch)
2011-10-14 09:35 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Sleevi 2011-10-13 16:41:58 PDT
This was reported upstream to Chromium by way of PVS Studio ( http://www.viva64.com/en/b/0113/ ), Fragment N11

http://trac.webkit.org/browser/trunk/Source/WebCore/accessibility/AccessibilityObject.cpp?annotate=blame&rev=96973#L481

Line 487:
    while (true) {
        tempPosition = startPosition.previous();
        if (tempPosition.isNull() || tempPosition.isNull())
            break;
        Position p = tempPosition.deepEquivalent();

The bug is that the conditional checks if tempPosition.isNull() twice. It's not clear what is meant to be checked here - startPosition.isNull() ?

It was introduced in http://trac.webkit.org/changeset/92451
Comment 1 Ryosuke Niwa 2011-10-13 18:04:11 PDT
Ok, this is definitely a typo. The second isNull check is redundant and can be removed.
Comment 2 Ryosuke Niwa 2011-10-14 09:35:15 PDT
Created attachment 111023 [details]
cleanup
Comment 3 chris fleizach 2011-10-14 09:52:34 PDT
Comment on attachment 111023 [details]
cleanup

r=me
Comment 4 Ryosuke Niwa 2011-10-14 10:56:48 PDT
Comment on attachment 111023 [details]
cleanup

Clearing flags on attachment: 111023

Committed r97479: <http://trac.webkit.org/changeset/97479>
Comment 5 Ryosuke Niwa 2011-10-14 10:56:51 PDT
All reviewed patches have been landed.  Closing bug.