Title: [153469] trunk/Source/WebCore
Revision
153469
Author
[email protected]
Date
2013-07-30 06:49:06 -0700 (Tue, 30 Jul 2013)

Log Message

Remove using namespace std from SpatialNavigation
https://bugs.webkit.org/show_bug.cgi?id=119242

Reviewed by Antonio Gomes.

"using namespace" statements in headers are dangerous and should be
avoided. check-webkit-style has been changed to flag them as an error
since r152719. Use explicit std:: qualifiers instead.

No behavior change, no new tests needed.

* page/SpatialNavigation.cpp:
(WebCore::scrollInDirection):
* page/SpatialNavigation.h:
(WebCore::maxDistance):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153468 => 153469)


--- trunk/Source/WebCore/ChangeLog	2013-07-30 13:38:20 UTC (rev 153468)
+++ trunk/Source/WebCore/ChangeLog	2013-07-30 13:49:06 UTC (rev 153469)
@@ -1,3 +1,21 @@
+2013-07-30  Kwang Yul Seo  <[email protected]>
+
+        Remove using namespace std from SpatialNavigation
+        https://bugs.webkit.org/show_bug.cgi?id=119242
+
+        Reviewed by Antonio Gomes.
+
+        "using namespace" statements in headers are dangerous and should be
+        avoided. check-webkit-style has been changed to flag them as an error
+        since r152719. Use explicit std:: qualifiers instead.
+
+        No behavior change, no new tests needed.
+
+        * page/SpatialNavigation.cpp:
+        (WebCore::scrollInDirection):
+        * page/SpatialNavigation.h:
+        (WebCore::maxDistance):
+
 2013-07-30  Simon Hausmann  <[email protected]>
 
         [Qt][Win] Extend disabling of whole-program-optimizations to MSVC 2012

Modified: trunk/Source/WebCore/page/SpatialNavigation.cpp (153468 => 153469)


--- trunk/Source/WebCore/page/SpatialNavigation.cpp	2013-07-30 13:38:20 UTC (rev 153468)
+++ trunk/Source/WebCore/page/SpatialNavigation.cpp	2013-07-30 13:49:06 UTC (rev 153469)
@@ -378,18 +378,18 @@
         LayoutUnit dy = 0;
         switch (direction) {
         case FocusDirectionLeft:
-            dx = - min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollLeft());
+            dx = - std::min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollLeft());
             break;
         case FocusDirectionRight:
             ASSERT(container->renderBox()->scrollWidth() > (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
-            dx = min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollWidth() - (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
+            dx = std::min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollWidth() - (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
             break;
         case FocusDirectionUp:
-            dy = - min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollTop());
+            dy = - std::min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollTop());
             break;
         case FocusDirectionDown:
             ASSERT(container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
-            dy = min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
+            dy = std::min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
             break;
         default:
             ASSERT_NOT_REACHED();

Modified: trunk/Source/WebCore/page/SpatialNavigation.h (153468 => 153469)


--- trunk/Source/WebCore/page/SpatialNavigation.h	2013-07-30 13:38:20 UTC (rev 153468)
+++ trunk/Source/WebCore/page/SpatialNavigation.h	2013-07-30 13:49:06 UTC (rev 153469)
@@ -36,11 +36,9 @@
 class IntRect;
 class RenderObject;
 
-using namespace std;
-
 inline long long maxDistance()
 {
-    return numeric_limits<long long>::max();
+    return std::numeric_limits<long long>::max();
 }
 
 inline int fudgeFactor()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to