OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bool IsValid() const { return state_ != State::kInvalid; } | 68 bool IsValid() const { return state_ != State::kInvalid; } |
69 | 69 |
70 private: | 70 private: |
71 explicit TextMatchMarker(const DocumentMarker& marker) | 71 explicit TextMatchMarker(const DocumentMarker& marker) |
72 : DocumentMarker(marker), state_(State::kInvalid) {} | 72 : DocumentMarker(marker), state_(State::kInvalid) {} |
73 | 73 |
74 LayoutRect rendered_rect_; | 74 LayoutRect rendered_rect_; |
75 State state_; | 75 State state_; |
76 }; | 76 }; |
77 | 77 |
78 DEFINE_TYPE_CASTS(TextMatchMarker, DocumentMarker, marker, true, true); | 78 DEFINE_TYPE_CASTS(TextMatchMarker, |
| 79 DocumentMarker, |
| 80 marker, |
| 81 marker->GetType() == DocumentMarker::kTextMatch, |
| 82 marker.GetType() == DocumentMarker::kTextMatch); |
79 | 83 |
80 } // namespace blink | 84 } // namespace blink |
81 | 85 |
82 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::TextMatchMarker); | 86 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::TextMatchMarker); |
83 | 87 |
84 #endif | 88 #endif |
OLD | NEW |