[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:42:20 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 94aae38299d88814cba698fdddcb4e3c751ebaa6
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 23 04:27:32 2002 +0000
Change code that moves NSViews out of the way to run inside drawRect
after a layout change rather than running at layout time. This makes
sure that views are in the right place when propagating dirty rects.
* kwq/KWQKHTMLPartImpl.h: Add paint method and _needsToSetWidgetsAside flag.
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::KWQKHTMLPartImpl): Set _needsToSetWidgetsAside to false.
(KWQKHTMLPartImpl::layout): Set _needsToSetWidgetsAside to true. Don't call
moveWidgetsAside any more.
(KWQKHTMLPartImpl::paint): Moved the code here from the bridge, but also call
moveWidgetsAside if _needsToSetWidgetsAside flag is set.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:withPainter:]): Call KWQKHTMLPartImpl::paint, which
is where I moved this code.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index afff1f6..6a12e28 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,20 @@
+2002-09-22 Darin Adler <darin at apple.com>
+
+ Change code that moves NSViews out of the way to run inside drawRect
+ after a layout change rather than running at layout time. This makes
+ sure that views are in the right place when propagating dirty rects.
+
+ * kwq/KWQKHTMLPartImpl.h: Add paint method and _needsToSetWidgetsAside flag.
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Set _needsToSetWidgetsAside to false.
+ (KWQKHTMLPartImpl::layout): Set _needsToSetWidgetsAside to true. Don't call
+ moveWidgetsAside any more.
+ (KWQKHTMLPartImpl::paint): Moved the code here from the bridge, but also call
+ moveWidgetsAside if _needsToSetWidgetsAside flag is set.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge drawRect:withPainter:]): Call KWQKHTMLPartImpl::paint, which
+ is where I moved this code.
+
2002-09-21 Darin Adler <darin at apple.com>
- fixed 3057265 -- REGRESSION: Crash loading http://www.undetectables.co.uk/
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index afff1f6..6a12e28 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,20 @@
+2002-09-22 Darin Adler <darin at apple.com>
+
+ Change code that moves NSViews out of the way to run inside drawRect
+ after a layout change rather than running at layout time. This makes
+ sure that views are in the right place when propagating dirty rects.
+
+ * kwq/KWQKHTMLPartImpl.h: Add paint method and _needsToSetWidgetsAside flag.
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Set _needsToSetWidgetsAside to false.
+ (KWQKHTMLPartImpl::layout): Set _needsToSetWidgetsAside to true. Don't call
+ moveWidgetsAside any more.
+ (KWQKHTMLPartImpl::paint): Moved the code here from the bridge, but also call
+ moveWidgetsAside if _needsToSetWidgetsAside flag is set.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge drawRect:withPainter:]): Call KWQKHTMLPartImpl::paint, which
+ is where I moved this code.
+
2002-09-21 Darin Adler <darin at apple.com>
- fixed 3057265 -- REGRESSION: Crash loading http://www.undetectables.co.uk/
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index afff1f6..6a12e28 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2002-09-22 Darin Adler <darin at apple.com>
+
+ Change code that moves NSViews out of the way to run inside drawRect
+ after a layout change rather than running at layout time. This makes
+ sure that views are in the right place when propagating dirty rects.
+
+ * kwq/KWQKHTMLPartImpl.h: Add paint method and _needsToSetWidgetsAside flag.
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Set _needsToSetWidgetsAside to false.
+ (KWQKHTMLPartImpl::layout): Set _needsToSetWidgetsAside to true. Don't call
+ moveWidgetsAside any more.
+ (KWQKHTMLPartImpl::paint): Moved the code here from the bridge, but also call
+ moveWidgetsAside if _needsToSetWidgetsAside flag is set.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge drawRect:withPainter:]): Call KWQKHTMLPartImpl::paint, which
+ is where I moved this code.
+
2002-09-21 Darin Adler <darin at apple.com>
- fixed 3057265 -- REGRESSION: Crash loading http://www.undetectables.co.uk/
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index a428d0d..c1ac13b 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -118,6 +118,7 @@ public:
DOM::DocumentImpl *document();
khtml::RenderObject *renderer();
+ void paint(QPainter *, const QRect &);
// Used internally, but need to be public because they are used by non-member functions.
@@ -142,6 +143,8 @@ private:
KWQSignal _started;
KWQSignal _completed;
KWQSignal _completedWithBool;
+
+ bool _needsToSetWidgetsAside;
static QPtrList<KWQKHTMLPartImpl> &mutableInstances();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index f922a65..e330916 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -91,6 +91,7 @@ KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
, _started(p, SIGNAL(started(KIO::Job *)))
, _completed(p, SIGNAL(completed()))
, _completedWithBool(p, SIGNAL(completed(bool)))
+ , _needsToSetWidgetsAside(false)
{
mutableInstances().prepend(this);
d->m_redirectionTimer.setMonitor(redirectionTimerMonitor, this);
@@ -390,8 +391,22 @@ void KWQKHTMLPartImpl::layout()
{
// Since not all widgets will get a print call, it's important to move them away
// so that they won't linger in an old position left over from a previous print.
+ _needsToSetWidgetsAside = true;
+}
+
+void KWQKHTMLPartImpl::paint(QPainter *p, const QRect &rect)
+{
+#ifdef DEBUG_DRAWING
+ [[NSColor redColor] set];
+ [NSBezierPath fillRect:[view()->getView() visibleRect]];
+#endif
+
if (renderer()) {
- moveWidgetsAside(renderer());
+ if (_needsToSetWidgetsAside) {
+ moveWidgetsAside(renderer());
+ _needsToSetWidgetsAside = false;
+ }
+ renderer()->layer()->paint(p, rect.x(), rect.y(), rect.width(), rect.height());
}
}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index a428d0d..c1ac13b 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -118,6 +118,7 @@ public:
DOM::DocumentImpl *document();
khtml::RenderObject *renderer();
+ void paint(QPainter *, const QRect &);
// Used internally, but need to be public because they are used by non-member functions.
@@ -142,6 +143,8 @@ private:
KWQSignal _started;
KWQSignal _completed;
KWQSignal _completedWithBool;
+
+ bool _needsToSetWidgetsAside;
static QPtrList<KWQKHTMLPartImpl> &mutableInstances();
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index f922a65..e330916 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -91,6 +91,7 @@ KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
, _started(p, SIGNAL(started(KIO::Job *)))
, _completed(p, SIGNAL(completed()))
, _completedWithBool(p, SIGNAL(completed(bool)))
+ , _needsToSetWidgetsAside(false)
{
mutableInstances().prepend(this);
d->m_redirectionTimer.setMonitor(redirectionTimerMonitor, this);
@@ -390,8 +391,22 @@ void KWQKHTMLPartImpl::layout()
{
// Since not all widgets will get a print call, it's important to move them away
// so that they won't linger in an old position left over from a previous print.
+ _needsToSetWidgetsAside = true;
+}
+
+void KWQKHTMLPartImpl::paint(QPainter *p, const QRect &rect)
+{
+#ifdef DEBUG_DRAWING
+ [[NSColor redColor] set];
+ [NSBezierPath fillRect:[view()->getView() visibleRect]];
+#endif
+
if (renderer()) {
- moveWidgetsAside(renderer());
+ if (_needsToSetWidgetsAside) {
+ moveWidgetsAside(renderer());
+ _needsToSetWidgetsAside = false;
+ }
+ renderer()->layer()->paint(p, rect.x(), rect.y(), rect.width(), rect.height());
}
}
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 2c8ec8c..c29b62c 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -215,15 +215,7 @@ using khtml::RenderPart;
- (void)drawRect:(NSRect)rect withPainter:(QPainter *)p
{
- RenderObject *renderer = part->impl->renderer();
-
-#ifdef DEBUG_DRAWING
- [[NSColor redColor] set];
- [NSBezierPath fillRect:[part->impl->view()->getView() visibleRect]];
-#endif
-
- if (renderer && renderer->layer())
- renderer->layer()->paint(p, (int)rect.origin.x, (int)rect.origin.y, (int)rect.size.width, (int)rect.size.height);
+ part->impl->paint(p, QRect(rect));
}
- (void)drawRect:(NSRect)rect
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list