[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
slewis at apple.com
slewis at apple.com
Wed Jan 20 22:16:47 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 1eb2af836f0ced15c9af832723a36f33980876e2
Author: slewis at apple.com <slewis at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 8 01:56:08 2010 +0000
Rollout http://trac.webkit.org/changeset/52756 due to a large performance regression.
WebCore:
* dom/Document.cpp:
(WebCore::Document::updateLayout):
* editing/SelectionController.cpp:
(WebCore::SelectionController::SelectionController):
(WebCore::SelectionController::setSelection):
* editing/SelectionController.h:
* page/Frame.cpp:
(WebCore::Frame::setCaretVisible):
(WebCore::Frame::selectionLayoutChanged):
(WebCore::Frame::caretBlinkTimerFired):
(WebCore::Frame::selectionBounds):
* page/FrameView.cpp:
(WebCore::FrameView::needsLayout):
LayoutTests:
* fast/forms/selection-layout-reentry-strange-case-expected.txt: Removed.
* fast/forms/selection-layout-reentry-strange-case.html: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d9b9928..8ef549f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-07 Stephanie Lewis <slewis at apple.com>
+
+ Rollout http://trac.webkit.org/changeset/52756 due to a large performance regression.
+
+ * fast/forms/selection-layout-reentry-strange-case-expected.txt: Removed.
+ * fast/forms/selection-layout-reentry-strange-case.html: Removed.
+
2010-01-07 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
diff --git a/LayoutTests/fast/forms/selection-layout-reentry-strange-case-expected.txt b/LayoutTests/fast/forms/selection-layout-reentry-strange-case-expected.txt
deleted file mode 100644
index 811b710..0000000
--- a/LayoutTests/fast/forms/selection-layout-reentry-strange-case-expected.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-t down
-Yes, this is a strange test case. If you can see this and it did not crash, then all is well.
diff --git a/LayoutTests/fast/forms/selection-layout-reentry-strange-case.html b/LayoutTests/fast/forms/selection-layout-reentry-strange-case.html
deleted file mode 100644
index 72b96c6..0000000
--- a/LayoutTests/fast/forms/selection-layout-reentry-strange-case.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<textarea id="container">si
-<DIV abcdefgh_POSIT></DIV>
-</textarea>t down
-
-<script>
- document.execCommand("FindString", true, "sit");
- document.execCommand("FindString", true, "down");
-</script>
-
-<style></style>
-
-<script type="text/javascript">
- if (window.layoutTestController)
- layoutTestController.dumpAsText();
- document.getElementById('container').innerHTML="";
-</script>
-
-<p>Yes, this is a strange test case. If you can see this and it
-did not crash, then all is well.</p>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f759ccc..4914d03 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-07 Stephanie Lewis <slewis at apple.com>
+
+ Rollout http://trac.webkit.org/changeset/52756 due to a large performance regression.
+
+ * dom/Document.cpp:
+ (WebCore::Document::updateLayout):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::SelectionController):
+ (WebCore::SelectionController::setSelection):
+ * editing/SelectionController.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::setCaretVisible):
+ (WebCore::Frame::selectionLayoutChanged):
+ (WebCore::Frame::caretBlinkTimerFired):
+ (WebCore::Frame::selectionBounds):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::needsLayout):
+
2010-01-07 Geoffrey Garen <ggaren at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index cd94be6..0f86acf 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -3,7 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto at kde.org)
* (C) 2001 Dirk Mueller (mueller at kde.org)
* (C) 2006 Alexey Proskuryakov (ap at webkit.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2008, 2009 Google Inc. All rights reserved.
*
@@ -1411,8 +1411,9 @@ void Document::updateLayout()
updateStyleIfNeeded();
+ // Only do a layout if changes have occurred that make it necessary.
FrameView* v = view();
- if (v && v->needsLayout())
+ if (v && renderer() && (v->layoutPending() || renderer()->needsLayout()))
v->layout();
}
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index f184bfa..d083a49 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -70,7 +70,6 @@ SelectionController::SelectionController(Frame* frame, bool isDragCaretControlle
, m_isDragCaretController(isDragCaretController)
, m_isCaretBlinkingSuspended(false)
, m_focused(frame && frame->page() && frame->page()->focusController()->focusedFrame() == frame)
- , m_needsDisplayUpdate(false)
{
}
@@ -146,8 +145,7 @@ void SelectionController::setSelection(const VisibleSelection& s, bool closeTypi
if (!s.isNone())
m_frame->setFocusedNodeIfNeeded();
- setNeedsDisplayUpdate();
-
+ m_frame->selectionLayoutChanged();
// Always clear the x position used for vertical arrow navigation.
// It will be restored by the vertical arrow navigation code if necessary.
m_xPosForVerticalArrowNavigation = NoXPosForVerticalArrowNavigation;
@@ -1314,20 +1312,6 @@ bool SelectionController::isFocusedAndActive() const
return m_focused && m_frame->page() && m_frame->page()->focusController()->isActive();
}
-void SelectionController::setNeedsDisplayUpdate(bool needsUpdate)
-{
- if (m_needsDisplayUpdate == needsUpdate)
- return;
- m_needsDisplayUpdate = needsUpdate;
-
- if (!m_needsDisplayUpdate)
- return;
- FrameView* view = m_frame->view();
- if (!view)
- return;
- view->scheduleRelayout();
-}
-
#ifndef NDEBUG
void SelectionController::formatForDebugger(char* buffer, unsigned length) const
diff --git a/WebCore/editing/SelectionController.h b/WebCore/editing/SelectionController.h
index 372c28d..d03df52 100644
--- a/WebCore/editing/SelectionController.h
+++ b/WebCore/editing/SelectionController.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -124,10 +124,6 @@ public:
bool isFocusedAndActive() const;
void pageActivationChanged();
- // Selection display machinery
- void setNeedsDisplayUpdate(bool = true);
- bool needsDisplayUpdate() const { return m_needsDisplayUpdate; }
-
#ifndef NDEBUG
void formatForDebugger(char* buffer, unsigned length) const;
void showTreeForThis() const;
@@ -178,7 +174,7 @@ private:
bool m_isDragCaretController : 1;
bool m_isCaretBlinkingSuspended : 1;
bool m_focused : 1;
- bool m_needsDisplayUpdate : 1;
+
};
inline bool operator==(const SelectionController& a, const SelectionController& b)
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 54a7f06..147bf3c 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -5,7 +5,7 @@
* 2000 Simon Hausmann <hausmann at kde.org>
* 2000 Stefan Schimanski <1Stein at gmx.de>
* 2001 George Staikos <staikos at kde.org>
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2005 Alexey Proskuryakov <ap at nypop.com>
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Eric Seidel <eric at webkit.org>
@@ -563,7 +563,7 @@ void Frame::setCaretVisible(bool flag)
return;
clearCaretRectIfNeeded();
m_caretVisible = flag;
- selection()->setNeedsDisplayUpdate();
+ selectionLayoutChanged();
}
void Frame::clearCaretRectIfNeeded()
@@ -630,17 +630,9 @@ void Frame::setFocusedNodeIfNeeded()
void Frame::selectionLayoutChanged()
{
- selection()->setNeedsDisplayUpdate(false);
-
-#if ENABLE(TEXT_CARET)
- static bool alreadyInSelectionLayoutChanged;
- if (alreadyInSelectionLayoutChanged)
- return;
-
- alreadyInSelectionLayoutChanged = true;
-
bool caretRectChanged = selection()->recomputeCaretRect();
+#if ENABLE(TEXT_CARET)
bool caretBrowsing = settings() && settings()->caretBrowsingEnabled();
bool shouldBlink = m_caretVisible
&& selection()->isCaret() && (selection()->isContentEditable() || caretBrowsing);
@@ -661,8 +653,9 @@ void Frame::selectionLayoutChanged()
selection()->invalidateCaretRect();
}
}
-
- alreadyInSelectionLayoutChanged = false;
+#else
+ if (!caretRectChanged)
+ return;
#endif
RenderView* view = contentRenderer();
@@ -698,10 +691,8 @@ void Frame::selectionLayoutChanged()
void Frame::caretBlinkTimerFired(Timer<Frame>*)
{
#if ENABLE(TEXT_CARET)
- if (!m_caretVisible || !selection()->isCaret()) {
- ASSERT(selection()->needsDisplayUpdate());
- return;
- }
+ ASSERT(m_caretVisible);
+ ASSERT(selection()->isCaret());
bool caretPaint = m_caretPaint;
if (selection()->isCaretBlinkingSuspended() && caretPaint)
return;
@@ -1261,8 +1252,6 @@ void Frame::setExcludeFromTextSearch(bool exclude)
// returns FloatRect because going through IntRect would truncate any floats
FloatRect Frame::selectionBounds(bool clipToVisibleContent) const
{
- m_doc->updateLayout();
-
RenderView* root = contentRenderer();
FrameView* view = m_view.get();
if (!root || !view)
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 145d3f2..a9b2b9e 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -3,7 +3,7 @@
* 1999 Lars Knoll <knoll at kde.org>
* 1999 Antti Koivisto <koivisto at kde.org>
* 2000 Dirk Mueller <mueller at kde.org>
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
* (C) 2006 Graham Dennis (graham.dennis at gmail.com)
* (C) 2006 Alexey Proskuryakov (ap at nypop.com)
* Copyright (C) 2009 Google Inc. All rights reserved.
@@ -1216,8 +1216,7 @@ bool FrameView::needsLayout() const
|| m_layoutRoot
|| (document && document->childNeedsStyleRecalc()) // can occur when using WebKit ObjC interface
|| m_frame->needsReapplyStyles()
- || (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred)
- || m_frame->selection()->needsDisplayUpdate();
+ || (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred);
}
void FrameView::setNeedsLayout()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list