| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
| 40 #include "core/dom/Element.h" | 40 #include "core/dom/Element.h" |
| 41 #include "core/dom/Node.h" | 41 #include "core/dom/Node.h" |
| 42 #include "core/dom/Range.h" | 42 #include "core/dom/Range.h" |
| 43 #include "core/editing/FrameSelection.h" | 43 #include "core/editing/FrameSelection.h" |
| 44 #include "core/editing/PlainTextRange.h" | 44 #include "core/editing/PlainTextRange.h" |
| 45 #include "core/editing/TextIterator.h" | 45 #include "core/editing/TextIterator.h" |
| 46 #include "core/html/HTMLElement.h" | 46 #include "core/html/HTMLElement.h" |
| 47 #include "core/frame/Frame.h" | 47 #include "core/frame/Frame.h" |
| 48 #include "core/frame/FrameView.h" | 48 #include "core/frame/FrameView.h" |
| 49 #include "core/platform/graphics/Font.h" | |
| 50 #include "core/platform/graphics/mac/ColorMac.h" | |
| 51 #include "core/rendering/RenderObject.h" | 49 #include "core/rendering/RenderObject.h" |
| 52 #include "core/rendering/style/RenderStyle.h" | 50 #include "core/rendering/style/RenderStyle.h" |
| 51 #include "platform/fonts/Font.h" |
| 52 #include "platform/mac/ColorMac.h" |
| 53 #include "public/platform/WebRect.h" | 53 #include "public/platform/WebRect.h" |
| 54 | 54 |
| 55 using namespace WebCore; | 55 using namespace WebCore; |
| 56 | 56 |
| 57 namespace blink { | 57 namespace blink { |
| 58 | 58 |
| 59 NSAttributedString* WebSubstringUtil::attributedSubstringInRange(WebFrame* webFr
ame, size_t location, size_t length) | 59 NSAttributedString* WebSubstringUtil::attributedSubstringInRange(WebFrame* webFr
ame, size_t location, size_t length) |
| 60 { | 60 { |
| 61 Frame* frame = toWebFrameImpl(webFrame)->frame(); | 61 Frame* frame = toWebFrameImpl(webFrame)->frame(); |
| 62 if (frame->view()->needsLayout()) | 62 if (frame->view()->needsLayout()) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 length:characters.size()] autorelease
]; | 109 length:characters.size()] autorelease
]; |
| 110 [string replaceCharactersInRange:NSMakeRange(position, 0) | 110 [string replaceCharactersInRange:NSMakeRange(position, 0) |
| 111 withString:substring]; | 111 withString:substring]; |
| 112 [string setAttributes:attrs range:NSMakeRange(position, numCharacters)]; | 112 [string setAttributes:attrs range:NSMakeRange(position, numCharacters)]; |
| 113 position += numCharacters; | 113 position += numCharacters; |
| 114 } | 114 } |
| 115 return [string autorelease]; | 115 return [string autorelease]; |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace blink | 118 } // namespace blink |
| OLD | NEW |