| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 void Internals::forceBlinkGCWithoutV8GC() { | 2870 void Internals::forceBlinkGCWithoutV8GC() { |
| 2871 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); | 2871 ThreadState::current()->setGCState(ThreadState::FullGCScheduled); |
| 2872 } | 2872 } |
| 2873 | 2873 |
| 2874 String Internals::selectedHTMLForClipboard() { | 2874 String Internals::selectedHTMLForClipboard() { |
| 2875 if (!frame()) | 2875 if (!frame()) |
| 2876 return String(); | 2876 return String(); |
| 2877 | 2877 |
| 2878 // Selection normalization and markup generation require clean layout. |
| 2879 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2880 |
| 2878 return frame()->selection().selectedHTMLForClipboard(); | 2881 return frame()->selection().selectedHTMLForClipboard(); |
| 2879 } | 2882 } |
| 2880 | 2883 |
| 2881 String Internals::selectedTextForClipboard() { | 2884 String Internals::selectedTextForClipboard() { |
| 2882 if (!frame() || !frame()->document()) | 2885 if (!frame() || !frame()->document()) |
| 2883 return String(); | 2886 return String(); |
| 2884 | 2887 |
| 2885 // Clean layout is required for extracting plain text from selection. | 2888 // Clean layout is required for extracting plain text from selection. |
| 2886 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 2889 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2887 | 2890 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3025 return ClientRect::create(); | 3028 return ClientRect::create(); |
| 3026 | 3029 |
| 3027 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); | 3030 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); |
| 3028 } | 3031 } |
| 3029 | 3032 |
| 3030 void Internals::crash() { | 3033 void Internals::crash() { |
| 3031 CHECK(false) << "Intentional crash"; | 3034 CHECK(false) << "Intentional crash"; |
| 3032 } | 3035 } |
| 3033 | 3036 |
| 3034 } // namespace blink | 3037 } // namespace blink |
| OLD | NEW |