Changeset 53490 in webkit


Ignore:
Timestamp:
Jan 19, 2010 1:53:43 PM (14 years ago)
Author:
dbates@webkit.org
Message:

2010-01-19 Daniel Bates <dbates@rim.com>

Reviewed by Darin Adler.

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

Fixes an issue in the Apple Mac port where ScrollView::platformVisibleContentRect
returns the rectangle of the document within the content view of
the scroll view (i.e. the rectangle not including scrollbars) when
the parameter includeScrollbars == true

Currently, this behavior contradicts both the comment in ScrollView.h
for method visibleContentRect as well as the behavior in
ScrollView::visibleContentRect() for a platform-independent scroll view.

Instead, it should return the rectangle whose dimensions include
the scrollbars.

Also, removes some extra whitespace at the end of the lines.

No tests included because we cannot test this using either DRT
or a manual test.

  • platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformVisibleContentRect): If includeScrollbars == true then return the rectangle whose dimensions are that of the frame (i.e. -[NSScrollView frame]).
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53489 r53490  
     12010-01-19  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=33851
     6
     7        Fixes an issue in the Apple Mac port where ScrollView::platformVisibleContentRect
     8        returns the rectangle of the document within the content view of
     9        the scroll view (i.e. the rectangle not including scrollbars) when
     10        the parameter includeScrollbars == true
     11
     12        Currently, this behavior contradicts both the comment in ScrollView.h
     13        for method visibleContentRect as well as the behavior in
     14        ScrollView::visibleContentRect() for a platform-independent scroll view.
     15
     16        Instead, it should return the rectangle whose dimensions include
     17        the scrollbars.
     18
     19        Also, removes some extra whitespace at the end of the lines.
     20
     21        No tests included because we cannot test this using either DRT
     22        or a manual test.
     23
     24        * platform/mac/ScrollViewMac.mm:
     25        (WebCore::ScrollView::platformVisibleContentRect): If includeScrollbars == true
     26        then return the rectangle whose dimensions are that of
     27        the frame (i.e. -[NSScrollView frame]).
     28
    1292010-01-19  Steve Block  <steveblock@google.com>
    230
  • trunk/WebCore/platform/mac/ScrollViewMac.mm

    r52489 r53490  
    108108IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
    109109{
    110     BEGIN_BLOCK_OBJC_EXCEPTIONS;
    111     if (includeScrollbars) {
    112         if (NSView* documentView = this->documentView())
    113             return enclosingIntRect([documentView visibleRect]);
    114     }
    115     return enclosingIntRect([scrollView() documentVisibleRect]);
    116     END_BLOCK_OBJC_EXCEPTIONS;
     110    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     111    IntRect result = enclosingIntRect([scrollView() documentVisibleRect]);
     112    if (includeScrollbars)
     113        result.setSize(IntSize([scrollView() frame].size));
     114    return result;
     115    END_BLOCK_OBJC_EXCEPTIONS;
    117116    return IntRect();
    118117}
Note: See TracChangeset for help on using the changeset viewer.