Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: third_party/WebKit/Source/web/mac/WebSubstringUtil.mm

Issue 2884563003: Move WebFrameWidgetBase to core/frame/. (Closed)
Patch Set: Fix windows build error. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewFrameWidget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
37 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
38 #include "core/dom/Element.h" 38 #include "core/dom/Element.h"
39 #include "core/dom/Node.h" 39 #include "core/dom/Node.h"
40 #include "core/dom/Range.h" 40 #include "core/dom/Range.h"
41 #include "core/editing/FrameSelection.h" 41 #include "core/editing/FrameSelection.h"
42 #include "core/editing/PlainTextRange.h" 42 #include "core/editing/PlainTextRange.h"
43 #include "core/editing/iterators/TextIterator.h" 43 #include "core/editing/iterators/TextIterator.h"
44 #include "core/frame/FrameView.h" 44 #include "core/frame/FrameView.h"
45 #include "core/frame/LocalFrame.h" 45 #include "core/frame/LocalFrame.h"
46 #include "core/frame/VisualViewport.h" 46 #include "core/frame/VisualViewport.h"
47 #include "core/frame/WebFrameWidgetBase.h"
47 #include "core/html/HTMLElement.h" 48 #include "core/html/HTMLElement.h"
48 #include "core/layout/HitTestResult.h" 49 #include "core/layout/HitTestResult.h"
49 #include "core/layout/LayoutObject.h" 50 #include "core/layout/LayoutObject.h"
50 #include "core/page/Page.h" 51 #include "core/page/Page.h"
51 #include "core/style/ComputedStyle.h" 52 #include "core/style/ComputedStyle.h"
52 #include "platform/fonts/Font.h" 53 #include "platform/fonts/Font.h"
53 #include "platform/mac/ColorMac.h" 54 #include "platform/mac/ColorMac.h"
54 #include "public/platform/WebRect.h" 55 #include "public/platform/WebRect.h"
55 #include "public/web/WebFrameWidget.h" 56 #include "public/web/WebFrameWidget.h"
56 #include "public/web/WebHitTestResult.h" 57 #include "public/web/WebHitTestResult.h"
57 #include "public/web/WebLocalFrame.h" 58 #include "public/web/WebLocalFrame.h"
58 #include "public/web/WebRange.h" 59 #include "public/web/WebRange.h"
59 #include "web/WebFrameWidgetBase.h"
60 #include "web/WebLocalFrameImpl.h" 60 #include "web/WebLocalFrameImpl.h"
61 61
62 using namespace blink; 62 using namespace blink;
63 63
64 static NSAttributedString* attributedSubstringFromRange( 64 static NSAttributedString* attributedSubstringFromRange(
65 const EphemeralRange& range, 65 const EphemeralRange& range,
66 float fontScale) { 66 float fontScale) {
67 NSMutableAttributedString* string = [[NSMutableAttributedString alloc] init]; 67 NSMutableAttributedString* string = [[NSMutableAttributedString alloc] init];
68 NSMutableDictionary* attrs = [NSMutableDictionary dictionary]; 68 NSMutableDictionary* attrs = [NSMutableDictionary dictionary];
69 size_t length = range.EndPosition().ComputeOffsetInContainerNode() - 69 size_t length = range.EndPosition().ComputeOffsetInContainerNode() -
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return nil; 211 return nil;
212 212
213 NSAttributedString* result = attributedSubstringFromRange( 213 NSAttributedString* result = attributedSubstringFromRange(
214 ephemeral_range, frame->GetPage()->GetVisualViewport().Scale()); 214 ephemeral_range, frame->GetPage()->GetVisualViewport().Scale());
215 if (baseline_point) 215 if (baseline_point)
216 *baseline_point = getBaselinePoint(frame->View(), ephemeral_range, result); 216 *baseline_point = getBaselinePoint(frame->View(), ephemeral_range, result);
217 return result; 217 return result;
218 } 218 }
219 219
220 } // namespace blink 220 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewFrameWidget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698