Title: [181587] trunk/Source
- Revision
- 181587
- Author
- bfulg...@apple.com
- Date
- 2015-03-16 16:01:21 -0700 (Mon, 16 Mar 2015)
Log 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:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (181586 => 181587)
--- trunk/Source/WebCore/ChangeLog 2015-03-16 22:52:12 UTC (rev 181586)
+++ trunk/Source/WebCore/ChangeLog 2015-03-16 23:01:21 UTC (rev 181587)
@@ -1,3 +1,17 @@
+2015-03-16 Brent Fulgham <bfulg...@apple.com>
+
+ WebKit1 Clients Are Not Reliably Repainted
+ https://bugs.webkit.org/show_bug.cgi?id=142750
+ <rdar://problem/20042453>
+
+ Reviewed by Simon Fraser.
+
+ * 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.
+
2015-03-16 Chris Dumez <cdu...@apple.com>
Make DatabaseContext suspendable if there is no pending database activity
Modified: trunk/Source/WebCore/page/FrameView.cpp (181586 => 181587)
--- trunk/Source/WebCore/page/FrameView.cpp 2015-03-16 22:52:12 UTC (rev 181586)
+++ trunk/Source/WebCore/page/FrameView.cpp 2015-03-16 23:01:21 UTC (rev 181587)
@@ -3849,11 +3849,6 @@
void FrameView::paintContents(GraphicsContext* context, const IntRect& dirtyRect)
{
- if (m_layoutPhase == InViewSizeAdjust)
- return;
-
- ASSERT(m_layoutPhase == InPostLayerPositionsUpdatedAfterLayout || m_layoutPhase == OutsideLayout);
-
#ifndef NDEBUG
bool fillWithRed;
if (frame().document()->printing())
@@ -3873,6 +3868,11 @@
context->fillRect(dirtyRect, Color(0xFF, 0, 0), ColorSpaceDeviceRGB);
#endif
+ if (m_layoutPhase == InViewSizeAdjust)
+ return;
+
+ ASSERT(m_layoutPhase == InPostLayerPositionsUpdatedAfterLayout || m_layoutPhase == OutsideLayout);
+
RenderView* renderView = this->renderView();
if (!renderView) {
LOG_ERROR("called FrameView::paint with nil renderer");
Modified: trunk/Source/WebCore/page/FrameView.h (181586 => 181587)
--- trunk/Source/WebCore/page/FrameView.h 2015-03-16 22:52:12 UTC (rev 181586)
+++ trunk/Source/WebCore/page/FrameView.h 2015-03-16 23:01:21 UTC (rev 181587)
@@ -113,6 +113,7 @@
void unscheduleRelayout();
bool layoutPending() const;
bool isInLayout() const { return m_layoutPhase == InLayout; }
+ WEBCORE_EXPORT bool inPaintableState() { return m_layoutPhase != InLayout && m_layoutPhase != InViewSizeAdjust && m_layoutPhase != InPostLayout; }
RenderObject* layoutRoot(bool _onlyDuringLayout_ = false) const;
void clearLayoutRoot() { m_layoutRoot = nullptr; }
Modified: trunk/Source/WebKit/mac/ChangeLog (181586 => 181587)
--- trunk/Source/WebKit/mac/ChangeLog 2015-03-16 22:52:12 UTC (rev 181586)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-03-16 23:01:21 UTC (rev 181587)
@@ -1,3 +1,18 @@
+2015-03-16 Brent Fulgham <bfulg...@apple.com>
+
+ WebKit1 Clients Are Not Reliably Repainted
+ https://bugs.webkit.org/show_bug.cgi?id=142750
+ <rdar://problem/20042453>
+
+ Reviewed by Simon Fraser.
+
+ 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:]):
+
2015-03-16 Conrad Shultz <conrad_shu...@apple.com>
Allow clients to selectively disable plug-ins
Modified: trunk/Source/WebKit/mac/WebView/WebClipView.mm (181586 => 181587)
--- trunk/Source/WebKit/mac/WebView/WebClipView.mm 2015-03-16 22:52:12 UTC (rev 181586)
+++ trunk/Source/WebKit/mac/WebView/WebClipView.mm 2015-03-16 23:01:21 UTC (rev 181587)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -111,6 +111,18 @@
[[self window] _enableDelayedWindowDisplay];
+ // We may hit this immediate scrolling code during a layout operation trigged by an AppKit call. When
+ // this happens, WebCore will not paint. So, we need to mark this region dirty so that it paints properly.
+ WebFrameView *webFrameView = (WebFrameView *)[[self superview] superview];
+ if ([webFrameView isKindOfClass:[WebFrameView class]]) {
+ if (Frame* coreFrame = core([webFrameView webFrame])) {
+ if (FrameView* frameView = coreFrame->view()) {
+ if (!frameView->inPaintableState())
+ [self setNeedsDisplay:YES];
+ }
+ }
+ }
+
_isScrolling = NO;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes