Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 BLINK_EXPORT WebRange() {} | 48 BLINK_EXPORT WebRange() {} |
| 49 | 49 |
| 50 int StartOffset() const { return start_; } | 50 int StartOffset() const { return start_; } |
| 51 int EndOffset() const { return end_; } | 51 int EndOffset() const { return end_; } |
| 52 int length() const { return end_ - start_; } | 52 int length() const { return end_ - start_; } |
| 53 | 53 |
| 54 bool IsNull() const { return start_ == -1 && end_ == -1; } | 54 bool IsNull() const { return start_ == -1 && end_ == -1; } |
| 55 bool IsEmpty() const { return start_ == end_; } | 55 bool IsEmpty() const { return start_ == end_; } |
| 56 | 56 |
| 57 #if BLINK_IMPLEMENTATION | 57 #if BLINK_IMPLEMENTATION |
| 58 WebRange(const EphemeralRange&); | 58 BLINK_EXPORT WebRange(const EphemeralRange&); |
| 59 WebRange(const PlainTextRange&); | 59 BLINK_EXPORT WebRange(const PlainTextRange&); |
| 60 | 60 |
| 61 EphemeralRange CreateEphemeralRange(LocalFrame*) const; | 61 BLINK_EXPORT EphemeralRange CreateEphemeralRange(LocalFrame*) const; |
|
haraken
2017/05/15 04:53:39
I'm just curious but when do we need to add BLINK_
| |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // Note that this also matches the values for gfx::Range::InvalidRange | 65 // Note that this also matches the values for gfx::Range::InvalidRange |
| 66 // for easy conversion. | 66 // for easy conversion. |
| 67 int start_ = -1; | 67 int start_ = -1; |
| 68 int end_ = -1; | 68 int end_ = -1; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| 72 | 72 |
| 73 #endif | 73 #endif |
| OLD | NEW |