 -- 
 1.9.1
 
+
+From abc4a8fac44deeff3ee9680488edbbeb16454375 Mon Sep 17 00:00:00 2001
+From: JW Bell <bjwbell@gmail.com>
+Date: Fri, 29 Jul 2016 14:25:22 -0400
+Subject: [PATCH 10/10] IronFrame - Avoid duplicate events
+
+---
+ third_party/WebKit/Source/core/dom/Document.cpp | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
+index e10fd0c..54acff5 100644
+--- a/third_party/WebKit/Source/core/dom/Document.cpp
++++ b/third_party/WebKit/Source/core/dom/Document.cpp
+@@ -5926,7 +5926,15 @@ void Document::requestVisibilityImpl(){
+     bounds.setHeight(fmax(bounds.size().height()- sy, 0));
+     //XXX DMK correctly integrate ancestorOrigins and return a clientRect for the visible region of the frame
+     String s = String("{\"viewport\": {\"x\": " + String::number((int)mainViewFloatRect.x()) + ", \"y\": " + String::number((int)mainViewFloatRect.y()) + ", \"width\": " + String::number((int)mainViewFloatRect.size().width()) + ", \"height\": " + String::number((int)mainViewFloatRect.size().height()) + "},  \"visible\": {\"x\": " + String::number((int)bounds.x()) + ",  \"y\": " + String::number((int)bounds.y()) + ", \"width\": " + String::number((int)bounds.size().width()) + ", \"height\": " + String::number((int)bounds.size().height()) + "}}");
+-    this->enqueueRequestedVisibilityEvent(s);
++    DEFINE_STATIC_LOCAL(String, prev_event, ());
++    bool duplicate = false;
++    if (s == prev_event) {
++        duplicate = true;
++    }
++    prev_event = s;
++    if (!duplicate) {
++        this->enqueueRequestedVisibilityEvent(s);
++    }
+ };
+ 
+ template<unsigned type>
+-- 
+1.9.1
+

 #include "core/frame/FrameHost.h"
 #include "core/frame/LocalFrame.h"
 #include "core/frame/Location.h"
@@ -2559,6 +2560,15 @@ void FrameView::updateLifecyclePhasesInternal(DocumentLifecycle::LifecycleState
             // This was required for slimming paint v1 but is only temporarily
             // needed for slimming paint v2.
             view.compositor()->updateIfNeededRecursive();

 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 477ecab..e10fd0c 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -3914,7 +3914,6 @@ void Document::enqueueAnimationFrameEvent(Event* event)
 void Document::enqueueRequestedVisibilityEvent(const String& msg)
 {
     RequestedVisibilityEvent* event = RequestedVisibilityEvent::create(msg);
