| OLD | NEW |
| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 focused->selection().rootEditableElementOrDocumentElement(); | 519 focused->selection().rootEditableElementOrDocumentElement(); |
| 520 DCHECK(editable); | 520 DCHECK(editable); |
| 521 | 521 |
| 522 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 522 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 523 // needs to be audited. See http://crbug.com/590369 for more details. | 523 // needs to be audited. See http://crbug.com/590369 for more details. |
| 524 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); | 524 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 525 | 525 |
| 526 return PlainTextRange::create(*editable, range); | 526 return PlainTextRange::create(*editable, range); |
| 527 } | 527 } |
| 528 | 528 |
| 529 WebTextInputInfo WebFrameWidgetImpl::textInputInfo() { | |
| 530 LocalFrame* focused = focusedLocalFrameInWidget(); | |
| 531 if (!focused) | |
| 532 return WebTextInputInfo(); | |
| 533 return focused->inputMethodController().textInputInfo(); | |
| 534 } | |
| 535 | |
| 536 WebTextInputType WebFrameWidgetImpl::textInputType() { | |
| 537 LocalFrame* focused = focusedLocalFrameInWidget(); | |
| 538 if (!focused) | |
| 539 return WebTextInputTypeNone; | |
| 540 return focused->inputMethodController().textInputType(); | |
| 541 } | |
| 542 | |
| 543 WebColor WebFrameWidgetImpl::backgroundColor() const { | 529 WebColor WebFrameWidgetImpl::backgroundColor() const { |
| 544 if (isTransparent()) | 530 if (isTransparent()) |
| 545 return Color::transparent; | 531 return Color::transparent; |
| 546 if (!m_localRoot->frameView()) | 532 if (!m_localRoot->frameView()) |
| 547 return m_baseBackgroundColor; | 533 return m_baseBackgroundColor; |
| 548 FrameView* view = m_localRoot->frameView(); | 534 FrameView* view = m_localRoot->frameView(); |
| 549 return view->documentBackgroundColor().rgb(); | 535 return view->documentBackgroundColor().rgb(); |
| 550 } | 536 } |
| 551 | 537 |
| 552 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 538 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 return nullptr; | 1132 return nullptr; |
| 1147 } | 1133 } |
| 1148 | 1134 |
| 1149 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1135 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1150 if (!m_imeAcceptEvents) | 1136 if (!m_imeAcceptEvents) |
| 1151 return nullptr; | 1137 return nullptr; |
| 1152 return focusedLocalFrameInWidget(); | 1138 return focusedLocalFrameInWidget(); |
| 1153 } | 1139 } |
| 1154 | 1140 |
| 1155 } // namespace blink | 1141 } // namespace blink |
| OLD | NEW |