OLD | NEW |
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 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2283 LocalFrame* focused = focusedWebCoreFrame(); | 2283 LocalFrame* focused = focusedWebCoreFrame(); |
2284 if (!focused) | 2284 if (!focused) |
2285 return; | 2285 return; |
2286 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported(focused)) { | 2286 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported(focused)) { |
2287 plugin->extendSelectionAndDelete(before, after); | 2287 plugin->extendSelectionAndDelete(before, after); |
2288 return; | 2288 return; |
2289 } | 2289 } |
2290 focused->inputMethodController().extendSelectionAndDelete(before, after); | 2290 focused->inputMethodController().extendSelectionAndDelete(before, after); |
2291 } | 2291 } |
2292 | 2292 |
2293 bool WebViewImpl::isSelectionEditable() const | |
2294 { | |
2295 if (const LocalFrame* frame = focusedWebCoreFrame()) | |
2296 return frame->selection().isContentEditable(); | |
2297 return false; | |
2298 } | |
2299 | |
2300 WebColor WebViewImpl::backgroundColor() const | 2293 WebColor WebViewImpl::backgroundColor() const |
2301 { | 2294 { |
2302 if (isTransparent()) | 2295 if (isTransparent()) |
2303 return Color::transparent; | 2296 return Color::transparent; |
2304 if (!m_page) | 2297 if (!m_page) |
2305 return m_baseBackgroundColor; | 2298 return m_baseBackgroundColor; |
2306 if (!m_page->mainFrame()) | 2299 if (!m_page->mainFrame()) |
2307 return m_baseBackgroundColor; | 2300 return m_baseBackgroundColor; |
2308 FrameView* view = m_page->mainFrame()->view(); | 2301 FrameView* view = m_page->mainFrame()->view(); |
2309 return view->documentBackgroundColor().rgb(); | 2302 return view->documentBackgroundColor().rgb(); |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3997 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 3990 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
3998 | 3991 |
3999 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 3992 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4000 return false; | 3993 return false; |
4001 | 3994 |
4002 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 3995 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4003 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 3996 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4004 } | 3997 } |
4005 | 3998 |
4006 } // namespace blink | 3999 } // namespace blink |
OLD | NEW |