Bug 454790 - Allow programmatic selection of -moz-user-select: none frames. r=roc
authorJosh Matthews <josh@joshmatthews.net>
Thu, 12 Jan 2012 15:59:19 -0500
changeset 85590 efdfbd08a4330368aef846bfc6f45d7275826bca
parent 85589 350305686094ca4ba0ccaf57c95279571c7223d3
child 85591 35ca03af1b5e3f785e859bcde8659efd5b3a66cf
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs454790
milestone12.0a1
Bug 454790 - Allow programmatic selection of -moz-user-select: none frames. r=roc
layout/generic/nsTextFrameThebes.cpp
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -5918,25 +5918,16 @@ nsTextFrame::SetSelectedRange(PRUint32 a
 {
   NS_ASSERTION(!GetPrevContinuation(), "Should only be called for primary frame");
   DEBUG_VERIFY_NOT_DIRTY(mState);
 
   // Selection is collapsed, which can't affect text frame rendering
   if (aStart == aEnd)
     return;
 
-  if (aType == nsISelectionController::SELECTION_NORMAL) {
-    // check whether style allows selection
-    bool selectable;
-    IsSelectable(&selectable, nsnull);
-    if (!selectable) {
-      return;
-    }
-  }
-
   nsTextFrame* f = this;
   while (f && f->GetContentEnd() <= PRInt32(aStart)) {
     f = static_cast<nsTextFrame*>(f->GetNextContinuation());
   }
 
   nsPresContext* presContext = PresContext();
   while (f && f->GetContentOffset() < PRInt32(aEnd)) {
     // We may need to reflow to recompute the overflow area for