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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2029423003: OOPIF IME: Renderer Side Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undid Changes to render_frame_impl.h Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 { 2797 {
2798 if (!mainFrameImpl()) 2798 if (!mainFrameImpl())
2799 return; 2799 return;
2800 Document* document = mainFrameImpl()->frame()->document(); 2800 Document* document = mainFrameImpl()->frame()->document();
2801 if (hasBlurryContent) 2801 if (hasBlurryContent)
2802 UseCounter::count(document, UseCounter::FixedRasterScaleBlurryContent); 2802 UseCounter::count(document, UseCounter::FixedRasterScaleBlurryContent);
2803 if (hasPotentialPerformanceRegression) 2803 if (hasPotentialPerformanceRegression)
2804 UseCounter::count(document, UseCounter::FixedRasterScalePotentialPerform anceRegression); 2804 UseCounter::count(document, UseCounter::FixedRasterScalePotentialPerform anceRegression);
2805 } 2805 }
2806 2806
2807 bool WebViewImpl::getCompositionCharacterBounds(WebVector<WebRect>& bounds)
kenrb 2016/06/10 20:52:03 I'm a bit confused here, I thought all of this was
EhsanK 2016/06/27 21:14:50 What (I think) I did was to move the code out of R
2808 {
2809 size_t offset = 0;
2810 size_t characterCount = 0;
2811 if (!compositionRange(&offset, &characterCount))
2812 return false;
2813
2814 if (characterCount == 0)
2815 return false;
2816
2817 WebLocalFrame* frame = focusedFrame()->toWebLocalFrame();
2818 if (!frame)
2819 return false;
2820
2821 WebVector<WebRect> result(characterCount);
2822 WebRect webrect;
2823 for (size_t i = 0; i < characterCount; ++i) {
2824 if (!frame->firstRectForCharacterRange(offset + i, 1, webrect)) {
2825 DLOG(ERROR) << "Could not retrieve character rectangle at " << i;
2826 return false;
2827 }
2828 result[i] = webrect;
2829 }
2830 bounds.swap(result);
2831 return true;
2832 }
2833
2834 void WebViewImpl::adjustReplacementRangeForAccentedCharacters(int start, int len gth)
2835 {
2836 if (WebLocalFrame* frame = focusedFrame()->toWebLocalFrame()) {
2837 WebRange webrange = WebRange::fromDocumentRange(frame, start, length);
2838 if (!webrange.isNull())
2839 frame->selectRange(webrange);
2840 }
2841 }
2842
2807 // WebView -------------------------------------------------------------------- 2843 // WebView --------------------------------------------------------------------
2808 2844
2809 WebSettingsImpl* WebViewImpl::settingsImpl() 2845 WebSettingsImpl* WebViewImpl::settingsImpl()
2810 { 2846 {
2811 if (!m_webSettings) 2847 if (!m_webSettings)
2812 m_webSettings = adoptPtr(new WebSettingsImpl(&m_page->settings(), m_devT oolsEmulator.get())); 2848 m_webSettings = adoptPtr(new WebSettingsImpl(&m_page->settings(), m_devT oolsEmulator.get()));
2813 DCHECK(m_webSettings); 2849 DCHECK(m_webSettings);
2814 return m_webSettings.get(); 2850 return m_webSettings.get();
2815 } 2851 }
2816 2852
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
4553 { 4589 {
4554 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4590 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4555 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4591 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4556 if (!page()) 4592 if (!page())
4557 return 1; 4593 return 1;
4558 4594
4559 return page()->deviceScaleFactor(); 4595 return page()->deviceScaleFactor();
4560 } 4596 }
4561 4597
4562 } // namespace blink 4598 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698