[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:46:29 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e0a513e65b94ca604ffe0b90ae7f8c3dae367f68
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 19 22:16:12 2010 +0000
2010-10-19 James Simonsen <simonjam at chromium.org>
Reviewed by Adam Barth.
Add "in select" insertion mode to parser.
This was added to the spec in:
http://html5.org/tools/web-apps-tracker?from=5520&to=5522
And as a result of:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10314
https://bugs.webkit.org/show_bug.cgi?id=47706
No new tests. Open to ideas.
* html/parser/HTMLElementStack.cpp: Added "in select" mode.
(WebCore::HTMLNames::isSelectScopeMarker): Ditto.
(WebCore::HTMLElementStack::inSelectScope): Ditto.
* html/parser/HTMLElementStack.h: Ditto.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTag): Use "in select" instead of "in table."
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 456c94c..1258fb8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-10-19 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add "in select" insertion mode to parser.
+
+ This was added to the spec in:
+ http://html5.org/tools/web-apps-tracker?from=5520&to=5522
+
+ And as a result of:
+ http://www.w3.org/Bugs/Public/show_bug.cgi?id=10314
+
+ https://bugs.webkit.org/show_bug.cgi?id=47706
+
+ No new tests. Open to ideas.
+
+ * html/parser/HTMLElementStack.cpp: Added "in select" mode.
+ (WebCore::HTMLNames::isSelectScopeMarker): Ditto.
+ (WebCore::HTMLElementStack::inSelectScope): Ditto.
+ * html/parser/HTMLElementStack.h: Ditto.
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTag): Use "in select" instead of "in table."
+ (WebCore::HTMLTreeBuilder::processEndTag): Ditto.
+
2010-10-19 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Nate Chapin.
diff --git a/WebCore/html/parser/HTMLElementStack.cpp b/WebCore/html/parser/HTMLElementStack.cpp
index 123778d..6b96291 100644
--- a/WebCore/html/parser/HTMLElementStack.cpp
+++ b/WebCore/html/parser/HTMLElementStack.cpp
@@ -113,6 +113,12 @@ inline bool isButtonScopeMarker(Element* element)
|| element->hasTagName(buttonTag);
}
+inline bool isSelectScopeMarker(Element* element)
+{
+ return !element->hasTagName(optgroupTag)
+ && !element->hasTagName(optionTag);
+}
+
}
HTMLElementStack::ElementRecord::ElementRecord(PassRefPtr<Element> element, PassOwnPtr<ElementRecord> next)
@@ -486,6 +492,17 @@ bool HTMLElementStack::inButtonScope(const QualifiedName& tagName) const
return inButtonScope(tagName.localName());
}
+bool HTMLElementStack::inSelectScope(const AtomicString& targetTag) const
+{
+ return inScopeCommon<isSelectScopeMarker>(m_top.get(), targetTag);
+}
+
+bool HTMLElementStack::inSelectScope(const QualifiedName& tagName) const
+{
+ // FIXME: Is localName() right for non-html elements?
+ return inSelectScope(tagName.localName());
+}
+
Element* HTMLElementStack::htmlElement() const
{
ASSERT(m_htmlElement);
diff --git a/WebCore/html/parser/HTMLElementStack.h b/WebCore/html/parser/HTMLElementStack.h
index 47fa603..8a8e160 100644
--- a/WebCore/html/parser/HTMLElementStack.h
+++ b/WebCore/html/parser/HTMLElementStack.h
@@ -117,6 +117,8 @@ public:
bool inTableScope(const QualifiedName&) const;
bool inButtonScope(const AtomicString& tagName) const;
bool inButtonScope(const QualifiedName&) const;
+ bool inSelectScope(const AtomicString& tagName) const;
+ bool inSelectScope(const QualifiedName&) const;
bool hasOnlyHTMLElementsInScope() const;
bool hasNumberedHeaderElementInScope() const;
diff --git a/WebCore/html/parser/HTMLTreeBuilder.cpp b/WebCore/html/parser/HTMLTreeBuilder.cpp
index a2236d5..5f90285 100644
--- a/WebCore/html/parser/HTMLTreeBuilder.cpp
+++ b/WebCore/html/parser/HTMLTreeBuilder.cpp
@@ -1422,7 +1422,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
|| token.name() == keygenTag
|| token.name() == textareaTag) {
parseError(token);
- if (!m_tree.openElements()->inTableScope(selectTag)) {
+ if (!m_tree.openElements()->inSelectScope(selectTag)) {
ASSERT(isParsingFragment());
return;
}
@@ -2279,7 +2279,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
return;
}
if (token.name() == selectTag) {
- if (!m_tree.openElements()->inTableScope(token.name())) {
+ if (!m_tree.openElements()->inSelectScope(token.name())) {
ASSERT(isParsingFragment());
parseError(token);
return;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list