WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-105486-20121220193519.patch (text/plain), 9.88 KB, created by
Tien-Ren Chen
on 2012-12-20 19:38:03 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tien-Ren Chen
Created:
2012-12-20 19:38:03 PST
Size:
9.88 KB
patch
obsolete
>Subversion Revision: 138107 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4b26fc77f6687cd5b1eda98c32546bb30fe1c69c..2bdecc24ac0bd1074e65c41eec236aa152534eb3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2012-12-20 Tien-Ren Chen <trchen@chromium.org> >+ >+ Need to re-layout fixed position elements after scale when using settings()->fixedElementsLayoutRelativeToFrame() >+ https://bugs.webkit.org/show_bug.cgi?id=105486 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In settings()->fixedElementsLayoutRelativeToFrame() mode fixed position >+ elements are layout relative to the current visible viewport, which can >+ be different from the layout viewport when using fixed-layout mode. >+ We need to notify the change of visible viewport when it is scaled. >+ >+ Test: fast/repaint/relayout-fixed-position-after-scale.html >+ >+ * page/Frame.cpp: >+ (WebCore::Frame::deviceOrPageScaleFactorChanged): >+ * page/Frame.h: >+ * page/FrameView.h: >+ * page/Page.cpp: >+ (WebCore::Page::setPageScaleFactor): >+ > 2012-12-18 ChangSeok Oh <shivamidow@gmail.com> > > [GTK][AC] Assertion failed while destroying GraphicsLayer >diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp >index fe9ce0be6b9c12ab6875b0fcc3e220c11511bd47..fc84f14e8d9df53e3f740f421db36f641e421f8f 100644 >--- a/Source/WebCore/page/Frame.cpp >+++ b/Source/WebCore/page/Frame.cpp >@@ -995,17 +995,21 @@ void Frame::resumeActiveDOMObjectsAndAnimations() > } > } > >-#if USE(ACCELERATED_COMPOSITING) > void Frame::deviceOrPageScaleFactorChanged() > { >+ if (m_page && m_page->mainFrame() == this && m_view && m_view->fixedElementsLayoutRelativeToFrame()) >+ m_view->setViewportConstrainedObjectsNeedLayout(); >+ >+#if USE(ACCELERATED_COMPOSITING) > for (Frame* child = tree()->firstChild(); child; child = child->tree()->nextSibling()) > child->deviceOrPageScaleFactorChanged(); > > RenderView* root = contentRenderer(); > if (root && root->compositor()) > root->compositor()->deviceOrPageScaleFactorChanged(); >-} > #endif >+} >+ > void Frame::notifyChromeClientWheelEventHandlerCountChanged() const > { > // Ensure that this method is being called on the main frame of the page. >diff --git a/Source/WebCore/page/Frame.h b/Source/WebCore/page/Frame.h >index 7053eb24098771807f8c449ffdc808625763597e..b0b52346a8c8372562bb9cdd31553a660aa63c0e 100644 >--- a/Source/WebCore/page/Frame.h >+++ b/Source/WebCore/page/Frame.h >@@ -159,9 +159,7 @@ namespace WebCore { > // Scale factor of this frame with respect to the container. > float frameScaleFactor() const; > >-#if USE(ACCELERATED_COMPOSITING) > void deviceOrPageScaleFactorChanged(); >-#endif > > #if ENABLE(ORIENTATION_EVENTS) > // Orientation is the interface orientation in degrees. Some examples are: >diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h >index fab37460bffb334866244f270871580a3aa4095a..cd12a716409f1161bdd252b8e92a815cc538eca8 100644 >--- a/Source/WebCore/page/FrameView.h >+++ b/Source/WebCore/page/FrameView.h >@@ -208,6 +208,7 @@ public: > void removeViewportConstrainedObject(RenderObject*); > const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { return m_viewportConstrainedObjects.get(); } > bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObjects && m_viewportConstrainedObjects->size() > 0; } >+ void setViewportConstrainedObjectsNeedLayout(); > > // Functions for querying the current scrolled position, negating the effects of overhang > // and adjusting for page scale. >@@ -467,8 +468,6 @@ private: > > bool doLayoutWithFrameFlattening(bool allowSubtree); > >- void setViewportConstrainedObjectsNeedLayout(); >- > virtual AXObjectCache* axObjectCache() const; > void notifyWidgetsInAllFrames(WidgetNotification); > void removeFromAXObjectCache(); >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index ea08de6d2fc01ad283efc1fd03aad74693b6a9a6..5d36c18b5950f0f5d4c25635e69e09a941c85cca 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -694,9 +694,7 @@ void Page::setPageScaleFactor(float scale, const IntPoint& origin) > // Transform change on RenderView doesn't trigger repaint on non-composited contents. > mainFrame()->view()->invalidateRect(IntRect(LayoutRect::infiniteRect())); > >-#if USE(ACCELERATED_COMPOSITING) > mainFrame()->deviceOrPageScaleFactorChanged(); >-#endif > > if (view && view->scrollPosition() != origin) { > if (document->renderer() && document->renderer()->needsLayout() && view->didFirstLayout()) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index db10f78f29774730a4f6ba167362e0741d823f47..212841cb05cfb47192f5c8bc65e84752b73cd096 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2012-12-20 Tien-Ren Chen <trchen@chromium.org> >+ >+ Need to re-layout fixed position elements after scale when using settings()->fixedElementsLayoutRelativeToFrame() >+ https://bugs.webkit.org/show_bug.cgi?id=105486 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In settings()->fixedElementsLayoutRelativeToFrame() mode fixed position >+ elements are layout relative to the current visible viewport, which can >+ be different from the layout viewport when using fixed-layout mode. >+ We need to notify the change of visible viewport when it is scaled. >+ >+ * fast/repaint/relayout-fixed-position-after-scale-expected.html: Added. >+ * fast/repaint/relayout-fixed-position-after-scale.html: Added. >+ * platform/mac-wk2/TestExpectations: >+ * platform/mac/TestExpectations: >+ > 2012-12-18 Filip Pizlo <fpizlo@apple.com> > > Proxies should set InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero >diff --git a/LayoutTests/fast/repaint/relayout-fixed-position-after-scale-expected.html b/LayoutTests/fast/repaint/relayout-fixed-position-after-scale-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f0ed0c057d191148d04dae3e3176a1afa7a6a14d >--- /dev/null >+++ b/LayoutTests/fast/repaint/relayout-fixed-position-after-scale-expected.html >@@ -0,0 +1,30 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<style> >+.fixed_size { >+ position:absolute; >+ background-color:#ccffcc; >+ width:100px; >+ height:100px; >+} >+.percentage_size { >+ position:absolute; >+ background-color:#ccccff; >+ width:10%; >+ height:10%; >+} >+</style> >+</head> >+<body onload="runTest();"> >+<div class="fixed_size" style="left:20px;top:40px"></div> >+<div class="fixed_size" style="right:60px;top:80px"></div> >+<div class="fixed_size" style="left:100px;bottom:120px"></div> >+<div class="fixed_size" style="right:140px;bottom:160px"></div> >+<div class="percentage_size" style="left:40%;top:35%"></div> >+<div class="percentage_size" style="right:30%;top:25%"></div> >+<div class="percentage_size" style="left:20%;bottom:15%"></div> >+<div class="percentage_size" style="right:10%;bottom:5%"></div> >+</body> >+</html> >+ >diff --git a/LayoutTests/fast/repaint/relayout-fixed-position-after-scale.html b/LayoutTests/fast/repaint/relayout-fixed-position-after-scale.html >new file mode 100644 >index 0000000000000000000000000000000000000000..cb80ec1778a1d22cc4de908b60ec5acec62b85d7 >--- /dev/null >+++ b/LayoutTests/fast/repaint/relayout-fixed-position-after-scale.html >@@ -0,0 +1,43 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title>This test is successful if fixed position elements re-layout correctly on page scale changes</title> >+<style> >+::-webkit-scrollbar { >+ width:0; >+ height:0; >+} >+.fixed_size { >+ position:fixed; >+ background-color:#ccffcc; >+ width:50px; >+ height:50px; >+} >+.percentage_size { >+ position:fixed; >+ background-color:#ccccff; >+ width:10%; >+ height:10%; >+} >+</style> >+</head> >+<body onload="runTest();"> >+<div class="fixed_size" style="left:10px;top:20px"></div> >+<div class="fixed_size" style="right:30px;top:40px"></div> >+<div class="fixed_size" style="left:50px;bottom:60px"></div> >+<div class="fixed_size" style="right:70px;bottom:80px"></div> >+<div class="percentage_size" style="left:40%;top:35%"></div> >+<div class="percentage_size" style="right:30%;top:25%"></div> >+<div class="percentage_size" style="left:20%;bottom:15%"></div> >+<div class="percentage_size" style="right:10%;bottom:5%"></div> >+<script> >+function runTest() { >+ if (window.internals) { >+ window.internals.settings.setFixedElementsLayoutRelativeToFrame(true); >+ window.internals.setPageScaleFactor(2, 0, 0); >+ } >+} >+</script> >+</body> >+</html> >+ >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index a221b7ac97e93285c72ec9a2809835ffa690c2a3..6382c442c88eab8c684c3492b36446020cb0fb19 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -363,6 +363,7 @@ sputnik/Unicode/Unicode_218/S7.6_A5.2_T1.html > > platform/mac/tiled-drawing/ [ Pass ] > fast/css/sticky/sticky-top-zoomed.html [ Pass ] >+fast/repaint/relayout-fixed-position-after-scale.html [ Pass ] > > ### END OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here > ######################################## >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 499d7c1a2939c4e9993c7b2021cb596d835c730e..9020e7c43a51d245683c1a2e5676037ee3fb8147 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1224,6 +1224,7 @@ platform/mac/tiled-drawing/ [ Skip ] > > # Can't hide scrollbars in WK1 > fast/css/sticky/sticky-top-zoomed.html [ ImageOnlyFailure ] >+fast/repaint/relayout-fixed-position-after-scale.html [ ImageOnlyFailure ] > > webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ] > webkit.org/b/100846 inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 105486
:
180254
|
180405
|
180440
|
180454
|
180462
|
185133
|
185330
|
185636
|
185637
|
186521
|
186522
|
186688
|
189217
|
189224
|
189463
|
189646
|
190632