| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 PaintLayerCompositor* compositor() const; | 412 PaintLayerCompositor* compositor() const; |
| 413 CompositorAnimationTimeline* linkHighlightsTimeline() const { | 413 CompositorAnimationTimeline* linkHighlightsTimeline() const { |
| 414 return m_linkHighlightsTimeline.get(); | 414 return m_linkHighlightsTimeline.get(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 WebViewScheduler* scheduler() const override; | 417 WebViewScheduler* scheduler() const override; |
| 418 void setVisibilityState(WebPageVisibilityState, bool) override; | 418 void setVisibilityState(WebPageVisibilityState, bool) override; |
| 419 | 419 |
| 420 bool hasOpenedPopup() const { return m_pagePopup.get(); } | 420 bool hasOpenedPopup() const { return m_pagePopup.get(); } |
| 421 | 421 |
| 422 // Returns true if the event leads to scrolling. | |
| 423 static bool mapKeyCodeForScroll(int keyCode, | |
| 424 ScrollDirectionPhysical*, | |
| 425 ScrollGranularity*); | |
| 426 | |
| 427 // Called by a full frame plugin inside this view to inform it that its | 422 // Called by a full frame plugin inside this view to inform it that its |
| 428 // zoom level has been updated. The plugin should only call this function | 423 // zoom level has been updated. The plugin should only call this function |
| 429 // if the zoom change was triggered by the browser, it's only needed in case | 424 // if the zoom change was triggered by the browser, it's only needed in case |
| 430 // a plugin can update its own zoom, say because of its own UI. | 425 // a plugin can update its own zoom, say because of its own UI. |
| 431 void fullFramePluginZoomLevelChanged(double zoomLevel); | 426 void fullFramePluginZoomLevelChanged(double zoomLevel); |
| 432 | 427 |
| 433 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, | 428 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, |
| 434 const WebRect& blockRect, | 429 const WebRect& blockRect, |
| 435 float padding, | 430 float padding, |
| 436 float defaultScaleWhenAlreadyLegible, | 431 float defaultScaleWhenAlreadyLegible, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 friend class WebView; // So WebView::Create can call our constructor | 541 friend class WebView; // So WebView::Create can call our constructor |
| 547 friend class WebViewFrameWidget; | 542 friend class WebViewFrameWidget; |
| 548 friend class WTF::RefCounted<WebViewImpl>; | 543 friend class WTF::RefCounted<WebViewImpl>; |
| 549 friend void setCurrentInputEventForTest(const WebInputEvent*); | 544 friend void setCurrentInputEventForTest(const WebInputEvent*); |
| 550 | 545 |
| 551 enum DragAction { DragEnter, DragOver }; | 546 enum DragAction { DragEnter, DragOver }; |
| 552 | 547 |
| 553 explicit WebViewImpl(WebViewClient*, WebPageVisibilityState); | 548 explicit WebViewImpl(WebViewClient*, WebPageVisibilityState); |
| 554 ~WebViewImpl() override; | 549 ~WebViewImpl() override; |
| 555 | 550 |
| 556 // Returns true if the event was actually processed. | |
| 557 bool keyEventDefault(const WebKeyboardEvent&); | |
| 558 | |
| 559 // Returns true if the view was scrolled. | |
| 560 bool scrollViewWithKeyboard(int keyCode, int modifiers); | |
| 561 | |
| 562 void hideSelectPopup(); | 551 void hideSelectPopup(); |
| 563 | 552 |
| 564 HitTestResult hitTestResultForRootFramePos(const IntPoint&); | 553 HitTestResult hitTestResultForRootFramePos(const IntPoint&); |
| 565 HitTestResult hitTestResultForViewportPos(const IntPoint&); | 554 HitTestResult hitTestResultForViewportPos(const IntPoint&); |
| 566 | 555 |
| 567 // Consolidate some common code between starting a drag over a target and | 556 // Consolidate some common code between starting a drag over a target and |
| 568 // updating a drag over a target. If we're starting a drag, |isEntering| | 557 // updating a drag over a target. If we're starting a drag, |isEntering| |
| 569 // should be true. | 558 // should be true. |
| 570 WebDragOperation dragTargetDragEnterOrOver(const WebPoint& pointInViewport, | 559 WebDragOperation dragTargetDragEnterOrOver(const WebPoint& pointInViewport, |
| 571 const WebPoint& screenPoint, | 560 const WebPoint& screenPoint, |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; | 761 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; |
| 773 }; | 762 }; |
| 774 | 763 |
| 775 // We have no ways to check if the specified WebView is an instance of | 764 // We have no ways to check if the specified WebView is an instance of |
| 776 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 765 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 777 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 766 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 778 | 767 |
| 779 } // namespace blink | 768 } // namespace blink |
| 780 | 769 |
| 781 #endif | 770 #endif |
| OLD | NEW |