Backed out changeset b857e7a2ab26 (bug 1174521) for timeouts in test_bug1174521.html
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 17 Jun 2015 10:12:21 +0200
changeset 249317 e20e65a1f5e8cbd017f897ab07b0d1c70be0d24e
parent 249316 7386b1f4acfc6e51e29e5a13ea2cbb91c923a925
child 249318 daefa5ea5f981ca4a0026be825c9eda09d815f90
push id28923
push userryanvm@gmail.com
push dateWed, 17 Jun 2015 18:57:11 +0000
treeherdermozilla-central@099d6cd6725e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1174521
milestone41.0a1
backs outb857e7a2ab265aa623df42e9d6ec24c9858c8324
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset b857e7a2ab26 (bug 1174521) for timeouts in test_bug1174521.html
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/test/bug1174521.html
layout/generic/test/mochitest.ini
layout/generic/test/test_bug1174521.html
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -5354,24 +5354,26 @@ nsBlockInFlowLineIterator::nsBlockInFlow
     // rline_end. So we can safely increment it (i.e. move it to one line
     // earlier) to start searching there.
     ++rline;
     while (line != line_end || rline != rline_end) {
       if (line != line_end) {
         if (line->Contains(child)) {
           *aFoundValidLine = true;
           mLine = line;
+          aFrame->SetLineCursor(line.get());
           return;
         }
         ++line;
       }
       if (rline != rline_end) {
         if (rline->Contains(child)) {
           *aFoundValidLine = true;
           mLine = rline;
+          aFrame->SetLineCursor(rline.get());
           return;
         }
         ++rline;
       }
     }
     // Didn't find the line
   }
 
@@ -6519,19 +6521,18 @@ void nsBlockFrame::ClearLineCursor()
 }
 
 void nsBlockFrame::SetupLineCursor()
 {
   if (GetStateBits() & NS_BLOCK_HAS_LINE_CURSOR
       || mLines.empty()) {
     return;
   }
-   
-  Properties().Set(LineCursorProperty(), mLines.front());
-  AddStateBits(NS_BLOCK_HAS_LINE_CURSOR);
+
+  SetLineCursor(mLines.front());
 }
 
 nsLineBox* nsBlockFrame::GetFirstLineContaining(nscoord y)
 {
   if (!(GetStateBits() & NS_BLOCK_HAS_LINE_CURSOR)) {
     return nullptr;
   }
 
@@ -6549,17 +6550,17 @@ nsLineBox* nsBlockFrame::GetFirstLineCon
   }
   while ((cursorArea.IsEmpty() || cursorArea.YMost() <= y)
          && cursor != mLines.back()) {
     cursor = cursor.next();
     cursorArea = cursor->GetVisualOverflowArea();
   }
 
   if (cursor.get() != property) {
-    props.Set(LineCursorProperty(), cursor.get());
+    SetLineCursor(cursor.get());
   }
 
   return cursor.get();
 }
 
 /* virtual */ void
 nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
 {
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -372,16 +372,20 @@ protected:
   }
 #endif
 
   NS_DECLARE_FRAME_PROPERTY(LineCursorProperty, nullptr)
   nsLineBox* GetLineCursor() {
     return (GetStateBits() & NS_BLOCK_HAS_LINE_CURSOR) ?
       static_cast<nsLineBox*>(Properties().Get(LineCursorProperty())) : nullptr;
   }
+  void SetLineCursor(nsLineBox* aCursor) {
+    Properties().Set(LineCursorProperty(), aCursor);
+    AddStateBits(NS_BLOCK_HAS_LINE_CURSOR);
+  }
 
   nsLineBox* NewLineBox(nsIFrame* aFrame, bool aIsBlock) {
     return NS_NewLineBox(PresContext()->PresShell(), aFrame, aIsBlock);
   }
   nsLineBox* NewLineBox(nsLineBox* aFromLine, nsIFrame* aFrame, int32_t aCount) {
     return NS_NewLineBox(PresContext()->PresShell(), aFromLine, aFrame, aCount);
   }
   void FreeLineBox(nsLineBox* aLine) {
deleted file mode 100644
--- a/layout/generic/test/bug1174521.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <body>
-    <div>
-      <div style="float: left; padding-top: 10px">
-        <a href="#" onclick="parent.postMessage({msg: 'DONE'}, '*'); return false;">test</a>
-      </div>
-    </div>
-    <div style="position: absolute">
-      A
-    </div>
-    B
-  </body>
-</html>
--- a/layout/generic/test/mochitest.ini
+++ b/layout/generic/test/mochitest.ini
@@ -9,17 +9,16 @@ support-files =
   plugin_clipping_helper_transformed.xhtml
   plugin_clipping_helper_table.xhtml
   plugin_clipping_lib.js
   plugin_focus_helper.html
   file_BrokenImageReference.png
   file_Dolske.png
   file_IconTestServer.sjs
   file_LoadingImageReference.png
-  bug1174521.html
 
 [test_bug240933.html]
 [test_bug263683.html]
 [test_bug288789.html]
 [test_bug290397.html]
 [test_bug323656.html]
 [test_bug344830.html]
 support-files = bug344830_testembed.svg
@@ -93,17 +92,16 @@ skip-if = buildapp == 'b2g' #Bug 931116,
 [test_bug791616.html]
 skip-if = buildapp == 'b2g' # b2g(Target should not have scrolled - got 114.10000610351562, expected 115.39999389648438) b2g-debug(Target should not have scrolled - got 114.10000610351562, expected 115.39999389648438) b2g-desktop(Target should not have scrolled - got 114.10000610351562, expected 115.39999389648438)
 [test_bug831780.html]
 [test_bug841361.html]
 [test_bug904810.html]
 [test_bug938772.html]
 [test_bug970363.html]
 [test_bug1062406.html]
-[test_bug1174521.html]
 [test_contained_plugin_transplant.html]
 skip-if = os=='win' || e10s
 [test_image_selection.html]
 [test_image_selection_2.html]
 [test_invalidate_during_plugin_paint.html]
 skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
 [test_movement_by_characters.html]
 [test_movement_by_words.html]
deleted file mode 100644
--- a/layout/generic/test/test_bug1174521.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1174521
--->
-<head>
-  <title>Test for Bug 1174521</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1174521">Mozilla Bug 1174521</a>
-<div id="content">
-  <iframe src="bug1174521.html"></iframe>
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-  onload = function() {
-    var iframe = document.querySelector("iframe");
-    var win = iframe.contentWindow;
-    var doc = iframe.contentDocument;
-    var link = doc.querySelector("a");
-    setTimeout(function() {
-      synthesizeMouseAtCenter(link, {}, win);
-    }, 0);
-  };
-
-  onmessage = function(e) {
-    ok(e.data.msg, "DONE", "We should be able to click the link");
-    SimpleTest.finish();
-  };
-
-</script>
-</pre>
-</body>
-</html>