Changeset 16764 in webkit


Ignore:
Timestamp:
Oct 3, 2006, 9:22:10 PM (18 years ago)
Author:
hyatt
Message:

Scrolling work.

Location:
trunk/WebCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r16762 r16764  
     12006-10-03  Dave Hyatt  <hyatt@apple.com>
     2
     3        Scrolling work.  Eliminate convertTo/FromContainingWindow as cross-platform functions.  Add back in
     4        the windowToContents/contentsToWindow functions.
     5       
     6        Reviewed by anders
     7
     8        * bridge/mac/FrameMac.mm:
     9        (WebCore::FrameMac::eventMayStartDrag):
     10        (WebCore::FrameMac::dragHysteresisExceeded):
     11        (WebCore::FrameMac::mouseDown):
     12        (WebCore::FrameMac::shouldDragAutoNode):
     13        (WebCore::FrameMac::sendContextMenuEvent):
     14        * bridge/mac/FrameViewMac.mm:
     15        (WebCore::FrameView::passMousePressEventToScrollbar):
     16        * bridge/mac/WebCoreFrameBridge.mm:
     17        (-[WebCoreFrameBridge _visiblePositionForPoint:]):
     18        * dom/EventTargetNode.cpp:
     19        (WebCore::EventTargetNode::dispatchMouseEvent):
     20        (WebCore::EventTargetNode::dispatchWheelEvent):
     21        * page/Frame.cpp:
     22        (WebCore::Frame::selectClosestWordFromMouseEvent):
     23        (WebCore::Frame::handleMousePressEventTripleClick):
     24        (WebCore::Frame::handleMousePressEventSingleClick):
     25        (WebCore::Frame::handleMouseMoveEvent):
     26        (WebCore::Frame::handleMouseReleaseEvent):
     27        * page/FrameView.cpp:
     28        (WebCore::FrameView::handleMousePressEvent):
     29        (WebCore::FrameView::handleMouseDoubleClickEvent):
     30        (WebCore::selectCursor):
     31        (WebCore::FrameView::handleMouseMoveEvent):
     32        (WebCore::FrameView::handleMouseReleaseEvent):
     33        (WebCore::FrameView::dispatchDragEvent):
     34        (WebCore::FrameView::prepareMouseEvent):
     35        (WebCore::FrameView::handleWheelEvent):
     36        * page/FrameView.h:
     37        * platform/ScrollBar.cpp:
     38        (WebCore::ScrollBar::setValue):
     39        * platform/ScrollView.h:
     40        * platform/Widget.h:
     41        (WebCore::Widget::scrolled):
     42        * platform/mac/ScrollViewMac.mm:
     43        (WebCore::ScrollView::contentsToWindow):
     44        (WebCore::ScrollView::windowToContents):
     45        (WebCore::ScrollView::scrollbarUnderMouse):
     46        * platform/mac/WidgetMac.mm:
     47        * rendering/RenderLayer.cpp:
     48        (WebCore::RenderLayer::resize):
     49        (WebCore::RenderLayer::positionScrollbars):
     50        * rendering/RenderReplaced.cpp:
     51        (WebCore::RenderReplaced::shouldPaint):
     52        * rendering/RenderView.cpp:
     53        * rendering/RenderView.h:
     54        * rendering/RenderWidget.cpp:
     55        (WebCore::RenderWidget::setWidget):
     56
    1572006-09-26  David Smith  <catfish.man@gmail.com>
    258
  • trunk/WebCore/bridge/mac/FrameMac.mm

    r16692 r16764  
    15731573
    15741574    NSPoint loc = [event locationInWindow];
    1575     IntPoint mouseDownPos = d->m_view->convertFromContainingWindow(IntPoint(loc));
     1575    IntPoint mouseDownPos = d->m_view->windowToContents(IntPoint(loc));
    15761576    RenderObject::NodeInfo nodeInfo(true, false);
    15771577    renderer()->layer()->hitTest(nodeInfo, mouseDownPos);
     
    15921592{
    15931593    IntPoint dragViewportLocation((int)dragLocationX, (int)dragLocationY);
    1594     IntPoint dragLocation = d->m_view->convertFromContainingWindow(dragViewportLocation);
     1594    IntPoint dragLocation = d->m_view->windowToContents(dragViewportLocation);
    15951595    IntSize delta = dragLocation - m_mouseDownPos;
    15961596   
     
    19771977    m_mouseDown = PlatformMouseEvent(event);
    19781978    NSPoint loc = [event locationInWindow];
    1979     m_mouseDownPos = d->m_view->convertFromContainingWindow(IntPoint(loc));
     1979    m_mouseDownPos = d->m_view->windowToContents(IntPoint(loc));
    19801980    _mouseDownTimestamp = [event timestamp];
    19811981
     
    21382138    // (since right now WK just hit-tests using a cached lastMouseDown).
    21392139    if (!node->hasChildNodes() && d->m_view) {
    2140         NSPoint eventLoc = d->m_view->convertToContainingWindow(point);
     2140        NSPoint eventLoc = d->m_view->contentsToWindow(point);
    21412141        return [_bridge mayStartDragAtEventLocation:eventLoc];
    21422142    } else
     
    21592159    PlatformMouseEvent mouseEvent(event);
    21602160
    2161     IntPoint viewportPos = v->convertFromContainingWindow(mouseEvent.pos());
     2161    IntPoint viewportPos = v->windowToContents(mouseEvent.pos());
    21622162    MouseEventWithHitTestResults mev = doc->prepareMouseEvent(false, true, false, viewportPos, mouseEvent);
    21632163
  • trunk/WebCore/bridge/mac/FrameViewMac.mm

    r16693 r16764  
    7575}
    7676
    77 bool FrameView::passMousePressEventToScrollbar(MouseEventWithHitTestResults& mev)
     77bool FrameView::passMousePressEventToScrollbar(MouseEventWithHitTestResults& mev, PlatformScrollBar* scrollbar)
    7878{
    79     return Mac(m_frame.get())->passMouseDownEventToWidget(mev.scrollbar());
     79    return Mac(m_frame.get())->passMouseDownEventToWidget(scrollbar);
    8080}
    8181 
  • trunk/WebCore/bridge/mac/WebCoreFrameBridge.mm

    r16761 r16764  
    21012101    FrameView* outerView = m_frame->view();
    21022102    FrameView* innerView = node->document()->view();
    2103     IntPoint innerPoint = innerView->convertFromContainingWindow(outerView->convertToContainingWindow(outerPoint));
     2103    IntPoint innerPoint = innerView->windowToContents(outerView->contentsToWindow(outerPoint));
    21042104    return renderer->positionForCoordinates(innerPoint.x(), innerPoint.y());
    21052105}
  • trunk/WebCore/dom/EventTargetNode.cpp

    r16741 r16764  
    369369    IntPoint contentsPos;
    370370    if (FrameView* view = document()->view())
    371         contentsPos = view->convertFromContainingWindow(_mouse.pos());
     371        contentsPos = view->windowToContents(_mouse.pos());
    372372   
    373373    return dispatchMouseEvent(eventType, _mouse.button(), detail,
     
    454454        return;
    455455   
    456     IntPoint pos = view->convertFromContainingWindow(e.pos());
     456    IntPoint pos = view->windowToContents(e.pos());
    457457   
    458458    RefPtr<WheelEvent> we = new WheelEvent(e.deltaX(), e.deltaY(),
  • trunk/WebCore/page/Frame.cpp

    r16727 r16764  
    18141814
    18151815    if (innerNode && innerNode->renderer() && mouseDownMayStartSelect() && innerNode->renderer()->shouldSelect()) {
    1816         IntPoint vPoint = view()->convertFromContainingWindow(mouse.pos());
     1816        IntPoint vPoint = view()->windowToContents(mouse.pos());
    18171817        VisiblePosition pos(innerNode->renderer()->positionForPoint(vPoint));
    18181818        if (pos.isNotNull()) {
     
    18531853        mouseDownMayStartSelect() && innerNode->renderer()->shouldSelect()) {
    18541854        Selection newSelection;
    1855         IntPoint vPoint = view()->convertFromContainingWindow(event.event().pos());
     1855        IntPoint vPoint = view()->windowToContents(event.event().pos());
    18561856        VisiblePosition pos(innerNode->renderer()->positionForPoint(vPoint));
    18571857        if (pos.isNotNull()) {
     
    18821882            // Don't restart the selection when the mouse is pressed on an
    18831883            // existing selection so we can allow for text dragging.
    1884             IntPoint vPoint = view()->convertFromContainingWindow(event.event().pos());
     1884            IntPoint vPoint = view()->windowToContents(event.event().pos());
    18851885            if (!extendSelection && isPointInsideSelection(vPoint))
    18861886                return;
     
    19551955    // handle making selection
    19561956
    1957     IntPoint vPoint = view()->convertFromContainingWindow(event.event().pos());
     1957    IntPoint vPoint = view()->windowToContents(event.event().pos());
    19581958    VisiblePosition pos(innerNode->renderer()->positionForPoint(vPoint));
    19591959
     
    19971997        Node *node = event.targetNode();
    19981998        if (node && node->isContentEditable() && node->renderer()) {
    1999             IntPoint vPoint = view()->convertFromContainingWindow(event.event().pos());
     1999            IntPoint vPoint = view()->windowToContents(event.event().pos());
    20002000            VisiblePosition pos = node->renderer()->positionForPoint(vPoint);
    20012001            newSelection = Selection(pos);
  • trunk/WebCore/page/FrameView.cpp

    r16760 r16764  
    588588
    589589    d->mousePressed = true;
    590     d->m_currentMousePosition = convertFromContainingWindow(mouseEvent.pos());
     590    d->m_currentMousePosition = windowToContents(mouseEvent.pos());
    591591   
    592592    MouseEventWithHitTestResults mev = prepareMouseEvent(false, true, false, mouseEvent);
     
    602602   
    603603    RenderLayer* layer = d->clickNode->renderer()? d->clickNode->renderer()->enclosingLayer() : 0;
    604     IntPoint p =  convertFromContainingWindow(mouseEvent.pos());
     604    IntPoint p =  windowToContents(mouseEvent.pos());
    605605    if (layer && layer->isPointInResizeControl(p)) {
    606606        layer->setInResizeMode(true);
     
    621621            mev = prepareMouseEvent(true, true, false, mouseEvent);
    622622
    623         if (!mev.scrollbar() || !passMousePressEventToScrollbar(mev))
     623        PlatformScrollBar* scrollbar = scrollbarUnderMouse(mouseEvent);
     624        if (!scrollbar)
     625            scrollbar = mev.scrollbar();
     626        if (!scrollbar || !passMousePressEventToScrollbar(mev, scrollbar))
    624627            m_frame->handleMousePressEvent(mev);
    625628
     
    644647    // We get this instead of a second mouse-up
    645648    d->mousePressed = false;
    646     d->m_currentMousePosition = convertFromContainingWindow(mouseEvent.pos());
     649    d->m_currentMousePosition = windowToContents(mouseEvent.pos());
    647650
    648651    MouseEventWithHitTestResults mev = prepareMouseEvent(false, true, false, mouseEvent);
     
    674677}
    675678
    676 static Cursor selectCursor(const MouseEventWithHitTestResults& event, Frame* frame, bool mousePressed)
     679static Cursor selectCursor(const MouseEventWithHitTestResults& event, Frame* frame, bool mousePressed, PlatformScrollBar* scrollbar)
    677680{
    678681    // During selection, use an I-beam no matter what we're over.
     
    737740            RenderLayer* layer = renderer ? renderer->enclosingLayer() : 0;
    738741            bool inResizer = false;
    739             if (frame->view() && layer && layer->isPointInResizeControl(frame->view()->convertFromContainingWindow(event.event().pos())))
     742            if (frame->view() && layer && layer->isPointInResizeControl(frame->view()->windowToContents(event.event().pos())))
    740743                inResizer = true;
    741             if ((editable || (renderer && renderer->isText() && renderer->canSelect())) && !inResizer && !event.scrollbar())
     744            if ((editable || (renderer && renderer->isText() && renderer->canSelect())) && !inResizer && !scrollbar)
    742745                return iBeamCursor();
    743746            // FIXME: If the point is in a layer's overflow scrollbars, we should use the pointer cursor
     
    801804
    802805    RefPtr<FrameView> protector(this);
    803     d->m_currentMousePosition = convertFromContainingWindow(mouseEvent.pos());
     806    d->m_currentMousePosition = windowToContents(mouseEvent.pos());
    804807   
    805808    if (d->hoverTimer.isActive())
     
    823826    bool swallowEvent = dispatchMouseEvent(mousemoveEvent, mev.targetNode(), false, 0, mouseEvent, true);
    824827   
    825     if (d->oldScrollBar != mev.scrollbar()) {
     828    PlatformScrollBar* scrollbar = scrollbarUnderMouse(mouseEvent);
     829    if (!scrollbar)
     830        scrollbar = mev.scrollbar();
     831
     832    if (d->oldScrollBar != scrollbar) {
    826833        // Send mouse exited to the old scrollbar.
    827834        if (d->oldScrollBar)
    828835            d->oldScrollBar->handleMouseOutEvent(mouseEvent);
    829         d->oldScrollBar = mev.scrollbar();
     836        d->oldScrollBar = scrollbar;
    830837    }
    831838
     
    840847        passMouseMoveEventToSubframe(mev, newSubframe.get());
    841848    else {
    842         if (mev.scrollbar() && !d->mousePressed)
    843             mev.scrollbar()->handleMouseMoveEvent(mouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
    844         setCursor(selectCursor(mev, m_frame.get(), d->mousePressed));
     849        if (scrollbar && !d->mousePressed)
     850            scrollbar->handleMouseMoveEvent(mouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
     851        setCursor(selectCursor(mev, m_frame.get(), d->mousePressed, scrollbar));
    845852    }
    846853
     
    872879
    873880    d->mousePressed = false;
    874     d->m_currentMousePosition = convertFromContainingWindow(mouseEvent.pos());
     881    d->m_currentMousePosition = windowToContents(mouseEvent.pos());
    875882
    876883    if (d->resizingFrameSet) {
     
    902909bool FrameView::dispatchDragEvent(const AtomicString& eventType, Node *dragTarget, const PlatformMouseEvent& event, Clipboard* clipboard)
    903910{
    904     IntPoint contentsPos = convertFromContainingWindow(event.pos());
     911    IntPoint contentsPos = windowToContents(event.pos());
    905912   
    906913    RefPtr<MouseEvent> me = new MouseEvent(eventType,
     
    11451152    ASSERT(m_frame->document());
    11461153   
    1147     IntPoint vPoint = convertFromContainingWindow(mev.pos());
     1154    IntPoint vPoint = windowToContents(mev.pos());
    11481155    return m_frame->document()->prepareMouseEvent(readonly, active, mouseMove, vPoint, mev);
    11491156}
     
    12221229        RenderObject *docRenderer = doc->renderer();
    12231230        if (docRenderer) {
    1224             IntPoint vPoint = convertFromContainingWindow(e.pos());
     1231            IntPoint vPoint = windowToContents(e.pos());
    12251232
    12261233            RenderObject::NodeInfo hitTestResult(true, false);
  • trunk/WebCore/page/FrameView.h

    r16741 r16764  
    146146    bool passMouseReleaseEventToSubframe(MouseEventWithHitTestResults&, Frame*);
    147147    bool passWheelEventToSubframe(PlatformWheelEvent&, Frame*);
    148     bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&);
     148    bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&, PlatformScrollBar*);
    149149
    150150    bool mousePressed();
  • trunk/WebCore/platform/ScrollBar.cpp

    r16663 r16764  
    4444{
    4545    int maxPos = m_totalSize - m_visibleSize;
    46     if (v < 0) v = 0;
    4746    if (v > maxPos)
    4847        v = maxPos;
     48    if (v < 0)
     49        v = 0;
    4950    if (m_currentPos == v)
    5051        return false; // Our value stayed the same.
  • trunk/WebCore/platform/ScrollView.h

    r16630 r16764  
    3838    class FloatRect;
    3939    class PlatformWheelEvent;
     40    class PlatformScrollBar;
    4041
    4142    class ScrollView : public Widget {
     
    7273        void updateContents(const IntRect&, bool now = false);
    7374
    74         virtual IntPoint convertToContainingWindow(const IntPoint&) const;
    75         virtual IntPoint convertFromContainingWindow(const IntPoint&) const;
    76 
     75        // Event coordinates are assumed to be in the coordinate space of a window that contains
     76        // the entire widget hierarchy.  It is up to the platform to decide what the precise definition
     77        // of containing window is.  (For example on Mac it is the containing NSWindow.)
     78        IntPoint windowToContents(const IntPoint&) const;
     79        IntPoint contentsToWindow(const IntPoint&) const;
     80 
    7781        void setStaticBackground(bool);
    7882
    7983        bool inWindow() const;
     84
     85        // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32).
     86        PlatformScrollBar* scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent);
    8087
    8188        // This method exists for scrollviews that need to handle wheel events manually.
     
    94101        virtual void paint(GraphicsContext*, const IntRect&);
    95102        virtual void themeChanged();
     103       
     104        virtual IntPoint convertChildToSelf(const Widget*, const IntPoint&) const;
     105        virtual IntPoint convertSelfToChild(const Widget*, const IntPoint&) const;
     106       
     107        virtual void scrolled() const;
    96108
    97109    private:
    98         void updateScrollBars();
     110        void updateScrollBars(const IntSize& desiredOffset);
    99111        IntSize maximumScroll() const;
    100         int updateScrollInfo(short type, int current, int max, int pageSize);
    101112        class ScrollViewPrivate;
    102113        ScrollViewPrivate* m_data;
  • trunk/WebCore/platform/Widget.h

    r16683 r16764  
    130130        virtual bool isFrameView() const;
    131131
    132         // Event coordinates are assumed to be in the coordinate space of a window that contains
    133         // the entire widget hierarchy.  It is up to the platform to decide what the precise definition
    134         // of containing window is.  (For example on Mac it is the containing NSWindow.)
    135         //
    136         // Note that for scrollable widgets, the points and rects given will be converted to and
    137         // from the document coordinate space inside the scrollable widget.  Therefore
    138         // for conversion to a containing window coordinate space, the argument should be in the
    139         // scrollable widget's document coordinate space.  When converting from the containing window
    140         // coordinate space, the result will be in the scrollable widget's document coordinate space.
    141         IntRect convertToContainingWindow(const IntRect&) const;
    142         virtual IntPoint convertToContainingWindow(const IntPoint&) const;
    143         virtual IntPoint convertFromContainingWindow(const IntPoint&) const;
    144 
    145132#if PLATFORM(WIN)
    146133        void setContainingWindow(HWND);
     
    150137        Widget* parent() const;
    151138
     139        virtual void scrolled() const {};
     140
    152141        bool capturingMouse() const;
    153142        void setCapturingMouse(bool);
     
    156145        void setCapturingChild(Widget*);
    157146       
     147        IntRect convertToContainingWindow(const IntRect&) const;
     148        IntPoint convertToContainingWindow(const IntPoint&) const;
     149        IntPoint convertFromContainingWindow(const IntPoint&) const;
     150
     151        virtual IntPoint convertChildToSelf(const Widget*, const IntPoint&) const;
     152        virtual IntPoint convertSelfToChild(const Widget*, const IntPoint&) const;
     153
     154        void setSuppressInvalidation(bool);
     155
    158156        // These methods will be called on a widget while it is capturing the mouse.
    159157        virtual void handleMouseMoveEvent(const PlatformMouseEvent&) {};
  • trunk/WebCore/platform/mac/ScrollViewMac.mm

    r16630 r16764  
    356356// "Containing Window" means the NSWindow's coord system, which is origin lower left
    357357
    358 IntPoint ScrollView::convertToContainingWindow(const IntPoint& contentsPoint) const
     358IntPoint ScrollView::contentsToWindow(const IntPoint& contentsPoint) const
    359359{
    360360    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    376376}
    377377
    378 IntPoint ScrollView::convertFromContainingWindow(const IntPoint& point) const
     378IntPoint ScrollView::windowToContents(const IntPoint& point) const
    379379{
    380380    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    418418}
    419419
     420PlatformScrollBar* ScrollView::scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent)
     421{
     422    // On Mac, the ScrollView is really the "document", so events will never flow into it to get to the scrollers.
     423    return 0;
     424}
     425
    420426bool ScrollView::inWindow() const
    421427{
  • trunk/WebCore/platform/mac/WidgetMac.mm

    r16630 r16764  
    453453}
    454454
    455 // "Containing Window" means the NSWindow's coord system, which is origin lower left
    456 
    457 IntPoint Widget::convertToContainingWindow(const IntPoint& point) const
    458 {
    459     BEGIN_BLOCK_OBJC_EXCEPTIONS;
    460     NSView *view = getView();   
    461     NSPoint tempPoint = { point.x(), point.y() }; // workaround for 4213314
    462     NSPoint np = [view convertPoint:tempPoint toView: nil];
    463     return IntPoint(np);
    464 
    465     END_BLOCK_OBJC_EXCEPTIONS;
    466    
    467     return IntPoint();
    468 }
    469 
    470 IntPoint Widget::convertFromContainingWindow(const IntPoint& point) const
    471 {
    472     BEGIN_BLOCK_OBJC_EXCEPTIONS;
    473 
    474     NSView *view = getView();       
    475     NSPoint tempPoint = { point.x(), point.y() }; // workaround for 4213314
    476     NSPoint np = [view convertPoint:tempPoint fromView: nil];
    477 
    478     return IntPoint(np);
    479 
    480     END_BLOCK_OBJC_EXCEPTIONS;
    481 
    482     return IntPoint();
    483 }
    484 
    485 }
     455}
  • trunk/WebCore/rendering/RenderLayer.cpp

    r16678 r16764  
    804804    // the cursor in view.
    805805
    806     IntPoint currentPoint = m_object->document()->view()->convertFromContainingWindow(evt.pos());
     806    IntPoint currentPoint = m_object->document()->view()->windowToContents(evt.pos());
    807807    currentPoint += offsetFromResizeCorner;
    808808
     
    10051005RenderLayer::positionScrollbars(const IntRect& absBounds)
    10061006{
    1007     int resizeControlSize = max(resizeControlRect().height() - 1, 0);
     1007    int resizeControlSize = max(resizeControlRect().height(), 0);
    10081008    if (m_vBar)
    10091009        m_vBar->setRect(IntRect(absBounds.right() - m_object->borderRight() - m_vBar->width(),
    10101010                                absBounds.y() + m_object->borderTop(),
    10111011                                m_vBar->width(),
    1012                                 absBounds.height() - (m_object->borderTop() + m_object->borderBottom()) - (m_hBar ? m_hBar->height() - 1 : resizeControlSize)));
    1013 
    1014     resizeControlSize = max(resizeControlRect().width() - 1, 0);
     1012                                absBounds.height() - (m_object->borderTop() + m_object->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize)));
     1013
     1014    resizeControlSize = max(resizeControlRect().width(), 0);
    10151015    if (m_hBar)
    10161016        m_hBar->setRect(IntRect(absBounds.x() + m_object->borderLeft(),
    10171017                                absBounds.bottom() - m_object->borderBottom() - m_hBar->height(),
    1018                                 absBounds.width() - (m_object->borderLeft() + m_object->borderRight()) - (m_vBar ? m_vBar->width() - 1 : resizeControlSize),
     1018                                absBounds.width() - (m_object->borderLeft() + m_object->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize),
    10191019                                m_hBar->height()));
    10201020}
  • trunk/WebCore/rendering/RenderReplaced.cpp

    r15253 r16764  
    5252       
    5353    // if we're invisible or haven't received a layout yet, then just bail.
    54     if (style()->visibility() != VISIBLE || m_y <=  -500000)  return false;
     54    if (style()->visibility() != VISIBLE)
     55        return false;
    5556
    5657    int tx = _tx + m_x;
  • trunk/WebCore/rendering/RenderView.cpp

    r16683 r16764  
    240240}
    241241
    242 IntRect RenderView::getAbsoluteRepaintRect()
    243 {
    244     IntRect result;
    245     if (m_frameView && !m_printingMode)
    246         result = IntRect(m_frameView->contentsX(), m_frameView->contentsY(),
    247                        m_frameView->visibleWidth(), m_frameView->visibleHeight());
    248     return result;
    249 }
    250 
    251 void RenderView::computeAbsoluteRepaintRect(IntRect& r, bool f)
    252 {
    253     if (m_printingMode)
    254         return;
    255 
    256     if (f && m_frameView)
    257         r.move(m_frameView->contentsX(), m_frameView->contentsY());
    258 }
    259 
    260242void RenderView::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
    261243{
  • trunk/WebCore/rendering/RenderView.h

    r16250 r16764  
    5353    virtual bool hasOverhangingFloats() { return false; }
    5454   
    55     virtual IntRect getAbsoluteRepaintRect();
    56     virtual void computeAbsoluteRepaintRect(IntRect& r, bool f=false);
    5755    virtual void repaintViewRectangle(const IntRect& r, bool immediate = false);
    5856   
  • trunk/WebCore/rendering/RenderWidget.cpp

    r15806 r16764  
    129129                    m_width - borderLeft() - borderRight() - paddingLeft() - paddingRight(),
    130130                    m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom());
    131             else
    132                 setPos(xPos(), -500000);
    133131            if (style()) {
    134132                if (style()->visibility() != VISIBLE)
     
    137135                    m_widget->show();
    138136            }
    139             m_view->addChild(m_widget, -500000, 0);
     137            m_view->addChild(m_widget);
    140138        }
    141139    }
Note: See TracChangeset for help on using the changeset viewer.