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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "platform/geometry/FloatPoint.h" | 29 #include "platform/geometry/FloatPoint.h" |
30 #include "platform/geometry/IntPoint.h" | 30 #include "platform/geometry/IntPoint.h" |
31 #include "platform/graphics/GraphicsLayer.h" | 31 #include "platform/graphics/GraphicsLayer.h" |
32 #include "platform/graphics/Path.h" | 32 #include "platform/graphics/Path.h" |
33 #include "public/platform/WebAnimationDelegate.h" | 33 #include "public/platform/WebAnimationDelegate.h" |
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 | 39 |
39 namespace WebCore { | 40 namespace WebCore { |
40 class RenderLayer; | 41 class RenderLayer; |
| 42 class RenderObject; |
41 class Node; | 43 class Node; |
42 } | 44 } |
43 | 45 |
44 namespace blink { | 46 namespace blink { |
45 | 47 |
46 struct WebFloatRect; | 48 struct WebFloatRect; |
47 struct WebRect; | 49 struct WebRect; |
48 class WebViewImpl; | 50 class WebViewImpl; |
49 | 51 |
50 class LinkHighlight : public WebContentLayerClient, public WebAnimationDelegate,
WebCore::LinkHighlightClient { | 52 class LinkHighlight : public WebContentLayerClient, public WebAnimationDelegate,
WebCore::LinkHighlightClient { |
(...skipping 17 matching lines...) Expand all Loading... |
68 virtual void invalidate() OVERRIDE; | 70 virtual void invalidate() OVERRIDE; |
69 virtual WebLayer* layer() OVERRIDE; | 71 virtual WebLayer* layer() OVERRIDE; |
70 virtual void clearCurrentGraphicsLayer() OVERRIDE; | 72 virtual void clearCurrentGraphicsLayer() OVERRIDE; |
71 | 73 |
72 WebCore::GraphicsLayer* currentGraphicsLayerForTesting() const { return m_cu
rrentGraphicsLayer; } | 74 WebCore::GraphicsLayer* currentGraphicsLayerForTesting() const { return m_cu
rrentGraphicsLayer; } |
73 | 75 |
74 private: | 76 private: |
75 LinkHighlight(WebCore::Node*, WebViewImpl*); | 77 LinkHighlight(WebCore::Node*, WebViewImpl*); |
76 | 78 |
77 void releaseResources(); | 79 void releaseResources(); |
| 80 void computeQuads(WebCore::Node*, WTF::Vector<WebCore::FloatQuad>&) const; |
78 | 81 |
79 WebCore::RenderLayer* computeEnclosingCompositingLayer(); | 82 WebCore::RenderLayer* computeEnclosingCompositingLayer(); |
80 void clearGraphicsLayerLinkHighlightPointer(); | 83 void clearGraphicsLayerLinkHighlightPointer(); |
81 // This function computes the highlight path, and returns true if it has cha
nged | 84 // This function computes the highlight path, and returns true if it has cha
nged |
82 // size since the last call to this function. | 85 // size since the last call to this function. |
83 bool computeHighlightLayerPathAndPosition(WebCore::RenderLayer*); | 86 bool computeHighlightLayerPathAndPosition(WebCore::RenderLayer*); |
84 | 87 |
85 OwnPtr<WebContentLayer> m_contentLayer; | 88 OwnPtr<WebContentLayer> m_contentLayer; |
86 OwnPtr<WebLayer> m_clipLayer; | 89 OwnPtr<WebLayer> m_clipLayer; |
87 WebCore::Path m_path; | 90 WebCore::Path m_path; |
88 | 91 |
89 RefPtr<WebCore::Node> m_node; | 92 RefPtr<WebCore::Node> m_node; |
90 WebViewImpl* m_owningWebViewImpl; | 93 WebViewImpl* m_owningWebViewImpl; |
91 WebCore::GraphicsLayer* m_currentGraphicsLayer; | 94 WebCore::GraphicsLayer* m_currentGraphicsLayer; |
92 | 95 |
93 bool m_geometryNeedsUpdate; | 96 bool m_geometryNeedsUpdate; |
94 bool m_isAnimating; | 97 bool m_isAnimating; |
95 double m_startTime; | 98 double m_startTime; |
96 }; | 99 }; |
97 | 100 |
98 } // namespace blink | 101 } // namespace blink |
99 | 102 |
100 #endif | 103 #endif |
OLD | NEW |