| 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/WebCompositorAnimationDelegate.h" | 34 #include "public/platform/WebCompositorAnimationDelegate.h" |
| 35 #include "public/platform/WebContentLayer.h" | 35 #include "public/platform/WebContentLayer.h" |
| 36 #include "public/platform/WebContentLayerClient.h" | 36 #include "public/platform/WebContentLayerClient.h" |
| 37 #include "public/platform/WebLayer.h" | 37 #include "public/platform/WebLayer.h" |
| 38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class Node; | 43 class Node; |
| 44 class RenderLayerModelObject; | 44 class LayoutLayerModelObject; |
| 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 14 matching lines...) Expand all Loading... |
| 69 virtual void clearCurrentGraphicsLayer() override; | 69 virtual void clearCurrentGraphicsLayer() override; |
| 70 | 70 |
| 71 GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGrap
hicsLayer; } | 71 GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGrap
hicsLayer; } |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 LinkHighlight(Node*, WebViewImpl*); | 74 LinkHighlight(Node*, WebViewImpl*); |
| 75 | 75 |
| 76 void releaseResources(); | 76 void releaseResources(); |
| 77 void computeQuads(const Node&, WTF::Vector<FloatQuad>&) const; | 77 void computeQuads(const Node&, WTF::Vector<FloatQuad>&) const; |
| 78 | 78 |
| 79 void attachLinkHighlightToCompositingLayer(const RenderLayerModelObject* pai
ntInvalidationContainer); | 79 void attachLinkHighlightToCompositingLayer(const LayoutLayerModelObject* pai
ntInvalidationContainer); |
| 80 void clearGraphicsLayerLinkHighlightPointer(); | 80 void clearGraphicsLayerLinkHighlightPointer(); |
| 81 // This function computes the highlight path, and returns true if it has cha
nged | 81 // This function computes the highlight path, and returns true if it has cha
nged |
| 82 // size since the last call to this function. | 82 // size since the last call to this function. |
| 83 bool computeHighlightLayerPathAndPosition(const RenderLayerModelObject*); | 83 bool computeHighlightLayerPathAndPosition(const LayoutLayerModelObject*); |
| 84 | 84 |
| 85 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } | 85 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } |
| 86 | 86 |
| 87 OwnPtr<WebContentLayer> m_contentLayer; | 87 OwnPtr<WebContentLayer> m_contentLayer; |
| 88 OwnPtr<WebLayer> m_clipLayer; | 88 OwnPtr<WebLayer> m_clipLayer; |
| 89 Path m_path; | 89 Path m_path; |
| 90 | 90 |
| 91 RefPtrWillBePersistent<Node> m_node; | 91 RefPtrWillBePersistent<Node> m_node; |
| 92 WebViewImpl* m_owningWebViewImpl; | 92 WebViewImpl* m_owningWebViewImpl; |
| 93 GraphicsLayer* m_currentGraphicsLayer; | 93 GraphicsLayer* m_currentGraphicsLayer; |
| 94 | 94 |
| 95 bool m_geometryNeedsUpdate; | 95 bool m_geometryNeedsUpdate; |
| 96 bool m_isAnimating; | 96 bool m_isAnimating; |
| 97 double m_startTime; | 97 double m_startTime; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace blink | 100 } // namespace blink |
| 101 | 101 |
| 102 #endif | 102 #endif |
| OLD | NEW |