Title: [156210] trunk
Revision
156210
Author
[email protected]
Date
2013-09-20 16:59:19 -0700 (Fri, 20 Sep 2013)

Log Message

Unreviewed, rolling out r156185.
http://trac.webkit.org/changeset/156185
https://bugs.webkit.org/show_bug.cgi?id=121727

Caused a lot of crashes in tests (Requested by ap on #webkit).

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::updateLayout):
* dom/Document.h:

LayoutTests:

* fast/dom/HTMLDocument/active-element-gets-unfocusable-expected.txt: Removed.
* fast/dom/HTMLDocument/active-element-gets-unfocusable.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (156209 => 156210)


--- trunk/LayoutTests/ChangeLog	2013-09-20 23:45:22 UTC (rev 156209)
+++ trunk/LayoutTests/ChangeLog	2013-09-20 23:59:19 UTC (rev 156210)
@@ -1,3 +1,14 @@
+2013-09-20  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r156185.
+        http://trac.webkit.org/changeset/156185
+        https://bugs.webkit.org/show_bug.cgi?id=121727
+
+        Caused a lot of crashes in tests (Requested by ap on #webkit).
+
+        * fast/dom/HTMLDocument/active-element-gets-unfocusable-expected.txt: Removed.
+        * fast/dom/HTMLDocument/active-element-gets-unfocusable.html: Removed.
+
 2013-09-20  Mario Sanchez Prada  <[email protected]>
 
         [ATK] Do not expose aria-help in ATK based platforms

Deleted: trunk/LayoutTests/fast/dom/HTMLDocument/active-element-gets-unfocusable-expected.txt (156209 => 156210)


--- trunk/LayoutTests/fast/dom/HTMLDocument/active-element-gets-unfocusable-expected.txt	2013-09-20 23:45:22 UTC (rev 156209)
+++ trunk/LayoutTests/fast/dom/HTMLDocument/active-element-gets-unfocusable-expected.txt	2013-09-20 23:59:19 UTC (rev 156210)
@@ -1,19 +0,0 @@
-Making a focused element invisible should make it blur.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-===> Setting display:none
-Event: blur
-PASS document.activeElement is document.body
-PASS The focusTarget element lost focus.
-
-===> Setting visibility:hidden
-Event: blur
-PASS document.activeElement is document.body
-PASS The focusTarget element lost focus.
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/HTMLDocument/active-element-gets-unfocusable.html (156209 => 156210)


--- trunk/LayoutTests/fast/dom/HTMLDocument/active-element-gets-unfocusable.html	2013-09-20 23:45:22 UTC (rev 156209)
+++ trunk/LayoutTests/fast/dom/HTMLDocument/active-element-gets-unfocusable.html	2013-09-20 23:59:19 UTC (rev 156210)
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<body>
-<script src=""
-
-<div id="f1">
-  <div tabindex="1" id="div1"></div>
-</div>
-
-<script type="text/_javascript_">
-description('Making a focused element invisible should make it blur.');
-jsTestIsAsync = true;
-var focusTarget = document.getElementById('div1');
-var testStage = 0;
-var testTimeout = 0;
-
-document.body._onload_ = function() {
-    focusTarget.focus();
-
-    shouldBe('document.activeElement', 'focusTarget', true);
-    debug('===> Setting display:none');
-    setTimeout("f1.style.display = 'none'",0);
-
-    testTimeout = setTimeout(function() {
-        testFailed('Timeout: Didn\'t loose focus.');
-        finishJSTest();
-    }, 1000);
-};
-
-focusTarget.addEventListener('blur', function() {
-    debug('Event: blur');
-    shouldBe('document.activeElement', 'document.body');
-    testPassed('The focusTarget element lost focus.');
-
-    debug('');
-    if (testStage++ == 0) {
-        f1.style.display = 'block';
-        focusTarget.focus();
-        shouldBe('document.activeElement', 'focusTarget', true);
-        debug('===> Setting visibility:hidden');
-        setTimeout("f1.style.visibility = 'hidden'",0);
-    } else {
-        clearTimeout(testTimeout);
-        finishJSTest();
-    }
-}, false);
-
-</script>
-<script src=""
-</body>

Modified: trunk/Source/WebCore/ChangeLog (156209 => 156210)


--- trunk/Source/WebCore/ChangeLog	2013-09-20 23:45:22 UTC (rev 156209)
+++ trunk/Source/WebCore/ChangeLog	2013-09-20 23:59:19 UTC (rev 156210)
@@ -1,3 +1,17 @@
+2013-09-20  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r156185.
+        http://trac.webkit.org/changeset/156185
+        https://bugs.webkit.org/show_bug.cgi?id=121727
+
+        Caused a lot of crashes in tests (Requested by ap on #webkit).
+
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::recalcStyle):
+        (WebCore::Document::updateLayout):
+        * dom/Document.h:
+
 2013-09-20  Dean Jackson  <[email protected]>
 
         Shaders that fail to compile should be marked as such

Modified: trunk/Source/WebCore/dom/Document.cpp (156209 => 156210)


--- trunk/Source/WebCore/dom/Document.cpp	2013-09-20 23:45:22 UTC (rev 156209)
+++ trunk/Source/WebCore/dom/Document.cpp	2013-09-20 23:59:19 UTC (rev 156210)
@@ -439,7 +439,6 @@
     , m_titleSetExplicitly(false)
     , m_markers(adoptPtr(new DocumentMarkerController))
     , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFired)
