Commit 4d373182 authored by enne@google.com's avatar enne@google.com

Add testing for --force-compositing-mode to windows.internal

https://bugs.webkit.org/show_bug.cgi?id=65777

Reviewed by Adam Barth.

.:

Add exports for Document::settings().

* Source/autotools/symbols.filter:

Source/WebCore:

Test: platform/chromium/compositing/force-compositing-mode/force-composite-empty.html

Move initial initialization to settings caching function so that RLC
picks up changes to the force compositing mode flag.

* WebCore.exp.in:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* testing/Internals.cpp:
(WebCore::Internals::setForceCompositingMode):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

Add exports for Document::settings().

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

Add empty page to test that the root gets a graphics layer.

* platform/chromium/compositing/force-compositing-mode/force-composite-empty-expected.txt: Added.
* platform/chromium/compositing/force-compositing-mode/force-composite-empty.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@92697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 46c65b3f
2011-08-08 Adrienne Walker <enne@google.com>
Add testing for --force-compositing-mode to windows.internal
https://bugs.webkit.org/show_bug.cgi?id=65777
Reviewed by Adam Barth.
Add exports for Document::settings().
* Source/autotools/symbols.filter:
2011-08-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r92683.
......
2011-08-08 Adrienne Walker <enne@google.com>
Add testing for --force-compositing-mode to windows.internal
https://bugs.webkit.org/show_bug.cgi?id=65777
Reviewed by Adam Barth.
Add empty page to test that the root gets a graphics layer.
* platform/chromium/compositing/force-compositing-mode/force-composite-empty-expected.txt: Added.
* platform/chromium/compositing/force-compositing-mode/force-composite-empty.html: Added.
2011-08-08 Ryosuke Niwa <rniwa@webkit.org>
Repeated copy and paste result in nested style elements such as b and font
(GraphicsLayer
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
)
)
)
<html>
<head>
<script>
if (window.internals)
window.internals.setForceCompositingMode(document, true);
function doTest() {
if (window.layoutTestController) {
document.getElementById("layertree").innerText = layoutTestController.layerTreeAsText();
layoutTestController.dumpAsText();
}
}
window.addEventListener("load", doTest, false);
</script>
</head>
<body>
<!-- in force compositing mode the body should get its own graphics layer -->
<pre id="layertree"></pre>
</body>
</html>
2011-08-08 Adrienne Walker <enne@google.com>
Add testing for --force-compositing-mode to windows.internal
https://bugs.webkit.org/show_bug.cgi?id=65777
Reviewed by Adam Barth.
Test: platform/chromium/compositing/force-compositing-mode/force-composite-empty.html
Move initial initialization to settings caching function so that RLC
picks up changes to the force compositing mode flag.
* WebCore.exp.in:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* testing/Internals.cpp:
(WebCore::Internals::setForceCompositingMode):
* testing/Internals.h:
* testing/Internals.idl:
2011-08-09 Alexandru Chiculita <achicu@adobe.com>
Fixing 65868 REGRESSION(r92610) caused by 65668 - Optimize floating elements lookup
......@@ -1313,6 +1313,7 @@ __ZNK7WebCore8Document4bodyEv
__ZNK7WebCore8Document4pageEv
__ZNK7WebCore8Document6domainEv
__ZNK7WebCore8Document6loaderEv
__ZNK7WebCore8Document8settingsEv
__ZNK7WebCore8IntPointcv7CGPointEv
__ZNK7WebCore8IntPointcv8_NSPointEv
__ZNK7WebCore8Position10downstreamENS_27EditingBoundaryCrossingRuleE
......
......@@ -108,16 +108,6 @@ RenderLayerCompositor::RenderLayerCompositor(RenderView* renderView)
, m_rootLayerUpdateCount(0)
#endif // PROFILE_LAYER_REBUILD
{
Settings* settings = m_renderView->document()->settings();
// Even when forcing compositing mode, ignore child frames, or this will trigger
// layer creation from the enclosing RenderIFrame.
ASSERT(m_renderView->document()->frame());
if (settings && settings->forceCompositingMode() && settings->acceleratedCompositingEnabled()
&& !m_renderView->document()->frame()->tree()->parent()) {
m_forceCompositingMode = true;
enableCompositingMode();
}
}
RenderLayerCompositor::~RenderLayerCompositor()
......@@ -143,11 +133,15 @@ void RenderLayerCompositor::cacheAcceleratedCompositingFlags()
bool hasAcceleratedCompositing = false;
bool showDebugBorders = false;
bool showRepaintCounter = false;
bool forceCompositingMode = false;
if (Settings* settings = m_renderView->document()->settings()) {
hasAcceleratedCompositing = settings->acceleratedCompositingEnabled();
showDebugBorders = settings->showDebugBorders();
showRepaintCounter = settings->showRepaintCounter();
if (!m_renderView->document()->frame()->tree()->parent())
forceCompositingMode = settings->forceCompositingMode() && hasAcceleratedCompositing;
}
// We allow the chrome to override the settings, in case the page is rendered
......@@ -162,12 +156,13 @@ void RenderLayerCompositor::cacheAcceleratedCompositingFlags()
}
}
if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter)
if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode)
setCompositingLayersNeedRebuild();
m_hasAcceleratedCompositing = hasAcceleratedCompositing;
m_showDebugBorders = showDebugBorders;
m_showRepaintCounter = showRepaintCounter;
m_forceCompositingMode = forceCompositingMode;
}
bool RenderLayerCompositor::canRender3DTransforms() const
......@@ -254,6 +249,9 @@ void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
{
m_updateCompositingLayersTimer.stop();
if (m_forceCompositingMode && !m_compositing)
enableCompositingMode(true);
if (!m_compositingDependsOnGeometry && !m_compositing)
return;
......
......@@ -37,6 +37,7 @@
#include "Page.h"
#include "RenderObject.h"
#include "RenderTreeAsText.h"
#include "Settings.h"
#include "ShadowContentElement.h"
#include "ShadowRoot.h"
......@@ -178,4 +179,14 @@ PassRefPtr<ClientRect> Internals::boundingBox(Element* element, ExceptionCode& e
return ClientRect::create(renderer->absoluteBoundingBoxRect());
}
void Internals::setForceCompositingMode(Document* document, bool enabled, ExceptionCode& ec)
{
if (!document || !document->settings()) {
ec = INVALID_ACCESS_ERR;
return;
}
document->settings()->setForceCompositingMode(enabled);
}
}
......@@ -65,6 +65,8 @@ public:
PassRefPtr<ClientRect> boundingBox(Element*, ExceptionCode&);
void setForceCompositingMode(Document*, bool enabled, ExceptionCode&);
private:
Internals();
};
......
......@@ -42,6 +42,8 @@ module window {
void setInspectorResourcesDataSizeLimits(in Document document, in long maximumResourcesContentSize, in long maximumSingleResourceContentSize) raises(DOMException);
ClientRect boundingBox(in Element element) raises(DOMException);
void setForceCompositingMode(in Document document, in boolean enabled) raises(DOMException);
};
}
2011-08-08 Adrienne Walker <enne@google.com>
Add testing for --force-compositing-mode to windows.internal
https://bugs.webkit.org/show_bug.cgi?id=65777
Reviewed by Adam Barth.
Add exports for Document::settings().
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-08-09 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Redirect didFindZoomableArea thru to the view
......
......@@ -160,6 +160,7 @@ EXPORTS
?setDisabled@MemoryCache@WebCore@@QAEX_N@Z
?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
?settings@Document@WebCore@@QBEPAVSettings@2@XZ
?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
......
......@@ -154,6 +154,7 @@ EXPORTS
?setDisabled@MemoryCache@WebCore@@QAEX_N@Z
?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
?settings@Document@WebCore@@QBEPAVSettings@2@XZ
?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
......
......@@ -62,6 +62,7 @@ _ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE;
_ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
_ZNK7WebCore7Element10shadowRootEv;
_ZNK7WebCore8Document4pageEv;
_ZNK7WebCore8Document8settingsEv;
_ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
local:
_Z*;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment