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

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

Issue 2592953003: Revert of [refactor] - Move textInputInfo() and textInputType() from WebWidget to WebInputMethodController (Closed)
Patch Set: Created 3 years, 12 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 focused->selection().rootEditableElementOrDocumentElement(); 509 focused->selection().rootEditableElementOrDocumentElement();
510 DCHECK(editable); 510 DCHECK(editable);
511 511
512 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 512 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
513 // needs to be audited. See http://crbug.com/590369 for more details. 513 // needs to be audited. See http://crbug.com/590369 for more details.
514 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); 514 editable->document().updateStyleAndLayoutIgnorePendingStylesheets();
515 515
516 return PlainTextRange::create(*editable, range); 516 return PlainTextRange::create(*editable, range);
517 } 517 }
518 518
519 WebTextInputInfo WebFrameWidgetImpl::textInputInfo() {
520 LocalFrame* focused = focusedLocalFrameInWidget();
521 if (!focused)
522 return WebTextInputInfo();
523 return focused->inputMethodController().textInputInfo();
524 }
525
526 WebTextInputType WebFrameWidgetImpl::textInputType() {
527 LocalFrame* focused = focusedLocalFrameInWidget();
528 if (!focused)
529 return WebTextInputTypeNone;
530 return focused->inputMethodController().textInputType();
531 }
532
519 WebColor WebFrameWidgetImpl::backgroundColor() const { 533 WebColor WebFrameWidgetImpl::backgroundColor() const {
520 if (isTransparent()) 534 if (isTransparent())
521 return Color::transparent; 535 return Color::transparent;
522 if (!m_localRoot->frameView()) 536 if (!m_localRoot->frameView())
523 return m_baseBackgroundColor; 537 return m_baseBackgroundColor;
524 FrameView* view = m_localRoot->frameView(); 538 FrameView* view = m_localRoot->frameView();
525 return view->documentBackgroundColor().rgb(); 539 return view->documentBackgroundColor().rgb();
526 } 540 }
527 541
528 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This 542 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 return nullptr; 1139 return nullptr;
1126 } 1140 }
1127 1141
1128 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1142 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1129 if (!m_imeAcceptEvents) 1143 if (!m_imeAcceptEvents)
1130 return nullptr; 1144 return nullptr;
1131 return focusedLocalFrameInWidget(); 1145 return focusedLocalFrameInWidget();
1132 } 1146 }
1133 1147
1134 } // namespace blink 1148 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.h ('k') | third_party/WebKit/Source/web/WebInputMethodControllerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698