[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:51 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 6bf3b0ee5d3c88fca69d835bfa62dd63ea7f7cb7
Author: slewis at apple.com <slewis at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 8 03:06:33 2010 +0000
Rolled out http://trac.webkit.org/changeset/52778 due to rolling
out http://trac.webkit.org/changeset/52756
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* editing/SelectionController.cpp:
(WebCore::SelectionController::layout):
(WebCore::SelectionController::recomputeCaretRect):
(WebCore::SelectionController::invalidateCaretRect):
(WebCore::SelectionController::paintCaret):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::attach):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attach):
* page/Frame.cpp:
(WebCore::Frame::revealSelection):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4914d03..19a70d4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,24 @@
2010-01-07 Stephanie Lewis <slewis at apple.com>
+ Rolled out http://trac.webkit.org/changeset/52778 due to rolling
+ out http://trac.webkit.org/changeset/52756
+
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle):
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::layout):
+ (WebCore::SelectionController::recomputeCaretRect):
+ (WebCore::SelectionController::invalidateCaretRect):
+ (WebCore::SelectionController::paintCaret):
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::attach):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::attach):
+ * page/Frame.cpp:
+ (WebCore::Frame::revealSelection):
+
+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:
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 0f86acf..0d6a45b 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -1356,12 +1356,11 @@ bail_out:
setChildNeedsStyleRecalc(false);
unscheduleStyleRecalc();
- m_inStyleRecalc = false;
-
if (view())
view()->resumeScheduledEvents();
RenderWidget::resumeWidgetHierarchyUpdates();
resumePostAttachCallbacks();
+ m_inStyleRecalc = false;
// If we wanted to call implicitClose() during recalcStyle, do so now that we're finished.
if (m_closeAfterStyleRecalc) {
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index d083a49..518df45 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -817,17 +817,11 @@ void SelectionController::layout()
return;
}
+ m_selection.start().node()->document()->updateStyleIfNeeded();
+
m_caretRect = IntRect();
if (isCaret()) {
- Document* document = m_selection.start().node()->document();
-
- document->updateStyleIfNeeded();
- if (FrameView* view = document->view()) {
- if (view->needsLayout())
- view->layout();
- }
-
VisiblePosition pos(m_selection.start(), m_selection.affinity());
if (pos.isNotNull()) {
ASSERT(pos.deepEquivalent().node()->renderer());
@@ -924,7 +918,9 @@ bool SelectionController::recomputeCaretRect()
if (!m_frame)
return false;
- ASSERT(!m_frame->view() || !m_frame->view()->needsLayout());
+ FrameView* v = m_frame->document()->view();
+ if (!v)
+ return false;
if (!m_needsLayout)
return false;
@@ -960,12 +956,7 @@ void SelectionController::invalidateCaretRect()
if (!isCaret())
return;
- Document* document = m_selection.start().node()->document();
-
- if (FrameView* frameView = document->view()) {
- if (frameView->needsLayout())
- frameView->layout();
- }
+ Document* d = m_selection.start().node()->document();
// recomputeCaretRect will always return false for the drag caret,
// because its m_frame is always 0.
@@ -985,16 +976,14 @@ void SelectionController::invalidateCaretRect()
m_needsLayout = true;
if (!caretRectChanged) {
- if (RenderView* view = toRenderView(document->renderer()))
+ if (RenderView* view = toRenderView(d->renderer()))
view->repaintRectangleInViewAndCompositedLayers(caretRepaintRect(), false);
}
}
void SelectionController::paintCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect)
{
- ASSERT(!m_frame || !m_frame->view() || !m_frame->view()->needsLayout());
-
- if (!isCaret())
+ if (! m_selection.isCaret())
return;
if (m_needsLayout)
diff --git a/WebCore/html/HTMLFormControlElement.cpp b/WebCore/html/HTMLFormControlElement.cpp
index 5f53a3a..eb25c40 100644
--- a/WebCore/html/HTMLFormControlElement.cpp
+++ b/WebCore/html/HTMLFormControlElement.cpp
@@ -2,7 +2,7 @@
* Copyright (C) 1999 Lars Knoll (knoll at kde.org)
* (C) 1999 Antti Koivisto (koivisto at kde.org)
* (C) 2001 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 Apple Inc. All rights reserved.
* (C) 2006 Alexey Proskuryakov (ap at nypop.com)
*
* This library is free software; you can redistribute it and/or
@@ -116,43 +116,10 @@ void HTMLFormControlElement::parseMappedAttribute(MappedAttribute *attr)
HTMLElement::parseMappedAttribute(attr);
}
-static bool shouldAutofocus(HTMLFormControlElement* element)
-{
- if (!element->autofocus())
- return false;
- if (!element->renderer())
- return false;
- if (element->document()->ignoreAutofocus())
- return false;
- if (element->isReadOnlyFormControl())
- return false;
-
- // FIXME: Should this set of hasTagName checks be replaced by a
- // virtual member function?
- if (element->hasTagName(inputTag))
- return !static_cast<HTMLInputElement*>(element)->isInputTypeHidden();
- if (element->hasTagName(selectTag))
- return true;
- if (element->hasTagName(buttonTag))
- return true;
- if (element->hasTagName(textareaTag))
- return true;
-
- return false;
-}
-
-static void focusPostAttach(Node* element)
-{
- static_cast<Element*>(element)->focus();
- element->deref();
-}
-
void HTMLFormControlElement::attach()
{
ASSERT(!attached());
- suspendPostAttachCallbacks();
-
HTMLElement::attach();
// The call to updateFromElement() needs to go after the call through
@@ -160,13 +127,18 @@ void HTMLFormControlElement::attach()
// on the renderer.
if (renderer())
renderer()->updateFromElement();
-
- if (shouldAutofocus(this)) {
- ref();
- queuePostAttachCallback(focusPostAttach, this);
- }
-
- resumePostAttachCallbacks();
+
+ // Focus the element if it should honour its autofocus attribute.
+ // We have to determine if the element is a TextArea/Input/Button/Select,
+ // if input type hidden ignore autofocus. So if disabled or readonly.
+ bool isInputTypeHidden = false;
+ if (hasTagName(inputTag))
+ isInputTypeHidden = static_cast<HTMLInputElement*>(this)->isInputTypeHidden();
+
+ if (autofocus() && renderer() && !document()->ignoreAutofocus() && !isReadOnlyFormControl() &&
+ ((hasTagName(inputTag) && !isInputTypeHidden) || hasTagName(selectTag) ||
+ hasTagName(buttonTag) || hasTagName(textareaTag)))
+ focus();
}
void HTMLFormControlElement::insertedIntoTree(bool deep)
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index 6e23382..b2c88c5 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -2,7 +2,7 @@
* Copyright (C) 1999 Lars Knoll (knoll at kde.org)
* (C) 1999 Antti Koivisto (koivisto at kde.org)
* (C) 2001 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 Alexey Proskuryakov (ap at nypop.com)
* Copyright (C) 2007 Samuel Weinig (sam at webkit.org)
*
@@ -987,8 +987,6 @@ RenderObject *HTMLInputElement::createRenderer(RenderArena *arena, RenderStyle *
void HTMLInputElement::attach()
{
- suspendPostAttachCallbacks();
-
if (!m_inited) {
if (!m_haveType)
setInputType(getAttribute(typeAttr));
@@ -1011,8 +1009,6 @@ void HTMLInputElement::attach()
imageObj->setImageSizeForAltText();
}
}
-
- resumePostAttachCallbacks();
}
void HTMLInputElement::detach()
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 147bf3c..79beed3 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -1340,9 +1340,6 @@ HTMLFormElement *Frame::currentForm() const
void Frame::revealSelection(const ScrollAlignment& alignment, bool revealExtent)
{
- if (view()->needsLayout())
- view()->layout();
-
IntRect rect;
switch (selection()->selectionType()) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list