| OLD | NEW |
| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 #include "web/StorageQuotaClientImpl.h" | 173 #include "web/StorageQuotaClientImpl.h" |
| 174 #include "web/ValidationMessageClientImpl.h" | 174 #include "web/ValidationMessageClientImpl.h" |
| 175 #include "web/ViewportAnchor.h" | 175 #include "web/ViewportAnchor.h" |
| 176 #include "web/WebDevToolsAgentImpl.h" | 176 #include "web/WebDevToolsAgentImpl.h" |
| 177 #include "web/WebInputEventConversion.h" | 177 #include "web/WebInputEventConversion.h" |
| 178 #include "web/WebLocalFrameImpl.h" | 178 #include "web/WebLocalFrameImpl.h" |
| 179 #include "web/WebPagePopupImpl.h" | 179 #include "web/WebPagePopupImpl.h" |
| 180 #include "web/WebPluginContainerImpl.h" | 180 #include "web/WebPluginContainerImpl.h" |
| 181 #include "web/WebRemoteFrameImpl.h" | 181 #include "web/WebRemoteFrameImpl.h" |
| 182 #include "web/WebSettingsImpl.h" | 182 #include "web/WebSettingsImpl.h" |
| 183 #include "wtf/AutoReset.h" |
| 183 #include "wtf/CurrentTime.h" | 184 #include "wtf/CurrentTime.h" |
| 184 #include "wtf/PtrUtil.h" | 185 #include "wtf/PtrUtil.h" |
| 185 #include "wtf/RefPtr.h" | 186 #include "wtf/RefPtr.h" |
| 186 #include "wtf/TemporaryChange.h" | |
| 187 #include <memory> | 187 #include <memory> |
| 188 | 188 |
| 189 #if USE(DEFAULT_RENDER_THEME) | 189 #if USE(DEFAULT_RENDER_THEME) |
| 190 #include "core/layout/LayoutThemeDefault.h" | 190 #include "core/layout/LayoutThemeDefault.h" |
| 191 #endif | 191 #endif |
| 192 | 192 |
| 193 // Get rid of WTF's pow define so we can use std::pow. | 193 // Get rid of WTF's pow define so we can use std::pow. |
| 194 #undef pow | 194 #undef pow |
| 195 #include <cmath> // for std::pow | 195 #include <cmath> // for std::pow |
| 196 | 196 |
| (...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 | 2164 |
| 2165 if (InspectorOverlay* overlay = inspectorOverlay()) { | 2165 if (InspectorOverlay* overlay = inspectorOverlay()) { |
| 2166 if (overlay->handleInputEvent(inputEvent)) | 2166 if (overlay->handleInputEvent(inputEvent)) |
| 2167 return WebInputEventResult::HandledSuppressed; | 2167 return WebInputEventResult::HandledSuppressed; |
| 2168 } | 2168 } |
| 2169 | 2169 |
| 2170 // Report the event to be NOT processed by WebKit, so that the browser can h
andle it appropriately. | 2170 // Report the event to be NOT processed by WebKit, so that the browser can h
andle it appropriately. |
| 2171 if (m_ignoreInputEvents) | 2171 if (m_ignoreInputEvents) |
| 2172 return WebInputEventResult::NotHandled; | 2172 return WebInputEventResult::NotHandled; |
| 2173 | 2173 |
| 2174 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent
, &inputEvent); | 2174 AutoReset<const WebInputEvent*> currentEventChange(&m_currentInputEvent, &in
putEvent); |
| 2175 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld(); | 2175 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld(); |
| 2176 | 2176 |
| 2177 bool isPointerLocked = false; | 2177 bool isPointerLocked = false; |
| 2178 if (WebFrameWidget* widget = mainFrameImpl()->frameWidget()) { | 2178 if (WebFrameWidget* widget = mainFrameImpl()->frameWidget()) { |
| 2179 if (WebWidgetClient* client = widget->client()) | 2179 if (WebWidgetClient* client = widget->client()) |
| 2180 isPointerLocked = client->isPointerLocked(); | 2180 isPointerLocked = client->isPointerLocked(); |
| 2181 } | 2181 } |
| 2182 | 2182 |
| 2183 if (isPointerLocked && WebInputEvent::isMouseEventType(inputEvent.type)) { | 2183 if (isPointerLocked && WebInputEvent::isMouseEventType(inputEvent.type)) { |
| 2184 pointerLockMouseEvent(inputEvent); | 2184 pointerLockMouseEvent(inputEvent); |
| (...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4566 { | 4566 { |
| 4567 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4567 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4568 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4568 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4569 if (!page()) | 4569 if (!page()) |
| 4570 return 1; | 4570 return 1; |
| 4571 | 4571 |
| 4572 return page()->deviceScaleFactor(); | 4572 return page()->deviceScaleFactor(); |
| 4573 } | 4573 } |
| 4574 | 4574 |
| 4575 } // namespace blink | 4575 } // namespace blink |
| OLD | NEW |