OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 private: | 53 private: |
54 bool m_isEmpty; | 54 bool m_isEmpty; |
55 IntRect m_rectInViewport; | 55 IntRect m_rectInViewport; |
56 String m_string; | 56 String m_string; |
57 }; | 57 }; |
58 | 58 |
59 // SmartClip implements support for the copy operation | 59 // SmartClip implements support for the copy operation |
60 // with an S-Pen on Samsung devices. The behavior of this | 60 // with an S-Pen on Samsung devices. The behavior of this |
61 // class is quirky and poorly tested. It's approximately | 61 // class is quirky and poorly tested. It's approximately |
62 // trying to do a poor-mans implementation of columnar | 62 // trying to do an implementation of columnar selection |
63 // selection followed by a copy operation. | 63 // followed by a copy operation. |
64 class CORE_EXPORT SmartClip { | 64 class CORE_EXPORT SmartClip { |
65 STACK_ALLOCATED(); | 65 STACK_ALLOCATED(); |
66 | 66 |
67 public: | 67 public: |
68 explicit SmartClip(LocalFrame*); | 68 explicit SmartClip(LocalFrame*); |
69 | 69 |
70 SmartClipData dataForRect(const IntRect&); | 70 SmartClipData dataForRect(const IntRect&); |
71 | 71 |
72 private: | 72 private: |
73 float pageScaleFactor(); | 73 float pageScaleFactor(); |
74 | 74 |
75 Node* minNodeContainsNodes(Node* minNode, Node* newNode); | 75 Node* minNodeContainsNodes(Node* minNode, Node* newNode); |
76 Node* findBestOverlappingNode(Node*, const IntRect& cropRectInViewport); | 76 Node* findBestOverlappingNode(Node*, const IntRect& cropRectInViewport); |
77 bool shouldSkipBackgroundImage(Node*); | 77 bool shouldSkipBackgroundImage(Node*); |
78 void collectOverlappingChildNodes( | 78 void collectOverlappingChildNodes( |
79 Node* parentNode, | 79 Node* parentNode, |
80 const IntRect& cropRectInViewport, | 80 const IntRect& cropRectInViewport, |
81 HeapVector<Member<Node>>& overlappingNodeInfoTable); | 81 HeapVector<Member<Node>>& overlappingNodeInfoTable); |
82 String extractTextFromNode(Node*); | 82 String extractTextFromNode(Node*); |
83 | 83 |
84 Member<LocalFrame> m_frame; | 84 Member<LocalFrame> m_frame; |
85 }; | 85 }; |
86 | 86 |
87 } // namespace blink | 87 } // namespace blink |
88 | 88 |
89 #endif // SmartClip_h | 89 #endif // SmartClip_h |
OLD | NEW |