| 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 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2452 | 2452 |
| 2453 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. | 2453 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. |
| 2454 // see http://crbug.com/590369 for more details. | 2454 // see http://crbug.com/590369 for more details. |
| 2455 focused->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 2455 focused->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2456 | 2456 |
| 2457 DocumentLifecycle::DisallowTransitionScope disallowTransition(focused->docum
ent()->lifecycle()); | 2457 DocumentLifecycle::DisallowTransitionScope disallowTransition(focused->docum
ent()->lifecycle()); |
| 2458 | 2458 |
| 2459 // Emits an object replacement character for each replaced element so that | 2459 // Emits an object replacement character for each replaced element so that |
| 2460 // it is exposed to IME and thus could be deleted by IME on android. | 2460 // it is exposed to IME and thus could be deleted by IME on android. |
| 2461 info.value = plainText(EphemeralRange::rangeOfContents(*element), TextIterat
orEmitsObjectReplacementCharacter); | 2461 info.value = plainText(EphemeralRange::rangeOfContents(*element), TextIterat
orEmitsObjectReplacementCharacter); |
| 2462 info.placeholder = focusedElement()->fastGetAttribute(HTMLNames::placeholder
Attr); |
| 2462 | 2463 |
| 2463 if (info.value.isEmpty()) | 2464 if (info.value.isEmpty()) |
| 2464 return info; | 2465 return info; |
| 2465 | 2466 |
| 2466 EphemeralRange firstRange = firstEphemeralRangeOf(selection.selection()); | 2467 EphemeralRange firstRange = firstEphemeralRangeOf(selection.selection()); |
| 2467 if (firstRange.isNotNull()) { | 2468 if (firstRange.isNotNull()) { |
| 2468 PlainTextRange plainTextRange(PlainTextRange::create(*element, firstRang
e)); | 2469 PlainTextRange plainTextRange(PlainTextRange::create(*element, firstRang
e)); |
| 2469 if (plainTextRange.isNotNull()) { | 2470 if (plainTextRange.isNotNull()) { |
| 2470 info.selectionStart = plainTextRange.start(); | 2471 info.selectionStart = plainTextRange.start(); |
| 2471 info.selectionEnd = plainTextRange.end(); | 2472 info.selectionEnd = plainTextRange.end(); |
| (...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4592 return nullptr; | 4593 return nullptr; |
| 4593 return focusedFrame; | 4594 return focusedFrame; |
| 4594 } | 4595 } |
| 4595 | 4596 |
| 4596 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const | 4597 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const |
| 4597 { | 4598 { |
| 4598 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4599 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4599 } | 4600 } |
| 4600 | 4601 |
| 4601 } // namespace blink | 4602 } // namespace blink |
| OLD | NEW |