2011-04-25 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2011 00:04:06 +0000 (00:04 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2011 00:04:06 +0000 (00:04 +0000)
        Re-land changes to ValidationMessage.

        * html/ValidationMessage.cpp:
        (WebCore::ValidationMessage::setMessage):
        (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
        (WebCore::ValidationMessage::requestToHideMessage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84850 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/ValidationMessage.cpp

index 9feb1def5c1fb8a8d212b46d8e091da65a3da183..8abb062001359dc90af40c10eb1879b63efd1be0 100644 (file)
@@ -1,3 +1,12 @@
+2011-04-25  Adam Barth  <abarth@webkit.org>
+
+        Re-land changes to ValidationMessage.
+
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::setMessage):
+        (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
+        (WebCore::ValidationMessage::requestToHideMessage):
+
 2011-04-25  Ojan Vafai  <ojan@chromium.org>
 
         Reviewed by James Robinson.
index 48912d7371c2e05ec0194325679ef645e2f4b430..215da90fae6ef9407de958e4d5ed0e91dae46a48 100644 (file)
@@ -70,9 +70,9 @@ void ValidationMessage::setMessage(const String& message)
     ASSERT(!message.isEmpty());
     m_message = message;
     if (!m_bubble)
-        m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::buildBubbleTree));
+        m_timer = adoptPtr(new Timer<ValidationMessage>(this, &ValidationMessage::buildBubbleTree));
     else
-        m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::setMessageDOMAndStartTimer));
+        m_timer = adoptPtr(new Timer<ValidationMessage>(this, &ValidationMessage::setMessageDOMAndStartTimer));
     m_timer->startOneShot(0);
 }
 
@@ -99,7 +99,7 @@ void ValidationMessage::setMessageDOMAndStartTimer(Timer<ValidationMessage>*)
     if (magnification <= 0)
         m_timer.clear();
     else {
-        m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree));
+        m_timer = adoptPtr(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree));
         m_timer->startOneShot(max(5.0, static_cast<double>(m_message.length()) * magnification / 1000));
     }
 }
@@ -148,7 +148,7 @@ void ValidationMessage::buildBubbleTree(Timer<ValidationMessage>*)
 void ValidationMessage::requestToHideMessage()
 {
     // We must not modify the DOM tree in this context by the same reason as setMessage().
-    m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree));
+    m_timer = adoptPtr(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree));
     m_timer->startOneShot(0);
 }