[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:45:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d8c534a0e0fd4548652c522f2904097457ecf974
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Sep 28 07:39:51 2002 +0000
WebCore:
- fixed 2886111 -- changing font or size preference causes open
windows to redraw incorrectly
* khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
Fix logic about when a recalc of the minWidth and maxWidth is needed.
Fixed bug where changing the text size multiplier would cause the
window to redraw twice -- once with the text size changed, and then
later with the layout changed.
* khtml/khtmlview.h: Added unscheduleRelayout.
* khtml/khtmlview.cpp: (KHTMLView::unscheduleRelayout): Added.
* kwq/KWQKHTMLPartImpl.h: Added forceLayout.
* kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::forceLayout): Call
both layout and unscheduleRelayout.
* kwq/WebCoreBridge.h: Add setNeedsLayout.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge forceLayout]): Call KWQKHTMLPartImpl::forceLayout.
(-[WebCoreBridge setTextSizeMultiplier:]): Call forceLayout.
WebKit:
* WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setNeedsLayout]): Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 9001ef0..e9871c3 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-09-28 Darin Adler <darin at apple.com>
+
+ - fixed 2886111 -- changing font or size preference causes open
+ windows to redraw incorrectly
+
+ * khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
+ Fix logic about when a recalc of the minWidth and maxWidth is needed.
+
+ Fixed bug where changing the text size multiplier would cause the
+ window to redraw twice -- once with the text size changed, and then
+ later with the layout changed.
+
+ * khtml/khtmlview.h: Added unscheduleRelayout.
+ * khtml/khtmlview.cpp: (KHTMLView::unscheduleRelayout): Added.
+
+ * kwq/KWQKHTMLPartImpl.h: Added forceLayout.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::forceLayout): Call
+ both layout and unscheduleRelayout.
+
+ * kwq/WebCoreBridge.h: Add setNeedsLayout.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge forceLayout]): Call KWQKHTMLPartImpl::forceLayout.
+ (-[WebCoreBridge setTextSizeMultiplier:]): Call forceLayout.
+
2002-09-27 Darin Adler <darin at apple.com>
* khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 9001ef0..e9871c3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2002-09-28 Darin Adler <darin at apple.com>
+
+ - fixed 2886111 -- changing font or size preference causes open
+ windows to redraw incorrectly
+
+ * khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
+ Fix logic about when a recalc of the minWidth and maxWidth is needed.
+
+ Fixed bug where changing the text size multiplier would cause the
+ window to redraw twice -- once with the text size changed, and then
+ later with the layout changed.
+
+ * khtml/khtmlview.h: Added unscheduleRelayout.
+ * khtml/khtmlview.cpp: (KHTMLView::unscheduleRelayout): Added.
+
+ * kwq/KWQKHTMLPartImpl.h: Added forceLayout.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::forceLayout): Call
+ both layout and unscheduleRelayout.
+
+ * kwq/WebCoreBridge.h: Add setNeedsLayout.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge forceLayout]): Call KWQKHTMLPartImpl::forceLayout.
+ (-[WebCoreBridge setTextSizeMultiplier:]): Call forceLayout.
+
2002-09-27 Darin Adler <darin at apple.com>
* khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 9001ef0..e9871c3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2002-09-28 Darin Adler <darin at apple.com>
+
+ - fixed 2886111 -- changing font or size preference causes open
+ windows to redraw incorrectly
+
+ * khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
+ Fix logic about when a recalc of the minWidth and maxWidth is needed.
+
+ Fixed bug where changing the text size multiplier would cause the
+ window to redraw twice -- once with the text size changed, and then
+ later with the layout changed.
+
+ * khtml/khtmlview.h: Added unscheduleRelayout.
+ * khtml/khtmlview.cpp: (KHTMLView::unscheduleRelayout): Added.
+
+ * kwq/KWQKHTMLPartImpl.h: Added forceLayout.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::forceLayout): Call
+ both layout and unscheduleRelayout.
+
+ * kwq/WebCoreBridge.h: Add setNeedsLayout.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge forceLayout]): Call KWQKHTMLPartImpl::forceLayout.
+ (-[WebCoreBridge setTextSizeMultiplier:]): Call forceLayout.
+
2002-09-27 Darin Adler <darin at apple.com>
* khtml/rendering/render_table.cpp: (RenderTable::addColInfo):
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 4365b7d..86ff38c 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -1497,6 +1497,19 @@ void KHTMLView::scheduleRelayout()
d->timerId = startTimer( parsing ? 1000 : 0 );
}
+#if APPLE_CHANGES
+
+void KHTMLView::unscheduleRelayout()
+{
+ if (!d->timerId)
+ return;
+
+ killTimer(d->timerId);
+ d->timerId = 0;
+}
+
+#endif
+
void KHTMLView::scheduleRepaint(int x, int y, int w, int h)
{
diff --git a/WebCore/khtml/khtmlview.h b/WebCore/khtml/khtmlview.h
index 6feaaa7..f039120 100644
--- a/WebCore/khtml/khtmlview.h
+++ b/WebCore/khtml/khtmlview.h
@@ -192,6 +192,9 @@ private:
void resetCursor();
void scheduleRelayout();
+#if APPLE_CHANGES
+ void unscheduleRelayout();
+#endif
void scheduleRepaint(int x, int y, int w, int h);
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index 3904692..a469a83 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -509,21 +509,19 @@ void RenderTable::addColInfo(int _startCol, int _colSpan,
changed = true;
} else {
- if (_minSize < col->min)
- {
+ if (_minSize != col->min) {
if ( allowRecalc && col->minCell == _cell ) {
recalc = true;
- } else {
+ } else if ( _minSize < col->min ) {
col->min = _minSize;
col->minCell = _cell;
changed = true;
}
}
- if (_maxSize > col->max)
- {
+ if (_maxSize != col->max) {
if ( allowRecalc && col->maxCell == _cell ) {
recalc = true;
- } else {
+ } else if (_maxSize > col->max) {
col->max = _maxSize;
col->maxCell = _cell;
changed = true;
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 528a271..7b66a15 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -120,6 +120,7 @@ public:
DOM::DocumentImpl *document();
khtml::RenderObject *renderer();
+ void forceLayout();
void paint(QPainter *, const QRect &);
// Used internally, but need to be public because they are used by non-member functions.
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index cc67ab2..d37b16c 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -570,3 +570,11 @@ QString KWQKHTMLPartImpl::requestedURLString() const
return QString::fromNSString([[_bridge requestedURL] absoluteString]);
}
+void KWQKHTMLPartImpl::forceLayout()
+{
+ KHTMLView *v = d->m_view;
+ if (v) {
+ v->layout();
+ v->unscheduleRelayout();
+ }
+}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index 528a271..7b66a15 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -120,6 +120,7 @@ public:
DOM::DocumentImpl *document();
khtml::RenderObject *renderer();
+ void forceLayout();
void paint(QPainter *, const QRect &);
// Used internally, but need to be public because they are used by non-member functions.
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index cc67ab2..d37b16c 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -570,3 +570,11 @@ QString KWQKHTMLPartImpl::requestedURLString() const
return QString::fromNSString([[_bridge requestedURL] absoluteString]);
}
+void KWQKHTMLPartImpl::forceLayout()
+{
+ KHTMLView *v = d->m_view;
+ if (v) {
+ v->layout();
+ v->unscheduleRelayout();
+ }
+}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 36b313f..630cc92 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -192,6 +192,7 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (NSArray *)documentState;
- (void)setNeedsReapplyStyles;
+- (void)setNeedsLayout;
- (NSURL *)requestedURL;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 2ef1520..747e6d4 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -201,14 +201,7 @@ using khtml::RenderPart;
- (void)forceLayout
{
- RenderObject *renderer = part->impl->renderer();
- if (renderer) {
- renderer->setLayouted(false);
- }
- KHTMLView *view = part->impl->view();
- if (view) {
- view->layout();
- }
+ part->impl->forceLayout();
}
- (void)drawRect:(NSRect)rect withPainter:(QPainter *)p
@@ -495,7 +488,14 @@ using khtml::RenderPart;
- (void)setTextSizeMultiplier:(float)multiplier
{
- part->setZoomFactor((int)rint(multiplier * 100));
+ int newZoomFactor = (int)rint(multiplier * 100);
+ if (part->zoomFactor() == newZoomFactor) {
+ return;
+ }
+ part->setZoomFactor(newZoomFactor);
+ // setZoomFactor will trigger a timed layout, but we want to do the layout before
+ // we do any drawing. This takes care of that. Without this we redraw twice.
+ [self setNeedsLayout];
}
- (CFStringEncoding)textEncoding
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index cba23b4..f14c466 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,7 @@
+2002-09-28 Darin Adler <darin at apple.com>
+
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setNeedsLayout]): Added.
+
2002-09-27 Chris Blumenberg <cblu at apple.com>
Fixed KJS crasher caused by nil plug-in returned from WebPlugin.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index cba23b4..f14c466 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,7 @@
+2002-09-28 Darin Adler <darin at apple.com>
+
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setNeedsLayout]): Added.
+
2002-09-27 Chris Blumenberg <cblu at apple.com>
Fixed KJS crasher caused by nil plug-in returned from WebPlugin.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 038c469..fd66706 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -387,6 +387,13 @@
}
}
+- (void)setNeedsLayout
+{
+ NSView <WebDocumentView> *view = [[frame webView] documentView];
+ [view setNeedsLayout:YES];
+ [view setNeedsDisplay:YES];
+}
+
- (NSURL *)requestedURL
{
return [[[self dataSource] request] URL];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list