[haiku-webkit-commits] r576 - webkit/trunk/WebKit/haiku/WebPositive

  • From: noreply@xxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Wed, 2 Mar 2011 19:15:58 +0100 (CET)

Author: phoudoin
Date: Wed Mar  2 19:15:57 2011
New Revision: 576
URL: http://webpositive.haiku-os.org/changeset/576

Log:
Fix why escape wasn't closing the find panel as expected (#75).
Fix fullscreen icon layout spacing issue (#76).

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Wed Jan 12 
01:16:30 2011        (r575)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp     Wed Mar  2 
19:15:57 2011        (r576)
@@ -466,11 +466,11 @@
                new BMessage(TOGGLE_FULLSCREEN));
        
toggleFullscreenButton->SetBackgroundMode(BitmapButton::MENUBAR_BACKGROUND);
 
-       BGroupLayout* menuBarGroup = BLayoutBuilder::Group<>(B_HORIZONTAL)
+       BGroupLayout* menuBarGroup = BLayoutBuilder::Group<>(B_HORIZONTAL, 0.0)
                .Add(mainMenu)
                .Add(toggleFullscreenButton, 0.0f)
        ;
-       
+
        // Layout
        AddChild(BLayoutBuilder::Group<>(B_VERTICAL, 0.0)
 #if !INTEGRATE_MENU_INTO_TAB_BAR
@@ -488,7 +488,7 @@
        mainMenu->SetViewColor(B_TRANSPARENT_COLOR);
 
        fURLInputGroup->MakeFocus(true);
-       
+
        fMenuGroup = menuBarGroup;
        fTabGroup = fTabManager->TabGroup()->GetLayout();
        fNavigationGroup = navigationGroup;
@@ -547,13 +547,6 @@
                } else if (bytes[0] == B_RIGHT_ARROW && modifierKeys == 
B_COMMAND_KEY) {
                        PostMessage(GO_FORWARD);
                        return;
-               } else if (bytes[0] == B_ESCAPE) {
-                       // Let the URL input handle escape when it is the target
-                       if (target != fURLInputGroup->TextView()) {
-                               // Otherwise do a stop
-                               PostMessage(STOP);
-                               return;
-                       }
                } else if (bytes[0] == B_FUNCTION_KEY) {
                        // Some function key Firefox compatibility
                        int32 key;
@@ -591,6 +584,10 @@
                                _InvokeButtonVisibly(fFindCloseButton);
                                return;
                        }
+               } else if (bytes[0] == B_ESCAPE) {
+                       // Default escape key behavior:
+                       PostMessage(STOP);
+                       return;
                }
        }
        if (message->what == B_MOUSE_MOVED || message->what == B_MOUSE_DOWN

Other related posts: