diff --git a/accessible/tests/mochitest/treeupdate/Makefile.in b/accessible/tests/mochitest/treeupdate/Makefile.in index ca73261c52b..053201134d6 100644 --- a/accessible/tests/mochitest/treeupdate/Makefile.in +++ b/accessible/tests/mochitest/treeupdate/Makefile.in @@ -48,6 +48,7 @@ include $(topsrcdir)/config/rules.mk _TEST_FILES =\ test_ariadialog.html \ test_colorpicker.xul \ + test_cssoverflow.html \ test_contextmenu.xul \ test_doc.html \ test_gencontent.html \ diff --git a/accessible/tests/mochitest/treeupdate/test_cssoverflow.html b/accessible/tests/mochitest/treeupdate/test_cssoverflow.html new file mode 100644 index 00000000000..102fc976f78 --- /dev/null +++ b/accessible/tests/mochitest/treeupdate/test_cssoverflow.html @@ -0,0 +1,141 @@ + + + + Testing HTML scrollable frames (css overflow style) + + + + + + + + + + + + + + + Mozilla Bug 677154 + +

+ +
+  
+
+ +
+
+ + diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 547d931e0c1..e05e0b9cb07 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -969,10 +969,14 @@ nsHTMLScrollFrame::GetFrameName(nsAString& aResult) const already_AddRefed nsHTMLScrollFrame::CreateAccessible() { - if (!IsFocusable()) { + // Create an accessible regardless focusable state because the state can be + // changed during frame life cycle without any notifications to accessibility. + if (mContent->IsRootOfNativeAnonymousSubtree() || + GetScrollbarStyles() == nsIScrollableFrame:: + ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_HIDDEN) ) { return nsnull; } - // Focusable via CSS, so needs to be in accessibility hierarchy + nsAccessibilityService* accService = nsIPresShell::AccService(); if (accService) { return accService->CreateHyperTextAccessible(mContent,