[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:13:27 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 715ae8f67e7dddd4f7f885a501af97343e20db5e
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 18 08:41:19 2003 +0000
Fix for 3487136, marquees reset when you return to a page in the b/f cache. This patch makes
marquees suspend and resume properly, so they pick up animating where they left off.
Reviewed by mjs
* khtml/rendering/render_layer.cpp:
(RenderLayer::suspendMarquees):
(m_direction):
(Marquee::start):
(Marquee::suspend):
* khtml/rendering/render_layer.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::clearTimers):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4c3276e..50f7120 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-11-17 David Hyatt <hyatt at apple.com>
+
+ Fix for 3487136, marquees reset when you return to a page in the b/f cache. This patch makes
+ marquees suspend and resume properly, so they pick up animating where they left off.
+
+ Reviewed by mjs
+
+ * khtml/rendering/render_layer.cpp:
+ (RenderLayer::suspendMarquees):
+ (m_direction):
+ (Marquee::start):
+ (Marquee::suspend):
+ * khtml/rendering/render_layer.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::clearTimers):
+
2003-11-17 Maciej Stachowiak <mjs at apple.com>
Merged from khtml:
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index c44133e..27204aa 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -1214,13 +1214,13 @@ void RenderLayer::styleChanged()
}
}
-void RenderLayer::stopMarquees()
+void RenderLayer::suspendMarquees()
{
if (m_marquee)
- m_marquee->stop();
+ m_marquee->suspend();
for (RenderLayer* curr = firstChild(); curr; curr = curr->nextSibling())
- curr->stopMarquees();
+ curr->suspendMarquees();
}
// --------------------------------------------------------------------------
@@ -1228,7 +1228,7 @@ void RenderLayer::stopMarquees()
Marquee::Marquee(RenderLayer* l)
:m_layer(l), m_currentLoop(0), m_timerId(0), m_start(0), m_end(0), m_speed(0), m_unfurlPos(0), m_reset(false),
- m_whiteSpace(NORMAL), m_direction(MAUTO)
+ m_suspended(false), m_whiteSpace(NORMAL), m_direction(MAUTO)
{
}
@@ -1327,31 +1327,34 @@ void Marquee::start()
if (m_timerId)
return;
- if (isUnfurlMarquee()) {
- bool forward = direction() == MDOWN || direction() == MRIGHT;
- bool isReversed = (forward && m_currentLoop % 2) || (!forward && !(m_currentLoop % 2));
- m_unfurlPos = isReversed ? m_end : m_start;
- m_layer->renderer()->setChildNeedsLayout(true);
- }
- else {
- if (isHorizontal())
- m_layer->scrollToOffset(m_start, 0, false, false);
- else
- m_layer->scrollToOffset(0, m_start, false, false);
+ if (!m_suspended) {
+ if (isUnfurlMarquee()) {
+ bool forward = direction() == MDOWN || direction() == MRIGHT;
+ bool isReversed = (forward && m_currentLoop % 2) || (!forward && !(m_currentLoop % 2));
+ m_unfurlPos = isReversed ? m_end : m_start;
+ m_layer->renderer()->setChildNeedsLayout(true);
+ }
+ else {
+ if (isHorizontal())
+ m_layer->scrollToOffset(m_start, 0, false, false);
+ else
+ m_layer->scrollToOffset(0, m_start, false, false);
+ }
}
+ else
+ m_suspended = false;
m_timerId = startTimer(speed());
}
-void Marquee::stop()
+void Marquee::suspend()
{
- m_currentLoop = 0;
- m_reset = false;
-
if (m_timerId) {
killTimer(m_timerId);
m_timerId = 0;
}
+
+ m_suspended = true;
}
void Marquee::updateMarqueePosition()
diff --git a/WebCore/khtml/rendering/render_layer.h b/WebCore/khtml/rendering/render_layer.h
index edd4dce..16c138d 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -103,7 +103,7 @@ public:
void setEnd(int end) { m_end = end; }
void start();
- void stop();
+ void suspend();
void updateMarqueeStyle();
void updateMarqueePosition();
@@ -118,6 +118,7 @@ private:
int m_speed;
int m_unfurlPos;
bool m_reset;
+ bool m_suspended;
EWhiteSpace m_whiteSpace : 2;
EMarqueeDirection m_direction : 4;
};
@@ -149,8 +150,8 @@ public:
void styleChanged();
Marquee* marquee() const { return m_marquee; }
- void stopMarquees();
-
+ void suspendMarquees();
+
#if APPLE_CHANGES
bool isTransparent();
RenderLayer* transparentAncestor();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 2435362..22fcf23 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1831,7 +1831,7 @@ void KWQKHTMLPart::clearTimers(KHTMLView *view)
if (view->part()) {
DocumentImpl* document = view->part()->xmlDocImpl();
if (document && document->renderer() && document->renderer()->layer())
- document->renderer()->layer()->stopMarquees();
+ document->renderer()->layer()->suspendMarquees();
}
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list