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

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

Issue 2316423002: Introduce WebRange::isEmpty. (Closed)
Patch Set: Created 4 years, 3 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 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 2822
2823 void WebViewImpl::didChangeWindowResizerRect() 2823 void WebViewImpl::didChangeWindowResizerRect()
2824 { 2824 {
2825 if (mainFrameImpl()->frameView()) 2825 if (mainFrameImpl()->frameView())
2826 mainFrameImpl()->frameView()->windowResizerRectChanged(); 2826 mainFrameImpl()->frameView()->windowResizerRectChanged();
2827 } 2827 }
2828 2828
2829 bool WebViewImpl::getCompositionCharacterBounds(WebVector<WebRect>& bounds) 2829 bool WebViewImpl::getCompositionCharacterBounds(WebVector<WebRect>& bounds)
2830 { 2830 {
2831 WebRange range = compositionRange(); 2831 WebRange range = compositionRange();
2832 if (range.isNull()) 2832 if (range.isEmpty())
2833 return false;
2834
2835 if (range.length() == 0)
2836 return false; 2833 return false;
2837 2834
2838 WebLocalFrame* frame = focusedFrame(); 2835 WebLocalFrame* frame = focusedFrame();
2839 2836
2840 // Only consider frames whose local root is the main frame. For other 2837 // Only consider frames whose local root is the main frame. For other
2841 // local frames which have different local roots, the corresponding 2838 // local frames which have different local roots, the corresponding
2842 // WebFrameWidget will handle this task. 2839 // WebFrameWidget will handle this task.
2843 if (frame->localRoot() != mainFrameImpl()) 2840 if (frame->localRoot() != mainFrameImpl())
2844 return false; 2841 return false;
2845 2842
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 return nullptr; 4588 return nullptr;
4592 return focusedFrame; 4589 return focusedFrame;
4593 } 4590 }
4594 4591
4595 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const 4592 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const
4596 { 4593 {
4597 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4594 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4598 } 4595 }
4599 4596
4600 } // namespace blink 4597 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | third_party/WebKit/public/web/WebRange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698