diff --git a/autobuild.xml b/autobuild.xml
index c14015999995b92317e77ac542ca1005151ebbac..a62f75a0c170edd5ca4a20cbcbf1d885ad6a7c2d 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1536,11 +1536,11 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>db32cc2c0d898d69d01ef61df81424e8</string>
+              <string>e632f94b6f94a9563ccdfca6da38fb27</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/307893/arch/Darwin/installer/llceflib-1.4.0.307893-darwin-307893.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308049/arch/Darwin/installer/llceflib-1.4.0.308049-darwin-308049.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
@@ -1550,18 +1550,18 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>3c7f10479a6c4e0910df91b195be393f</string>
+              <string>41454f05cea1149d5124d28fc3db6ae0</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/307893/arch/CYGWIN/installer/llceflib-1.4.0.307893-windows-307893.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308049/arch/CYGWIN/installer/llceflib-1.4.0.308049-windows-308049.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
           </map>
         </map>
         <key>version</key>
-        <string>1.4.0.307893</string>
+        <string>1.4.0.308049</string>
       </map>
       <key>llphysicsextensions_source</key>
       <map>
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index a53b453b3eca890996a9147d560abb24a491478f..ec3518100b28e0c36bf5defe0b4550b2f02a34dc 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -56,7 +56,7 @@ class MediaPluginCEF :
 private:
 	bool init();
 
-	void onPageChangedCallback(unsigned char* pixels, int width, int height);
+	void onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup);
 	void onCustomSchemeURLCallback(std::string url);
 	void onConsoleMessageCallback(std::string message, std::string source, int line);
 	void onStatusMessageCallback(std::string value);
@@ -149,13 +149,31 @@ void MediaPluginCEF::postDebugMessage(const std::string& msg)
 
 ////////////////////////////////////////////////////////////////////////////////
 //
-void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int width, int height)
+void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup)
 {
 	if (mPixels && pixels)
 	{
-		if (mWidth == width && mHeight == height)
+		if (is_popup)
 		{
-			memcpy(mPixels, pixels, mWidth * mHeight * mDepth);
+			for (int line = 0; line < height; ++line)
+			{
+				int inverted_y = mHeight - y - height;
+				int src = line * width * mDepth;
+				int dst = (inverted_y + line) * mWidth * mDepth + x * mDepth;
+
+				if (dst + width * mDepth < mWidth * mHeight * mDepth)
+				{
+					memcpy(mPixels + dst, pixels + src, width * mDepth);
+				}
+			}
+		}
+		else
+		{
+			if (mWidth == width && mHeight == height)
+			{
+				memcpy(mPixels, pixels, mWidth * mHeight * mDepth);
+			}
+			
 		}
 		setDirty(0, 0, mWidth, mHeight);
 	}
@@ -399,7 +417,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			if (message_name == "init")
 			{
 				// event callbacks from LLCefLib
-				mLLCEFLib->setOnPageChangedCallback(boost::bind(&MediaPluginCEF::onPageChangedCallback, this, _1, _2, _3));
+				mLLCEFLib->setOnPageChangedCallback(boost::bind(&MediaPluginCEF::onPageChangedCallback, this, _1, _2, _3, _4, _5, _6));
 				mLLCEFLib->setOnCustomSchemeURLCallback(boost::bind(&MediaPluginCEF::onCustomSchemeURLCallback, this, _1));
 				mLLCEFLib->setOnConsoleMessageCallback(boost::bind(&MediaPluginCEF::onConsoleMessageCallback, this, _1, _2, _3));
 				mLLCEFLib->setOnStatusMessageCallback(boost::bind(&MediaPluginCEF::onStatusMessageCallback, this, _1));