| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class LayoutBoxModelObject; | 42 class LayoutBoxModelObject; |
| 43 class Node; | 43 class Node; |
| 44 struct WebRect; | 44 struct WebRect; |
| 45 class WebViewImpl; | 45 class WebViewImpl; |
| 46 | 46 |
| 47 class LinkHighlight final : public WebContentLayerClient, public WebCompositorAn
imationDelegate, LinkHighlightClient { | 47 class LinkHighlight final : public WebContentLayerClient, public WebCompositorAn
imationDelegate, LinkHighlightClient { |
| 48 public: | 48 public: |
| 49 static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*); | 49 static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*); |
| 50 virtual ~LinkHighlight(); | 50 ~LinkHighlight() override; |
| 51 | 51 |
| 52 WebContentLayer* contentLayer(); | 52 WebContentLayer* contentLayer(); |
| 53 WebLayer* clipLayer(); | 53 WebLayer* clipLayer(); |
| 54 void startHighlightAnimationIfNeeded(); | 54 void startHighlightAnimationIfNeeded(); |
| 55 void updateGeometry(); | 55 void updateGeometry(); |
| 56 | 56 |
| 57 // WebContentLayerClient implementation. | 57 // WebContentLayerClient implementation. |
| 58 virtual void paintContents(WebCanvas*, const WebRect& clipRect, WebContentLa
yerClient::PaintingControlSetting) override; | 58 void paintContents(WebCanvas*, const WebRect& clipRect, WebContentLayerClien
t::PaintingControlSetting) override; |
| 59 virtual void paintContents(WebDisplayItemList*, const WebRect& clipRect, Web
ContentLayerClient::PaintingControlSetting) override; | 59 void paintContents(WebDisplayItemList*, const WebRect& clipRect, WebContentL
ayerClient::PaintingControlSetting) override; |
| 60 | 60 |
| 61 // WebCompositorAnimationDelegate implementation. | 61 // WebCompositorAnimationDelegate implementation. |
| 62 virtual void notifyAnimationStarted(double monotonicTime, int group) overrid
e; | 62 void notifyAnimationStarted(double monotonicTime, int group) override; |
| 63 virtual void notifyAnimationFinished(double monotonicTime, int group) overri
de; | 63 void notifyAnimationFinished(double monotonicTime, int group) override; |
| 64 | 64 |
| 65 // LinkHighlightClient implementation. | 65 // LinkHighlightClient implementation. |
| 66 virtual void invalidate() override; | 66 void invalidate() override; |
| 67 virtual WebLayer* layer() override; | 67 WebLayer* layer() override; |
| 68 virtual void clearCurrentGraphicsLayer() override; | 68 void clearCurrentGraphicsLayer() override; |
| 69 | 69 |
| 70 GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGrap
hicsLayer; } | 70 GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGrap
hicsLayer; } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 LinkHighlight(Node*, WebViewImpl*); | 73 LinkHighlight(Node*, WebViewImpl*); |
| 74 | 74 |
| 75 void releaseResources(); | 75 void releaseResources(); |
| 76 void computeQuads(const Node&, WTF::Vector<FloatQuad>&) const; | 76 void computeQuads(const Node&, WTF::Vector<FloatQuad>&) const; |
| 77 | 77 |
| 78 void attachLinkHighlightToCompositingLayer(const LayoutBoxModelObject* paint
InvalidationContainer); | 78 void attachLinkHighlightToCompositingLayer(const LayoutBoxModelObject* paint
InvalidationContainer); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 90 GraphicsLayer* m_currentGraphicsLayer; | 90 GraphicsLayer* m_currentGraphicsLayer; |
| 91 | 91 |
| 92 bool m_geometryNeedsUpdate; | 92 bool m_geometryNeedsUpdate; |
| 93 bool m_isAnimating; | 93 bool m_isAnimating; |
| 94 double m_startTime; | 94 double m_startTime; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| 98 | 98 |
| 99 #endif | 99 #endif |
| OLD | NEW |