| 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 23 matching lines...) Expand all Loading... |
| 34 #include "public/platform/WebContentLayer.h" | 34 #include "public/platform/WebContentLayer.h" |
| 35 #include "public/platform/WebContentLayerClient.h" | 35 #include "public/platform/WebContentLayerClient.h" |
| 36 #include "public/platform/WebLayer.h" | 36 #include "public/platform/WebLayer.h" |
| 37 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
| 38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class DisplayList; | 42 class DisplayList; |
| 43 class Node; | 43 class Node; |
| 44 class RenderLayer; | 44 class RenderLayerModelObject; |
| 45 struct WebRect; | 45 struct WebRect; |
| 46 class WebViewImpl; | 46 class WebViewImpl; |
| 47 | 47 |
| 48 class LinkHighlight final : public WebContentLayerClient, public WebCompositorAn
imationDelegate, blink::LinkHighlightClient { | 48 class LinkHighlight final : public WebContentLayerClient, public WebCompositorAn
imationDelegate, blink::LinkHighlightClient { |
| 49 public: | 49 public: |
| 50 static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*); | 50 static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*); |
| 51 virtual ~LinkHighlight(); | 51 virtual ~LinkHighlight(); |
| 52 | 52 |
| 53 WebContentLayer* contentLayer(); | 53 WebContentLayer* contentLayer(); |
| 54 WebLayer* clipLayer(); | 54 WebLayer* clipLayer(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 virtual void clearCurrentGraphicsLayer() override; | 68 virtual 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 RenderLayer* computeEnclosingCompositingLayer(); | 78 void attachLinkHighlightToCompositingLayer(const RenderLayerModelObject* pai
ntInvalidationContainer); |
| 79 void clearGraphicsLayerLinkHighlightPointer(); | 79 void clearGraphicsLayerLinkHighlightPointer(); |
| 80 // This function computes the highlight path, and returns true if it has cha
nged | 80 // This function computes the highlight path, and returns true if it has cha
nged |
| 81 // size since the last call to this function. | 81 // size since the last call to this function. |
| 82 bool computeHighlightLayerPathAndPosition(RenderLayer*); | 82 bool computeHighlightLayerPathAndPosition(const RenderLayerModelObject*); |
| 83 | 83 |
| 84 OwnPtr<WebContentLayer> m_contentLayer; | 84 OwnPtr<WebContentLayer> m_contentLayer; |
| 85 OwnPtr<WebLayer> m_clipLayer; | 85 OwnPtr<WebLayer> m_clipLayer; |
| 86 Path m_path; | 86 Path m_path; |
| 87 RefPtr<DisplayList> m_displayList; | 87 RefPtr<DisplayList> m_displayList; |
| 88 | 88 |
| 89 RefPtrWillBePersistent<Node> m_node; | 89 RefPtrWillBePersistent<Node> m_node; |
| 90 WebViewImpl* m_owningWebViewImpl; | 90 WebViewImpl* m_owningWebViewImpl; |
| 91 GraphicsLayer* m_currentGraphicsLayer; | 91 GraphicsLayer* m_currentGraphicsLayer; |
| 92 | 92 |
| 93 bool m_geometryNeedsUpdate; | 93 bool m_geometryNeedsUpdate; |
| 94 bool m_isAnimating; | 94 bool m_isAnimating; |
| 95 double m_startTime; | 95 double m_startTime; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace blink | 98 } // namespace blink |
| 99 | 99 |
| 100 #endif | 100 #endif |
| OLD | NEW |