Bug 1357169 - Back out changeset b55a8d9517c8 (bug 1320809). r=mats
authorMike Conley <mconley@mozilla.com>
Fri, 31 Mar 2017 09:46:25 -0400
changeset 354918 2a44e180f9d1b2391570776a584fa79748dfb588
parent 354917 5e53e3f11012d7b052a8fcf45df404e102eef5bb
child 354919 d5b5afcd6c583353c96608099c19c2d25a6fface
push id31716
push usercbook@mozilla.com
push dateWed, 26 Apr 2017 06:40:19 +0000
treeherdermozilla-central@08a5a97f615f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1357169, 1320809
milestone55.0a1
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
Bug 1357169 - Back out changeset b55a8d9517c8 (bug 1320809). r=mats MozReview-Commit-ID: LCiH5P1L7bD
layout/forms/nsGfxCheckboxControlFrame.cpp
layout/forms/nsGfxCheckboxControlFrame.h
--- a/layout/forms/nsGfxCheckboxControlFrame.cpp
+++ b/layout/forms/nsGfxCheckboxControlFrame.cpp
@@ -42,8 +42,27 @@ nsGfxCheckboxControlFrame::~nsGfxCheckbo
 
 #ifdef ACCESSIBILITY
 a11y::AccType
 nsGfxCheckboxControlFrame::AccessibleType()
 {
   return a11y::eHTMLCheckboxType;
 }
 #endif
+
+//------------------------------------------------------------
+bool
+nsGfxCheckboxControlFrame::IsChecked()
+{
+  nsCOMPtr<nsIDOMHTMLInputElement> elem(do_QueryInterface(mContent));
+  bool retval = false;
+  elem->GetChecked(&retval);
+  return retval;
+}
+
+bool
+nsGfxCheckboxControlFrame::IsIndeterminate()
+{
+  nsCOMPtr<nsIDOMHTMLInputElement> elem(do_QueryInterface(mContent));
+  bool retval = false;
+  elem->GetIndeterminate(&retval);
+  return retval;
+}
--- a/layout/forms/nsGfxCheckboxControlFrame.h
+++ b/layout/forms/nsGfxCheckboxControlFrame.h
@@ -20,12 +20,17 @@ public:
   virtual nsresult GetFrameName(nsAString& aResult) const override {
     return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult);
   }
 #endif
 
 #ifdef ACCESSIBILITY
   virtual mozilla::a11y::AccType AccessibleType() override;
 #endif
+
+protected:
+
+  bool IsChecked();
+  bool IsIndeterminate();
 };
 
 #endif