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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 bool hasTouchEventHandlersAt(const WebPoint&) override; | 145 bool hasTouchEventHandlersAt(const WebPoint&) override; |
146 | 146 |
147 void applyViewportDeltas(const WebFloatSize& visualViewportDelta, | 147 void applyViewportDeltas(const WebFloatSize& visualViewportDelta, |
148 const WebFloatSize& layoutViewportDelta, | 148 const WebFloatSize& layoutViewportDelta, |
149 const WebFloatSize& elasticOverscrollDelta, | 149 const WebFloatSize& elasticOverscrollDelta, |
150 float pageScaleDelta, | 150 float pageScaleDelta, |
151 float browserControlsShownRatioDelta) override; | 151 float browserControlsShownRatioDelta) override; |
152 void mouseCaptureLost() override; | 152 void mouseCaptureLost() override; |
153 void setFocus(bool enable) override; | 153 void setFocus(bool enable) override; |
154 WebRange compositionRange() override; | 154 WebRange compositionRange() override; |
155 WebTextInputInfo textInputInfo() override; | |
156 WebTextInputType textInputType() override; | |
157 WebColor backgroundColor() const override; | 155 WebColor backgroundColor() const override; |
158 WebPagePopup* pagePopup() const override; | 156 WebPagePopup* pagePopup() const override; |
159 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; | 157 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; |
160 bool selectionTextDirection(WebTextDirection& start, | 158 bool selectionTextDirection(WebTextDirection& start, |
161 WebTextDirection& end) const override; | 159 WebTextDirection& end) const override; |
162 bool isSelectionAnchorFirst() const override; | 160 bool isSelectionAnchorFirst() const override; |
163 WebRange caretOrSelectionRange() override; | 161 WebRange caretOrSelectionRange() override; |
164 void setTextDirection(WebTextDirection) override; | 162 void setTextDirection(WebTextDirection) override; |
165 bool isAcceleratedCompositingActive() const override; | 163 bool isAcceleratedCompositingActive() const override; |
166 void willCloseLayerTreeView() override; | 164 void willCloseLayerTreeView() override; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 491 |
494 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } | 492 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } |
495 | 493 |
496 bool isTransparent() const; | 494 bool isTransparent() const; |
497 void setIsTransparent(bool value); | 495 void setIsTransparent(bool value); |
498 | 496 |
499 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } | 497 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } |
500 | 498 |
501 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } | 499 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } |
502 | 500 |
503 // Returns the currently active WebInputMethodController which the one | 501 // Returns the currently active WebInputMethodController which is the one |
504 // corresponding to the focused frame. It will return nullptr if there are | 502 // corresponding to the focused frame. It will return nullptr if there is no |
505 // none or |m_imeAcceptEvents| is false. | 503 // focused frame, or if the there is one but it belongs to a different local |
| 504 // root. |
506 WebInputMethodControllerImpl* getActiveWebInputMethodController() const; | 505 WebInputMethodControllerImpl* getActiveWebInputMethodController() const; |
507 | 506 |
508 private: | 507 private: |
509 InspectorOverlay* inspectorOverlay(); | 508 InspectorOverlay* inspectorOverlay(); |
510 | 509 |
511 void setPageScaleFactorAndLocation(float, const FloatPoint&); | 510 void setPageScaleFactorAndLocation(float, const FloatPoint&); |
512 void propagateZoomFactorToLocalFrameRoots(Frame*, float); | 511 void propagateZoomFactorToLocalFrameRoots(Frame*, float); |
513 | 512 |
514 void scrollAndRescaleViewports(float scaleFactor, | 513 void scrollAndRescaleViewports(float scaleFactor, |
515 const IntPoint& mainFrameOrigin, | 514 const IntPoint& mainFrameOrigin, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 | 651 |
653 float m_compositorDeviceScaleFactorOverride; | 652 float m_compositorDeviceScaleFactorOverride; |
654 TransformationMatrix m_deviceEmulationTransform; | 653 TransformationMatrix m_deviceEmulationTransform; |
655 | 654 |
656 // Webkit expects keyPress events to be suppressed if the associated keyDown | 655 // Webkit expects keyPress events to be suppressed if the associated keyDown |
657 // event was handled. Safari implements this behavior by peeking out the | 656 // event was handled. Safari implements this behavior by peeking out the |
658 // associated WM_CHAR event if the keydown was handled. We emulate | 657 // associated WM_CHAR event if the keydown was handled. We emulate |
659 // this behavior by setting this flag if the keyDown was handled. | 658 // this behavior by setting this flag if the keyDown was handled. |
660 bool m_suppressNextKeypressEvent; | 659 bool m_suppressNextKeypressEvent; |
661 | 660 |
| 661 // TODO(ekaramad): Can we remove this and make sure IME events are not called |
| 662 // when there is no page focus? |
662 // Represents whether or not this object should process incoming IME events. | 663 // Represents whether or not this object should process incoming IME events. |
663 bool m_imeAcceptEvents; | 664 bool m_imeAcceptEvents; |
664 | 665 |
665 // The popup associated with an input/select element. | 666 // The popup associated with an input/select element. |
666 RefPtr<WebPagePopupImpl> m_pagePopup; | 667 RefPtr<WebPagePopupImpl> m_pagePopup; |
667 | 668 |
668 // This stores the last hidden page popup. If a GestureTap attempts to open | 669 // This stores the last hidden page popup. If a GestureTap attempts to open |
669 // the popup that is closed by its previous GestureTapDown, the popup remains | 670 // the popup that is closed by its previous GestureTapDown, the popup remains |
670 // closed. | 671 // closed. |
671 RefPtr<WebPagePopupImpl> m_lastHiddenPagePopup; | 672 RefPtr<WebPagePopupImpl> m_lastHiddenPagePopup; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; | 739 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; |
739 }; | 740 }; |
740 | 741 |
741 // We have no ways to check if the specified WebView is an instance of | 742 // We have no ways to check if the specified WebView is an instance of |
742 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 743 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
743 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 744 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
744 | 745 |
745 } // namespace blink | 746 } // namespace blink |
746 | 747 |
747 #endif | 748 #endif |
OLD | NEW |