OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 406 } |
407 | 407 |
408 HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext() | 408 HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext() |
409 : m_fragment(0) | 409 : m_fragment(0) |
410 , m_contextElement(0) | 410 , m_contextElement(0) |
411 , m_scriptingPermission(FragmentScriptingAllowed) | 411 , m_scriptingPermission(FragmentScriptingAllowed) |
412 { | 412 { |
413 } | 413 } |
414 | 414 |
415 HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext(DocumentFragment
* fragment, Element* contextElement, FragmentScriptingPermission scriptingPermis
sion) | 415 HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext(DocumentFragment
* fragment, Element* contextElement, FragmentScriptingPermission scriptingPermis
sion) |
416 : m_dummyDocumentForFragmentParsing(HTMLDocument::create(0, KURL())) | 416 : m_dummyDocumentForFragmentParsing(HTMLDocument::create(0, KURL(), fragment
->document()->baseURI())) |
417 , m_fragment(fragment) | 417 , m_fragment(fragment) |
418 , m_contextElement(contextElement) | 418 , m_contextElement(contextElement) |
419 , m_scriptingPermission(scriptingPermission) | 419 , m_scriptingPermission(scriptingPermission) |
420 { | 420 { |
421 m_dummyDocumentForFragmentParsing->setCompatibilityMode(fragment->document()
->compatibilityMode()); | 421 m_dummyDocumentForFragmentParsing->setCompatibilityMode(fragment->document()
->compatibilityMode()); |
422 } | 422 } |
423 | 423 |
424 Document* HTMLTreeBuilder::FragmentParsingContext::document() const | 424 Document* HTMLTreeBuilder::FragmentParsingContext::document() const |
425 { | 425 { |
426 ASSERT(m_fragment); | 426 ASSERT(m_fragment); |
(...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2847 return false; | 2847 return false; |
2848 // -0 -> 0 | 2848 // -0 -> 0 |
2849 if (!value) | 2849 if (!value) |
2850 value = 0; | 2850 value = 0; |
2851 if (out) | 2851 if (out) |
2852 *out = value; | 2852 *out = value; |
2853 return true; | 2853 return true; |
2854 } | 2854 } |
2855 | 2855 |
2856 } | 2856 } |
OLD | NEW |