summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-02-08 18:33:22 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2011-02-09 18:08:46 -0800
commit3a7568b5aa8ee4ef6ba961eae690b498f5ba8e9e (patch)
tree8b3bed2574fd759eedff5a9d92f951820552cf5d /WebCore/rendering
parenta06decf9b3f66476b76925670e73fe4ac873b58f (diff)
downloadexternal_webkit-3a7568b5aa8ee4ef6ba961eae690b498f5ba8e9e.zip
external_webkit-3a7568b5aa8ee4ef6ba961eae690b498f5ba8e9e.tar.gz
external_webkit-3a7568b5aa8ee4ef6ba961eae690b498f5ba8e9e.tar.bz2
Improve the fixed element position calculation
In the previous WAR, we get the screen size from UI thread at every draw call. That is awkward. Now with Java side fix, we can get the screen size from setSize call now. However, forcing a full re-layout seems like an expensive operation. What we need to make the webkit to know the update can be done by just updating the fixed position elements only. So I have done these: 1. Take away the WAR by forcing the update at the convertToLayerCoord. 2. Get rid of the UI thread stuff used to tell WebViewCore the screen size. And get rid of the redundant variables, too. 3. update the fixed element at the setSize time. BTW, I also rename the PlatformBridge functions name. bug: 3397602 Change-Id: I0c422ecdb570de89aecb6e568d5067acf18ecfc6
Diffstat (limited to 'WebCore/rendering')
-rw-r--r--WebCore/rendering/RenderBox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 3c8e2ca..ebd7d54 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -2085,7 +2085,7 @@ int RenderBox::containingBlockWidthForPositioned(const RenderBoxModelObject* con
// That is in the doc coordindate.
if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
const RenderView* view = toRenderView(containingBlock);
- return PlatformBridge::visibleScreenWidth(view->frameView());
+ return PlatformBridge::screenWidthInDocCoord(view->frameView());
}
#endif
if (containingBlock->isBox()) {
@@ -2123,7 +2123,7 @@ int RenderBox::containingBlockHeightForPositioned(const RenderBoxModelObject* co
// That is in the doc coordindate.
if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
const RenderView* view = toRenderView(containingBlock);
- return PlatformBridge::visibleScreenHeight(view->frameView());
+ return PlatformBridge::screenHeightInDocCoord(view->frameView());
}
#endif
int heightResult = 0;