[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 12:29:39 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d1db06cc755e6eaf14741e7c637104cfcb1a0fbf
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 24 19:52:25 2010 +0000
2010-08-24 Hans Wennborg <hans at chromium.org>
Reviewed by Steve Block.
Remove null-checks from DeviceOrientationController
https://bugs.webkit.org/show_bug.cgi?id=44504
Remove checks for m_client being NULL from DeviceOrientationController.
It will never be NULL, and this is checked by an ASSERT on construction.
Will be covered by layout tests for device orientation.
* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::timerFired):
(WebCore::DeviceOrientationController::addListener):
(WebCore::DeviceOrientationController::removeListener):
(WebCore::DeviceOrientationController::removeAllListeners):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6e42fd7..ce965e6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-24 Hans Wennborg <hans at chromium.org>
+
+ Reviewed by Steve Block.
+
+ Remove null-checks from DeviceOrientationController
+ https://bugs.webkit.org/show_bug.cgi?id=44504
+
+ Remove checks for m_client being NULL from DeviceOrientationController.
+ It will never be NULL, and this is checked by an ASSERT on construction.
+
+ Will be covered by layout tests for device orientation.
+
+ * dom/DeviceOrientationController.cpp:
+ (WebCore::DeviceOrientationController::timerFired):
+ (WebCore::DeviceOrientationController::addListener):
+ (WebCore::DeviceOrientationController::removeListener):
+ (WebCore::DeviceOrientationController::removeAllListeners):
+
2010-08-24 Stephen White <senorblanco at chromium.org>
Reviewed by Kenneth Russell.
diff --git a/WebCore/dom/DeviceOrientationController.cpp b/WebCore/dom/DeviceOrientationController.cpp
index 111577f..a744366 100644
--- a/WebCore/dom/DeviceOrientationController.cpp
+++ b/WebCore/dom/DeviceOrientationController.cpp
@@ -44,9 +44,9 @@ DeviceOrientationController::DeviceOrientationController(Page* page, DeviceOrien
void DeviceOrientationController::timerFired(Timer<DeviceOrientationController>* timer)
{
ASSERT_UNUSED(timer, timer == &m_timer);
- ASSERT(!m_client || m_client->lastOrientation());
+ ASSERT(m_client->lastOrientation());
- RefPtr<DeviceOrientation> orientation = m_client ? m_client->lastOrientation() : DeviceOrientation::create();
+ RefPtr<DeviceOrientation> orientation = m_client->lastOrientation();
RefPtr<DeviceOrientationEvent> event = DeviceOrientationEvent::create(eventNames().deviceorientationEvent, orientation.get());
Vector<DOMWindow*> listenersVector;
@@ -58,11 +58,10 @@ void DeviceOrientationController::timerFired(Timer<DeviceOrientationController>*
void DeviceOrientationController::addListener(DOMWindow* window)
{
- // If no client is present, we should fire an event with all parameters null. If
- // the client already has an orientation, we should fire an event with that
- // orientation. In both cases, the event is fired asynchronously, but without
+ // If the client already has an orientation, we should fire an event with that
+ // orientation. The event is fired asynchronously, but without
// waiting for the client to get a new orientation.
- if (!m_client || m_client->lastOrientation()) {
+ if (m_client->lastOrientation()) {
m_newListeners.add(window);
if (!m_timer.isActive())
m_timer.startOneShot(0);
@@ -71,7 +70,7 @@ void DeviceOrientationController::addListener(DOMWindow* window)
// The client must not call back synchronously.
bool wasEmpty = m_listeners.isEmpty();
m_listeners.add(window);
- if (wasEmpty && m_client)
+ if (wasEmpty)
m_client->startUpdating();
}
@@ -79,7 +78,7 @@ void DeviceOrientationController::removeListener(DOMWindow* window)
{
m_listeners.remove(window);
m_newListeners.remove(window);
- if (m_listeners.isEmpty() && m_client)
+ if (m_listeners.isEmpty())
m_client->stopUpdating();
}
@@ -91,7 +90,7 @@ void DeviceOrientationController::removeAllListeners(DOMWindow* window)
m_listeners.removeAll(window);
m_newListeners.remove(window);
- if (m_listeners.isEmpty() && m_client)
+ if (m_listeners.isEmpty())
m_client->stopUpdating();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list