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

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

Issue 2508363003: [refactor] - Move textInputInfo() and textInputType() from WebWidget to WebInputMethodController (Closed)
Patch Set: Fixed Rebase 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
533 WebColor WebFrameWidgetImpl::backgroundColor() const { 519 WebColor WebFrameWidgetImpl::backgroundColor() const {
534 if (isTransparent()) 520 if (isTransparent())
535 return Color::transparent; 521 return Color::transparent;
536 if (!m_localRoot->frameView()) 522 if (!m_localRoot->frameView())
537 return m_baseBackgroundColor; 523 return m_baseBackgroundColor;
538 FrameView* view = m_localRoot->frameView(); 524 FrameView* view = m_localRoot->frameView();
539 return view->documentBackgroundColor().rgb(); 525 return view->documentBackgroundColor().rgb();
540 } 526 }
541 527
542 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This 528 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 return nullptr; 1125 return nullptr;
1140 } 1126 }
1141 1127
1142 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1128 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1143 if (!m_imeAcceptEvents) 1129 if (!m_imeAcceptEvents)
1144 return nullptr; 1130 return nullptr;
1145 return focusedLocalFrameInWidget(); 1131 return focusedLocalFrameInWidget();
1146 } 1132 }
1147 1133
1148 } // namespace blink 1134 } // 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