[Webkit-unassigned] [Bug 62478] New: RenderText::absoluteRectsForRange() and absoluteQuadsForRange() have nearly duplicate code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 10 14:16:02 PDT 2011


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

           Summary: RenderText::absoluteRectsForRange() and
                    absoluteQuadsForRange() have nearly duplicate code
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org
                CC: simon.fraser at apple.com


* SUMMARY
In RenderText::absoluteRectsForRange(), the following code is used in an else clause:

            IntRect r = box->selectionRect(0, 0, start, realEnd);
            if (!r.isEmpty()) {
                if (!useSelectionHeight) {

In RenderText::absoluteQuadsForRange(), the same code uses a slightly different check:

            IntRect r = box->selectionRect(0, 0, start, realEnd);
            if (r.height()) {
                if (!useSelectionHeight) {

It seems like these methods should be using the same check, and it would be great if the duplicate code could be extracted into a local static method.

-- 
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