Commit 8a089a4e authored by mitz@apple.com's avatar mitz@apple.com

WebCore:

        Reviewed by Darin Adler.

        - fix <rdar://problem/6634768> Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts

        Test: fast/events/scroll-during-zoom-change.html

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle): Pause scheduled events during style
        reclaculation. Changes to the zoom property result in scroll events
        being generated during style recalc, and those events need to be
        deferred until the render tree is consistent.
        * page/FrameView.cpp:
        (WebCore::FrameView::layout): Changed to account for a case in which the
        post-layout tasks trigger a nested layout, which reactivates the
        post-layout task timer.

LayoutTests:

        Reviewed by Darin Adler.

        - test for <rdar://problem/6634768> Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts

        * fast/events/scroll-during-zoom-change-expected.txt: Added.
        * fast/events/scroll-during-zoom-change.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9ba5b663
2009-03-01 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
- test for <rdar://problem/6634768> Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts
* fast/events/scroll-during-zoom-change-expected.txt: Added.
* fast/events/scroll-during-zoom-change.html: Added.
2009-02-28 Dan Bernstein <mitz@apple.com>
- correct a color profile mismatch in expected pixel results
......
Test for rdar://problem/6634768 Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts.
The test passed if it did not crash.
<div>
Test for <i><a href="rdar://problem/6634768">rdar://problem/6634768</a>
Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts</i>.
</div>
<div>
The test passed if it did not crash.
</div>
<div id="target" style="
overflow: auto;
height: 200px;
width: 200px;
">
<div style="height: 500px;"></div>
</div>
<script>
function scrolled(event)
{
event.target.parentNode.removeChild(event.target);
}
function test()
{
var target = document.getElementById("target");
target.scrollTop = 50;
document.body.offsetTop;
target.addEventListener("scroll", scrolled, false);
document.body.style.zoom = 2;
}
if (window.layoutTestController)
layoutTestController.dumpAsText();
test();
</script>
2009-03-01 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
- fix <rdar://problem/6634768> Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts
Test: fast/events/scroll-during-zoom-change.html
* dom/Document.cpp:
(WebCore::Document::recalcStyle): Pause scheduled events during style
reclaculation. Changes to the zoom property result in scroll events
being generated during style recalc, and those events need to be
deferred until the render tree is consistent.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Changed to account for a case in which the
post-layout tasks trigger a nested layout, which reactivates the
post-layout task timer.
2009-03-01 Ross Boucher <rboucher@gmail.com>
Alphabetically sort scripts in the Script's panel file popup menu.
......@@ -1089,8 +1089,8 @@ void Document::setDocumentChanged(bool b)
void Document::recalcStyle(StyleChange change)
{
// we should not enter style recalc while painting
if (frame() && frame()->view() && frame()->view()->isPainting()) {
ASSERT(!frame()->view()->isPainting());
if (view() && view()->isPainting()) {
ASSERT(!view()->isPainting());
return;
}
......@@ -1099,6 +1099,8 @@ void Document::recalcStyle(StyleChange change)
m_inStyleRecalc = true;
suspendPostAttachCallbacks();
if (view())
view()->pauseScheduledEvents();
ASSERT(!renderer() || renderArena());
if (!renderer() || !renderArena())
......@@ -1160,10 +1162,12 @@ bail_out:
setChanged(NoStyleChange);
setHasChangedChild(false);
setDocumentChanged(false);
if (view())
view()->resumeScheduledEvents();
resumePostAttachCallbacks();
m_inStyleRecalc = false;
// If we wanted to call implicitClose() during recalcStyle, do so now that we're finished.
if (m_closeAfterStyleRecalc) {
m_closeAfterStyleRecalc = false;
......
......@@ -596,7 +596,7 @@ void FrameView::layout(bool allowSubtree)
// Calls resumeScheduledEvents()
performPostLayoutTasks();
if (needsLayout()) {
if (!m_postLayoutTasksTimer.isActive() && needsLayout()) {
// Post-layout widget updates or an event handler made us need layout again.
// Lay out again, but this time defer widget updates and event dispatch until after
// we return.
......
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