Diff
Modified: trunk/Source/WebKit2/ChangeLog (134330 => 134331)
--- trunk/Source/WebKit2/ChangeLog 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-13 01:26:17 UTC (rev 134331)
@@ -1,3 +1,25 @@
+2012-11-12 Anders Carlsson <[email protected]>
+
+ Send along the current remote layer tree transaction with the commit message
+ https://bugs.webkit.org/show_bug.cgi?id=102014
+
+ Reviewed by Tim Horton.
+
+ Add encode and decode member functions to RemoteLayerTreeTransaction and RemoteLayerTreeTransaction::LayerProperties.
+
+ * Shared/mac/RemoteLayerTreeTransaction.h:
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
+ (WebKit::RemoteLayerTreeTransaction::encode):
+ (WebKit::RemoteLayerTreeTransaction::decode):
+ * UIProcess/mac/RemoteLayerTreeHost.h:
+ * UIProcess/mac/RemoteLayerTreeHost.messages.in:
+ * UIProcess/mac/RemoteLayerTreeHost.mm:
+ (WebKit::RemoteLayerTreeHost::commit):
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+ (WebKit::RemoteLayerTreeContext::flushLayers):
+
2012-11-12 Brady Eidson <[email protected]>
Get rid of the CrossOriginRedirectReceived message to the NetworkProcess.
Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h (134330 => 134331)
--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h 2012-11-13 01:26:17 UTC (rev 134331)
@@ -29,6 +29,11 @@
#include <wtf/HashMap.h>
#include <wtf/text/WTFString.h>
+namespace CoreIPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
namespace WebKit {
class RemoteGraphicsLayer;
@@ -43,6 +48,9 @@
struct LayerProperties {
LayerProperties();
+ void encode(CoreIPC::ArgumentEncoder&) const;
+ static bool decode(CoreIPC::ArgumentDecoder*, LayerProperties&);
+
unsigned changedProperties;
String name;
@@ -51,6 +59,9 @@
RemoteLayerTreeTransaction();
~RemoteLayerTreeTransaction();
+ void encode(CoreIPC::ArgumentEncoder&) const;
+ static bool decode(CoreIPC::ArgumentDecoder*, RemoteLayerTreeTransaction&);
+
void layerPropertiesChanged(const RemoteGraphicsLayer*, unsigned changedProperties);
#ifndef NDEBUG
Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (134330 => 134331)
--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm 2012-11-13 01:26:17 UTC (rev 134331)
@@ -26,6 +26,9 @@
#include "config.h"
#include "RemoteLayerTreeTransaction.h"
+#include "ArgumentCoders.h"
+#include "MessageDecoder.h"
+#include "MessageEncoder.h"
#include "RemoteGraphicsLayer.h"
#include <wtf/text/CString.h>
#include <wtf/text/StringBuilder.h>
@@ -37,6 +40,27 @@
{
}
+void RemoteLayerTreeTransaction::LayerProperties::encode(CoreIPC::ArgumentEncoder& encoder) const
+{
+ encoder << changedProperties;
+
+ if (changedProperties & NameChanged)
+ encoder << name;
+}
+
+bool RemoteLayerTreeTransaction::LayerProperties::decode(CoreIPC::ArgumentDecoder* decoder, LayerProperties& result)
+{
+ if (!decoder->decode(result.changedProperties))
+ return false;
+
+ if (result.changedProperties & NameChanged) {
+ if (!decoder->decode(result.name))
+ return false;
+ }
+
+ return true;
+}
+
RemoteLayerTreeTransaction::RemoteLayerTreeTransaction()
{
}
@@ -45,6 +69,19 @@
{
}
+void RemoteLayerTreeTransaction::encode(CoreIPC::ArgumentEncoder& encoder) const
+{
+ encoder << m_changedLayerProperties;
+}
+
+bool RemoteLayerTreeTransaction::decode(CoreIPC::ArgumentDecoder* decoder, RemoteLayerTreeTransaction& result)
+{
+ if (!decoder->decode(result.m_changedLayerProperties))
+ return false;
+
+ return true;
+}
+
void RemoteLayerTreeTransaction::layerPropertiesChanged(const RemoteGraphicsLayer* graphicsLayer, unsigned changedProperties)
{
LayerProperties& layerProperties = m_changedLayerProperties.add(graphicsLayer->layerID(), LayerProperties()).iterator->value;
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h (134330 => 134331)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h 2012-11-13 01:26:17 UTC (rev 134331)
@@ -30,6 +30,7 @@
namespace WebKit {
+class RemoteLayerTreeTransaction;
class WebPageProxy;
class RemoteLayerTreeHost : CoreIPC::MessageReceiver {
@@ -45,7 +46,7 @@
void didReceiveRemoteLayerTreeHostMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
// Message handlers.
- void commit();
+ void commit(const RemoteLayerTreeTransaction&);
WebPageProxy* m_webPageProxy;
};
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in (134330 => 134331)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in 2012-11-13 01:26:17 UTC (rev 134331)
@@ -21,5 +21,5 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
messages -> RemoteLayerTreeHost {
- void Commit()
+ void Commit(WebKit::RemoteLayerTreeTransaction transaction)
}
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (134330 => 134331)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm 2012-11-13 01:26:17 UTC (rev 134331)
@@ -27,6 +27,7 @@
#include "RemoteLayerTreeHost.h"
#include "RemoteLayerTreeHostMessages.h"
+#include "RemoteLayerTreeTransaction.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
@@ -48,8 +49,10 @@
didReceiveRemoteLayerTreeHostMessage(connection, messageID, decoder);
}
-void RemoteLayerTreeHost::commit()
+void RemoteLayerTreeHost::commit(const RemoteLayerTreeTransaction& transaction)
{
+ // FIXME: Apply the transaction instead of dumping it to stderr.
+ transaction.dump();
}
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (134330 => 134331)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm 2012-11-13 01:13:50 UTC (rev 134330)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm 2012-11-13 01:26:17 UTC (rev 134331)
@@ -95,8 +95,7 @@
m_webPage->layoutIfNeeded();
m_webPage->corePage()->mainFrame()->view()->flushCompositingStateIncludingSubframes();
- // FIXME: Package up the transaction and send it to the UI process.
- m_webPage->send(Messages::RemoteLayerTreeHost::Commit());
+ m_webPage->send(Messages::RemoteLayerTreeHost::Commit(transaction));
}
} // namespace WebKit