Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ import common._
import java.io._
import scala.annotation.nowarn

// FIXME This needs a capitalization update, but that may be impossible to do
// FIXME without breaking code :/
// @deprecated("Please use CssHelpers instead; we are unifying capitalization across Lift.", "3.0")
object CSSHelpers extends ControlHelpers {
object CssHelpers extends ControlHelpers {
/**
* Adds a prefix to root relative paths in the url segments from the css content
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.specs2.mutable.Specification
import common._

class CssHelpersSpec extends Specification {
import CSSHelpers._
import CssHelpers._

"CSSParser" should {
"leave most CSS alone" in {
Expand Down
2 changes: 1 addition & 1 deletion web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {
val css = LiftRules.loadResourceAsString(cssPath);

() => {
css.map(str => CSSHelpers.fixCSS(new BufferedReader(
css.map(str => CssHelpers.fixCSS(new BufferedReader(
new StringReader(str)), prefix openOr (S.contextPath)) match {
case (Full(c), _) => CSSResponse(c)
case (x, input) => {
Expand Down
21 changes: 7 additions & 14 deletions web/webkit/src/main/scala/net/liftweb/http/LiftServlet.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,13 @@ class LiftServlet extends Loggable {
}

if (reqOrg.request.suspendResumeSupport_?) {
try {
reqOrg.request.suspend(cometTimeout)
} finally {
// FIXME This should be removed from the finally block in the next major
// FIXME Lift version; it is currently here to ensure code continues to
// FIXME work as-is during the 3.x series even if it depends on response
// FIXME handlers running when request suspension fails.
runFunction(liftResponse => {
// do the actual write on a separate thread
Schedule.schedule(() => {
reqOrg.request.resume(reqOrg, liftResponse)
}, 0.seconds)
})
}
reqOrg.request.suspend(cometTimeout)
runFunction(liftResponse => {
// do the actual write on a separate thread
Schedule.schedule(() => {
reqOrg.request.resume(reqOrg, liftResponse)
}, 0.seconds)
})

false
} else {
Expand Down
31 changes: 8 additions & 23 deletions web/webkit/src/main/scala/net/liftweb/http/SHtml.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1356,15 +1356,13 @@ trait SHtml extends Loggable {
text_*(settable.get, SFuncHolder(s => settable.set(s)), attrs: _*)

/**
* Generate an input field with type email. At some point,
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate an input field with type email.
*/
def email(value: String, func: String => Any, attrs: ElemAttr*): Elem =
email_*(value, SFuncHolder(func), attrs: _*)

/**
* Generate an email input element for the Settable. At some point
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate an email input element for the Settable.
*/
def email(settable: Settable{type ValueType = String},
attrs: ElemAttr*): Elem =
Expand All @@ -1375,15 +1373,13 @@ trait SHtml extends Loggable {
new UnprefixedAttribute("value", Text(value), Null)

/**
* Generate an input field with type url. At some point,
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate an input field with type url.
*/
def url(value: String, func: String => Any, attrs: ElemAttr*): Elem =
url_*(value, SFuncHolder(func), attrs: _*)

/**
* Generate a url input element for the Settable. At some point
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate a url input element for the Settable.
*/
def url(settable: Settable{type ValueType = String},
attrs: ElemAttr*): Elem =
Expand All @@ -1394,8 +1390,7 @@ trait SHtml extends Loggable {
new UnprefixedAttribute("value", Text(value), Null)

/**
* Generate an input field with type number. At some point,
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate an input field with type number.
*/
def number(value: Int, func: Int => Any,
min: Int, max: Int, attrs: ElemAttr*): Elem =
Expand All @@ -1404,8 +1399,7 @@ trait SHtml extends Loggable {
SFuncHolder(s => Helpers.asInt(s).map(func)), attrs: _*)

/**
* Generate a number input element for the Settable. At some point
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate a number input element for the Settable.
*/
def number(settable: Settable{type ValueType = Int},
min: Int, max: Int,
Expand All @@ -1431,8 +1425,6 @@ trait SHtml extends Loggable {
/**
* Generate an input field with type number. It allows for Double if your step is
* for example: 0.1
* At some point,
* there will be graceful fallback for non-HTML5 browsers. FIXME
*/
def number(value: Double, func: Double => Any,
min: Double, max: Double, step: Double ,
Expand All @@ -1444,8 +1436,6 @@ trait SHtml extends Loggable {
/**
* Generate a number input element for the Settable. It allows for Double if your step is
* for example: 0.1
* At some point
* there will be graceful fallback for non-HTML5 browsers. FIXME
*/
def number(settable: Settable{type ValueType = Double},
min: Double, max: Double, step: Double,
Expand All @@ -1471,8 +1461,7 @@ trait SHtml extends Loggable {
}

/**
* Generate an input field with type range. At some point,
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate an input field with type range.
*/
def range(value: Int, func: Int => Any,
min: Int, max: Int, attrs: ElemAttr*): Elem =
Expand All @@ -1481,8 +1470,7 @@ trait SHtml extends Loggable {
SFuncHolder(s => Helpers.asInt(s).map(func)), attrs: _*)

/**
* Generate a range input element for the Settable. At some point
* there will be graceful fallback for non-HTML5 browsers. FIXME
* Generate a range input element for the Settable.
*/
def range(settable: Settable{type ValueType = Int},
min: Int, max: Int,
Expand Down Expand Up @@ -2341,15 +2329,13 @@ object Html5ElemAttr {
* The autofocus attribute
*/
final case object Autofocus extends SHtml.ElemAttr {
// FIXME detect HTML5 browser and do the right thing
def apply(in: Elem): Elem = in % ("autofocus" -> "true")
}

/**
* The required attribute
*/
final case object Required extends SHtml.ElemAttr {
// FIXME detect HTML5 browser and do the right thing
def apply(in: Elem): Elem = in % ("required" -> "true")
}

Expand All @@ -2360,7 +2346,6 @@ object Html5ElemAttr {
* placeholder property in the attribute
*/
final case class Placeholder(text: StringFunc) extends SHtml.ElemAttr {
// FIXME detect HTML5 browser and do the right thing
def apply(in: Elem): Elem = in % ("placeholder" -> text.func())
}
}
Expand Down
7 changes: 0 additions & 7 deletions web/webkit/src/main/scala/net/liftweb/http/Templates.scala
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,6 @@ class StateInStatelessException(msg: String) extends SnippetFailureException(msg
}


// FIXME Needed to due to https://issues.scala-lang.org/browse/SI-6541,
// which causes existential types to be inferred for the generated
// unapply of a case class with a wildcard parameterized type.
// Ostensibly should be fixed in 2.12, which means we're a ways away
// from being able to remove this, though.
import scala.language.existentials

/**
* Holds a pair of parameters
*/
Expand Down
6 changes: 0 additions & 6 deletions web/webkit/src/main/scala/net/liftweb/sitemap/Menu.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
package net.liftweb
package sitemap

// FIXME Needed to due to https://issues.scala-lang.org/browse/SI-6541,
// which causes existential types to be inferred for the generated
// unapply of a case class with a wildcard parameterized type.
// Ostensibly should be fixed in 2.12, which means we're a ways away
// from being able to remove this, though.
import scala.language.existentials

import scala.annotation._
import net.liftweb.http._
Expand Down
Loading