| 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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 { | 1071 { |
| 1072 return frame()->inputMethodController().compositionRange(); | 1072 return frame()->inputMethodController().compositionRange(); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 bool WebLocalFrameImpl::firstRectForCharacterRange(unsigned location, unsigned l
ength, WebRect& rectInViewport) const | 1075 bool WebLocalFrameImpl::firstRectForCharacterRange(unsigned location, unsigned l
ength, WebRect& rectInViewport) const |
| 1076 { | 1076 { |
| 1077 if ((location + length < location) && (location + length)) | 1077 if ((location + length < location) && (location + length)) |
| 1078 length = 0; | 1078 length = 0; |
| 1079 | 1079 |
| 1080 Element* editable = frame()->selection().rootEditableElementOrDocumentElemen
t(); | 1080 Element* editable = frame()->selection().rootEditableElementOrDocumentElemen
t(); |
| 1081 ASSERT(editable); | 1081 if (!editable) |
| 1082 return false; |
| 1082 RefPtrWillBeRawPtr<Range> range = PlainTextRange(location, location + length
).createRange(*editable); | 1083 RefPtrWillBeRawPtr<Range> range = PlainTextRange(location, location + length
).createRange(*editable); |
| 1083 if (!range) | 1084 if (!range) |
| 1084 return false; | 1085 return false; |
| 1085 IntRect intRect = frame()->editor().firstRectForRange(range.get()); | 1086 IntRect intRect = frame()->editor().firstRectForRange(range.get()); |
| 1086 rectInViewport = WebRect(intRect); | 1087 rectInViewport = WebRect(intRect); |
| 1087 rectInViewport = frame()->view()->contentsToViewport(rectInViewport); | 1088 rectInViewport = frame()->view()->contentsToViewport(rectInViewport); |
| 1088 return true; | 1089 return true; |
| 1089 } | 1090 } |
| 1090 | 1091 |
| 1091 size_t WebLocalFrameImpl::characterIndexForPoint(const WebPoint& pointInViewport
) const | 1092 size_t WebLocalFrameImpl::characterIndexForPoint(const WebPoint& pointInViewport
) const |
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 { | 2091 { |
| 2091 m_frameWidget = frameWidget; | 2092 m_frameWidget = frameWidget; |
| 2092 } | 2093 } |
| 2093 | 2094 |
| 2094 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2095 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2095 { | 2096 { |
| 2096 return m_frameWidget; | 2097 return m_frameWidget; |
| 2097 } | 2098 } |
| 2098 | 2099 |
| 2099 } // namespace blink | 2100 } // namespace blink |
| OLD | NEW |