From 397a503da3553ead59664891377958788bc527f5 Mon Sep 17 00:00:00 2001 From: Charlie Hess Date: Fri, 17 Apr 2015 14:26:29 -0700 Subject: [PATCH 1/4] Update submodules --- vendor/breakpad | 2 +- vendor/brightray | 2 +- vendor/native_mate | 2 +- vendor/node | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/breakpad b/vendor/breakpad index 4427c1170387..1e937567e92d 160000 --- a/vendor/breakpad +++ b/vendor/breakpad @@ -1 +1 @@ -Subproject commit 4427c1170387afe46eb3fad259436f1f9f5efa86 +Subproject commit 1e937567e92d2c3beed4556f3c68a4b0362b1e6d diff --git a/vendor/brightray b/vendor/brightray index ec0a660b0b70..d3500e5d9451 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit ec0a660b0b70e6ea5a4ee760a753b8fac31a5de2 +Subproject commit d3500e5d9451e248dd8f4ae805f19b371e795cc3 diff --git a/vendor/native_mate b/vendor/native_mate index 40da835cbb7a..d0db7bfb586a 160000 --- a/vendor/native_mate +++ b/vendor/native_mate @@ -1 +1 @@ -Subproject commit 40da835cbb7a5f76aacebf9d3ee4b66a62cece71 +Subproject commit d0db7bfb586afe9f491bd4cb368353d2660ecfe1 diff --git a/vendor/node b/vendor/node index 9f7ab575d78f..9cd0fad904c3 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 9f7ab575d78fa4c50cc5529f15646c8a37eb3258 +Subproject commit 9cd0fad904c3ebf0af0aeec2097cad3e039a7c6d From 5b69421625525faf3cc61a22a48fae1c7e907c3d Mon Sep 17 00:00:00 2001 From: Charlie Hess Date: Fri, 17 Apr 2015 14:29:50 -0700 Subject: [PATCH 2/4] Revert "Update submodules" This reverts commit 397a503da3553ead59664891377958788bc527f5. --- vendor/breakpad | 2 +- vendor/brightray | 2 +- vendor/native_mate | 2 +- vendor/node | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/breakpad b/vendor/breakpad index 1e937567e92d..4427c1170387 160000 --- a/vendor/breakpad +++ b/vendor/breakpad @@ -1 +1 @@ -Subproject commit 1e937567e92d2c3beed4556f3c68a4b0362b1e6d +Subproject commit 4427c1170387afe46eb3fad259436f1f9f5efa86 diff --git a/vendor/brightray b/vendor/brightray index d3500e5d9451..ec0a660b0b70 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit d3500e5d9451e248dd8f4ae805f19b371e795cc3 +Subproject commit ec0a660b0b70e6ea5a4ee760a753b8fac31a5de2 diff --git a/vendor/native_mate b/vendor/native_mate index d0db7bfb586a..40da835cbb7a 160000 --- a/vendor/native_mate +++ b/vendor/native_mate @@ -1 +1 @@ -Subproject commit d0db7bfb586afe9f491bd4cb368353d2660ecfe1 +Subproject commit 40da835cbb7a5f76aacebf9d3ee4b66a62cece71 diff --git a/vendor/node b/vendor/node index 9cd0fad904c3..9f7ab575d78f 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 9cd0fad904c3ebf0af0aeec2097cad3e039a7c6d +Subproject commit 9f7ab575d78fa4c50cc5529f15646c8a37eb3258 From 3913e18447cce589725336799860843ce8e54474 Mon Sep 17 00:00:00 2001 From: Charlie Hess Date: Fri, 15 May 2015 00:15:19 -0700 Subject: [PATCH 3/4] Add WebContents API for PasteAndMatchStyle. --- atom/browser/api/atom_api_web_contents.cc | 5 +++++ atom/browser/api/atom_api_web_contents.h | 1 + atom/renderer/lib/web-view/web-view.coffee | 1 + 3 files changed, 7 insertions(+) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index e228a064f413..99d6fd7cfede 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -523,6 +523,10 @@ void WebContents::Paste() { web_contents()->Paste(); } +void WebContents::PasteAndMatchStyle() { + web_contents()->PasteAndMatchStyle(); +} + void WebContents::Delete() { web_contents()->Delete(); } @@ -645,6 +649,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( .SetMethod("cut", &WebContents::Cut) .SetMethod("copy", &WebContents::Copy) .SetMethod("paste", &WebContents::Paste) + .SetMethod("pasteAndMatchStyle", &WebContents::PasteAndMatchStyle) .SetMethod("delete", &WebContents::Delete) .SetMethod("selectAll", &WebContents::SelectAll) .SetMethod("unselect", &WebContents::Unselect) diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index e75cfb0267f0..4661a570f5af 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -75,6 +75,7 @@ class WebContents : public mate::EventEmitter, void Cut(); void Copy(); void Paste(); + void PasteAndMatchStyle(); void Delete(); void SelectAll(); void Unselect(); diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee index bf163c0cfb5c..881300c4dd0a 100644 --- a/atom/renderer/lib/web-view/web-view.coffee +++ b/atom/renderer/lib/web-view/web-view.coffee @@ -261,6 +261,7 @@ registerWebViewElement = -> "cut" "copy" "paste" + "pasteAndMatchStyle" "delete" "selectAll" "unselect" From 9f461aed68b2871b85918c462f18903ae08c39d8 Mon Sep 17 00:00:00 2001 From: Charlie Hess Date: Fri, 15 May 2015 00:15:33 -0700 Subject: [PATCH 4/4] Update docs. --- docs/api/browser-window.md | 4 ++++ docs/api/web-view-tag.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index f8ff8e7b9e0c..3b80dd823d0d 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -840,6 +840,10 @@ Executes editing command `copy` in page. Executes editing command `paste` in page. +### WebContents.pasteAndMatchStyle() + +Executes editing command `pasteAndMatchStyle` in page. + ### WebContents.delete() Executes editing command `delete` in page. diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 89ae678b3c46..cc1a49463eaa 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -246,6 +246,10 @@ Executes editing command `copy` in page. Executes editing command `paste` in page. +### ``.pasteAndMatchStyle() + +Executes editing command `pasteAndMatchStyle` in page. + ### ``.delete() Executes editing command `delete` in page.