Author: amarkhel
Date: 2009-07-17 13:32:45 -0400 (Fri, 17 Jul 2009)
New Revision: 14959
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/html/LayoutRenderer.java
Log:
Fix RF-7457
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java
===================================================================
---
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java 2009-07-17
16:18:34 UTC (rev 14958)
+++
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java 2009-07-17
17:32:45 UTC (rev 14959)
@@ -132,11 +132,18 @@
if (log.isDebugEnabled()) {
log.debug("Found <title> element");
}
- } else if (context.getLastMatched() == stateManager.BASE) {
+ } else if (context.getLastMatched() == stateManager.META) {
context.send();
haveHead = true;
haveHtml = true;
if (log.isDebugEnabled()) {
+ log.debug("Found <meta> element");
+ }
+ }else if (context.getLastMatched() == stateManager.BASE) {
+ context.send();
+ haveHead = true;
+ haveHtml = true;
+ if (log.isDebugEnabled()) {
log.debug("Found <base> element");
}
} else {
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java
===================================================================
---
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java 2009-07-17
16:18:34 UTC (rev 14958)
+++
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingStateManager.java 2009-07-17
17:32:45 UTC (rev 14959)
@@ -99,6 +99,8 @@
ParserState BASE = new KeywordState("base",ELEMENT);
+ ParserState META = new KeywordState("meta",ELEMENT);
+
// Html content
ParserState HTML = new KeywordState("tml",ELEMENT);
@@ -111,7 +113,7 @@
// Inicialize parsing states
DOCUMENT.nextStates = new ParserState[]{LT,DOCUMENT};
// after < possible ! & / or start element
- LT.nextStates = new
ParserState[]{EXCLAM,PISTART,CLOSINGELEMENT,H,TITLE,BASE,ELEMENT,DOCUMENT};
+ LT.nextStates = new
ParserState[]{EXCLAM,PISTART,CLOSINGELEMENT,H,META,TITLE,BASE,ELEMENT,DOCUMENT};
//
EXCLAM.nextStates = new ParserState[]{COMMENTSTART,CDATASTART,DOCTYPESTART,DOCUMENT};
// doctype declaration
@@ -156,6 +158,7 @@
H.nextStates = new ParserState[]{HEAD,HTML,ENDELEMENT,INELEMENT,ELEMENT,LT,DOCUMENT};
HEAD.nextStates = new ParserState[]{HEAD,ENDELEMENT,INELEMENT,ELEMENT};
HTML.nextStates = new ParserState[]{HTML,ENDELEMENT,INELEMENT,ELEMENT};
+ META.nextStates = new ParserState[]{META,ENDELEMENT,INELEMENT,ELEMENT};
TITLE.nextStates = new ParserState[]{TITLE,ENDELEMENT,INELEMENT,ELEMENT};
BASE.nextStates = new ParserState[]{BASE,ENDELEMENT,INELEMENT,ELEMENT};
}
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
===================================================================
---
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2009-07-17
16:18:34 UTC (rev 14958)
+++
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2009-07-17
17:32:45 UTC (rev 14959)
@@ -358,6 +358,7 @@
} else if (haveHead) {
// <title> or <base> in the head
if (!("title".equalsIgnoreCase(element.rawname) || "base"
+ .equalsIgnoreCase(element.rawname) || "meta"
.equalsIgnoreCase(element.rawname))) {
insertResources(element.prefix, element.uri);
}
@@ -506,6 +507,7 @@
if (haveHead) {
// <title> or <base> in the head
if (!("title".equalsIgnoreCase(name.rawname) || "base"
+ .equalsIgnoreCase(name.rawname) || "meta"
.equalsIgnoreCase(name.rawname))) {
insertResources(name.prefix, name.uri);
}
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java
===================================================================
---
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java 2009-07-17
16:18:34 UTC (rev 14958)
+++
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java 2009-07-17
17:32:45 UTC (rev 14959)
@@ -232,6 +232,7 @@
if (child instanceof Element) {
String nodeName = ((Element) child).getNodeName();
if (!("title".equalsIgnoreCase(nodeName) || "base"
+ .equalsIgnoreCase(nodeName) || "meta"
.equalsIgnoreCase(nodeName))) {
break;
}
Modified:
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/html/LayoutRenderer.java
===================================================================
---
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/html/LayoutRenderer.java 2009-07-17
16:18:34 UTC (rev 14958)
+++
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/html/LayoutRenderer.java 2009-07-17
17:32:45 UTC (rev 14959)
@@ -70,7 +70,7 @@
}
// line separator.
writer.startElement(HTML.DIV_ELEM, layout);
- writer.writeAttribute(HTML.style_ATTRIBUTE, "display: block; height: 0; clear:
both; visibility: hidden;", null);
+ writer.writeAttribute(HTML.style_ATTRIBUTE, "display: block; height:
0;lineHeight:0px;fontSize:0px; clear: both; visibility: hidden;", null);
writer.writeText(".", null);
writer.endElement(HTML.DIV_ELEM);
if (null != structure.getBottom()) {