-    , m_resetHiddenFocusElementTimer(this, &Document::resetHiddenFocusElementTimer)
     , m_cssTarget(0)
     , m_processingLoadEvent(false)
     , m_loadEventFinished(false)
@@ -1828,9 +1827,6 @@
     // to check if any other elements ended up under the mouse pointer due to re-layout.
     if (m_hoveredElement && !m_hoveredElement->renderer())
         frameView.frame().eventHandler().dispatchFakeMouseMoveEventSoon();
-
-    // Style change may reset the focus, e.g. display: none, visibility: hidden.
-    resetHiddenFocusElementSoon();
 }
 
 void Document::updateStyleIfNeeded()
@@ -1869,9 +1865,6 @@
     // Only do a layout if changes have occurred that make it necessary.      
     if (frameView && renderView() && (frameView->layoutPending() || renderView()->needsLayout()))
         frameView->layout();
-
-    // Active focus element's isFocusable() state may change after Layout. e.g. width: 0px or height: 0px.
-    resetHiddenFocusElementSoon();
 }
 
 // FIXME: This is a bad idea and needs to be removed eventually.
@@ -4693,12 +4686,6 @@
     m_updateFocusAppearanceTimer.stop();
 }
 
-void Document::resetHiddenFocusElementSoon()
-{
-    if (!m_resetHiddenFocusElementTimer.isActive() && m_focusedElement && !m_focusedElement->isFocusable())
-        m_resetHiddenFocusElementTimer.startOneShot(0);
-}
-
 void Document::updateFocusAppearanceTimerFired(Timer<Document>*)
 {
     Element* element = focusedElement();
@@ -4710,12 +4697,6 @@
         element->updateFocusAppearance(m_updateFocusAppearanceRestoresSelection);
 }
 
-void Document::resetHiddenFocusElementTimer(Timer<Document>*)
-{
-    if (m_focusedElement && !m_focusedElement->isFocusable())
-        setFocusedElement(0);
-}
-
 void Document::attachRange(Range* range)
 {
     ASSERT(!m_ranges.contains(range));

Modified: trunk/Source/WebCore/dom/Document.h (156209 => 156210)


--- trunk/Source/WebCore/dom/Document.h	2013-09-20 23:45:22 UTC (rev 156209)
+++ trunk/Source/WebCore/dom/Document.h	2013-09-20 23:59:19 UTC (rev 156210)
@@ -918,9 +918,7 @@
 
     void updateFocusAppearanceSoon(bool restorePreviousSelection);
     void cancelFocusAppearanceUpdate();
-
-    void resetHiddenFocusElementSoon();
-
+        
     // Extension for manipulating canvas drawing contexts for use in CSS
     CanvasRenderingContext* getCSSCanvasContext(const String& type, const String& name, int width, int height);
     HTMLCanvasElement* getCSSCanvasElement(const String& name);
@@ -1227,8 +1225,6 @@
     void updateFocusAppearanceTimerFired(Timer<Document>*);
     void updateBaseURL();
 
-    void resetHiddenFocusElementTimer(Timer<Document>*);
-
     void buildAccessKeyMap(TreeScope* root);
 
     void createStyleResolver();
@@ -1380,7 +1376,6 @@
     const OwnPtr<DocumentMarkerController> m_markers;
     
     Timer<Document> m_updateFocusAppearanceTimer;
-    Timer<Document> m_resetHiddenFocusElementTimer;
 
     Element* m_cssTarget;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to