OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 break; | 693 break; |
694 case "Storage": | 694 case "Storage": |
695 InjectedScriptHost.selectDOMStorage(object); | 695 InjectedScriptHost.selectDOMStorage(object); |
696 break; | 696 break; |
697 } | 697 } |
698 } | 698 } |
699 }, | 699 }, |
700 | 700 |
701 copy: function(object) | 701 copy: function(object) |
702 { | 702 { |
703 if (injectedScript._type(object) === "node") { | 703 if (injectedScript._type(object) === "node") |
704 var nodeId = InjectedScriptHost.pushNodePathToFrontend(object, false
, false); | 704 object = object.outerHTML; |
705 InjectedScriptHost.copyNode(nodeId); | 705 InjectedScriptHost.copyText(object); |
706 } else | |
707 InjectedScriptHost.copyText(object); | |
708 }, | 706 }, |
709 | 707 |
710 clear: function() | 708 clear: function() |
711 { | 709 { |
712 InjectedScriptHost.clearConsoleMessages(); | 710 InjectedScriptHost.clearConsoleMessages(); |
713 } | 711 } |
714 } | 712 } |
715 | 713 |
716 injectedScript._commandLineAPI = new CommandLineAPI(); | 714 injectedScript._commandLineAPI = new CommandLineAPI(); |
717 return injectedScript; | 715 return injectedScript; |
718 }); | 716 }); |
OLD | NEW |