Commit 7852a874 authored by Wes Kocher's avatar Wes Kocher
Browse files

Merge m-c to fx-team, a=merge CLOSED TREE

parents a4512f74 ceefa293
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1662,7 +1662,10 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
      newAcc = new HTMLSpinnerAccessible(aContent, document);
      break;
    case eHTMLTableType:
      if (aContent->IsHTMLElement(nsGkAtoms::table))
        newAcc = new HTMLTableAccessibleWrap(aContent, document);
      else
        newAcc = new HyperTextAccessibleWrap(aContent, document);
      break;
    case eHTMLTableCellType:
      // Accessible HTML table cell should be a child of accessible HTML table
+2 −2
Original line number Diff line number Diff line
@@ -969,8 +969,8 @@ HTMLTableAccessible::IsProbablyLayoutTable()
    RETURN_LAYOUT_ANSWER(false, "Has role attribute, weak role, and role is table");
  }

  if (!mContent->IsHTMLElement(nsGkAtoms::table))
    RETURN_LAYOUT_ANSWER(true, "table built by CSS display:table style");
  NS_ASSERTION(mContent->IsHTMLElement(nsGkAtoms::table),
    "table should not be built by CSS display:table style");

  // Check if datatable attribute has "0" value.
  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::datatable,
+1 −0
Original line number Diff line number Diff line
[DEFAULT]

[test_css_tables.html]
[test_headers_ariagrid.html]
[test_headers_ariatable.html]
[test_headers_listbox.xul]
+116 −0
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
  <title>CSS display:table is not a table</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" type="text/css"
        href="chrome://mochikit/content/tests/SimpleTest/test.css" />

  <script type="application/javascript"
          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>

  <script type="application/javascript"
          src="../common.js"></script>
  <script type="application/javascript"
          src="../role.js"></script>

  <script type="application/javascript">

    function doTest()
    {
      //////////////////////////////////////////////////////////////////////////
      // elements with display:table

      // only display:table
      var accTree =
        { SECTION: [
          { TEXT_LEAF: [ ] }
        ] };
      testAccessibleTree("table1", accTree);

      // only display:table and display:table-cell
      accTree =
        { SECTION: [
          { SECTION: [
            { TEXT_LEAF: [ ] }
	        ] }
      ] };
      testAccessibleTree("table2", accTree);

      // display:table, display:table-row, and display:table-cell
      accTree =
        { SECTION: [
          { SECTION: [
            { TEXT_LEAF: [ ] }
          ] }
      ] };
      testAccessibleTree("table3", accTree);

      // display:table, display:table-row-group, display:table-row, and display:table-cell
      accTree =
        { SECTION: [
          { SECTION: [
            { TEXT_LEAF: [ ] }
          ] }
        ] };
      testAccessibleTree("table4", accTree);

      // display:inline-table
      accTree =
        { TEXT_CONTAINER: [
          { TEXT_CONTAINER: [
            { TEXT_LEAF: [ ] }
          ] }
        ] };
      testAccessibleTree("table5", accTree);

      SimpleTest.finish();
    }

    SimpleTest.waitForExplicitFinish();
    addA11yLoadEvent(doTest);
  </script>
</head>

<body>
  <a target="_blank"
     title=" div with display:table exposes table semantics"
     href="https://bugzilla.mozilla.org/show_bug.cgi?id=1007975">Mozilla Bug 1007975</a>

  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <pre id="test">
  </pre>

  <div id="table1" style="display:table">
    table1
  </div>

  <div id="table2" style="display:table">
    <div style="display:table-cell">table2</div>
  </div>

  <div id="table3" style="display:table">
    <div style="display:table-row">
      <div style="display:table-cell">table3</div>
    </div>
  </div>

  <div id="table4" style="display:table">
    <div style="display:table-row-group">
      <div style="display:table-row">
        <div style="display:table-cell">table4</div>
      </div>
    </div>
  </div>

  <div>
    <span id="table5" style="display:inline-table">
      <span style="display:table-row">
        <span style="display:table-cell">table5</div>
      </span>
    </span>
  </div>
      
</body>
</html>
+0 −19
Original line number Diff line number Diff line
@@ -128,14 +128,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
      ];
      testTableIndexes("tableinsane6", idxes);

      //////////////////////////////////////////////////////////////////////////
      // csstablecrazy1 (no rows)
      idxes = [
        [0,  1]
      ];

      testTableIndexes("csstablecrazy1", idxes);

      SimpleTest.finish();
    }

@@ -150,11 +142,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
     href="https://bugzilla.mozilla.org/show_bug.cgi?id=410052">
   Bug 410052
  </a>
  <a target="_blank"
     title="Table cell accessibles not exposed for CSS table without table-row "
     href="https://bugzilla.mozilla.org/show_bug.cgi?id=834120">
   Bug 834120
  </a>
  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <pre id="test">
@@ -419,11 +406,5 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
    </tbody>
  </table>

  <div id="csstablecrazy1"
       style="width: 100%; border: 1px solid red; display:table;">
    <div style="display:table-cell;">cell1</div>
    <div style="display:table-cell;">cell2</div>
  </div>

</body>
</html>
Loading