⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181587 in webkit


Ignore:
Timestamp:
Mar 16, 2015, 4:01:21 PM (11 years ago)
Author:
Brent Fulgham
Message:

WebKit1 Clients Are Not Reliably Repainted
https://bugs.webkit.org/show_bug.cgi?id=142750
<rdar://problem/20042453>

Reviewed by Simon Fraser.

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
the early return so we can see when this happening in debug builds.

  • page/FrameView.h:

(WebCore::FrameView::inPaintableState): Added.

Source/WebKit/mac:

Check with the FrameView to see if we are in an immediately paintable state. If we are not,
mark the view as dirty once the _immediateScrollToPoint operation is complete so that the
region will be painted properly.

  • WebView/WebClipView.mm:

(-[WebClipView _immediateScrollToPoint:]):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181577 r181587  
     12015-03-16  Brent Fulgham  <bfulgham@apple.com>
     2
     3        WebKit1 Clients Are Not Reliably Repainted
     4        https://bugs.webkit.org/show_bug.cgi?id=142750
     5        <rdar://problem/20042453>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * page/FrameView.cpp:
     10        (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
     11        the early return so we can see when this happening in debug builds.
     12        * page/FrameView.h:
     13        (WebCore::FrameView::inPaintableState): Added.
     14
    1152015-03-16  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/page/FrameView.cpp

    r181524 r181587  
    38503850void FrameView::paintContents(GraphicsContext* context, const IntRect& dirtyRect)
    38513851{
    3852     if (m_layoutPhase == InViewSizeAdjust)
    3853         return;
    3854 
    3855     ASSERT(m_layoutPhase == InPostLayerPositionsUpdatedAfterLayout || m_layoutPhase == OutsideLayout);
    3856 
    38573852#ifndef NDEBUG
    38583853    bool fillWithRed;
     
    38743869#endif
    38753870
     3871    if (m_layoutPhase == InViewSizeAdjust)
     3872        return;
     3873   
     3874    ASSERT(m_layoutPhase == InPostLayerPositionsUpdatedAfterLayout || m_layoutPhase == OutsideLayout);
     3875   
    38763876    RenderView* renderView = this->renderView();
    38773877    if (!renderView) {
  • trunk/Source/WebCore/page/FrameView.h

    r180848 r181587  
    114114    bool layoutPending() const;
    115115    bool isInLayout() const { return m_layoutPhase == InLayout; }
     116    WEBCORE_EXPORT bool inPaintableState() { return m_layoutPhase != InLayout && m_layoutPhase != InViewSizeAdjust && m_layoutPhase != InPostLayout; }
    116117
    117118    RenderObject* layoutRoot(bool onlyDuringLayout = false) const;
  • trunk/Source/WebKit/mac/ChangeLog

    r181562 r181587  
     12015-03-16  Brent Fulgham  <bfulgham@apple.com>
     2
     3        WebKit1 Clients Are Not Reliably Repainted
     4        https://bugs.webkit.org/show_bug.cgi?id=142750
     5        <rdar://problem/20042453>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Check with the FrameView to see if we are in an immediately paintable state. If we are not,
     10        mark the view as dirty once the _immediateScrollToPoint operation is complete so that the
     11        region will be painted properly.
     12
     13        * WebView/WebClipView.mm:
     14        (-[WebClipView _immediateScrollToPoint:]):
     15
    1162015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
    217
  • trunk/Source/WebKit/mac/WebView/WebClipView.mm

    r165676 r181587  
    11/*
    2  * Copyright (C) 2005 Apple Inc.  All rights reserved.
     2 * Copyright (C) 2005, 2015 Apple Inc.  All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    112112    [[self window] _enableDelayedWindowDisplay];
    113113
     114    // We may hit this immediate scrolling code during a layout operation trigged by an AppKit call. When
     115    // this happens, WebCore will not paint. So, we need to mark this region dirty so that it paints properly.
     116    WebFrameView *webFrameView = (WebFrameView *)[[self superview] superview];
     117    if ([webFrameView isKindOfClass:[WebFrameView class]]) {
     118        if (Frame* coreFrame = core([webFrameView webFrame])) {
     119            if (FrameView* frameView = coreFrame->view()) {
     120                if (!frameView->inPaintableState())
     121                    [self setNeedsDisplay:YES];
     122            }
     123        }
     124    }
     125
    114126    _isScrolling = NO;
    115127}
Note: See TracChangeset for help on using the changeset viewer.