| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void NullifyRenderedRect() { | 63 void NullifyRenderedRect() { |
| 64 state_ = State::kValidNull; | 64 state_ = State::kValidNull; |
| 65 // Now |m_renderedRect| can not be accessed until |setRenderedRect| is | 65 // Now |m_renderedRect| can not be accessed until |setRenderedRect| is |
| 66 // called. | 66 // called. |
| 67 } | 67 } |
| 68 | 68 |
| 69 void Invalidate() { state_ = State::kInvalid; } | 69 void Invalidate() { state_ = State::kInvalid; } |
| 70 bool IsValid() const { return state_ != State::kInvalid; } | 70 bool IsValid() const { return state_ != State::kInvalid; } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 explicit TextMatchMarker(const DocumentMarker& marker) | |
| 74 : DocumentMarker(marker), state_(State::kInvalid) {} | |
| 75 | |
| 76 LayoutRect rendered_rect_; | 73 LayoutRect rendered_rect_; |
| 77 State state_; | 74 State state_; |
| 78 }; | 75 }; |
| 79 | 76 |
| 80 DEFINE_TYPE_CASTS(TextMatchMarker, | 77 DEFINE_TYPE_CASTS(TextMatchMarker, |
| 81 DocumentMarker, | 78 DocumentMarker, |
| 82 marker, | 79 marker, |
| 83 marker->GetType() == DocumentMarker::kTextMatch, | 80 marker->GetType() == DocumentMarker::kTextMatch, |
| 84 marker.GetType() == DocumentMarker::kTextMatch); | 81 marker.GetType() == DocumentMarker::kTextMatch); |
| 85 | 82 |
| 86 } // namespace blink | 83 } // namespace blink |
| 87 | 84 |
| 88 #endif | 85 #endif |
| OLD | NEW |