| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "core/page/PagePopupSupplement.h" | 48 #include "core/page/PagePopupSupplement.h" |
| 49 #include "modules/accessibility/AXObject.h" | 49 #include "modules/accessibility/AXObject.h" |
| 50 #include "modules/accessibility/AXObjectCacheImpl.h" | 50 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 51 #include "platform/EventDispatchForbiddenScope.h" | 51 #include "platform/EventDispatchForbiddenScope.h" |
| 52 #include "platform/LayoutTestSupport.h" | 52 #include "platform/LayoutTestSupport.h" |
| 53 #include "platform/ScriptForbiddenScope.h" | 53 #include "platform/ScriptForbiddenScope.h" |
| 54 #include "platform/heap/Handle.h" | 54 #include "platform/heap/Handle.h" |
| 55 #include "platform/tracing/TraceEvent.h" | 55 #include "platform/tracing/TraceEvent.h" |
| 56 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" | 56 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" |
| 57 #include "public/platform/WebCursorInfo.h" | 57 #include "public/platform/WebCursorInfo.h" |
| 58 #include "public/platform/WebFloatRect.h" |
| 58 #include "public/web/WebAXObject.h" | 59 #include "public/web/WebAXObject.h" |
| 59 #include "public/web/WebFrameClient.h" | 60 #include "public/web/WebFrameClient.h" |
| 60 #include "public/web/WebViewClient.h" | 61 #include "public/web/WebViewClient.h" |
| 61 #include "public/web/WebWidgetClient.h" | 62 #include "public/web/WebWidgetClient.h" |
| 62 #include "web/WebInputEventConversion.h" | 63 #include "web/WebInputEventConversion.h" |
| 63 #include "web/WebLocalFrameImpl.h" | 64 #include "web/WebLocalFrameImpl.h" |
| 64 #include "web/WebSettingsImpl.h" | 65 #include "web/WebSettingsImpl.h" |
| 65 #include "web/WebViewImpl.h" | 66 #include "web/WebViewImpl.h" |
| 66 #include "wtf/PtrUtil.h" | 67 #include "wtf/PtrUtil.h" |
| 67 | 68 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 89 IntRect viewportToScreen(const IntRect& rect, | 90 IntRect viewportToScreen(const IntRect& rect, |
| 90 const Widget* widget) const override { | 91 const Widget* widget) const override { |
| 91 WebRect rectInScreen(rect); | 92 WebRect rectInScreen(rect); |
| 92 WebRect windowRect = m_popup->windowRectInScreen(); | 93 WebRect windowRect = m_popup->windowRectInScreen(); |
| 93 m_popup->widgetClient()->convertViewportToWindow(&rectInScreen); | 94 m_popup->widgetClient()->convertViewportToWindow(&rectInScreen); |
| 94 rectInScreen.x += windowRect.x; | 95 rectInScreen.x += windowRect.x; |
| 95 rectInScreen.y += windowRect.y; | 96 rectInScreen.y += windowRect.y; |
| 96 return rectInScreen; | 97 return rectInScreen; |
| 97 } | 98 } |
| 98 | 99 |
| 100 float windowToViewportScalar(const float scalarValue) const override { |
| 101 WebFloatRect viewportRect(0, 0, scalarValue, 0); |
| 102 m_popup->widgetClient()->convertWindowToViewport(&viewportRect); |
| 103 return viewportRect.width; |
| 104 } |
| 105 |
| 99 void addMessageToConsole(LocalFrame*, | 106 void addMessageToConsole(LocalFrame*, |
| 100 MessageSource, | 107 MessageSource, |
| 101 MessageLevel, | 108 MessageLevel, |
| 102 const String& message, | 109 const String& message, |
| 103 unsigned lineNumber, | 110 unsigned lineNumber, |
| 104 const String&, | 111 const String&, |
| 105 const String&) override { | 112 const String&) override { |
| 106 #ifndef NDEBUG | 113 #ifndef NDEBUG |
| 107 fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", lineNumber, | 114 fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", lineNumber, |
| 108 message.utf8().data()); | 115 message.utf8().data()); |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 // A WebPagePopupImpl instance usually has two references. | 589 // A WebPagePopupImpl instance usually has two references. |
| 583 // - One owned by the instance itself. It represents the visible widget. | 590 // - One owned by the instance itself. It represents the visible widget. |
| 584 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 591 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 585 // WebPagePopupImpl to close. | 592 // WebPagePopupImpl to close. |
| 586 // We need them because the closing operation is asynchronous and the widget | 593 // We need them because the closing operation is asynchronous and the widget |
| 587 // can be closed while the WebViewImpl is unaware of it. | 594 // can be closed while the WebViewImpl is unaware of it. |
| 588 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 595 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 589 } | 596 } |
| 590 | 597 |
| 591 } // namespace blink | 598 } // namespace blink |
| OLD | NEW |