Title: [279379] trunk/Source/WebCore
Revision
279379
Author
[email protected]
Date
2021-06-29 11:55:06 -0700 (Tue, 29 Jun 2021)

Log Message

Fix more -Wreturn-type warnings
https://bugs.webkit.org/show_bug.cgi?id=227497

Unreviewed. This is getting stupid.

Patch by Michael Catanzaro <[email protected]> on 2021-06-29

* page/EventHandler.cpp:
(WebCore::EventHandler::scrollDistance):
(WebCore::EventHandler::handleKeyboardScrolling):
* page/KeyboardScroll.cpp:
(WebCore::unitVectorForScrollDirection):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (279378 => 279379)


--- trunk/Source/WebCore/ChangeLog	2021-06-29 18:41:28 UTC (rev 279378)
+++ trunk/Source/WebCore/ChangeLog	2021-06-29 18:55:06 UTC (rev 279379)
@@ -1,3 +1,16 @@
+2021-06-29  Michael Catanzaro  <[email protected]>
+
+        Fix more -Wreturn-type warnings
+        https://bugs.webkit.org/show_bug.cgi?id=227497
+
+        Unreviewed. This is getting stupid.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::scrollDistance):
+        (WebCore::EventHandler::handleKeyboardScrolling):
+        * page/KeyboardScroll.cpp:
+        (WebCore::unitVectorForScrollDirection):
+
 2021-06-29  Rob Buis  <[email protected]>
 
         Nullptr crash in HTMLStackItem::create via DocumentFragment::parseHTML

Modified: trunk/Source/WebCore/page/EventHandler.cpp (279378 => 279379)


--- trunk/Source/WebCore/page/EventHandler.cpp	2021-06-29 18:41:28 UTC (rev 279378)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2021-06-29 18:55:06 UTC (rev 279379)
@@ -4252,6 +4252,8 @@
     case ScrollGranularity::ScrollByPixel:
         return scrollbar->pixelStep();
     }
+
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 bool EventHandler::handleKeyboardScrolling(KeyboardEvent& event)
@@ -4289,6 +4291,7 @@
         case Key::Space:
             return ScrollGranularity::ScrollByPage;
         };
+        RELEASE_ASSERT_NOT_REACHED();
     }();
 
     auto direction = [&] {
@@ -4304,6 +4307,7 @@
         case Key::Space:
             return event.shiftKey() ? ScrollDirection::ScrollUp : ScrollDirection::ScrollDown;
         }
+        RELEASE_ASSERT_NOT_REACHED();
     }();
 
     return EventHandler::scrollRecursively(direction, granularity, nullptr);

Modified: trunk/Source/WebCore/page/KeyboardScroll.cpp (279378 => 279379)


--- trunk/Source/WebCore/page/KeyboardScroll.cpp	2021-06-29 18:41:28 UTC (rev 279378)
+++ trunk/Source/WebCore/page/KeyboardScroll.cpp	2021-06-29 18:55:06 UTC (rev 279379)
@@ -40,6 +40,8 @@
     case ScrollDirection::ScrollRight:
         return { 1, 0 };
     }
+
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to