Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 23600014: Rename OS(UNIX) to OS(POSIX) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/wtf/ByteOrder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 closePagePopup(m_pagePopup.get()); 551 closePagePopup(m_pagePopup.get());
552 } 552 }
553 553
554 // Dispatch the contextmenu event regardless of if the click was swallowed. 554 // Dispatch the contextmenu event regardless of if the click was swallowed.
555 // On Windows, we handle it on mouse up, not down. 555 // On Windows, we handle it on mouse up, not down.
556 #if OS(MACOSX) 556 #if OS(MACOSX)
557 if (event.button == WebMouseEvent::ButtonRight 557 if (event.button == WebMouseEvent::ButtonRight
558 || (event.button == WebMouseEvent::ButtonLeft 558 || (event.button == WebMouseEvent::ButtonLeft
559 && event.modifiers & WebMouseEvent::ControlKey)) 559 && event.modifiers & WebMouseEvent::ControlKey))
560 mouseContextMenu(event); 560 mouseContextMenu(event);
561 #elif OS(UNIX) 561 #elif OS(POSIX)
562 if (event.button == WebMouseEvent::ButtonRight) 562 if (event.button == WebMouseEvent::ButtonRight)
563 mouseContextMenu(event); 563 mouseContextMenu(event);
564 #endif 564 #endif
565 } 565 }
566 566
567 void WebViewImpl::mouseContextMenu(const WebMouseEvent& event) 567 void WebViewImpl::mouseContextMenu(const WebMouseEvent& event)
568 { 568 {
569 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 569 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
570 return; 570 return;
571 571
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 return false; 930 return false;
931 931
932 EventHandler* handler = frame->eventHandler(); 932 EventHandler* handler = frame->eventHandler();
933 if (!handler) 933 if (!handler)
934 return keyEventDefault(event); 934 return keyEventDefault(event);
935 935
936 #if !OS(MACOSX) 936 #if !OS(MACOSX)
937 const WebInputEvent::Type contextMenuTriggeringEventType = 937 const WebInputEvent::Type contextMenuTriggeringEventType =
938 #if OS(WIN) 938 #if OS(WIN)
939 WebInputEvent::KeyUp; 939 WebInputEvent::KeyUp;
940 #elif OS(UNIX) 940 #elif OS(POSIX)
941 WebInputEvent::RawKeyDown; 941 WebInputEvent::RawKeyDown;
942 #endif 942 #endif
943 943
944 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS; 944 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS;
945 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window sKeyCode == VKEY_F10; 945 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window sKeyCode == VKEY_F10;
946 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) { 946 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) {
947 sendContextMenuEvent(event); 947 sendContextMenuEvent(event);
948 return true; 948 return true;
949 } 949 }
950 #endif // !OS(MACOSX) 950 #endif // !OS(MACOSX)
(...skipping 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after
4114 // the initial viewport width. 4114 // the initial viewport width.
4115 // 2. The author has disabled viewport zoom. 4115 // 2. The author has disabled viewport zoom.
4116 4116
4117 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4117 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4118 4118
4119 return fixedLayoutSize().width == m_size.width 4119 return fixedLayoutSize().width == m_size.width
4120 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4120 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4121 } 4121 }
4122 4122
4123 } // namespace WebKit 4123 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/wtf/ByteOrder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698