diff options
Diffstat (limited to 'WebCore/html')
133 files changed, 3289 insertions, 12069 deletions
diff --git a/WebCore/html/Blob.cpp b/WebCore/html/Blob.cpp deleted file mode 100644 index 3a62ab1..0000000 --- a/WebCore/html/Blob.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "Blob.h" - -#include "BlobData.h" -#include "BlobItem.h" -#include "BlobURL.h" -#include "FileSystem.h" -#include "ScriptExecutionContext.h" -#include "ThreadableBlobRegistry.h" - -namespace WebCore { - -// FIXME: To be removed when we switch to using BlobData. -Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const String& type, const BlobItemList& items) - : m_scriptExecutionContext(scriptExecutionContext) - , m_type(type) - , m_size(0) -{ - m_scriptExecutionContext->addBlob(this); - for (size_t i = 0; i < items.size(); ++i) - m_items.append(items[i]); -} - -// FIXME: To be removed when we switch to using BlobData. -Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const PassRefPtr<BlobItem>& item) - : m_scriptExecutionContext(scriptExecutionContext) - , m_size(0) -{ - m_scriptExecutionContext->addBlob(this); - m_items.append(item); -} - -// FIXME: To be removed when we switch to using BlobData. -Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const String& path) - : m_scriptExecutionContext(scriptExecutionContext) - , m_size(0) -{ - m_scriptExecutionContext->addBlob(this); - // Note: this doesn't initialize the type unlike File(path). - m_items.append(FileBlobItem::create(path)); -} - -Blob::Blob(ScriptExecutionContext* scriptExecutionContext, PassOwnPtr<BlobData> blobData, long long size) - : m_scriptExecutionContext(scriptExecutionContext) - , m_type(blobData->contentType()) - , m_size(size) -{ - ASSERT(blobData.get() && !blobData->items().isEmpty()); - - m_scriptExecutionContext->addBlob(this); - - // Create a new internal URL and register it with the provided blob data. - m_url = BlobURL::createURL(scriptExecutionContext); - ThreadableBlobRegistry::registerBlobURL(scriptExecutionContext, m_url, blobData); -} - -Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const KURL& srcURL, const String& type, long long size) - : m_scriptExecutionContext(scriptExecutionContext) - , m_type(type) - , m_size(size) -{ - m_scriptExecutionContext->addBlob(this); - - // FIXME: To be removed when we switch to using BlobData. - if (srcURL.isEmpty()) - return; - - // Create a new internal URL and register it with the same blob data as the source URL. - m_url = BlobURL::createURL(scriptExecutionContext); - ThreadableBlobRegistry::registerBlobURL(scriptExecutionContext, m_url, srcURL); -} - -Blob::~Blob() -{ - // The internal URL is only used to refer to the Blob object. So we need to unregister the URL when the object is GC-ed. - if (m_scriptExecutionContext) { - m_scriptExecutionContext->removeBlob(this); - ThreadableBlobRegistry::unregisterBlobURL(m_scriptExecutionContext, m_url); - } -} - -void Blob::contextDestroyed() -{ - ASSERT(m_scriptExecutionContext); - - // Unregister the internal URL before the context is gone. - ThreadableBlobRegistry::unregisterBlobURL(m_scriptExecutionContext, m_url); - m_scriptExecutionContext = 0; -} - -unsigned long long Blob::size() const -{ - // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to - // come up with an exception to throw if file size is not represetable. - unsigned long long size = 0; - for (size_t i = 0; i < m_items.size(); ++i) - size += m_items[i]->size(); - return size; -} - -// FIXME: To be removed when we switch to using BlobData. -const String& Blob::path() const -{ - ASSERT(m_items.size() == 1 && m_items[0]->toFileBlobItem()); - return m_items[0]->toFileBlobItem()->path(); -} - -#if ENABLE(BLOB) -PassRefPtr<Blob> Blob::slice(ScriptExecutionContext* scriptExecutionContext, long long start, long long length, const String& contentType) const -{ - if (start < 0) - start = 0; - if (length < 0) - length = 0; - - // Clamp the range if it exceeds the size limit. - unsigned long long totalSize = size(); - if (static_cast<unsigned long long>(start) > totalSize) { - start = 0; - length = 0; - } else if (static_cast<unsigned long long>(start + length) > totalSize) - length = totalSize - start; - - size_t i = 0; - BlobItemList items; - for (; i < m_items.size() && static_cast<unsigned long long>(start) >= m_items[i]->size(); ++i) - start -= m_items[i]->size(); - for (; length > 0 && i < m_items.size(); ++i) { - items.append(m_items[i]->slice(start, length)); - length -= items.last()->size(); - start = 0; - } - return Blob::create(scriptExecutionContext, contentType, items); -} -#endif // ENABLE(BLOB) - -} // namespace WebCore diff --git a/WebCore/html/Blob.h b/WebCore/html/Blob.h deleted file mode 100644 index 374a401..0000000 --- a/WebCore/html/Blob.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef Blob_h -#define Blob_h - -#include "BlobItem.h" -#include "KURL.h" -#include "PlatformString.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/Vector.h> - -namespace WebCore { - -class BlobData; -class ScriptExecutionContext; - -class Blob : public RefCounted<Blob> { -public: - // FIXME: To be removed when we switch to using BlobData. - static PassRefPtr<Blob> create(ScriptExecutionContext* scriptExecutionContext, const String& type, const BlobItemList& items) - { - return adoptRef(new Blob(scriptExecutionContext, type, items)); - } - - // For deserialization. - static PassRefPtr<Blob> create(ScriptExecutionContext* scriptExecutionContext, const KURL& srcURL, const String& type, long long size) - { - return adoptRef(new Blob(scriptExecutionContext, srcURL, type, size)); - } - - virtual ~Blob(); - - void contextDestroyed(); - - const KURL& url() const { return m_url; } - unsigned long long size() const; - const String& type() const { return m_type; } - virtual bool isFile() const { return false; } - - // FIXME: To be removed when we switch to using BlobData. - const String& path() const; - - // FIXME: To be removed when we switch to using BlobData. - const BlobItemList& items() const { return m_items; } - -#if ENABLE(BLOB) - PassRefPtr<Blob> slice(ScriptExecutionContext*, long long start, long long length, const String& contentType = String()) const; -#endif - -protected: - // FIXME: To be removed when we switch to using BlobData. - Blob(ScriptExecutionContext*, const String& type, const BlobItemList&); - Blob(ScriptExecutionContext*, const PassRefPtr<BlobItem>&); - Blob(ScriptExecutionContext*, const String& path); - - Blob(ScriptExecutionContext*, PassOwnPtr<BlobData>, long long size); - - // For deserialization. - Blob(ScriptExecutionContext*, const KURL& srcURL, const String& type, long long size); - - // FIXME: To be removed when we switch to using BlobData. - BlobItemList m_items; - - // This is an internal URL referring to the blob data associated with this object. - // It is only used by FileReader to read the blob data via loading from the blob URL resource. - KURL m_url; - - ScriptExecutionContext* m_scriptExecutionContext; - String m_type; - long long m_size; -}; - -} // namespace WebCore - -#endif // Blob_h diff --git a/WebCore/html/Blob.idl b/WebCore/html/Blob.idl deleted file mode 100644 index e063b6d..0000000 --- a/WebCore/html/Blob.idl +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - - interface Blob { - readonly attribute unsigned long long size; - readonly attribute DOMString type; - -#if !defined(LANGUAGE_OBJECTIVE_C) -#if defined(ENABLE_BLOB) && ENABLE_BLOB - [CallWith=ScriptExecutionContext] Blob slice(in long long start, in long long length, in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType); -#endif -#endif - }; - -} diff --git a/WebCore/html/BlobBuilder.cpp b/WebCore/html/BlobBuilder.cpp deleted file mode 100644 index 29a7595..0000000 --- a/WebCore/html/BlobBuilder.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "BlobBuilder.h" - -#include "Blob.h" -#include "ExceptionCode.h" -#include "LineEnding.h" -#include "TextEncoding.h" -#include <wtf/text/AtomicString.h> - -namespace WebCore { - -static CString convertToCString(const String& text, const String& endingType, ExceptionCode& ec) -{ - DEFINE_STATIC_LOCAL(AtomicString, transparent, ("transparent")); - DEFINE_STATIC_LOCAL(AtomicString, native, ("native")); - - ec = 0; - - if (endingType.isEmpty() || endingType == transparent) - return UTF8Encoding().encode(text.characters(), text.length(), EntitiesForUnencodables); - if (endingType == native) - return normalizeLineEndingsToNative(UTF8Encoding().encode(text.characters(), text.length(), EntitiesForUnencodables)); - - ec = SYNTAX_ERR; - return CString(); -} - -bool BlobBuilder::append(const String& text, const String& endingType, ExceptionCode& ec) -{ - CString cstr = convertToCString(text, endingType, ec); - if (ec) - return false; - - m_items.append(StringBlobItem::create(cstr)); - return true; -} - -bool BlobBuilder::append(const String& text, ExceptionCode& ec) -{ - return append(text, String(), ec); -} - -bool BlobBuilder::append(PassRefPtr<Blob> blob) -{ - if (blob) { - for (size_t i = 0; i < blob->items().size(); ++i) - m_items.append(blob->items()[i]); - return true; - } - return false; -} - -PassRefPtr<Blob> BlobBuilder::getBlob(ScriptExecutionContext* scriptExecutionContext, const String& contentType) const -{ - return Blob::create(scriptExecutionContext, contentType, m_items); -} - -} // namespace WebCore diff --git a/WebCore/html/BlobBuilder.h b/WebCore/html/BlobBuilder.h deleted file mode 100644 index 5d1700f..0000000 --- a/WebCore/html/BlobBuilder.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BlobBuilder_h -#define BlobBuilder_h - -#include "BlobItem.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> - -namespace WebCore { - -class Blob; -class ScriptExecutionContext; - -typedef int ExceptionCode; - -class BlobBuilder : public RefCounted<BlobBuilder> { -public: - static PassRefPtr<BlobBuilder> create() { return adoptRef(new BlobBuilder()); } - - bool append(PassRefPtr<Blob>); - bool append(const String& text, ExceptionCode&); - bool append(const String& text, const String& ending, ExceptionCode&); - - PassRefPtr<Blob> getBlob(ScriptExecutionContext*, const String& contentType = String()) const; - -private: - BlobItemList m_items; -}; - -} // namespace WebCore - -#endif // BlobBuilder_h diff --git a/WebCore/html/BlobBuilder.idl b/WebCore/html/BlobBuilder.idl deleted file mode 100644 index 53c7add..0000000 --- a/WebCore/html/BlobBuilder.idl +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - interface [ - CanBeConstructed, - GenerateNativeConverter, - NoStaticTables - ] BlobBuilder { -#if !defined(LANGUAGE_OBJECTIVE_C) - [CallWith=ScriptExecutionContext] Blob getBlob(in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType); -#endif - void append(in Blob blob); - void append(in DOMString value, in [Optional, ConvertUndefinedOrNullToNullString] DOMString endings) raises (DOMException); - }; - -} - diff --git a/WebCore/html/BlobURL.cpp b/WebCore/html/BlobURL.cpp deleted file mode 100644 index 610aac4..0000000 --- a/WebCore/html/BlobURL.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "BlobURL.h" - -#include "KURL.h" -#include "PlatformString.h" -#include "ScriptExecutionContext.h" -#include "SecurityOrigin.h" -#include "UUID.h" - -namespace WebCore { - -KURL BlobURL::createURL(ScriptExecutionContext* scriptExecutionContext) -{ - // Create the blob URL in the following format: - // blob:%escaped_origin%/%UUID% - // The origin of the host page is encoded in the URL value to allow easy lookup of the origin when the security check needs - // to be performed. - String urlString = "blob:"; - urlString += encodeWithURLEscapeSequences(scriptExecutionContext->securityOrigin()->toString()); - urlString += "/"; - urlString += createCanonicalUUIDString(); - return KURL(ParsedURLString, urlString); -} - -KURL BlobURL::getOrigin(const KURL& url) -{ - ASSERT(url.protocolIs("blob")); - - unsigned startIndex = url.pathStart(); - unsigned afterEndIndex = url.pathAfterLastSlash(); - String origin = url.string().substring(startIndex, afterEndIndex - startIndex); - return KURL(ParsedURLString, decodeURLEscapeSequences(origin)); -} - -} // namespace WebCore diff --git a/WebCore/html/BlobURL.h b/WebCore/html/BlobURL.h deleted file mode 100644 index 2ce2c85..0000000 --- a/WebCore/html/BlobURL.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BlobURL_h -#define BlobURL_h - -#include "KURL.h" - -namespace WebCore { - -class ScriptExecutionContext; - -class BlobURL { -public: - static KURL createURL(ScriptExecutionContext*); - static KURL getOrigin(const KURL&); -}; - -} - -#endif // BlobURL_h diff --git a/WebCore/html/DateComponents.cpp b/WebCore/html/DateComponents.cpp index 39dd733..8dced1d 100644 --- a/WebCore/html/DateComponents.cpp +++ b/WebCore/html/DateComponents.cpp @@ -41,10 +41,15 @@ using namespace std; namespace WebCore { -// The oldest day of Gregorian Calendar is 1582-10-15. We don't support dates older than it. -static const int gregorianStartYear = 1582; -static const int gregorianStartMonth = 9; // This is October, since months are 0 based. -static const int gregorianStartDay = 15; +// HTML5 uses ISO-8601 format with year >= 1. Gregorian calendar started in +// 1582. However, we need to support 0001-01-01 in Gregorian calendar rule. +static const int minimumYear = 1; +// Date in ECMAScript can't represent dates later than 275760-09-13T00:00Z. +// So, we have the same upper limit in HTML5 dates. +static const int maximumYear = 275760; +static const int maximumMonthInMaximumYear = 8; // This is September, since months are 0 based. +static const int maximumDayInMaximumMonth = 13; +static const int maximumWeekInMaximumYear = 37; // The week of 275760-09-13 static const int daysInMonth[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; @@ -134,19 +139,47 @@ bool DateComponents::parseYear(const UChar* src, unsigned length, unsigned start int year; if (!toInt(src, length, start, digitsLength, year)) return false; - // No support for years before Gregorian calendar. - if (year < gregorianStartYear) + if (year < minimumYear || year > maximumYear) return false; m_year = year; end = start + digitsLength; return true; } -static bool beforeGregorianStartDate(int year, int month, int monthDay) +static bool withinHTMLDateLimits(int year, int month) { - return year < gregorianStartYear - || (year == gregorianStartYear && month < gregorianStartMonth) - || (year == gregorianStartYear && month == gregorianStartMonth && monthDay < gregorianStartDay); + if (year < minimumYear) + return false; + if (year < maximumYear) + return true; + return month <= maximumMonthInMaximumYear; +} + +static bool withinHTMLDateLimits(int year, int month, int monthDay) +{ + if (year < minimumYear) + return false; + if (year < maximumYear) + return true; + if (month < maximumMonthInMaximumYear) + return true; + return monthDay <= maximumDayInMaximumMonth; +} + +static bool withinHTMLDateLimits(int year, int month, int monthDay, int hour, int minute, int second, int millisecond) +{ + if (year < minimumYear) + return false; + if (year < maximumYear) + return true; + if (month < maximumMonthInMaximumYear) + return true; + if (monthDay < maximumDayInMaximumMonth) + return true; + if (monthDay > maximumDayInMaximumMonth) + return false; + // (year, month, monthDay) = (maximumYear, maximumMonthInMaximumYear, maximumDayInMaximumMonth) + return !hour && !minute && !second && !millisecond; } bool DateComponents::addDay(int dayDiff) @@ -167,12 +200,12 @@ bool DateComponents::addDay(int dayDiff) if (month >= 12) { // month is 0-origin. month = 0; ++year; - if (year < 0) // Check for overflow. - return false; } maxDay = maxDayOfMonth(year, month); } } + if (!withinHTMLDateLimits(year, month, day)) + return false; m_year = year; m_month = month; } else if (day < 1) { @@ -189,11 +222,14 @@ bool DateComponents::addDay(int dayDiff) } day = maxDayOfMonth(year, month); } - if (beforeGregorianStartDate(year, month, day)) - return false; } + if (!withinHTMLDateLimits(year, month, day)) + return false; m_year = year; m_month = month; + } else { + if (!withinHTMLDateLimits(m_year, m_month, day)) + return false; } m_monthDay = day; return true; @@ -201,8 +237,12 @@ bool DateComponents::addDay(int dayDiff) bool DateComponents::addMinute(int minute) { + // This function is used to adjust timezone offset. So m_year, m_month, + // m_monthDay have values between the lower and higher limits. + ASSERT(withinHTMLDateLimits(m_year, m_month, m_monthDay)); + int carry; - // min can be negative or greater than 59. + // minute can be negative or greater than 59. minute += m_minute; if (minute > 59) { carry = minute / 60; @@ -213,6 +253,8 @@ bool DateComponents::addMinute(int minute) carry = -carry; ASSERT(minute >= 0 && minute <= 59); } else { + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, minute, m_second, m_millisecond)) + return false; m_minute = minute; return true; } @@ -227,12 +269,16 @@ bool DateComponents::addMinute(int minute) carry = -carry; ASSERT(hour >= 0 && hour <= 23); } else { + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, hour, minute, m_second, m_millisecond)) + return false; m_minute = minute; m_hour = hour; return true; } if (!addDay(carry)) return false; + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, hour, minute, m_second, m_millisecond)) + return false; m_minute = minute; m_hour = hour; return true; @@ -298,8 +344,7 @@ bool DateComponents::parseMonth(const UChar* src, unsigned length, unsigned star if (!toInt(src, length, index, 2, month) || month < 1 || month > 12) return false; --month; - // No support for months before Gregorian calendar. - if (beforeGregorianStartDate(m_year, month, gregorianStartDay)) + if (!withinHTMLDateLimits(m_year, month)) return false; m_month = month; end = index + 2; @@ -323,8 +368,7 @@ bool DateComponents::parseDate(const UChar* src, unsigned length, unsigned start int day; if (!toInt(src, length, index, 2, day) || day < 1 || day > maxDayOfMonth(m_year, m_month)) return false; - // No support for dates before Gregorian calendar. - if (m_year == gregorianStartYear && m_month == gregorianStartMonth && day < gregorianStartDay) + if (!withinHTMLDateLimits(m_year, m_month, day)) return false; m_monthDay = day; end = index + 2; @@ -352,8 +396,7 @@ bool DateComponents::parseWeek(const UChar* src, unsigned length, unsigned start int week; if (!toInt(src, length, index, 2, week) || week < 1 || week > maxWeekNumberInYear()) return false; - // No support for years older than or equals to Gregorian calendar start year. - if (m_year <= gregorianStartYear) + if (m_year == maximumYear && week > maximumWeekInMaximumYear) return false; m_week = week; end = index + 2; @@ -429,6 +472,8 @@ bool DateComponents::parseDateTimeLocal(const UChar* src, unsigned length, unsig ++index; if (!parseTime(src, length, index, end)) return false; + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, m_minute, m_second, m_millisecond)) + return false; m_type = DateTimeLocal; return true; } @@ -448,6 +493,8 @@ bool DateComponents::parseDateTime(const UChar* src, unsigned length, unsigned s return false; if (!parseTimeZone(src, length, index, end)) return false; + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, m_minute, m_second, m_millisecond)) + return false; m_type = DateTime; return true; } @@ -485,7 +532,7 @@ bool DateComponents::setMillisecondsSinceEpochForDate(double ms) return false; if (!setMillisecondsSinceEpochForDateInternal(round(ms))) return false; - if (beforeGregorianStartDate(m_year, m_month, m_monthDay)) + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay)) return false; m_type = Date; return true; @@ -500,7 +547,7 @@ bool DateComponents::setMillisecondsSinceEpochForDateTime(double ms) setMillisecondsSinceMidnightInternal(positiveFmod(ms, msPerDay)); if (!setMillisecondsSinceEpochForDateInternal(ms)) return false; - if (beforeGregorianStartDate(m_year, m_month, m_monthDay)) + if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, m_minute, m_second, m_millisecond)) return false; m_type = DateTime; return true; @@ -522,8 +569,7 @@ bool DateComponents::setMillisecondsSinceEpochForMonth(double ms) return false; if (!setMillisecondsSinceEpochForDateInternal(round(ms))) return false; - // Ignore m_monthDay updated by setMillisecondsSinceEpochForDateInternal(). - if (beforeGregorianStartDate(m_year, m_month, gregorianStartDay)) + if (!withinHTMLDateLimits(m_year, m_month)) return false; m_type = Month; return true; @@ -546,11 +592,11 @@ bool DateComponents::setMonthsSinceEpoch(double months) months = round(months); double doubleMonth = positiveFmod(months, 12); double doubleYear = 1970 + (months - doubleMonth) / 12; - if (doubleYear < gregorianStartYear || numeric_limits<int>::max() < doubleYear) + if (doubleYear < minimumYear || maximumYear < doubleYear) return false; int year = static_cast<int>(doubleYear); int month = static_cast<int>(doubleMonth); - if (beforeGregorianStartDate(year, month, gregorianStartDay)) + if (!withinHTMLDateLimits(year, month)) return false; m_year = year; m_month = month; @@ -576,8 +622,7 @@ bool DateComponents::setMillisecondsSinceEpochForWeek(double ms) ms = round(ms); m_year = msToYear(ms); - // We don't support gregorianStartYear. Week numbers are undefined in that year. - if (m_year <= gregorianStartYear) + if (m_year < minimumYear || m_year > maximumYear) return false; int yearDay = dayInYear(ms, m_year); @@ -585,7 +630,7 @@ bool DateComponents::setMillisecondsSinceEpochForWeek(double ms) if (yearDay < offset) { // The day belongs to the last week of the previous year. m_year--; - if (m_year <= gregorianStartYear) + if (m_year <= minimumYear) return false; m_week = maxWeekNumberInYear(); } else { @@ -594,6 +639,8 @@ bool DateComponents::setMillisecondsSinceEpochForWeek(double ms) m_year++; m_week = 1; } + if (m_year > maximumYear || (m_year == maximumYear && m_week > maximumWeekInMaximumYear)) + return false; } m_type = Week; return true; diff --git a/WebCore/html/DateComponents.h b/WebCore/html/DateComponents.h index efc3248..9bce0c3 100644 --- a/WebCore/html/DateComponents.h +++ b/WebCore/html/DateComponents.h @@ -137,17 +137,16 @@ public: // Minimum and maxmimum limits for setMillisecondsSince*(), // setMonthsSinceEpoch(), millisecondsSinceEpoch(), and monthsSinceEpoch(). - static inline double minimumDate() { return -12219292800000.0; } // This means 1582-10-15T00:00Z. - static inline double minimumDateTime() { return -12219292800000.0; } // ditto. - static inline double minimumMonth() { return (1582.0 - 1970) * 12 + 10 - 1; } // 1582-10 + static inline double minimumDate() { return -62135596800000.0; } // 0001-01-01T00:00Z + static inline double minimumDateTime() { return -62135596800000.0; } // ditto. + static inline double minimumMonth() { return (1 - 1970) * 12.0 + 1 - 1; } // 0001-01 static inline double minimumTime() { return 0; } // 00:00:00.000 - static inline double minimumWeek() { return -12212380800000.0; } // 1583-01-03, the first Monday of 1583. - static inline double maximumDate() { return std::numeric_limits<double>::max(); } - static inline double maximumDateTime() { return std::numeric_limits<double>::max(); } - // DateComponents::m_year can't represent a year greater than INT_MAX. - static inline double maximumMonth() { return (std::numeric_limits<int>::max() - 1970) * 12.0 + 12 - 1; } + static inline double minimumWeek() { return -62135596800000.0; } // 0001-01-01, the first Monday of 0001. + static inline double maximumDate() { return 8640000000000000.0; } // 275760-09-13T00:00Z + static inline double maximumDateTime() { return 8640000000000000.0; } // ditto. + static inline double maximumMonth() { return (275760 - 1970) * 12.0 + 9 - 1; } // 275760-09 static inline double maximumTime() { return 86399999; } // 23:59:59.999 - static inline double maximumWeek() { return std::numeric_limits<double>::max(); } + static inline double maximumWeek() { return 8639999568000000.0; } // 275760-09-08, the Monday of the week including 275760-09-13. private: // Returns the maximum week number in this DateComponents's year. diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp deleted file mode 100644 index 253cb4d..0000000 --- a/WebCore/html/File.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "File.h" - -#include "BlobData.h" -#include "FileSystem.h" -#include "MIMETypeRegistry.h" - -namespace WebCore { - -File::File(ScriptExecutionContext* scriptExecutionContext, const String& path) - : Blob(scriptExecutionContext, path) -{ - Init(); -} - -File::File(ScriptExecutionContext* scriptExecutionContext, const String& path, const KURL& url, const String& type) - : Blob(scriptExecutionContext, url, type, BlobDataItem::toEndOfFile) -{ - // FIXME: To be removed when we switch to using BlobData. - m_items.append(FileBlobItem::create(path)); -} - -#if ENABLE(DIRECTORY_UPLOAD) -File::File(ScriptExecutionContext* scriptExecutionContext, const String& relativePath, const String& filePath) - : Blob(scriptExecutionContext, FileBlobItem::create(filePath, relativePath)) -{ - Init(); -} -#endif - -void File::Init() -{ - // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure. - const String& fileName = name(); - size_t index = fileName.reverseFind('.'); - if (index != notFound) - m_type = MIMETypeRegistry::getMIMETypeForExtension(fileName.substring(index + 1)); -} - -const String& File::name() const -{ - return items().at(0)->toFileBlobItem()->name(); -} - -#if ENABLE(DIRECTORY_UPLOAD) -const String& File::webkitRelativePath() const -{ - return items().at(0)->toFileBlobItem()->relativePath(); -} -#endif - -} // namespace WebCore diff --git a/WebCore/html/File.h b/WebCore/html/File.h deleted file mode 100644 index 06a73c5..0000000 --- a/WebCore/html/File.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef File_h -#define File_h - -#include "Blob.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> - -namespace WebCore { - -class File : public Blob { -public: - static PassRefPtr<File> create(ScriptExecutionContext* scriptExecutionContext, const String& path) - { - return adoptRef(new File(scriptExecutionContext, path)); - } - - // For deserialization. - static PassRefPtr<File> create(ScriptExecutionContext* scriptExecutionContext, const String& path, const KURL& url, const String& type) - { - return adoptRef(new File(scriptExecutionContext, path, url, type)); - } - -#if ENABLE(DIRECTORY_UPLOAD) - static PassRefPtr<File> create(ScriptExecutionContext* scriptExecutionContext, const String& relativePath, const String& path) - { - return adoptRef(new File(scriptExecutionContext, relativePath, path)); - } -#endif - - virtual bool isFile() const { return true; } - - const String& name() const; -#if ENABLE(DIRECTORY_UPLOAD) - // Returns the relative path of this file in the context of a directory selection. - const String& webkitRelativePath() const; -#endif - - // FIXME: obsolete attributes. To be removed. - const String& fileName() const { return name(); } - unsigned long long fileSize() const { return size(); } - -private: - File(ScriptExecutionContext*, const String& path); - - // For deserialization. - File(ScriptExecutionContext*, const String& path, const KURL&, const String& type); - -#if ENABLE(DIRECTORY_UPLOAD) - File(ScriptExecutionContext*, const String& relativePath, const String& path); -#endif - - void Init(); -}; - -} // namespace WebCore - -#endif // FileList_h diff --git a/WebCore/html/File.idl b/WebCore/html/File.idl deleted file mode 100644 index 5626c8e..0000000 --- a/WebCore/html/File.idl +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - - interface [ - GenerateNativeConverter, - GenerateToJS - ] File : Blob { - readonly attribute DOMString name; -#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD - readonly attribute DOMString webkitRelativePath; -#endif - - // FIXME: obsolete attributes. To be removed. - readonly attribute DOMString fileName; - readonly attribute unsigned long long fileSize; - }; - -} diff --git a/WebCore/html/FileError.h b/WebCore/html/FileError.h deleted file mode 100644 index 1c74c07..0000000 --- a/WebCore/html/FileError.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileError_h -#define FileError_h - -#if ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#include "ExceptionCode.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> - -namespace WebCore { - -class FileError : public RefCounted<FileError> { -public: - static PassRefPtr<FileError> create(ExceptionCode code) { return adoptRef(new FileError(code)); } - - ExceptionCode code() const { return m_code; } - -private: - FileError(ExceptionCode code) - : m_code(code) - { } - - ExceptionCode m_code; -}; - -} // namespace WebCore - -#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#endif // FileError_h diff --git a/WebCore/html/FileError.idl b/WebCore/html/FileError.idl deleted file mode 100644 index 3423e72..0000000 --- a/WebCore/html/FileError.idl +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - interface [ - Conditional=BLOB|FILE_WRITER, - DontCheckEnums - ] FileError { -#if !defined(LANGUAGE_OBJECTIVE_C) - const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; - const unsigned short NOT_FOUND_ERR = 8; -#endif - const unsigned short SECURITY_ERR = 18; - const unsigned short ABORT_ERR = 20; - const unsigned short NOT_READABLE_ERR = 24; - const unsigned short ENCODING_ERR = 26; - readonly attribute unsigned short code; - }; -} diff --git a/WebCore/html/FileList.cpp b/WebCore/html/FileList.cpp deleted file mode 100644 index ba81087..0000000 --- a/WebCore/html/FileList.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FileList.h" - -#include "File.h" - -namespace WebCore { - -FileList::FileList() -{ -} - -File* FileList::item(unsigned index) const -{ - if (index >= m_files.size()) - return 0; - return m_files[index].get(); -} - -} // namespace WebCore diff --git a/WebCore/html/FileList.h b/WebCore/html/FileList.h deleted file mode 100644 index e078191..0000000 --- a/WebCore/html/FileList.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileList_h -#define FileList_h - -#include "File.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/RefPtr.h> -#include <wtf/Vector.h> - -namespace WebCore { - - class FileList : public RefCounted<FileList> { - public: - static PassRefPtr<FileList> create() - { - return adoptRef(new FileList); - } - - unsigned length() const { return m_files.size(); } - File* item(unsigned index) const; - - bool isEmpty() const { return m_files.isEmpty(); } - void clear() { m_files.clear(); } - void append(PassRefPtr<File> file) { m_files.append(file); } - - private: - FileList(); - - Vector<RefPtr<File> > m_files; - }; - -} // namespace WebCore - -#endif // FileList_h diff --git a/WebCore/html/FileList.idl b/WebCore/html/FileList.idl deleted file mode 100644 index 6baf3e1..0000000 --- a/WebCore/html/FileList.idl +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - - interface [ - HasIndexGetter - ] FileList { - readonly attribute unsigned long length; - File item(in [IsIndex] unsigned long index); - }; - -} diff --git a/WebCore/html/FileReader.cpp b/WebCore/html/FileReader.cpp deleted file mode 100644 index d600d40..0000000 --- a/WebCore/html/FileReader.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(BLOB) - -#include "FileReader.h" - -#include "Base64.h" -#include "Blob.h" -#include "File.h" -#include "FileStreamProxy.h" -#include "Logging.h" -#include "ProgressEvent.h" -#include "ScriptExecutionContext.h" -#include "TextResourceDecoder.h" -#include <wtf/CurrentTime.h> - -namespace WebCore { - -const unsigned bufferSize = 1024; -const double progressNotificationIntervalMS = 50; - -FileReader::FileReader(ScriptExecutionContext* context) - : ActiveDOMObject(context, this) - , m_state(None) - , m_readType(ReadFileAsBinaryString) - , m_result("") - , m_isRawDataConverted(false) - , m_bytesLoaded(0) - , m_totalBytes(0) - , m_lastProgressNotificationTimeMS(0) -{ - m_buffer.resize(bufferSize); -} - -FileReader::~FileReader() -{ - terminate(); -} - -bool FileReader::hasPendingActivity() const -{ - return (m_state != None && m_state != Completed) || ActiveDOMObject::hasPendingActivity(); -} - -bool FileReader::canSuspend() const -{ - // FIXME: It is not currently possible to suspend a FileReader, so pages with FileReader can not go into page cache. - return false; -} - -void FileReader::stop() -{ - terminate(); -} - -void FileReader::readAsBinaryString(Blob* fileBlob) -{ - if (!fileBlob) - return; - - // FIXME: needs to handle non-file blobs. - LOG(FileAPI, "FileReader: reading as binary: %s\n", fileBlob->path().utf8().data()); - - readInternal(fileBlob, ReadFileAsBinaryString); -} - -void FileReader::readAsText(Blob* fileBlob, const String& encoding) -{ - if (!fileBlob) - return; - - // FIXME: needs to handle non-file blobs. - LOG(FileAPI, "FileReader: reading as text: %s\n", fileBlob->path().utf8().data()); - - if (!encoding.isEmpty()) - m_encoding = TextEncoding(encoding); - readInternal(fileBlob, ReadFileAsText); -} - -void FileReader::readAsDataURL(File* file) -{ - if (!file) - return; - - LOG(FileAPI, "FileReader: reading as data URL: %s\n", file->path().utf8().data()); - - m_fileType = file->type(); - readInternal(file, ReadFileAsDataURL); -} - -void FileReader::readInternal(Blob* fileBlob, ReadType type) -{ - // readAs*** methods() can be called multiple times. Only the last call before the actual reading happens is processed. - if (m_state != None && m_state != Starting) - return; - - m_fileBlob = fileBlob; - m_readType = type; - m_state = Starting; - - // When FileStreamProxy is created, FileReader::didStart() will get notified on the File thread and we will start - // opening and reading the file since then. - if (!m_streamProxy.get()) - m_streamProxy = FileStreamProxy::create(scriptExecutionContext(), this); -} - -void FileReader::abort() -{ - LOG(FileAPI, "FileReader: aborting\n"); - - terminate(); - - m_result = ""; - m_error = FileError::create(ABORT_ERR); - - fireEvent(eventNames().errorEvent); - fireEvent(eventNames().abortEvent); - fireEvent(eventNames().loadendEvent); -} - -void FileReader::terminate() -{ - if (m_streamProxy) { - m_streamProxy->stop(); - m_streamProxy = 0; - } - m_state = Completed; -} - -void FileReader::didStart() -{ - m_state = Opening; - - ASSERT(m_fileBlob->items().size() == 1 && m_fileBlob->items().at(0)->toFileBlobItem()); - const FileRangeBlobItem* fileRangeItem = m_fileBlob->items().at(0)->toFileRangeBlobItem(); - double expectedModificationTime = fileRangeItem ? fileRangeItem->snapshotModificationTime() : 0; - - m_streamProxy->getSize(m_fileBlob->path(), expectedModificationTime); -} - -void FileReader::didGetSize(long long size) -{ - // If the size is -1, it means the file has been moved or changed. Fail now. - if (size == -1) { - didFail(NOT_FOUND_ERR); - return; - } - - m_state = Reading; - fireEvent(eventNames().loadstartEvent); - - ASSERT(m_fileBlob->items().size() == 1 && m_fileBlob->items().at(0)->toFileBlobItem()); - const FileRangeBlobItem* fileRangeItem = m_fileBlob->items().at(0)->toFileRangeBlobItem(); - long long start = fileRangeItem ? fileRangeItem->start() : 0; - - // The size passed back is the size of the whole file. If the underlying item is a sliced file, we need to use the slice length. - m_totalBytes = fileRangeItem ? fileRangeItem->size() : size; - - m_streamProxy->openForRead(m_fileBlob->path(), start, m_totalBytes); -} - -void FileReader::didOpen(bool success) -{ - if (!success) { - didFail(NOT_READABLE_ERR); - return; - } - - m_streamProxy->read(m_buffer.data(), m_buffer.size()); -} - -void FileReader::didRead(int bytesRead) -{ - // Bail out if we have aborted the reading. - if (m_state == Completed) - return; - - // If bytesRead is -1, it means an error happens. - if (bytesRead == -1) { - didFail(NOT_READABLE_ERR); - return; - } - - // If bytesRead is 0, it means the reading is done. - if (!bytesRead) { - didFinish(); - return; - } - - switch (m_readType) { - case ReadFileAsBinaryString: - m_result += String(m_buffer.data(), static_cast<unsigned>(bytesRead)); - break; - case ReadFileAsText: - case ReadFileAsDataURL: - m_rawData.append(m_buffer.data(), static_cast<unsigned>(bytesRead)); - m_isRawDataConverted = false; - break; - default: - ASSERT_NOT_REACHED(); - } - - m_bytesLoaded += bytesRead; - - // Fire the progress event at least every 50ms. - double now = WTF::currentTimeMS(); - if (!m_lastProgressNotificationTimeMS) - m_lastProgressNotificationTimeMS = now; - else if (now - m_lastProgressNotificationTimeMS > progressNotificationIntervalMS) { - fireEvent(eventNames().progressEvent); - m_lastProgressNotificationTimeMS = now; - } - - // Continue reading. - m_streamProxy->read(m_buffer.data(), m_buffer.size()); -} - -void FileReader::didFinish() -{ - m_state = Completed; - - m_streamProxy->close(); - - fireEvent(eventNames().loadEvent); - fireEvent(eventNames().loadendEvent); -} - -void FileReader::didFail(ExceptionCode ec) -{ - m_state = Completed; - m_error = FileError::create(ec); - - m_streamProxy->close(); - - fireEvent(eventNames().errorEvent); - fireEvent(eventNames().loadendEvent); -} - -void FileReader::fireEvent(const AtomicString& type) -{ - // FIXME: the current ProgressEvent uses "unsigned long" for total and loaded attributes. Need to talk with the spec writer to resolve the issue. - dispatchEvent(ProgressEvent::create(type, true, static_cast<unsigned>(m_bytesLoaded), static_cast<unsigned>(m_totalBytes))); -} - -FileReader::ReadyState FileReader::readyState() const -{ - switch (m_state) { - case None: - case Starting: - return EMPTY; - case Opening: - case Reading: - return LOADING; - case Completed: - return DONE; - } - ASSERT_NOT_REACHED(); - return EMPTY; -} - -const ScriptString& FileReader::result() -{ - // If reading as binary string, we can return the result immediately. - if (m_readType == ReadFileAsBinaryString) - return m_result; - - // If we already convert the raw data received so far, we can return the result now. - if (m_isRawDataConverted) - return m_result; - m_isRawDataConverted = true; - - if (m_readType == ReadFileAsText) - convertToText(); - // For data URL, we only do the coversion until we receive all the raw data. - else if (m_readType == ReadFileAsDataURL && m_state == Completed) - convertToDataURL(); - - return m_result; -} - -void FileReader::convertToText() -{ - if (!m_rawData.size()) { - m_result = ""; - return; - } - - // Decode the data. - // The File API spec says that we should use the supplied encoding if it is valid. However, we choose to ignore this - // requirement in order to be consistent with how WebKit decodes the web content: always has the BOM override the - // provided encoding. - // FIXME: consider supporting incremental decoding to improve the perf. - if (!m_decoder) - m_decoder = TextResourceDecoder::create("text/plain", m_encoding.isValid() ? m_encoding : UTF8Encoding()); - m_result = m_decoder->decode(&m_rawData.at(0), m_rawData.size()); - - if (m_state == Completed && !m_error) - m_result += m_decoder->flush(); -} - -void FileReader::convertToDataURL() -{ - m_result = "data:"; - - if (!m_rawData.size()) - return; - - m_result += m_fileType; - if (!m_fileType.isEmpty()) - m_result += ";"; - m_result += "base64,"; - - Vector<char> out; - base64Encode(m_rawData, out); - out.append('\0'); - m_result += out.data(); -} - -} // namespace WebCore - -#endif // ENABLE(BLOB) diff --git a/WebCore/html/FileReader.h b/WebCore/html/FileReader.h deleted file mode 100644 index ee15968..0000000 --- a/WebCore/html/FileReader.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileReader_h -#define FileReader_h - -#if ENABLE(BLOB) - -#include "ActiveDOMObject.h" -#include "EventTarget.h" -#include "FileError.h" -#include "FileStreamClient.h" -#include "PlatformString.h" -#include "ScriptString.h" -#include "TextEncoding.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/RefPtr.h> -#include <wtf/Vector.h> - -namespace WebCore { - -class Blob; -class File; -class FileStreamProxy; -class ScriptExecutionContext; -class TextResourceDecoder; - -class FileReader : public RefCounted<FileReader>, public ActiveDOMObject, public EventTarget, public FileStreamClient { -public: - static PassRefPtr<FileReader> create(ScriptExecutionContext* context) - { - return adoptRef(new FileReader(context)); - } - - virtual ~FileReader(); - - enum ReadyState { - EMPTY = 0, - LOADING = 1, - DONE = 2 - }; - - void readAsBinaryString(Blob*); - void readAsText(Blob*, const String& encoding = ""); - void readAsDataURL(File*); - void abort(); - - ReadyState readyState() const; - PassRefPtr<FileError> error() { return m_error; } - const ScriptString& result(); - - // ActiveDOMObject - virtual bool canSuspend() const; - virtual void stop(); - virtual bool hasPendingActivity() const; - - // EventTarget - virtual FileReader* toFileReader() { return this; } - virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); } - - // FileStreamClient - virtual void didStart(); - virtual void didGetSize(long long); - virtual void didOpen(bool); - virtual void didRead(int); - - using RefCounted<FileReader>::ref; - using RefCounted<FileReader>::deref; - - DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart); - DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); - DEFINE_ATTRIBUTE_EVENT_LISTENER(load); - DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); - DEFINE_ATTRIBUTE_EVENT_LISTENER(error); - DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend); - -private: - enum ReadType { - ReadFileAsBinaryString, - ReadFileAsText, - ReadFileAsDataURL - }; - enum InternalState { - None, - Starting, - Opening, - Reading, - Completed - }; - - FileReader(ScriptExecutionContext*); - - // EventTarget - virtual void refEventTarget() { ref(); } - virtual void derefEventTarget() { deref(); } - virtual EventTargetData* eventTargetData() { return &m_eventTargetData; } - virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; } - - void terminate(); - void readInternal(Blob*, ReadType); - void fireEvent(const AtomicString& type); - void convertToText(); - void convertToDataURL(); - void didFinish(); - void didFail(ExceptionCode); - - InternalState m_state; - EventTargetData m_eventTargetData; - - RefPtr<Blob> m_fileBlob; - ReadType m_readType; - TextEncoding m_encoding; - - // Like XMLHttpRequest.m_responseText, we keep this as a ScriptString, not a WTF::String. - // That's because these strings can easily get huge (they are filled from the file) and - // because JS can easily observe many intermediate states, so it's very useful to be - // able to share the buffer with JavaScript versions of the whole or partial string. - // In contrast, this string doesn't interact much with the rest of the engine so it's not that - // big a cost that it isn't a String. - ScriptString m_result; - - // The raw data. We have to keep track of all the raw data for it to be converted to text or data URL data. - Vector<char> m_rawData; - bool m_isRawDataConverted; - - // The decoder used to decode the text data. - RefPtr<TextResourceDecoder> m_decoder; - - // Needed to create data URL. - String m_fileType; - - RefPtr<FileStreamProxy> m_streamProxy; - Vector<char> m_buffer; - RefPtr<FileError> m_error; - long long m_bytesLoaded; - long long m_totalBytes; - double m_lastProgressNotificationTimeMS; -}; - -} // namespace WebCore - -#endif // ENABLE(BLOB) - -#endif // FileReader_h diff --git a/WebCore/html/FileReader.idl b/WebCore/html/FileReader.idl deleted file mode 100644 index b36e9d3..0000000 --- a/WebCore/html/FileReader.idl +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - interface [ - Conditional=BLOB, - CanBeConstructed, - CallWith=ScriptExecutionContext, - EventTarget, - NoStaticTables - ] FileReader { - // ready states - const unsigned short EMPTY = 0; - const unsigned short LOADING = 1; - const unsigned short DONE = 2; - readonly attribute unsigned short readyState; - - // async read methods - void readAsBinaryString(in Blob fileBlob); - void readAsText(in Blob fileBlob, in [Optional] DOMString encoding); - void readAsDataURL(in File file); - - void abort(); - - // file data - readonly attribute [ConvertScriptString] DOMString result; - - readonly attribute FileError error; - - attribute EventListener onloadstart; - attribute EventListener onprogress; - attribute EventListener onload; - attribute EventListener onabort; - attribute EventListener onerror; - attribute EventListener onloadend; - }; -} diff --git a/WebCore/html/FileStreamProxy.cpp b/WebCore/html/FileStreamProxy.cpp deleted file mode 100644 index 30813d3..0000000 --- a/WebCore/html/FileStreamProxy.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#include "FileStreamProxy.h" - -#include "Blob.h" -#include "CrossThreadTask.h" -#include "FileStream.h" -#include "FileThread.h" -#include "FileThreadTask.h" -#include "PlatformString.h" -#include "ScriptExecutionContext.h" - -namespace WebCore { - -inline FileStreamProxy::FileStreamProxy(ScriptExecutionContext* context, FileStreamClient* client) - : AsyncFileStream(client) - , m_context(context) - , m_stream(FileStream::create()) -{ -} - -PassRefPtr<FileStreamProxy> FileStreamProxy::create(ScriptExecutionContext* context, FileStreamClient* client) -{ - RefPtr<FileStreamProxy> proxy = adoptRef(new FileStreamProxy(context, client)); - - // Hold an ref so that the instance will not get deleted while there are tasks on the file thread. - // This is balanced by the deref in derefProxyOnContext below. - proxy->ref(); - - proxy->fileThread()->postTask(createFileThreadTask(proxy.get(), &FileStreamProxy::startOnFileThread)); - - return proxy.release(); -} - -FileStreamProxy::~FileStreamProxy() -{ -} - -FileThread* FileStreamProxy::fileThread() -{ - ASSERT(m_context->isContextThread()); - ASSERT(m_context->fileThread()); - return m_context->fileThread(); -} - -static void didStart(ScriptExecutionContext*, FileStreamProxy* proxy) -{ - if (proxy->client()) - proxy->client()->didStart(); -} - -void FileStreamProxy::startOnFileThread() -{ - m_stream->start(); - m_context->postTask(createCallbackTask(&didStart, this)); -} - -void FileStreamProxy::stop() -{ - // Clear the client so that we won't be calling callbacks on the client. - setClient(0); - - fileThread()->unscheduleTasks(m_stream.get()); - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::stopOnFileThread)); -} - -static void derefProxyOnContext(ScriptExecutionContext*, FileStreamProxy* proxy) -{ - ASSERT(proxy->hasOneRef()); - proxy->deref(); -} - -void FileStreamProxy::stopOnFileThread() -{ - m_stream->stop(); - m_context->postTask(createCallbackTask(&derefProxyOnContext, this)); -} - -static void didGetSize(ScriptExecutionContext*, FileStreamProxy* proxy, long long size) -{ - if (proxy->client()) - proxy->client()->didGetSize(size); -} - -void FileStreamProxy::getSize(const String& path, double expectedModificationTime) -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::getSizeOnFileThread, path, expectedModificationTime)); -} - -void FileStreamProxy::getSizeOnFileThread(const String& path, double expectedModificationTime) -{ - long long size = m_stream->getSize(path, expectedModificationTime); - m_context->postTask(createCallbackTask(&didGetSize, this, size)); -} - -static void didOpen(ScriptExecutionContext*, FileStreamProxy* proxy, bool success) -{ - if (proxy->client()) - proxy->client()->didOpen(success); -} - -void FileStreamProxy::openForRead(const String& path, long long offset, long long length) -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::openForReadOnFileThread, path, offset, length)); -} - -void FileStreamProxy::openForReadOnFileThread(const String& path, long long offset, long long length) -{ - bool success = m_stream->openForRead(path, offset, length); - m_context->postTask(createCallbackTask(&didOpen, this, success)); -} - -void FileStreamProxy::openForWrite(const String& path) -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::openForWriteOnFileThread, path)); -} - -void FileStreamProxy::openForWriteOnFileThread(const String& path) -{ - bool success = m_stream->openForWrite(path); - m_context->postTask(createCallbackTask(&didOpen, this, success)); -} - -void FileStreamProxy::close() -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::closeOnFileThread)); -} - -void FileStreamProxy::closeOnFileThread() -{ - m_stream->close(); -} - -static void didRead(ScriptExecutionContext*, FileStreamProxy* proxy, int bytesRead) -{ - if (proxy->client()) - proxy->client()->didRead(bytesRead); -} - -void FileStreamProxy::read(char* buffer, int length) -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::readOnFileThread, buffer, length)); -} - -void FileStreamProxy::readOnFileThread(char* buffer, int length) -{ - int bytesRead = m_stream->read(buffer, length); - m_context->postTask(createCallbackTask(&didRead, this, bytesRead)); -} - -static void didWrite(ScriptExecutionContext*, FileStreamProxy* proxy, int bytesWritten) -{ - if (proxy->client()) - proxy->client()->didWrite(bytesWritten); -} - -void FileStreamProxy::write(const KURL& blobURL, long long position, int length) -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::writeOnFileThread, blobURL, position, length)); -} - -void FileStreamProxy::writeOnFileThread(const KURL& blobURL, long long position, int length) -{ - int bytesWritten = m_stream->write(blobURL, position, length); - m_context->postTask(createCallbackTask(&didWrite, this, bytesWritten)); -} - -static void didTruncate(ScriptExecutionContext*, FileStreamProxy* proxy, bool success) -{ - if (proxy->client()) - proxy->client()->didTruncate(success); -} - -void FileStreamProxy::truncate(long long position) -{ - fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::truncateOnFileThread, position)); -} - -void FileStreamProxy::truncateOnFileThread(long long position) -{ - bool success = m_stream->truncate(position); - m_context->postTask(createCallbackTask(&didTruncate, this, success)); -} - -} // namespace WebCore - -#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER) diff --git a/WebCore/html/FileStreamProxy.h b/WebCore/html/FileStreamProxy.h deleted file mode 100644 index 35a3af8..0000000 --- a/WebCore/html/FileStreamProxy.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileStreamProxy_h -#define FileStreamProxy_h - -#if ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#include "AsyncFileStream.h" -#include <wtf/Forward.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/RefPtr.h> - -namespace WebCore { - -class FileStream; -class FileThread; -class KURL; -class ScriptExecutionContext; - -// A proxy module that asynchronously calls corresponding FileStream methods on the file thread. Note: you must call stop() first and then release the reference to destruct the FileStreamProxy instance. -class FileStreamProxy : public AsyncFileStream { -public: - static PassRefPtr<FileStreamProxy> create(ScriptExecutionContext*, FileStreamClient*); - virtual ~FileStreamProxy(); - - virtual void getSize(const String& path, double expectedModificationTime); - virtual void openForRead(const String& path, long long offset, long long length); - virtual void openForWrite(const String& path); - virtual void close(); - virtual void read(char* buffer, int length); - virtual void write(const KURL& blobURL, long long position, int length); - virtual void truncate(long long position); - - // Stops the proxy and scedules it to be destructed. All the pending tasks will be aborted and the file stream will be closed. - // Note: the caller should deref the instance immediately after calling stop(). - virtual void stop(); - -private: - FileStreamProxy(ScriptExecutionContext*, FileStreamClient*); - - FileThread* fileThread(); - - // Called on File thread. - void startOnFileThread(); - void stopOnFileThread(); - void getSizeOnFileThread(const String& path, double expectedModificationTime); - void openForReadOnFileThread(const String& path, long long offset, long long length); - void openForWriteOnFileThread(const String& path); - void closeOnFileThread(); - void readOnFileThread(char* buffer, int length); - void writeOnFileThread(const KURL& blobURL, long long position, int length); - void truncateOnFileThread(long long position); - - RefPtr<ScriptExecutionContext> m_context; - RefPtr<FileStream> m_stream; -}; - -} // namespace WebCore - -#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#endif // FileStreamProxy_h diff --git a/WebCore/html/FileThread.cpp b/WebCore/html/FileThread.cpp deleted file mode 100644 index 4e48cfb..0000000 --- a/WebCore/html/FileThread.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#include "FileThread.h" - -#include "AutodrainedPool.h" -#include "Logging.h" - -namespace WebCore { - -FileThread::FileThread() - : m_threadID(0) -{ - m_selfRef = this; -} - -FileThread::~FileThread() -{ - ASSERT(m_queue.killed()); -} - -bool FileThread::start() -{ - MutexLocker lock(m_threadCreationMutex); - if (m_threadID) - return true; - m_threadID = createThread(FileThread::fileThreadStart, this, "WebCore: File"); - return m_threadID; -} - -void FileThread::stop() -{ - m_queue.kill(); -} - -void FileThread::postTask(PassOwnPtr<Task> task) -{ - m_queue.append(task); -} - -class SameInstancePredicate { -public: - SameInstancePredicate(const void* instance) : m_instance(instance) { } - bool operator()(FileThread::Task* task) const { return task->instance() == m_instance; } -private: - const void* m_instance; -}; - -void FileThread::unscheduleTasks(const void* instance) -{ - SameInstancePredicate predicate(instance); - m_queue.removeIf(predicate); -} - -void* FileThread::fileThreadStart(void* arg) -{ - FileThread* fileThread = static_cast<FileThread*>(arg); - return fileThread->runLoop(); -} - -void* FileThread::runLoop() -{ - { - // Wait for FileThread::start() to complete to have m_threadID - // established before starting the main loop. - MutexLocker lock(m_threadCreationMutex); - LOG(FileAPI, "Started FileThread %p", this); - } - - AutodrainedPool pool; - while (OwnPtr<Task> task = m_queue.waitForMessage()) { - task->performTask(); - pool.cycle(); - } - - LOG(FileAPI, "About to detach thread %i and clear the ref to FileThread %p, which currently has %i ref(s)", m_threadID, this, refCount()); - - detachThread(m_threadID); - - // Clear the self refptr, possibly resulting in deletion - m_selfRef = 0; - - return 0; -} - -} // namespace WebCore - -#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER) diff --git a/WebCore/html/FileThread.h b/WebCore/html/FileThread.h deleted file mode 100644 index 16acacc..0000000 --- a/WebCore/html/FileThread.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileThread_h -#define FileThread_h - -#if ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#include <wtf/MessageQueue.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/Threading.h> - -namespace WebCore { - -class FileStream; - -class FileThread : public ThreadSafeShared<FileThread> { -public: - static PassRefPtr<FileThread> create() - { - return adoptRef(new FileThread()); - } - - ~FileThread(); - - bool start(); - void stop(); - - class Task : public Noncopyable { - public: - virtual ~Task() { } - virtual void performTask() = 0; - void* instance() const { return m_instance; } - protected: - Task(void* instance) : m_instance(instance) { } - void* m_instance; - }; - - void postTask(PassOwnPtr<Task> task); - - void unscheduleTasks(const void* instance); - -private: - FileThread(); - - static void* fileThreadStart(void*); - void* runLoop(); - - ThreadIdentifier m_threadID; - RefPtr<FileThread> m_selfRef; - MessageQueue<Task> m_queue; - - Mutex m_threadCreationMutex; -}; - -} // namespace WebCore - -#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER) - -#endif // FileThread_h diff --git a/WebCore/html/FileThreadTask.h b/WebCore/html/FileThreadTask.h deleted file mode 100644 index 8a8ffcb..0000000 --- a/WebCore/html/FileThreadTask.h +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileThreadTask_h -#define FileThreadTask_h - -#include "CrossThreadCopier.h" -#include "CrossThreadTask.h" -#include "FileThread.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> - -namespace WebCore { - -template<typename T> -class FileThreadTask0 : public FileThread::Task { -public: - typedef void (T::*Method)(); - typedef FileThreadTask0<T> FileThreadTaskImpl; - - static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method) - { - return adoptPtr(new FileThreadTaskImpl(instance, method)); - } - -private: - FileThreadTask0(T* instance, Method method) - : FileThread::Task(instance) - , m_method(method) - { - } - - virtual void performTask() - { - (*static_cast<T*>(instance()).*m_method)(); - } - -private: - Method m_method; -}; - -template<typename T, typename P1, typename MP1> -class FileThreadTask1 : public FileThread::Task { -public: - typedef void (T::*Method)(MP1); - typedef FileThreadTask1<T, P1, MP1> FileThreadTaskImpl; - typedef typename CrossThreadTaskTraits<P1>::ParamType Param1; - - static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1) - { - return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1)); - } - -private: - FileThreadTask1(T* instance, Method method, Param1 parameter1) - : FileThread::Task(instance) - , m_method(method) - , m_parameter1(parameter1) - { - } - - virtual void performTask() - { - (*static_cast<T*>(instance()).*m_method)(m_parameter1); - } - -private: - Method m_method; - P1 m_parameter1; -}; - -template<typename T, typename P1, typename MP1, typename P2, typename MP2> -class FileThreadTask2 : public FileThread::Task { -public: - typedef void (T::*Method)(MP1, MP2); - typedef FileThreadTask2<T, P1, MP1, P2, MP2> FileThreadTaskImpl; - typedef typename CrossThreadTaskTraits<P1>::ParamType Param1; - typedef typename CrossThreadTaskTraits<P2>::ParamType Param2; - - static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1, Param2 parameter2) - { - return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1, parameter2)); - } - -private: - FileThreadTask2(T* instance, Method method, Param1 parameter1, Param2 parameter2) - : FileThread::Task(instance) - , m_method(method) - , m_parameter1(parameter1) - , m_parameter2(parameter2) - { - } - - virtual void performTask() - { - (*static_cast<T*>(instance()).*m_method)(m_parameter1, m_parameter2); - } - -private: - Method m_method; - P1 m_parameter1; - P2 m_parameter2; -}; - -template<typename T, typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3> -class FileThreadTask3 : public FileThread::Task { -public: - typedef void (T::*Method)(MP1, MP2, MP3); - typedef FileThreadTask3<T, P1, MP1, P2, MP2, P3, MP3> FileThreadTaskImpl; - typedef typename CrossThreadTaskTraits<P1>::ParamType Param1; - typedef typename CrossThreadTaskTraits<P2>::ParamType Param2; - typedef typename CrossThreadTaskTraits<P3>::ParamType Param3; - - static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1, Param2 parameter2, Param3 parameter3) - { - return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1, parameter2, parameter3)); - } - -private: - FileThreadTask3(T* instance, Method method, Param1 parameter1, Param2 parameter2, Param3 parameter3) - : FileThread::Task(instance) - , m_method(method) - , m_parameter1(parameter1) - , m_parameter2(parameter2) - , m_parameter3(parameter3) - { - } - - virtual void performTask() - { - (*static_cast<T*>(instance()).*m_method)(m_parameter1, m_parameter2, m_parameter3); - } - -private: - Method m_method; - P1 m_parameter1; - P2 m_parameter2; - P3 m_parameter3; -}; - -template<typename T> -PassOwnPtr<FileThread::Task> createFileThreadTask( - T* const callee, - void (T::*method)()); - -template<typename T> -PassOwnPtr<FileThread::Task> createFileThreadTask( - T* const callee, - void (T::*method)()) -{ - return FileThreadTask0<T>::create( - callee, - method); -} - -template<typename T, typename P1, typename MP1> -PassOwnPtr<FileThread::Task> createFileThreadTask( - T* const callee, - void (T::*method)(MP1), - const P1& parameter1) -{ - return FileThreadTask1<T, typename CrossThreadCopier<P1>::Type, MP1>::create( - callee, - method, - CrossThreadCopier<P1>::copy(parameter1)); -} - -template<typename T, typename P1, typename MP1, typename P2, typename MP2> -PassOwnPtr<FileThread::Task> createFileThreadTask( - T* const callee, - void (T::*method)(MP1, MP2), - const P1& parameter1, - const P2& parameter2) -{ - return FileThreadTask2<T, typename CrossThreadCopier<P1>::Type, MP1, typename CrossThreadCopier<P2>::Type, MP2>::create( - callee, - method, - CrossThreadCopier<P1>::copy(parameter1), - CrossThreadCopier<P2>::copy(parameter2)); -} - -template<typename T, typename P1, typename MP1, typename P2, typename MP2, typename P3, typename MP3> -PassOwnPtr<FileThread::Task> createFileThreadTask( - T* const callee, - void (T::*method)(MP1, MP2, MP3), - const P1& parameter1, - const P2& parameter2, - const P3& parameter3) -{ - return FileThreadTask3<T, typename CrossThreadCopier<P1>::Type, MP1, typename CrossThreadCopier<P2>::Type, MP2, typename CrossThreadCopier<P3>::Type, MP3>::create( - callee, - method, - CrossThreadCopier<P1>::copy(parameter1), - CrossThreadCopier<P2>::copy(parameter2), - CrossThreadCopier<P3>::copy(parameter3)); -} - -} // namespace WebCore - -#endif // FileThreadTask_h diff --git a/WebCore/html/FileWriter.cpp b/WebCore/html/FileWriter.cpp deleted file mode 100644 index 7d112e2..0000000 --- a/WebCore/html/FileWriter.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(FILE_WRITER) - -#include "FileWriter.h" - -namespace WebCore { - -FileWriter::FileWriter(ScriptExecutionContext* context) - : ActiveDOMObject(context, this) -{ -} - -FileWriter::~FileWriter() -{ -} - -bool FileWriter::hasPendingActivity() const -{ - return false; -} - -bool FileWriter::canSuspend() const -{ - // FIXME: It is not currently possible to suspend a FileWriter, so pages with FileWriter can not go into page cache. - return false; -} - -void FileWriter::stop() -{ -} - -void FileWriter::write(Blob*) -{ -} - -void FileWriter::seek(long long) -{ -} - -void FileWriter::truncate(long long) -{ -} - -void FileWriter::abort() -{ -} - -FileWriter::ReadyState FileWriter::readyState() const -{ - return EMPTY; -} - -} // namespace WebCore - -#endif // ENABLE(FILE_WRITER) diff --git a/WebCore/html/FileWriter.h b/WebCore/html/FileWriter.h deleted file mode 100644 index fd5babf..0000000 --- a/WebCore/html/FileWriter.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FileWriter_h -#define FileWriter_h - -#if ENABLE(FILE_WRITER) - -#include "ActiveDOMObject.h" -#include "EventTarget.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/RefPtr.h> - -namespace WebCore { - -class Blob; -class FileError; -class ScriptExecutionContext; - -// FIXME: This is an empty, do-nothing placeholder for implementation yet to come. -class FileWriter : public RefCounted<FileWriter>, public ActiveDOMObject, public EventTarget { -public: - static PassRefPtr<FileWriter> create(ScriptExecutionContext* context) - { - return adoptRef(new FileWriter(context)); - } - - enum ReadyState { - EMPTY = 0, - WRITING = 1, - DONE = 2 - }; - - void write(Blob*); - void seek(long long position); - void truncate(long long length); - void abort(); - - ReadyState readyState() const; - FileError* error() const { return m_error; }; - long long position() const { return 0; }; - long long length() const { return 0; }; - - // ActiveDOMObject - virtual bool canSuspend() const; - virtual void stop(); - virtual bool hasPendingActivity() const; - - // EventTarget - virtual FileWriter* toFileWriter() { return this; } - virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); } - - using RefCounted<FileWriter>::ref; - using RefCounted<FileWriter>::deref; - - DEFINE_ATTRIBUTE_EVENT_LISTENER(writestart); - DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); - DEFINE_ATTRIBUTE_EVENT_LISTENER(write); - DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); - DEFINE_ATTRIBUTE_EVENT_LISTENER(error); - DEFINE_ATTRIBUTE_EVENT_LISTENER(writeend); - -private: - FileWriter(ScriptExecutionContext*); - - virtual ~FileWriter(); - - friend class RefCounted<FileWriter>; - - // EventTarget - virtual void refEventTarget() { ref(); } - virtual void derefEventTarget() { deref(); } - virtual EventTargetData* eventTargetData() { return &m_eventTargetData; } - virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; } - - RefPtr<FileError*> m_error; - EventTargetData m_eventTargetData; -}; - -} // namespace WebCore - -#endif // ENABLE(FILE_WRITER) - -#endif // FileWriter_h diff --git a/WebCore/html/FileWriter.idl b/WebCore/html/FileWriter.idl deleted file mode 100644 index bb95ee1..0000000 --- a/WebCore/html/FileWriter.idl +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -module html { - interface [ - Conditional=FILE_WRITER, - CallWith=ScriptExecutionContext, - EventTarget, - NoStaticTables - ] FileWriter { - // ready states - const unsigned short INIT = 0; - const unsigned short WRITING = 1; - const unsigned short DONE = 2; - readonly attribute unsigned short readyState; - - // async write/modify methods - void write(in Blob data) raises (FileException); - void seek(in long long position) raises (FileException); - void truncate(in long long size) raises (FileException); - - void abort() raises (FileException); - - readonly attribute FileError error; - readonly attribute long long position; - readonly attribute long long length; - - attribute EventListener onwritestart; - attribute EventListener onprogress; - attribute EventListener onwrite; - attribute EventListener onabort; - attribute EventListener onerror; - attribute EventListener onwriteend; - }; -} diff --git a/WebCore/html/FormDataList.cpp b/WebCore/html/FormDataList.cpp index 94d0031..4503fd2 100644 --- a/WebCore/html/FormDataList.cpp +++ b/WebCore/html/FormDataList.cpp @@ -33,20 +33,17 @@ FormDataList::FormDataList(const TextEncoding& c) void FormDataList::appendString(const String& s) { CString cstr = m_encoding.encode(s.characters(), s.length(), EntitiesForUnencodables); - m_items.append(StringBlobItem::create(normalizeLineEndingsToCRLF(cstr))); + m_items.append(normalizeLineEndingsToCRLF(cstr)); } void FormDataList::appendString(const CString& s) { - m_items.append(StringBlobItem::create(s)); + m_items.append(s); } -void FormDataList::appendBlob(const String& key, PassRefPtr<Blob> blob) +void FormDataList::appendBlob(PassRefPtr<Blob> blob) { - appendString(key); - const BlobItemList& items = blob->items(); - for (size_t i = 0; i < items.size(); ++i) - m_items.append(items.at(i)); + m_items.append(blob); } } // namespace diff --git a/WebCore/html/FormDataList.h b/WebCore/html/FormDataList.h index 38b07f9..8e1a937 100644 --- a/WebCore/html/FormDataList.h +++ b/WebCore/html/FormDataList.h @@ -30,6 +30,20 @@ namespace WebCore { class FormDataList { public: + class Item { + public: + Item() { } + Item(const WTF::CString& data) : m_data(data) { } + Item(PassRefPtr<Blob> blob) : m_blob(blob) { } + + const WTF::CString& data() const { return m_data; } + Blob* blob() const { return m_blob.get(); } + + private: + WTF::CString m_data; + RefPtr<Blob> m_blob; + }; + FormDataList(const TextEncoding&); void appendData(const String& key, const String& value) @@ -47,17 +61,22 @@ public: appendString(key); appendString(String::number(value)); } - void appendBlob(const String& key, PassRefPtr<Blob>); + void appendBlob(const String& key, PassRefPtr<Blob> blob) + { + appendString(key); + appendBlob(blob); + } - const BlobItemList& items() const { return m_items; } + const Vector<Item>& items() const { return m_items; } const TextEncoding& encoding() const { return m_encoding; } private: void appendString(const CString&); void appendString(const String&); + void appendBlob(PassRefPtr<Blob>); TextEncoding m_encoding; - BlobItemList m_items; + Vector<Item> m_items; }; } // namespace WebCore diff --git a/WebCore/html/HTMLAnchorElement.idl b/WebCore/html/HTMLAnchorElement.idl index d57fcb6..f5e1bd9 100644 --- a/WebCore/html/HTMLAnchorElement.idl +++ b/WebCore/html/HTMLAnchorElement.idl @@ -24,7 +24,7 @@ module html { attribute [Reflect] DOMString accessKey; attribute [Reflect] DOMString charset; attribute [Reflect] DOMString coords; - attribute [Reflect,URL] DOMString href; + attribute [Reflect, URL] DOMString href; attribute [Reflect] DOMString hreflang; attribute [Reflect] DOMString name; attribute [Reflect] DOMString rel; diff --git a/WebCore/html/HTMLAreaElement.idl b/WebCore/html/HTMLAreaElement.idl index 64c6468..a77e615 100644 --- a/WebCore/html/HTMLAreaElement.idl +++ b/WebCore/html/HTMLAreaElement.idl @@ -24,7 +24,7 @@ module html { attribute [Reflect] DOMString accessKey; attribute [Reflect] DOMString alt; attribute [Reflect] DOMString coords; - attribute [Reflect,URL] DOMString href; + attribute [Reflect, URL] DOMString href; attribute [Reflect] boolean noHref; attribute [Reflect] DOMString shape; attribute [Reflect] DOMString target; diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in index b4cdb02..103d2c6 100644 --- a/WebCore/html/HTMLAttributeNames.in +++ b/WebCore/html/HTMLAttributeNames.in @@ -223,6 +223,7 @@ onwebkitanimationiteration onwebkitanimationend onwebkitbeginfullscreen onwebkitendfullscreen +onwebkitfullscreenchange onwebkittransitionend optimum pattern diff --git a/WebCore/html/HTMLBaseElement.cpp b/WebCore/html/HTMLBaseElement.cpp index a3095d1..0dd16fa 100644 --- a/WebCore/html/HTMLBaseElement.cpp +++ b/WebCore/html/HTMLBaseElement.cpp @@ -24,11 +24,8 @@ #include "HTMLBaseElement.h" #include "Attribute.h" -#include "CSSHelper.h" #include "Document.h" -#include "Frame.h" #include "HTMLNames.h" -#include "XSSAuditor.h" namespace WebCore { @@ -45,47 +42,34 @@ PassRefPtr<HTMLBaseElement> HTMLBaseElement::create(const QualifiedName& tagName return adoptRef(new HTMLBaseElement(tagName, document)); } -void HTMLBaseElement::parseMappedAttribute(Attribute* attr) +void HTMLBaseElement::parseMappedAttribute(Attribute* attribute) { - if (attr->name() == hrefAttr) { - m_hrefAttrValue = attr->value(); - m_href = deprecatedParseURL(attr->value()); - process(); - } else if (attr->name() == targetAttr) { - m_target = attr->value(); - process(); - } else - HTMLElement::parseMappedAttribute(attr); + if (attribute->name() == hrefAttr || attribute->name() == targetAttr) + document()->processBaseElement(); + else + HTMLElement::parseMappedAttribute(attribute); } void HTMLBaseElement::insertedIntoDocument() { HTMLElement::insertedIntoDocument(); - process(); + document()->processBaseElement(); } void HTMLBaseElement::removedFromDocument() { HTMLElement::removedFromDocument(); - - // Since the document doesn't have a base element, clear the base URL and target. - // FIXME: This does not handle the case of multiple base elements correctly. - document()->setBaseElementURL(KURL()); - document()->setBaseElementTarget(String()); + document()->processBaseElement(); } -void HTMLBaseElement::process() +bool HTMLBaseElement::isURLAttribute(Attribute* attribute) const { - if (!inDocument()) - return; - - if (!m_href.isEmpty() && (!document()->frame() || document()->frame()->script()->xssAuditor()->canSetBaseElementURL(m_hrefAttrValue))) - document()->setBaseElementURL(KURL(document()->url(), m_href)); - - if (!m_target.isEmpty()) - document()->setBaseElementTarget(m_target); + return attribute->name() == hrefAttr; +} - // FIXME: Changing a document's base URL should probably automatically update the resolved relative URLs of all images, stylesheets, etc. +String HTMLBaseElement::target() const +{ + return fastGetAttribute(targetAttr); } } diff --git a/WebCore/html/HTMLBaseElement.h b/WebCore/html/HTMLBaseElement.h index aa1454f..fd3cef6 100644 --- a/WebCore/html/HTMLBaseElement.h +++ b/WebCore/html/HTMLBaseElement.h @@ -34,20 +34,11 @@ public: private: HTMLBaseElement(const QualifiedName&, Document*); - virtual String target() const { return m_target; } - + virtual String target() const; + virtual bool isURLAttribute(Attribute*) const; virtual void parseMappedAttribute(Attribute*); virtual void insertedIntoDocument(); virtual void removedFromDocument(); - - void process(); - - void setHref(const String&); - void setTarget(const String&); - - String m_hrefAttrValue; - String m_href; - String m_target; }; } // namespace diff --git a/WebCore/html/HTMLBaseElement.idl b/WebCore/html/HTMLBaseElement.idl index 8bf82a9..2750c9e 100644 --- a/WebCore/html/HTMLBaseElement.idl +++ b/WebCore/html/HTMLBaseElement.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,7 +20,7 @@ module html { interface HTMLBaseElement : HTMLElement { - attribute [Reflect] DOMString href; + attribute [Reflect, URL] DOMString href; attribute [Reflect] DOMString target; }; diff --git a/WebCore/html/HTMLBlockquoteElement.cpp b/WebCore/html/HTMLBlockquoteElement.cpp index cacd8b4..726bc0f 100644 --- a/WebCore/html/HTMLBlockquoteElement.cpp +++ b/WebCore/html/HTMLBlockquoteElement.cpp @@ -45,4 +45,9 @@ PassRefPtr<HTMLBlockquoteElement> HTMLBlockquoteElement::create(const QualifiedN return adoptRef(new HTMLBlockquoteElement(tagName, document)); } +bool HTMLBlockquoteElement::isURLAttribute(Attribute* attribute) const +{ + return attribute->name() == citeAttr; +} + } diff --git a/WebCore/html/HTMLBlockquoteElement.h b/WebCore/html/HTMLBlockquoteElement.h index 194fe54..6566117 100644 --- a/WebCore/html/HTMLBlockquoteElement.h +++ b/WebCore/html/HTMLBlockquoteElement.h @@ -34,6 +34,8 @@ public: private: HTMLBlockquoteElement(const QualifiedName&, Document*); + + virtual bool isURLAttribute(Attribute*) const; }; } // namespace WebCore diff --git a/WebCore/html/HTMLBlockquoteElement.idl b/WebCore/html/HTMLBlockquoteElement.idl index f0045c7..5a319a3 100644 --- a/WebCore/html/HTMLBlockquoteElement.idl +++ b/WebCore/html/HTMLBlockquoteElement.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,7 +20,7 @@ module html { interface HTMLBlockquoteElement : HTMLElement { - attribute [Reflect] DOMString cite; + attribute [Reflect, URL] DOMString cite; }; } diff --git a/WebCore/html/HTMLBodyElement.cpp b/WebCore/html/HTMLBodyElement.cpp index 35dbd9d..98e0d6f 100644 --- a/WebCore/html/HTMLBodyElement.cpp +++ b/WebCore/html/HTMLBodyElement.cpp @@ -73,7 +73,7 @@ void HTMLBodyElement::createLinkDecl() m_linkDecl = CSSMutableStyleDeclaration::create(); m_linkDecl->setParent(document()->elementSheet()); m_linkDecl->setNode(this); - m_linkDecl->setStrictParsing(!document()->inCompatMode()); + m_linkDecl->setStrictParsing(!document()->inQuirksMode()); } bool HTMLBodyElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp index 7463551..3838f14 100644 --- a/WebCore/html/HTMLCanvasElement.cpp +++ b/WebCore/html/HTMLCanvasElement.cpp @@ -146,7 +146,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas if (Settings* settings = document()->settings()) usesDashbardCompatibilityMode = settings->usesDashboardBackwardCompatibilityMode(); #endif - m_context = adoptPtr(new CanvasRenderingContext2D(this, document()->inCompatMode(), usesDashbardCompatibilityMode)); + m_context = adoptPtr(new CanvasRenderingContext2D(this, document()->inQuirksMode(), usesDashbardCompatibilityMode)); #if ENABLE(ACCELERATED_2D_CANVAS) && USE(ACCELERATED_COMPOSITING) if (m_context) { // Need to make sure a RenderLayer and compositing layer get created for the Canvas @@ -185,7 +185,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas return 0; } -void HTMLCanvasElement::willDraw(const FloatRect& rect) +void HTMLCanvasElement::didDraw(const FloatRect& rect) { m_copiedImage.clear(); // Clear our image snapshot if we have one. @@ -394,8 +394,14 @@ ImageBuffer* HTMLCanvasElement::buffer() const Image* HTMLCanvasElement::copiedImage() const { - if (!m_copiedImage && buffer()) + if (!m_copiedImage && buffer()) { + if (m_context) { + // If we're not rendering to the ImageBuffer, copy the rendering results to it. + if (!m_context->paintsIntoCanvasBuffer()) + m_context->paintRenderingResultsToCanvas(); + } m_copiedImage = buffer()->copyImage(); + } return m_copiedImage.get(); } diff --git a/WebCore/html/HTMLCanvasElement.h b/WebCore/html/HTMLCanvasElement.h index c9b258d..01665c8 100644 --- a/WebCore/html/HTMLCanvasElement.h +++ b/WebCore/html/HTMLCanvasElement.h @@ -85,7 +85,7 @@ public: String toDataURL(const String& mimeType, ExceptionCode& ec) { return toDataURL(mimeType, 0, ec); } // Used for rendering - void willDraw(const FloatRect&); + void didDraw(const FloatRect&); void paint(GraphicsContext*, const IntRect&); diff --git a/WebCore/html/HTMLDocument.cpp b/WebCore/html/HTMLDocument.cpp index 5e11ad2..26e8314 100644 --- a/WebCore/html/HTMLDocument.cpp +++ b/WebCore/html/HTMLDocument.cpp @@ -84,7 +84,6 @@ HTMLDocument::HTMLDocument(Frame* frame, const KURL& url) : Document(frame, url, false, true) { clearXMLVersion(); - setParseMode(Compat); } HTMLDocument::~HTMLDocument() @@ -139,7 +138,7 @@ void HTMLDocument::setDesignMode(const String& value) String HTMLDocument::compatMode() const { - return inCompatMode() ? "BackCompat" : "CSS1Compat"; + return inQuirksMode() ? "BackCompat" : "CSS1Compat"; } Element* HTMLDocument::activeElement() @@ -343,65 +342,97 @@ void HTMLDocument::removeExtraNamedItem(const AtomicString& name) removeItemFromMap(m_extraNamedItemCounts, name); } -void HTMLDocument::determineParseMode() +void HTMLDocument::setCompatibilityModeFromDoctype() { - // FIXME: It's terrible that this code runs separately and isn't just built in to the - // HTML tokenizer/parser. - - // This code more or less mimics Mozilla's implementation (specifically the - // doctype parsing implemented by David Baron in Mozilla's nsParser.cpp). - // - // There are three possible parse modes: - // COMPAT - quirks mode emulates WinIE and NS4. CSS parsing is also relaxed in this mode, e.g., unit types can + // There are three possible compatibility modes: + // Quirks - quirks mode emulates WinIE and NS4. CSS parsing is also relaxed in this mode, e.g., unit types can // be omitted from numbers. - // ALMOST STRICT - This mode is identical to strict mode except for its treatment of line-height in the inline box model. For - // now (until the inline box model is re-written), this mode is identical to STANDARDS mode. - // STRICT - no quirks apply. Web pages will obey the specifications to the letter. - bool wasInCompatMode = inCompatMode(); + // Limited Quirks - This mode is identical to no-quirks mode except for its treatment of line-height in the inline box model. + // No Quirks - no quirks apply. Web pages will obey the specifications to the letter. DocumentType* docType = doctype(); - if (!docType || !equalIgnoringCase(docType->name(), "html")) - // No doctype found at all or the doctype is not HTML. Default to quirks mode and Html4. - setParseMode(Compat); - else if (!doctype()->systemId().isEmpty() && equalIgnoringCase(docType->systemId(), "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd")) - // Assume quirks mode for this particular system ID. In the HTML5 spec, this is the only - // system identifier that is examined. - setParseMode(Compat); - else if (docType->publicId().isEmpty()) - // A doctype without a public ID means use strict mode. - setParseMode(Strict); - else { - // We have to check a list of public IDs to see what we - // should do. - String lowerPubID = docType->publicId().lower(); - CString pubIDStr = lowerPubID.latin1(); - - // Look up the entry in our gperf-generated table. - const PubIDInfo* doctypeEntry = findDoctypeEntry(pubIDStr.data(), pubIDStr.length()); - if (!doctypeEntry) - // The DOCTYPE is not in the list. Assume strict mode. - setParseMode(Strict); - else { - switch (docType->systemId().isEmpty() ? - doctypeEntry->mode_if_no_sysid : - doctypeEntry->mode_if_sysid) { - case PubIDInfo::eQuirks3: - case PubIDInfo::eQuirks: - setParseMode(Compat); - break; - case PubIDInfo::eAlmostStandards: - setParseMode(AlmostStrict); - break; - default: - ASSERT(false); - } - } + if (!docType) + return; + + // Check for Quirks Mode. + const String& publicId = docType->publicId(); + if (docType->name() != "html" + || publicId.startsWith("+//Silmaril//dtd html Pro v0r11 19970101//", false) + || publicId.startsWith("-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//", false) + || publicId.startsWith("-//AS//DTD HTML 3.0 asWedit + extensions//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.0 Level 1//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.0 Level 2//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict Level 1//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict Level 2//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.0//", false) + || publicId.startsWith("-//IETF//DTD HTML 2.1E//", false) + || publicId.startsWith("-//IETF//DTD HTML 3.0//", false) + || publicId.startsWith("-//IETF//DTD HTML 3.2 Final//", false) + || publicId.startsWith("-//IETF//DTD HTML 3.2//", false) + || publicId.startsWith("-//IETF//DTD HTML 3//", false) + || publicId.startsWith("-//IETF//DTD HTML Level 0//", false) + || publicId.startsWith("-//IETF//DTD HTML Level 1//", false) + || publicId.startsWith("-//IETF//DTD HTML Level 2//", false) + || publicId.startsWith("-//IETF//DTD HTML Level 3//", false) + || publicId.startsWith("-//IETF//DTD HTML Strict Level 0//", false) + || publicId.startsWith("-//IETF//DTD HTML Strict Level 1//", false) + || publicId.startsWith("-//IETF//DTD HTML Strict Level 2//", false) + || publicId.startsWith("-//IETF//DTD HTML Strict Level 3//", false) + || publicId.startsWith("-//IETF//DTD HTML Strict//", false) + || publicId.startsWith("-//IETF//DTD HTML//", false) + || publicId.startsWith("-//Metrius//DTD Metrius Presentational//", false) + || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//", false) + || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML//", false) + || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 Tables//", false) + || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//", false) + || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML//", false) + || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 Tables//", false) + || publicId.startsWith("-//Netscape Comm. Corp.//DTD HTML//", false) + || publicId.startsWith("-//Netscape Comm. Corp.//DTD Strict HTML//", false) + || publicId.startsWith("-//O'Reilly and Associates//DTD HTML 2.0//", false) + || publicId.startsWith("-//O'Reilly and Associates//DTD HTML Extended 1.0//", false) + || publicId.startsWith("-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//", false) + || publicId.startsWith("-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//", false) + || publicId.startsWith("-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//", false) + || publicId.startsWith("-//Spyglass//DTD HTML 2.0 Extended//", false) + || publicId.startsWith("-//SQ//DTD HTML 2.0 HoTMetaL + extensions//", false) + || publicId.startsWith("-//Sun Microsystems Corp.//DTD HotJava HTML//", false) + || publicId.startsWith("-//Sun Microsystems Corp.//DTD HotJava Strict HTML//", false) + || publicId.startsWith("-//W3C//DTD HTML 3 1995-03-24//", false) + || publicId.startsWith("-//W3C//DTD HTML 3.2 Draft//", false) + || publicId.startsWith("-//W3C//DTD HTML 3.2 Final//", false) + || publicId.startsWith("-//W3C//DTD HTML 3.2//", false) + || publicId.startsWith("-//W3C//DTD HTML 3.2S Draft//", false) + || publicId.startsWith("-//W3C//DTD HTML 4.0 Frameset//", false) + || publicId.startsWith("-//W3C//DTD HTML 4.0 Transitional//", false) + || publicId.startsWith("-//W3C//DTD HTML Experimental 19960712//", false) + || publicId.startsWith("-//W3C//DTD HTML Experimental 970421//", false) + || publicId.startsWith("-//W3C//DTD W3 HTML//", false) + || publicId.startsWith("-//W3O//DTD W3 HTML 3.0//", false) + || equalIgnoringCase(publicId, "-//W3O//DTD W3 HTML Strict 3.0//EN//") + || publicId.startsWith("-//WebTechs//DTD Mozilla HTML 2.0//", false) + || publicId.startsWith("-//WebTechs//DTD Mozilla HTML//", false) + || equalIgnoringCase(publicId, "-/W3C/DTD HTML 4.0 Transitional/EN") + || equalIgnoringCase(publicId, "HTML") + || equalIgnoringCase(docType->systemId(), "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd") + || (docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Frameset//", false)) + || (docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Transitional//", false))) { + setCompatibilityMode(QuirksMode); + return; } - - if (inCompatMode() != wasInCompatMode) { - clearPageUserSheet(); - clearPageGroupUserSheets(); - updateStyleSelector(); + + // Check for Limited Quirks Mode. + if (publicId.startsWith("-//W3C//DTD XHTML 1.0 Frameset//", false) + || publicId.startsWith("-//W3C//DTD XHTML 1.0 Transitional//", false) + || (!docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Frameset//", false)) + || (!docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Transitional//", false))) { + setCompatibilityMode(LimitedQuirksMode); + return; } + + // Otherwise we are No Quirks Mode. + setCompatibilityMode(NoQuirksMode); + return; } void HTMLDocument::clear() diff --git a/WebCore/html/HTMLDocument.h b/WebCore/html/HTMLDocument.h index 583cdcc..ae65d42 100644 --- a/WebCore/html/HTMLDocument.h +++ b/WebCore/html/HTMLDocument.h @@ -51,6 +51,7 @@ public: void setDesignMode(const String&); String compatMode() const; + virtual void setCompatibilityModeFromDoctype(); Element* activeElement(); bool hasFocus(); @@ -95,7 +96,6 @@ private: virtual bool isFrameSet() const; virtual PassRefPtr<DocumentParser> createParser(); - virtual void determineParseMode(); void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp index f40489b..0862130 100644 --- a/WebCore/html/HTMLElement.cpp +++ b/WebCore/html/HTMLElement.cpp @@ -249,6 +249,10 @@ void HTMLElement::parseMappedAttribute(Attribute* attr) setAttributeEventListener(eventNames().touchendEvent, createAttributeEventListener(this, attr)); } else if (attr->name() == ontouchcancelAttr) { setAttributeEventListener(eventNames().touchcancelEvent, createAttributeEventListener(this, attr)); +#if ENABLE(FULLSCREEN_API) + } else if (attr->name() == onwebkitfullscreenchangeAttr) { + setAttributeEventListener(eventNames().webkitfullscreenchangeEvent, createAttributeEventListener(this, attr)); +#endif } } diff --git a/WebCore/html/HTMLEmbedElement.cpp b/WebCore/html/HTMLEmbedElement.cpp index 0a15321..eeb28e7 100644 --- a/WebCore/html/HTMLEmbedElement.cpp +++ b/WebCore/html/HTMLEmbedElement.cpp @@ -42,16 +42,15 @@ namespace WebCore { using namespace HTMLNames; -inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document) - : HTMLPlugInImageElement(tagName, document) - , m_needWidgetUpdate(false) +inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document, bool createdByParser) + : HTMLPlugInImageElement(tagName, document, createdByParser) { ASSERT(hasTagName(embedTag)); } -PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(const QualifiedName& tagName, Document* document) +PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(const QualifiedName& tagName, Document* document, bool createdByParser) { - return adoptRef(new HTMLEmbedElement(tagName, document)); + return adoptRef(new HTMLEmbedElement(tagName, document, createdByParser)); } static inline RenderWidget* findWidgetRenderer(const Node* n) @@ -80,7 +79,7 @@ bool HTMLEmbedElement::mapToEntry(const QualifiedName& attrName, MappedAttribute return false; } - return HTMLPlugInElement::mapToEntry(attrName, result); + return HTMLPlugInImageElement::mapToEntry(attrName, result); } void HTMLEmbedElement::parseMappedAttribute(Attribute* attr) @@ -118,22 +117,27 @@ void HTMLEmbedElement::parseMappedAttribute(Attribute* attr) } m_name = value; } else - HTMLPlugInElement::parseMappedAttribute(attr); + HTMLPlugInImageElement::parseMappedAttribute(attr); } bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style) { if (isImageType()) - return HTMLPlugInElement::rendererIsNeeded(style); + return HTMLPlugInImageElement::rendererIsNeeded(style); Frame* frame = document()->frame(); if (!frame) return false; + // If my parent is an <object> and is not set to use fallback content, I + // should be ignored and not get a renderer. Node* p = parentNode(); if (p && p->hasTagName(objectTag)) { ASSERT(p->renderer()); - return false; + if (!static_cast<HTMLObjectElement*>(p)->useFallbackContent()) { + ASSERT(!p->renderer()->isEmbeddedObject()); + return false; + } } #if ENABLE(DASHBOARD_SUPPORT) @@ -144,42 +148,7 @@ bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style) } #endif - return HTMLPlugInElement::rendererIsNeeded(style); -} - -RenderObject* HTMLEmbedElement::createRenderer(RenderArena* arena, RenderStyle*) -{ - if (isImageType()) - return new (arena) RenderImage(this); - return new (arena) RenderEmbeddedObject(this); -} - -void HTMLEmbedElement::attach() -{ - m_needWidgetUpdate = true; - - bool isImage = isImageType(); - - if (!isImage) - queuePostAttachCallback(&HTMLPlugInElement::updateWidgetCallback, this); - - HTMLPlugInElement::attach(); - - if (isImage && renderer()) { - if (!m_imageLoader) - m_imageLoader = adoptPtr(new HTMLImageLoader(this)); - m_imageLoader->updateFromElement(); - - if (renderer()) - toRenderImage(renderer())->setCachedImage(m_imageLoader->image()); - } -} - -void HTMLEmbedElement::updateWidget() -{ - document()->updateStyleIfNeeded(); - if (m_needWidgetUpdate && renderer() && !isImageType()) - toRenderEmbeddedObject(renderer())->updateWidget(true); + return HTMLPlugInImageElement::rendererIsNeeded(style); } void HTMLEmbedElement::insertedIntoDocument() @@ -201,7 +170,7 @@ void HTMLEmbedElement::insertedIntoDocument() } } - HTMLPlugInElement::insertedIntoDocument(); + HTMLPlugInImageElement::insertedIntoDocument(); } void HTMLEmbedElement::removedFromDocument() @@ -209,12 +178,12 @@ void HTMLEmbedElement::removedFromDocument() if (document()->isHTMLDocument()) static_cast<HTMLDocument*>(document())->removeNamedItem(m_name); - HTMLPlugInElement::removedFromDocument(); + HTMLPlugInImageElement::removedFromDocument(); } void HTMLEmbedElement::attributeChanged(Attribute* attr, bool preserveDecls) { - HTMLPlugInElement::attributeChanged(attr, preserveDecls); + HTMLPlugInImageElement::attributeChanged(attr, preserveDecls); if ((attr->name() == widthAttr || attr->name() == heightAttr) && !attr->isEmpty()) { Node* n = parent(); diff --git a/WebCore/html/HTMLEmbedElement.h b/WebCore/html/HTMLEmbedElement.h index 5f4df67..e27b717 100644 --- a/WebCore/html/HTMLEmbedElement.h +++ b/WebCore/html/HTMLEmbedElement.h @@ -29,20 +29,15 @@ namespace WebCore { class HTMLEmbedElement : public HTMLPlugInImageElement { public: - static PassRefPtr<HTMLEmbedElement> create(const QualifiedName&, Document*); - - void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; } + static PassRefPtr<HTMLEmbedElement> create(const QualifiedName&, Document*, bool createdByParser); private: - HTMLEmbedElement(const QualifiedName&, Document*); + HTMLEmbedElement(const QualifiedName&, Document*, bool createdByParser); virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const; virtual void parseMappedAttribute(Attribute*); - virtual void attach(); - virtual bool canLazyAttach() { return false; } virtual bool rendererIsNeeded(RenderStyle*); - virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void insertedIntoDocument(); virtual void removedFromDocument(); virtual void attributeChanged(Attribute*, bool preserveDecls = false); @@ -50,13 +45,9 @@ private: virtual bool isURLAttribute(Attribute*) const; virtual const QualifiedName& imageSourceAttributeName() const; - virtual void updateWidget(); - virtual RenderWidget* renderWidgetForJSBindings() const; virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; - - bool m_needWidgetUpdate; }; } diff --git a/WebCore/html/HTMLEmbedElement.idl b/WebCore/html/HTMLEmbedElement.idl index 4997210..e395fc6 100644 --- a/WebCore/html/HTMLEmbedElement.idl +++ b/WebCore/html/HTMLEmbedElement.idl @@ -32,7 +32,7 @@ module html { attribute [Reflect] long height; #endif attribute [Reflect] DOMString name; - attribute [Reflect] DOMString src; + attribute [Reflect, URL] DOMString src; attribute [Reflect] DOMString type; #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT attribute [Reflect] DOMString width; diff --git a/WebCore/html/HTMLEntityNames.json b/WebCore/html/HTMLEntityNames.json deleted file mode 100644 index da3b881..0000000 --- a/WebCore/html/HTMLEntityNames.json +++ /dev/null @@ -1,8554 +0,0 @@ -[ - { - "entity": "AElig;", - "value": "U+000C6" - }, - { - "entity": "AElig", - "value": "U+000C6" - }, - { - "entity": "AMP;", - "value": "U+00026" - }, - { - "entity": "AMP", - "value": "U+00026" - }, - { - "entity": "Aacute;", - "value": "U+000C1" - }, - { - "entity": "Aacute", - "value": "U+000C1" - }, - { - "entity": "Abreve;", - "value": "U+00102" - }, - { - "entity": "Acirc;", - "value": "U+000C2" - }, - { - "entity": "Acirc", - "value": "U+000C2" - }, - { - "entity": "Acy;", - "value": "U+00410" - }, - { - "entity": "Afr;", - "value": "U+1D504" - }, - { - "entity": "Agrave;", - "value": "U+000C0" - }, - { - "entity": "Agrave", - "value": "U+000C0" - }, - { - "entity": "Alpha;", - "value": "U+00391" - }, - { - "entity": "Amacr;", - "value": "U+00100" - }, - { - "entity": "And;", - "value": "U+02A53" - }, - { - "entity": "Aogon;", - "value": "U+00104" - }, - { - "entity": "Aopf;", - "value": "U+1D538" - }, - { - "entity": "ApplyFunction;", - "value": "U+02061" - }, - { - "entity": "Aring;", - "value": "U+000C5" - }, - { - "entity": "Aring", - "value": "U+000C5" - }, - { - "entity": "Ascr;", - "value": "U+1D49C" - }, - { - "entity": "Assign;", - "value": "U+02254" - }, - { - "entity": "Atilde;", - "value": "U+000C3" - }, - { - "entity": "Atilde", - "value": "U+000C3" - }, - { - "entity": "Auml;", - "value": "U+000C4" - }, - { - "entity": "Auml", - "value": "U+000C4" - }, - { - "entity": "Backslash;", - "value": "U+02216" - }, - { - "entity": "Barv;", - "value": "U+02AE7" - }, - { - "entity": "Barwed;", - "value": "U+02306" - }, - { - "entity": "Bcy;", - "value": "U+00411" - }, - { - "entity": "Because;", - "value": "U+02235" - }, - { - "entity": "Bernoullis;", - "value": "U+0212C" - }, - { - "entity": "Beta;", - "value": "U+00392" - }, - { - "entity": "Bfr;", - "value": "U+1D505" - }, - { - "entity": "Bopf;", - "value": "U+1D539" - }, - { - "entity": "Breve;", - "value": "U+002D8" - }, - { - "entity": "Bscr;", - "value": "U+0212C" - }, - { - "entity": "Bumpeq;", - "value": "U+0224E" - }, - { - "entity": "CHcy;", - "value": "U+00427" - }, - { - "entity": "COPY;", - "value": "U+000A9" - }, - { - "entity": "COPY", - "value": "U+000A9" - }, - { - "entity": "Cacute;", - "value": "U+00106" - }, - { - "entity": "Cap;", - "value": "U+022D2" - }, - { - "entity": "CapitalDifferentialD;", - "value": "U+02145" - }, - { - "entity": "Cayleys;", - "value": "U+0212D" - }, - { - "entity": "Ccaron;", - "value": "U+0010C" - }, - { - "entity": "Ccedil;", - "value": "U+000C7" - }, - { - "entity": "Ccedil", - "value": "U+000C7" - }, - { - "entity": "Ccirc;", - "value": "U+00108" - }, - { - "entity": "Cconint;", - "value": "U+02230" - }, - { - "entity": "Cdot;", - "value": "U+0010A" - }, - { - "entity": "Cedilla;", - "value": "U+000B8" - }, - { - "entity": "CenterDot;", - "value": "U+000B7" - }, - { - "entity": "Cfr;", - "value": "U+0212D" - }, - { - "entity": "Chi;", - "value": "U+003A7" - }, - { - "entity": "CircleDot;", - "value": "U+02299" - }, - { - "entity": "CircleMinus;", - "value": "U+02296" - }, - { - "entity": "CirclePlus;", - "value": "U+02295" - }, - { - "entity": "CircleTimes;", - "value": "U+02297" - }, - { - "entity": "ClockwiseContourIntegral;", - "value": "U+02232" - }, - { - "entity": "CloseCurlyDoubleQuote;", - "value": "U+0201D" - }, - { - "entity": "CloseCurlyQuote;", - "value": "U+02019" - }, - { - "entity": "Colon;", - "value": "U+02237" - }, - { - "entity": "Colone;", - "value": "U+02A74" - }, - { - "entity": "Congruent;", - "value": "U+02261" - }, - { - "entity": "Conint;", - "value": "U+0222F" - }, - { - "entity": "ContourIntegral;", - "value": "U+0222E" - }, - { - "entity": "Copf;", - "value": "U+02102" - }, - { - "entity": "Coproduct;", - "value": "U+02210" - }, - { - "entity": "CounterClockwiseContourIntegral;", - "value": "U+02233" - }, - { - "entity": "Cross;", - "value": "U+02A2F" - }, - { - "entity": "Cscr;", - "value": "U+1D49E" - }, - { - "entity": "Cup;", - "value": "U+022D3" - }, - { - "entity": "CupCap;", - "value": "U+0224D" - }, - { - "entity": "DD;", - "value": "U+02145" - }, - { - "entity": "DDotrahd;", - "value": "U+02911" - }, - { - "entity": "DJcy;", - "value": "U+00402" - }, - { - "entity": "DScy;", - "value": "U+00405" - }, - { - "entity": "DZcy;", - "value": "U+0040F" - }, - { - "entity": "Dagger;", - "value": "U+02021" - }, - { - "entity": "Darr;", - "value": "U+021A1" - }, - { - "entity": "Dashv;", - "value": "U+02AE4" - }, - { - "entity": "Dcaron;", - "value": "U+0010E" - }, - { - "entity": "Dcy;", - "value": "U+00414" - }, - { - "entity": "Del;", - "value": "U+02207" - }, - { - "entity": "Delta;", - "value": "U+00394" - }, - { - "entity": "Dfr;", - "value": "U+1D507" - }, - { - "entity": "DiacriticalAcute;", - "value": "U+000B4" - }, - { - "entity": "DiacriticalDot;", - "value": "U+002D9" - }, - { - "entity": "DiacriticalDoubleAcute;", - "value": "U+002DD" - }, - { - "entity": "DiacriticalGrave;", - "value": "U+00060" - }, - { - "entity": "DiacriticalTilde;", - "value": "U+002DC" - }, - { - "entity": "Diamond;", - "value": "U+022C4" - }, - { - "entity": "DifferentialD;", - "value": "U+02146" - }, - { - "entity": "Dopf;", - "value": "U+1D53B" - }, - { - "entity": "Dot;", - "value": "U+000A8" - }, - { - "entity": "DotDot;", - "value": "U+020DC" - }, - { - "entity": "DotEqual;", - "value": "U+02250" - }, - { - "entity": "DoubleContourIntegral;", - "value": "U+0222F" - }, - { - "entity": "DoubleDot;", - "value": "U+000A8" - }, - { - "entity": "DoubleDownArrow;", - "value": "U+021D3" - }, - { - "entity": "DoubleLeftArrow;", - "value": "U+021D0" - }, - { - "entity": "DoubleLeftRightArrow;", - "value": "U+021D4" - }, - { - "entity": "DoubleLeftTee;", - "value": "U+02AE4" - }, - { - "entity": "DoubleLongLeftArrow;", - "value": "U+027F8" - }, - { - "entity": "DoubleLongLeftRightArrow;", - "value": "U+027FA" - }, - { - "entity": "DoubleLongRightArrow;", - "value": "U+027F9" - }, - { - "entity": "DoubleRightArrow;", - "value": "U+021D2" - }, - { - "entity": "DoubleRightTee;", - "value": "U+022A8" - }, - { - "entity": "DoubleUpArrow;", - "value": "U+021D1" - }, - { - "entity": "DoubleUpDownArrow;", - "value": "U+021D5" - }, - { - "entity": "DoubleVerticalBar;", - "value": "U+02225" - }, - { - "entity": "DownArrow;", - "value": "U+02193" - }, - { - "entity": "DownArrowBar;", - "value": "U+02913" - }, - { - "entity": "DownArrowUpArrow;", - "value": "U+021F5" - }, - { - "entity": "DownBreve;", - "value": "U+00311" - }, - { - "entity": "DownLeftRightVector;", - "value": "U+02950" - }, - { - "entity": "DownLeftTeeVector;", - "value": "U+0295E" - }, - { - "entity": "DownLeftVector;", - "value": "U+021BD" - }, - { - "entity": "DownLeftVectorBar;", - "value": "U+02956" - }, - { - "entity": "DownRightTeeVector;", - "value": "U+0295F" - }, - { - "entity": "DownRightVector;", - "value": "U+021C1" - }, - { - "entity": "DownRightVectorBar;", - "value": "U+02957" - }, - { - "entity": "DownTee;", - "value": "U+022A4" - }, - { - "entity": "DownTeeArrow;", - "value": "U+021A7" - }, - { - "entity": "Downarrow;", - "value": "U+021D3" - }, - { - "entity": "Dscr;", - "value": "U+1D49F" - }, - { - "entity": "Dstrok;", - "value": "U+00110" - }, - { - "entity": "ENG;", - "value": "U+0014A" - }, - { - "entity": "ETH;", - "value": "U+000D0" - }, - { - "entity": "ETH", - "value": "U+000D0" - }, - { - "entity": "Eacute;", - "value": "U+000C9" - }, - { - "entity": "Eacute", - "value": "U+000C9" - }, - { - "entity": "Ecaron;", - "value": "U+0011A" - }, - { - "entity": "Ecirc;", - "value": "U+000CA" - }, - { - "entity": "Ecirc", - "value": "U+000CA" - }, - { - "entity": "Ecy;", - "value": "U+0042D" - }, - { - "entity": "Edot;", - "value": "U+00116" - }, - { - "entity": "Efr;", - "value": "U+1D508" - }, - { - "entity": "Egrave;", - "value": "U+000C8" - }, - { - "entity": "Egrave", - "value": "U+000C8" - }, - { - "entity": "Element;", - "value": "U+02208" - }, - { - "entity": "Emacr;", - "value": "U+00112" - }, - { - "entity": "EmptySmallSquare;", - "value": "U+025FB" - }, - { - "entity": "EmptyVerySmallSquare;", - "value": "U+025AB" - }, - { - "entity": "Eogon;", - "value": "U+00118" - }, - { - "entity": "Eopf;", - "value": "U+1D53C" - }, - { - "entity": "Epsilon;", - "value": "U+00395" - }, - { - "entity": "Equal;", - "value": "U+02A75" - }, - { - "entity": "EqualTilde;", - "value": "U+02242" - }, - { - "entity": "Equilibrium;", - "value": "U+021CC" - }, - { - "entity": "Escr;", - "value": "U+02130" - }, - { - "entity": "Esim;", - "value": "U+02A73" - }, - { - "entity": "Eta;", - "value": "U+00397" - }, - { - "entity": "Euml;", - "value": "U+000CB" - }, - { - "entity": "Euml", - "value": "U+000CB" - }, - { - "entity": "Exists;", - "value": "U+02203" - }, - { - "entity": "ExponentialE;", - "value": "U+02147" - }, - { - "entity": "Fcy;", - "value": "U+00424" - }, - { - "entity": "Ffr;", - "value": "U+1D509" - }, - { - "entity": "FilledSmallSquare;", - "value": "U+025FC" - }, - { - "entity": "FilledVerySmallSquare;", - "value": "U+025AA" - }, - { - "entity": "Fopf;", - "value": "U+1D53D" - }, - { - "entity": "ForAll;", - "value": "U+02200" - }, - { - "entity": "Fouriertrf;", - "value": "U+02131" - }, - { - "entity": "Fscr;", - "value": "U+02131" - }, - { - "entity": "GJcy;", - "value": "U+00403" - }, - { - "entity": "GT;", - "value": "U+0003E" - }, - { - "entity": "GT", - "value": "U+0003E" - }, - { - "entity": "Gamma;", - "value": "U+00393" - }, - { - "entity": "Gammad;", - "value": "U+003DC" - }, - { - "entity": "Gbreve;", - "value": "U+0011E" - }, - { - "entity": "Gcedil;", - "value": "U+00122" - }, - { - "entity": "Gcirc;", - "value": "U+0011C" - }, - { - "entity": "Gcy;", - "value": "U+00413" - }, - { - "entity": "Gdot;", - "value": "U+00120" - }, - { - "entity": "Gfr;", - "value": "U+1D50A" - }, - { - "entity": "Gg;", - "value": "U+022D9" - }, - { - "entity": "Gopf;", - "value": "U+1D53E" - }, - { - "entity": "GreaterEqual;", - "value": "U+02265" - }, - { - "entity": "GreaterEqualLess;", - "value": "U+022DB" - }, - { - "entity": "GreaterFullEqual;", - "value": "U+02267" - }, - { - "entity": "GreaterGreater;", - "value": "U+02AA2" - }, - { - "entity": "GreaterLess;", - "value": "U+02277" - }, - { - "entity": "GreaterSlantEqual;", - "value": "U+02A7E" - }, - { - "entity": "GreaterTilde;", - "value": "U+02273" - }, - { - "entity": "Gscr;", - "value": "U+1D4A2" - }, - { - "entity": "Gt;", - "value": "U+0226B" - }, - { - "entity": "HARDcy;", - "value": "U+0042A" - }, - { - "entity": "Hacek;", - "value": "U+002C7" - }, - { - "entity": "Hat;", - "value": "U+0005E" - }, - { - "entity": "Hcirc;", - "value": "U+00124" - }, - { - "entity": "Hfr;", - "value": "U+0210C" - }, - { - "entity": "HilbertSpace;", - "value": "U+0210B" - }, - { - "entity": "Hopf;", - "value": "U+0210D" - }, - { - "entity": "HorizontalLine;", - "value": "U+02500" - }, - { - "entity": "Hscr;", - "value": "U+0210B" - }, - { - "entity": "Hstrok;", - "value": "U+00126" - }, - { - "entity": "HumpDownHump;", - "value": "U+0224E" - }, - { - "entity": "HumpEqual;", - "value": "U+0224F" - }, - { - "entity": "IEcy;", - "value": "U+00415" - }, - { - "entity": "IJlig;", - "value": "U+00132" - }, - { - "entity": "IOcy;", - "value": "U+00401" - }, - { - "entity": "Iacute;", - "value": "U+000CD" - }, - { - "entity": "Iacute", - "value": "U+000CD" - }, - { - "entity": "Icirc;", - "value": "U+000CE" - }, - { - "entity": "Icirc", - "value": "U+000CE" - }, - { - "entity": "Icy;", - "value": "U+00418" - }, - { - "entity": "Idot;", - "value": "U+00130" - }, - { - "entity": "Ifr;", - "value": "U+02111" - }, - { - "entity": "Igrave;", - "value": "U+000CC" - }, - { - "entity": "Igrave", - "value": "U+000CC" - }, - { - "entity": "Im;", - "value": "U+02111" - }, - { - "entity": "Imacr;", - "value": "U+0012A" - }, - { - "entity": "ImaginaryI;", - "value": "U+02148" - }, - { - "entity": "Implies;", - "value": "U+021D2" - }, - { - "entity": "Int;", - "value": "U+0222C" - }, - { - "entity": "Integral;", - "value": "U+0222B" - }, - { - "entity": "Intersection;", - "value": "U+022C2" - }, - { - "entity": "InvisibleComma;", - "value": "U+02063" - }, - { - "entity": "InvisibleTimes;", - "value": "U+02062" - }, - { - "entity": "Iogon;", - "value": "U+0012E" - }, - { - "entity": "Iopf;", - "value": "U+1D540" - }, - { - "entity": "Iota;", - "value": "U+00399" - }, - { - "entity": "Iscr;", - "value": "U+02110" - }, - { - "entity": "Itilde;", - "value": "U+00128" - }, - { - "entity": "Iukcy;", - "value": "U+00406" - }, - { - "entity": "Iuml;", - "value": "U+000CF" - }, - { - "entity": "Iuml", - "value": "U+000CF" - }, - { - "entity": "Jcirc;", - "value": "U+00134" - }, - { - "entity": "Jcy;", - "value": "U+00419" - }, - { - "entity": "Jfr;", - "value": "U+1D50D" - }, - { - "entity": "Jopf;", - "value": "U+1D541" - }, - { - "entity": "Jscr;", - "value": "U+1D4A5" - }, - { - "entity": "Jsercy;", - "value": "U+00408" - }, - { - "entity": "Jukcy;", - "value": "U+00404" - }, - { - "entity": "KHcy;", - "value": "U+00425" - }, - { - "entity": "KJcy;", - "value": "U+0040C" - }, - { - "entity": "Kappa;", - "value": "U+0039A" - }, - { - "entity": "Kcedil;", - "value": "U+00136" - }, - { - "entity": "Kcy;", - "value": "U+0041A" - }, - { - "entity": "Kfr;", - "value": "U+1D50E" - }, - { - "entity": "Kopf;", - "value": "U+1D542" - }, - { - "entity": "Kscr;", - "value": "U+1D4A6" - }, - { - "entity": "LJcy;", - "value": "U+00409" - }, - { - "entity": "LT;", - "value": "U+0003C" - }, - { - "entity": "LT", - "value": "U+0003C" - }, - { - "entity": "Lacute;", - "value": "U+00139" - }, - { - "entity": "Lambda;", - "value": "U+0039B" - }, - { - "entity": "Lang;", - "value": "U+027EA" - }, - { - "entity": "Laplacetrf;", - "value": "U+02112" - }, - { - "entity": "Larr;", - "value": "U+0219E" - }, - { - "entity": "Lcaron;", - "value": "U+0013D" - }, - { - "entity": "Lcedil;", - "value": "U+0013B" - }, - { - "entity": "Lcy;", - "value": "U+0041B" - }, - { - "entity": "LeftAngleBracket;", - "value": "U+027E8" - }, - { - "entity": "LeftArrow;", - "value": "U+02190" - }, - { - "entity": "LeftArrowBar;", - "value": "U+021E4" - }, - { - "entity": "LeftArrowRightArrow;", - "value": "U+021C6" - }, - { - "entity": "LeftCeiling;", - "value": "U+02308" - }, - { - "entity": "LeftDoubleBracket;", - "value": "U+027E6" - }, - { - "entity": "LeftDownTeeVector;", - "value": "U+02961" - }, - { - "entity": "LeftDownVector;", - "value": "U+021C3" - }, - { - "entity": "LeftDownVectorBar;", - "value": "U+02959" - }, - { - "entity": "LeftFloor;", - "value": "U+0230A" - }, - { - "entity": "LeftRightArrow;", - "value": "U+02194" - }, - { - "entity": "LeftRightVector;", - "value": "U+0294E" - }, - { - "entity": "LeftTee;", - "value": "U+022A3" - }, - { - "entity": "LeftTeeArrow;", - "value": "U+021A4" - }, - { - "entity": "LeftTeeVector;", - "value": "U+0295A" - }, - { - "entity": "LeftTriangle;", - "value": "U+022B2" - }, - { - "entity": "LeftTriangleBar;", - "value": "U+029CF" - }, - { - "entity": "LeftTriangleEqual;", - "value": "U+022B4" - }, - { - "entity": "LeftUpDownVector;", - "value": "U+02951" - }, - { - "entity": "LeftUpTeeVector;", - "value": "U+02960" - }, - { - "entity": "LeftUpVector;", - "value": "U+021BF" - }, - { - "entity": "LeftUpVectorBar;", - "value": "U+02958" - }, - { - "entity": "LeftVector;", - "value": "U+021BC" - }, - { - "entity": "LeftVectorBar;", - "value": "U+02952" - }, - { - "entity": "Leftarrow;", - "value": "U+021D0" - }, - { - "entity": "Leftrightarrow;", - "value": "U+021D4" - }, - { - "entity": "LessEqualGreater;", - "value": "U+022DA" - }, - { - "entity": "LessFullEqual;", - "value": "U+02266" - }, - { - "entity": "LessGreater;", - "value": "U+02276" - }, - { - "entity": "LessLess;", - "value": "U+02AA1" - }, - { - "entity": "LessSlantEqual;", - "value": "U+02A7D" - }, - { - "entity": "LessTilde;", - "value": "U+02272" - }, - { - "entity": "Lfr;", - "value": "U+1D50F" - }, - { - "entity": "Ll;", - "value": "U+022D8" - }, - { - "entity": "Lleftarrow;", - "value": "U+021DA" - }, - { - "entity": "Lmidot;", - "value": "U+0013F" - }, - { - "entity": "LongLeftArrow;", - "value": "U+027F5" - }, - { - "entity": "LongLeftRightArrow;", - "value": "U+027F7" - }, - { - "entity": "LongRightArrow;", - "value": "U+027F6" - }, - { - "entity": "Longleftarrow;", - "value": "U+027F8" - }, - { - "entity": "Longleftrightarrow;", - "value": "U+027FA" - }, - { - "entity": "Longrightarrow;", - "value": "U+027F9" - }, - { - "entity": "Lopf;", - "value": "U+1D543" - }, - { - "entity": "LowerLeftArrow;", - "value": "U+02199" - }, - { - "entity": "LowerRightArrow;", - "value": "U+02198" - }, - { - "entity": "Lscr;", - "value": "U+02112" - }, - { - "entity": "Lsh;", - "value": "U+021B0" - }, - { - "entity": "Lstrok;", - "value": "U+00141" - }, - { - "entity": "Lt;", - "value": "U+0226A" - }, - { - "entity": "Map;", - "value": "U+02905" - }, - { - "entity": "Mcy;", - "value": "U+0041C" - }, - { - "entity": "MediumSpace;", - "value": "U+0205F" - }, - { - "entity": "Mellintrf;", - "value": "U+02133" - }, - { - "entity": "Mfr;", - "value": "U+1D510" - }, - { - "entity": "MinusPlus;", - "value": "U+02213" - }, - { - "entity": "Mopf;", - "value": "U+1D544" - }, - { - "entity": "Mscr;", - "value": "U+02133" - }, - { - "entity": "Mu;", - "value": "U+0039C" - }, - { - "entity": "NJcy;", - "value": "U+0040A" - }, - { - "entity": "Nacute;", - "value": "U+00143" - }, - { - "entity": "Ncaron;", - "value": "U+00147" - }, - { - "entity": "Ncedil;", - "value": "U+00145" - }, - { - "entity": "Ncy;", - "value": "U+0041D" - }, - { - "entity": "NegativeMediumSpace;", - "value": "U+0200B" - }, - { - "entity": "NegativeThickSpace;", - "value": "U+0200B" - }, - { - "entity": "NegativeThinSpace;", - "value": "U+0200B" - }, - { - "entity": "NegativeVeryThinSpace;", - "value": "U+0200B" - }, - { - "entity": "NestedGreaterGreater;", - "value": "U+0226B" - }, - { - "entity": "NestedLessLess;", - "value": "U+0226A" - }, - { - "entity": "NewLine;", - "value": "U+0000A" - }, - { - "entity": "Nfr;", - "value": "U+1D511" - }, - { - "entity": "NoBreak;", - "value": "U+02060" - }, - { - "entity": "NonBreakingSpace;", - "value": "U+000A0" - }, - { - "entity": "Nopf;", - "value": "U+02115" - }, - { - "entity": "Not;", - "value": "U+02AEC" - }, - { - "entity": "NotCongruent;", - "value": "U+02262" - }, - { - "entity": "NotCupCap;", - "value": "U+0226D" - }, - { - "entity": "NotDoubleVerticalBar;", - "value": "U+02226" - }, - { - "entity": "NotElement;", - "value": "U+02209" - }, - { - "entity": "NotEqual;", - "value": "U+02260" - }, - { - "entity": "NotExists;", - "value": "U+02204" - }, - { - "entity": "NotGreater;", - "value": "U+0226F" - }, - { - "entity": "NotGreaterEqual;", - "value": "U+02271" - }, - { - "entity": "NotGreaterLess;", - "value": "U+02279" - }, - { - "entity": "NotGreaterTilde;", - "value": "U+02275" - }, - { - "entity": "NotLeftTriangle;", - "value": "U+022EA" - }, - { - "entity": "NotLeftTriangleEqual;", - "value": "U+022EC" - }, - { - "entity": "NotLess;", - "value": "U+0226E" - }, - { - "entity": "NotLessEqual;", - "value": "U+02270" - }, - { - "entity": "NotLessGreater;", - "value": "U+02278" - }, - { - "entity": "NotLessTilde;", - "value": "U+02274" - }, - { - "entity": "NotPrecedes;", - "value": "U+02280" - }, - { - "entity": "NotPrecedesSlantEqual;", - "value": "U+022E0" - }, - { - "entity": "NotReverseElement;", - "value": "U+0220C" - }, - { - "entity": "NotRightTriangle;", - "value": "U+022EB" - }, - { - "entity": "NotRightTriangleEqual;", - "value": "U+022ED" - }, - { - "entity": "NotSquareSubsetEqual;", - "value": "U+022E2" - }, - { - "entity": "NotSquareSupersetEqual;", - "value": "U+022E3" - }, - { - "entity": "NotSubsetEqual;", - "value": "U+02288" - }, - { - "entity": "NotSucceeds;", - "value": "U+02281" - }, - { - "entity": "NotSucceedsSlantEqual;", - "value": "U+022E1" - }, - { - "entity": "NotSupersetEqual;", - "value": "U+02289" - }, - { - "entity": "NotTilde;", - "value": "U+02241" - }, - { - "entity": "NotTildeEqual;", - "value": "U+02244" - }, - { - "entity": "NotTildeFullEqual;", - "value": "U+02247" - }, - { - "entity": "NotTildeTilde;", - "value": "U+02249" - }, - { - "entity": "NotVerticalBar;", - "value": "U+02224" - }, - { - "entity": "Nscr;", - "value": "U+1D4A9" - }, - { - "entity": "Ntilde;", - "value": "U+000D1" - }, - { - "entity": "Ntilde", - "value": "U+000D1" - }, - { - "entity": "Nu;", - "value": "U+0039D" - }, - { - "entity": "OElig;", - "value": "U+00152" - }, - { - "entity": "Oacute;", - "value": "U+000D3" - }, - { - "entity": "Oacute", - "value": "U+000D3" - }, - { - "entity": "Ocirc;", - "value": "U+000D4" - }, - { - "entity": "Ocirc", - "value": "U+000D4" - }, - { - "entity": "Ocy;", - "value": "U+0041E" - }, - { - "entity": "Odblac;", - "value": "U+00150" - }, - { - "entity": "Ofr;", - "value": "U+1D512" - }, - { - "entity": "Ograve;", - "value": "U+000D2" - }, - { - "entity": "Ograve", - "value": "U+000D2" - }, - { - "entity": "Omacr;", - "value": "U+0014C" - }, - { - "entity": "Omega;", - "value": "U+003A9" - }, - { - "entity": "Omicron;", - "value": "U+0039F" - }, - { - "entity": "Oopf;", - "value": "U+1D546" - }, - { - "entity": "OpenCurlyDoubleQuote;", - "value": "U+0201C" - }, - { - "entity": "OpenCurlyQuote;", - "value": "U+02018" - }, - { - "entity": "Or;", - "value": "U+02A54" - }, - { - "entity": "Oscr;", - "value": "U+1D4AA" - }, - { - "entity": "Oslash;", - "value": "U+000D8" - }, - { - "entity": "Oslash", - "value": "U+000D8" - }, - { - "entity": "Otilde;", - "value": "U+000D5" - }, - { - "entity": "Otilde", - "value": "U+000D5" - }, - { - "entity": "Otimes;", - "value": "U+02A37" - }, - { - "entity": "Ouml;", - "value": "U+000D6" - }, - { - "entity": "Ouml", - "value": "U+000D6" - }, - { - "entity": "OverBar;", - "value": "U+0203E" - }, - { - "entity": "OverBrace;", - "value": "U+023DE" - }, - { - "entity": "OverBracket;", - "value": "U+023B4" - }, - { - "entity": "OverParenthesis;", - "value": "U+023DC" - }, - { - "entity": "PartialD;", - "value": "U+02202" - }, - { - "entity": "Pcy;", - "value": "U+0041F" - }, - { - "entity": "Pfr;", - "value": "U+1D513" - }, - { - "entity": "Phi;", - "value": "U+003A6" - }, - { - "entity": "Pi;", - "value": "U+003A0" - }, - { - "entity": "PlusMinus;", - "value": "U+000B1" - }, - { - "entity": "Poincareplane;", - "value": "U+0210C" - }, - { - "entity": "Popf;", - "value": "U+02119" - }, - { - "entity": "Pr;", - "value": "U+02ABB" - }, - { - "entity": "Precedes;", - "value": "U+0227A" - }, - { - "entity": "PrecedesEqual;", - "value": "U+02AAF" - }, - { - "entity": "PrecedesSlantEqual;", - "value": "U+0227C" - }, - { - "entity": "PrecedesTilde;", - "value": "U+0227E" - }, - { - "entity": "Prime;", - "value": "U+02033" - }, - { - "entity": "Product;", - "value": "U+0220F" - }, - { - "entity": "Proportion;", - "value": "U+02237" - }, - { - "entity": "Proportional;", - "value": "U+0221D" - }, - { - "entity": "Pscr;", - "value": "U+1D4AB" - }, - { - "entity": "Psi;", - "value": "U+003A8" - }, - { - "entity": "QUOT;", - "value": "U+00022" - }, - { - "entity": "QUOT", - "value": "U+00022" - }, - { - "entity": "Qfr;", - "value": "U+1D514" - }, - { - "entity": "Qopf;", - "value": "U+0211A" - }, - { - "entity": "Qscr;", - "value": "U+1D4AC" - }, - { - "entity": "RBarr;", - "value": "U+02910" - }, - { - "entity": "REG;", - "value": "U+000AE" - }, - { - "entity": "REG", - "value": "U+000AE" - }, - { - "entity": "Racute;", - "value": "U+00154" - }, - { - "entity": "Rang;", - "value": "U+027EB" - }, - { - "entity": "Rarr;", - "value": "U+021A0" - }, - { - "entity": "Rarrtl;", - "value": "U+02916" - }, - { - "entity": "Rcaron;", - "value": "U+00158" - }, - { - "entity": "Rcedil;", - "value": "U+00156" - }, - { - "entity": "Rcy;", - "value": "U+00420" - }, - { - "entity": "Re;", - "value": "U+0211C" - }, - { - "entity": "ReverseElement;", - "value": "U+0220B" - }, - { - "entity": "ReverseEquilibrium;", - "value": "U+021CB" - }, - { - "entity": "ReverseUpEquilibrium;", - "value": "U+0296F" - }, - { - "entity": "Rfr;", - "value": "U+0211C" - }, - { - "entity": "Rho;", - "value": "U+003A1" - }, - { - "entity": "RightAngleBracket;", - "value": "U+027E9" - }, - { - "entity": "RightArrow;", - "value": "U+02192" - }, - { - "entity": "RightArrowBar;", - "value": "U+021E5" - }, - { - "entity": "RightArrowLeftArrow;", - "value": "U+021C4" - }, - { - "entity": "RightCeiling;", - "value": "U+02309" - }, - { - "entity": "RightDoubleBracket;", - "value": "U+027E7" - }, - { - "entity": "RightDownTeeVector;", - "value": "U+0295D" - }, - { - "entity": "RightDownVector;", - "value": "U+021C2" - }, - { - "entity": "RightDownVectorBar;", - "value": "U+02955" - }, - { - "entity": "RightFloor;", - "value": "U+0230B" - }, - { - "entity": "RightTee;", - "value": "U+022A2" - }, - { - "entity": "RightTeeArrow;", - "value": "U+021A6" - }, - { - "entity": "RightTeeVector;", - "value": "U+0295B" - }, - { - "entity": "RightTriangle;", - "value": "U+022B3" - }, - { - "entity": "RightTriangleBar;", - "value": "U+029D0" - }, - { - "entity": "RightTriangleEqual;", - "value": "U+022B5" - }, - { - "entity": "RightUpDownVector;", - "value": "U+0294F" - }, - { - "entity": "RightUpTeeVector;", - "value": "U+0295C" - }, - { - "entity": "RightUpVector;", - "value": "U+021BE" - }, - { - "entity": "RightUpVectorBar;", - "value": "U+02954" - }, - { - "entity": "RightVector;", - "value": "U+021C0" - }, - { - "entity": "RightVectorBar;", - "value": "U+02953" - }, - { - "entity": "Rightarrow;", - "value": "U+021D2" - }, - { - "entity": "Ropf;", - "value": "U+0211D" - }, - { - "entity": "RoundImplies;", - "value": "U+02970" - }, - { - "entity": "Rrightarrow;", - "value": "U+021DB" - }, - { - "entity": "Rscr;", - "value": "U+0211B" - }, - { - "entity": "Rsh;", - "value": "U+021B1" - }, - { - "entity": "RuleDelayed;", - "value": "U+029F4" - }, - { - "entity": "SHCHcy;", - "value": "U+00429" - }, - { - "entity": "SHcy;", - "value": "U+00428" - }, - { - "entity": "SOFTcy;", - "value": "U+0042C" - }, - { - "entity": "Sacute;", - "value": "U+0015A" - }, - { - "entity": "Sc;", - "value": "U+02ABC" - }, - { - "entity": "Scaron;", - "value": "U+00160" - }, - { - "entity": "Scedil;", - "value": "U+0015E" - }, - { - "entity": "Scirc;", - "value": "U+0015C" - }, - { - "entity": "Scy;", - "value": "U+00421" - }, - { - "entity": "Sfr;", - "value": "U+1D516" - }, - { - "entity": "ShortDownArrow;", - "value": "U+02193" - }, - { - "entity": "ShortLeftArrow;", - "value": "U+02190" - }, - { - "entity": "ShortRightArrow;", - "value": "U+02192" - }, - { - "entity": "ShortUpArrow;", - "value": "U+02191" - }, - { - "entity": "Sigma;", - "value": "U+003A3" - }, - { - "entity": "SmallCircle;", - "value": "U+02218" - }, - { - "entity": "Sopf;", - "value": "U+1D54A" - }, - { - "entity": "Sqrt;", - "value": "U+0221A" - }, - { - "entity": "Square;", - "value": "U+025A1" - }, - { - "entity": "SquareIntersection;", - "value": "U+02293" - }, - { - "entity": "SquareSubset;", - "value": "U+0228F" - }, - { - "entity": "SquareSubsetEqual;", - "value": "U+02291" - }, - { - "entity": "SquareSuperset;", - "value": "U+02290" - }, - { - "entity": "SquareSupersetEqual;", - "value": "U+02292" - }, - { - "entity": "SquareUnion;", - "value": "U+02294" - }, - { - "entity": "Sscr;", - "value": "U+1D4AE" - }, - { - "entity": "Star;", - "value": "U+022C6" - }, - { - "entity": "Sub;", - "value": "U+022D0" - }, - { - "entity": "Subset;", - "value": "U+022D0" - }, - { - "entity": "SubsetEqual;", - "value": "U+02286" - }, - { - "entity": "Succeeds;", - "value": "U+0227B" - }, - { - "entity": "SucceedsEqual;", - "value": "U+02AB0" - }, - { - "entity": "SucceedsSlantEqual;", - "value": "U+0227D" - }, - { - "entity": "SucceedsTilde;", - "value": "U+0227F" - }, - { - "entity": "SuchThat;", - "value": "U+0220B" - }, - { - "entity": "Sum;", - "value": "U+02211" - }, - { - "entity": "Sup;", - "value": "U+022D1" - }, - { - "entity": "Superset;", - "value": "U+02283" - }, - { - "entity": "SupersetEqual;", - "value": "U+02287" - }, - { - "entity": "Supset;", - "value": "U+022D1" - }, - { - "entity": "THORN;", - "value": "U+000DE" - }, - { - "entity": "THORN", - "value": "U+000DE" - }, - { - "entity": "TRADE;", - "value": "U+02122" - }, - { - "entity": "TSHcy;", - "value": "U+0040B" - }, - { - "entity": "TScy;", - "value": "U+00426" - }, - { - "entity": "Tab;", - "value": "U+00009" - }, - { - "entity": "Tau;", - "value": "U+003A4" - }, - { - "entity": "Tcaron;", - "value": "U+00164" - }, - { - "entity": "Tcedil;", - "value": "U+00162" - }, - { - "entity": "Tcy;", - "value": "U+00422" - }, - { - "entity": "Tfr;", - "value": "U+1D517" - }, - { - "entity": "Therefore;", - "value": "U+02234" - }, - { - "entity": "Theta;", - "value": "U+00398" - }, - { - "entity": "ThinSpace;", - "value": "U+02009" - }, - { - "entity": "Tilde;", - "value": "U+0223C" - }, - { - "entity": "TildeEqual;", - "value": "U+02243" - }, - { - "entity": "TildeFullEqual;", - "value": "U+02245" - }, - { - "entity": "TildeTilde;", - "value": "U+02248" - }, - { - "entity": "Topf;", - "value": "U+1D54B" - }, - { - "entity": "TripleDot;", - "value": "U+020DB" - }, - { - "entity": "Tscr;", - "value": "U+1D4AF" - }, - { - "entity": "Tstrok;", - "value": "U+00166" - }, - { - "entity": "Uacute;", - "value": "U+000DA" - }, - { - "entity": "Uacute", - "value": "U+000DA" - }, - { - "entity": "Uarr;", - "value": "U+0219F" - }, - { - "entity": "Uarrocir;", - "value": "U+02949" - }, - { - "entity": "Ubrcy;", - "value": "U+0040E" - }, - { - "entity": "Ubreve;", - "value": "U+0016C" - }, - { - "entity": "Ucirc;", - "value": "U+000DB" - }, - { - "entity": "Ucirc", - "value": "U+000DB" - }, - { - "entity": "Ucy;", - "value": "U+00423" - }, - { - "entity": "Udblac;", - "value": "U+00170" - }, - { - "entity": "Ufr;", - "value": "U+1D518" - }, - { - "entity": "Ugrave;", - "value": "U+000D9" - }, - { - "entity": "Ugrave", - "value": "U+000D9" - }, - { - "entity": "Umacr;", - "value": "U+0016A" - }, - { - "entity": "UnderBar;", - "value": "U+0005F" - }, - { - "entity": "UnderBrace;", - "value": "U+023DF" - }, - { - "entity": "UnderBracket;", - "value": "U+023B5" - }, - { - "entity": "UnderParenthesis;", - "value": "U+023DD" - }, - { - "entity": "Union;", - "value": "U+022C3" - }, - { - "entity": "UnionPlus;", - "value": "U+0228E" - }, - { - "entity": "Uogon;", - "value": "U+00172" - }, - { - "entity": "Uopf;", - "value": "U+1D54C" - }, - { - "entity": "UpArrow;", - "value": "U+02191" - }, - { - "entity": "UpArrowBar;", - "value": "U+02912" - }, - { - "entity": "UpArrowDownArrow;", - "value": "U+021C5" - }, - { - "entity": "UpDownArrow;", - "value": "U+02195" - }, - { - "entity": "UpEquilibrium;", - "value": "U+0296E" - }, - { - "entity": "UpTee;", - "value": "U+022A5" - }, - { - "entity": "UpTeeArrow;", - "value": "U+021A5" - }, - { - "entity": "Uparrow;", - "value": "U+021D1" - }, - { - "entity": "Updownarrow;", - "value": "U+021D5" - }, - { - "entity": "UpperLeftArrow;", - "value": "U+02196" - }, - { - "entity": "UpperRightArrow;", - "value": "U+02197" - }, - { - "entity": "Upsi;", - "value": "U+003D2" - }, - { - "entity": "Upsilon;", - "value": "U+003A5" - }, - { - "entity": "Uring;", - "value": "U+0016E" - }, - { - "entity": "Uscr;", - "value": "U+1D4B0" - }, - { - "entity": "Utilde;", - "value": "U+00168" - }, - { - "entity": "Uuml;", - "value": "U+000DC" - }, - { - "entity": "Uuml", - "value": "U+000DC" - }, - { - "entity": "VDash;", - "value": "U+022AB" - }, - { - "entity": "Vbar;", - "value": "U+02AEB" - }, - { - "entity": "Vcy;", - "value": "U+00412" - }, - { - "entity": "Vdash;", - "value": "U+022A9" - }, - { - "entity": "Vdashl;", - "value": "U+02AE6" - }, - { - "entity": "Vee;", - "value": "U+022C1" - }, - { - "entity": "Verbar;", - "value": "U+02016" - }, - { - "entity": "Vert;", - "value": "U+02016" - }, - { - "entity": "VerticalBar;", - "value": "U+02223" - }, - { - "entity": "VerticalLine;", - "value": "U+0007C" - }, - { - "entity": "VerticalSeparator;", - "value": "U+02758" - }, - { - "entity": "VerticalTilde;", - "value": "U+02240" - }, - { - "entity": "VeryThinSpace;", - "value": "U+0200A" - }, - { - "entity": "Vfr;", - "value": "U+1D519" - }, - { - "entity": "Vopf;", - "value": "U+1D54D" - }, - { - "entity": "Vscr;", - "value": "U+1D4B1" - }, - { - "entity": "Vvdash;", - "value": "U+022AA" - }, - { - "entity": "Wcirc;", - "value": "U+00174" - }, - { - "entity": "Wedge;", - "value": "U+022C0" - }, - { - "entity": "Wfr;", - "value": "U+1D51A" - }, - { - "entity": "Wopf;", - "value": "U+1D54E" - }, - { - "entity": "Wscr;", - "value": "U+1D4B2" - }, - { - "entity": "Xfr;", - "value": "U+1D51B" - }, - { - "entity": "Xi;", - "value": "U+0039E" - }, - { - "entity": "Xopf;", - "value": "U+1D54F" - }, - { - "entity": "Xscr;", - "value": "U+1D4B3" - }, - { - "entity": "YAcy;", - "value": "U+0042F" - }, - { - "entity": "YIcy;", - "value": "U+00407" - }, - { - "entity": "YUcy;", - "value": "U+0042E" - }, - { - "entity": "Yacute;", - "value": "U+000DD" - }, - { - "entity": "Yacute", - "value": "U+000DD" - }, - { - "entity": "Ycirc;", - "value": "U+00176" - }, - { - "entity": "Ycy;", - "value": "U+0042B" - }, - { - "entity": "Yfr;", - "value": "U+1D51C" - }, - { - "entity": "Yopf;", - "value": "U+1D550" - }, - { - "entity": "Yscr;", - "value": "U+1D4B4" - }, - { - "entity": "Yuml;", - "value": "U+00178" - }, - { - "entity": "ZHcy;", - "value": "U+00416" - }, - { - "entity": "Zacute;", - "value": "U+00179" - }, - { - "entity": "Zcaron;", - "value": "U+0017D" - }, - { - "entity": "Zcy;", - "value": "U+00417" - }, - { - "entity": "Zdot;", - "value": "U+0017B" - }, - { - "entity": "ZeroWidthSpace;", - "value": "U+0200B" - }, - { - "entity": "Zeta;", - "value": "U+00396" - }, - { - "entity": "Zfr;", - "value": "U+02128" - }, - { - "entity": "Zopf;", - "value": "U+02124" - }, - { - "entity": "Zscr;", - "value": "U+1D4B5" - }, - { - "entity": "aacute;", - "value": "U+000E1" - }, - { - "entity": "aacute", - "value": "U+000E1" - }, - { - "entity": "abreve;", - "value": "U+00103" - }, - { - "entity": "ac;", - "value": "U+0223E" - }, - { - "entity": "acd;", - "value": "U+0223F" - }, - { - "entity": "acirc;", - "value": "U+000E2" - }, - { - "entity": "acirc", - "value": "U+000E2" - }, - { - "entity": "acute;", - "value": "U+000B4" - }, - { - "entity": "acute", - "value": "U+000B4" - }, - { - "entity": "acy;", - "value": "U+00430" - }, - { - "entity": "aelig;", - "value": "U+000E6" - }, - { - "entity": "aelig", - "value": "U+000E6" - }, - { - "entity": "af;", - "value": "U+02061" - }, - { - "entity": "afr;", - "value": "U+1D51E" - }, - { - "entity": "agrave;", - "value": "U+000E0" - }, - { - "entity": "agrave", - "value": "U+000E0" - }, - { - "entity": "alefsym;", - "value": "U+02135" - }, - { - "entity": "aleph;", - "value": "U+02135" - }, - { - "entity": "alpha;", - "value": "U+003B1" - }, - { - "entity": "amacr;", - "value": "U+00101" - }, - { - "entity": "amalg;", - "value": "U+02A3F" - }, - { - "entity": "amp;", - "value": "U+00026" - }, - { - "entity": "amp", - "value": "U+00026" - }, - { - "entity": "and;", - "value": "U+02227" - }, - { - "entity": "andand;", - "value": "U+02A55" - }, - { - "entity": "andd;", - "value": "U+02A5C" - }, - { - "entity": "andslope;", - "value": "U+02A58" - }, - { - "entity": "andv;", - "value": "U+02A5A" - }, - { - "entity": "ang;", - "value": "U+02220" - }, - { - "entity": "ange;", - "value": "U+029A4" - }, - { - "entity": "angle;", - "value": "U+02220" - }, - { - "entity": "angmsd;", - "value": "U+02221" - }, - { - "entity": "angmsdaa;", - "value": "U+029A8" - }, - { - "entity": "angmsdab;", - "value": "U+029A9" - }, - { - "entity": "angmsdac;", - "value": "U+029AA" - }, - { - "entity": "angmsdad;", - "value": "U+029AB" - }, - { - "entity": "angmsdae;", - "value": "U+029AC" - }, - { - "entity": "angmsdaf;", - "value": "U+029AD" - }, - { - "entity": "angmsdag;", - "value": "U+029AE" - }, - { - "entity": "angmsdah;", - "value": "U+029AF" - }, - { - "entity": "angrt;", - "value": "U+0221F" - }, - { - "entity": "angrtvb;", - "value": "U+022BE" - }, - { - "entity": "angrtvbd;", - "value": "U+0299D" - }, - { - "entity": "angsph;", - "value": "U+02222" - }, - { - "entity": "angst;", - "value": "U+000C5" - }, - { - "entity": "angzarr;", - "value": "U+0237C" - }, - { - "entity": "aogon;", - "value": "U+00105" - }, - { - "entity": "aopf;", - "value": "U+1D552" - }, - { - "entity": "ap;", - "value": "U+02248" - }, - { - "entity": "apE;", - "value": "U+02A70" - }, - { - "entity": "apacir;", - "value": "U+02A6F" - }, - { - "entity": "ape;", - "value": "U+0224A" - }, - { - "entity": "apid;", - "value": "U+0224B" - }, - { - "entity": "apos;", - "value": "U+00027" - }, - { - "entity": "approx;", - "value": "U+02248" - }, - { - "entity": "approxeq;", - "value": "U+0224A" - }, - { - "entity": "aring;", - "value": "U+000E5" - }, - { - "entity": "aring", - "value": "U+000E5" - }, - { - "entity": "ascr;", - "value": "U+1D4B6" - }, - { - "entity": "ast;", - "value": "U+0002A" - }, - { - "entity": "asymp;", - "value": "U+02248" - }, - { - "entity": "asympeq;", - "value": "U+0224D" - }, - { - "entity": "atilde;", - "value": "U+000E3" - }, - { - "entity": "atilde", - "value": "U+000E3" - }, - { - "entity": "auml;", - "value": "U+000E4" - }, - { - "entity": "auml", - "value": "U+000E4" - }, - { - "entity": "awconint;", - "value": "U+02233" - }, - { - "entity": "awint;", - "value": "U+02A11" - }, - { - "entity": "bNot;", - "value": "U+02AED" - }, - { - "entity": "backcong;", - "value": "U+0224C" - }, - { - "entity": "backepsilon;", - "value": "U+003F6" - }, - { - "entity": "backprime;", - "value": "U+02035" - }, - { - "entity": "backsim;", - "value": "U+0223D" - }, - { - "entity": "backsimeq;", - "value": "U+022CD" - }, - { - "entity": "barvee;", - "value": "U+022BD" - }, - { - "entity": "barwed;", - "value": "U+02305" - }, - { - "entity": "barwedge;", - "value": "U+02305" - }, - { - "entity": "bbrk;", - "value": "U+023B5" - }, - { - "entity": "bbrktbrk;", - "value": "U+023B6" - }, - { - "entity": "bcong;", - "value": "U+0224C" - }, - { - "entity": "bcy;", - "value": "U+00431" - }, - { - "entity": "bdquo;", - "value": "U+0201E" - }, - { - "entity": "becaus;", - "value": "U+02235" - }, - { - "entity": "because;", - "value": "U+02235" - }, - { - "entity": "bemptyv;", - "value": "U+029B0" - }, - { - "entity": "bepsi;", - "value": "U+003F6" - }, - { - "entity": "bernou;", - "value": "U+0212C" - }, - { - "entity": "beta;", - "value": "U+003B2" - }, - { - "entity": "beth;", - "value": "U+02136" - }, - { - "entity": "between;", - "value": "U+0226C" - }, - { - "entity": "bfr;", - "value": "U+1D51F" - }, - { - "entity": "bigcap;", - "value": "U+022C2" - }, - { - "entity": "bigcirc;", - "value": "U+025EF" - }, - { - "entity": "bigcup;", - "value": "U+022C3" - }, - { - "entity": "bigodot;", - "value": "U+02A00" - }, - { - "entity": "bigoplus;", - "value": "U+02A01" - }, - { - "entity": "bigotimes;", - "value": "U+02A02" - }, - { - "entity": "bigsqcup;", - "value": "U+02A06" - }, - { - "entity": "bigstar;", - "value": "U+02605" - }, - { - "entity": "bigtriangledown;", - "value": "U+025BD" - }, - { - "entity": "bigtriangleup;", - "value": "U+025B3" - }, - { - "entity": "biguplus;", - "value": "U+02A04" - }, - { - "entity": "bigvee;", - "value": "U+022C1" - }, - { - "entity": "bigwedge;", - "value": "U+022C0" - }, - { - "entity": "bkarow;", - "value": "U+0290D" - }, - { - "entity": "blacklozenge;", - "value": "U+029EB" - }, - { - "entity": "blacksquare;", - "value": "U+025AA" - }, - { - "entity": "blacktriangle;", - "value": "U+025B4" - }, - { - "entity": "blacktriangledown;", - "value": "U+025BE" - }, - { - "entity": "blacktriangleleft;", - "value": "U+025C2" - }, - { - "entity": "blacktriangleright;", - "value": "U+025B8" - }, - { - "entity": "blank;", - "value": "U+02423" - }, - { - "entity": "blk12;", - "value": "U+02592" - }, - { - "entity": "blk14;", - "value": "U+02591" - }, - { - "entity": "blk34;", - "value": "U+02593" - }, - { - "entity": "block;", - "value": "U+02588" - }, - { - "entity": "bnot;", - "value": "U+02310" - }, - { - "entity": "bopf;", - "value": "U+1D553" - }, - { - "entity": "bot;", - "value": "U+022A5" - }, - { - "entity": "bottom;", - "value": "U+022A5" - }, - { - "entity": "bowtie;", - "value": "U+022C8" - }, - { - "entity": "boxDL;", - "value": "U+02557" - }, - { - "entity": "boxDR;", - "value": "U+02554" - }, - { - "entity": "boxDl;", - "value": "U+02556" - }, - { - "entity": "boxDr;", - "value": "U+02553" - }, - { - "entity": "boxH;", - "value": "U+02550" - }, - { - "entity": "boxHD;", - "value": "U+02566" - }, - { - "entity": "boxHU;", - "value": "U+02569" - }, - { - "entity": "boxHd;", - "value": "U+02564" - }, - { - "entity": "boxHu;", - "value": "U+02567" - }, - { - "entity": "boxUL;", - "value": "U+0255D" - }, - { - "entity": "boxUR;", - "value": "U+0255A" - }, - { - "entity": "boxUl;", - "value": "U+0255C" - }, - { - "entity": "boxUr;", - "value": "U+02559" - }, - { - "entity": "boxV;", - "value": "U+02551" - }, - { - "entity": "boxVH;", - "value": "U+0256C" - }, - { - "entity": "boxVL;", - "value": "U+02563" - }, - { - "entity": "boxVR;", - "value": "U+02560" - }, - { - "entity": "boxVh;", - "value": "U+0256B" - }, - { - "entity": "boxVl;", - "value": "U+02562" - }, - { - "entity": "boxVr;", - "value": "U+0255F" - }, - { - "entity": "boxbox;", - "value": "U+029C9" - }, - { - "entity": "boxdL;", - "value": "U+02555" - }, - { - "entity": "boxdR;", - "value": "U+02552" - }, - { - "entity": "boxdl;", - "value": "U+02510" - }, - { - "entity": "boxdr;", - "value": "U+0250C" - }, - { - "entity": "boxh;", - "value": "U+02500" - }, - { - "entity": "boxhD;", - "value": "U+02565" - }, - { - "entity": "boxhU;", - "value": "U+02568" - }, - { - "entity": "boxhd;", - "value": "U+0252C" - }, - { - "entity": "boxhu;", - "value": "U+02534" - }, - { - "entity": "boxminus;", - "value": "U+0229F" - }, - { - "entity": "boxplus;", - "value": "U+0229E" - }, - { - "entity": "boxtimes;", - "value": "U+022A0" - }, - { - "entity": "boxuL;", - "value": "U+0255B" - }, - { - "entity": "boxuR;", - "value": "U+02558" - }, - { - "entity": "boxul;", - "value": "U+02518" - }, - { - "entity": "boxur;", - "value": "U+02514" - }, - { - "entity": "boxv;", - "value": "U+02502" - }, - { - "entity": "boxvH;", - "value": "U+0256A" - }, - { - "entity": "boxvL;", - "value": "U+02561" - }, - { - "entity": "boxvR;", - "value": "U+0255E" - }, - { - "entity": "boxvh;", - "value": "U+0253C" - }, - { - "entity": "boxvl;", - "value": "U+02524" - }, - { - "entity": "boxvr;", - "value": "U+0251C" - }, - { - "entity": "bprime;", - "value": "U+02035" - }, - { - "entity": "breve;", - "value": "U+002D8" - }, - { - "entity": "brvbar;", - "value": "U+000A6" - }, - { - "entity": "brvbar", - "value": "U+000A6" - }, - { - "entity": "bscr;", - "value": "U+1D4B7" - }, - { - "entity": "bsemi;", - "value": "U+0204F" - }, - { - "entity": "bsim;", - "value": "U+0223D" - }, - { - "entity": "bsime;", - "value": "U+022CD" - }, - { - "entity": "bsol;", - "value": "U+0005C" - }, - { - "entity": "bsolb;", - "value": "U+029C5" - }, - { - "entity": "bsolhsub;", - "value": "U+027C8" - }, - { - "entity": "bull;", - "value": "U+02022" - }, - { - "entity": "bullet;", - "value": "U+02022" - }, - { - "entity": "bump;", - "value": "U+0224E" - }, - { - "entity": "bumpE;", - "value": "U+02AAE" - }, - { - "entity": "bumpe;", - "value": "U+0224F" - }, - { - "entity": "bumpeq;", - "value": "U+0224F" - }, - { - "entity": "cacute;", - "value": "U+00107" - }, - { - "entity": "cap;", - "value": "U+02229" - }, - { - "entity": "capand;", - "value": "U+02A44" - }, - { - "entity": "capbrcup;", - "value": "U+02A49" - }, - { - "entity": "capcap;", - "value": "U+02A4B" - }, - { - "entity": "capcup;", - "value": "U+02A47" - }, - { - "entity": "capdot;", - "value": "U+02A40" - }, - { - "entity": "caret;", - "value": "U+02041" - }, - { - "entity": "caron;", - "value": "U+002C7" - }, - { - "entity": "ccaps;", - "value": "U+02A4D" - }, - { - "entity": "ccaron;", - "value": "U+0010D" - }, - { - "entity": "ccedil;", - "value": "U+000E7" - }, - { - "entity": "ccedil", - "value": "U+000E7" - }, - { - "entity": "ccirc;", - "value": "U+00109" - }, - { - "entity": "ccups;", - "value": "U+02A4C" - }, - { - "entity": "ccupssm;", - "value": "U+02A50" - }, - { - "entity": "cdot;", - "value": "U+0010B" - }, - { - "entity": "cedil;", - "value": "U+000B8" - }, - { - "entity": "cedil", - "value": "U+000B8" - }, - { - "entity": "cemptyv;", - "value": "U+029B2" - }, - { - "entity": "cent;", - "value": "U+000A2" - }, - { - "entity": "cent", - "value": "U+000A2" - }, - { - "entity": "centerdot;", - "value": "U+000B7" - }, - { - "entity": "cfr;", - "value": "U+1D520" - }, - { - "entity": "chcy;", - "value": "U+00447" - }, - { - "entity": "check;", - "value": "U+02713" - }, - { - "entity": "checkmark;", - "value": "U+02713" - }, - { - "entity": "chi;", - "value": "U+003C7" - }, - { - "entity": "cir;", - "value": "U+025CB" - }, - { - "entity": "cirE;", - "value": "U+029C3" - }, - { - "entity": "circ;", - "value": "U+002C6" - }, - { - "entity": "circeq;", - "value": "U+02257" - }, - { - "entity": "circlearrowleft;", - "value": "U+021BA" - }, - { - "entity": "circlearrowright;", - "value": "U+021BB" - }, - { - "entity": "circledR;", - "value": "U+000AE" - }, - { - "entity": "circledS;", - "value": "U+024C8" - }, - { - "entity": "circledast;", - "value": "U+0229B" - }, - { - "entity": "circledcirc;", - "value": "U+0229A" - }, - { - "entity": "circleddash;", - "value": "U+0229D" - }, - { - "entity": "cire;", - "value": "U+02257" - }, - { - "entity": "cirfnint;", - "value": "U+02A10" - }, - { - "entity": "cirmid;", - "value": "U+02AEF" - }, - { - "entity": "cirscir;", - "value": "U+029C2" - }, - { - "entity": "clubs;", - "value": "U+02663" - }, - { - "entity": "clubsuit;", - "value": "U+02663" - }, - { - "entity": "colon;", - "value": "U+0003A" - }, - { - "entity": "colone;", - "value": "U+02254" - }, - { - "entity": "coloneq;", - "value": "U+02254" - }, - { - "entity": "comma;", - "value": "U+0002C" - }, - { - "entity": "commat;", - "value": "U+00040" - }, - { - "entity": "comp;", - "value": "U+02201" - }, - { - "entity": "compfn;", - "value": "U+02218" - }, - { - "entity": "complement;", - "value": "U+02201" - }, - { - "entity": "complexes;", - "value": "U+02102" - }, - { - "entity": "cong;", - "value": "U+02245" - }, - { - "entity": "congdot;", - "value": "U+02A6D" - }, - { - "entity": "conint;", - "value": "U+0222E" - }, - { - "entity": "copf;", - "value": "U+1D554" - }, - { - "entity": "coprod;", - "value": "U+02210" - }, - { - "entity": "copy;", - "value": "U+000A9" - }, - { - "entity": "copy", - "value": "U+000A9" - }, - { - "entity": "copysr;", - "value": "U+02117" - }, - { - "entity": "crarr;", - "value": "U+021B5" - }, - { - "entity": "cross;", - "value": "U+02717" - }, - { - "entity": "cscr;", - "value": "U+1D4B8" - }, - { - "entity": "csub;", - "value": "U+02ACF" - }, - { - "entity": "csube;", - "value": "U+02AD1" - }, - { - "entity": "csup;", - "value": "U+02AD0" - }, - { - "entity": "csupe;", - "value": "U+02AD2" - }, - { - "entity": "ctdot;", - "value": "U+022EF" - }, - { - "entity": "cudarrl;", - "value": "U+02938" - }, - { - "entity": "cudarrr;", - "value": "U+02935" - }, - { - "entity": "cuepr;", - "value": "U+022DE" - }, - { - "entity": "cuesc;", - "value": "U+022DF" - }, - { - "entity": "cularr;", - "value": "U+021B6" - }, - { - "entity": "cularrp;", - "value": "U+0293D" - }, - { - "entity": "cup;", - "value": "U+0222A" - }, - { - "entity": "cupbrcap;", - "value": "U+02A48" - }, - { - "entity": "cupcap;", - "value": "U+02A46" - }, - { - "entity": "cupcup;", - "value": "U+02A4A" - }, - { - "entity": "cupdot;", - "value": "U+0228D" - }, - { - "entity": "cupor;", - "value": "U+02A45" - }, - { - "entity": "curarr;", - "value": "U+021B7" - }, - { - "entity": "curarrm;", - "value": "U+0293C" - }, - { - "entity": "curlyeqprec;", - "value": "U+022DE" - }, - { - "entity": "curlyeqsucc;", - "value": "U+022DF" - }, - { - "entity": "curlyvee;", - "value": "U+022CE" - }, - { - "entity": "curlywedge;", - "value": "U+022CF" - }, - { - "entity": "curren;", - "value": "U+000A4" - }, - { - "entity": "curren", - "value": "U+000A4" - }, - { - "entity": "curvearrowleft;", - "value": "U+021B6" - }, - { - "entity": "curvearrowright;", - "value": "U+021B7" - }, - { - "entity": "cuvee;", - "value": "U+022CE" - }, - { - "entity": "cuwed;", - "value": "U+022CF" - }, - { - "entity": "cwconint;", - "value": "U+02232" - }, - { - "entity": "cwint;", - "value": "U+02231" - }, - { - "entity": "cylcty;", - "value": "U+0232D" - }, - { - "entity": "dArr;", - "value": "U+021D3" - }, - { - "entity": "dHar;", - "value": "U+02965" - }, - { - "entity": "dagger;", - "value": "U+02020" - }, - { - "entity": "daleth;", - "value": "U+02138" - }, - { - "entity": "darr;", - "value": "U+02193" - }, - { - "entity": "dash;", - "value": "U+02010" - }, - { - "entity": "dashv;", - "value": "U+022A3" - }, - { - "entity": "dbkarow;", - "value": "U+0290F" - }, - { - "entity": "dblac;", - "value": "U+002DD" - }, - { - "entity": "dcaron;", - "value": "U+0010F" - }, - { - "entity": "dcy;", - "value": "U+00434" - }, - { - "entity": "dd;", - "value": "U+02146" - }, - { - "entity": "ddagger;", - "value": "U+02021" - }, - { - "entity": "ddarr;", - "value": "U+021CA" - }, - { - "entity": "ddotseq;", - "value": "U+02A77" - }, - { - "entity": "deg;", - "value": "U+000B0" - }, - { - "entity": "deg", - "value": "U+000B0" - }, - { - "entity": "delta;", - "value": "U+003B4" - }, - { - "entity": "demptyv;", - "value": "U+029B1" - }, - { - "entity": "dfisht;", - "value": "U+0297F" - }, - { - "entity": "dfr;", - "value": "U+1D521" - }, - { - "entity": "dharl;", - "value": "U+021C3" - }, - { - "entity": "dharr;", - "value": "U+021C2" - }, - { - "entity": "diam;", - "value": "U+022C4" - }, - { - "entity": "diamond;", - "value": "U+022C4" - }, - { - "entity": "diamondsuit;", - "value": "U+02666" - }, - { - "entity": "diams;", - "value": "U+02666" - }, - { - "entity": "die;", - "value": "U+000A8" - }, - { - "entity": "digamma;", - "value": "U+003DD" - }, - { - "entity": "disin;", - "value": "U+022F2" - }, - { - "entity": "div;", - "value": "U+000F7" - }, - { - "entity": "divide;", - "value": "U+000F7" - }, - { - "entity": "divide", - "value": "U+000F7" - }, - { - "entity": "divideontimes;", - "value": "U+022C7" - }, - { - "entity": "divonx;", - "value": "U+022C7" - }, - { - "entity": "djcy;", - "value": "U+00452" - }, - { - "entity": "dlcorn;", - "value": "U+0231E" - }, - { - "entity": "dlcrop;", - "value": "U+0230D" - }, - { - "entity": "dollar;", - "value": "U+00024" - }, - { - "entity": "dopf;", - "value": "U+1D555" - }, - { - "entity": "dot;", - "value": "U+002D9" - }, - { - "entity": "doteq;", - "value": "U+02250" - }, - { - "entity": "doteqdot;", - "value": "U+02251" - }, - { - "entity": "dotminus;", - "value": "U+02238" - }, - { - "entity": "dotplus;", - "value": "U+02214" - }, - { - "entity": "dotsquare;", - "value": "U+022A1" - }, - { - "entity": "doublebarwedge;", - "value": "U+02306" - }, - { - "entity": "downarrow;", - "value": "U+02193" - }, - { - "entity": "downdownarrows;", - "value": "U+021CA" - }, - { - "entity": "downharpoonleft;", - "value": "U+021C3" - }, - { - "entity": "downharpoonright;", - "value": "U+021C2" - }, - { - "entity": "drbkarow;", - "value": "U+02910" - }, - { - "entity": "drcorn;", - "value": "U+0231F" - }, - { - "entity": "drcrop;", - "value": "U+0230C" - }, - { - "entity": "dscr;", - "value": "U+1D4B9" - }, - { - "entity": "dscy;", - "value": "U+00455" - }, - { - "entity": "dsol;", - "value": "U+029F6" - }, - { - "entity": "dstrok;", - "value": "U+00111" - }, - { - "entity": "dtdot;", - "value": "U+022F1" - }, - { - "entity": "dtri;", - "value": "U+025BF" - }, - { - "entity": "dtrif;", - "value": "U+025BE" - }, - { - "entity": "duarr;", - "value": "U+021F5" - }, - { - "entity": "duhar;", - "value": "U+0296F" - }, - { - "entity": "dwangle;", - "value": "U+029A6" - }, - { - "entity": "dzcy;", - "value": "U+0045F" - }, - { - "entity": "dzigrarr;", - "value": "U+027FF" - }, - { - "entity": "eDDot;", - "value": "U+02A77" - }, - { - "entity": "eDot;", - "value": "U+02251" - }, - { - "entity": "eacute;", - "value": "U+000E9" - }, - { - "entity": "eacute", - "value": "U+000E9" - }, - { - "entity": "easter;", - "value": "U+02A6E" - }, - { - "entity": "ecaron;", - "value": "U+0011B" - }, - { - "entity": "ecir;", - "value": "U+02256" - }, - { - "entity": "ecirc;", - "value": "U+000EA" - }, - { - "entity": "ecirc", - "value": "U+000EA" - }, - { - "entity": "ecolon;", - "value": "U+02255" - }, - { - "entity": "ecy;", - "value": "U+0044D" - }, - { - "entity": "edot;", - "value": "U+00117" - }, - { - "entity": "ee;", - "value": "U+02147" - }, - { - "entity": "efDot;", - "value": "U+02252" - }, - { - "entity": "efr;", - "value": "U+1D522" - }, - { - "entity": "eg;", - "value": "U+02A9A" - }, - { - "entity": "egrave;", - "value": "U+000E8" - }, - { - "entity": "egrave", - "value": "U+000E8" - }, - { - "entity": "egs;", - "value": "U+02A96" - }, - { - "entity": "egsdot;", - "value": "U+02A98" - }, - { - "entity": "el;", - "value": "U+02A99" - }, - { - "entity": "elinters;", - "value": "U+023E7" - }, - { - "entity": "ell;", - "value": "U+02113" - }, - { - "entity": "els;", - "value": "U+02A95" - }, - { - "entity": "elsdot;", - "value": "U+02A97" - }, - { - "entity": "emacr;", - "value": "U+00113" - }, - { - "entity": "empty;", - "value": "U+02205" - }, - { - "entity": "emptyset;", - "value": "U+02205" - }, - { - "entity": "emptyv;", - "value": "U+02205" - }, - { - "entity": "emsp13;", - "value": "U+02004" - }, - { - "entity": "emsp14;", - "value": "U+02005" - }, - { - "entity": "emsp;", - "value": "U+02003" - }, - { - "entity": "eng;", - "value": "U+0014B" - }, - { - "entity": "ensp;", - "value": "U+02002" - }, - { - "entity": "eogon;", - "value": "U+00119" - }, - { - "entity": "eopf;", - "value": "U+1D556" - }, - { - "entity": "epar;", - "value": "U+022D5" - }, - { - "entity": "eparsl;", - "value": "U+029E3" - }, - { - "entity": "eplus;", - "value": "U+02A71" - }, - { - "entity": "epsi;", - "value": "U+003B5" - }, - { - "entity": "epsilon;", - "value": "U+003B5" - }, - { - "entity": "epsiv;", - "value": "U+003F5" - }, - { - "entity": "eqcirc;", - "value": "U+02256" - }, - { - "entity": "eqcolon;", - "value": "U+02255" - }, - { - "entity": "eqsim;", - "value": "U+02242" - }, - { - "entity": "eqslantgtr;", - "value": "U+02A96" - }, - { - "entity": "eqslantless;", - "value": "U+02A95" - }, - { - "entity": "equals;", - "value": "U+0003D" - }, - { - "entity": "equest;", - "value": "U+0225F" - }, - { - "entity": "equiv;", - "value": "U+02261" - }, - { - "entity": "equivDD;", - "value": "U+02A78" - }, - { - "entity": "eqvparsl;", - "value": "U+029E5" - }, - { - "entity": "erDot;", - "value": "U+02253" - }, - { - "entity": "erarr;", - "value": "U+02971" - }, - { - "entity": "escr;", - "value": "U+0212F" - }, - { - "entity": "esdot;", - "value": "U+02250" - }, - { - "entity": "esim;", - "value": "U+02242" - }, - { - "entity": "eta;", - "value": "U+003B7" - }, - { - "entity": "eth;", - "value": "U+000F0" - }, - { - "entity": "eth", - "value": "U+000F0" - }, - { - "entity": "euml;", - "value": "U+000EB" - }, - { - "entity": "euml", - "value": "U+000EB" - }, - { - "entity": "euro;", - "value": "U+020AC" - }, - { - "entity": "excl;", - "value": "U+00021" - }, - { - "entity": "exist;", - "value": "U+02203" - }, - { - "entity": "expectation;", - "value": "U+02130" - }, - { - "entity": "exponentiale;", - "value": "U+02147" - }, - { - "entity": "fallingdotseq;", - "value": "U+02252" - }, - { - "entity": "fcy;", - "value": "U+00444" - }, - { - "entity": "female;", - "value": "U+02640" - }, - { - "entity": "ffilig;", - "value": "U+0FB03" - }, - { - "entity": "fflig;", - "value": "U+0FB00" - }, - { - "entity": "ffllig;", - "value": "U+0FB04" - }, - { - "entity": "ffr;", - "value": "U+1D523" - }, - { - "entity": "filig;", - "value": "U+0FB01" - }, - { - "entity": "flat;", - "value": "U+0266D" - }, - { - "entity": "fllig;", - "value": "U+0FB02" - }, - { - "entity": "fltns;", - "value": "U+025B1" - }, - { - "entity": "fnof;", - "value": "U+00192" - }, - { - "entity": "fopf;", - "value": "U+1D557" - }, - { - "entity": "forall;", - "value": "U+02200" - }, - { - "entity": "fork;", - "value": "U+022D4" - }, - { - "entity": "forkv;", - "value": "U+02AD9" - }, - { - "entity": "fpartint;", - "value": "U+02A0D" - }, - { - "entity": "frac12;", - "value": "U+000BD" - }, - { - "entity": "frac12", - "value": "U+000BD" - }, - { - "entity": "frac13;", - "value": "U+02153" - }, - { - "entity": "frac14;", - "value": "U+000BC" - }, - { - "entity": "frac14", - "value": "U+000BC" - }, - { - "entity": "frac15;", - "value": "U+02155" - }, - { - "entity": "frac16;", - "value": "U+02159" - }, - { - "entity": "frac18;", - "value": "U+0215B" - }, - { - "entity": "frac23;", - "value": "U+02154" - }, - { - "entity": "frac25;", - "value": "U+02156" - }, - { - "entity": "frac34;", - "value": "U+000BE" - }, - { - "entity": "frac34", - "value": "U+000BE" - }, - { - "entity": "frac35;", - "value": "U+02157" - }, - { - "entity": "frac38;", - "value": "U+0215C" - }, - { - "entity": "frac45;", - "value": "U+02158" - }, - { - "entity": "frac56;", - "value": "U+0215A" - }, - { - "entity": "frac58;", - "value": "U+0215D" - }, - { - "entity": "frac78;", - "value": "U+0215E" - }, - { - "entity": "frasl;", - "value": "U+02044" - }, - { - "entity": "frown;", - "value": "U+02322" - }, - { - "entity": "fscr;", - "value": "U+1D4BB" - }, - { - "entity": "gE;", - "value": "U+02267" - }, - { - "entity": "gEl;", - "value": "U+02A8C" - }, - { - "entity": "gacute;", - "value": "U+001F5" - }, - { - "entity": "gamma;", - "value": "U+003B3" - }, - { - "entity": "gammad;", - "value": "U+003DD" - }, - { - "entity": "gap;", - "value": "U+02A86" - }, - { - "entity": "gbreve;", - "value": "U+0011F" - }, - { - "entity": "gcirc;", - "value": "U+0011D" - }, - { - "entity": "gcy;", - "value": "U+00433" - }, - { - "entity": "gdot;", - "value": "U+00121" - }, - { - "entity": "ge;", - "value": "U+02265" - }, - { - "entity": "gel;", - "value": "U+022DB" - }, - { - "entity": "geq;", - "value": "U+02265" - }, - { - "entity": "geqq;", - "value": "U+02267" - }, - { - "entity": "geqslant;", - "value": "U+02A7E" - }, - { - "entity": "ges;", - "value": "U+02A7E" - }, - { - "entity": "gescc;", - "value": "U+02AA9" - }, - { - "entity": "gesdot;", - "value": "U+02A80" - }, - { - "entity": "gesdoto;", - "value": "U+02A82" - }, - { - "entity": "gesdotol;", - "value": "U+02A84" - }, - { - "entity": "gesles;", - "value": "U+02A94" - }, - { - "entity": "gfr;", - "value": "U+1D524" - }, - { - "entity": "gg;", - "value": "U+0226B" - }, - { - "entity": "ggg;", - "value": "U+022D9" - }, - { - "entity": "gimel;", - "value": "U+02137" - }, - { - "entity": "gjcy;", - "value": "U+00453" - }, - { - "entity": "gl;", - "value": "U+02277" - }, - { - "entity": "glE;", - "value": "U+02A92" - }, - { - "entity": "gla;", - "value": "U+02AA5" - }, - { - "entity": "glj;", - "value": "U+02AA4" - }, - { - "entity": "gnE;", - "value": "U+02269" - }, - { - "entity": "gnap;", - "value": "U+02A8A" - }, - { - "entity": "gnapprox;", - "value": "U+02A8A" - }, - { - "entity": "gne;", - "value": "U+02A88" - }, - { - "entity": "gneq;", - "value": "U+02A88" - }, - { - "entity": "gneqq;", - "value": "U+02269" - }, - { - "entity": "gnsim;", - "value": "U+022E7" - }, - { - "entity": "gopf;", - "value": "U+1D558" - }, - { - "entity": "grave;", - "value": "U+00060" - }, - { - "entity": "gscr;", - "value": "U+0210A" - }, - { - "entity": "gsim;", - "value": "U+02273" - }, - { - "entity": "gsime;", - "value": "U+02A8E" - }, - { - "entity": "gsiml;", - "value": "U+02A90" - }, - { - "entity": "gt;", - "value": "U+0003E" - }, - { - "entity": "gt", - "value": "U+0003E" - }, - { - "entity": "gtcc;", - "value": "U+02AA7" - }, - { - "entity": "gtcir;", - "value": "U+02A7A" - }, - { - "entity": "gtdot;", - "value": "U+022D7" - }, - { - "entity": "gtlPar;", - "value": "U+02995" - }, - { - "entity": "gtquest;", - "value": "U+02A7C" - }, - { - "entity": "gtrapprox;", - "value": "U+02A86" - }, - { - "entity": "gtrarr;", - "value": "U+02978" - }, - { - "entity": "gtrdot;", - "value": "U+022D7" - }, - { - "entity": "gtreqless;", - "value": "U+022DB" - }, - { - "entity": "gtreqqless;", - "value": "U+02A8C" - }, - { - "entity": "gtrless;", - "value": "U+02277" - }, - { - "entity": "gtrsim;", - "value": "U+02273" - }, - { - "entity": "hArr;", - "value": "U+021D4" - }, - { - "entity": "hairsp;", - "value": "U+0200A" - }, - { - "entity": "half;", - "value": "U+000BD" - }, - { - "entity": "hamilt;", - "value": "U+0210B" - }, - { - "entity": "hardcy;", - "value": "U+0044A" - }, - { - "entity": "harr;", - "value": "U+02194" - }, - { - "entity": "harrcir;", - "value": "U+02948" - }, - { - "entity": "harrw;", - "value": "U+021AD" - }, - { - "entity": "hbar;", - "value": "U+0210F" - }, - { - "entity": "hcirc;", - "value": "U+00125" - }, - { - "entity": "hearts;", - "value": "U+02665" - }, - { - "entity": "heartsuit;", - "value": "U+02665" - }, - { - "entity": "hellip;", - "value": "U+02026" - }, - { - "entity": "hercon;", - "value": "U+022B9" - }, - { - "entity": "hfr;", - "value": "U+1D525" - }, - { - "entity": "hksearow;", - "value": "U+02925" - }, - { - "entity": "hkswarow;", - "value": "U+02926" - }, - { - "entity": "hoarr;", - "value": "U+021FF" - }, - { - "entity": "homtht;", - "value": "U+0223B" - }, - { - "entity": "hookleftarrow;", - "value": "U+021A9" - }, - { - "entity": "hookrightarrow;", - "value": "U+021AA" - }, - { - "entity": "hopf;", - "value": "U+1D559" - }, - { - "entity": "horbar;", - "value": "U+02015" - }, - { - "entity": "hscr;", - "value": "U+1D4BD" - }, - { - "entity": "hslash;", - "value": "U+0210F" - }, - { - "entity": "hstrok;", - "value": "U+00127" - }, - { - "entity": "hybull;", - "value": "U+02043" - }, - { - "entity": "hyphen;", - "value": "U+02010" - }, - { - "entity": "iacute;", - "value": "U+000ED" - }, - { - "entity": "iacute", - "value": "U+000ED" - }, - { - "entity": "ic;", - "value": "U+02063" - }, - { - "entity": "icirc;", - "value": "U+000EE" - }, - { - "entity": "icirc", - "value": "U+000EE" - }, - { - "entity": "icy;", - "value": "U+00438" - }, - { - "entity": "iecy;", - "value": "U+00435" - }, - { - "entity": "iexcl;", - "value": "U+000A1" - }, - { - "entity": "iexcl", - "value": "U+000A1" - }, - { - "entity": "iff;", - "value": "U+021D4" - }, - { - "entity": "ifr;", - "value": "U+1D526" - }, - { - "entity": "igrave;", - "value": "U+000EC" - }, - { - "entity": "igrave", - "value": "U+000EC" - }, - { - "entity": "ii;", - "value": "U+02148" - }, - { - "entity": "iiiint;", - "value": "U+02A0C" - }, - { - "entity": "iiint;", - "value": "U+0222D" - }, - { - "entity": "iinfin;", - "value": "U+029DC" - }, - { - "entity": "iiota;", - "value": "U+02129" - }, - { - "entity": "ijlig;", - "value": "U+00133" - }, - { - "entity": "imacr;", - "value": "U+0012B" - }, - { - "entity": "image;", - "value": "U+02111" - }, - { - "entity": "imagline;", - "value": "U+02110" - }, - { - "entity": "imagpart;", - "value": "U+02111" - }, - { - "entity": "imath;", - "value": "U+00131" - }, - { - "entity": "imof;", - "value": "U+022B7" - }, - { - "entity": "imped;", - "value": "U+001B5" - }, - { - "entity": "in;", - "value": "U+02208" - }, - { - "entity": "incare;", - "value": "U+02105" - }, - { - "entity": "infin;", - "value": "U+0221E" - }, - { - "entity": "infintie;", - "value": "U+029DD" - }, - { - "entity": "inodot;", - "value": "U+00131" - }, - { - "entity": "int;", - "value": "U+0222B" - }, - { - "entity": "intcal;", - "value": "U+022BA" - }, - { - "entity": "integers;", - "value": "U+02124" - }, - { - "entity": "intercal;", - "value": "U+022BA" - }, - { - "entity": "intlarhk;", - "value": "U+02A17" - }, - { - "entity": "intprod;", - "value": "U+02A3C" - }, - { - "entity": "iocy;", - "value": "U+00451" - }, - { - "entity": "iogon;", - "value": "U+0012F" - }, - { - "entity": "iopf;", - "value": "U+1D55A" - }, - { - "entity": "iota;", - "value": "U+003B9" - }, - { - "entity": "iprod;", - "value": "U+02A3C" - }, - { - "entity": "iquest;", - "value": "U+000BF" - }, - { - "entity": "iquest", - "value": "U+000BF" - }, - { - "entity": "iscr;", - "value": "U+1D4BE" - }, - { - "entity": "isin;", - "value": "U+02208" - }, - { - "entity": "isinE;", - "value": "U+022F9" - }, - { - "entity": "isindot;", - "value": "U+022F5" - }, - { - "entity": "isins;", - "value": "U+022F4" - }, - { - "entity": "isinsv;", - "value": "U+022F3" - }, - { - "entity": "isinv;", - "value": "U+02208" - }, - { - "entity": "it;", - "value": "U+02062" - }, - { - "entity": "itilde;", - "value": "U+00129" - }, - { - "entity": "iukcy;", - "value": "U+00456" - }, - { - "entity": "iuml;", - "value": "U+000EF" - }, - { - "entity": "iuml", - "value": "U+000EF" - }, - { - "entity": "jcirc;", - "value": "U+00135" - }, - { - "entity": "jcy;", - "value": "U+00439" - }, - { - "entity": "jfr;", - "value": "U+1D527" - }, - { - "entity": "jmath;", - "value": "U+00237" - }, - { - "entity": "jopf;", - "value": "U+1D55B" - }, - { - "entity": "jscr;", - "value": "U+1D4BF" - }, - { - "entity": "jsercy;", - "value": "U+00458" - }, - { - "entity": "jukcy;", - "value": "U+00454" - }, - { - "entity": "kappa;", - "value": "U+003BA" - }, - { - "entity": "kappav;", - "value": "U+003F0" - }, - { - "entity": "kcedil;", - "value": "U+00137" - }, - { - "entity": "kcy;", - "value": "U+0043A" - }, - { - "entity": "kfr;", - "value": "U+1D528" - }, - { - "entity": "kgreen;", - "value": "U+00138" - }, - { - "entity": "khcy;", - "value": "U+00445" - }, - { - "entity": "kjcy;", - "value": "U+0045C" - }, - { - "entity": "kopf;", - "value": "U+1D55C" - }, - { - "entity": "kscr;", - "value": "U+1D4C0" - }, - { - "entity": "lAarr;", - "value": "U+021DA" - }, - { - "entity": "lArr;", - "value": "U+021D0" - }, - { - "entity": "lAtail;", - "value": "U+0291B" - }, - { - "entity": "lBarr;", - "value": "U+0290E" - }, - { - "entity": "lE;", - "value": "U+02266" - }, - { - "entity": "lEg;", - "value": "U+02A8B" - }, - { - "entity": "lHar;", - "value": "U+02962" - }, - { - "entity": "lacute;", - "value": "U+0013A" - }, - { - "entity": "laemptyv;", - "value": "U+029B4" - }, - { - "entity": "lagran;", - "value": "U+02112" - }, - { - "entity": "lambda;", - "value": "U+003BB" - }, - { - "entity": "lang;", - "value": "U+027E8" - }, - { - "entity": "langd;", - "value": "U+02991" - }, - { - "entity": "langle;", - "value": "U+027E8" - }, - { - "entity": "lap;", - "value": "U+02A85" - }, - { - "entity": "laquo;", - "value": "U+000AB" - }, - { - "entity": "laquo", - "value": "U+000AB" - }, - { - "entity": "larr;", - "value": "U+02190" - }, - { - "entity": "larrb;", - "value": "U+021E4" - }, - { - "entity": "larrbfs;", - "value": "U+0291F" - }, - { - "entity": "larrfs;", - "value": "U+0291D" - }, - { - "entity": "larrhk;", - "value": "U+021A9" - }, - { - "entity": "larrlp;", - "value": "U+021AB" - }, - { - "entity": "larrpl;", - "value": "U+02939" - }, - { - "entity": "larrsim;", - "value": "U+02973" - }, - { - "entity": "larrtl;", - "value": "U+021A2" - }, - { - "entity": "lat;", - "value": "U+02AAB" - }, - { - "entity": "latail;", - "value": "U+02919" - }, - { - "entity": "late;", - "value": "U+02AAD" - }, - { - "entity": "lbarr;", - "value": "U+0290C" - }, - { - "entity": "lbbrk;", - "value": "U+02772" - }, - { - "entity": "lbrace;", - "value": "U+0007B" - }, - { - "entity": "lbrack;", - "value": "U+0005B" - }, - { - "entity": "lbrke;", - "value": "U+0298B" - }, - { - "entity": "lbrksld;", - "value": "U+0298F" - }, - { - "entity": "lbrkslu;", - "value": "U+0298D" - }, - { - "entity": "lcaron;", - "value": "U+0013E" - }, - { - "entity": "lcedil;", - "value": "U+0013C" - }, - { - "entity": "lceil;", - "value": "U+02308" - }, - { - "entity": "lcub;", - "value": "U+0007B" - }, - { - "entity": "lcy;", - "value": "U+0043B" - }, - { - "entity": "ldca;", - "value": "U+02936" - }, - { - "entity": "ldquo;", - "value": "U+0201C" - }, - { - "entity": "ldquor;", - "value": "U+0201E" - }, - { - "entity": "ldrdhar;", - "value": "U+02967" - }, - { - "entity": "ldrushar;", - "value": "U+0294B" - }, - { - "entity": "ldsh;", - "value": "U+021B2" - }, - { - "entity": "le;", - "value": "U+02264" - }, - { - "entity": "leftarrow;", - "value": "U+02190" - }, - { - "entity": "leftarrowtail;", - "value": "U+021A2" - }, - { - "entity": "leftharpoondown;", - "value": "U+021BD" - }, - { - "entity": "leftharpoonup;", - "value": "U+021BC" - }, - { - "entity": "leftleftarrows;", - "value": "U+021C7" - }, - { - "entity": "leftrightarrow;", - "value": "U+02194" - }, - { - "entity": "leftrightarrows;", - "value": "U+021C6" - }, - { - "entity": "leftrightharpoons;", - "value": "U+021CB" - }, - { - "entity": "leftrightsquigarrow;", - "value": "U+021AD" - }, - { - "entity": "leftthreetimes;", - "value": "U+022CB" - }, - { - "entity": "leg;", - "value": "U+022DA" - }, - { - "entity": "leq;", - "value": "U+02264" - }, - { - "entity": "leqq;", - "value": "U+02266" - }, - { - "entity": "leqslant;", - "value": "U+02A7D" - }, - { - "entity": "les;", - "value": "U+02A7D" - }, - { - "entity": "lescc;", - "value": "U+02AA8" - }, - { - "entity": "lesdot;", - "value": "U+02A7F" - }, - { - "entity": "lesdoto;", - "value": "U+02A81" - }, - { - "entity": "lesdotor;", - "value": "U+02A83" - }, - { - "entity": "lesges;", - "value": "U+02A93" - }, - { - "entity": "lessapprox;", - "value": "U+02A85" - }, - { - "entity": "lessdot;", - "value": "U+022D6" - }, - { - "entity": "lesseqgtr;", - "value": "U+022DA" - }, - { - "entity": "lesseqqgtr;", - "value": "U+02A8B" - }, - { - "entity": "lessgtr;", - "value": "U+02276" - }, - { - "entity": "lesssim;", - "value": "U+02272" - }, - { - "entity": "lfisht;", - "value": "U+0297C" - }, - { - "entity": "lfloor;", - "value": "U+0230A" - }, - { - "entity": "lfr;", - "value": "U+1D529" - }, - { - "entity": "lg;", - "value": "U+02276" - }, - { - "entity": "lgE;", - "value": "U+02A91" - }, - { - "entity": "lhard;", - "value": "U+021BD" - }, - { - "entity": "lharu;", - "value": "U+021BC" - }, - { - "entity": "lharul;", - "value": "U+0296A" - }, - { - "entity": "lhblk;", - "value": "U+02584" - }, - { - "entity": "ljcy;", - "value": "U+00459" - }, - { - "entity": "ll;", - "value": "U+0226A" - }, - { - "entity": "llarr;", - "value": "U+021C7" - }, - { - "entity": "llcorner;", - "value": "U+0231E" - }, - { - "entity": "llhard;", - "value": "U+0296B" - }, - { - "entity": "lltri;", - "value": "U+025FA" - }, - { - "entity": "lmidot;", - "value": "U+00140" - }, - { - "entity": "lmoust;", - "value": "U+023B0" - }, - { - "entity": "lmoustache;", - "value": "U+023B0" - }, - { - "entity": "lnE;", - "value": "U+02268" - }, - { - "entity": "lnap;", - "value": "U+02A89" - }, - { - "entity": "lnapprox;", - "value": "U+02A89" - }, - { - "entity": "lne;", - "value": "U+02A87" - }, - { - "entity": "lneq;", - "value": "U+02A87" - }, - { - "entity": "lneqq;", - "value": "U+02268" - }, - { - "entity": "lnsim;", - "value": "U+022E6" - }, - { - "entity": "loang;", - "value": "U+027EC" - }, - { - "entity": "loarr;", - "value": "U+021FD" - }, - { - "entity": "lobrk;", - "value": "U+027E6" - }, - { - "entity": "longleftarrow;", - "value": "U+027F5" - }, - { - "entity": "longleftrightarrow;", - "value": "U+027F7" - }, - { - "entity": "longmapsto;", - "value": "U+027FC" - }, - { - "entity": "longrightarrow;", - "value": "U+027F6" - }, - { - "entity": "looparrowleft;", - "value": "U+021AB" - }, - { - "entity": "looparrowright;", - "value": "U+021AC" - }, - { - "entity": "lopar;", - "value": "U+02985" - }, - { - "entity": "lopf;", - "value": "U+1D55D" - }, - { - "entity": "loplus;", - "value": "U+02A2D" - }, - { - "entity": "lotimes;", - "value": "U+02A34" - }, - { - "entity": "lowast;", - "value": "U+02217" - }, - { - "entity": "lowbar;", - "value": "U+0005F" - }, - { - "entity": "loz;", - "value": "U+025CA" - }, - { - "entity": "lozenge;", - "value": "U+025CA" - }, - { - "entity": "lozf;", - "value": "U+029EB" - }, - { - "entity": "lpar;", - "value": "U+00028" - }, - { - "entity": "lparlt;", - "value": "U+02993" - }, - { - "entity": "lrarr;", - "value": "U+021C6" - }, - { - "entity": "lrcorner;", - "value": "U+0231F" - }, - { - "entity": "lrhar;", - "value": "U+021CB" - }, - { - "entity": "lrhard;", - "value": "U+0296D" - }, - { - "entity": "lrm;", - "value": "U+0200E" - }, - { - "entity": "lrtri;", - "value": "U+022BF" - }, - { - "entity": "lsaquo;", - "value": "U+02039" - }, - { - "entity": "lscr;", - "value": "U+1D4C1" - }, - { - "entity": "lsh;", - "value": "U+021B0" - }, - { - "entity": "lsim;", - "value": "U+02272" - }, - { - "entity": "lsime;", - "value": "U+02A8D" - }, - { - "entity": "lsimg;", - "value": "U+02A8F" - }, - { - "entity": "lsqb;", - "value": "U+0005B" - }, - { - "entity": "lsquo;", - "value": "U+02018" - }, - { - "entity": "lsquor;", - "value": "U+0201A" - }, - { - "entity": "lstrok;", - "value": "U+00142" - }, - { - "entity": "lt;", - "value": "U+0003C" - }, - { - "entity": "lt", - "value": "U+0003C" - }, - { - "entity": "ltcc;", - "value": "U+02AA6" - }, - { - "entity": "ltcir;", - "value": "U+02A79" - }, - { - "entity": "ltdot;", - "value": "U+022D6" - }, - { - "entity": "lthree;", - "value": "U+022CB" - }, - { - "entity": "ltimes;", - "value": "U+022C9" - }, - { - "entity": "ltlarr;", - "value": "U+02976" - }, - { - "entity": "ltquest;", - "value": "U+02A7B" - }, - { - "entity": "ltrPar;", - "value": "U+02996" - }, - { - "entity": "ltri;", - "value": "U+025C3" - }, - { - "entity": "ltrie;", - "value": "U+022B4" - }, - { - "entity": "ltrif;", - "value": "U+025C2" - }, - { - "entity": "lurdshar;", - "value": "U+0294A" - }, - { - "entity": "luruhar;", - "value": "U+02966" - }, - { - "entity": "mDDot;", - "value": "U+0223A" - }, - { - "entity": "macr;", - "value": "U+000AF" - }, - { - "entity": "macr", - "value": "U+000AF" - }, - { - "entity": "male;", - "value": "U+02642" - }, - { - "entity": "malt;", - "value": "U+02720" - }, - { - "entity": "maltese;", - "value": "U+02720" - }, - { - "entity": "map;", - "value": "U+021A6" - }, - { - "entity": "mapsto;", - "value": "U+021A6" - }, - { - "entity": "mapstodown;", - "value": "U+021A7" - }, - { - "entity": "mapstoleft;", - "value": "U+021A4" - }, - { - "entity": "mapstoup;", - "value": "U+021A5" - }, - { - "entity": "marker;", - "value": "U+025AE" - }, - { - "entity": "mcomma;", - "value": "U+02A29" - }, - { - "entity": "mcy;", - "value": "U+0043C" - }, - { - "entity": "mdash;", - "value": "U+02014" - }, - { - "entity": "measuredangle;", - "value": "U+02221" - }, - { - "entity": "mfr;", - "value": "U+1D52A" - }, - { - "entity": "mho;", - "value": "U+02127" - }, - { - "entity": "micro;", - "value": "U+000B5" - }, - { - "entity": "micro", - "value": "U+000B5" - }, - { - "entity": "mid;", - "value": "U+02223" - }, - { - "entity": "midast;", - "value": "U+0002A" - }, - { - "entity": "midcir;", - "value": "U+02AF0" - }, - { - "entity": "middot;", - "value": "U+000B7" - }, - { - "entity": "middot", - "value": "U+000B7" - }, - { - "entity": "minus;", - "value": "U+02212" - }, - { - "entity": "minusb;", - "value": "U+0229F" - }, - { - "entity": "minusd;", - "value": "U+02238" - }, - { - "entity": "minusdu;", - "value": "U+02A2A" - }, - { - "entity": "mlcp;", - "value": "U+02ADB" - }, - { - "entity": "mldr;", - "value": "U+02026" - }, - { - "entity": "mnplus;", - "value": "U+02213" - }, - { - "entity": "models;", - "value": "U+022A7" - }, - { - "entity": "mopf;", - "value": "U+1D55E" - }, - { - "entity": "mp;", - "value": "U+02213" - }, - { - "entity": "mscr;", - "value": "U+1D4C2" - }, - { - "entity": "mstpos;", - "value": "U+0223E" - }, - { - "entity": "mu;", - "value": "U+003BC" - }, - { - "entity": "multimap;", - "value": "U+022B8" - }, - { - "entity": "mumap;", - "value": "U+022B8" - }, - { - "entity": "nLeftarrow;", - "value": "U+021CD" - }, - { - "entity": "nLeftrightarrow;", - "value": "U+021CE" - }, - { - "entity": "nRightarrow;", - "value": "U+021CF" - }, - { - "entity": "nVDash;", - "value": "U+022AF" - }, - { - "entity": "nVdash;", - "value": "U+022AE" - }, - { - "entity": "nabla;", - "value": "U+02207" - }, - { - "entity": "nacute;", - "value": "U+00144" - }, - { - "entity": "nap;", - "value": "U+02249" - }, - { - "entity": "napos;", - "value": "U+00149" - }, - { - "entity": "napprox;", - "value": "U+02249" - }, - { - "entity": "natur;", - "value": "U+0266E" - }, - { - "entity": "natural;", - "value": "U+0266E" - }, - { - "entity": "naturals;", - "value": "U+02115" - }, - { - "entity": "nbsp;", - "value": "U+000A0" - }, - { - "entity": "nbsp", - "value": "U+000A0" - }, - { - "entity": "ncap;", - "value": "U+02A43" - }, - { - "entity": "ncaron;", - "value": "U+00148" - }, - { - "entity": "ncedil;", - "value": "U+00146" - }, - { - "entity": "ncong;", - "value": "U+02247" - }, - { - "entity": "ncup;", - "value": "U+02A42" - }, - { - "entity": "ncy;", - "value": "U+0043D" - }, - { - "entity": "ndash;", - "value": "U+02013" - }, - { - "entity": "ne;", - "value": "U+02260" - }, - { - "entity": "neArr;", - "value": "U+021D7" - }, - { - "entity": "nearhk;", - "value": "U+02924" - }, - { - "entity": "nearr;", - "value": "U+02197" - }, - { - "entity": "nearrow;", - "value": "U+02197" - }, - { - "entity": "nequiv;", - "value": "U+02262" - }, - { - "entity": "nesear;", - "value": "U+02928" - }, - { - "entity": "nexist;", - "value": "U+02204" - }, - { - "entity": "nexists;", - "value": "U+02204" - }, - { - "entity": "nfr;", - "value": "U+1D52B" - }, - { - "entity": "nge;", - "value": "U+02271" - }, - { - "entity": "ngeq;", - "value": "U+02271" - }, - { - "entity": "ngsim;", - "value": "U+02275" - }, - { - "entity": "ngt;", - "value": "U+0226F" - }, - { - "entity": "ngtr;", - "value": "U+0226F" - }, - { - "entity": "nhArr;", - "value": "U+021CE" - }, - { - "entity": "nharr;", - "value": "U+021AE" - }, - { - "entity": "nhpar;", - "value": "U+02AF2" - }, - { - "entity": "ni;", - "value": "U+0220B" - }, - { - "entity": "nis;", - "value": "U+022FC" - }, - { - "entity": "nisd;", - "value": "U+022FA" - }, - { - "entity": "niv;", - "value": "U+0220B" - }, - { - "entity": "njcy;", - "value": "U+0045A" - }, - { - "entity": "nlArr;", - "value": "U+021CD" - }, - { - "entity": "nlarr;", - "value": "U+0219A" - }, - { - "entity": "nldr;", - "value": "U+02025" - }, - { - "entity": "nle;", - "value": "U+02270" - }, - { - "entity": "nleftarrow;", - "value": "U+0219A" - }, - { - "entity": "nleftrightarrow;", - "value": "U+021AE" - }, - { - "entity": "nleq;", - "value": "U+02270" - }, - { - "entity": "nless;", - "value": "U+0226E" - }, - { - "entity": "nlsim;", - "value": "U+02274" - }, - { - "entity": "nlt;", - "value": "U+0226E" - }, - { - "entity": "nltri;", - "value": "U+022EA" - }, - { - "entity": "nltrie;", - "value": "U+022EC" - }, - { - "entity": "nmid;", - "value": "U+02224" - }, - { - "entity": "nopf;", - "value": "U+1D55F" - }, - { - "entity": "not;", - "value": "U+000AC" - }, - { - "entity": "not", - "value": "U+000AC" - }, - { - "entity": "notin;", - "value": "U+02209" - }, - { - "entity": "notinva;", - "value": "U+02209" - }, - { - "entity": "notinvb;", - "value": "U+022F7" - }, - { - "entity": "notinvc;", - "value": "U+022F6" - }, - { - "entity": "notni;", - "value": "U+0220C" - }, - { - "entity": "notniva;", - "value": "U+0220C" - }, - { - "entity": "notnivb;", - "value": "U+022FE" - }, - { - "entity": "notnivc;", - "value": "U+022FD" - }, - { - "entity": "npar;", - "value": "U+02226" - }, - { - "entity": "nparallel;", - "value": "U+02226" - }, - { - "entity": "npolint;", - "value": "U+02A14" - }, - { - "entity": "npr;", - "value": "U+02280" - }, - { - "entity": "nprcue;", - "value": "U+022E0" - }, - { - "entity": "nprec;", - "value": "U+02280" - }, - { - "entity": "nrArr;", - "value": "U+021CF" - }, - { - "entity": "nrarr;", - "value": "U+0219B" - }, - { - "entity": "nrightarrow;", - "value": "U+0219B" - }, - { - "entity": "nrtri;", - "value": "U+022EB" - }, - { - "entity": "nrtrie;", - "value": "U+022ED" - }, - { - "entity": "nsc;", - "value": "U+02281" - }, - { - "entity": "nsccue;", - "value": "U+022E1" - }, - { - "entity": "nscr;", - "value": "U+1D4C3" - }, - { - "entity": "nshortmid;", - "value": "U+02224" - }, - { - "entity": "nshortparallel;", - "value": "U+02226" - }, - { - "entity": "nsim;", - "value": "U+02241" - }, - { - "entity": "nsime;", - "value": "U+02244" - }, - { - "entity": "nsimeq;", - "value": "U+02244" - }, - { - "entity": "nsmid;", - "value": "U+02224" - }, - { - "entity": "nspar;", - "value": "U+02226" - }, - { - "entity": "nsqsube;", - "value": "U+022E2" - }, - { - "entity": "nsqsupe;", - "value": "U+022E3" - }, - { - "entity": "nsub;", - "value": "U+02284" - }, - { - "entity": "nsube;", - "value": "U+02288" - }, - { - "entity": "nsubseteq;", - "value": "U+02288" - }, - { - "entity": "nsucc;", - "value": "U+02281" - }, - { - "entity": "nsup;", - "value": "U+02285" - }, - { - "entity": "nsupe;", - "value": "U+02289" - }, - { - "entity": "nsupseteq;", - "value": "U+02289" - }, - { - "entity": "ntgl;", - "value": "U+02279" - }, - { - "entity": "ntilde;", - "value": "U+000F1" - }, - { - "entity": "ntilde", - "value": "U+000F1" - }, - { - "entity": "ntlg;", - "value": "U+02278" - }, - { - "entity": "ntriangleleft;", - "value": "U+022EA" - }, - { - "entity": "ntrianglelefteq;", - "value": "U+022EC" - }, - { - "entity": "ntriangleright;", - "value": "U+022EB" - }, - { - "entity": "ntrianglerighteq;", - "value": "U+022ED" - }, - { - "entity": "nu;", - "value": "U+003BD" - }, - { - "entity": "num;", - "value": "U+00023" - }, - { - "entity": "numero;", - "value": "U+02116" - }, - { - "entity": "numsp;", - "value": "U+02007" - }, - { - "entity": "nvDash;", - "value": "U+022AD" - }, - { - "entity": "nvHarr;", - "value": "U+02904" - }, - { - "entity": "nvdash;", - "value": "U+022AC" - }, - { - "entity": "nvinfin;", - "value": "U+029DE" - }, - { - "entity": "nvlArr;", - "value": "U+02902" - }, - { - "entity": "nvrArr;", - "value": "U+02903" - }, - { - "entity": "nwArr;", - "value": "U+021D6" - }, - { - "entity": "nwarhk;", - "value": "U+02923" - }, - { - "entity": "nwarr;", - "value": "U+02196" - }, - { - "entity": "nwarrow;", - "value": "U+02196" - }, - { - "entity": "nwnear;", - "value": "U+02927" - }, - { - "entity": "oS;", - "value": "U+024C8" - }, - { - "entity": "oacute;", - "value": "U+000F3" - }, - { - "entity": "oacute", - "value": "U+000F3" - }, - { - "entity": "oast;", - "value": "U+0229B" - }, - { - "entity": "ocir;", - "value": "U+0229A" - }, - { - "entity": "ocirc;", - "value": "U+000F4" - }, - { - "entity": "ocirc", - "value": "U+000F4" - }, - { - "entity": "ocy;", - "value": "U+0043E" - }, - { - "entity": "odash;", - "value": "U+0229D" - }, - { - "entity": "odblac;", - "value": "U+00151" - }, - { - "entity": "odiv;", - "value": "U+02A38" - }, - { - "entity": "odot;", - "value": "U+02299" - }, - { - "entity": "odsold;", - "value": "U+029BC" - }, - { - "entity": "oelig;", - "value": "U+00153" - }, - { - "entity": "ofcir;", - "value": "U+029BF" - }, - { - "entity": "ofr;", - "value": "U+1D52C" - }, - { - "entity": "ogon;", - "value": "U+002DB" - }, - { - "entity": "ograve;", - "value": "U+000F2" - }, - { - "entity": "ograve", - "value": "U+000F2" - }, - { - "entity": "ogt;", - "value": "U+029C1" - }, - { - "entity": "ohbar;", - "value": "U+029B5" - }, - { - "entity": "ohm;", - "value": "U+003A9" - }, - { - "entity": "oint;", - "value": "U+0222E" - }, - { - "entity": "olarr;", - "value": "U+021BA" - }, - { - "entity": "olcir;", - "value": "U+029BE" - }, - { - "entity": "olcross;", - "value": "U+029BB" - }, - { - "entity": "oline;", - "value": "U+0203E" - }, - { - "entity": "olt;", - "value": "U+029C0" - }, - { - "entity": "omacr;", - "value": "U+0014D" - }, - { - "entity": "omega;", - "value": "U+003C9" - }, - { - "entity": "omicron;", - "value": "U+003BF" - }, - { - "entity": "omid;", - "value": "U+029B6" - }, - { - "entity": "ominus;", - "value": "U+02296" - }, - { - "entity": "oopf;", - "value": "U+1D560" - }, - { - "entity": "opar;", - "value": "U+029B7" - }, - { - "entity": "operp;", - "value": "U+029B9" - }, - { - "entity": "oplus;", - "value": "U+02295" - }, - { - "entity": "or;", - "value": "U+02228" - }, - { - "entity": "orarr;", - "value": "U+021BB" - }, - { - "entity": "ord;", - "value": "U+02A5D" - }, - { - "entity": "order;", - "value": "U+02134" - }, - { - "entity": "orderof;", - "value": "U+02134" - }, - { - "entity": "ordf;", - "value": "U+000AA" - }, - { - "entity": "ordf", - "value": "U+000AA" - }, - { - "entity": "ordm;", - "value": "U+000BA" - }, - { - "entity": "ordm", - "value": "U+000BA" - }, - { - "entity": "origof;", - "value": "U+022B6" - }, - { - "entity": "oror;", - "value": "U+02A56" - }, - { - "entity": "orslope;", - "value": "U+02A57" - }, - { - "entity": "orv;", - "value": "U+02A5B" - }, - { - "entity": "oscr;", - "value": "U+02134" - }, - { - "entity": "oslash;", - "value": "U+000F8" - }, - { - "entity": "oslash", - "value": "U+000F8" - }, - { - "entity": "osol;", - "value": "U+02298" - }, - { - "entity": "otilde;", - "value": "U+000F5" - }, - { - "entity": "otilde", - "value": "U+000F5" - }, - { - "entity": "otimes;", - "value": "U+02297" - }, - { - "entity": "otimesas;", - "value": "U+02A36" - }, - { - "entity": "ouml;", - "value": "U+000F6" - }, - { - "entity": "ouml", - "value": "U+000F6" - }, - { - "entity": "ovbar;", - "value": "U+0233D" - }, - { - "entity": "par;", - "value": "U+02225" - }, - { - "entity": "para;", - "value": "U+000B6" - }, - { - "entity": "para", - "value": "U+000B6" - }, - { - "entity": "parallel;", - "value": "U+02225" - }, - { - "entity": "parsim;", - "value": "U+02AF3" - }, - { - "entity": "parsl;", - "value": "U+02AFD" - }, - { - "entity": "part;", - "value": "U+02202" - }, - { - "entity": "pcy;", - "value": "U+0043F" - }, - { - "entity": "percnt;", - "value": "U+00025" - }, - { - "entity": "period;", - "value": "U+0002E" - }, - { - "entity": "permil;", - "value": "U+02030" - }, - { - "entity": "perp;", - "value": "U+022A5" - }, - { - "entity": "pertenk;", - "value": "U+02031" - }, - { - "entity": "pfr;", - "value": "U+1D52D" - }, - { - "entity": "phi;", - "value": "U+003C6" - }, - { - "entity": "phiv;", - "value": "U+003D5" - }, - { - "entity": "phmmat;", - "value": "U+02133" - }, - { - "entity": "phone;", - "value": "U+0260E" - }, - { - "entity": "pi;", - "value": "U+003C0" - }, - { - "entity": "pitchfork;", - "value": "U+022D4" - }, - { - "entity": "piv;", - "value": "U+003D6" - }, - { - "entity": "planck;", - "value": "U+0210F" - }, - { - "entity": "planckh;", - "value": "U+0210E" - }, - { - "entity": "plankv;", - "value": "U+0210F" - }, - { - "entity": "plus;", - "value": "U+0002B" - }, - { - "entity": "plusacir;", - "value": "U+02A23" - }, - { - "entity": "plusb;", - "value": "U+0229E" - }, - { - "entity": "pluscir;", - "value": "U+02A22" - }, - { - "entity": "plusdo;", - "value": "U+02214" - }, - { - "entity": "plusdu;", - "value": "U+02A25" - }, - { - "entity": "pluse;", - "value": "U+02A72" - }, - { - "entity": "plusmn;", - "value": "U+000B1" - }, - { - "entity": "plusmn", - "value": "U+000B1" - }, - { - "entity": "plussim;", - "value": "U+02A26" - }, - { - "entity": "plustwo;", - "value": "U+02A27" - }, - { - "entity": "pm;", - "value": "U+000B1" - }, - { - "entity": "pointint;", - "value": "U+02A15" - }, - { - "entity": "popf;", - "value": "U+1D561" - }, - { - "entity": "pound;", - "value": "U+000A3" - }, - { - "entity": "pound", - "value": "U+000A3" - }, - { - "entity": "pr;", - "value": "U+0227A" - }, - { - "entity": "prE;", - "value": "U+02AB3" - }, - { - "entity": "prap;", - "value": "U+02AB7" - }, - { - "entity": "prcue;", - "value": "U+0227C" - }, - { - "entity": "pre;", - "value": "U+02AAF" - }, - { - "entity": "prec;", - "value": "U+0227A" - }, - { - "entity": "precapprox;", - "value": "U+02AB7" - }, - { - "entity": "preccurlyeq;", - "value": "U+0227C" - }, - { - "entity": "preceq;", - "value": "U+02AAF" - }, - { - "entity": "precnapprox;", - "value": "U+02AB9" - }, - { - "entity": "precneqq;", - "value": "U+02AB5" - }, - { - "entity": "precnsim;", - "value": "U+022E8" - }, - { - "entity": "precsim;", - "value": "U+0227E" - }, - { - "entity": "prime;", - "value": "U+02032" - }, - { - "entity": "primes;", - "value": "U+02119" - }, - { - "entity": "prnE;", - "value": "U+02AB5" - }, - { - "entity": "prnap;", - "value": "U+02AB9" - }, - { - "entity": "prnsim;", - "value": "U+022E8" - }, - { - "entity": "prod;", - "value": "U+0220F" - }, - { - "entity": "profalar;", - "value": "U+0232E" - }, - { - "entity": "profline;", - "value": "U+02312" - }, - { - "entity": "profsurf;", - "value": "U+02313" - }, - { - "entity": "prop;", - "value": "U+0221D" - }, - { - "entity": "propto;", - "value": "U+0221D" - }, - { - "entity": "prsim;", - "value": "U+0227E" - }, - { - "entity": "prurel;", - "value": "U+022B0" - }, - { - "entity": "pscr;", - "value": "U+1D4C5" - }, - { - "entity": "psi;", - "value": "U+003C8" - }, - { - "entity": "puncsp;", - "value": "U+02008" - }, - { - "entity": "qfr;", - "value": "U+1D52E" - }, - { - "entity": "qint;", - "value": "U+02A0C" - }, - { - "entity": "qopf;", - "value": "U+1D562" - }, - { - "entity": "qprime;", - "value": "U+02057" - }, - { - "entity": "qscr;", - "value": "U+1D4C6" - }, - { - "entity": "quaternions;", - "value": "U+0210D" - }, - { - "entity": "quatint;", - "value": "U+02A16" - }, - { - "entity": "quest;", - "value": "U+0003F" - }, - { - "entity": "questeq;", - "value": "U+0225F" - }, - { - "entity": "quot;", - "value": "U+00022" - }, - { - "entity": "quot", - "value": "U+00022" - }, - { - "entity": "rAarr;", - "value": "U+021DB" - }, - { - "entity": "rArr;", - "value": "U+021D2" - }, - { - "entity": "rAtail;", - "value": "U+0291C" - }, - { - "entity": "rBarr;", - "value": "U+0290F" - }, - { - "entity": "rHar;", - "value": "U+02964" - }, - { - "entity": "racute;", - "value": "U+00155" - }, - { - "entity": "radic;", - "value": "U+0221A" - }, - { - "entity": "raemptyv;", - "value": "U+029B3" - }, - { - "entity": "rang;", - "value": "U+027E9" - }, - { - "entity": "rangd;", - "value": "U+02992" - }, - { - "entity": "range;", - "value": "U+029A5" - }, - { - "entity": "rangle;", - "value": "U+027E9" - }, - { - "entity": "raquo;", - "value": "U+000BB" - }, - { - "entity": "raquo", - "value": "U+000BB" - }, - { - "entity": "rarr;", - "value": "U+02192" - }, - { - "entity": "rarrap;", - "value": "U+02975" - }, - { - "entity": "rarrb;", - "value": "U+021E5" - }, - { - "entity": "rarrbfs;", - "value": "U+02920" - }, - { - "entity": "rarrc;", - "value": "U+02933" - }, - { - "entity": "rarrfs;", - "value": "U+0291E" - }, - { - "entity": "rarrhk;", - "value": "U+021AA" - }, - { - "entity": "rarrlp;", - "value": "U+021AC" - }, - { - "entity": "rarrpl;", - "value": "U+02945" - }, - { - "entity": "rarrsim;", - "value": "U+02974" - }, - { - "entity": "rarrtl;", - "value": "U+021A3" - }, - { - "entity": "rarrw;", - "value": "U+0219D" - }, - { - "entity": "ratail;", - "value": "U+0291A" - }, - { - "entity": "ratio;", - "value": "U+02236" - }, - { - "entity": "rationals;", - "value": "U+0211A" - }, - { - "entity": "rbarr;", - "value": "U+0290D" - }, - { - "entity": "rbbrk;", - "value": "U+02773" - }, - { - "entity": "rbrace;", - "value": "U+0007D" - }, - { - "entity": "rbrack;", - "value": "U+0005D" - }, - { - "entity": "rbrke;", - "value": "U+0298C" - }, - { - "entity": "rbrksld;", - "value": "U+0298E" - }, - { - "entity": "rbrkslu;", - "value": "U+02990" - }, - { - "entity": "rcaron;", - "value": "U+00159" - }, - { - "entity": "rcedil;", - "value": "U+00157" - }, - { - "entity": "rceil;", - "value": "U+02309" - }, - { - "entity": "rcub;", - "value": "U+0007D" - }, - { - "entity": "rcy;", - "value": "U+00440" - }, - { - "entity": "rdca;", - "value": "U+02937" - }, - { - "entity": "rdldhar;", - "value": "U+02969" - }, - { - "entity": "rdquo;", - "value": "U+0201D" - }, - { - "entity": "rdquor;", - "value": "U+0201D" - }, - { - "entity": "rdsh;", - "value": "U+021B3" - }, - { - "entity": "real;", - "value": "U+0211C" - }, - { - "entity": "realine;", - "value": "U+0211B" - }, - { - "entity": "realpart;", - "value": "U+0211C" - }, - { - "entity": "reals;", - "value": "U+0211D" - }, - { - "entity": "rect;", - "value": "U+025AD" - }, - { - "entity": "reg;", - "value": "U+000AE" - }, - { - "entity": "reg", - "value": "U+000AE" - }, - { - "entity": "rfisht;", - "value": "U+0297D" - }, - { - "entity": "rfloor;", - "value": "U+0230B" - }, - { - "entity": "rfr;", - "value": "U+1D52F" - }, - { - "entity": "rhard;", - "value": "U+021C1" - }, - { - "entity": "rharu;", - "value": "U+021C0" - }, - { - "entity": "rharul;", - "value": "U+0296C" - }, - { - "entity": "rho;", - "value": "U+003C1" - }, - { - "entity": "rhov;", - "value": "U+003F1" - }, - { - "entity": "rightarrow;", - "value": "U+02192" - }, - { - "entity": "rightarrowtail;", - "value": "U+021A3" - }, - { - "entity": "rightharpoondown;", - "value": "U+021C1" - }, - { - "entity": "rightharpoonup;", - "value": "U+021C0" - }, - { - "entity": "rightleftarrows;", - "value": "U+021C4" - }, - { - "entity": "rightleftharpoons;", - "value": "U+021CC" - }, - { - "entity": "rightrightarrows;", - "value": "U+021C9" - }, - { - "entity": "rightsquigarrow;", - "value": "U+0219D" - }, - { - "entity": "rightthreetimes;", - "value": "U+022CC" - }, - { - "entity": "ring;", - "value": "U+002DA" - }, - { - "entity": "risingdotseq;", - "value": "U+02253" - }, - { - "entity": "rlarr;", - "value": "U+021C4" - }, - { - "entity": "rlhar;", - "value": "U+021CC" - }, - { - "entity": "rlm;", - "value": "U+0200F" - }, - { - "entity": "rmoust;", - "value": "U+023B1" - }, - { - "entity": "rmoustache;", - "value": "U+023B1" - }, - { - "entity": "rnmid;", - "value": "U+02AEE" - }, - { - "entity": "roang;", - "value": "U+027ED" - }, - { - "entity": "roarr;", - "value": "U+021FE" - }, - { - "entity": "robrk;", - "value": "U+027E7" - }, - { - "entity": "ropar;", - "value": "U+02986" - }, - { - "entity": "ropf;", - "value": "U+1D563" - }, - { - "entity": "roplus;", - "value": "U+02A2E" - }, - { - "entity": "rotimes;", - "value": "U+02A35" - }, - { - "entity": "rpar;", - "value": "U+00029" - }, - { - "entity": "rpargt;", - "value": "U+02994" - }, - { - "entity": "rppolint;", - "value": "U+02A12" - }, - { - "entity": "rrarr;", - "value": "U+021C9" - }, - { - "entity": "rsaquo;", - "value": "U+0203A" - }, - { - "entity": "rscr;", - "value": "U+1D4C7" - }, - { - "entity": "rsh;", - "value": "U+021B1" - }, - { - "entity": "rsqb;", - "value": "U+0005D" - }, - { - "entity": "rsquo;", - "value": "U+02019" - }, - { - "entity": "rsquor;", - "value": "U+02019" - }, - { - "entity": "rthree;", - "value": "U+022CC" - }, - { - "entity": "rtimes;", - "value": "U+022CA" - }, - { - "entity": "rtri;", - "value": "U+025B9" - }, - { - "entity": "rtrie;", - "value": "U+022B5" - }, - { - "entity": "rtrif;", - "value": "U+025B8" - }, - { - "entity": "rtriltri;", - "value": "U+029CE" - }, - { - "entity": "ruluhar;", - "value": "U+02968" - }, - { - "entity": "rx;", - "value": "U+0211E" - }, - { - "entity": "sacute;", - "value": "U+0015B" - }, - { - "entity": "sbquo;", - "value": "U+0201A" - }, - { - "entity": "sc;", - "value": "U+0227B" - }, - { - "entity": "scE;", - "value": "U+02AB4" - }, - { - "entity": "scap;", - "value": "U+02AB8" - }, - { - "entity": "scaron;", - "value": "U+00161" - }, - { - "entity": "sccue;", - "value": "U+0227D" - }, - { - "entity": "sce;", - "value": "U+02AB0" - }, - { - "entity": "scedil;", - "value": "U+0015F" - }, - { - "entity": "scirc;", - "value": "U+0015D" - }, - { - "entity": "scnE;", - "value": "U+02AB6" - }, - { - "entity": "scnap;", - "value": "U+02ABA" - }, - { - "entity": "scnsim;", - "value": "U+022E9" - }, - { - "entity": "scpolint;", - "value": "U+02A13" - }, - { - "entity": "scsim;", - "value": "U+0227F" - }, - { - "entity": "scy;", - "value": "U+00441" - }, - { - "entity": "sdot;", - "value": "U+022C5" - }, - { - "entity": "sdotb;", - "value": "U+022A1" - }, - { - "entity": "sdote;", - "value": "U+02A66" - }, - { - "entity": "seArr;", - "value": "U+021D8" - }, - { - "entity": "searhk;", - "value": "U+02925" - }, - { - "entity": "searr;", - "value": "U+02198" - }, - { - "entity": "searrow;", - "value": "U+02198" - }, - { - "entity": "sect;", - "value": "U+000A7" - }, - { - "entity": "sect", - "value": "U+000A7" - }, - { - "entity": "semi;", - "value": "U+0003B" - }, - { - "entity": "seswar;", - "value": "U+02929" - }, - { - "entity": "setminus;", - "value": "U+02216" - }, - { - "entity": "setmn;", - "value": "U+02216" - }, - { - "entity": "sext;", - "value": "U+02736" - }, - { - "entity": "sfr;", - "value": "U+1D530" - }, - { - "entity": "sfrown;", - "value": "U+02322" - }, - { - "entity": "sharp;", - "value": "U+0266F" - }, - { - "entity": "shchcy;", - "value": "U+00449" - }, - { - "entity": "shcy;", - "value": "U+00448" - }, - { - "entity": "shortmid;", - "value": "U+02223" - }, - { - "entity": "shortparallel;", - "value": "U+02225" - }, - { - "entity": "shy;", - "value": "U+000AD " - }, - { - "entity": "shy", - "value": "U+000AD " - }, - { - "entity": "sigma;", - "value": "U+003C3" - }, - { - "entity": "sigmaf;", - "value": "U+003C2" - }, - { - "entity": "sigmav;", - "value": "U+003C2" - }, - { - "entity": "sim;", - "value": "U+0223C" - }, - { - "entity": "simdot;", - "value": "U+02A6A" - }, - { - "entity": "sime;", - "value": "U+02243" - }, - { - "entity": "simeq;", - "value": "U+02243" - }, - { - "entity": "simg;", - "value": "U+02A9E" - }, - { - "entity": "simgE;", - "value": "U+02AA0" - }, - { - "entity": "siml;", - "value": "U+02A9D" - }, - { - "entity": "simlE;", - "value": "U+02A9F" - }, - { - "entity": "simne;", - "value": "U+02246" - }, - { - "entity": "simplus;", - "value": "U+02A24" - }, - { - "entity": "simrarr;", - "value": "U+02972" - }, - { - "entity": "slarr;", - "value": "U+02190" - }, - { - "entity": "smallsetminus;", - "value": "U+02216" - }, - { - "entity": "smashp;", - "value": "U+02A33" - }, - { - "entity": "smeparsl;", - "value": "U+029E4" - }, - { - "entity": "smid;", - "value": "U+02223" - }, - { - "entity": "smile;", - "value": "U+02323" - }, - { - "entity": "smt;", - "value": "U+02AAA" - }, - { - "entity": "smte;", - "value": "U+02AAC" - }, - { - "entity": "softcy;", - "value": "U+0044C" - }, - { - "entity": "sol;", - "value": "U+0002F" - }, - { - "entity": "solb;", - "value": "U+029C4" - }, - { - "entity": "solbar;", - "value": "U+0233F" - }, - { - "entity": "sopf;", - "value": "U+1D564" - }, - { - "entity": "spades;", - "value": "U+02660" - }, - { - "entity": "spadesuit;", - "value": "U+02660" - }, - { - "entity": "spar;", - "value": "U+02225" - }, - { - "entity": "sqcap;", - "value": "U+02293" - }, - { - "entity": "sqcup;", - "value": "U+02294" - }, - { - "entity": "sqsub;", - "value": "U+0228F" - }, - { - "entity": "sqsube;", - "value": "U+02291" - }, - { - "entity": "sqsubset;", - "value": "U+0228F" - }, - { - "entity": "sqsubseteq;", - "value": "U+02291" - }, - { - "entity": "sqsup;", - "value": "U+02290" - }, - { - "entity": "sqsupe;", - "value": "U+02292" - }, - { - "entity": "sqsupset;", - "value": "U+02290" - }, - { - "entity": "sqsupseteq;", - "value": "U+02292" - }, - { - "entity": "squ;", - "value": "U+025A1" - }, - { - "entity": "square;", - "value": "U+025A1" - }, - { - "entity": "squarf;", - "value": "U+025AA" - }, - { - "entity": "squf;", - "value": "U+025AA" - }, - { - "entity": "srarr;", - "value": "U+02192" - }, - { - "entity": "sscr;", - "value": "U+1D4C8" - }, - { - "entity": "ssetmn;", - "value": "U+02216" - }, - { - "entity": "ssmile;", - "value": "U+02323" - }, - { - "entity": "sstarf;", - "value": "U+022C6" - }, - { - "entity": "star;", - "value": "U+02606" - }, - { - "entity": "starf;", - "value": "U+02605" - }, - { - "entity": "straightepsilon;", - "value": "U+003F5" - }, - { - "entity": "straightphi;", - "value": "U+003D5" - }, - { - "entity": "strns;", - "value": "U+000AF" - }, - { - "entity": "sub;", - "value": "U+02282" - }, - { - "entity": "subE;", - "value": "U+02AC5" - }, - { - "entity": "subdot;", - "value": "U+02ABD" - }, - { - "entity": "sube;", - "value": "U+02286" - }, - { - "entity": "subedot;", - "value": "U+02AC3" - }, - { - "entity": "submult;", - "value": "U+02AC1" - }, - { - "entity": "subnE;", - "value": "U+02ACB" - }, - { - "entity": "subne;", - "value": "U+0228A" - }, - { - "entity": "subplus;", - "value": "U+02ABF" - }, - { - "entity": "subrarr;", - "value": "U+02979" - }, - { - "entity": "subset;", - "value": "U+02282" - }, - { - "entity": "subseteq;", - "value": "U+02286" - }, - { - "entity": "subseteqq;", - "value": "U+02AC5" - }, - { - "entity": "subsetneq;", - "value": "U+0228A" - }, - { - "entity": "subsetneqq;", - "value": "U+02ACB" - }, - { - "entity": "subsim;", - "value": "U+02AC7" - }, - { - "entity": "subsub;", - "value": "U+02AD5" - }, - { - "entity": "subsup;", - "value": "U+02AD3" - }, - { - "entity": "succ;", - "value": "U+0227B" - }, - { - "entity": "succapprox;", - "value": "U+02AB8" - }, - { - "entity": "succcurlyeq;", - "value": "U+0227D" - }, - { - "entity": "succeq;", - "value": "U+02AB0" - }, - { - "entity": "succnapprox;", - "value": "U+02ABA" - }, - { - "entity": "succneqq;", - "value": "U+02AB6" - }, - { - "entity": "succnsim;", - "value": "U+022E9" - }, - { - "entity": "succsim;", - "value": "U+0227F" - }, - { - "entity": "sum;", - "value": "U+02211" - }, - { - "entity": "sung;", - "value": "U+0266A" - }, - { - "entity": "sup1;", - "value": "U+000B9" - }, - { - "entity": "sup1", - "value": "U+000B9" - }, - { - "entity": "sup2;", - "value": "U+000B2" - }, - { - "entity": "sup2", - "value": "U+000B2" - }, - { - "entity": "sup3;", - "value": "U+000B3" - }, - { - "entity": "sup3", - "value": "U+000B3" - }, - { - "entity": "sup;", - "value": "U+02283" - }, - { - "entity": "supE;", - "value": "U+02AC6" - }, - { - "entity": "supdot;", - "value": "U+02ABE" - }, - { - "entity": "supdsub;", - "value": "U+02AD8" - }, - { - "entity": "supe;", - "value": "U+02287" - }, - { - "entity": "supedot;", - "value": "U+02AC4" - }, - { - "entity": "suphsol;", - "value": "U+027C9" - }, - { - "entity": "suphsub;", - "value": "U+02AD7" - }, - { - "entity": "suplarr;", - "value": "U+0297B" - }, - { - "entity": "supmult;", - "value": "U+02AC2" - }, - { - "entity": "supnE;", - "value": "U+02ACC" - }, - { - "entity": "supne;", - "value": "U+0228B" - }, - { - "entity": "supplus;", - "value": "U+02AC0" - }, - { - "entity": "supset;", - "value": "U+02283" - }, - { - "entity": "supseteq;", - "value": "U+02287" - }, - { - "entity": "supseteqq;", - "value": "U+02AC6" - }, - { - "entity": "supsetneq;", - "value": "U+0228B" - }, - { - "entity": "supsetneqq;", - "value": "U+02ACC" - }, - { - "entity": "supsim;", - "value": "U+02AC8" - }, - { - "entity": "supsub;", - "value": "U+02AD4" - }, - { - "entity": "supsup;", - "value": "U+02AD6" - }, - { - "entity": "swArr;", - "value": "U+021D9" - }, - { - "entity": "swarhk;", - "value": "U+02926" - }, - { - "entity": "swarr;", - "value": "U+02199" - }, - { - "entity": "swarrow;", - "value": "U+02199" - }, - { - "entity": "swnwar;", - "value": "U+0292A" - }, - { - "entity": "szlig;", - "value": "U+000DF" - }, - { - "entity": "szlig", - "value": "U+000DF" - }, - { - "entity": "target;", - "value": "U+02316" - }, - { - "entity": "tau;", - "value": "U+003C4" - }, - { - "entity": "tbrk;", - "value": "U+023B4" - }, - { - "entity": "tcaron;", - "value": "U+00165" - }, - { - "entity": "tcedil;", - "value": "U+00163" - }, - { - "entity": "tcy;", - "value": "U+00442" - }, - { - "entity": "tdot;", - "value": "U+020DB" - }, - { - "entity": "telrec;", - "value": "U+02315" - }, - { - "entity": "tfr;", - "value": "U+1D531" - }, - { - "entity": "there4;", - "value": "U+02234" - }, - { - "entity": "therefore;", - "value": "U+02234" - }, - { - "entity": "theta;", - "value": "U+003B8" - }, - { - "entity": "thetasym;", - "value": "U+003D1" - }, - { - "entity": "thetav;", - "value": "U+003D1" - }, - { - "entity": "thickapprox;", - "value": "U+02248" - }, - { - "entity": "thicksim;", - "value": "U+0223C" - }, - { - "entity": "thinsp;", - "value": "U+02009" - }, - { - "entity": "thkap;", - "value": "U+02248" - }, - { - "entity": "thksim;", - "value": "U+0223C" - }, - { - "entity": "thorn;", - "value": "U+000FE" - }, - { - "entity": "thorn", - "value": "U+000FE" - }, - { - "entity": "tilde;", - "value": "U+002DC" - }, - { - "entity": "times;", - "value": "U+000D7" - }, - { - "entity": "times", - "value": "U+000D7" - }, - { - "entity": "timesb;", - "value": "U+022A0" - }, - { - "entity": "timesbar;", - "value": "U+02A31" - }, - { - "entity": "timesd;", - "value": "U+02A30" - }, - { - "entity": "tint;", - "value": "U+0222D" - }, - { - "entity": "toea;", - "value": "U+02928" - }, - { - "entity": "top;", - "value": "U+022A4" - }, - { - "entity": "topbot;", - "value": "U+02336" - }, - { - "entity": "topcir;", - "value": "U+02AF1" - }, - { - "entity": "topf;", - "value": "U+1D565" - }, - { - "entity": "topfork;", - "value": "U+02ADA" - }, - { - "entity": "tosa;", - "value": "U+02929" - }, - { - "entity": "tprime;", - "value": "U+02034" - }, - { - "entity": "trade;", - "value": "U+02122" - }, - { - "entity": "triangle;", - "value": "U+025B5" - }, - { - "entity": "triangledown;", - "value": "U+025BF" - }, - { - "entity": "triangleleft;", - "value": "U+025C3" - }, - { - "entity": "trianglelefteq;", - "value": "U+022B4" - }, - { - "entity": "triangleq;", - "value": "U+0225C" - }, - { - "entity": "triangleright;", - "value": "U+025B9" - }, - { - "entity": "trianglerighteq;", - "value": "U+022B5" - }, - { - "entity": "tridot;", - "value": "U+025EC" - }, - { - "entity": "trie;", - "value": "U+0225C" - }, - { - "entity": "triminus;", - "value": "U+02A3A" - }, - { - "entity": "triplus;", - "value": "U+02A39" - }, - { - "entity": "trisb;", - "value": "U+029CD" - }, - { - "entity": "tritime;", - "value": "U+02A3B" - }, - { - "entity": "trpezium;", - "value": "U+023E2" - }, - { - "entity": "tscr;", - "value": "U+1D4C9" - }, - { - "entity": "tscy;", - "value": "U+00446" - }, - { - "entity": "tshcy;", - "value": "U+0045B" - }, - { - "entity": "tstrok;", - "value": "U+00167" - }, - { - "entity": "twixt;", - "value": "U+0226C" - }, - { - "entity": "twoheadleftarrow;", - "value": "U+0219E" - }, - { - "entity": "twoheadrightarrow;", - "value": "U+021A0" - }, - { - "entity": "uArr;", - "value": "U+021D1" - }, - { - "entity": "uHar;", - "value": "U+02963" - }, - { - "entity": "uacute;", - "value": "U+000FA" - }, - { - "entity": "uacute", - "value": "U+000FA" - }, - { - "entity": "uarr;", - "value": "U+02191" - }, - { - "entity": "ubrcy;", - "value": "U+0045E" - }, - { - "entity": "ubreve;", - "value": "U+0016D" - }, - { - "entity": "ucirc;", - "value": "U+000FB" - }, - { - "entity": "ucirc", - "value": "U+000FB" - }, - { - "entity": "ucy;", - "value": "U+00443" - }, - { - "entity": "udarr;", - "value": "U+021C5" - }, - { - "entity": "udblac;", - "value": "U+00171" - }, - { - "entity": "udhar;", - "value": "U+0296E" - }, - { - "entity": "ufisht;", - "value": "U+0297E" - }, - { - "entity": "ufr;", - "value": "U+1D532" - }, - { - "entity": "ugrave;", - "value": "U+000F9" - }, - { - "entity": "ugrave", - "value": "U+000F9" - }, - { - "entity": "uharl;", - "value": "U+021BF" - }, - { - "entity": "uharr;", - "value": "U+021BE" - }, - { - "entity": "uhblk;", - "value": "U+02580" - }, - { - "entity": "ulcorn;", - "value": "U+0231C" - }, - { - "entity": "ulcorner;", - "value": "U+0231C" - }, - { - "entity": "ulcrop;", - "value": "U+0230F" - }, - { - "entity": "ultri;", - "value": "U+025F8" - }, - { - "entity": "umacr;", - "value": "U+0016B" - }, - { - "entity": "uml;", - "value": "U+000A8" - }, - { - "entity": "uml", - "value": "U+000A8" - }, - { - "entity": "uogon;", - "value": "U+00173" - }, - { - "entity": "uopf;", - "value": "U+1D566" - }, - { - "entity": "uparrow;", - "value": "U+02191" - }, - { - "entity": "updownarrow;", - "value": "U+02195" - }, - { - "entity": "upharpoonleft;", - "value": "U+021BF" - }, - { - "entity": "upharpoonright;", - "value": "U+021BE" - }, - { - "entity": "uplus;", - "value": "U+0228E" - }, - { - "entity": "upsi;", - "value": "U+003C5" - }, - { - "entity": "upsih;", - "value": "U+003D2" - }, - { - "entity": "upsilon;", - "value": "U+003C5" - }, - { - "entity": "upuparrows;", - "value": "U+021C8" - }, - { - "entity": "urcorn;", - "value": "U+0231D" - }, - { - "entity": "urcorner;", - "value": "U+0231D" - }, - { - "entity": "urcrop;", - "value": "U+0230E" - }, - { - "entity": "uring;", - "value": "U+0016F" - }, - { - "entity": "urtri;", - "value": "U+025F9" - }, - { - "entity": "uscr;", - "value": "U+1D4CA" - }, - { - "entity": "utdot;", - "value": "U+022F0" - }, - { - "entity": "utilde;", - "value": "U+00169" - }, - { - "entity": "utri;", - "value": "U+025B5" - }, - { - "entity": "utrif;", - "value": "U+025B4" - }, - { - "entity": "uuarr;", - "value": "U+021C8" - }, - { - "entity": "uuml;", - "value": "U+000FC" - }, - { - "entity": "uuml", - "value": "U+000FC" - }, - { - "entity": "uwangle;", - "value": "U+029A7" - }, - { - "entity": "vArr;", - "value": "U+021D5" - }, - { - "entity": "vBar;", - "value": "U+02AE8" - }, - { - "entity": "vBarv;", - "value": "U+02AE9" - }, - { - "entity": "vDash;", - "value": "U+022A8" - }, - { - "entity": "vangrt;", - "value": "U+0299C" - }, - { - "entity": "varepsilon;", - "value": "U+003F5" - }, - { - "entity": "varkappa;", - "value": "U+003F0" - }, - { - "entity": "varnothing;", - "value": "U+02205" - }, - { - "entity": "varphi;", - "value": "U+003D5" - }, - { - "entity": "varpi;", - "value": "U+003D6" - }, - { - "entity": "varpropto;", - "value": "U+0221D" - }, - { - "entity": "varr;", - "value": "U+02195" - }, - { - "entity": "varrho;", - "value": "U+003F1" - }, - { - "entity": "varsigma;", - "value": "U+003C2" - }, - { - "entity": "vartheta;", - "value": "U+003D1" - }, - { - "entity": "vartriangleleft;", - "value": "U+022B2" - }, - { - "entity": "vartriangleright;", - "value": "U+022B3" - }, - { - "entity": "vcy;", - "value": "U+00432" - }, - { - "entity": "vdash;", - "value": "U+022A2" - }, - { - "entity": "vee;", - "value": "U+02228" - }, - { - "entity": "veebar;", - "value": "U+022BB" - }, - { - "entity": "veeeq;", - "value": "U+0225A" - }, - { - "entity": "vellip;", - "value": "U+022EE" - }, - { - "entity": "verbar;", - "value": "U+0007C" - }, - { - "entity": "vert;", - "value": "U+0007C" - }, - { - "entity": "vfr;", - "value": "U+1D533" - }, - { - "entity": "vltri;", - "value": "U+022B2" - }, - { - "entity": "vopf;", - "value": "U+1D567" - }, - { - "entity": "vprop;", - "value": "U+0221D" - }, - { - "entity": "vrtri;", - "value": "U+022B3" - }, - { - "entity": "vscr;", - "value": "U+1D4CB" - }, - { - "entity": "vzigzag;", - "value": "U+0299A" - }, - { - "entity": "wcirc;", - "value": "U+00175" - }, - { - "entity": "wedbar;", - "value": "U+02A5F" - }, - { - "entity": "wedge;", - "value": "U+02227" - }, - { - "entity": "wedgeq;", - "value": "U+02259" - }, - { - "entity": "weierp;", - "value": "U+02118" - }, - { - "entity": "wfr;", - "value": "U+1D534" - }, - { - "entity": "wopf;", - "value": "U+1D568" - }, - { - "entity": "wp;", - "value": "U+02118" - }, - { - "entity": "wr;", - "value": "U+02240" - }, - { - "entity": "wreath;", - "value": "U+02240" - }, - { - "entity": "wscr;", - "value": "U+1D4CC" - }, - { - "entity": "xcap;", - "value": "U+022C2" - }, - { - "entity": "xcirc;", - "value": "U+025EF" - }, - { - "entity": "xcup;", - "value": "U+022C3" - }, - { - "entity": "xdtri;", - "value": "U+025BD" - }, - { - "entity": "xfr;", - "value": "U+1D535" - }, - { - "entity": "xhArr;", - "value": "U+027FA" - }, - { - "entity": "xharr;", - "value": "U+027F7" - }, - { - "entity": "xi;", - "value": "U+003BE" - }, - { - "entity": "xlArr;", - "value": "U+027F8" - }, - { - "entity": "xlarr;", - "value": "U+027F5" - }, - { - "entity": "xmap;", - "value": "U+027FC" - }, - { - "entity": "xnis;", - "value": "U+022FB" - }, - { - "entity": "xodot;", - "value": "U+02A00" - }, - { - "entity": "xopf;", - "value": "U+1D569" - }, - { - "entity": "xoplus;", - "value": "U+02A01" - }, - { - "entity": "xotime;", - "value": "U+02A02" - }, - { - "entity": "xrArr;", - "value": "U+027F9" - }, - { - "entity": "xrarr;", - "value": "U+027F6" - }, - { - "entity": "xscr;", - "value": "U+1D4CD" - }, - { - "entity": "xsqcup;", - "value": "U+02A06" - }, - { - "entity": "xuplus;", - "value": "U+02A04" - }, - { - "entity": "xutri;", - "value": "U+025B3" - }, - { - "entity": "xvee;", - "value": "U+022C1" - }, - { - "entity": "xwedge;", - "value": "U+022C0" - }, - { - "entity": "yacute;", - "value": "U+000FD" - }, - { - "entity": "yacute", - "value": "U+000FD" - }, - { - "entity": "yacy;", - "value": "U+0044F" - }, - { - "entity": "ycirc;", - "value": "U+00177" - }, - { - "entity": "ycy;", - "value": "U+0044B" - }, - { - "entity": "yen;", - "value": "U+000A5" - }, - { - "entity": "yen", - "value": "U+000A5" - }, - { - "entity": "yfr;", - "value": "U+1D536" - }, - { - "entity": "yicy;", - "value": "U+00457" - }, - { - "entity": "yopf;", - "value": "U+1D56A" - }, - { - "entity": "yscr;", - "value": "U+1D4CE" - }, - { - "entity": "yucy;", - "value": "U+0044E" - }, - { - "entity": "yuml;", - "value": "U+000FF" - }, - { - "entity": "yuml", - "value": "U+000FF" - }, - { - "entity": "zacute;", - "value": "U+0017A" - }, - { - "entity": "zcaron;", - "value": "U+0017E" - }, - { - "entity": "zcy;", - "value": "U+00437" - }, - { - "entity": "zdot;", - "value": "U+0017C" - }, - { - "entity": "zeetrf;", - "value": "U+02128" - }, - { - "entity": "zeta;", - "value": "U+003B6" - }, - { - "entity": "zfr;", - "value": "U+1D537" - }, - { - "entity": "zhcy;", - "value": "U+00436" - }, - { - "entity": "zigrarr;", - "value": "U+021DD" - }, - { - "entity": "zopf;", - "value": "U+1D56B" - }, - { - "entity": "zscr;", - "value": "U+1D4CF" - }, - { - "entity": "zwj;", - "value": "U+0200D" - }, - { - "entity": "zwnj;", - "value": "U+0200C" - } -] diff --git a/WebCore/html/HTMLFormControlElement.h b/WebCore/html/HTMLFormControlElement.h index 2352182..eae7f0a 100644 --- a/WebCore/html/HTMLFormControlElement.h +++ b/WebCore/html/HTMLFormControlElement.h @@ -88,9 +88,6 @@ public: // This must be called when a validation constraint or control value is changed. void setNeedsValidityCheck(); void setCustomValidity(const String&); - virtual bool valueMissing() const { return false; } - virtual bool patternMismatch() const { return false; } - virtual bool tooLong() const { return false; } void formDestroyed() { m_form = 0; } @@ -175,6 +172,9 @@ private: // FIXME: Give this class its own header file. class HTMLTextFormControlElement : public HTMLFormControlElementWithState { public: + // Common flag for HTMLInputElement::tooLong() and HTMLTextAreaElement::tooLong(). + enum NeedsToCheckDirtyFlag {CheckDirtyFlag, IgnoreDirtyFlag}; + virtual ~HTMLTextFormControlElement(); String strippedPlaceholder() const; diff --git a/WebCore/html/HTMLFormElement.cpp b/WebCore/html/HTMLFormElement.cpp index c53ea1d..56ffd0f 100644 --- a/WebCore/html/HTMLFormElement.cpp +++ b/WebCore/html/HTMLFormElement.cpp @@ -449,6 +449,9 @@ bool HTMLFormElement::noValidate() const return !getAttribute(novalidateAttr).isNull(); } +// FIXME: This function should be removed because it does not do the same thing as the +// JavaScript binding for action, which treats action as a URL attribute. Last time I +// (Darin Adler) removed this, someone added it back, so I am leaving it in for now. String HTMLFormElement::action() const { return getAttribute(actionAttr); diff --git a/WebCore/html/HTMLFormElement.idl b/WebCore/html/HTMLFormElement.idl index c5162f9..a9f8ea1 100644 --- a/WebCore/html/HTMLFormElement.idl +++ b/WebCore/html/HTMLFormElement.idl @@ -30,7 +30,7 @@ module html { attribute [Reflect] DOMString name; attribute [Reflect] boolean noValidate; attribute [Reflect=accept_charset] DOMString acceptCharset; - attribute [Reflect] DOMString action; + attribute [Reflect, URL] DOMString action; attribute [ConvertNullToNullString] DOMString encoding; /* Netscape/Firefox legacy attribute. Same as enctype. */ attribute [ConvertNullToNullString] DOMString enctype; attribute [Reflect] DOMString method; diff --git a/WebCore/html/HTMLFrameElement.idl b/WebCore/html/HTMLFrameElement.idl index 4a5268c..dfe4ef8 100644 --- a/WebCore/html/HTMLFrameElement.idl +++ b/WebCore/html/HTMLFrameElement.idl @@ -29,7 +29,7 @@ module html { attribute [Reflect] DOMString name; attribute [Reflect] boolean noResize; attribute [Reflect] DOMString scrolling; - attribute [Reflect,URL] DOMString src; + attribute [Reflect, URL] DOMString src; // Introduced in DOM Level 2: readonly attribute [CheckFrameSecurity] Document contentDocument; diff --git a/WebCore/html/HTMLFrameElementBase.cpp b/WebCore/html/HTMLFrameElementBase.cpp index 6cae891..b967926 100644 --- a/WebCore/html/HTMLFrameElementBase.cpp +++ b/WebCore/html/HTMLFrameElementBase.cpp @@ -37,6 +37,7 @@ #include "HTMLNames.h" #include "KURL.h" #include "Page.h" +#include "RenderEmbeddedObject.h" #include "RenderFrame.h" #include "ScriptController.h" #include "ScriptEventListener.h" @@ -210,10 +211,10 @@ void HTMLFrameElementBase::attach() setRemainsAliveOnRemovalFromTree(false); HTMLFrameOwnerElement::attach(); - - if (RenderPart* renderPart = toRenderPart(renderer())) { + + if (RenderPart* part = renderPart()) { if (Frame* frame = contentFrame()) - renderPart->setWidget(frame->view()); + part->setWidget(frame->view()); } } @@ -257,20 +258,20 @@ bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const int HTMLFrameElementBase::width() const { - if (!renderer()) + if (!renderBox()) return 0; - + document()->updateLayoutIgnorePendingStylesheets(); - return toRenderBox(renderer())->width(); + return renderBox()->width(); } int HTMLFrameElementBase::height() const { - if (!renderer()) + if (!renderBox()) return 0; - + document()->updateLayoutIgnorePendingStylesheets(); - return toRenderBox(renderer())->height(); + return renderBox()->height(); } void HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree(bool value) diff --git a/WebCore/html/HTMLFrameOwnerElement.cpp b/WebCore/html/HTMLFrameOwnerElement.cpp index a1a69f3..3f946f0 100644 --- a/WebCore/html/HTMLFrameOwnerElement.cpp +++ b/WebCore/html/HTMLFrameOwnerElement.cpp @@ -24,6 +24,7 @@ #include "DOMWindow.h" #include "Frame.h" #include "FrameLoader.h" +#include "RenderPart.h" #if ENABLE(SVG) #include "ExceptionCode.h" @@ -39,6 +40,15 @@ HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum { } +RenderPart* HTMLFrameOwnerElement::renderPart() const +{ + // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers + // when using fallback content. + if (!renderer() || !renderer()->isRenderPart()) + return 0; + return toRenderPart(renderer()); +} + void HTMLFrameOwnerElement::willRemove() { if (Frame* frame = contentFrame()) { diff --git a/WebCore/html/HTMLFrameOwnerElement.h b/WebCore/html/HTMLFrameOwnerElement.h index 804ab22..c84d7bb 100644 --- a/WebCore/html/HTMLFrameOwnerElement.h +++ b/WebCore/html/HTMLFrameOwnerElement.h @@ -28,6 +28,7 @@ namespace WebCore { class DOMWindow; class Frame; +class RenderPart; #if ENABLE(SVG) class SVGDocument; @@ -41,6 +42,11 @@ public: DOMWindow* contentWindow() const; Document* contentDocument() const; + // Most subclasses use RenderPart (either RenderEmbeddedObject or RenderIFrame) + // except for HTMLObjectElement and HTMLEmbedElement which may return any + // RenderObject when using fallback content. + RenderPart* renderPart() const; + #if ENABLE(SVG) SVGDocument* getSVGDocument(ExceptionCode&) const; #endif diff --git a/WebCore/html/HTMLHtmlElement.cpp b/WebCore/html/HTMLHtmlElement.cpp index 6205d10..6007805 100644 --- a/WebCore/html/HTMLHtmlElement.cpp +++ b/WebCore/html/HTMLHtmlElement.cpp @@ -50,6 +50,11 @@ PassRefPtr<HTMLHtmlElement> HTMLHtmlElement::create(const QualifiedName& tagName return adoptRef(new HTMLHtmlElement(tagName, document)); } +bool HTMLHtmlElement::isURLAttribute(Attribute* attribute) const +{ + return attribute->name() == manifestAttr; +} + #if ENABLE(OFFLINE_WEB_APPLICATIONS) void HTMLHtmlElement::insertedIntoDocument() { @@ -68,8 +73,8 @@ void HTMLHtmlElement::insertedIntoDocument() // Check the manifest attribute // FIXME: Revisit this when we get a clarification from whatwg on how to handle empty // manifest attributes. As spec'd, and coded here, the system will initiate an update - // passing in the document url as the manifest url. That's not a good thing. - AtomicString manifest = getAttribute(manifestAttr); + // passing in the document URL as the manifest URL. That's not a good thing. + const AtomicString& manifest = getAttribute(manifestAttr); if (manifest.isNull()) documentLoader->applicationCacheHost()->selectCacheWithoutManifest(); else diff --git a/WebCore/html/HTMLHtmlElement.h b/WebCore/html/HTMLHtmlElement.h index e854fb1..47503f7 100644 --- a/WebCore/html/HTMLHtmlElement.h +++ b/WebCore/html/HTMLHtmlElement.h @@ -36,6 +36,8 @@ public: private: HTMLHtmlElement(const QualifiedName&, Document*); + virtual bool isURLAttribute(Attribute*) const; + #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void insertedIntoDocument(); #endif diff --git a/WebCore/html/HTMLHtmlElement.idl b/WebCore/html/HTMLHtmlElement.idl index 42ba861..03c661c 100644 --- a/WebCore/html/HTMLHtmlElement.idl +++ b/WebCore/html/HTMLHtmlElement.idl @@ -21,6 +21,7 @@ module html { interface HTMLHtmlElement : HTMLElement { attribute [Reflect] DOMString version; + attribute [Reflect, URL] DOMString manifest; }; } diff --git a/WebCore/html/HTMLIFrameElement.idl b/WebCore/html/HTMLIFrameElement.idl index b21263e..7f9e25a 100644 --- a/WebCore/html/HTMLIFrameElement.idl +++ b/WebCore/html/HTMLIFrameElement.idl @@ -30,7 +30,7 @@ module html { attribute [Reflect] DOMString name; attribute [Reflect] DOMString sandbox; attribute [Reflect] DOMString scrolling; - attribute [Reflect] DOMString src; + attribute [Reflect, URL] DOMString src; attribute [Reflect] DOMString width; // Introduced in DOM Level 2: diff --git a/WebCore/html/HTMLImageElement.cpp b/WebCore/html/HTMLImageElement.cpp index 82eeab1..b7ece78 100644 --- a/WebCore/html/HTMLImageElement.cpp +++ b/WebCore/html/HTMLImageElement.cpp @@ -183,7 +183,9 @@ RenderObject* HTMLImageElement::createRenderer(RenderArena* arena, RenderStyle* if (style->contentData()) return RenderObject::createObject(this, style); - return new (arena) RenderImage(this); + RenderImage* image = new (arena) RenderImage(this); + image->setImageResource(RenderImageResource::create()); + return image; } void HTMLImageElement::attach() @@ -191,15 +193,16 @@ void HTMLImageElement::attach() HTMLElement::attach(); if (renderer() && renderer()->isImage() && m_imageLoader.haveFiredBeforeLoadEvent()) { - RenderImage* imageObj = toRenderImage(renderer()); - if (imageObj->hasImage()) + RenderImage* renderImage = toRenderImage(renderer()); + RenderImageResource* renderImageResource = renderImage->imageResource(); + if (renderImageResource->hasImage()) return; - imageObj->setCachedImage(m_imageLoader.image()); + renderImageResource->setCachedImage(m_imageLoader.image()); // If we have no image at all because we have no src attribute, set // image height and width for the alt text instead. - if (!m_imageLoader.image() && !imageObj->cachedImage()) - imageObj->setImageSizeForAltText(); + if (!m_imageLoader.image() && !renderImageResource->cachedImage()) + renderImage->setImageSizeForAltText(); } } diff --git a/WebCore/html/HTMLImageElement.idl b/WebCore/html/HTMLImageElement.idl index 1bf8a28..935b721 100644 --- a/WebCore/html/HTMLImageElement.idl +++ b/WebCore/html/HTMLImageElement.idl @@ -30,8 +30,8 @@ module html { attribute long height; attribute [Reflect] long hspace; attribute [Reflect] boolean isMap; - attribute [Reflect,URL] DOMString longDesc; - attribute [Reflect,URL] DOMString src; + attribute [Reflect, URL] DOMString longDesc; + attribute [Reflect, URL] DOMString src; attribute [Reflect] DOMString useMap; attribute [Reflect] long vspace; attribute long width; diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp index f9c5162..c2e5416 100644 --- a/WebCore/html/HTMLInputElement.cpp +++ b/WebCore/html/HTMLInputElement.cpp @@ -111,12 +111,44 @@ static const double weekDefaultStepBase = -259200000.0; // The first day of 1970 static const double msecPerMinute = 60 * 1000; static const double msecPerSecond = 1000; +static const char emailPattern[] = + "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part + "@" + "[a-z0-9-]+(\\.[a-z0-9-]+)+"; // domain part + static bool isNumberCharacter(UChar ch) { return ch == '+' || ch == '-' || ch == '.' || ch == 'e' || ch == 'E' || (ch >= '0' && ch <= '9'); } +static bool isValidColorString(const String& value) +{ + if (value.isEmpty()) + return false; + if (value[0] == '#') { + // We don't accept #rgb and #aarrggbb formats. + if (value.length() != 7) + return false; + } + Color color(value); // This accepts named colors such as "white". + return color.isValid() && !color.hasAlpha(); +} + +static bool isValidEmailAddress(const String& address) +{ + int addressLength = address.length(); + if (!addressLength) + return false; + + DEFINE_STATIC_LOCAL(const RegularExpression, regExp, (emailPattern, TextCaseInsensitive)); + + int matchLength; + int matchOffset = regExp.match(address, 0, &matchLength); + + return !matchOffset && matchLength == addressLength; +} + HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form) : HTMLTextFormControlElement(tagName, document, form) , m_xPos(0) @@ -208,7 +240,71 @@ void HTMLInputElement::updateCheckedRadioButtons() renderer()->theme()->stateChanged(renderer(), CheckedState); } -bool HTMLInputElement::valueMissing() const +bool HTMLInputElement::isValidValue(const String& value) const +{ + // Should not call isValidValue() for the following types because + // we can't set string values for these types. + if (inputType() == CHECKBOX || inputType() == FILE || inputType() == RADIO) { + ASSERT_NOT_REACHED(); + return false; + } + return !typeMismatch(value) + && !stepMismatch(value) + && !rangeUnderflow(value) + && !rangeOverflow(value) + && !tooLong(value, IgnoreDirtyFlag) + && !patternMismatch(value) + && !valueMissing(value); +} + +bool HTMLInputElement::typeMismatch(const String& value) const +{ + switch (inputType()) { + case COLOR: + return !isValidColorString(value); + case NUMBER: + return !parseToDoubleForNumberType(value, 0); + case URL: + return !KURL(KURL(), value).isValid(); + case EMAIL: { + if (!multiple()) + return !isValidEmailAddress(value); + Vector<String> addresses; + value.split(',', addresses); + for (unsigned i = 0; i < addresses.size(); ++i) { + if (!isValidEmailAddress(addresses[i])) + return true; + } + return false; + } + case DATE: + case DATETIME: + case DATETIMELOCAL: + case MONTH: + case TIME: + case WEEK: + return !parseToDateComponents(inputType(), value, 0); + case BUTTON: + case CHECKBOX: + case FILE: + case HIDDEN: + case IMAGE: + case ISINDEX: + case PASSWORD: + case RADIO: + case RANGE: + case RESET: + case SEARCH: + case SUBMIT: + case TELEPHONE: + case TEXT: + return false; + } + ASSERT_NOT_REACHED(); + return false; +} + +bool HTMLInputElement::valueMissing(const String& value) const { if (!isRequiredFormControl() || readOnly() || disabled()) return false; @@ -228,7 +324,7 @@ bool HTMLInputElement::valueMissing() const case TIME: case URL: case WEEK: - return value().isEmpty(); + return value.isEmpty(); case CHECKBOX: return !checked(); case RADIO: @@ -249,12 +345,11 @@ bool HTMLInputElement::valueMissing() const return false; } -bool HTMLInputElement::patternMismatch() const +bool HTMLInputElement::patternMismatch(const String& value) const { if (!isTextType()) return false; const AtomicString& pattern = getAttribute(patternAttr); - String value = this->value(); // Empty values can't be mismatched if (pattern.isEmpty() || value.isEmpty()) return false; @@ -265,7 +360,7 @@ bool HTMLInputElement::patternMismatch() const return matchOffset || matchLength != valueLength; } -bool HTMLInputElement::tooLong() const +bool HTMLInputElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const { // We use isTextType() instead of supportsMaxLength() because of the // 'virtual' overhead. @@ -274,14 +369,16 @@ bool HTMLInputElement::tooLong() const int max = maxLength(); if (max < 0) return false; - // Return false for the default value even if it is longer than maxLength. - bool userEdited = !m_data.value().isNull(); - if (!userEdited) - return false; - return numGraphemeClusters(value()) > static_cast<unsigned>(max); + if (check == CheckDirtyFlag) { + // Return false for the default value even if it is longer than maxLength. + bool userEdited = !m_data.value().isNull(); + if (!userEdited) + return false; + } + return numGraphemeClusters(value) > static_cast<unsigned>(max); } -bool HTMLInputElement::rangeUnderflow() const +bool HTMLInputElement::rangeUnderflow(const String& value) const { const double nan = numeric_limits<double>::quiet_NaN(); switch (inputType()) { @@ -292,11 +389,11 @@ bool HTMLInputElement::rangeUnderflow() const case NUMBER: case TIME: case WEEK: { - double doubleValue = parseToDouble(value(), nan); + double doubleValue = parseToDouble(value, nan); return isfinite(doubleValue) && doubleValue < minimum(); } case RANGE: // Guaranteed by sanitization. - ASSERT(parseToDouble(value(), nan) >= minimum()); + ASSERT(parseToDouble(value, nan) >= minimum()); case BUTTON: case CHECKBOX: case COLOR: @@ -318,7 +415,7 @@ bool HTMLInputElement::rangeUnderflow() const return false; } -bool HTMLInputElement::rangeOverflow() const +bool HTMLInputElement::rangeOverflow(const String& value) const { const double nan = numeric_limits<double>::quiet_NaN(); switch (inputType()) { @@ -329,11 +426,11 @@ bool HTMLInputElement::rangeOverflow() const case NUMBER: case TIME: case WEEK: { - double doubleValue = parseToDouble(value(), nan); + double doubleValue = parseToDouble(value, nan); return isfinite(doubleValue) && doubleValue > maximum(); } case RANGE: // Guaranteed by sanitization. - ASSERT(parseToDouble(value(), nan) <= maximum()); + ASSERT(parseToDouble(value, nan) <= maximum()); case BUTTON: case CHECKBOX: case COLOR: @@ -478,7 +575,7 @@ double HTMLInputElement::stepBase() const return 0.0; } -bool HTMLInputElement::stepMismatch() const +bool HTMLInputElement::stepMismatch(const String& value) const { double step; if (!getAllowedValueStep(&step)) @@ -491,7 +588,7 @@ bool HTMLInputElement::stepMismatch() const return false; case NUMBER: { double doubleValue; - if (!parseToDoubleForNumberType(value(), &doubleValue)) + if (!parseToDoubleForNumberType(value, &doubleValue)) return false; doubleValue = fabs(doubleValue - stepBase()); if (isinf(doubleValue)) @@ -513,7 +610,7 @@ bool HTMLInputElement::stepMismatch() const case TIME: case WEEK: { const double nan = numeric_limits<double>::quiet_NaN(); - double doubleValue = parseToDouble(value(), nan); + double doubleValue = parseToDouble(value, nan); doubleValue = fabs(doubleValue - stepBase()); if (!isfinite(doubleValue)) return false; @@ -1175,8 +1272,11 @@ RenderObject* HTMLInputElement::createRenderer(RenderArena *arena, RenderStyle * return new (arena) RenderFileUploadControl(this); case HIDDEN: break; - case IMAGE: - return new (arena) RenderImage(this); + case IMAGE: { + RenderImage* image = new (arena) RenderImage(this); + image->setImageResource(RenderImageResource::create()); + return image; + } case RANGE: return new (arena) RenderSlider(this); case COLOR: @@ -1215,13 +1315,14 @@ void HTMLInputElement::attach() m_imageLoader = adoptPtr(new HTMLImageLoader(this)); m_imageLoader->updateFromElement(); if (renderer() && m_imageLoader->haveFiredBeforeLoadEvent()) { - RenderImage* imageObj = toRenderImage(renderer()); - imageObj->setCachedImage(m_imageLoader->image()); - + RenderImage* renderImage = toRenderImage(renderer()); + RenderImageResource* renderImageResource = renderImage->imageResource(); + renderImageResource->setCachedImage(m_imageLoader->image()); + // If we have no image at all because we have no src attribute, set // image height and width for the alt text instead. - if (!m_imageLoader->image() && !imageObj->cachedImage()) - imageObj->setImageSizeForAltText(); + if (!m_imageLoader->image() && !renderImageResource->cachedImage()) + renderImage->setImageSizeForAltText(); } } @@ -1501,11 +1602,16 @@ void HTMLInputElement::copyNonAttributeProperties(const Element* source) String HTMLInputElement::value() const { - // The HTML5 spec (as of the 10/24/08 working draft) says that the value attribute isn't applicable to the file upload control - // but we don't want to break existing websites, who may be relying on being able to get the file name as a value. if (inputType() == FILE) { - if (!m_fileList->isEmpty()) - return m_fileList->item(0)->fileName(); + if (!m_fileList->isEmpty()) { + // HTML5 tells us that we're supposed to use this goofy value for + // file input controls. Historically, browsers reveals the real + // file path, but that's a privacy problem. Code on the web + // decided to try to parse the value by looking for backslashes + // (because that's what Windows file paths use). To be compatible + // with that code, we make up a fake path for the file. + return "C:\\fakepath\\" + m_fileList->item(0)->fileName(); + } return String(); } diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h index e6cdda3..657b468 100644 --- a/WebCore/html/HTMLInputElement.h +++ b/WebCore/html/HTMLInputElement.h @@ -75,8 +75,13 @@ public: bool autoComplete() const; // For ValidityState - bool rangeUnderflow() const; - bool rangeOverflow() const; + bool typeMismatch(const String&) const; + // valueMissing() ignores the specified string value for CHECKBOX and RADIO. + bool valueMissing(const String&) const; + bool patternMismatch(const String&) const; + bool tooLong(const String&, NeedsToCheckDirtyFlag) const; + bool rangeUnderflow(const String&) const; + bool rangeOverflow(const String&) const; // Returns the minimum value for type=date, number, or range. Don't call this for other types. double minimum() const; // Returns the maximum value for type=date, number, or range. Don't call this for other types. @@ -86,7 +91,8 @@ public: // Returns false if there is no "allowed value step." bool getAllowedValueStep(double*) const; // For ValidityState. - bool stepMismatch() const; + bool stepMismatch(const String&) const; + // Implementations of HTMLInputElement::stepUp() and stepDown(). void stepUp(int, ExceptionCode&); void stepDown(int, ExceptionCode&); @@ -124,6 +130,9 @@ public: virtual String value() const; virtual void setValue(const String&, bool sendChangeEvent = false); virtual void setValueForUser(const String&); + // Checks if the specified string would be a valid value. + // We should not call this for types with no string value such as CHECKBOX and RADIO. + bool isValidValue(const String&) const; virtual const String& suggestedValue() const; void setSuggestedValue(const String&); @@ -233,10 +242,6 @@ private: virtual bool isTextFormControl() const { return isTextField(); } - virtual bool valueMissing() const; - virtual bool patternMismatch() const; - virtual bool tooLong() const; - virtual bool hasSpinButton() const { return m_type == NUMBER || m_type == DATE || m_type == DATETIME || m_type == DATETIMELOCAL || m_type == MONTH || m_type == TIME || m_type == WEEK; } virtual bool canTriggerImplicitSubmission() const { return isTextField(); } diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl index c726caa..19e4226 100644 --- a/WebCore/html/HTMLInputElement.idl +++ b/WebCore/html/HTMLInputElement.idl @@ -54,7 +54,7 @@ module html { // FIXME: The spec says this should be a long, not an unsigned long. attribute unsigned long size; // Changed string -> long as part of DOM level 2 #endif - attribute [Reflect,URL] DOMString src; + attribute [Reflect, URL] DOMString src; attribute [Reflect] DOMString step; attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2 attribute [Reflect] DOMString useMap; diff --git a/WebCore/html/HTMLLinkElement.cpp b/WebCore/html/HTMLLinkElement.cpp index c778b6f..bc7b9a6 100644 --- a/WebCore/html/HTMLLinkElement.cpp +++ b/WebCore/html/HTMLLinkElement.cpp @@ -103,7 +103,7 @@ void HTMLLinkElement::setDisabledState(bool _disabled) if (!m_sheet && m_disabledState == EnabledViaScript) process(); else - document()->updateStyleSelector(); // Update the style selector. + document()->styleSelectorChanged(DeferRecalcStyle); // Update the style selector. } } @@ -211,7 +211,7 @@ void HTMLLinkElement::process() ResourceHandle::prepareForURL(m_url); #if ENABLE(LINK_PREFETCH) - if (m_relAttribute.m_isLinkPrefetch && m_url.isValid()) + if (m_relAttribute.m_isLinkPrefetch && m_url.isValid() && document()->frame()) document()->docLoader()->requestLinkPrefetch(m_url); #endif @@ -256,7 +256,7 @@ void HTMLLinkElement::process() } else if (m_sheet) { // we no longer contain a stylesheet, e.g. perhaps rel or type was changed m_sheet = 0; - document()->updateStyleSelector(); + document()->styleSelectorChanged(DeferRecalcStyle); } } @@ -274,9 +274,8 @@ void HTMLLinkElement::removedFromDocument() document()->removeStyleSheetCandidateNode(this); - // FIXME: It's terrible to do a synchronous update of the style selector just because a <style> or <link> element got removed. if (document()->renderer()) - document()->updateStyleSelector(); + document()->styleSelectorChanged(DeferRecalcStyle); } void HTMLLinkElement::finishParsingChildren() @@ -289,7 +288,7 @@ void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, { m_sheet = CSSStyleSheet::create(this, href, baseURL, charset); - bool strictParsing = !document()->inCompatMode(); + bool strictParsing = !document()->inQuirksMode(); bool enforceMIMEType = strictParsing; bool crossOriginCSS = false; bool validMIMEType = false; @@ -297,7 +296,7 @@ void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, // Check to see if we should enforce the MIME type of the CSS resource in strict mode. // Running in iWeb 2 is one example of where we don't want to - <rdar://problem/6099748> - if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInStrictMode()) + if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInNoQuirksMode()) enforceMIMEType = false; #if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) diff --git a/WebCore/html/HTMLLinkElement.idl b/WebCore/html/HTMLLinkElement.idl index dfec24b..734e8cc 100644 --- a/WebCore/html/HTMLLinkElement.idl +++ b/WebCore/html/HTMLLinkElement.idl @@ -23,7 +23,7 @@ module html { interface HTMLLinkElement : HTMLElement { attribute [Reflect] boolean disabled; attribute [Reflect] DOMString charset; - attribute [Reflect,URL] DOMString href; + attribute [Reflect, URL] DOMString href; attribute [Reflect] DOMString hreflang; attribute [Reflect] DOMString media; attribute [Reflect] DOMString rel; diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp index 751735d..bc7960c 100644 --- a/WebCore/html/HTMLMediaElement.cpp +++ b/WebCore/html/HTMLMediaElement.cpp @@ -37,7 +37,6 @@ #include "ClientRect.h" #include "ClientRectList.h" #include "ContentType.h" -#include "DocLoader.h" #include "Event.h" #include "EventNames.h" #include "ExceptionCode.h" @@ -112,7 +111,8 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc) , m_processingMediaPlayerCallback(0) , m_playing(false) , m_isWaitingUntilMediaCanStart(false) - , m_delayingTheLoadEvent(false) + , m_shouldDelayLoadEvent(false) + , m_isWaitingToDecrementLoadEventDelayCount(false) , m_haveFiredLoadedData(false) , m_inActiveDocument(true) , m_autoplaying(true) @@ -140,6 +140,7 @@ HTMLMediaElement::~HTMLMediaElement() { if (m_isWaitingUntilMediaCanStart) document()->removeMediaCanStartListener(this); + setShouldDelayLoadEvent(false); document()->unregisterForDocumentActivationCallbacks(this); document()->unregisterForMediaVolumeCallbacks(this); } @@ -148,6 +149,7 @@ void HTMLMediaElement::willMoveToNewOwnerDocument() { if (m_isWaitingUntilMediaCanStart) document()->removeMediaCanStartListener(this); + setShouldDelayLoadEvent(false); document()->unregisterForDocumentActivationCallbacks(this); document()->unregisterForMediaVolumeCallbacks(this); HTMLElement::willMoveToNewOwnerDocument(); @@ -157,6 +159,8 @@ void HTMLMediaElement::didMoveToNewOwnerDocument() { if (m_isWaitingUntilMediaCanStart) document()->addMediaCanStartListener(this); + if (m_readyState < HAVE_CURRENT_DATA) + setShouldDelayLoadEvent(true); document()->registerForDocumentActivationCallbacks(this); document()->registerForMediaVolumeCallbacks(this); HTMLElement::didMoveToNewOwnerDocument(); @@ -368,6 +372,15 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName) void HTMLMediaElement::asyncEventTimerFired(Timer<HTMLMediaElement>*) { + // If we are waiting to release our delay on the load event, do that first and post + // the pending events on the next go around. + if (m_isWaitingToDecrementLoadEventDelayCount) { + setShouldDelayLoadEvent(false); + if (!m_asyncEventTimer.isActive()) + m_asyncEventTimer.startOneShot(0); + return; + } + Vector<RefPtr<Event> > pendingEvents; ExceptionCode ec = 0; @@ -541,6 +554,11 @@ void HTMLMediaElement::prepareForLoad() m_playedTimeRanges = TimeRanges::create(); m_lastSeekTime = 0; m_closedCaptionsVisible = false; + + // The spec doesn't say to block the load event until we actually run the asynchronous section + // algorithm, but do it now because we won't start that until after the timer fires and the + // event may have already fired by then. + setShouldDelayLoadEvent(true); } void HTMLMediaElement::loadInternal() @@ -574,18 +592,19 @@ void HTMLMediaElement::selectMediaResource() if (!node) { m_loadState = WaitingForSource; + setShouldDelayLoadEvent(false); // ... set the networkState to NETWORK_EMPTY, and abort these steps m_networkState = NETWORK_EMPTY; - ASSERT(!m_delayingTheLoadEvent); return; } mode = children; } - // 4 - m_delayingTheLoadEvent = true; + // 4 - Set the media element's delaying-the-load-event flag to true (this delays the load event), + // and set its networkState to NETWORK_LOADING. + setShouldDelayLoadEvent(true); m_networkState = NETWORK_LOADING; // 5 @@ -715,7 +734,7 @@ void HTMLMediaElement::waitForSourceChange() m_networkState = NETWORK_NO_SOURCE; // 6.18 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. - m_delayingTheLoadEvent = false; + setShouldDelayLoadEvent(false); } void HTMLMediaElement::noneSupported() @@ -738,7 +757,7 @@ void HTMLMediaElement::noneSupported() scheduleEvent(eventNames().errorEvent); // 8 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. - m_delayingTheLoadEvent = false; + setShouldDelayLoadEvent(false); // 9 -Abort these steps. Until the load() method is invoked, the element won't attempt to load another resource. @@ -758,8 +777,7 @@ void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err) // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. m_error = err; - // 3 - Queue a task to fire a progress event called error at the media element, in - // the context of the fetching process started by this instance of this algorithm. + // 3 - Queue a task to fire a simple event named error at the media element. scheduleEvent(eventNames().errorEvent); // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value and queue a @@ -768,7 +786,7 @@ void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err) scheduleEvent(eventNames().emptiedEvent); // 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. - m_delayingTheLoadEvent = false; + setShouldDelayLoadEvent(false); // 6 - Abort the overall resource selection algorithm. m_currentSourceNode = 0; @@ -915,21 +933,16 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) scheduleEvent(eventNames().loadedmetadataEvent); if (renderer()) renderer()->updateFromElement(); - m_delayingTheLoadEvent = false; m_player->seek(0); } bool shouldUpdateDisplayState = false; - // 4.8.10.7 says loadeddata is sent only when the new state *is* HAVE_CURRENT_DATA: "If the - // previous ready state was HAVE_METADATA and the new ready state is HAVE_CURRENT_DATA", - // but the event table at the end of the spec says it is sent when: "readyState newly - // increased to HAVE_CURRENT_DATA or greater for the first time" - // We go with the later because it seems useful to count on getting this event if (m_readyState >= HAVE_CURRENT_DATA && oldState < HAVE_CURRENT_DATA && !m_haveFiredLoadedData) { m_haveFiredLoadedData = true; shouldUpdateDisplayState = true; scheduleEvent(eventNames().loadeddataEvent); + setShouldDelayLoadEvent(false); } bool isPotentiallyPlaying = potentiallyPlaying(); @@ -1818,13 +1831,12 @@ void HTMLMediaElement::userCancelledLoad() // 2 - Set the error attribute to a new MediaError object whose code attribute is set to MEDIA_ERR_ABORTED. m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED); - // 3 - Queue a task to fire a progress event called abort at the media element, in the context - // of the fetching process started by this instance of this algorithm. + // 3 - Queue a task to fire a simple event named error at the media element. scheduleEvent(eventNames().abortEvent); - // 5 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the - // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a - // simple event called emptied at the element. Otherwise, set set the element's networkState + // 4 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the + // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a + // simple event named emptied at the element. Otherwise, set the element's networkState // attribute to the NETWORK_IDLE value. if (m_readyState == HAVE_NOTHING) { m_networkState = NETWORK_EMPTY; @@ -1833,10 +1845,10 @@ void HTMLMediaElement::userCancelledLoad() else m_networkState = NETWORK_IDLE; - // 6 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. - m_delayingTheLoadEvent = false; + // 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event. + setShouldDelayLoadEvent(false); - // 7 - Abort the overall resource selection algorithm. + // 6 - Abort the overall resource selection algorithm. m_currentSourceNode = 0; // Reset m_readyState since m_player is gone. @@ -2087,6 +2099,33 @@ bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const return attribute->name() == srcAttr; } +void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay) +{ + if (m_shouldDelayLoadEvent == shouldDelay) + return; + + // Don't decrement the load event delay if we are in the middle of a callback from + // the media engine. The load event is sent synchronously and may trigger a script that + // causes the document to be come inactive and that will clear the media engine, causing + // the return to be a rough one. + if (!shouldDelay && processingMediaPlayerCallback()) { + m_isWaitingToDecrementLoadEventDelayCount = true; + + // Instead of creating yet-another-timer, reuse the async event timer which is always + // used as a one-shot. + if (!m_asyncEventTimer.isActive()) + m_asyncEventTimer.startOneShot(0); + return; + } + + m_shouldDelayLoadEvent = shouldDelay; + m_isWaitingToDecrementLoadEventDelayCount = false; + if (shouldDelay) + document()->incrementLoadEventDelayCount(); + else + document()->decrementLoadEventDelayCount(); +} + } #endif diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h index 4706178..3895fe3 100644 --- a/WebCore/html/HTMLMediaElement.h +++ b/WebCore/html/HTMLMediaElement.h @@ -280,6 +280,8 @@ private: virtual void mediaCanStart(); + void setShouldDelayLoadEvent(bool); + // Restrictions to change default behaviors. This is effectively a compile time choice at the moment // because there are no accessor functions. enum BehaviorRestrictions { @@ -339,7 +341,8 @@ private: bool m_playing : 1; bool m_isWaitingUntilMediaCanStart : 1; - bool m_delayingTheLoadEvent : 1; + bool m_shouldDelayLoadEvent : 1; + bool m_isWaitingToDecrementLoadEventDelayCount : 1; bool m_haveFiredLoadedData : 1; bool m_inActiveDocument : 1; bool m_autoplaying : 1; diff --git a/WebCore/html/HTMLMediaElement.idl b/WebCore/html/HTMLMediaElement.idl index 12a1464..d6ba79d 100644 --- a/WebCore/html/HTMLMediaElement.idl +++ b/WebCore/html/HTMLMediaElement.idl @@ -30,7 +30,7 @@ interface [Conditional=VIDEO] HTMLMediaElement : HTMLElement { readonly attribute MediaError error; // network state - attribute [Reflect,URL] DOMString src; + attribute [Reflect, URL] DOMString src; readonly attribute DOMString currentSrc; const unsigned short NETWORK_EMPTY = 0; diff --git a/WebCore/html/HTMLModElement.cpp b/WebCore/html/HTMLModElement.cpp index ab161d9..2d409b0 100644 --- a/WebCore/html/HTMLModElement.cpp +++ b/WebCore/html/HTMLModElement.cpp @@ -39,4 +39,9 @@ PassRefPtr<HTMLModElement> HTMLModElement::create(const QualifiedName& tagName, return adoptRef(new HTMLModElement(tagName, document)); } +bool HTMLModElement::isURLAttribute(Attribute* attribute) const +{ + return attribute->name() == citeAttr; +} + } diff --git a/WebCore/html/HTMLModElement.h b/WebCore/html/HTMLModElement.h index 2b09e21..cdb6dce 100644 --- a/WebCore/html/HTMLModElement.h +++ b/WebCore/html/HTMLModElement.h @@ -34,6 +34,8 @@ public: private: HTMLModElement(const QualifiedName&, Document*); + + virtual bool isURLAttribute(Attribute*) const; }; } //namespace diff --git a/WebCore/html/HTMLModElement.idl b/WebCore/html/HTMLModElement.idl index e9e996d..ad8281c 100644 --- a/WebCore/html/HTMLModElement.idl +++ b/WebCore/html/HTMLModElement.idl @@ -20,7 +20,7 @@ module html { interface HTMLModElement : HTMLElement { - attribute [Reflect] DOMString cite; + attribute [Reflect, URL] DOMString cite; attribute [Reflect] DOMString dateTime; }; diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp index de1ed91..e8884ef 100644 --- a/WebCore/html/HTMLObjectElement.cpp +++ b/WebCore/html/HTMLObjectElement.cpp @@ -46,9 +46,8 @@ namespace WebCore { using namespace HTMLNames; inline HTMLObjectElement::HTMLObjectElement(const QualifiedName& tagName, Document* document, bool createdByParser) - : HTMLPlugInImageElement(tagName, document) + : HTMLPlugInImageElement(tagName, document, createdByParser) , m_docNamedItem(true) - , m_needWidgetUpdate(!createdByParser) , m_useFallbackContent(false) { ASSERT(hasTagName(objectTag)); @@ -62,37 +61,34 @@ PassRefPtr<HTMLObjectElement> HTMLObjectElement::create(const QualifiedName& tag RenderWidget* HTMLObjectElement::renderWidgetForJSBindings() const { document()->updateLayoutIgnorePendingStylesheets(); - if (!renderer() || !renderer()->isWidget()) - return 0; - return toRenderWidget(renderer()); + return renderPart(); // This will return 0 if the renderer is not a RenderPart. } void HTMLObjectElement::parseMappedAttribute(Attribute* attr) { - String val = attr->value(); - size_t pos; if (attr->name() == typeAttr) { - m_serviceType = val.lower(); - pos = m_serviceType.find(";"); + m_serviceType = attr->value().lower(); + size_t pos = m_serviceType.find(";"); if (pos != notFound) - m_serviceType = m_serviceType.left(pos); + m_serviceType = m_serviceType.left(pos); if (renderer()) - m_needWidgetUpdate = true; + setNeedsWidgetUpdate(true); if (!isImageType() && m_imageLoader) - m_imageLoader.clear(); + m_imageLoader.clear(); } else if (attr->name() == dataAttr) { - m_url = deprecatedParseURL(val); - if (renderer()) - m_needWidgetUpdate = true; - if (renderer() && isImageType()) { - if (!m_imageLoader) - m_imageLoader = adoptPtr(new HTMLImageLoader(this)); - m_imageLoader->updateFromElementIgnoringPreviousError(); + m_url = deprecatedParseURL(attr->value()); + if (renderer()) { + setNeedsWidgetUpdate(true); + if (isImageType()) { + if (!m_imageLoader) + m_imageLoader = adoptPtr(new HTMLImageLoader(this)); + m_imageLoader->updateFromElementIgnoringPreviousError(); + } } } else if (attr->name() == classidAttr) { - m_classId = val; + m_classId = attr->value(); if (renderer()) - m_needWidgetUpdate = true; + setNeedsWidgetUpdate(true); } else if (attr->name() == onloadAttr) setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr)); else if (attr->name() == onbeforeloadAttr) @@ -114,13 +110,14 @@ void HTMLObjectElement::parseMappedAttribute(Attribute* attr) } m_id = newId; // also call superclass - HTMLPlugInElement::parseMappedAttribute(attr); + HTMLPlugInImageElement::parseMappedAttribute(attr); } else - HTMLPlugInElement::parseMappedAttribute(attr); + HTMLPlugInImageElement::parseMappedAttribute(attr); } bool HTMLObjectElement::rendererIsNeeded(RenderStyle* style) { + // FIXME: This check should not be needed, detached documents never render! Frame* frame = document()->frame(); if (!frame) return false; @@ -129,57 +126,7 @@ bool HTMLObjectElement::rendererIsNeeded(RenderStyle* style) // Gears expects the plugin to be instantiated even if display:none is set // for the object element. bool isGearsPlugin = equalIgnoringCase(getAttribute(typeAttr), "application/x-googlegears"); - return isGearsPlugin || HTMLPlugInElement::rendererIsNeeded(style); -} - -RenderObject *HTMLObjectElement::createRenderer(RenderArena* arena, RenderStyle* style) -{ - if (m_useFallbackContent) - return RenderObject::createObject(this, style); - if (isImageType()) - return new (arena) RenderImage(this); - return new (arena) RenderEmbeddedObject(this); -} - -void HTMLObjectElement::attach() -{ - bool isImage = isImageType(); - - if (!isImage) - queuePostAttachCallback(&HTMLPlugInElement::updateWidgetCallback, this); - - HTMLPlugInElement::attach(); - - if (isImage && renderer() && !m_useFallbackContent) { - if (!m_imageLoader) - m_imageLoader = adoptPtr(new HTMLImageLoader(this)); - m_imageLoader->updateFromElement(); - } -} - -void HTMLObjectElement::updateWidget() -{ - document()->updateStyleIfNeeded(); - if (m_needWidgetUpdate && renderer() && !m_useFallbackContent && !isImageType()) - toRenderEmbeddedObject(renderer())->updateWidget(true); -} - -void HTMLObjectElement::finishParsingChildren() -{ - HTMLPlugInElement::finishParsingChildren(); - if (!m_useFallbackContent) { - m_needWidgetUpdate = true; - if (inDocument()) - setNeedsStyleRecalc(); - } -} - -void HTMLObjectElement::detach() -{ - if (attached() && renderer() && !m_useFallbackContent) - // Update the widget the next time we attach (detaching destroys the plugin). - m_needWidgetUpdate = true; - HTMLPlugInElement::detach(); + return isGearsPlugin || HTMLPlugInImageElement::rendererIsNeeded(style); } void HTMLObjectElement::insertedIntoDocument() @@ -190,7 +137,7 @@ void HTMLObjectElement::insertedIntoDocument() document->addExtraNamedItem(m_id); } - HTMLPlugInElement::insertedIntoDocument(); + HTMLPlugInImageElement::insertedIntoDocument(); } void HTMLObjectElement::removedFromDocument() @@ -201,26 +148,17 @@ void HTMLObjectElement::removedFromDocument() document->removeExtraNamedItem(m_id); } - HTMLPlugInElement::removedFromDocument(); -} - -void HTMLObjectElement::recalcStyle(StyleChange ch) -{ - if (!m_useFallbackContent && m_needWidgetUpdate && renderer() && !isImageType()) { - detach(); - attach(); - } - HTMLPlugInElement::recalcStyle(ch); + HTMLPlugInImageElement::removedFromDocument(); } void HTMLObjectElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) { updateDocNamedItem(); - if (inDocument() && !m_useFallbackContent) { - m_needWidgetUpdate = true; + if (inDocument() && !useFallbackContent()) { + setNeedsWidgetUpdate(true); setNeedsStyleRecalc(); } - HTMLPlugInElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); + HTMLPlugInImageElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); } bool HTMLObjectElement::isURLAttribute(Attribute *attr) const @@ -235,7 +173,7 @@ const QualifiedName& HTMLObjectElement::imageSourceAttributeName() const void HTMLObjectElement::renderFallbackContent() { - if (m_useFallbackContent) + if (useFallbackContent()) return; if (!inDocument()) @@ -253,10 +191,8 @@ void HTMLObjectElement::renderFallbackContent() } } - // Mark ourselves as using the fallback content. m_useFallbackContent = true; - // Now do a detach and reattach. // FIXME: Style gets recalculated which is suboptimal. detach(); attach(); diff --git a/WebCore/html/HTMLObjectElement.h b/WebCore/html/HTMLObjectElement.h index 8dc59be..9fafae9 100644 --- a/WebCore/html/HTMLObjectElement.h +++ b/WebCore/html/HTMLObjectElement.h @@ -31,8 +31,6 @@ class HTMLObjectElement : public HTMLPlugInImageElement { public: static PassRefPtr<HTMLObjectElement> create(const QualifiedName&, Document*, bool createdByParser); - void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; } - void renderFallbackContent(); bool isDocNamedItem() const { return m_docNamedItem; } @@ -41,28 +39,22 @@ public: bool containsJavaApplet() const; + virtual bool useFallbackContent() const { return m_useFallbackContent; } + private: HTMLObjectElement(const QualifiedName&, Document*, bool createdByParser); virtual void parseMappedAttribute(Attribute*); - virtual void attach(); - virtual bool canLazyAttach() { return false; } virtual bool rendererIsNeeded(RenderStyle*); - virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); - virtual void finishParsingChildren(); - virtual void detach(); virtual void insertedIntoDocument(); virtual void removedFromDocument(); - virtual void recalcStyle(StyleChange); virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); virtual bool isURLAttribute(Attribute*) const; virtual const QualifiedName& imageSourceAttributeName() const; - virtual void updateWidget(); - virtual RenderWidget* renderWidgetForJSBindings() const; virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; @@ -72,7 +64,6 @@ private: AtomicString m_id; String m_classId; bool m_docNamedItem : 1; - bool m_needWidgetUpdate : 1; bool m_useFallbackContent : 1; }; diff --git a/WebCore/html/HTMLObjectElement.idl b/WebCore/html/HTMLObjectElement.idl index e4d85b3..82801ae 100644 --- a/WebCore/html/HTMLObjectElement.idl +++ b/WebCore/html/HTMLObjectElement.idl @@ -32,7 +32,7 @@ module html { attribute [Reflect] DOMString border; attribute [Reflect] DOMString codeBase; attribute [Reflect] DOMString codeType; - attribute [Reflect,URL] DOMString data; + attribute [Reflect, URL] DOMString data; attribute [Reflect] boolean declare; attribute [Reflect] DOMString height; attribute [Reflect] long hspace; diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp index 9f479fb..88642f7 100644 --- a/WebCore/html/HTMLPlugInElement.cpp +++ b/WebCore/html/HTMLPlugInElement.cpp @@ -177,6 +177,7 @@ NPObject* HTMLPlugInElement::getNPObject() #endif /* ENABLE(NETSCAPE_PLUGIN_API) */ +<<<<<<< HEAD void HTMLPlugInElement::updateWidgetCallback(Node* n) { static_cast<HTMLPlugInElement*>(n)->updateWidget(); @@ -189,4 +190,6 @@ bool HTMLPlugInElement::supportsFocus() const } #endif +======= +>>>>>>> webkit.org at r66666 } diff --git a/WebCore/html/HTMLPlugInElement.h b/WebCore/html/HTMLPlugInElement.h index eadf38a..5467177 100644 --- a/WebCore/html/HTMLPlugInElement.h +++ b/WebCore/html/HTMLPlugInElement.h @@ -32,6 +32,7 @@ struct NPObject; namespace WebCore { +class RenderEmbeddedObject; class RenderWidget; class Widget; @@ -55,8 +56,6 @@ protected: virtual void detach(); - static void updateWidgetCallback(Node*); - virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const; virtual void parseMappedAttribute(Attribute*); @@ -71,8 +70,6 @@ private: virtual RenderWidget* renderWidgetForJSBindings() const = 0; - virtual void updateWidget() { } - protected: AtomicString m_name; diff --git a/WebCore/html/HTMLPlugInImageElement.cpp b/WebCore/html/HTMLPlugInImageElement.cpp index e2898a2..75407dd 100644 --- a/WebCore/html/HTMLPlugInImageElement.cpp +++ b/WebCore/html/HTMLPlugInImageElement.cpp @@ -26,14 +26,30 @@ #include "FrameLoaderClient.h" #include "HTMLImageLoader.h" #include "Image.h" +#include "RenderEmbeddedObject.h" +#include "RenderImage.h" namespace WebCore { -HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document) +HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser) : HTMLPlugInElement(tagName, document) + // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay + // widget updates until after all children are parsed. For HTMLEmbedElement + // this delay is unnecessary, but it is simpler to make both classes share + // the same codepath in this class. + , m_needsWidgetUpdate(!createdByParser) { } +RenderEmbeddedObject* HTMLPlugInImageElement::renderEmbeddedObject() const +{ + // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers + // when using fallback content. + if (!renderer() || !renderer()->isEmbeddedObject()) + return 0; + return toRenderEmbeddedObject(renderer()); +} + bool HTMLPlugInImageElement::isImageType() { if (m_serviceType.isEmpty() && protocolIs(m_url, "data")) @@ -47,6 +63,76 @@ bool HTMLPlugInImageElement::isImageType() return Image::supportsType(m_serviceType); } +RenderObject* HTMLPlugInImageElement::createRenderer(RenderArena* arena, RenderStyle* style) +{ + // Fallback content breaks the DOM->Renderer class relationship of this + // class and all superclasses because createObject won't necessarily + // return a RenderEmbeddedObject, RenderPart or even RenderWidget. + if (useFallbackContent()) + return RenderObject::createObject(this, style); + if (isImageType()) { + RenderImage* image = new (arena) RenderImage(this); + image->setImageResource(RenderImageResource::create()); + return image; + } + return new (arena) RenderEmbeddedObject(this); +} + +void HTMLPlugInImageElement::recalcStyle(StyleChange ch) +{ + // FIXME: Why is this necessary? Manual re-attach is almost always wrong. + if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageType()) { + detach(); + attach(); + } + HTMLPlugInElement::recalcStyle(ch); +} + +void HTMLPlugInImageElement::attach() +{ + bool isImage = isImageType(); + + if (!isImage) + queuePostAttachCallback(&HTMLPlugInImageElement::updateWidgetCallback, this); + + HTMLPlugInElement::attach(); + + if (isImage && renderer() && !useFallbackContent()) { + if (!m_imageLoader) + m_imageLoader = adoptPtr(new HTMLImageLoader(this)); + m_imageLoader->updateFromElement(); + } +} + +void HTMLPlugInImageElement::detach() +{ + // FIXME: Because of the insanity that is HTMLObjectElement::recalcStyle, + // we can end up detaching during an attach() call, before we even have a + // renderer. In that case, don't mark the widget for update. + if (attached() && renderer() && !useFallbackContent()) + // Update the widget the next time we attach (detaching destroys the plugin). + setNeedsWidgetUpdate(true); + HTMLPlugInElement::detach(); +} + +void HTMLPlugInImageElement::updateWidget() +{ + document()->updateStyleIfNeeded(); + if (needsWidgetUpdate() && renderEmbeddedObject() && !useFallbackContent() && !isImageType()) + renderEmbeddedObject()->updateWidget(true); +} + +void HTMLPlugInImageElement::finishParsingChildren() +{ + HTMLPlugInElement::finishParsingChildren(); + if (useFallbackContent()) + return; + + setNeedsWidgetUpdate(true); + if (inDocument()) + setNeedsStyleRecalc(); +} + void HTMLPlugInImageElement::willMoveToNewOwnerDocument() { if (m_imageLoader) @@ -54,4 +140,9 @@ void HTMLPlugInImageElement::willMoveToNewOwnerDocument() HTMLPlugInElement::willMoveToNewOwnerDocument(); } +void HTMLPlugInImageElement::updateWidgetCallback(Node* n) +{ + static_cast<HTMLPlugInImageElement*>(n)->updateWidget(); +} + } // namespace WebCore diff --git a/WebCore/html/HTMLPlugInImageElement.h b/WebCore/html/HTMLPlugInImageElement.h index 6f8d305..65c5f37 100644 --- a/WebCore/html/HTMLPlugInImageElement.h +++ b/WebCore/html/HTMLPlugInImageElement.h @@ -28,22 +28,42 @@ namespace WebCore { class HTMLImageLoader; +// Base class for HTMLObjectElement and HTMLEmbedElement class HTMLPlugInImageElement : public HTMLPlugInElement { public: const String& serviceType() const { return m_serviceType; } const String& url() const { return m_url; } + bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } + void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; } + + RenderEmbeddedObject* renderEmbeddedObject() const; + protected: - HTMLPlugInImageElement(const QualifiedName& tagName, Document*); + HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser); bool isImageType(); OwnPtr<HTMLImageLoader> m_imageLoader; String m_serviceType; String m_url; + + static void updateWidgetCallback(Node*); + virtual void attach(); + virtual void detach(); private: + virtual bool canLazyAttach() { return false; } + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); + virtual void recalcStyle(StyleChange); + + virtual void finishParsingChildren(); virtual void willMoveToNewOwnerDocument(); + + void updateWidget(); + virtual bool useFallbackContent() const { return false; } + + bool m_needsWidgetUpdate; }; } // namespace WebCore diff --git a/WebCore/html/HTMLQuoteElement.cpp b/WebCore/html/HTMLQuoteElement.cpp index 2a2440a..a58a504 100644 --- a/WebCore/html/HTMLQuoteElement.cpp +++ b/WebCore/html/HTMLQuoteElement.cpp @@ -48,4 +48,9 @@ void HTMLQuoteElement::insertedIntoDocument() HTMLElement::insertedIntoDocument(); } +bool HTMLQuoteElement::isURLAttribute(Attribute* attribute) const +{ + return attribute->name() == citeAttr; +} + } diff --git a/WebCore/html/HTMLQuoteElement.h b/WebCore/html/HTMLQuoteElement.h index 225dde8..d378de4 100644 --- a/WebCore/html/HTMLQuoteElement.h +++ b/WebCore/html/HTMLQuoteElement.h @@ -37,6 +37,7 @@ private: HTMLQuoteElement(const QualifiedName&, Document*); virtual void insertedIntoDocument(); + virtual bool isURLAttribute(Attribute*) const; }; } //namespace diff --git a/WebCore/html/HTMLQuoteElement.idl b/WebCore/html/HTMLQuoteElement.idl index a4e6005..fa1bcdb 100644 --- a/WebCore/html/HTMLQuoteElement.idl +++ b/WebCore/html/HTMLQuoteElement.idl @@ -20,6 +20,6 @@ module html { interface HTMLQuoteElement : HTMLElement { - attribute [Reflect] DOMString cite; + attribute [Reflect, URL] DOMString cite; }; } diff --git a/WebCore/html/HTMLScriptElement.idl b/WebCore/html/HTMLScriptElement.idl index 6b7c86d..20b7331 100644 --- a/WebCore/html/HTMLScriptElement.idl +++ b/WebCore/html/HTMLScriptElement.idl @@ -26,7 +26,7 @@ module html { attribute [Reflect] DOMString charset; attribute [Reflect] boolean async; attribute [Reflect] boolean defer; - attribute [Reflect,URL] DOMString src; + attribute [Reflect, URL] DOMString src; attribute [Reflect] DOMString type; }; } diff --git a/WebCore/html/HTMLSourceElement.idl b/WebCore/html/HTMLSourceElement.idl index 61dc4d0..dbd6d6a 100644 --- a/WebCore/html/HTMLSourceElement.idl +++ b/WebCore/html/HTMLSourceElement.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,7 +25,7 @@ module html { interface [Conditional=VIDEO] HTMLSourceElement : HTMLElement { - attribute [Reflect,URL] DOMString src; + attribute [Reflect, URL] DOMString src; attribute DOMString type; attribute DOMString media; }; diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in index f844fa8..209636d 100644 --- a/WebCore/html/HTMLTagNames.in +++ b/WebCore/html/HTMLTagNames.in @@ -43,7 +43,7 @@ div dl interfaceName=HTMLDListElement dt interfaceName=HTMLElement em interfaceName=HTMLElement -embed +embed constructorNeedsCreatedByParser fieldset interfaceName=HTMLFieldSetElement, constructorNeedsFormElement figcaption interfaceName=HTMLElement figure interfaceName=HTMLElement diff --git a/WebCore/html/HTMLTextAreaElement.cpp b/WebCore/html/HTMLTextAreaElement.cpp index b528c19..3e34844 100644 --- a/WebCore/html/HTMLTextAreaElement.cpp +++ b/WebCore/html/HTMLTextAreaElement.cpp @@ -390,16 +390,21 @@ void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionCode& ec) setAttribute(maxlengthAttr, String::number(newValue)); } -bool HTMLTextAreaElement::tooLong() const +bool HTMLTextAreaElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const { // Return false for the default value even if it is longer than maxLength. - if (!m_isDirty) + if (check == CheckDirtyFlag && !m_isDirty) return false; int max = maxLength(); if (max < 0) return false; - return numGraphemeClusters(value()) > static_cast<unsigned>(max); + return numGraphemeClusters(value) > static_cast<unsigned>(max); +} + +bool HTMLTextAreaElement::isValidValue(const String& candidate) const +{ + return !valueMissing(candidate) && !tooLong(candidate, IgnoreDirtyFlag); } void HTMLTextAreaElement::accessKeyAction(bool) diff --git a/WebCore/html/HTMLTextAreaElement.h b/WebCore/html/HTMLTextAreaElement.h index bb0039e..28d0b61 100644 --- a/WebCore/html/HTMLTextAreaElement.h +++ b/WebCore/html/HTMLTextAreaElement.h @@ -47,7 +47,9 @@ public: int textLength() const { return value().length(); } int maxLength() const; void setMaxLength(int, ExceptionCode&); - virtual bool tooLong() const; + bool valueMissing(const String& value) const { return isRequiredFormControl() && !disabled() && !readOnly() && value.isEmpty(); } + bool tooLong(const String&, NeedsToCheckDirtyFlag) const; + bool isValidValue(const String&) const; void rendererWillBeDestroyed(); @@ -85,8 +87,6 @@ private: virtual bool isTextFormControl() const { return true; } - virtual bool valueMissing() const { return isRequiredFormControl() && !disabled() && !readOnly() && value().isEmpty(); } - virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); virtual void parseMappedAttribute(Attribute*); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); diff --git a/WebCore/html/HTMLVideoElement.cpp b/WebCore/html/HTMLVideoElement.cpp index cd9c7ec..219bb85 100644 --- a/WebCore/html/HTMLVideoElement.cpp +++ b/WebCore/html/HTMLVideoElement.cpp @@ -78,10 +78,8 @@ void HTMLVideoElement::attach() if (!m_imageLoader) m_imageLoader = adoptPtr(new HTMLImageLoader(this)); m_imageLoader->updateFromElement(); - if (renderer()) { - RenderImage* imageRenderer = toRenderImage(renderer()); - imageRenderer->setCachedImage(m_imageLoader->image()); - } + if (renderer()) + toRenderImage(renderer())->imageResource()->setCachedImage(m_imageLoader->image()); } #endif } @@ -111,7 +109,7 @@ void HTMLVideoElement::parseMappedAttribute(Attribute* attr) if (m_imageLoader) m_imageLoader.clear(); if (renderer()) - toRenderImage(renderer())->setCachedImage(0); + toRenderImage(renderer())->imageResource()->setCachedImage(0); } #endif } else if (attrName == widthAttr) diff --git a/WebCore/html/HTMLVideoElement.idl b/WebCore/html/HTMLVideoElement.idl index ca5db5e..770e4b2 100644 --- a/WebCore/html/HTMLVideoElement.idl +++ b/WebCore/html/HTMLVideoElement.idl @@ -32,7 +32,7 @@ module html { attribute [Reflect] unsigned long height; readonly attribute unsigned long videoWidth; readonly attribute unsigned long videoHeight; - attribute [Reflect,URL] DOMString poster; + attribute [Reflect, URL] DOMString poster; readonly attribute boolean webkitSupportsFullscreen; readonly attribute boolean webkitDisplayingFullscreen; diff --git a/WebCore/html/HTMLViewSourceDocument.cpp b/WebCore/html/HTMLViewSourceDocument.cpp index b307ea2..3299b27 100644 --- a/WebCore/html/HTMLViewSourceDocument.cpp +++ b/WebCore/html/HTMLViewSourceDocument.cpp @@ -28,6 +28,7 @@ #include "Attribute.h" #include "DOMImplementation.h" #include "HTMLAnchorElement.h" +#include "HTMLBaseElement.h" #include "HTMLBodyElement.h" #include "HTMLDivElement.h" #include "HTMLHtmlElement.h" @@ -51,6 +52,8 @@ HTMLViewSourceDocument::HTMLViewSourceDocument(Frame* frame, const KURL& url, co , m_type(mimeType) { setUsesBeforeAfterRules(true); + setCompatibilityMode(QuirksMode); + lockCompatibilityMode(); } PassRefPtr<DocumentParser> HTMLViewSourceDocument::createParser() @@ -138,8 +141,7 @@ void HTMLViewSourceDocument::processDoctypeToken(const String& source, HTMLToken void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& token) { - String classNameStr = "webkit-html-tag"; - m_current = addSpanWithClassName(classNameStr); + m_current = addSpanWithClassName("webkit-html-tag"); AtomicString tagName(token.name().data(), token.name().size()); @@ -159,11 +161,8 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to index = addRange(source, index, iter->m_nameRange.m_start - token.startIndex(), ""); index = addRange(source, index, iter->m_nameRange.m_end - token.startIndex(), "webkit-html-attribute-name"); - if (tagName == baseTag && name == hrefAttr) { - // Catch the href attribute in the base element. It will be used - // for rendering anchors created by addLink() below. - setBaseElementURL(KURL(url(), value)); - } + if (tagName == baseTag && name == hrefAttr) + m_current = addBase(value); index = addRange(source, index, iter->m_valueRange.m_start - token.startIndex(), ""); @@ -187,7 +186,7 @@ void HTMLViewSourceDocument::processCharacterToken(const String& source, HTMLTok addText(source, ""); } -PassRefPtr<Element> HTMLViewSourceDocument::addSpanWithClassName(const String& className) +PassRefPtr<Element> HTMLViewSourceDocument::addSpanWithClassName(const AtomicString& className) { if (m_current == m_tbody) { addLine(className); @@ -203,7 +202,7 @@ PassRefPtr<Element> HTMLViewSourceDocument::addSpanWithClassName(const String& c return span.release(); } -void HTMLViewSourceDocument::addLine(const String& className) +void HTMLViewSourceDocument::addLine(const AtomicString& className) { // Create a table row. RefPtr<HTMLTableRowElement> trow = HTMLTableRowElement::create(this); @@ -241,7 +240,7 @@ void HTMLViewSourceDocument::addLine(const String& className) } } -void HTMLViewSourceDocument::addText(const String& text, const String& className) +void HTMLViewSourceDocument::addText(const String& text, const AtomicString& className) { if (text.isEmpty()) return; @@ -290,7 +289,18 @@ int HTMLViewSourceDocument::addRange(const String& source, int start, int end, c return end; } -PassRefPtr<Element> HTMLViewSourceDocument::addLink(const String& url, bool isAnchor) +PassRefPtr<Element> HTMLViewSourceDocument::addBase(const AtomicString& href) +{ + RefPtr<HTMLBaseElement> base = HTMLBaseElement::create(baseTag, this); + RefPtr<NamedNodeMap> attributeMap = NamedNodeMap::create(); + attributeMap->addAttribute(Attribute::createMapped(hrefAttr, href)); + base->setAttributeMap(attributeMap.release()); + m_current->parserAddChild(base); + base->attach(); + return base.release(); +} + +PassRefPtr<Element> HTMLViewSourceDocument::addLink(const AtomicString& url, bool isAnchor) { if (m_current == m_tbody) addLine("webkit-html-tag"); diff --git a/WebCore/html/HTMLViewSourceDocument.h b/WebCore/html/HTMLViewSourceDocument.h index f459016..445c95b 100644 --- a/WebCore/html/HTMLViewSourceDocument.h +++ b/WebCore/html/HTMLViewSourceDocument.h @@ -57,11 +57,12 @@ private: void processCharacterToken(const String& source, HTMLToken&); void createContainingTable(); - PassRefPtr<Element> addSpanWithClassName(const String&); - void addLine(const String& className); - void addText(const String& text, const String& className); + PassRefPtr<Element> addSpanWithClassName(const AtomicString&); + void addLine(const AtomicString& className); + void addText(const String& text, const AtomicString& className); int addRange(const String& source, int start, int end, const String& className, bool isLink = false, bool isAnchor = false); - PassRefPtr<Element> addLink(const String& url, bool isAnchor); + PassRefPtr<Element> addLink(const AtomicString& url, bool isAnchor); + PassRefPtr<Element> addBase(const AtomicString& href); String m_type; RefPtr<Element> m_current; diff --git a/WebCore/html/ThreadableBlobRegistry.cpp b/WebCore/html/ThreadableBlobRegistry.cpp deleted file mode 100644 index d92d570..0000000 --- a/WebCore/html/ThreadableBlobRegistry.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "ThreadableBlobRegistry.h" - -#include "BlobData.h" -#include "BlobRegistry.h" -#include "CrossThreadTask.h" -#include "NotImplemented.h" -#include "ScriptExecutionContext.h" -#include "WorkerContext.h" -#include "WorkerLoaderProxy.h" -#include "WorkerThread.h" - -namespace WebCore { - -static void postTaskToMainThread(ScriptExecutionContext* scriptExecutionContext, PassOwnPtr<ScriptExecutionContext::Task> task) -{ -#if ENABLE(WORKERS) - ASSERT(scriptExecutionContext->isWorkerContext()); - WorkerLoaderProxy& proxy = static_cast<WorkerContext*>(scriptExecutionContext)->thread()->workerLoaderProxy(); - proxy.postTaskToLoader(task); -#else - notImplemented(); -#endif -} - -static void registerBlobURLTask(ScriptExecutionContext*, const KURL& url, PassOwnPtr<BlobData> blobData) -{ - blobRegistry().registerBlobURL(url, blobData); -} - -void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext* scriptExecutionContext, const KURL& url, PassOwnPtr<BlobData> blobData) -{ - if (scriptExecutionContext->isWorkerContext()) - postTaskToMainThread(scriptExecutionContext, createCallbackTask(®isterBlobURLTask, url, blobData)); - else - registerBlobURLTask(scriptExecutionContext, url, blobData); -} - -static void registerBlobURLFromTask(ScriptExecutionContext*, const KURL& url, const KURL& srcURL) -{ - blobRegistry().registerBlobURL(url, srcURL); -} - -void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext* scriptExecutionContext, const KURL& url, const KURL& srcURL) -{ - if (scriptExecutionContext->isWorkerContext()) - postTaskToMainThread(scriptExecutionContext, createCallbackTask(®isterBlobURLFromTask, url, srcURL)); - else - registerBlobURLFromTask(scriptExecutionContext, url, srcURL); -} - -static void unregisterBlobURLTask(ScriptExecutionContext*, const KURL& url) -{ - blobRegistry().unregisterBlobURL(url); -} - -void ThreadableBlobRegistry::unregisterBlobURL(ScriptExecutionContext* scriptExecutionContext, const KURL& url) -{ - if (scriptExecutionContext->isWorkerContext()) - postTaskToMainThread(scriptExecutionContext, createCallbackTask(&unregisterBlobURLTask, url)); - else - unregisterBlobURLTask(scriptExecutionContext, url); -} - -} // namespace WebCore diff --git a/WebCore/html/ThreadableBlobRegistry.h b/WebCore/html/ThreadableBlobRegistry.h deleted file mode 100644 index 7dce6bb..0000000 --- a/WebCore/html/ThreadableBlobRegistry.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ThreadableBlobRegistry_h -#define ThreadableBlobRegistry_h - -#include <wtf/PassOwnPtr.h> - -namespace WebCore { - -class BlobData; -class KURL; -class ScriptExecutionContext; - -class ThreadableBlobRegistry { -public: - static void registerBlobURL(ScriptExecutionContext*, const KURL&, PassOwnPtr<BlobData>); - static void registerBlobURL(ScriptExecutionContext*, const KURL&, const KURL& srcURL); - static void unregisterBlobURL(ScriptExecutionContext*, const KURL&); -}; - -} // namespace WebCore - -#endif // ThreadableBlobRegistry_h diff --git a/WebCore/html/ValidityState.cpp b/WebCore/html/ValidityState.cpp index 0c25dac..f18469e 100644 --- a/WebCore/html/ValidityState.cpp +++ b/WebCore/html/ValidityState.cpp @@ -26,21 +26,15 @@ #include "HTMLInputElement.h" #include "HTMLNames.h" +#include "HTMLTextAreaElement.h" #include "HTMLTreeBuilder.h" -#include "KURL.h" #include "LocalizedStrings.h" -#include "RegularExpression.h" #include <wtf/StdLibExtras.h> namespace WebCore { using namespace HTMLNames; -static const char emailPattern[] = - "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part - "@" - "[a-z0-9-]+(\\.[a-z0-9-]+)+"; // domain part - String ValidityState::validationMessage() const { if (!m_control->willValidate()) @@ -72,6 +66,19 @@ void ValidityState::setCustomErrorMessage(const String& message) m_control->setNeedsValidityCheck(); } +bool ValidityState::valueMissing() const +{ + if (m_control->hasTagName(inputTag)) { + HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); + return input->valueMissing(input->value()); + } + if (m_control->hasTagName(textareaTag)) { + HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(m_control); + return textArea->valueMissing(textArea->value()); + } + return false; +} + bool ValidityState::typeMismatch() const { if (!m_control->hasTagName(inputTag)) @@ -79,53 +86,29 @@ bool ValidityState::typeMismatch() const HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); String value = input->value(); - if (value.isEmpty()) return false; + return input->typeMismatch(value); +} - switch (input->inputType()) { - case HTMLInputElement::COLOR: - return !isValidColorString(value); - case HTMLInputElement::NUMBER: - return !parseToDoubleForNumberType(value, 0); - case HTMLInputElement::URL: - return !KURL(KURL(), value).isValid(); - case HTMLInputElement::EMAIL: { - if (!input->multiple()) - return !isValidEmailAddress(value); - Vector<String> addresses; - value.split(',', addresses); - for (unsigned i = 0; i < addresses.size(); ++i) { - if (!isValidEmailAddress(addresses[i])) - return true; - } +bool ValidityState::patternMismatch() const +{ + if (!m_control->hasTagName(inputTag)) return false; + HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); + return input->patternMismatch(input->value()); +} + +bool ValidityState::tooLong() const +{ + if (m_control->hasTagName(inputTag)) { + HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); + return input->tooLong(input->value(), HTMLTextFormControlElement::CheckDirtyFlag); } - case HTMLInputElement::DATE: - case HTMLInputElement::DATETIME: - case HTMLInputElement::DATETIMELOCAL: - case HTMLInputElement::MONTH: - case HTMLInputElement::TIME: - case HTMLInputElement::WEEK: - return !HTMLInputElement::parseToDateComponents(input->inputType(), value, 0); - case HTMLInputElement::BUTTON: - case HTMLInputElement::CHECKBOX: - case HTMLInputElement::FILE: - case HTMLInputElement::HIDDEN: - case HTMLInputElement::IMAGE: - case HTMLInputElement::ISINDEX: - case HTMLInputElement::PASSWORD: - case HTMLInputElement::RADIO: - case HTMLInputElement::RANGE: - case HTMLInputElement::RESET: - case HTMLInputElement::SEARCH: - case HTMLInputElement::SUBMIT: - case HTMLInputElement::TELEPHONE: // FIXME: Is there validation for <input type=telephone>? - case HTMLInputElement::TEXT: - return false; + if (m_control->hasTagName(textareaTag)) { + HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(m_control); + return textArea->tooLong(textArea->value(), HTMLTextFormControlElement::CheckDirtyFlag); } - - ASSERT_NOT_REACHED(); return false; } @@ -133,21 +116,24 @@ bool ValidityState::rangeUnderflow() const { if (!m_control->hasTagName(inputTag)) return false; - return static_cast<HTMLInputElement*>(m_control)->rangeUnderflow(); + HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); + return input->rangeUnderflow(input->value()); } bool ValidityState::rangeOverflow() const { if (!m_control->hasTagName(inputTag)) return false; - return static_cast<HTMLInputElement*>(m_control)->rangeOverflow(); + HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); + return input->rangeOverflow(input->value()); } bool ValidityState::stepMismatch() const { if (!m_control->hasTagName(inputTag)) return false; - return static_cast<HTMLInputElement*>(m_control)->stepMismatch(); + HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control); + return input->stepMismatch(input->value()); } bool ValidityState::valid() const @@ -157,31 +143,4 @@ bool ValidityState::valid() const return !someError; } -bool ValidityState::isValidColorString(const String& value) -{ - if (value.isEmpty()) - return false; - if (value[0] == '#') { - // We don't accept #rgb and #aarrggbb formats. - if (value.length() != 7) - return false; - } - Color color(value); // This accepts named colors such as "white". - return color.isValid() && !color.hasAlpha(); -} - -bool ValidityState::isValidEmailAddress(const String& address) -{ - int addressLength = address.length(); - if (!addressLength) - return false; - - DEFINE_STATIC_LOCAL(const RegularExpression, regExp, (emailPattern, TextCaseInsensitive)); - - int matchLength; - int matchOffset = regExp.match(address, 0, &matchLength); - - return matchOffset == 0 && matchLength == addressLength; -} - } // namespace diff --git a/WebCore/html/ValidityState.h b/WebCore/html/ValidityState.h index eecb9be..532ddb2 100644 --- a/WebCore/html/ValidityState.h +++ b/WebCore/html/ValidityState.h @@ -43,10 +43,10 @@ public: void setCustomErrorMessage(const String&); - bool valueMissing() const { return m_control->valueMissing(); } + bool valueMissing() const; bool typeMismatch() const; - bool patternMismatch() const { return m_control->patternMismatch(); } - bool tooLong() const { return m_control->tooLong(); } + bool patternMismatch() const; + bool tooLong() const; bool rangeUnderflow() const; bool rangeOverflow() const; bool stepMismatch() const; diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp index 2a7b96a..6df6abf 100644 --- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp +++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp @@ -804,8 +804,8 @@ void CanvasRenderingContext2D::fill() if (!m_path.isEmpty()) { c->beginPath(); c->addPath(m_path); - willDraw(m_path.boundingRect()); c->fillPath(); + didDraw(m_path.boundingRect()); } #if ENABLE(DASHBOARD_SUPPORT) @@ -835,9 +835,8 @@ void CanvasRenderingContext2D::stroke() CanvasStrokeStyleApplier strokeApplier(this); FloatRect boundingRect = m_path.strokeBoundingRect(&strokeApplier); #endif - willDraw(boundingRect); - c->strokePath(); + didDraw(boundingRect); } #if ENABLE(DASHBOARD_SUPPORT) @@ -885,8 +884,8 @@ void CanvasRenderingContext2D::clearRect(float x, float y, float width, float he save(); setAllAttributesToDefault(); - willDraw(rect); context->clearRect(rect); + didDraw(rect); restore(); } @@ -909,9 +908,9 @@ void CanvasRenderingContext2D::fillRect(float x, float y, float width, float hei return; FloatRect rect(x, y, width, height); - willDraw(rect); c->fillRect(rect); + didDraw(rect); } void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height) @@ -939,9 +938,9 @@ void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float h FloatRect boundingRect = rect; boundingRect.inflate(lineWidth / 2); - willDraw(boundingRect); c->strokeRect(rect, lineWidth); + didDraw(boundingRect); } #if PLATFORM(CG) @@ -1198,8 +1197,8 @@ void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRec FloatRect sourceRect = c->roundToDevicePixels(srcRect); FloatRect destRect = c->roundToDevicePixels(dstRect); - willDraw(destRect); c->drawImage(cachedImage->image(), DeviceColorSpace, destRect, sourceRect, state().m_globalComposite); + didDraw(destRect); } void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, float x, float y, ExceptionCode& ec) @@ -1273,8 +1272,7 @@ void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const sourceCanvas->makeRenderingResultsAvailable(); c->drawImageBuffer(buffer, DeviceColorSpace, destRect, sourceRect, state().m_globalComposite); - willDraw(destRect); // This call comes after drawImage, since the buffer we draw into may be our own, and we need to make sure it is dirty. - // FIXME: Arguably willDraw should become didDraw and occur after drawing calls and not before them to avoid problems like this. + didDraw(destRect); } #if ENABLE(VIDEO) @@ -1342,7 +1340,6 @@ void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRec FloatRect sourceRect = c->roundToDevicePixels(srcRect); FloatRect destRect = c->roundToDevicePixels(dstRect); - willDraw(destRect); c->save(); c->clip(destRect); @@ -1351,6 +1348,7 @@ void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRec c->translate(-sourceRect.x(), -sourceRect.y()); video->paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video))); c->restore(); + didDraw(destRect); } #endif @@ -1384,8 +1382,8 @@ void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image, op = CompositeSourceOver; FloatRect destRect = FloatRect(dx, dy, dw, dh); - willDraw(destRect); c->drawImage(cachedImage->image(), DeviceColorSpace, destRect, FloatRect(sx, sy, sw, sh), op); + didDraw(destRect); } void CanvasRenderingContext2D::setAlpha(float alpha) @@ -1475,7 +1473,7 @@ PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLCanvasElem return CanvasPattern::create(canvas->copiedImage(), repeatX, repeatY, canvas->originClean()); } -void CanvasRenderingContext2D::willDraw(const FloatRect& r, unsigned options) +void CanvasRenderingContext2D::didDraw(const FloatRect& r, unsigned options) { GraphicsContext* c = drawingContext(); if (!c) @@ -1510,7 +1508,7 @@ void CanvasRenderingContext2D::willDraw(const FloatRect& r, unsigned options) renderBox->layer()->rendererContentChanged(); else #endif - canvas()->willDraw(dirtyRect); + canvas()->didDraw(dirtyRect); } GraphicsContext* CanvasRenderingContext2D::drawingContext() const @@ -1628,11 +1626,11 @@ void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, sourceRect.intersect(IntRect(IntPoint(), buffer->size())); if (sourceRect.isEmpty()) return; - willDraw(sourceRect, 0); // ignore transform, shadow and clip sourceRect.move(-destOffset); IntPoint destPoint(destOffset.width(), destOffset.height()); buffer->putUnmultipliedImageData(data, sourceRect, destPoint); + didDraw(sourceRect, 0); // ignore transform, shadow and clip } String CanvasRenderingContext2D::font() const @@ -1809,14 +1807,6 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo if (!fill) textRect.inflate(c->strokeThickness() / 2); - if (fill) - canvas()->willDraw(textRect); - else { - // When stroking text, pointy miters can extend outside of textRect, so we - // punt and dirty the whole canvas. - canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height())); - } - #if PLATFORM(CG) CanvasStyle* drawStyle = fill ? state().m_fillStyle.get() : state().m_strokeStyle.get(); if (drawStyle->canvasGradient() || drawStyle->canvasPattern()) { @@ -1859,6 +1849,14 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo c->drawBidiText(font, textRun, location); + if (fill) + canvas()->didDraw(textRect); + else { + // When stroking text, pointy miters can extend outside of textRect, so we + // punt and dirty the whole canvas. + canvas()->didDraw(FloatRect(0, 0, canvas()->width(), canvas()->height())); + } + #if PLATFORM(QT) Font::setCodePath(oldCodePath); #endif diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.h b/WebCore/html/canvas/CanvasRenderingContext2D.h index f610250..9857344 100644 --- a/WebCore/html/canvas/CanvasRenderingContext2D.h +++ b/WebCore/html/canvas/CanvasRenderingContext2D.h @@ -269,7 +269,7 @@ private: CanvasWillDrawApplyAll = 0xffffffff }; - void willDraw(const FloatRect&, unsigned options = CanvasWillDrawApplyAll); + void didDraw(const FloatRect&, unsigned options = CanvasWillDrawApplyAll); GraphicsContext* drawingContext() const; diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp index 44d3e08..2a1464a 100644 --- a/WebCore/html/canvas/WebGLRenderingContext.cpp +++ b/WebCore/html/canvas/WebGLRenderingContext.cpp @@ -29,6 +29,7 @@ #include "WebGLRenderingContext.h" +#include "CachedImage.h" #include "CanvasPixelArray.h" #include "CheckedInt.h" #include "Console.h" @@ -86,7 +87,8 @@ private: PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs) { HostWindow* hostWindow = canvas->document()->view()->root()->hostWindow(); - OwnPtr<GraphicsContext3D> context(GraphicsContext3D::create(attrs->attributes(), hostWindow)); + GraphicsContext3D::Attributes emptyAttributes; + OwnPtr<GraphicsContext3D> context(GraphicsContext3D::create(attrs ? attrs->attributes() : emptyAttributes, hostWindow)); if (!context) return 0; @@ -152,7 +154,7 @@ void WebGLRenderingContext::markContextChanged() else { #endif if (!m_markedCanvasDirty) - canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height())); + canvas()->didDraw(FloatRect(0, 0, canvas()->width(), canvas()->height())); #if USE(ACCELERATED_COMPOSITING) } #endif @@ -309,23 +311,14 @@ void WebGLRenderingContext::bindTexture(unsigned long target, WebGLTexture* text if (texture) texture->setTarget(target, maxLevel); - // FIXME: do we want to do this on all platforms? -#if PLATFORM(CHROMIUM) - // FIXME: GL_TEXTURE_WRAP_R isn't exposed in the OpenGL ES 2.0 - // API. On desktop OpenGL implementations it seems necessary to - // set this wrap mode to GL_CLAMP_TO_EDGE to get correct behavior - // of cube maps. - if (texture) { - if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) { - if (!texture->isCubeMapRWrapModeInitialized()) { - static const int textureWrapR = 0x8072; - texParameteri(GraphicsContext3D::TEXTURE_CUBE_MAP, textureWrapR, GraphicsContext3D::CLAMP_TO_EDGE); - texture->setCubeMapRWrapModeInitialized(true); - } - } else - texture->setCubeMapRWrapModeInitialized(false); - } -#endif + // Note: previously we used to automatically set the TEXTURE_WRAP_R + // repeat mode to CLAMP_TO_EDGE for cube map textures, because OpenGL + // ES 2.0 doesn't expose this flag (a bug in the specification) and + // otherwise the application has no control over the seams in this + // dimension. However, it appears that supporting this properly on all + // platforms is fairly involved (will require a HashMap from texture ID + // in all ports), and we have not had any complaints, so the logic has + // been removed. cleanupAfterGraphicsCall(false); } diff --git a/WebCore/html/canvas/WebGLTexture.cpp b/WebCore/html/canvas/WebGLTexture.cpp index 7b2869f..7fc84ad 100644 --- a/WebCore/html/canvas/WebGLTexture.cpp +++ b/WebCore/html/canvas/WebGLTexture.cpp @@ -40,7 +40,6 @@ PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext* ctx) WebGLTexture::WebGLTexture(WebGLRenderingContext* ctx) : WebGLObject(ctx) - , cubeMapRWrapModeInitialized(false) , m_target(0) , m_minFilter(GraphicsContext3D::NEAREST_MIPMAP_LINEAR) , m_magFilter(GraphicsContext3D::LINEAR) diff --git a/WebCore/html/canvas/WebGLTexture.h b/WebCore/html/canvas/WebGLTexture.h index a1ce348..191957d 100644 --- a/WebCore/html/canvas/WebGLTexture.h +++ b/WebCore/html/canvas/WebGLTexture.h @@ -40,16 +40,6 @@ public: static PassRefPtr<WebGLTexture> create(WebGLRenderingContext*); - bool isCubeMapRWrapModeInitialized() - { - return cubeMapRWrapModeInitialized; - } - - void setCubeMapRWrapModeInitialized(bool initialized) - { - cubeMapRWrapModeInitialized = initialized; - } - void setTarget(unsigned long target, int maxLevel); void setParameteri(unsigned long pname, int param); void setParameterf(unsigned long pname, float param); @@ -83,8 +73,6 @@ private: int mapTargetToIndex(unsigned long); - bool cubeMapRWrapModeInitialized; - unsigned long m_target; int m_minFilter; diff --git a/WebCore/html/CSSPreloadScanner.cpp b/WebCore/html/parser/CSSPreloadScanner.cpp index 729103e..729103e 100644 --- a/WebCore/html/CSSPreloadScanner.cpp +++ b/WebCore/html/parser/CSSPreloadScanner.cpp diff --git a/WebCore/html/CSSPreloadScanner.h b/WebCore/html/parser/CSSPreloadScanner.h index 7ac282f..7ac282f 100644 --- a/WebCore/html/CSSPreloadScanner.h +++ b/WebCore/html/parser/CSSPreloadScanner.h diff --git a/WebCore/html/HTMLConstructionSite.cpp b/WebCore/html/parser/HTMLConstructionSite.cpp index 8735cd2..975b1af 100644 --- a/WebCore/html/HTMLConstructionSite.cpp +++ b/WebCore/html/parser/HTMLConstructionSite.cpp @@ -203,10 +203,11 @@ void HTMLConstructionSite::insertDoctype(AtomicHTMLToken& token) { ASSERT(token.type() == HTMLToken::DOCTYPE); attach(m_document, DocumentType::create(m_document, token.name(), String::adopt(token.publicIdentifier()), String::adopt(token.systemIdentifier()))); - // FIXME: Move quirks mode detection from DocumentType element to here. - notImplemented(); + if (token.forceQuirks()) - m_document->setParseMode(Document::Compat); + m_document->setCompatibilityMode(Document::QuirksMode); + else + m_document->setCompatibilityModeFromDoctype(); } void HTMLConstructionSite::insertComment(AtomicHTMLToken& token) @@ -252,9 +253,13 @@ void HTMLConstructionSite::insertHTMLBodyElement(AtomicHTMLToken& token) m_openElements.pushHTMLBodyElement(attachToCurrent(createHTMLElement(token))); } -void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken& token) +void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken& token, bool isDemoted) { - insertHTMLElement(token); + RefPtr<Element> element = createHTMLElement(token); + ASSERT(element->hasTagName(formTag)); + RefPtr<HTMLFormElement> form = static_pointer_cast<HTMLFormElement>(element.release()); + form->setDemoted(isDemoted); + m_openElements.push(attachToCurrent(form.release())); ASSERT(currentElement()->isHTMLElement()); ASSERT(currentElement()->hasTagName(formTag)); m_form = static_cast<HTMLFormElement*>(currentElement()); diff --git a/WebCore/html/HTMLConstructionSite.h b/WebCore/html/parser/HTMLConstructionSite.h index 2e746b4..6bed6a7 100644 --- a/WebCore/html/HTMLConstructionSite.h +++ b/WebCore/html/parser/HTMLConstructionSite.h @@ -57,7 +57,7 @@ public: void insertHTMLHtmlElement(AtomicHTMLToken&); void insertHTMLHeadElement(AtomicHTMLToken&); void insertHTMLBodyElement(AtomicHTMLToken&); - void insertHTMLFormElement(AtomicHTMLToken&); + void insertHTMLFormElement(AtomicHTMLToken&, bool isDemoted = false); void insertScriptElement(AtomicHTMLToken&); void insertTextNode(const String&); void insertForeignElement(AtomicHTMLToken&, const AtomicString& namespaceURI); diff --git a/WebCore/html/HTMLDocumentParser.cpp b/WebCore/html/parser/HTMLDocumentParser.cpp index 0a1208d..0a1208d 100644 --- a/WebCore/html/HTMLDocumentParser.cpp +++ b/WebCore/html/parser/HTMLDocumentParser.cpp diff --git a/WebCore/html/HTMLDocumentParser.h b/WebCore/html/parser/HTMLDocumentParser.h index da21a2b..da21a2b 100644 --- a/WebCore/html/HTMLDocumentParser.h +++ b/WebCore/html/parser/HTMLDocumentParser.h diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/parser/HTMLElementStack.cpp index b6f4111..b6f4111 100644 --- a/WebCore/html/HTMLElementStack.cpp +++ b/WebCore/html/parser/HTMLElementStack.cpp diff --git a/WebCore/html/HTMLElementStack.h b/WebCore/html/parser/HTMLElementStack.h index 73cfcb1..73cfcb1 100644 --- a/WebCore/html/HTMLElementStack.h +++ b/WebCore/html/parser/HTMLElementStack.h diff --git a/WebCore/html/parser/HTMLEntityNames.in b/WebCore/html/parser/HTMLEntityNames.in new file mode 100644 index 0000000..2d42ab2 --- /dev/null +++ b/WebCore/html/parser/HTMLEntityNames.in @@ -0,0 +1,2138 @@ +"AElig;","U+000C6" +"AElig","U+000C6" +"AMP;","U+00026" +"AMP","U+00026" +"Aacute;","U+000C1" +"Aacute","U+000C1" +"Abreve;","U+00102" +"Acirc;","U+000C2" +"Acirc","U+000C2" +"Acy;","U+00410" +"Afr;","U+1D504" +"Agrave;","U+000C0" +"Agrave","U+000C0" +"Alpha;","U+00391" +"Amacr;","U+00100" +"And;","U+02A53" +"Aogon;","U+00104" +"Aopf;","U+1D538" +"ApplyFunction;","U+02061" +"Aring;","U+000C5" +"Aring","U+000C5" +"Ascr;","U+1D49C" +"Assign;","U+02254" +"Atilde;","U+000C3" +"Atilde","U+000C3" +"Auml;","U+000C4" +"Auml","U+000C4" +"Backslash;","U+02216" +"Barv;","U+02AE7" +"Barwed;","U+02306" +"Bcy;","U+00411" +"Because;","U+02235" +"Bernoullis;","U+0212C" +"Beta;","U+00392" +"Bfr;","U+1D505" +"Bopf;","U+1D539" +"Breve;","U+002D8" +"Bscr;","U+0212C" +"Bumpeq;","U+0224E" +"CHcy;","U+00427" +"COPY;","U+000A9" +"COPY","U+000A9" +"Cacute;","U+00106" +"Cap;","U+022D2" +"CapitalDifferentialD;","U+02145" +"Cayleys;","U+0212D" +"Ccaron;","U+0010C" +"Ccedil;","U+000C7" +"Ccedil","U+000C7" +"Ccirc;","U+00108" +"Cconint;","U+02230" +"Cdot;","U+0010A" +"Cedilla;","U+000B8" +"CenterDot;","U+000B7" +"Cfr;","U+0212D" +"Chi;","U+003A7" +"CircleDot;","U+02299" +"CircleMinus;","U+02296" +"CirclePlus;","U+02295" +"CircleTimes;","U+02297" +"ClockwiseContourIntegral;","U+02232" +"CloseCurlyDoubleQuote;","U+0201D" +"CloseCurlyQuote;","U+02019" +"Colon;","U+02237" +"Colone;","U+02A74" +"Congruent;","U+02261" +"Conint;","U+0222F" +"ContourIntegral;","U+0222E" +"Copf;","U+02102" +"Coproduct;","U+02210" +"CounterClockwiseContourIntegral;","U+02233" +"Cross;","U+02A2F" +"Cscr;","U+1D49E" +"Cup;","U+022D3" +"CupCap;","U+0224D" +"DD;","U+02145" +"DDotrahd;","U+02911" +"DJcy;","U+00402" +"DScy;","U+00405" +"DZcy;","U+0040F" +"Dagger;","U+02021" +"Darr;","U+021A1" +"Dashv;","U+02AE4" +"Dcaron;","U+0010E" +"Dcy;","U+00414" +"Del;","U+02207" +"Delta;","U+00394" +"Dfr;","U+1D507" +"DiacriticalAcute;","U+000B4" +"DiacriticalDot;","U+002D9" +"DiacriticalDoubleAcute;","U+002DD" +"DiacriticalGrave;","U+00060" +"DiacriticalTilde;","U+002DC" +"Diamond;","U+022C4" +"DifferentialD;","U+02146" +"Dopf;","U+1D53B" +"Dot;","U+000A8" +"DotDot;","U+020DC" +"DotEqual;","U+02250" +"DoubleContourIntegral;","U+0222F" +"DoubleDot;","U+000A8" +"DoubleDownArrow;","U+021D3" +"DoubleLeftArrow;","U+021D0" +"DoubleLeftRightArrow;","U+021D4" +"DoubleLeftTee;","U+02AE4" +"DoubleLongLeftArrow;","U+027F8" +"DoubleLongLeftRightArrow;","U+027FA" +"DoubleLongRightArrow;","U+027F9" +"DoubleRightArrow;","U+021D2" +"DoubleRightTee;","U+022A8" +"DoubleUpArrow;","U+021D1" +"DoubleUpDownArrow;","U+021D5" +"DoubleVerticalBar;","U+02225" +"DownArrow;","U+02193" +"DownArrowBar;","U+02913" +"DownArrowUpArrow;","U+021F5" +"DownBreve;","U+00311" +"DownLeftRightVector;","U+02950" +"DownLeftTeeVector;","U+0295E" +"DownLeftVector;","U+021BD" +"DownLeftVectorBar;","U+02956" +"DownRightTeeVector;","U+0295F" +"DownRightVector;","U+021C1" +"DownRightVectorBar;","U+02957" +"DownTee;","U+022A4" +"DownTeeArrow;","U+021A7" +"Downarrow;","U+021D3" +"Dscr;","U+1D49F" +"Dstrok;","U+00110" +"ENG;","U+0014A" +"ETH;","U+000D0" +"ETH","U+000D0" +"Eacute;","U+000C9" +"Eacute","U+000C9" +"Ecaron;","U+0011A" +"Ecirc;","U+000CA" +"Ecirc","U+000CA" +"Ecy;","U+0042D" +"Edot;","U+00116" +"Efr;","U+1D508" +"Egrave;","U+000C8" +"Egrave","U+000C8" +"Element;","U+02208" +"Emacr;","U+00112" +"EmptySmallSquare;","U+025FB" +"EmptyVerySmallSquare;","U+025AB" +"Eogon;","U+00118" +"Eopf;","U+1D53C" +"Epsilon;","U+00395" +"Equal;","U+02A75" +"EqualTilde;","U+02242" +"Equilibrium;","U+021CC" +"Escr;","U+02130" +"Esim;","U+02A73" +"Eta;","U+00397" +"Euml;","U+000CB" +"Euml","U+000CB" +"Exists;","U+02203" +"ExponentialE;","U+02147" +"Fcy;","U+00424" +"Ffr;","U+1D509" +"FilledSmallSquare;","U+025FC" +"FilledVerySmallSquare;","U+025AA" +"Fopf;","U+1D53D" +"ForAll;","U+02200" +"Fouriertrf;","U+02131" +"Fscr;","U+02131" +"GJcy;","U+00403" +"GT;","U+0003E" +"GT","U+0003E" +"Gamma;","U+00393" +"Gammad;","U+003DC" +"Gbreve;","U+0011E" +"Gcedil;","U+00122" +"Gcirc;","U+0011C" +"Gcy;","U+00413" +"Gdot;","U+00120" +"Gfr;","U+1D50A" +"Gg;","U+022D9" +"Gopf;","U+1D53E" +"GreaterEqual;","U+02265" +"GreaterEqualLess;","U+022DB" +"GreaterFullEqual;","U+02267" +"GreaterGreater;","U+02AA2" +"GreaterLess;","U+02277" +"GreaterSlantEqual;","U+02A7E" +"GreaterTilde;","U+02273" +"Gscr;","U+1D4A2" +"Gt;","U+0226B" +"HARDcy;","U+0042A" +"Hacek;","U+002C7" +"Hat;","U+0005E" +"Hcirc;","U+00124" +"Hfr;","U+0210C" +"HilbertSpace;","U+0210B" +"Hopf;","U+0210D" +"HorizontalLine;","U+02500" +"Hscr;","U+0210B" +"Hstrok;","U+00126" +"HumpDownHump;","U+0224E" +"HumpEqual;","U+0224F" +"IEcy;","U+00415" +"IJlig;","U+00132" +"IOcy;","U+00401" +"Iacute;","U+000CD" +"Iacute","U+000CD" +"Icirc;","U+000CE" +"Icirc","U+000CE" +"Icy;","U+00418" +"Idot;","U+00130" +"Ifr;","U+02111" +"Igrave;","U+000CC" +"Igrave","U+000CC" +"Im;","U+02111" +"Imacr;","U+0012A" +"ImaginaryI;","U+02148" +"Implies;","U+021D2" +"Int;","U+0222C" +"Integral;","U+0222B" +"Intersection;","U+022C2" +"InvisibleComma;","U+02063" +"InvisibleTimes;","U+02062" +"Iogon;","U+0012E" +"Iopf;","U+1D540" +"Iota;","U+00399" +"Iscr;","U+02110" +"Itilde;","U+00128" +"Iukcy;","U+00406" +"Iuml;","U+000CF" +"Iuml","U+000CF" +"Jcirc;","U+00134" +"Jcy;","U+00419" +"Jfr;","U+1D50D" +"Jopf;","U+1D541" +"Jscr;","U+1D4A5" +"Jsercy;","U+00408" +"Jukcy;","U+00404" +"KHcy;","U+00425" +"KJcy;","U+0040C" +"Kappa;","U+0039A" +"Kcedil;","U+00136" +"Kcy;","U+0041A" +"Kfr;","U+1D50E" +"Kopf;","U+1D542" +"Kscr;","U+1D4A6" +"LJcy;","U+00409" +"LT;","U+0003C" +"LT","U+0003C" +"Lacute;","U+00139" +"Lambda;","U+0039B" +"Lang;","U+027EA" +"Laplacetrf;","U+02112" +"Larr;","U+0219E" +"Lcaron;","U+0013D" +"Lcedil;","U+0013B" +"Lcy;","U+0041B" +"LeftAngleBracket;","U+027E8" +"LeftArrow;","U+02190" +"LeftArrowBar;","U+021E4" +"LeftArrowRightArrow;","U+021C6" +"LeftCeiling;","U+02308" +"LeftDoubleBracket;","U+027E6" +"LeftDownTeeVector;","U+02961" +"LeftDownVector;","U+021C3" +"LeftDownVectorBar;","U+02959" +"LeftFloor;","U+0230A" +"LeftRightArrow;","U+02194" +"LeftRightVector;","U+0294E" +"LeftTee;","U+022A3" +"LeftTeeArrow;","U+021A4" +"LeftTeeVector;","U+0295A" +"LeftTriangle;","U+022B2" +"LeftTriangleBar;","U+029CF" +"LeftTriangleEqual;","U+022B4" +"LeftUpDownVector;","U+02951" +"LeftUpTeeVector;","U+02960" +"LeftUpVector;","U+021BF" +"LeftUpVectorBar;","U+02958" +"LeftVector;","U+021BC" +"LeftVectorBar;","U+02952" +"Leftarrow;","U+021D0" +"Leftrightarrow;","U+021D4" +"LessEqualGreater;","U+022DA" +"LessFullEqual;","U+02266" +"LessGreater;","U+02276" +"LessLess;","U+02AA1" +"LessSlantEqual;","U+02A7D" +"LessTilde;","U+02272" +"Lfr;","U+1D50F" +"Ll;","U+022D8" +"Lleftarrow;","U+021DA" +"Lmidot;","U+0013F" +"LongLeftArrow;","U+027F5" +"LongLeftRightArrow;","U+027F7" +"LongRightArrow;","U+027F6" +"Longleftarrow;","U+027F8" +"Longleftrightarrow;","U+027FA" +"Longrightarrow;","U+027F9" +"Lopf;","U+1D543" +"LowerLeftArrow;","U+02199" +"LowerRightArrow;","U+02198" +"Lscr;","U+02112" +"Lsh;","U+021B0" +"Lstrok;","U+00141" +"Lt;","U+0226A" +"Map;","U+02905" +"Mcy;","U+0041C" +"MediumSpace;","U+0205F" +"Mellintrf;","U+02133" +"Mfr;","U+1D510" +"MinusPlus;","U+02213" +"Mopf;","U+1D544" +"Mscr;","U+02133" +"Mu;","U+0039C" +"NJcy;","U+0040A" +"Nacute;","U+00143" +"Ncaron;","U+00147" +"Ncedil;","U+00145" +"Ncy;","U+0041D" +"NegativeMediumSpace;","U+0200B" +"NegativeThickSpace;","U+0200B" +"NegativeThinSpace;","U+0200B" +"NegativeVeryThinSpace;","U+0200B" +"NestedGreaterGreater;","U+0226B" +"NestedLessLess;","U+0226A" +"NewLine;","U+0000A" +"Nfr;","U+1D511" +"NoBreak;","U+02060" +"NonBreakingSpace;","U+000A0" +"Nopf;","U+02115" +"Not;","U+02AEC" +"NotCongruent;","U+02262" +"NotCupCap;","U+0226D" +"NotDoubleVerticalBar;","U+02226" +"NotElement;","U+02209" +"NotEqual;","U+02260" +"NotExists;","U+02204" +"NotGreater;","U+0226F" +"NotGreaterEqual;","U+02271" +"NotGreaterLess;","U+02279" +"NotGreaterTilde;","U+02275" +"NotLeftTriangle;","U+022EA" +"NotLeftTriangleEqual;","U+022EC" +"NotLess;","U+0226E" +"NotLessEqual;","U+02270" +"NotLessGreater;","U+02278" +"NotLessTilde;","U+02274" +"NotPrecedes;","U+02280" +"NotPrecedesSlantEqual;","U+022E0" +"NotReverseElement;","U+0220C" +"NotRightTriangle;","U+022EB" +"NotRightTriangleEqual;","U+022ED" +"NotSquareSubsetEqual;","U+022E2" +"NotSquareSupersetEqual;","U+022E3" +"NotSubsetEqual;","U+02288" +"NotSucceeds;","U+02281" +"NotSucceedsSlantEqual;","U+022E1" +"NotSupersetEqual;","U+02289" +"NotTilde;","U+02241" +"NotTildeEqual;","U+02244" +"NotTildeFullEqual;","U+02247" +"NotTildeTilde;","U+02249" +"NotVerticalBar;","U+02224" +"Nscr;","U+1D4A9" +"Ntilde;","U+000D1" +"Ntilde","U+000D1" +"Nu;","U+0039D" +"OElig;","U+00152" +"Oacute;","U+000D3" +"Oacute","U+000D3" +"Ocirc;","U+000D4" +"Ocirc","U+000D4" +"Ocy;","U+0041E" +"Odblac;","U+00150" +"Ofr;","U+1D512" +"Ograve;","U+000D2" +"Ograve","U+000D2" +"Omacr;","U+0014C" +"Omega;","U+003A9" +"Omicron;","U+0039F" +"Oopf;","U+1D546" +"OpenCurlyDoubleQuote;","U+0201C" +"OpenCurlyQuote;","U+02018" +"Or;","U+02A54" +"Oscr;","U+1D4AA" +"Oslash;","U+000D8" +"Oslash","U+000D8" +"Otilde;","U+000D5" +"Otilde","U+000D5" +"Otimes;","U+02A37" +"Ouml;","U+000D6" +"Ouml","U+000D6" +"OverBar;","U+0203E" +"OverBrace;","U+023DE" +"OverBracket;","U+023B4" +"OverParenthesis;","U+023DC" +"PartialD;","U+02202" +"Pcy;","U+0041F" +"Pfr;","U+1D513" +"Phi;","U+003A6" +"Pi;","U+003A0" +"PlusMinus;","U+000B1" +"Poincareplane;","U+0210C" +"Popf;","U+02119" +"Pr;","U+02ABB" +"Precedes;","U+0227A" +"PrecedesEqual;","U+02AAF" +"PrecedesSlantEqual;","U+0227C" +"PrecedesTilde;","U+0227E" +"Prime;","U+02033" +"Product;","U+0220F" +"Proportion;","U+02237" +"Proportional;","U+0221D" +"Pscr;","U+1D4AB" +"Psi;","U+003A8" +"QUOT;","U+00022" +"QUOT","U+00022" +"Qfr;","U+1D514" +"Qopf;","U+0211A" +"Qscr;","U+1D4AC" +"RBarr;","U+02910" +"REG;","U+000AE" +"REG","U+000AE" +"Racute;","U+00154" +"Rang;","U+027EB" +"Rarr;","U+021A0" +"Rarrtl;","U+02916" +"Rcaron;","U+00158" +"Rcedil;","U+00156" +"Rcy;","U+00420" +"Re;","U+0211C" +"ReverseElement;","U+0220B" +"ReverseEquilibrium;","U+021CB" +"ReverseUpEquilibrium;","U+0296F" +"Rfr;","U+0211C" +"Rho;","U+003A1" +"RightAngleBracket;","U+027E9" +"RightArrow;","U+02192" +"RightArrowBar;","U+021E5" +"RightArrowLeftArrow;","U+021C4" +"RightCeiling;","U+02309" +"RightDoubleBracket;","U+027E7" +"RightDownTeeVector;","U+0295D" +"RightDownVector;","U+021C2" +"RightDownVectorBar;","U+02955" +"RightFloor;","U+0230B" +"RightTee;","U+022A2" +"RightTeeArrow;","U+021A6" +"RightTeeVector;","U+0295B" +"RightTriangle;","U+022B3" +"RightTriangleBar;","U+029D0" +"RightTriangleEqual;","U+022B5" +"RightUpDownVector;","U+0294F" +"RightUpTeeVector;","U+0295C" +"RightUpVector;","U+021BE" +"RightUpVectorBar;","U+02954" +"RightVector;","U+021C0" +"RightVectorBar;","U+02953" +"Rightarrow;","U+021D2" +"Ropf;","U+0211D" +"RoundImplies;","U+02970" +"Rrightarrow;","U+021DB" +"Rscr;","U+0211B" +"Rsh;","U+021B1" +"RuleDelayed;","U+029F4" +"SHCHcy;","U+00429" +"SHcy;","U+00428" +"SOFTcy;","U+0042C" +"Sacute;","U+0015A" +"Sc;","U+02ABC" +"Scaron;","U+00160" +"Scedil;","U+0015E" +"Scirc;","U+0015C" +"Scy;","U+00421" +"Sfr;","U+1D516" +"ShortDownArrow;","U+02193" +"ShortLeftArrow;","U+02190" +"ShortRightArrow;","U+02192" +"ShortUpArrow;","U+02191" +"Sigma;","U+003A3" +"SmallCircle;","U+02218" +"Sopf;","U+1D54A" +"Sqrt;","U+0221A" +"Square;","U+025A1" +"SquareIntersection;","U+02293" +"SquareSubset;","U+0228F" +"SquareSubsetEqual;","U+02291" +"SquareSuperset;","U+02290" +"SquareSupersetEqual;","U+02292" +"SquareUnion;","U+02294" +"Sscr;","U+1D4AE" +"Star;","U+022C6" +"Sub;","U+022D0" +"Subset;","U+022D0" +"SubsetEqual;","U+02286" +"Succeeds;","U+0227B" +"SucceedsEqual;","U+02AB0" +"SucceedsSlantEqual;","U+0227D" +"SucceedsTilde;","U+0227F" +"SuchThat;","U+0220B" +"Sum;","U+02211" +"Sup;","U+022D1" +"Superset;","U+02283" +"SupersetEqual;","U+02287" +"Supset;","U+022D1" +"THORN;","U+000DE" +"THORN","U+000DE" +"TRADE;","U+02122" +"TSHcy;","U+0040B" +"TScy;","U+00426" +"Tab;","U+00009" +"Tau;","U+003A4" +"Tcaron;","U+00164" +"Tcedil;","U+00162" +"Tcy;","U+00422" +"Tfr;","U+1D517" +"Therefore;","U+02234" +"Theta;","U+00398" +"ThinSpace;","U+02009" +"Tilde;","U+0223C" +"TildeEqual;","U+02243" +"TildeFullEqual;","U+02245" +"TildeTilde;","U+02248" +"Topf;","U+1D54B" +"TripleDot;","U+020DB" +"Tscr;","U+1D4AF" +"Tstrok;","U+00166" +"Uacute;","U+000DA" +"Uacute","U+000DA" +"Uarr;","U+0219F" +"Uarrocir;","U+02949" +"Ubrcy;","U+0040E" +"Ubreve;","U+0016C" +"Ucirc;","U+000DB" +"Ucirc","U+000DB" +"Ucy;","U+00423" +"Udblac;","U+00170" +"Ufr;","U+1D518" +"Ugrave;","U+000D9" +"Ugrave","U+000D9" +"Umacr;","U+0016A" +"UnderBar;","U+0005F" +"UnderBrace;","U+023DF" +"UnderBracket;","U+023B5" +"UnderParenthesis;","U+023DD" +"Union;","U+022C3" +"UnionPlus;","U+0228E" +"Uogon;","U+00172" +"Uopf;","U+1D54C" +"UpArrow;","U+02191" +"UpArrowBar;","U+02912" +"UpArrowDownArrow;","U+021C5" +"UpDownArrow;","U+02195" +"UpEquilibrium;","U+0296E" +"UpTee;","U+022A5" +"UpTeeArrow;","U+021A5" +"Uparrow;","U+021D1" +"Updownarrow;","U+021D5" +"UpperLeftArrow;","U+02196" +"UpperRightArrow;","U+02197" +"Upsi;","U+003D2" +"Upsilon;","U+003A5" +"Uring;","U+0016E" +"Uscr;","U+1D4B0" +"Utilde;","U+00168" +"Uuml;","U+000DC" +"Uuml","U+000DC" +"VDash;","U+022AB" +"Vbar;","U+02AEB" +"Vcy;","U+00412" +"Vdash;","U+022A9" +"Vdashl;","U+02AE6" +"Vee;","U+022C1" +"Verbar;","U+02016" +"Vert;","U+02016" +"VerticalBar;","U+02223" +"VerticalLine;","U+0007C" +"VerticalSeparator;","U+02758" +"VerticalTilde;","U+02240" +"VeryThinSpace;","U+0200A" +"Vfr;","U+1D519" +"Vopf;","U+1D54D" +"Vscr;","U+1D4B1" +"Vvdash;","U+022AA" +"Wcirc;","U+00174" +"Wedge;","U+022C0" +"Wfr;","U+1D51A" +"Wopf;","U+1D54E" +"Wscr;","U+1D4B2" +"Xfr;","U+1D51B" +"Xi;","U+0039E" +"Xopf;","U+1D54F" +"Xscr;","U+1D4B3" +"YAcy;","U+0042F" +"YIcy;","U+00407" +"YUcy;","U+0042E" +"Yacute;","U+000DD" +"Yacute","U+000DD" +"Ycirc;","U+00176" +"Ycy;","U+0042B" +"Yfr;","U+1D51C" +"Yopf;","U+1D550" +"Yscr;","U+1D4B4" +"Yuml;","U+00178" +"ZHcy;","U+00416" +"Zacute;","U+00179" +"Zcaron;","U+0017D" +"Zcy;","U+00417" +"Zdot;","U+0017B" +"ZeroWidthSpace;","U+0200B" +"Zeta;","U+00396" +"Zfr;","U+02128" +"Zopf;","U+02124" +"Zscr;","U+1D4B5" +"aacute;","U+000E1" +"aacute","U+000E1" +"abreve;","U+00103" +"ac;","U+0223E" +"acd;","U+0223F" +"acirc;","U+000E2" +"acirc","U+000E2" +"acute;","U+000B4" +"acute","U+000B4" +"acy;","U+00430" +"aelig;","U+000E6" +"aelig","U+000E6" +"af;","U+02061" +"afr;","U+1D51E" +"agrave;","U+000E0" +"agrave","U+000E0" +"alefsym;","U+02135" +"aleph;","U+02135" +"alpha;","U+003B1" +"amacr;","U+00101" +"amalg;","U+02A3F" +"amp;","U+00026" +"amp","U+00026" +"and;","U+02227" +"andand;","U+02A55" +"andd;","U+02A5C" +"andslope;","U+02A58" +"andv;","U+02A5A" +"ang;","U+02220" +"ange;","U+029A4" +"angle;","U+02220" +"angmsd;","U+02221" +"angmsdaa;","U+029A8" +"angmsdab;","U+029A9" +"angmsdac;","U+029AA" +"angmsdad;","U+029AB" +"angmsdae;","U+029AC" +"angmsdaf;","U+029AD" +"angmsdag;","U+029AE" +"angmsdah;","U+029AF" +"angrt;","U+0221F" +"angrtvb;","U+022BE" +"angrtvbd;","U+0299D" +"angsph;","U+02222" +"angst;","U+000C5" +"angzarr;","U+0237C" +"aogon;","U+00105" +"aopf;","U+1D552" +"ap;","U+02248" +"apE;","U+02A70" +"apacir;","U+02A6F" +"ape;","U+0224A" +"apid;","U+0224B" +"apos;","U+00027" +"approx;","U+02248" +"approxeq;","U+0224A" +"aring;","U+000E5" +"aring","U+000E5" +"ascr;","U+1D4B6" +"ast;","U+0002A" +"asymp;","U+02248" +"asympeq;","U+0224D" +"atilde;","U+000E3" +"atilde","U+000E3" +"auml;","U+000E4" +"auml","U+000E4" +"awconint;","U+02233" +"awint;","U+02A11" +"bNot;","U+02AED" +"backcong;","U+0224C" +"backepsilon;","U+003F6" +"backprime;","U+02035" +"backsim;","U+0223D" +"backsimeq;","U+022CD" +"barvee;","U+022BD" +"barwed;","U+02305" +"barwedge;","U+02305" +"bbrk;","U+023B5" +"bbrktbrk;","U+023B6" +"bcong;","U+0224C" +"bcy;","U+00431" +"bdquo;","U+0201E" +"becaus;","U+02235" +"because;","U+02235" +"bemptyv;","U+029B0" +"bepsi;","U+003F6" +"bernou;","U+0212C" +"beta;","U+003B2" +"beth;","U+02136" +"between;","U+0226C" +"bfr;","U+1D51F" +"bigcap;","U+022C2" +"bigcirc;","U+025EF" +"bigcup;","U+022C3" +"bigodot;","U+02A00" +"bigoplus;","U+02A01" +"bigotimes;","U+02A02" +"bigsqcup;","U+02A06" +"bigstar;","U+02605" +"bigtriangledown;","U+025BD" +"bigtriangleup;","U+025B3" +"biguplus;","U+02A04" +"bigvee;","U+022C1" +"bigwedge;","U+022C0" +"bkarow;","U+0290D" +"blacklozenge;","U+029EB" +"blacksquare;","U+025AA" +"blacktriangle;","U+025B4" +"blacktriangledown;","U+025BE" +"blacktriangleleft;","U+025C2" +"blacktriangleright;","U+025B8" +"blank;","U+02423" +"blk12;","U+02592" +"blk14;","U+02591" +"blk34;","U+02593" +"block;","U+02588" +"bnot;","U+02310" +"bopf;","U+1D553" +"bot;","U+022A5" +"bottom;","U+022A5" +"bowtie;","U+022C8" +"boxDL;","U+02557" +"boxDR;","U+02554" +"boxDl;","U+02556" +"boxDr;","U+02553" +"boxH;","U+02550" +"boxHD;","U+02566" +"boxHU;","U+02569" +"boxHd;","U+02564" +"boxHu;","U+02567" +"boxUL;","U+0255D" +"boxUR;","U+0255A" +"boxUl;","U+0255C" +"boxUr;","U+02559" +"boxV;","U+02551" +"boxVH;","U+0256C" +"boxVL;","U+02563" +"boxVR;","U+02560" +"boxVh;","U+0256B" +"boxVl;","U+02562" +"boxVr;","U+0255F" +"boxbox;","U+029C9" +"boxdL;","U+02555" +"boxdR;","U+02552" +"boxdl;","U+02510" +"boxdr;","U+0250C" +"boxh;","U+02500" +"boxhD;","U+02565" +"boxhU;","U+02568" +"boxhd;","U+0252C" +"boxhu;","U+02534" +"boxminus;","U+0229F" +"boxplus;","U+0229E" +"boxtimes;","U+022A0" +"boxuL;","U+0255B" +"boxuR;","U+02558" +"boxul;","U+02518" +"boxur;","U+02514" +"boxv;","U+02502" +"boxvH;","U+0256A" +"boxvL;","U+02561" +"boxvR;","U+0255E" +"boxvh;","U+0253C" +"boxvl;","U+02524" +"boxvr;","U+0251C" +"bprime;","U+02035" +"breve;","U+002D8" +"brvbar;","U+000A6" +"brvbar","U+000A6" +"bscr;","U+1D4B7" +"bsemi;","U+0204F" +"bsim;","U+0223D" +"bsime;","U+022CD" +"bsol;","U+0005C" +"bsolb;","U+029C5" +"bsolhsub;","U+027C8" +"bull;","U+02022" +"bullet;","U+02022" +"bump;","U+0224E" +"bumpE;","U+02AAE" +"bumpe;","U+0224F" +"bumpeq;","U+0224F" +"cacute;","U+00107" +"cap;","U+02229" +"capand;","U+02A44" +"capbrcup;","U+02A49" +"capcap;","U+02A4B" +"capcup;","U+02A47" +"capdot;","U+02A40" +"caret;","U+02041" +"caron;","U+002C7" +"ccaps;","U+02A4D" +"ccaron;","U+0010D" +"ccedil;","U+000E7" +"ccedil","U+000E7" +"ccirc;","U+00109" +"ccups;","U+02A4C" +"ccupssm;","U+02A50" +"cdot;","U+0010B" +"cedil;","U+000B8" +"cedil","U+000B8" +"cemptyv;","U+029B2" +"cent;","U+000A2" +"cent","U+000A2" +"centerdot;","U+000B7" +"cfr;","U+1D520" +"chcy;","U+00447" +"check;","U+02713" +"checkmark;","U+02713" +"chi;","U+003C7" +"cir;","U+025CB" +"cirE;","U+029C3" +"circ;","U+002C6" +"circeq;","U+02257" +"circlearrowleft;","U+021BA" +"circlearrowright;","U+021BB" +"circledR;","U+000AE" +"circledS;","U+024C8" +"circledast;","U+0229B" +"circledcirc;","U+0229A" +"circleddash;","U+0229D" +"cire;","U+02257" +"cirfnint;","U+02A10" +"cirmid;","U+02AEF" +"cirscir;","U+029C2" +"clubs;","U+02663" +"clubsuit;","U+02663" +"colon;","U+0003A" +"colone;","U+02254" +"coloneq;","U+02254" +"comma;","U+0002C" +"commat;","U+00040" +"comp;","U+02201" +"compfn;","U+02218" +"complement;","U+02201" +"complexes;","U+02102" +"cong;","U+02245" +"congdot;","U+02A6D" +"conint;","U+0222E" +"copf;","U+1D554" +"coprod;","U+02210" +"copy;","U+000A9" +"copy","U+000A9" +"copysr;","U+02117" +"crarr;","U+021B5" +"cross;","U+02717" +"cscr;","U+1D4B8" +"csub;","U+02ACF" +"csube;","U+02AD1" +"csup;","U+02AD0" +"csupe;","U+02AD2" +"ctdot;","U+022EF" +"cudarrl;","U+02938" +"cudarrr;","U+02935" +"cuepr;","U+022DE" +"cuesc;","U+022DF" +"cularr;","U+021B6" +"cularrp;","U+0293D" +"cup;","U+0222A" +"cupbrcap;","U+02A48" +"cupcap;","U+02A46" +"cupcup;","U+02A4A" +"cupdot;","U+0228D" +"cupor;","U+02A45" +"curarr;","U+021B7" +"curarrm;","U+0293C" +"curlyeqprec;","U+022DE" +"curlyeqsucc;","U+022DF" +"curlyvee;","U+022CE" +"curlywedge;","U+022CF" +"curren;","U+000A4" +"curren","U+000A4" +"curvearrowleft;","U+021B6" +"curvearrowright;","U+021B7" +"cuvee;","U+022CE" +"cuwed;","U+022CF" +"cwconint;","U+02232" +"cwint;","U+02231" +"cylcty;","U+0232D" +"dArr;","U+021D3" +"dHar;","U+02965" +"dagger;","U+02020" +"daleth;","U+02138" +"darr;","U+02193" +"dash;","U+02010" +"dashv;","U+022A3" +"dbkarow;","U+0290F" +"dblac;","U+002DD" +"dcaron;","U+0010F" +"dcy;","U+00434" +"dd;","U+02146" +"ddagger;","U+02021" +"ddarr;","U+021CA" +"ddotseq;","U+02A77" +"deg;","U+000B0" +"deg","U+000B0" +"delta;","U+003B4" +"demptyv;","U+029B1" +"dfisht;","U+0297F" +"dfr;","U+1D521" +"dharl;","U+021C3" +"dharr;","U+021C2" +"diam;","U+022C4" +"diamond;","U+022C4" +"diamondsuit;","U+02666" +"diams;","U+02666" +"die;","U+000A8" +"digamma;","U+003DD" +"disin;","U+022F2" +"div;","U+000F7" +"divide;","U+000F7" +"divide","U+000F7" +"divideontimes;","U+022C7" +"divonx;","U+022C7" +"djcy;","U+00452" +"dlcorn;","U+0231E" +"dlcrop;","U+0230D" +"dollar;","U+00024" +"dopf;","U+1D555" +"dot;","U+002D9" +"doteq;","U+02250" +"doteqdot;","U+02251" +"dotminus;","U+02238" +"dotplus;","U+02214" +"dotsquare;","U+022A1" +"doublebarwedge;","U+02306" +"downarrow;","U+02193" +"downdownarrows;","U+021CA" +"downharpoonleft;","U+021C3" +"downharpoonright;","U+021C2" +"drbkarow;","U+02910" +"drcorn;","U+0231F" +"drcrop;","U+0230C" +"dscr;","U+1D4B9" +"dscy;","U+00455" +"dsol;","U+029F6" +"dstrok;","U+00111" +"dtdot;","U+022F1" +"dtri;","U+025BF" +"dtrif;","U+025BE" +"duarr;","U+021F5" +"duhar;","U+0296F" +"dwangle;","U+029A6" +"dzcy;","U+0045F" +"dzigrarr;","U+027FF" +"eDDot;","U+02A77" +"eDot;","U+02251" +"eacute;","U+000E9" +"eacute","U+000E9" +"easter;","U+02A6E" +"ecaron;","U+0011B" +"ecir;","U+02256" +"ecirc;","U+000EA" +"ecirc","U+000EA" +"ecolon;","U+02255" +"ecy;","U+0044D" +"edot;","U+00117" +"ee;","U+02147" +"efDot;","U+02252" +"efr;","U+1D522" +"eg;","U+02A9A" +"egrave;","U+000E8" +"egrave","U+000E8" +"egs;","U+02A96" +"egsdot;","U+02A98" +"el;","U+02A99" +"elinters;","U+023E7" +"ell;","U+02113" +"els;","U+02A95" +"elsdot;","U+02A97" +"emacr;","U+00113" +"empty;","U+02205" +"emptyset;","U+02205" +"emptyv;","U+02205" +"emsp13;","U+02004" +"emsp14;","U+02005" +"emsp;","U+02003" +"eng;","U+0014B" +"ensp;","U+02002" +"eogon;","U+00119" +"eopf;","U+1D556" +"epar;","U+022D5" +"eparsl;","U+029E3" +"eplus;","U+02A71" +"epsi;","U+003B5" +"epsilon;","U+003B5" +"epsiv;","U+003F5" +"eqcirc;","U+02256" +"eqcolon;","U+02255" +"eqsim;","U+02242" +"eqslantgtr;","U+02A96" +"eqslantless;","U+02A95" +"equals;","U+0003D" +"equest;","U+0225F" +"equiv;","U+02261" +"equivDD;","U+02A78" +"eqvparsl;","U+029E5" +"erDot;","U+02253" +"erarr;","U+02971" +"escr;","U+0212F" +"esdot;","U+02250" +"esim;","U+02242" +"eta;","U+003B7" +"eth;","U+000F0" +"eth","U+000F0" +"euml;","U+000EB" +"euml","U+000EB" +"euro;","U+020AC" +"excl;","U+00021" +"exist;","U+02203" +"expectation;","U+02130" +"exponentiale;","U+02147" +"fallingdotseq;","U+02252" +"fcy;","U+00444" +"female;","U+02640" +"ffilig;","U+0FB03" +"fflig;","U+0FB00" +"ffllig;","U+0FB04" +"ffr;","U+1D523" +"filig;","U+0FB01" +"flat;","U+0266D" +"fllig;","U+0FB02" +"fltns;","U+025B1" +"fnof;","U+00192" +"fopf;","U+1D557" +"forall;","U+02200" +"fork;","U+022D4" +"forkv;","U+02AD9" +"fpartint;","U+02A0D" +"frac12;","U+000BD" +"frac12","U+000BD" +"frac13;","U+02153" +"frac14;","U+000BC" +"frac14","U+000BC" +"frac15;","U+02155" +"frac16;","U+02159" +"frac18;","U+0215B" +"frac23;","U+02154" +"frac25;","U+02156" +"frac34;","U+000BE" +"frac34","U+000BE" +"frac35;","U+02157" +"frac38;","U+0215C" +"frac45;","U+02158" +"frac56;","U+0215A" +"frac58;","U+0215D" +"frac78;","U+0215E" +"frasl;","U+02044" +"frown;","U+02322" +"fscr;","U+1D4BB" +"gE;","U+02267" +"gEl;","U+02A8C" +"gacute;","U+001F5" +"gamma;","U+003B3" +"gammad;","U+003DD" +"gap;","U+02A86" +"gbreve;","U+0011F" +"gcirc;","U+0011D" +"gcy;","U+00433" +"gdot;","U+00121" +"ge;","U+02265" +"gel;","U+022DB" +"geq;","U+02265" +"geqq;","U+02267" +"geqslant;","U+02A7E" +"ges;","U+02A7E" +"gescc;","U+02AA9" +"gesdot;","U+02A80" +"gesdoto;","U+02A82" +"gesdotol;","U+02A84" +"gesles;","U+02A94" +"gfr;","U+1D524" +"gg;","U+0226B" +"ggg;","U+022D9" +"gimel;","U+02137" +"gjcy;","U+00453" +"gl;","U+02277" +"glE;","U+02A92" +"gla;","U+02AA5" +"glj;","U+02AA4" +"gnE;","U+02269" +"gnap;","U+02A8A" +"gnapprox;","U+02A8A" +"gne;","U+02A88" +"gneq;","U+02A88" +"gneqq;","U+02269" +"gnsim;","U+022E7" +"gopf;","U+1D558" +"grave;","U+00060" +"gscr;","U+0210A" +"gsim;","U+02273" +"gsime;","U+02A8E" +"gsiml;","U+02A90" +"gt;","U+0003E" +"gt","U+0003E" +"gtcc;","U+02AA7" +"gtcir;","U+02A7A" +"gtdot;","U+022D7" +"gtlPar;","U+02995" +"gtquest;","U+02A7C" +"gtrapprox;","U+02A86" +"gtrarr;","U+02978" +"gtrdot;","U+022D7" +"gtreqless;","U+022DB" +"gtreqqless;","U+02A8C" +"gtrless;","U+02277" +"gtrsim;","U+02273" +"hArr;","U+021D4" +"hairsp;","U+0200A" +"half;","U+000BD" +"hamilt;","U+0210B" +"hardcy;","U+0044A" +"harr;","U+02194" +"harrcir;","U+02948" +"harrw;","U+021AD" +"hbar;","U+0210F" +"hcirc;","U+00125" +"hearts;","U+02665" +"heartsuit;","U+02665" +"hellip;","U+02026" +"hercon;","U+022B9" +"hfr;","U+1D525" +"hksearow;","U+02925" +"hkswarow;","U+02926" +"hoarr;","U+021FF" +"homtht;","U+0223B" +"hookleftarrow;","U+021A9" +"hookrightarrow;","U+021AA" +"hopf;","U+1D559" +"horbar;","U+02015" +"hscr;","U+1D4BD" +"hslash;","U+0210F" +"hstrok;","U+00127" +"hybull;","U+02043" +"hyphen;","U+02010" +"iacute;","U+000ED" +"iacute","U+000ED" +"ic;","U+02063" +"icirc;","U+000EE" +"icirc","U+000EE" +"icy;","U+00438" +"iecy;","U+00435" +"iexcl;","U+000A1" +"iexcl","U+000A1" +"iff;","U+021D4" +"ifr;","U+1D526" +"igrave;","U+000EC" +"igrave","U+000EC" +"ii;","U+02148" +"iiiint;","U+02A0C" +"iiint;","U+0222D" +"iinfin;","U+029DC" +"iiota;","U+02129" +"ijlig;","U+00133" +"imacr;","U+0012B" +"image;","U+02111" +"imagline;","U+02110" +"imagpart;","U+02111" +"imath;","U+00131" +"imof;","U+022B7" +"imped;","U+001B5" +"in;","U+02208" +"incare;","U+02105" +"infin;","U+0221E" +"infintie;","U+029DD" +"inodot;","U+00131" +"int;","U+0222B" +"intcal;","U+022BA" +"integers;","U+02124" +"intercal;","U+022BA" +"intlarhk;","U+02A17" +"intprod;","U+02A3C" +"iocy;","U+00451" +"iogon;","U+0012F" +"iopf;","U+1D55A" +"iota;","U+003B9" +"iprod;","U+02A3C" +"iquest;","U+000BF" +"iquest","U+000BF" +"iscr;","U+1D4BE" +"isin;","U+02208" +"isinE;","U+022F9" +"isindot;","U+022F5" +"isins;","U+022F4" +"isinsv;","U+022F3" +"isinv;","U+02208" +"it;","U+02062" +"itilde;","U+00129" +"iukcy;","U+00456" +"iuml;","U+000EF" +"iuml","U+000EF" +"jcirc;","U+00135" +"jcy;","U+00439" +"jfr;","U+1D527" +"jmath;","U+00237" +"jopf;","U+1D55B" +"jscr;","U+1D4BF" +"jsercy;","U+00458" +"jukcy;","U+00454" +"kappa;","U+003BA" +"kappav;","U+003F0" +"kcedil;","U+00137" +"kcy;","U+0043A" +"kfr;","U+1D528" +"kgreen;","U+00138" +"khcy;","U+00445" +"kjcy;","U+0045C" +"kopf;","U+1D55C" +"kscr;","U+1D4C0" +"lAarr;","U+021DA" +"lArr;","U+021D0" +"lAtail;","U+0291B" +"lBarr;","U+0290E" +"lE;","U+02266" +"lEg;","U+02A8B" +"lHar;","U+02962" +"lacute;","U+0013A" +"laemptyv;","U+029B4" +"lagran;","U+02112" +"lambda;","U+003BB" +"lang;","U+027E8" +"langd;","U+02991" +"langle;","U+027E8" +"lap;","U+02A85" +"laquo;","U+000AB" +"laquo","U+000AB" +"larr;","U+02190" +"larrb;","U+021E4" +"larrbfs;","U+0291F" +"larrfs;","U+0291D" +"larrhk;","U+021A9" +"larrlp;","U+021AB" +"larrpl;","U+02939" +"larrsim;","U+02973" +"larrtl;","U+021A2" +"lat;","U+02AAB" +"latail;","U+02919" +"late;","U+02AAD" +"lbarr;","U+0290C" +"lbbrk;","U+02772" +"lbrace;","U+0007B" +"lbrack;","U+0005B" +"lbrke;","U+0298B" +"lbrksld;","U+0298F" +"lbrkslu;","U+0298D" +"lcaron;","U+0013E" +"lcedil;","U+0013C" +"lceil;","U+02308" +"lcub;","U+0007B" +"lcy;","U+0043B" +"ldca;","U+02936" +"ldquo;","U+0201C" +"ldquor;","U+0201E" +"ldrdhar;","U+02967" +"ldrushar;","U+0294B" +"ldsh;","U+021B2" +"le;","U+02264" +"leftarrow;","U+02190" +"leftarrowtail;","U+021A2" +"leftharpoondown;","U+021BD" +"leftharpoonup;","U+021BC" +"leftleftarrows;","U+021C7" +"leftrightarrow;","U+02194" +"leftrightarrows;","U+021C6" +"leftrightharpoons;","U+021CB" +"leftrightsquigarrow;","U+021AD" +"leftthreetimes;","U+022CB" +"leg;","U+022DA" +"leq;","U+02264" +"leqq;","U+02266" +"leqslant;","U+02A7D" +"les;","U+02A7D" +"lescc;","U+02AA8" +"lesdot;","U+02A7F" +"lesdoto;","U+02A81" +"lesdotor;","U+02A83" +"lesges;","U+02A93" +"lessapprox;","U+02A85" +"lessdot;","U+022D6" +"lesseqgtr;","U+022DA" +"lesseqqgtr;","U+02A8B" +"lessgtr;","U+02276" +"lesssim;","U+02272" +"lfisht;","U+0297C" +"lfloor;","U+0230A" +"lfr;","U+1D529" +"lg;","U+02276" +"lgE;","U+02A91" +"lhard;","U+021BD" +"lharu;","U+021BC" +"lharul;","U+0296A" +"lhblk;","U+02584" +"ljcy;","U+00459" +"ll;","U+0226A" +"llarr;","U+021C7" +"llcorner;","U+0231E" +"llhard;","U+0296B" +"lltri;","U+025FA" +"lmidot;","U+00140" +"lmoust;","U+023B0" +"lmoustache;","U+023B0" +"lnE;","U+02268" +"lnap;","U+02A89" +"lnapprox;","U+02A89" +"lne;","U+02A87" +"lneq;","U+02A87" +"lneqq;","U+02268" +"lnsim;","U+022E6" +"loang;","U+027EC" +"loarr;","U+021FD" +"lobrk;","U+027E6" +"longleftarrow;","U+027F5" +"longleftrightarrow;","U+027F7" +"longmapsto;","U+027FC" +"longrightarrow;","U+027F6" +"looparrowleft;","U+021AB" +"looparrowright;","U+021AC" +"lopar;","U+02985" +"lopf;","U+1D55D" +"loplus;","U+02A2D" +"lotimes;","U+02A34" +"lowast;","U+02217" +"lowbar;","U+0005F" +"loz;","U+025CA" +"lozenge;","U+025CA" +"lozf;","U+029EB" +"lpar;","U+00028" +"lparlt;","U+02993" +"lrarr;","U+021C6" +"lrcorner;","U+0231F" +"lrhar;","U+021CB" +"lrhard;","U+0296D" +"lrm;","U+0200E" +"lrtri;","U+022BF" +"lsaquo;","U+02039" +"lscr;","U+1D4C1" +"lsh;","U+021B0" +"lsim;","U+02272" +"lsime;","U+02A8D" +"lsimg;","U+02A8F" +"lsqb;","U+0005B" +"lsquo;","U+02018" +"lsquor;","U+0201A" +"lstrok;","U+00142" +"lt;","U+0003C" +"lt","U+0003C" +"ltcc;","U+02AA6" +"ltcir;","U+02A79" +"ltdot;","U+022D6" +"lthree;","U+022CB" +"ltimes;","U+022C9" +"ltlarr;","U+02976" +"ltquest;","U+02A7B" +"ltrPar;","U+02996" +"ltri;","U+025C3" +"ltrie;","U+022B4" +"ltrif;","U+025C2" +"lurdshar;","U+0294A" +"luruhar;","U+02966" +"mDDot;","U+0223A" +"macr;","U+000AF" +"macr","U+000AF" +"male;","U+02642" +"malt;","U+02720" +"maltese;","U+02720" +"map;","U+021A6" +"mapsto;","U+021A6" +"mapstodown;","U+021A7" +"mapstoleft;","U+021A4" +"mapstoup;","U+021A5" +"marker;","U+025AE" +"mcomma;","U+02A29" +"mcy;","U+0043C" +"mdash;","U+02014" +"measuredangle;","U+02221" +"mfr;","U+1D52A" +"mho;","U+02127" +"micro;","U+000B5" +"micro","U+000B5" +"mid;","U+02223" +"midast;","U+0002A" +"midcir;","U+02AF0" +"middot;","U+000B7" +"middot","U+000B7" +"minus;","U+02212" +"minusb;","U+0229F" +"minusd;","U+02238" +"minusdu;","U+02A2A" +"mlcp;","U+02ADB" +"mldr;","U+02026" +"mnplus;","U+02213" +"models;","U+022A7" +"mopf;","U+1D55E" +"mp;","U+02213" +"mscr;","U+1D4C2" +"mstpos;","U+0223E" +"mu;","U+003BC" +"multimap;","U+022B8" +"mumap;","U+022B8" +"nLeftarrow;","U+021CD" +"nLeftrightarrow;","U+021CE" +"nRightarrow;","U+021CF" +"nVDash;","U+022AF" +"nVdash;","U+022AE" +"nabla;","U+02207" +"nacute;","U+00144" +"nap;","U+02249" +"napos;","U+00149" +"napprox;","U+02249" +"natur;","U+0266E" +"natural;","U+0266E" +"naturals;","U+02115" +"nbsp;","U+000A0" +"nbsp","U+000A0" +"ncap;","U+02A43" +"ncaron;","U+00148" +"ncedil;","U+00146" +"ncong;","U+02247" +"ncup;","U+02A42" +"ncy;","U+0043D" +"ndash;","U+02013" +"ne;","U+02260" +"neArr;","U+021D7" +"nearhk;","U+02924" +"nearr;","U+02197" +"nearrow;","U+02197" +"nequiv;","U+02262" +"nesear;","U+02928" +"nexist;","U+02204" +"nexists;","U+02204" +"nfr;","U+1D52B" +"nge;","U+02271" +"ngeq;","U+02271" +"ngsim;","U+02275" +"ngt;","U+0226F" +"ngtr;","U+0226F" +"nhArr;","U+021CE" +"nharr;","U+021AE" +"nhpar;","U+02AF2" +"ni;","U+0220B" +"nis;","U+022FC" +"nisd;","U+022FA" +"niv;","U+0220B" +"njcy;","U+0045A" +"nlArr;","U+021CD" +"nlarr;","U+0219A" +"nldr;","U+02025" +"nle;","U+02270" +"nleftarrow;","U+0219A" +"nleftrightarrow;","U+021AE" +"nleq;","U+02270" +"nless;","U+0226E" +"nlsim;","U+02274" +"nlt;","U+0226E" +"nltri;","U+022EA" +"nltrie;","U+022EC" +"nmid;","U+02224" +"nopf;","U+1D55F" +"not;","U+000AC" +"not","U+000AC" +"notin;","U+02209" +"notinva;","U+02209" +"notinvb;","U+022F7" +"notinvc;","U+022F6" +"notni;","U+0220C" +"notniva;","U+0220C" +"notnivb;","U+022FE" +"notnivc;","U+022FD" +"npar;","U+02226" +"nparallel;","U+02226" +"npolint;","U+02A14" +"npr;","U+02280" +"nprcue;","U+022E0" +"nprec;","U+02280" +"nrArr;","U+021CF" +"nrarr;","U+0219B" +"nrightarrow;","U+0219B" +"nrtri;","U+022EB" +"nrtrie;","U+022ED" +"nsc;","U+02281" +"nsccue;","U+022E1" +"nscr;","U+1D4C3" +"nshortmid;","U+02224" +"nshortparallel;","U+02226" +"nsim;","U+02241" +"nsime;","U+02244" +"nsimeq;","U+02244" +"nsmid;","U+02224" +"nspar;","U+02226" +"nsqsube;","U+022E2" +"nsqsupe;","U+022E3" +"nsub;","U+02284" +"nsube;","U+02288" +"nsubseteq;","U+02288" +"nsucc;","U+02281" +"nsup;","U+02285" +"nsupe;","U+02289" +"nsupseteq;","U+02289" +"ntgl;","U+02279" +"ntilde;","U+000F1" +"ntilde","U+000F1" +"ntlg;","U+02278" +"ntriangleleft;","U+022EA" +"ntrianglelefteq;","U+022EC" +"ntriangleright;","U+022EB" +"ntrianglerighteq;","U+022ED" +"nu;","U+003BD" +"num;","U+00023" +"numero;","U+02116" +"numsp;","U+02007" +"nvDash;","U+022AD" +"nvHarr;","U+02904" +"nvdash;","U+022AC" +"nvinfin;","U+029DE" +"nvlArr;","U+02902" +"nvrArr;","U+02903" +"nwArr;","U+021D6" +"nwarhk;","U+02923" +"nwarr;","U+02196" +"nwarrow;","U+02196" +"nwnear;","U+02927" +"oS;","U+024C8" +"oacute;","U+000F3" +"oacute","U+000F3" +"oast;","U+0229B" +"ocir;","U+0229A" +"ocirc;","U+000F4" +"ocirc","U+000F4" +"ocy;","U+0043E" +"odash;","U+0229D" +"odblac;","U+00151" +"odiv;","U+02A38" +"odot;","U+02299" +"odsold;","U+029BC" +"oelig;","U+00153" +"ofcir;","U+029BF" +"ofr;","U+1D52C" +"ogon;","U+002DB" +"ograve;","U+000F2" +"ograve","U+000F2" +"ogt;","U+029C1" +"ohbar;","U+029B5" +"ohm;","U+003A9" +"oint;","U+0222E" +"olarr;","U+021BA" +"olcir;","U+029BE" +"olcross;","U+029BB" +"oline;","U+0203E" +"olt;","U+029C0" +"omacr;","U+0014D" +"omega;","U+003C9" +"omicron;","U+003BF" +"omid;","U+029B6" +"ominus;","U+02296" +"oopf;","U+1D560" +"opar;","U+029B7" +"operp;","U+029B9" +"oplus;","U+02295" +"or;","U+02228" +"orarr;","U+021BB" +"ord;","U+02A5D" +"order;","U+02134" +"orderof;","U+02134" +"ordf;","U+000AA" +"ordf","U+000AA" +"ordm;","U+000BA" +"ordm","U+000BA" +"origof;","U+022B6" +"oror;","U+02A56" +"orslope;","U+02A57" +"orv;","U+02A5B" +"oscr;","U+02134" +"oslash;","U+000F8" +"oslash","U+000F8" +"osol;","U+02298" +"otilde;","U+000F5" +"otilde","U+000F5" +"otimes;","U+02297" +"otimesas;","U+02A36" +"ouml;","U+000F6" +"ouml","U+000F6" +"ovbar;","U+0233D" +"par;","U+02225" +"para;","U+000B6" +"para","U+000B6" +"parallel;","U+02225" +"parsim;","U+02AF3" +"parsl;","U+02AFD" +"part;","U+02202" +"pcy;","U+0043F" +"percnt;","U+00025" +"period;","U+0002E" +"permil;","U+02030" +"perp;","U+022A5" +"pertenk;","U+02031" +"pfr;","U+1D52D" +"phi;","U+003C6" +"phiv;","U+003D5" +"phmmat;","U+02133" +"phone;","U+0260E" +"pi;","U+003C0" +"pitchfork;","U+022D4" +"piv;","U+003D6" +"planck;","U+0210F" +"planckh;","U+0210E" +"plankv;","U+0210F" +"plus;","U+0002B" +"plusacir;","U+02A23" +"plusb;","U+0229E" +"pluscir;","U+02A22" +"plusdo;","U+02214" +"plusdu;","U+02A25" +"pluse;","U+02A72" +"plusmn;","U+000B1" +"plusmn","U+000B1" +"plussim;","U+02A26" +"plustwo;","U+02A27" +"pm;","U+000B1" +"pointint;","U+02A15" +"popf;","U+1D561" +"pound;","U+000A3" +"pound","U+000A3" +"pr;","U+0227A" +"prE;","U+02AB3" +"prap;","U+02AB7" +"prcue;","U+0227C" +"pre;","U+02AAF" +"prec;","U+0227A" +"precapprox;","U+02AB7" +"preccurlyeq;","U+0227C" +"preceq;","U+02AAF" +"precnapprox;","U+02AB9" +"precneqq;","U+02AB5" +"precnsim;","U+022E8" +"precsim;","U+0227E" +"prime;","U+02032" +"primes;","U+02119" +"prnE;","U+02AB5" +"prnap;","U+02AB9" +"prnsim;","U+022E8" +"prod;","U+0220F" +"profalar;","U+0232E" +"profline;","U+02312" +"profsurf;","U+02313" +"prop;","U+0221D" +"propto;","U+0221D" +"prsim;","U+0227E" +"prurel;","U+022B0" +"pscr;","U+1D4C5" +"psi;","U+003C8" +"puncsp;","U+02008" +"qfr;","U+1D52E" +"qint;","U+02A0C" +"qopf;","U+1D562" +"qprime;","U+02057" +"qscr;","U+1D4C6" +"quaternions;","U+0210D" +"quatint;","U+02A16" +"quest;","U+0003F" +"questeq;","U+0225F" +"quot;","U+00022" +"quot","U+00022" +"rAarr;","U+021DB" +"rArr;","U+021D2" +"rAtail;","U+0291C" +"rBarr;","U+0290F" +"rHar;","U+02964" +"racute;","U+00155" +"radic;","U+0221A" +"raemptyv;","U+029B3" +"rang;","U+027E9" +"rangd;","U+02992" +"range;","U+029A5" +"rangle;","U+027E9" +"raquo;","U+000BB" +"raquo","U+000BB" +"rarr;","U+02192" +"rarrap;","U+02975" +"rarrb;","U+021E5" +"rarrbfs;","U+02920" +"rarrc;","U+02933" +"rarrfs;","U+0291E" +"rarrhk;","U+021AA" +"rarrlp;","U+021AC" +"rarrpl;","U+02945" +"rarrsim;","U+02974" +"rarrtl;","U+021A3" +"rarrw;","U+0219D" +"ratail;","U+0291A" +"ratio;","U+02236" +"rationals;","U+0211A" +"rbarr;","U+0290D" +"rbbrk;","U+02773" +"rbrace;","U+0007D" +"rbrack;","U+0005D" +"rbrke;","U+0298C" +"rbrksld;","U+0298E" +"rbrkslu;","U+02990" +"rcaron;","U+00159" +"rcedil;","U+00157" +"rceil;","U+02309" +"rcub;","U+0007D" +"rcy;","U+00440" +"rdca;","U+02937" +"rdldhar;","U+02969" +"rdquo;","U+0201D" +"rdquor;","U+0201D" +"rdsh;","U+021B3" +"real;","U+0211C" +"realine;","U+0211B" +"realpart;","U+0211C" +"reals;","U+0211D" +"rect;","U+025AD" +"reg;","U+000AE" +"reg","U+000AE" +"rfisht;","U+0297D" +"rfloor;","U+0230B" +"rfr;","U+1D52F" +"rhard;","U+021C1" +"rharu;","U+021C0" +"rharul;","U+0296C" +"rho;","U+003C1" +"rhov;","U+003F1" +"rightarrow;","U+02192" +"rightarrowtail;","U+021A3" +"rightharpoondown;","U+021C1" +"rightharpoonup;","U+021C0" +"rightleftarrows;","U+021C4" +"rightleftharpoons;","U+021CC" +"rightrightarrows;","U+021C9" +"rightsquigarrow;","U+0219D" +"rightthreetimes;","U+022CC" +"ring;","U+002DA" +"risingdotseq;","U+02253" +"rlarr;","U+021C4" +"rlhar;","U+021CC" +"rlm;","U+0200F" +"rmoust;","U+023B1" +"rmoustache;","U+023B1" +"rnmid;","U+02AEE" +"roang;","U+027ED" +"roarr;","U+021FE" +"robrk;","U+027E7" +"ropar;","U+02986" +"ropf;","U+1D563" +"roplus;","U+02A2E" +"rotimes;","U+02A35" +"rpar;","U+00029" +"rpargt;","U+02994" +"rppolint;","U+02A12" +"rrarr;","U+021C9" +"rsaquo;","U+0203A" +"rscr;","U+1D4C7" +"rsh;","U+021B1" +"rsqb;","U+0005D" +"rsquo;","U+02019" +"rsquor;","U+02019" +"rthree;","U+022CC" +"rtimes;","U+022CA" +"rtri;","U+025B9" +"rtrie;","U+022B5" +"rtrif;","U+025B8" +"rtriltri;","U+029CE" +"ruluhar;","U+02968" +"rx;","U+0211E" +"sacute;","U+0015B" +"sbquo;","U+0201A" +"sc;","U+0227B" +"scE;","U+02AB4" +"scap;","U+02AB8" +"scaron;","U+00161" +"sccue;","U+0227D" +"sce;","U+02AB0" +"scedil;","U+0015F" +"scirc;","U+0015D" +"scnE;","U+02AB6" +"scnap;","U+02ABA" +"scnsim;","U+022E9" +"scpolint;","U+02A13" +"scsim;","U+0227F" +"scy;","U+00441" +"sdot;","U+022C5" +"sdotb;","U+022A1" +"sdote;","U+02A66" +"seArr;","U+021D8" +"searhk;","U+02925" +"searr;","U+02198" +"searrow;","U+02198" +"sect;","U+000A7" +"sect","U+000A7" +"semi;","U+0003B" +"seswar;","U+02929" +"setminus;","U+02216" +"setmn;","U+02216" +"sext;","U+02736" +"sfr;","U+1D530" +"sfrown;","U+02322" +"sharp;","U+0266F" +"shchcy;","U+00449" +"shcy;","U+00448" +"shortmid;","U+02223" +"shortparallel;","U+02225" +"shy;","U+000AD " +"shy","U+000AD " +"sigma;","U+003C3" +"sigmaf;","U+003C2" +"sigmav;","U+003C2" +"sim;","U+0223C" +"simdot;","U+02A6A" +"sime;","U+02243" +"simeq;","U+02243" +"simg;","U+02A9E" +"simgE;","U+02AA0" +"siml;","U+02A9D" +"simlE;","U+02A9F" +"simne;","U+02246" +"simplus;","U+02A24" +"simrarr;","U+02972" +"slarr;","U+02190" +"smallsetminus;","U+02216" +"smashp;","U+02A33" +"smeparsl;","U+029E4" +"smid;","U+02223" +"smile;","U+02323" +"smt;","U+02AAA" +"smte;","U+02AAC" +"softcy;","U+0044C" +"sol;","U+0002F" +"solb;","U+029C4" +"solbar;","U+0233F" +"sopf;","U+1D564" +"spades;","U+02660" +"spadesuit;","U+02660" +"spar;","U+02225" +"sqcap;","U+02293" +"sqcup;","U+02294" +"sqsub;","U+0228F" +"sqsube;","U+02291" +"sqsubset;","U+0228F" +"sqsubseteq;","U+02291" +"sqsup;","U+02290" +"sqsupe;","U+02292" +"sqsupset;","U+02290" +"sqsupseteq;","U+02292" +"squ;","U+025A1" +"square;","U+025A1" +"squarf;","U+025AA" +"squf;","U+025AA" +"srarr;","U+02192" +"sscr;","U+1D4C8" +"ssetmn;","U+02216" +"ssmile;","U+02323" +"sstarf;","U+022C6" +"star;","U+02606" +"starf;","U+02605" +"straightepsilon;","U+003F5" +"straightphi;","U+003D5" +"strns;","U+000AF" +"sub;","U+02282" +"subE;","U+02AC5" +"subdot;","U+02ABD" +"sube;","U+02286" +"subedot;","U+02AC3" +"submult;","U+02AC1" +"subnE;","U+02ACB" +"subne;","U+0228A" +"subplus;","U+02ABF" +"subrarr;","U+02979" +"subset;","U+02282" +"subseteq;","U+02286" +"subseteqq;","U+02AC5" +"subsetneq;","U+0228A" +"subsetneqq;","U+02ACB" +"subsim;","U+02AC7" +"subsub;","U+02AD5" +"subsup;","U+02AD3" +"succ;","U+0227B" +"succapprox;","U+02AB8" +"succcurlyeq;","U+0227D" +"succeq;","U+02AB0" +"succnapprox;","U+02ABA" +"succneqq;","U+02AB6" +"succnsim;","U+022E9" +"succsim;","U+0227F" +"sum;","U+02211" +"sung;","U+0266A" +"sup1;","U+000B9" +"sup1","U+000B9" +"sup2;","U+000B2" +"sup2","U+000B2" +"sup3;","U+000B3" +"sup3","U+000B3" +"sup;","U+02283" +"supE;","U+02AC6" +"supdot;","U+02ABE" +"supdsub;","U+02AD8" +"supe;","U+02287" +"supedot;","U+02AC4" +"suphsol;","U+027C9" +"suphsub;","U+02AD7" +"suplarr;","U+0297B" +"supmult;","U+02AC2" +"supnE;","U+02ACC" +"supne;","U+0228B" +"supplus;","U+02AC0" +"supset;","U+02283" +"supseteq;","U+02287" +"supseteqq;","U+02AC6" +"supsetneq;","U+0228B" +"supsetneqq;","U+02ACC" +"supsim;","U+02AC8" +"supsub;","U+02AD4" +"supsup;","U+02AD6" +"swArr;","U+021D9" +"swarhk;","U+02926" +"swarr;","U+02199" +"swarrow;","U+02199" +"swnwar;","U+0292A" +"szlig;","U+000DF" +"szlig","U+000DF" +"target;","U+02316" +"tau;","U+003C4" +"tbrk;","U+023B4" +"tcaron;","U+00165" +"tcedil;","U+00163" +"tcy;","U+00442" +"tdot;","U+020DB" +"telrec;","U+02315" +"tfr;","U+1D531" +"there4;","U+02234" +"therefore;","U+02234" +"theta;","U+003B8" +"thetasym;","U+003D1" +"thetav;","U+003D1" +"thickapprox;","U+02248" +"thicksim;","U+0223C" +"thinsp;","U+02009" +"thkap;","U+02248" +"thksim;","U+0223C" +"thorn;","U+000FE" +"thorn","U+000FE" +"tilde;","U+002DC" +"times;","U+000D7" +"times","U+000D7" +"timesb;","U+022A0" +"timesbar;","U+02A31" +"timesd;","U+02A30" +"tint;","U+0222D" +"toea;","U+02928" +"top;","U+022A4" +"topbot;","U+02336" +"topcir;","U+02AF1" +"topf;","U+1D565" +"topfork;","U+02ADA" +"tosa;","U+02929" +"tprime;","U+02034" +"trade;","U+02122" +"triangle;","U+025B5" +"triangledown;","U+025BF" +"triangleleft;","U+025C3" +"trianglelefteq;","U+022B4" +"triangleq;","U+0225C" +"triangleright;","U+025B9" +"trianglerighteq;","U+022B5" +"tridot;","U+025EC" +"trie;","U+0225C" +"triminus;","U+02A3A" +"triplus;","U+02A39" +"trisb;","U+029CD" +"tritime;","U+02A3B" +"trpezium;","U+023E2" +"tscr;","U+1D4C9" +"tscy;","U+00446" +"tshcy;","U+0045B" +"tstrok;","U+00167" +"twixt;","U+0226C" +"twoheadleftarrow;","U+0219E" +"twoheadrightarrow;","U+021A0" +"uArr;","U+021D1" +"uHar;","U+02963" +"uacute;","U+000FA" +"uacute","U+000FA" +"uarr;","U+02191" +"ubrcy;","U+0045E" +"ubreve;","U+0016D" +"ucirc;","U+000FB" +"ucirc","U+000FB" +"ucy;","U+00443" +"udarr;","U+021C5" +"udblac;","U+00171" +"udhar;","U+0296E" +"ufisht;","U+0297E" +"ufr;","U+1D532" +"ugrave;","U+000F9" +"ugrave","U+000F9" +"uharl;","U+021BF" +"uharr;","U+021BE" +"uhblk;","U+02580" +"ulcorn;","U+0231C" +"ulcorner;","U+0231C" +"ulcrop;","U+0230F" +"ultri;","U+025F8" +"umacr;","U+0016B" +"uml;","U+000A8" +"uml","U+000A8" +"uogon;","U+00173" +"uopf;","U+1D566" +"uparrow;","U+02191" +"updownarrow;","U+02195" +"upharpoonleft;","U+021BF" +"upharpoonright;","U+021BE" +"uplus;","U+0228E" +"upsi;","U+003C5" +"upsih;","U+003D2" +"upsilon;","U+003C5" +"upuparrows;","U+021C8" +"urcorn;","U+0231D" +"urcorner;","U+0231D" +"urcrop;","U+0230E" +"uring;","U+0016F" +"urtri;","U+025F9" +"uscr;","U+1D4CA" +"utdot;","U+022F0" +"utilde;","U+00169" +"utri;","U+025B5" +"utrif;","U+025B4" +"uuarr;","U+021C8" +"uuml;","U+000FC" +"uuml","U+000FC" +"uwangle;","U+029A7" +"vArr;","U+021D5" +"vBar;","U+02AE8" +"vBarv;","U+02AE9" +"vDash;","U+022A8" +"vangrt;","U+0299C" +"varepsilon;","U+003F5" +"varkappa;","U+003F0" +"varnothing;","U+02205" +"varphi;","U+003D5" +"varpi;","U+003D6" +"varpropto;","U+0221D" +"varr;","U+02195" +"varrho;","U+003F1" +"varsigma;","U+003C2" +"vartheta;","U+003D1" +"vartriangleleft;","U+022B2" +"vartriangleright;","U+022B3" +"vcy;","U+00432" +"vdash;","U+022A2" +"vee;","U+02228" +"veebar;","U+022BB" +"veeeq;","U+0225A" +"vellip;","U+022EE" +"verbar;","U+0007C" +"vert;","U+0007C" +"vfr;","U+1D533" +"vltri;","U+022B2" +"vopf;","U+1D567" +"vprop;","U+0221D" +"vrtri;","U+022B3" +"vscr;","U+1D4CB" +"vzigzag;","U+0299A" +"wcirc;","U+00175" +"wedbar;","U+02A5F" +"wedge;","U+02227" +"wedgeq;","U+02259" +"weierp;","U+02118" +"wfr;","U+1D534" +"wopf;","U+1D568" +"wp;","U+02118" +"wr;","U+02240" +"wreath;","U+02240" +"wscr;","U+1D4CC" +"xcap;","U+022C2" +"xcirc;","U+025EF" +"xcup;","U+022C3" +"xdtri;","U+025BD" +"xfr;","U+1D535" +"xhArr;","U+027FA" +"xharr;","U+027F7" +"xi;","U+003BE" +"xlArr;","U+027F8" +"xlarr;","U+027F5" +"xmap;","U+027FC" +"xnis;","U+022FB" +"xodot;","U+02A00" +"xopf;","U+1D569" +"xoplus;","U+02A01" +"xotime;","U+02A02" +"xrArr;","U+027F9" +"xrarr;","U+027F6" +"xscr;","U+1D4CD" +"xsqcup;","U+02A06" +"xuplus;","U+02A04" +"xutri;","U+025B3" +"xvee;","U+022C1" +"xwedge;","U+022C0" +"yacute;","U+000FD" +"yacute","U+000FD" +"yacy;","U+0044F" +"ycirc;","U+00177" +"ycy;","U+0044B" +"yen;","U+000A5" +"yen","U+000A5" +"yfr;","U+1D536" +"yicy;","U+00457" +"yopf;","U+1D56A" +"yscr;","U+1D4CE" +"yucy;","U+0044E" +"yuml;","U+000FF" +"yuml","U+000FF" +"zacute;","U+0017A" +"zcaron;","U+0017E" +"zcy;","U+00437" +"zdot;","U+0017C" +"zeetrf;","U+02128" +"zeta;","U+003B6" +"zfr;","U+1D537" +"zhcy;","U+00436" +"zigrarr;","U+021DD" +"zopf;","U+1D56B" +"zscr;","U+1D4CF" +"zwj;","U+0200D" +"zwnj;","U+0200C" diff --git a/WebCore/html/HTMLEntityParser.cpp b/WebCore/html/parser/HTMLEntityParser.cpp index f675844..6a422b8 100644 --- a/WebCore/html/HTMLEntityParser.cpp +++ b/WebCore/html/parser/HTMLEntityParser.cpp @@ -45,23 +45,36 @@ static const UChar windowsLatin1ExtensionArray[32] = { 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178, // 98-9F }; -inline UChar adjustEntity(unsigned value) +inline UChar adjustEntity(UChar32 value) { if ((value & ~0x1F) != 0x0080) return value; return windowsLatin1ExtensionArray[value - 0x80]; } -inline unsigned legalEntityFor(unsigned value) +inline UChar32 legalEntityFor(UChar32 value) { // FIXME: A number of specific entity values generate parse errors. if (value == 0 || value > 0x10FFFF || (value >= 0xD800 && value <= 0xDFFF)) return 0xFFFD; - if (value < 0xFFFF) + if (U_IS_BMP(value)) return adjustEntity(value); return value; } +inline bool convertToUTF16(UChar32 value, Vector<UChar, 16>& decodedEntity) +{ + if (U_IS_BMP(value)) { + UChar character = static_cast<UChar>(value); + ASSERT(character == value); + decodedEntity.append(character); + return true; + } + decodedEntity.append(U16_LEAD(value)); + decodedEntity.append(U16_TRAIL(value)); + return true; +} + inline bool isHexDigit(UChar cc) { return (cc >= '0' && cc <= '9') || (cc >= 'a' && cc <= 'f') || (cc >= 'A' && cc <= 'F'); @@ -85,14 +98,15 @@ void unconsumeCharacters(SegmentedString& source, const Vector<UChar, 10>& consu } -unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, UChar additionalAllowedCharacter) +bool consumeHTMLEntity(SegmentedString& source, Vector<UChar, 16>& decodedEntity, bool& notEnoughCharacters, UChar additionalAllowedCharacter) { ASSERT(!additionalAllowedCharacter || additionalAllowedCharacter == '"' || additionalAllowedCharacter == '\'' || additionalAllowedCharacter == '>'); ASSERT(!notEnoughCharacters); + ASSERT(decodedEntity.isEmpty()); enum EntityState { Initial, - NumberType, + Number, MaybeHexLowerCaseX, MaybeHexUpperCaseX, Hex, @@ -100,7 +114,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U Named }; EntityState entityState = Initial; - unsigned result = 0; + UChar32 result = 0; Vector<UChar, 10> consumedCharacters; while (!source.isEmpty()) { @@ -108,20 +122,20 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U switch (entityState) { case Initial: { if (cc == '\x09' || cc == '\x0A' || cc == '\x0C' || cc == ' ' || cc == '<' || cc == '&') - return 0; + return false; if (additionalAllowedCharacter && cc == additionalAllowedCharacter) - return 0; + return false; if (cc == '#') { - entityState = NumberType; + entityState = Number; break; } if ((cc >= 'a' && cc <= 'z') || (cc >= 'A' && cc <= 'Z')) { entityState = Named; continue; } - return 0; + return false; } - case NumberType: { + case Number: { if (cc == 'x') { entityState = MaybeHexLowerCaseX; break; @@ -135,7 +149,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U continue; } source.push('#'); - return 0; + return false; } case MaybeHexLowerCaseX: { if (isHexDigit(cc)) { @@ -144,7 +158,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U } source.push('#'); source.push('x'); - return 0; + return false; } case MaybeHexUpperCaseX: { if (isHexDigit(cc)) { @@ -153,7 +167,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U } source.push('#'); source.push('X'); - return 0; + return false; } case Hex: { if (cc >= '0' && cc <= '9') @@ -162,21 +176,21 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U result = result * 16 + 10 + cc - 'a'; else if (cc >= 'A' && cc <= 'F') result = result * 16 + 10 + cc - 'A'; - else if (cc == ';') { - source.advancePastNonNewline(); - return legalEntityFor(result); - } else - return legalEntityFor(result); + else { + if (cc == ';') + source.advanceAndASSERT(cc); + return convertToUTF16(legalEntityFor(result), decodedEntity); + } break; } case Decimal: { if (cc >= '0' && cc <= '9') result = result * 10 + cc - '0'; - else if (cc == ';') { - source.advancePastNonNewline(); - return legalEntityFor(result); - } else - return legalEntityFor(result); + else { + if (cc == ';') + source.advanceAndASSERT(cc); + return convertToUTF16(legalEntityFor(result), decodedEntity); + } break; } case Named: { @@ -194,12 +208,12 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U // We can't an entity because there might be a longer entity // that we could match if we had more data. unconsumeCharacters(source, consumedCharacters); - return 0; + return false; } if (!entitySearch.mostRecentMatch()) { ASSERT(!entitySearch.currentValue()); unconsumeCharacters(source, consumedCharacters); - return 0; + return false; } if (entitySearch.mostRecentMatch()->length != entitySearch.currentLength()) { // We've consumed too many characters. We need to walk the @@ -218,12 +232,13 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U } cc = *source; } - if (entitySearch.mostRecentMatch()->lastCharacter() == ';') - return entitySearch.mostRecentMatch()->value; - if (!additionalAllowedCharacter || !(isAlphaNumeric(cc) || cc == '=')) - return entitySearch.mostRecentMatch()->value; + if (entitySearch.mostRecentMatch()->lastCharacter() == ';' + || !additionalAllowedCharacter + || !(isAlphaNumeric(cc) || cc == '=')) { + return convertToUTF16(entitySearch.mostRecentMatch()->value, decodedEntity); + } unconsumeCharacters(source, consumedCharacters); - return 0; + return false; } } consumedCharacters.append(cc); @@ -232,7 +247,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U ASSERT(source.isEmpty()); notEnoughCharacters = true; unconsumeCharacters(source, consumedCharacters); - return 0; + return false; } UChar decodeNamedEntity(const char* name) diff --git a/WebCore/html/HTMLEntityParser.h b/WebCore/html/parser/HTMLEntityParser.h index 1059b24..f02e849 100644 --- a/WebCore/html/HTMLEntityParser.h +++ b/WebCore/html/parser/HTMLEntityParser.h @@ -31,7 +31,7 @@ namespace WebCore { -unsigned consumeHTMLEntity(SegmentedString&, bool& notEnoughCharacters, UChar additionalAllowedCharacter = '\0'); +bool consumeHTMLEntity(SegmentedString&, Vector<UChar, 16>& decodedEntity, bool& notEnoughCharacters, UChar additionalAllowedCharacter = '\0'); // Used by the XML parser. Not suitable for use in HTML parsing. Use consumeHTMLEntity instead. UChar decodeNamedEntity(const char*); diff --git a/WebCore/html/HTMLEntitySearch.cpp b/WebCore/html/parser/HTMLEntitySearch.cpp index 580609e..580609e 100644 --- a/WebCore/html/HTMLEntitySearch.cpp +++ b/WebCore/html/parser/HTMLEntitySearch.cpp diff --git a/WebCore/html/HTMLEntitySearch.h b/WebCore/html/parser/HTMLEntitySearch.h index 11a23ae..0c66318 100644 --- a/WebCore/html/HTMLEntitySearch.h +++ b/WebCore/html/parser/HTMLEntitySearch.h @@ -39,7 +39,7 @@ public: void advance(UChar); bool isEntityPrefix() const { return !!m_first; } - int currentValue() const { return m_currentValue; } + UChar32 currentValue() const { return m_currentValue; } int currentLength() const { return m_currentLength; } const HTMLEntityTableEntry* mostRecentMatch() const { return m_mostRecentMatch; } @@ -63,7 +63,7 @@ private: } int m_currentLength; - int m_currentValue; + UChar32 m_currentValue; const HTMLEntityTableEntry* m_mostRecentMatch; const HTMLEntityTableEntry* m_first; diff --git a/WebCore/html/HTMLEntityTable.h b/WebCore/html/parser/HTMLEntityTable.h index 3734c34..3b9ab4e 100644 --- a/WebCore/html/HTMLEntityTable.h +++ b/WebCore/html/parser/HTMLEntityTable.h @@ -35,7 +35,7 @@ struct HTMLEntityTableEntry { const UChar* entity; int length; - int value; + UChar32 value; }; class HTMLEntityTable { diff --git a/WebCore/html/HTMLFormattingElementList.cpp b/WebCore/html/parser/HTMLFormattingElementList.cpp index 22bf03e..22bf03e 100644 --- a/WebCore/html/HTMLFormattingElementList.cpp +++ b/WebCore/html/parser/HTMLFormattingElementList.cpp diff --git a/WebCore/html/HTMLFormattingElementList.h b/WebCore/html/parser/HTMLFormattingElementList.h index aca05bb..aca05bb 100644 --- a/WebCore/html/HTMLFormattingElementList.h +++ b/WebCore/html/parser/HTMLFormattingElementList.h diff --git a/WebCore/html/HTMLParserScheduler.cpp b/WebCore/html/parser/HTMLParserScheduler.cpp index 6e67697..6e67697 100644 --- a/WebCore/html/HTMLParserScheduler.cpp +++ b/WebCore/html/parser/HTMLParserScheduler.cpp diff --git a/WebCore/html/HTMLParserScheduler.h b/WebCore/html/parser/HTMLParserScheduler.h index 5be33b0..5be33b0 100644 --- a/WebCore/html/HTMLParserScheduler.h +++ b/WebCore/html/parser/HTMLParserScheduler.h diff --git a/WebCore/html/HTMLPreloadScanner.cpp b/WebCore/html/parser/HTMLPreloadScanner.cpp index 7aafd90..7aafd90 100644 --- a/WebCore/html/HTMLPreloadScanner.cpp +++ b/WebCore/html/parser/HTMLPreloadScanner.cpp diff --git a/WebCore/html/HTMLPreloadScanner.h b/WebCore/html/parser/HTMLPreloadScanner.h index 94a90e6..94a90e6 100644 --- a/WebCore/html/HTMLPreloadScanner.h +++ b/WebCore/html/parser/HTMLPreloadScanner.h diff --git a/WebCore/html/HTMLScriptRunner.cpp b/WebCore/html/parser/HTMLScriptRunner.cpp index 6d470a0..6d470a0 100644 --- a/WebCore/html/HTMLScriptRunner.cpp +++ b/WebCore/html/parser/HTMLScriptRunner.cpp diff --git a/WebCore/html/HTMLScriptRunner.h b/WebCore/html/parser/HTMLScriptRunner.h index ead9289..ead9289 100644 --- a/WebCore/html/HTMLScriptRunner.h +++ b/WebCore/html/parser/HTMLScriptRunner.h diff --git a/WebCore/html/HTMLScriptRunnerHost.h b/WebCore/html/parser/HTMLScriptRunnerHost.h index 5b40a931..5b40a931 100644 --- a/WebCore/html/HTMLScriptRunnerHost.h +++ b/WebCore/html/parser/HTMLScriptRunnerHost.h diff --git a/WebCore/html/HTMLToken.h b/WebCore/html/parser/HTMLToken.h index 42cddb8..42cddb8 100644 --- a/WebCore/html/HTMLToken.h +++ b/WebCore/html/parser/HTMLToken.h diff --git a/WebCore/html/HTMLTokenizer.cpp b/WebCore/html/parser/HTMLTokenizer.cpp index a18701a..5791842 100644 --- a/WebCore/html/HTMLTokenizer.cpp +++ b/WebCore/html/parser/HTMLTokenizer.cpp @@ -67,6 +67,12 @@ inline void advanceStringAndASSERTIgnoringCase(SegmentedString& source, const ch source.advanceAndASSERTIgnoringCase(*expectedCharacters++); } +inline void advanceStringAndASSERT(SegmentedString& source, const char* expectedCharacters) +{ + while (*expectedCharacters) + source.advanceAndASSERT(*expectedCharacters++); +} + inline bool vectorEqualsString(const Vector<UChar, 32>& vector, const String& string) { if (vector.size() != string.length()) @@ -113,19 +119,25 @@ void HTMLTokenizer::reset() m_lineNumber = 0; m_skipLeadingNewLineForListing = false; m_forceNullCharacterReplacement = false; + m_shouldAllowCDATA = false; m_additionalAllowedCharacter = '\0'; } inline bool HTMLTokenizer::processEntity(SegmentedString& source) { bool notEnoughCharacters = false; - unsigned value = consumeHTMLEntity(source, notEnoughCharacters); + Vector<UChar, 16> decodedEntity; + bool success = consumeHTMLEntity(source, decodedEntity, notEnoughCharacters); if (notEnoughCharacters) return false; - if (!value) + if (!success) { + ASSERT(decodedEntity.isEmpty()); bufferCharacter('&'); - else - bufferCodePoint(value); + } else { + Vector<UChar>::const_iterator iter = decodedEntity.begin(); + for (; iter != decodedEntity.end(); ++iter) + bufferCharacter(*iter); + } return true; } @@ -1027,16 +1039,17 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token) BEGIN_STATE(CharacterReferenceInAttributeValueState) { bool notEnoughCharacters = false; - unsigned value = consumeHTMLEntity(source, notEnoughCharacters, m_additionalAllowedCharacter); + Vector<UChar, 16> decodedEntity; + bool success = consumeHTMLEntity(source, decodedEntity, notEnoughCharacters, m_additionalAllowedCharacter); if (notEnoughCharacters) return haveBufferedCharacterToken(); - if (!value) + if (!success) { + ASSERT(decodedEntity.isEmpty()); m_token->appendToAttributeValue('&'); - else if (value < 0xFFFF) - m_token->appendToAttributeValue(value); - else { - m_token->appendToAttributeValue(U16_LEAD(value)); - m_token->appendToAttributeValue(U16_TRAIL(value)); + } else { + Vector<UChar>::const_iterator iter = decodedEntity.begin(); + for (; iter != decodedEntity.end(); ++iter) + m_token->appendToAttributeValue(*iter); } // We're supposed to switch back to the attribute value state that // we were in when we were switched into this state. Rather than @@ -1105,6 +1118,7 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token) BEGIN_STATE(MarkupDeclarationOpenState) { DEFINE_STATIC_LOCAL(String, dashDashString, ("--")); DEFINE_STATIC_LOCAL(String, doctypeString, ("doctype")); + DEFINE_STATIC_LOCAL(String, cdataString, ("[CDATA[")); if (cc == '-') { SegmentedString::LookAheadResult result = source.lookAhead(dashDashString); if (result == SegmentedString::DidMatch) { @@ -1121,10 +1135,14 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token) SWITCH_TO(DOCTYPEState); } else if (result == SegmentedString::NotEnoughCharacters) return haveBufferedCharacterToken(); + } else if (cc == '[' && shouldAllowCDATA()) { + SegmentedString::LookAheadResult result = source.lookAhead(cdataString); + if (result == SegmentedString::DidMatch) { + advanceStringAndASSERT(source, "[CDATA["); + SWITCH_TO(CDATASectionState); + } else if (result == SegmentedString::NotEnoughCharacters) + return haveBufferedCharacterToken(); } - notImplemented(); - // FIXME: We're still missing the bits about the insertion mode being in foreign content: - // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#markup-declaration-open-state parseError(); RECONSUME_IN(BogusCommentState); } @@ -1599,9 +1617,34 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token) END_STATE() BEGIN_STATE(CDATASectionState) { - notImplemented(); - ADVANCE_TO(CDATASectionState); - // FIXME: Handle EOF properly. + if (cc == ']') + ADVANCE_TO(CDATASectionRightSquareBracketState); + else if (cc == InputStreamPreprocessor::endOfFileMarker) + RECONSUME_IN(DataState); + else { + bufferCharacter(cc); + ADVANCE_TO(CDATASectionState); + } + } + END_STATE() + + BEGIN_STATE(CDATASectionRightSquareBracketState) { + if (cc == ']') + ADVANCE_TO(CDATASectionDoubleRightSquareBracketState); + else { + bufferCharacter(']'); + RECONSUME_IN(CDATASectionState); + } + } + + BEGIN_STATE(CDATASectionDoubleRightSquareBracketState) { + if (cc == '>') + ADVANCE_TO(DataState); + else { + bufferCharacter(']'); + bufferCharacter(']'); + RECONSUME_IN(CDATASectionState); + } } END_STATE() @@ -1634,16 +1677,6 @@ inline void HTMLTokenizer::bufferCharacter(UChar character) m_token->appendToCharacter(character); } -inline void HTMLTokenizer::bufferCodePoint(unsigned value) -{ - if (value < 0xFFFF) { - bufferCharacter(value); - return; - } - bufferCharacter(U16_LEAD(value)); - bufferCharacter(U16_TRAIL(value)); -} - inline void HTMLTokenizer::parseError() { notImplemented(); diff --git a/WebCore/html/HTMLTokenizer.h b/WebCore/html/parser/HTMLTokenizer.h index 2b93e15..bab77f3 100644 --- a/WebCore/html/HTMLTokenizer.h +++ b/WebCore/html/parser/HTMLTokenizer.h @@ -114,6 +114,9 @@ public: AfterDOCTYPESystemIdentifierState, BogusDOCTYPEState, CDATASectionState, + // These CDATA states are not in the HTML5 spec, but we use them internally. + CDATASectionRightSquareBracketState, + CDATASectionDoubleRightSquareBracketState, }; static PassOwnPtr<HTMLTokenizer> create() { return adoptPtr(new HTMLTokenizer); } @@ -139,6 +142,9 @@ public: bool forceNullCharacterReplacement() const { return m_forceNullCharacterReplacement; } void setForceNullCharacterReplacement(bool value) { m_forceNullCharacterReplacement = value; } + bool shouldAllowCDATA() const { return m_shouldAllowCDATA; } + void setShouldAllowCDATA(bool value) { m_shouldAllowCDATA = value; } + bool shouldSkipNullCharacters() const { return !m_forceNullCharacterReplacement @@ -270,6 +276,7 @@ private: bool m_skipLeadingNewLineForListing; bool m_forceNullCharacterReplacement; + bool m_shouldAllowCDATA; // http://www.whatwg.org/specs/web-apps/current-work/#temporary-buffer Vector<UChar, 32> m_temporaryBuffer; diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/parser/HTMLTreeBuilder.cpp index 24eb62f..8c76fc0 100644 --- a/WebCore/html/HTMLTreeBuilder.cpp +++ b/WebCore/html/parser/HTMLTreeBuilder.cpp @@ -200,20 +200,6 @@ bool isSpecialNode(Node* node) || tagName == xmpTag; } -// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#scoping -// and isScopeMarker in HTMLElementStack.cpp -bool isScopingTag(const AtomicString& tagName) -{ - return tagName == appletTag - || tagName == captionTag - || tagName == SVGNames::foreignObjectTag - || tagName == htmlTag - || tagName == marqueeTag - || tagName == objectTag - || tagName == tableTag - || isTableCellContextTag(tagName); -} - bool isNonAnchorNonNobrFormattingTag(const AtomicString& tagName) { return tagName == bTag @@ -255,16 +241,6 @@ HTMLFormElement* closestFormAncestor(Element* element) return 0; } -// FIXME: This belongs on ContainerNode, where it could avoid the double ref -// by directly releasing into the Vector. Such an implementation would need to -// be careful not to send mutation events. -void takeChildrenFromNode(ContainerNode* container, Vector<RefPtr<Node> >& children) -{ - for (Node* child = container->firstChild(); child; child = child->nextSibling()) - children.append(child); - container->removeAllChildren(); -} - } // namespace class HTMLTreeBuilder::ExternalCharacterTokenBuffer : public Noncopyable { @@ -397,7 +373,7 @@ HTMLTreeBuilder::HTMLTreeBuilder(HTMLTokenizer* tokenizer, DocumentFragment* fra if (contextElement) { // Steps 4.2-4.6 of the HTML5 Fragment Case parsing algorithm: // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#fragment-case - m_document->setParseMode(contextElement->document()->parseMode()); + m_document->setCompatibilityMode(contextElement->document()->compatibilityMode()); processFakeStartTag(htmlTag); resetInsertionModeAppropriately(); m_tree.setForm(closestFormAncestor(contextElement)); @@ -431,6 +407,7 @@ HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext(DocumentFragment , m_contextElement(contextElement) , m_scriptingPermission(scriptingPermission) { + m_dummyDocumentForFragmentParsing->setCompatibilityMode(fragment->document()->compatibilityMode()); } Document* HTMLTreeBuilder::FragmentParsingContext::document() const @@ -445,15 +422,7 @@ void HTMLTreeBuilder::FragmentParsingContext::finished() ContainerNode* root = m_dummyDocumentForFragmentParsing.get(); if (m_contextElement) root = m_dummyDocumentForFragmentParsing->documentElement(); - Vector<RefPtr<Node> > children; - takeChildrenFromNode(root, children); - for (unsigned i = 0; i < children.size(); ++i) { - ExceptionCode ec = 0; - // FIXME: We need a parser-safe (no events) version of adoptNode. - RefPtr<Node> child = m_fragment->document()->adoptNode(children[i].release(), ec); - ASSERT(!ec); - m_fragment->parserAddChild(child.release()); - } + m_fragment->takeAllChildrenFrom(root); } HTMLTreeBuilder::FragmentParsingContext::~FragmentParsingContext() @@ -500,6 +469,7 @@ void HTMLTreeBuilder::constructTreeFromToken(HTMLToken& rawToken) // the U+0000 characters into replacement characters has compatibility // problems. m_tokenizer->setForceNullCharacterReplacement(m_insertionMode == TextMode || m_insertionMode == InForeignContentMode); + m_tokenizer->setShouldAllowCDATA(m_insertionMode == InForeignContentMode && m_tree.currentElement()->namespaceURI() != xhtmlNamespaceURI); } void HTMLTreeBuilder::processToken(AtomicHTMLToken& token) @@ -534,6 +504,7 @@ void HTMLTreeBuilder::processDoctypeToken(AtomicHTMLToken& token) ASSERT(token.type() == HTMLToken::DOCTYPE); if (m_insertionMode == InitialMode) { m_tree.insertDoctype(token); + setInsertionMode(BeforeHTMLMode); return; } if (m_insertionMode == InTableTextMode) { @@ -666,11 +637,6 @@ void mapLoweredLocalNameToName(PrefixedNameToQualifiedNameMap* map, QualifiedNam } } -void addName(PrefixedNameToQualifiedNameMap* map, const QualifiedName& name) -{ - map->add(name.localName().lower(), name); -} - void adjustSVGTagNameCase(AtomicHTMLToken& token) { static PrefixedNameToQualifiedNameMap* caseMap = 0; @@ -923,7 +889,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token) return; } if (token.name() == tableTag) { - if (m_document->parseMode() != Document::Compat && m_tree.openElements()->inButtonScope(pTag)) + if (!m_document->inQuirksMode() && m_tree.openElements()->inButtonScope(pTag)) processFakeEndTag(pTag); m_tree.insertHTMLElement(token); m_framesetOk = false; @@ -1152,7 +1118,7 @@ void HTMLTreeBuilder::processStartTagForInTable(AtomicHTMLToken& token) return; // FIXME: This deviates from the spec: // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10216 - m_tree.insertHTMLFormElement(token); + m_tree.insertHTMLFormElement(token, true); m_tree.openElements()->pop(); return; } @@ -1486,7 +1452,10 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token) || token.name() == keygenTag || token.name() == textareaTag) { parseError(token); - notImplemented(); // fragment case + if (!m_tree.openElements()->inTableScope(selectTag)) { + ASSERT(isParsingFragment()); + return; + } AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName()); processEndTag(endSelect); processStartTag(token); @@ -2356,7 +2325,11 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token) return; } if (token.name() == selectTag) { - notImplemented(); // fragment case + if (!m_tree.openElements()->inTableScope(token.name())) { + ASSERT(isParsingFragment()); + parseError(token); + return; + } m_tree.openElements()->popUntilPopped(selectTag.localName()); resetInsertionModeAppropriately(); return; @@ -2692,6 +2665,8 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token) void HTMLTreeBuilder::defaultForInitial() { notImplemented(); + if (!m_fragmentContext.fragment()) + m_document->setCompatibilityMode(Document::QuirksMode); // FIXME: parse error setInsertionMode(BeforeHTMLMode); } @@ -2851,8 +2826,9 @@ String serializeForNumberType(double number) // According to HTML5, "the best representation of the number n as a floating // point number" is a string produced by applying ToString() to n. NumberToStringBuffer buffer; - return String(buffer, numberToString(number, buffer)); - } + unsigned length = numberToString(number, buffer); + return String(buffer, length); +} // FIXME: Move this function to a more appropriate place. bool parseToDoubleForNumberType(const String& src, double* out) diff --git a/WebCore/html/HTMLTreeBuilder.h b/WebCore/html/parser/HTMLTreeBuilder.h index c30e6b8..c30e6b8 100644 --- a/WebCore/html/HTMLTreeBuilder.h +++ b/WebCore/html/parser/HTMLTreeBuilder.h diff --git a/WebCore/html/HTMLViewSourceParser.cpp b/WebCore/html/parser/HTMLViewSourceParser.cpp index 8a7984d..8a7984d 100644 --- a/WebCore/html/HTMLViewSourceParser.cpp +++ b/WebCore/html/parser/HTMLViewSourceParser.cpp diff --git a/WebCore/html/HTMLViewSourceParser.h b/WebCore/html/parser/HTMLViewSourceParser.h index 34caf43..34caf43 100644 --- a/WebCore/html/HTMLViewSourceParser.h +++ b/WebCore/html/parser/HTMLViewSourceParser.h diff --git a/WebCore/html/parser/create-html-entity-table b/WebCore/html/parser/create-html-entity-table new file mode 100755 index 0000000..e6132bc --- /dev/null +++ b/WebCore/html/parser/create-html-entity-table @@ -0,0 +1,178 @@ +#!/usr/bin/env python +# Copyright (c) 2010 Google Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import csv +import os.path +import string +import sys + +ENTITY = 0 +VALUE = 1 + +def convert_entity_to_cpp_name(entity): + postfix = "EntityName" + if entity[-1] == ";": + return "%sSemicolon%s" % (entity[:-1], postfix) + return "%s%s" % (entity, postfix) + + +def convert_entity_to_uchar_array(entity): + return "{'%s'}" % "', '".join(entity) + + +def convert_value_to_int(value): + assert(value[0] == "U") + assert(value[1] == "+") + return "0x" + value[2:] + + +def offset_table_entry(offset): + return " &staticEntityTable[%s]," % offset + + +program_name = os.path.basename(__file__) +if len(sys.argv) < 4 or sys.argv[1] != "-o": + print >> sys.stderr, "Usage: %s -o OUTPUT_FILE INPUT_FILE" % program_name + exit(1) + +output_path = sys.argv[2] +input_path = sys.argv[3] + +html_entity_names_file = open(input_path) +entries = list(csv.reader(html_entity_names_file)) +html_entity_names_file.close() + +entries.sort(lambda a, b: cmp(a[ENTITY], b[ENTITY])) +entity_count = len(entries) + +output_file = open(output_path, "w") + +print >> output_file, """/* + * Copyright (C) 2010 Google, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// THIS FILE IS GENERATED BY WebCore/html/parser/create-html-entity-table +// DO NOT EDIT (unless you are a ninja)! + +#include "config.h" +#include "HTMLEntityTable.h" + +namespace WebCore { + +namespace { +""" + +for entry in entries: + print >> output_file, "const UChar %sEntityName[] = %s;" % ( + convert_entity_to_cpp_name(entry[ENTITY]), + convert_entity_to_uchar_array(entry[ENTITY])) + +print >> output_file, """ +HTMLEntityTableEntry staticEntityTable[%s] = {""" % entity_count + +index = {} +offset = 0 +for entry in entries: + letter = entry[ENTITY][0] + if not index.get(letter): + index[letter] = offset + print >> output_file, ' { %sEntityName, %s, %s },' % ( + convert_entity_to_cpp_name(entry[ENTITY]), + len(entry[ENTITY]), + convert_value_to_int(entry[VALUE])) + offset += 1 + +print >> output_file, """}; +""" + +print >> output_file, "const HTMLEntityTableEntry* uppercaseOffset[] = {" +for letter in string.uppercase: + print >> output_file, offset_table_entry(index[letter]) +print >> output_file, offset_table_entry(index['a']) +print >> output_file, """}; + +const HTMLEntityTableEntry* lowercaseOffset[] = {""" +for letter in string.lowercase: + print >> output_file, offset_table_entry(index[letter]) +print >> output_file, offset_table_entry(entity_count) +print >> output_file, """}; + +} + +const HTMLEntityTableEntry* HTMLEntityTable::firstEntryStartingWith(UChar c) +{ + if (c >= 'A' && c <= 'Z') + return uppercaseOffset[c - 'A']; + if (c >= 'a' && c <= 'z') + return lowercaseOffset[c - 'a']; + return 0; +} + +const HTMLEntityTableEntry* HTMLEntityTable::lastEntryStartingWith(UChar c) +{ + if (c >= 'A' && c <= 'Z') + return uppercaseOffset[c - 'A' + 1] - 1; + if (c >= 'a' && c <= 'z') + return lowercaseOffset[c - 'a' + 1] - 1; + return 0; +} + +const HTMLEntityTableEntry* HTMLEntityTable::firstEntry() +{ + return &staticEntityTable[0]; +} + +const HTMLEntityTableEntry* HTMLEntityTable::lastEntry() +{ + return &staticEntityTable[%s - 1]; +} + +} +""" % entity_count |