Title: [181605] branches/safari-600.5-branch/Source

Diff

Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (181604 => 181605)


--- branches/safari-600.5-branch/Source/WebCore/ChangeLog	2015-03-17 01:04:13 UTC (rev 181604)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog	2015-03-17 01:47:50 UTC (rev 181605)
@@ -1,5 +1,23 @@
 2015-03-16  Babak Shafiei  <bshaf...@apple.com>
 
+        Merge r181587.
+
+    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  Babak Shafiei  <bshaf...@apple.com>
+
         Merge r181575.
 
     2015-03-16  Brady Eidson  <beid...@apple.com>

Modified: branches/safari-600.5-branch/Source/WebCore/page/FrameView.cpp (181604 => 181605)


--- branches/safari-600.5-branch/Source/WebCore/page/FrameView.cpp	2015-03-17 01:04:13 UTC (rev 181604)
+++ branches/safari-600.5-branch/Source/WebCore/page/FrameView.cpp	2015-03-17 01:47:50 UTC (rev 181605)
@@ -3709,11 +3709,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())
@@ -3733,6 +3728,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: branches/safari-600.5-branch/Source/WebCore/page/FrameView.h (181604 => 181605)


--- branches/safari-600.5-branch/Source/WebCore/page/FrameView.h	2015-03-17 01:04:13 UTC (rev 181604)
+++ branches/safari-600.5-branch/Source/WebCore/page/FrameView.h	2015-03-17 01:47:50 UTC (rev 181605)
@@ -110,6 +110,7 @@
     void unscheduleRelayout();
     bool layoutPending() const;
     bool isInLayout() const { return m_layoutPhase == InLayout; }
+    bool inPaintableState() { return m_layoutPhase != InLayout && m_layoutPhase != InViewSizeAdjust && m_layoutPhase != InPostLayout; }
 
     RenderObject* layoutRoot(bool _onlyDuringLayout_ = false) const;
     void clearLayoutRoot() { m_layoutRoot = nullptr; }

Modified: branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog (181604 => 181605)


--- branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog	2015-03-17 01:04:13 UTC (rev 181604)
+++ branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog	2015-03-17 01:47:50 UTC (rev 181605)
@@ -1,3 +1,22 @@
+2015-03-16  Babak Shafiei  <bshaf...@apple.com>
+
+        Merge r181587.
+
+    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-02-10  Lucas Forschler  <lforsch...@apple.com>
 
         Merge r177849

Modified: branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebClipView.mm (181604 => 181605)


--- branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebClipView.mm	2015-03-17 01:04:13 UTC (rev 181604)
+++ branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebClipView.mm	2015-03-17 01:47:50 UTC (rev 181605)
@@ -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

Reply via email to