| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 void Document::setXMLStandalone(bool standalone, ExceptionCode& ec) | 1231 void Document::setXMLStandalone(bool standalone, ExceptionCode& ec) |
| 1232 { | 1232 { |
| 1233 if (!implementation()->hasFeature("XML", String())) { | 1233 if (!implementation()->hasFeature("XML", String())) { |
| 1234 ec = NOT_SUPPORTED_ERR; | 1234 ec = NOT_SUPPORTED_ERR; |
| 1235 return; | 1235 return; |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 m_xmlStandalone = standalone ? Standalone : NotStandalone; | 1238 m_xmlStandalone = standalone ? Standalone : NotStandalone; |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 void Document::setDocumentURI(const String& uri) | |
| 1242 { | |
| 1243 // This property is read-only from JavaScript, but writable from Objective-C
. | |
| 1244 m_documentURI = uri; | |
| 1245 updateBaseURL(); | |
| 1246 } | |
| 1247 | |
| 1248 KURL Document::baseURI() const | 1241 KURL Document::baseURI() const |
| 1249 { | 1242 { |
| 1250 return m_baseURL; | 1243 return m_baseURL; |
| 1251 } | 1244 } |
| 1252 | 1245 |
| 1253 void Document::setContent(const String& content) | 1246 void Document::setContent(const String& content) |
| 1254 { | 1247 { |
| 1255 open(); | 1248 open(); |
| 1256 // FIXME: This should probably use insert(), but that's (intentionally) | 1249 // FIXME: This should probably use insert(), but that's (intentionally) |
| 1257 // not implemented for the XML parser as it's normally synonymous with | 1250 // not implemented for the XML parser as it's normally synonymous with |
| (...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 // first the value of the href attribute of the HTML BASE element if any, an
d the value of the documentURI attribute | 2437 // first the value of the href attribute of the HTML BASE element if any, an
d the value of the documentURI attribute |
| 2445 // from the Document interface otherwise. | 2438 // from the Document interface otherwise. |
| 2446 if (!m_baseElementURL.isEmpty()) | 2439 if (!m_baseElementURL.isEmpty()) |
| 2447 m_baseURL = m_baseElementURL; | 2440 m_baseURL = m_baseElementURL; |
| 2448 else if (!m_baseURLOverride.isEmpty()) | 2441 else if (!m_baseURLOverride.isEmpty()) |
| 2449 m_baseURL = m_baseURLOverride; | 2442 m_baseURL = m_baseURLOverride; |
| 2450 else { | 2443 else { |
| 2451 // The documentURI attribute is read-only from JavaScript, but writable
from Objective C, so we need to retain | 2444 // The documentURI attribute is read-only from JavaScript, but writable
from Objective C, so we need to retain |
| 2452 // this fallback behavior. We use a null base URL, since the documentURI
attribute is an arbitrary string | 2445 // this fallback behavior. We use a null base URL, since the documentURI
attribute is an arbitrary string |
| 2453 // and DOM 3 Core does not specify how it should be resolved. | 2446 // and DOM 3 Core does not specify how it should be resolved. |
| 2447 // FIXME: Now that we don't support Objective-C this can probably be rem
oved. |
| 2454 m_baseURL = KURL(ParsedURLString, documentURI()); | 2448 m_baseURL = KURL(ParsedURLString, documentURI()); |
| 2455 } | 2449 } |
| 2456 selectorQueryCache()->invalidate(); | 2450 selectorQueryCache()->invalidate(); |
| 2457 | 2451 |
| 2458 if (!m_baseURL.isValid()) | 2452 if (!m_baseURL.isValid()) |
| 2459 m_baseURL = KURL(); | 2453 m_baseURL = KURL(); |
| 2460 | 2454 |
| 2461 if (m_elemSheet) { | 2455 if (m_elemSheet) { |
| 2462 // Element sheet is silly. It never contains anything. | 2456 // Element sheet is silly. It never contains anything. |
| 2463 ASSERT(!m_elemSheet->contents()->ruleCount()); | 2457 ASSERT(!m_elemSheet->contents()->ruleCount()); |
| (...skipping 3255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5719 return; | 5713 return; |
| 5720 | 5714 |
| 5721 Vector<RefPtr<Element> > associatedFormControls; | 5715 Vector<RefPtr<Element> > associatedFormControls; |
| 5722 copyToVector(m_associatedFormControls, associatedFormControls); | 5716 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5723 | 5717 |
| 5724 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); | 5718 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); |
| 5725 m_associatedFormControls.clear(); | 5719 m_associatedFormControls.clear(); |
| 5726 } | 5720 } |
| 5727 | 5721 |
| 5728 } // namespace WebCore | 5722 } // namespace WebCore |
| OLD | NEW |