| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 102 } | 102 } | 
| 103 | 103 | 
| 104 WebString WebRange::toPlainText() const | 104 WebString WebRange::toPlainText() const | 
| 105 { | 105 { | 
| 106     return m_private->text(); | 106     return m_private->text(); | 
| 107 } | 107 } | 
| 108 | 108 | 
| 109 WebRange WebRange::expandedToParagraph() const | 109 WebRange WebRange::expandedToParagraph() const | 
| 110 { | 110 { | 
| 111     WebRange copy(*this); | 111     WebRange copy(*this); | 
| 112     copy.m_private->expand("block", IGNORE_EXCEPTION_STATE); | 112     copy.m_private->expand("block", IGNORE_EXCEPTION); | 
| 113     return copy; | 113     return copy; | 
| 114 } | 114 } | 
| 115 | 115 | 
| 116 // static | 116 // static | 
| 117 WebRange WebRange::fromDocumentRange(WebFrame* frame, int start, int length) | 117 WebRange WebRange::fromDocumentRange(WebFrame* frame, int start, int length) | 
| 118 { | 118 { | 
| 119     WebCore::Frame* webFrame = static_cast<WebFrameImpl*>(frame)->frame(); | 119     WebCore::Frame* webFrame = static_cast<WebFrameImpl*>(frame)->frame(); | 
| 120     Element* selectionRoot = webFrame->selection()->rootEditableElement(); | 120     Element* selectionRoot = webFrame->selection()->rootEditableElement(); | 
| 121     ContainerNode* scope = selectionRoot ? selectionRoot : webFrame->document()-
     >documentElement(); | 121     ContainerNode* scope = selectionRoot ? selectionRoot : webFrame->document()-
     >documentElement(); | 
| 122     return TextIterator::rangeFromLocationAndLength(scope, start, length); | 122     return TextIterator::rangeFromLocationAndLength(scope, start, length); | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 161 | 161 | 
| 162 void WebRange::assign(WebRangePrivate* p) | 162 void WebRange::assign(WebRangePrivate* p) | 
| 163 { | 163 { | 
| 164     // p is already ref'd for us by the caller | 164     // p is already ref'd for us by the caller | 
| 165     if (m_private) | 165     if (m_private) | 
| 166         m_private->deref(); | 166         m_private->deref(); | 
| 167     m_private = p; | 167     m_private = p; | 
| 168 } | 168 } | 
| 169 | 169 | 
| 170 } // namespace WebKit | 170 } // namespace WebKit | 
| OLD | NEW | 
|---|