Changeset 120168 in webkit
- Timestamp:
- Jun 13, 2012 1:05:43 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 32 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r120167 r120168 1 2012-06-13 Hajime Morrita <morrita@chromium.org> 2 3 REGRESSION(r118098): <content> element does not render distributed children when cloned from another document 4 https://bugs.webkit.org/show_bug.cgi?id=88148 5 6 Reviewed by Dimitri Glazkov. 7 8 * fast/dom/shadow/elements-in-frameless-document-expected.txt: Added. 9 * fast/dom/shadow/elements-in-frameless-document.html: Added. 10 1 11 2012-06-12 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/Source/WebCore/CMakeLists.txt
r120057 r120168 460 460 461 461 bindings/generic/ActiveDOMCallback.cpp 462 bindings/generic/ContextEnabledFeatures.cpp463 462 bindings/generic/RuntimeEnabledFeatures.cpp 464 463 … … 560 559 dom/ContainerNodeAlgorithms.cpp 561 560 dom/ContextDestructionObserver.cpp 561 dom/ContextFeatures.cpp 562 562 dom/CustomEvent.cpp 563 563 dom/DatasetDOMStringMap.cpp -
trunk/Source/WebCore/ChangeLog
r120165 r120168 1 2012-06-13 MORITA Hajime <morrita@google.com> 2 3 REGRESSION(r118098): <content> element does not render distributed children when cloned from another document 4 https://bugs.webkit.org/show_bug.cgi?id=88148 5 6 Reviewed by Dimitri Glazkov. 7 8 The shadow DOM availability was decided through FrameLoaderClient. 9 But there are documents which don't have any associated frames, in 10 which any shadow DOM related elements cannot be constructed. That 11 resulsted the regression. 12 13 This change introduces a Page-based client called 14 ContextFeaturesClient which takes the role from FrameLoaderClient 15 to decide the feature availability, and ContextFeatures which is a 16 proxy of ContextFeaturesClient. ContextEnabledFeatures is is 17 replaced with ContextFeatures. 18 19 Each ContextFeatures object is owned by a Page, and is attached to 20 each Document in the page even if the page itself has no referenct 21 to Frames or Pages. With ContextFeatures, each Document can decide 22 the feature availability even if it cannot reach Page or Frame. 23 24 On RefCountedSupplement: Document instance can live longer than a 25 Page where it is shwon. This means that ContextFeatures instance 26 needs to survive after owner Page destruction because it's 27 referenced from possibly surviving Documents. RefCountedSupplement 28 is introduced to cover this scenario: It allows supplement classes 29 to live after Page's destruction. 30 31 RefCountedSupplement::hostDestroyed() is notified when the hosting 32 page is gone. ContextFeatures clears its reference to the client 33 using this notification. 34 35 Test: fast/dom/shadow/elements-in-frameless-document.html 36 37 * CMakeLists.txt: 38 * GNUmakefile.list.am: 39 * Target.pri: 40 * WebCore.gypi: 41 * WebCore.vcproj/WebCore.vcproj: 42 * WebCore.xcodeproj/project.pbxproj: 43 * bindings/scripts/CodeGeneratorV8.pm: 44 (GenerateImplementation): 45 * css/StyleResolver.cpp: 46 (WebCore::StyleResolver::determineScope): 47 * dom/ContextFeatures.cpp: Added. 48 (WebCore): 49 (WebCore::ContextFeaturesClient::empty): 50 (WebCore::ContextFeatures::supplementName): 51 (WebCore::ContextFeatures::defaultSwitch): 52 (WebCore::ContextFeatures::shadowDOMEnabled): 53 (WebCore::ContextFeatures::styleScopedEnabled): 54 (WebCore::ContextFeatures::pagePopupEnabled): 55 (WebCore::provideContextFeaturesTo): 56 (WebCore::provideContextFeaturesToDocumentFrom): 57 * dom/ContextFeatures.h: Added. 58 (WebCore): 59 (ContextFeatures): 60 (WebCore::ContextFeatures::ContextFeatures): 61 (WebCore::ContextFeatures::hostDestroyed): 62 (ContextFeaturesClient): 63 (WebCore::ContextFeaturesClient::~ContextFeaturesClient): 64 (WebCore::ContextFeaturesClient::isEnabled): 65 (WebCore::ContextFeatures::create): 66 (WebCore::ContextFeatures::isEnabled): 67 * dom/DOMAllInOne.cpp: 68 * dom/DOMImplementation.cpp: 69 (WebCore::DOMImplementation::createDocument): 70 (WebCore::DOMImplementation::createHTMLDocument): 71 * dom/Document.h: 72 (WebCore::Document::contextFeatures): 73 * dom/Document.cpp: 74 (WebCore::Document::Document): 75 (WebCore::Document::setContextFeatures): 76 * dom/Position.cpp: 77 (WebCore::Position::Position): 78 (WebCore::Position::findParent): 79 * dom/TreeScope.cpp: 80 (WebCore::TreeScope::getSelection): 81 * dom/make_names.pl: 82 (printConstructorInterior): 83 (printFactoryCppFile): 84 (printWrapperFunctions): 85 (printWrapperFactoryCppFile): 86 * editing/markup.cpp: 87 (WebCore::createFragmentFromMarkupWithContext): 88 * html/HTMLStyleElement.cpp: 89 (WebCore::HTMLStyleElement::registerWithScopingNode): 90 (WebCore::HTMLStyleElement::unregisterWithScopingNode): 91 * html/shadow/HTMLContentElement.cpp: 92 (WebCore::contentTagName): 93 * inspector/DOMPatchSupport.cpp: 94 (WebCore::DOMPatchSupport::patchDocument): 95 * loader/FrameLoaderClient.h: 96 * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h. 97 (WebCore): 98 (RefCountedSupplement): 99 (WebCore::RefCountedSupplement::hostDestroyed): 100 (Wrapper): 101 (WebCore::RefCountedSupplement::Wrapper::Wrapper): 102 (WebCore::RefCountedSupplement::Wrapper::~Wrapper): 103 (WebCore::RefCountedSupplement::Wrapper::wrapped): 104 (WebCore::RefCountedSupplement::provideTo): 105 (WebCore::RefCountedSupplement::from): 106 * platform/Supplementable.h: 107 (WebCore::Supplement::isRefCountedWrapper): 108 * xml/XMLHttpRequest.cpp: 109 (WebCore::XMLHttpRequest::responseXML): 110 1 111 2012-06-11 Kinuko Yasuda <kinuko@chromium.org> 2 112 -
trunk/Source/WebCore/GNUmakefile.list.am
r120154 r120168 1307 1307 Source/WebCore/bindings/generic/ActiveDOMCallback.cpp \ 1308 1308 Source/WebCore/bindings/generic/ActiveDOMCallback.h \ 1309 Source/WebCore/bindings/generic/ContextEnabledFeatures.cpp \1310 Source/WebCore/bindings/generic/ContextEnabledFeatures.h \1311 1309 Source/WebCore/bindings/generic/BindingSecurityBase.cpp \ 1312 1310 Source/WebCore/bindings/generic/BindingSecurityBase.h \ … … 1801 1799 Source/WebCore/dom/ContextDestructionObserver.cpp \ 1802 1800 Source/WebCore/dom/ContextDestructionObserver.h \ 1801 Source/WebCore/dom/ContextFeatures.cpp \ 1802 Source/WebCore/dom/ContextFeatures.h \ 1803 1803 Source/WebCore/dom/CrossThreadTask.h \ 1804 1804 Source/WebCore/dom/CustomEvent.cpp \ … … 3587 3587 Source/WebCore/platform/PurgeableBuffer.h \ 3588 3588 Source/WebCore/platform/PurgePriority.h \ 3589 Source/WebCore/platform/RefCountedSupplement.h \ 3589 3590 Source/WebCore/platform/ReferrerPolicy.h \ 3590 3591 Source/WebCore/platform/RunLoop.cpp \ -
trunk/Source/WebCore/Target.pri
r120154 r120168 73 73 accessibility/AXObjectCache.cpp \ 74 74 bindings/generic/ActiveDOMCallback.cpp \ 75 bindings/generic/ContextEnabledFeatures.cpp \76 75 bindings/generic/RuntimeEnabledFeatures.cpp 77 76 … … 530 529 dom/ContainerNodeAlgorithms.cpp \ 531 530 dom/ContextDestructionObserver.cpp \ 531 dom/ContextFeatures.cpp \ 532 532 dom/CustomEvent.cpp \ 533 533 dom/DecodedDataDocumentParser.cpp \ -
trunk/Source/WebCore/WebCore.gypi
r120156 r120168 310 310 'platform/PurgePriority.h', 311 311 'platform/RuntimeApplicationChecks.h', 312 'platform/RefCountedSupplement.h', 312 313 'platform/SchemeRegistry.h', 313 314 'platform/ScrollTypes.h', … … 618 619 'dom/ContainerNode.h', 619 620 'dom/ContextDestructionObserver.h', 621 'dom/ContextFeatures.h', 622 'dom/ContextFeatures.cpp', 620 623 'dom/DOMImplementation.h', 621 624 'dom/DOMTimeStamp.h', … … 1855 1858 'bindings/generic/BindingSecurityBase.cpp', 1856 1859 'bindings/generic/BindingSecurityBase.h', 1857 'bindings/generic/ContextEnabledFeatures.cpp',1858 'bindings/generic/ContextEnabledFeatures.h',1859 1860 'bindings/generic/GenericBinding.h', 1860 1861 'bindings/generic/RuntimeEnabledFeatures.cpp', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r120154 r120168 63219 63219 </File> 63220 63220 <File 63221 RelativePath="..\bindings\generic\ContextEnabledFeatures.cpp"63222 >63223 </File>63224 <File63225 RelativePath="..\bindings\generic\ContextEnabledFeatures.h"63226 >63227 </File>63228 <File63229 63221 RelativePath="..\bindings\generic\GenericBinding.h" 63230 63222 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r120154 r120168 3754 3754 A71878900B2D04AC00A16ECE /* DragControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */; }; 3755 3755 A723F77B1484CA4C008C6DBE /* PlatformExportMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A723F77A1484CA4C008C6DBE /* PlatformExportMacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3756 A72EA3BB1585CF55004FAA26 /* RefCountedSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = A72EA3BA1585CF55004FAA26 /* RefCountedSupplement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3756 3757 A73F95FE12C97BFE0031AAF9 /* RoundedRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A73F95FC12C97BFE0031AAF9 /* RoundedRect.cpp */; }; 3757 3758 A73F95FF12C97BFE0031AAF9 /* RoundedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = A73F95FD12C97BFE0031AAF9 /* RoundedRect.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3758 3759 A740B5A514C935AB00A77FA4 /* JSInternalSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B4EA7914C9348400C8F5BF /* JSInternalSettings.h */; }; 3759 3760 A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B4EA7814C9348400C8F5BF /* JSInternalSettings.cpp */; }; 3760 A747A07F156B286900243EED /* ContextEnabledFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A747A07D156B286900243EED /* ContextEnabledFeatures.cpp */; };3761 A747A080156B286900243EED /* ContextEnabledFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = A747A07E156B286900243EED /* ContextEnabledFeatures.h */; };3762 3761 A74BB76B13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h in Headers */ = {isa = PBXBuildFile; fileRef = A74BB76A13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3763 3762 A75E497610752ACB00C9B896 /* SerializedScriptValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A75E497410752ACB00C9B896 /* SerializedScriptValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3811 3810 A7D20F63107F406900A80392 /* JSWebGLActiveInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D20F61107F406900A80392 /* JSWebGLActiveInfo.h */; }; 3812 3811 A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D20F6B107F438B00A80392 /* WebGLActiveInfo.h */; }; 3812 A7D3CA10157DF8E900860A97 /* ContextFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D3CA0E157DF8E900860A97 /* ContextFeatures.cpp */; }; 3813 A7D3CA11157DF8E900860A97 /* ContextFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D3CA0F157DF8E900860A97 /* ContextFeatures.h */; }; 3813 3814 A7D6B3490F61104500B79FD1 /* WorkerScriptLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D6B3470F61104500B79FD1 /* WorkerScriptLoader.h */; }; 3814 3815 A7D6B34A0F61104500B79FD1 /* WorkerScriptLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D6B3480F61104500B79FD1 /* WorkerScriptLoader.cpp */; }; … … 10856 10857 A71A70C911AFB02000989D6D /* HTMLMeterElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLMeterElement.idl; sourceTree = "<group>"; }; 10857 10858 A723F77A1484CA4C008C6DBE /* PlatformExportMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformExportMacros.h; sourceTree = "<group>"; }; 10859 A72EA3BA1585CF55004FAA26 /* RefCountedSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefCountedSupplement.h; sourceTree = "<group>"; }; 10858 10860 A73F95FC12C97BFE0031AAF9 /* RoundedRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RoundedRect.cpp; sourceTree = "<group>"; }; 10859 10861 A73F95FD12C97BFE0031AAF9 /* RoundedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundedRect.h; sourceTree = "<group>"; }; 10860 A747A07D156B286900243EED /* ContextEnabledFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContextEnabledFeatures.cpp; path = generic/ContextEnabledFeatures.cpp; sourceTree = "<group>"; };10861 A747A07E156B286900243EED /* ContextEnabledFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContextEnabledFeatures.h; path = generic/ContextEnabledFeatures.h; sourceTree = "<group>"; };10862 10862 A74BB76A13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionCodePlaceholder.h; sourceTree = "<group>"; }; 10863 10863 A75E497410752ACB00C9B896 /* SerializedScriptValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedScriptValue.h; sourceTree = "<group>"; }; … … 10917 10917 A7D20F61107F406900A80392 /* JSWebGLActiveInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLActiveInfo.h; sourceTree = "<group>"; }; 10918 10918 A7D20F6B107F438B00A80392 /* WebGLActiveInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLActiveInfo.h; path = canvas/WebGLActiveInfo.h; sourceTree = "<group>"; }; 10919 A7D3CA0E157DF8E900860A97 /* ContextFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContextFeatures.cpp; sourceTree = "<group>"; }; 10920 A7D3CA0F157DF8E900860A97 /* ContextFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextFeatures.h; sourceTree = "<group>"; }; 10919 10921 A7D6B3470F61104500B79FD1 /* WorkerScriptLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerScriptLoader.h; path = workers/WorkerScriptLoader.h; sourceTree = "<group>"; }; 10920 10922 A7D6B3480F61104500B79FD1 /* WorkerScriptLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerScriptLoader.cpp; path = workers/WorkerScriptLoader.cpp; sourceTree = "<group>"; }; … … 19768 19770 A622A8F6122C44A600A785B3 /* BindingSecurityBase.cpp */, 19769 19771 A622A8F7122C44A600A785B3 /* BindingSecurityBase.h */, 19770 A747A07D156B286900243EED /* ContextEnabledFeatures.cpp */,19771 A747A07E156B286900243EED /* ContextEnabledFeatures.h */,19772 19772 A622A8F9122C44A600A785B3 /* GenericBinding.h */, 19773 19773 ); … … 20486 20486 E4D687780ED7AE4F006EA978 /* PurgeableBuffer.h */, 20487 20487 7E33CD00127F340D00BE8F17 /* PurgePriority.h */, 20488 A72EA3BA1585CF55004FAA26 /* RefCountedSupplement.h */, 20488 20489 9831AE49154225A200FE2644 /* ReferrerPolicy.h */, 20489 20490 BC0B358514C4F9830055E22A /* RunLoop.cpp */, … … 21208 21209 97627B8B14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp */, 21209 21210 97627B8C14FB3CEE002CDCA1 /* ContextDestructionObserver.h */, 21211 A7D3CA0E157DF8E900860A97 /* ContextFeatures.cpp */, 21212 A7D3CA0F157DF8E900860A97 /* ContextFeatures.h */, 21210 21213 2E3FAA0811A36BF100576624 /* CrossThreadTask.h */, 21211 21214 62CD32561157E57C0063B0A7 /* CustomEvent.cpp */, … … 22061 22064 370D6EDB138454550044103E /* ContentTypeParser.h in Headers */, 22062 22065 97627B8E14FB3CEE002CDCA1 /* ContextDestructionObserver.h in Headers */, 22063 A7 47A080156B286900243EED /* ContextEnabledFeatures.h in Headers */,22066 A7D3CA11157DF8E900860A97 /* ContextFeatures.h in Headers */, 22064 22067 93B6A0E60B0BCA5C00F5027A /* ContextMenu.h in Headers */, 22065 22068 065AD4F50B0C2EDA005A2B1D /* ContextMenuClient.h in Headers */, … … 24171 24174 FD31603E12B0267600C1A359 /* RealtimeAnalyserNode.h in Headers */, 24172 24175 BC4368E80C226E32005EFB5F /* Rect.h in Headers */, 24176 A72EA3BB1585CF55004FAA26 /* RefCountedSupplement.h in Headers */, 24173 24177 9831AE4A154225C900FE2644 /* ReferrerPolicy.h in Headers */, 24174 24178 BCAB418213E356E800D8AAF3 /* Region.h in Headers */, … … 25584 25588 370D6EDA138454550044103E /* ContentTypeParser.cpp in Sources */, 25585 25589 97627B8D14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp in Sources */, 25586 A7 47A07F156B286900243EED /* ContextEnabledFeatures.cpp in Sources */,25590 A7D3CA10157DF8E900860A97 /* ContextFeatures.cpp in Sources */, 25587 25591 065AD4F60B0C2EDA005A2B1D /* ContextMenuController.cpp in Sources */, 25588 25592 06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */, -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r120057 r120168 2418 2418 2419 2419 AddToImplIncludes("RuntimeEnabledFeatures.h"); 2420 AddToImplIncludes("Context EnabledFeatures.h");2420 AddToImplIncludes("ContextFeatures.h"); 2421 2421 AddToImplIncludes("V8Proxy.h"); 2422 2422 AddToImplIncludes("V8Binding.h"); … … 2867 2867 my $conditionalString = $codeGenerator->GenerateConditionalString($runtimeAttr->signature); 2868 2868 push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString; 2869 push(@implContent, " if (Context EnabledFeatures::${enableFunction}(impl)) {\n");2869 push(@implContent, " if (ContextFeatures::${enableFunction}(impl->document())) {\n"); 2870 2870 push(@implContent, " static const BatchedAttribute attrData =\\\n"); 2871 2871 GenerateSingleBatchedAttribute($interfaceName, $runtimeAttr, ";", " "); -
trunk/Source/WebCore/css/StyleResolver.cpp
r120154 r120168 56 56 #include "CalculationValue.h" 57 57 #include "ContentData.h" 58 #include "Context EnabledFeatures.h"58 #include "ContextFeatures.h" 59 59 #include "Counter.h" 60 60 #include "CounterContent.h" … … 496 496 ASSERT(sheet); 497 497 498 if (!Context EnabledFeatures::styleScopedEnabled(document()))498 if (!ContextFeatures::styleScopedEnabled(document())) 499 499 return 0; 500 500 -
trunk/Source/WebCore/dom/DOMAllInOne.cpp
r120057 r120168 45 45 #include "ContainerNodeAlgorithms.cpp" 46 46 #include "ContextDestructionObserver.cpp" 47 #include "ContextFeatures.cpp" 47 48 #include "CustomEvent.cpp" 48 49 #include "DOMCoreException.cpp" -
trunk/Source/WebCore/dom/DOMImplementation.cpp
r120057 r120168 28 28 #include "ContentType.h" 29 29 #include "CSSStyleSheet.h" 30 #include "ContextFeatures.h" 30 31 #include "DocumentType.h" 31 32 #include "Element.h" … … 296 297 297 298 doc->setSecurityOrigin(m_document->securityOrigin()); 299 doc->setContextFeatures(m_document->contextFeatures()); 298 300 299 301 RefPtr<Node> documentElement; … … 373 375 d->setTitle(title); 374 376 d->setSecurityOrigin(m_document->securityOrigin()); 377 d->setContextFeatures(m_document->contextFeatures()); 375 378 return d.release(); 376 379 } -
trunk/Source/WebCore/dom/Document.cpp
r120093 r120168 45 45 #include "Console.h" 46 46 #include "ContentSecurityPolicy.h" 47 #include "ContextFeatures.h" 47 48 #include "CookieJar.h" 48 49 #include "DOMImplementation.h" … … 429 430 , TreeScope(this) 430 431 , m_guardRefCount(0) 432 , m_contextFeatures(ContextFeatures::defaultSwitch()) 431 433 , m_compatibilityMode(NoQuirksMode) 432 434 , m_compatibilityModeLocked(false) … … 507 509 508 510 m_frame = frame; 511 if (m_frame) 512 provideContextFeaturesToDocumentFrom(this, m_frame->page()); 509 513 510 514 // We depend on the url getting immediately set in subframes, but we … … 667 671 m_titleElement = 0; 668 672 m_documentElement = 0; 673 m_contextFeatures = ContextFeatures::defaultSwitch(); 669 674 #if ENABLE(FULLSCREEN_API) 670 675 m_fullScreenElement = 0; … … 5983 5988 } 5984 5989 5990 void Document::setContextFeatures(PassRefPtr<ContextFeatures> features) 5991 { 5992 m_contextFeatures = features; 5993 } 5994 5985 5995 #if ENABLE(UNDO_MANAGER) 5986 5996 PassRefPtr<UndoManager> Document::undoManager() -
trunk/Source/WebCore/dom/Document.h
r120093 r120168 68 68 class CharacterData; 69 69 class Comment; 70 class ContextFeatures; 70 71 class DOMImplementation; 71 72 class DOMSelection; … … 1124 1125 void adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale(FloatRect&, RenderObject*); 1125 1126 1127 void setContextFeatures(PassRefPtr<ContextFeatures>); 1128 ContextFeatures* contextFeatures() { return m_contextFeatures.get(); } 1129 1126 1130 protected: 1127 1131 Document(Frame*, const KURL&, bool isXHTML, bool isHTML); … … 1218 1222 OwnPtr<CachedResourceLoader> m_cachedResourceLoader; 1219 1223 RefPtr<DocumentParser> m_parser; 1224 RefPtr<ContextFeatures> m_contextFeatures; 1225 1220 1226 bool m_wellFormed; 1221 1227 -
trunk/Source/WebCore/dom/Position.cpp
r120057 r120168 28 28 29 29 #include "CSSComputedStyleDeclaration.h" 30 #include "Context EnabledFeatures.h"30 #include "ContextFeatures.h" 31 31 #include "HTMLNames.h" 32 32 #include "InlineTextBox.h" … … 83 83 { 84 84 #if ENABLE(SHADOW_DOM) 85 ASSERT((m_anchorNode && Context EnabledFeatures::shadowDOMEnabled(m_anchorNode->document()->domWindow()))85 ASSERT((m_anchorNode && ContextFeatures::shadowDOMEnabled(m_anchorNode->document())) 86 86 || !m_anchorNode || !m_anchorNode->isShadowRoot()); 87 87 #else … … 97 97 { 98 98 #if ENABLE(SHADOW_DOM) 99 ASSERT((m_anchorNode && Context EnabledFeatures::shadowDOMEnabled(m_anchorNode->document()->domWindow()))99 ASSERT((m_anchorNode && ContextFeatures::shadowDOMEnabled(m_anchorNode->document())) 100 100 || !m_anchorNode || !m_anchorNode->isShadowRoot()); 101 101 #else … … 115 115 { 116 116 #if ENABLE(SHADOW_DOM) 117 ASSERT((m_anchorNode && Context EnabledFeatures::shadowDOMEnabled(m_anchorNode->document()->domWindow()))117 ASSERT((m_anchorNode && ContextFeatures::shadowDOMEnabled(m_anchorNode->document())) 118 118 || !m_anchorNode || !editingIgnoresContent(m_anchorNode.get()) || !m_anchorNode->isShadowRoot()); 119 119 #else … … 858 858 859 859 #if ENABLE(SHADOW_DOM) 860 if (Context EnabledFeatures::shadowDOMEnabled(node->document()->domWindow()))860 if (ContextFeatures::shadowDOMEnabled(node->document())) 861 861 return node->parentNode(); 862 862 #endif -
trunk/Source/WebCore/dom/TreeScope.cpp
r120057 r120168 28 28 29 29 #include "ContainerNode.h" 30 #include "Context EnabledFeatures.h"30 #include "ContextFeatures.h" 31 31 #include "DOMSelection.h" 32 32 #include "DOMWindow.h" … … 151 151 // See https://bugs.webkit.org/show_bug.cgi?id=82697 152 152 #if ENABLE(SHADOW_DOM) 153 if (Context EnabledFeatures::shadowDOMEnabled(rootNode()->document()->domWindow())) {153 if (ContextFeatures::shadowDOMEnabled(rootNode()->document())) { 154 154 m_selection = DOMSelection::create(this); 155 155 return m_selection.get(); -
trunk/Source/WebCore/dom/make_names.pl
r120057 r120168 379 379 if ($contextConditional) { 380 380 print F <<END 381 if (!Context EnabledFeatures::${contextConditional}Enabled(document->domWindow()))381 if (!ContextFeatures::${contextConditional}Enabled(document)) 382 382 return 0; 383 383 END … … 805 805 print F <<END 806 806 807 #include "Context EnabledFeatures.h"807 #include "ContextFeatures.h" 808 808 809 809 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(VIDEO) … … 1014 1014 static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element) 1015 1015 { 1016 if (!Context EnabledFeatures::${contextConditional}Enabled(element->document()->domWindow())) {1016 if (!ContextFeatures::${contextConditional}Enabled(element->document())) { 1017 1017 ASSERT(!element || element->is$parameters{fallbackInterfaceName}()); 1018 1018 return CREATE_DOM_WRAPPER(exec, globalObject, $parameters{fallbackInterfaceName}, element.get()); … … 1051 1051 static v8::Handle<v8::Value> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element, v8::Isolate* isolate) 1052 1052 { 1053 if (!Context EnabledFeatures::${contextConditional}Enabled(element->document()->domWindow()))1053 if (!ContextFeatures::${contextConditional}Enabled(element->document())) 1054 1054 return V8$parameters{fallbackInterfaceName}::wrap(to$parameters{fallbackInterfaceName}(element), isolate); 1055 1055 return toV8(static_cast<${JSInterfaceName}*>(element), isolate); … … 1112 1112 print F <<END 1113 1113 1114 #include "Context EnabledFeatures.h"1114 #include "ContextFeatures.h" 1115 1115 1116 1116 #if ENABLE(VIDEO) -
trunk/Source/WebCore/editing/markup.cpp
r120057 r120168 40 40 #include "CSSValueKeywords.h" 41 41 #include "ChildListMutationScope.h" 42 #include "ContextFeatures.h" 42 43 #include "DeleteButtonController.h" 43 44 #include "DocumentFragment.h" … … 731 732 RefPtr<DocumentFragment> taggedFragment = createFragmentFromMarkup(document, taggedMarkup.toString(), baseURL, scriptingPermission); 732 733 RefPtr<Document> taggedDocument = Document::create(0, KURL()); 734 taggedDocument->setContextFeatures(document->contextFeatures()); 733 735 taggedDocument->takeAllChildrenFrom(taggedFragment.get()); 734 736 -
trunk/Source/WebCore/html/HTMLStyleElement.cpp
r120062 r120168 26 26 27 27 #include "Attribute.h" 28 #include "Context EnabledFeatures.h"28 #include "ContextFeatures.h" 29 29 #include "Document.h" 30 30 #include "Event.h" … … 132 132 if (m_scopedStyleRegistrationState != NotRegistered) 133 133 return; 134 if (!Context EnabledFeatures::styleScopedEnabled(document()))134 if (!ContextFeatures::styleScopedEnabled(document())) 135 135 return; 136 136 … … 157 157 // Note: We cannot rely on the 'scoped' element still being present when this method is invoked. 158 158 // Therefore we cannot rely on scoped()! 159 ASSERT(m_scopedStyleRegistrationState != NotRegistered || !Context EnabledFeatures::styleScopedEnabled(document()));159 ASSERT(m_scopedStyleRegistrationState != NotRegistered || !ContextFeatures::styleScopedEnabled(document())); 160 160 if (m_scopedStyleRegistrationState == NotRegistered) 161 161 return; 162 if (!Context EnabledFeatures::styleScopedEnabled(document()))162 if (!ContextFeatures::styleScopedEnabled(document())) 163 163 return; 164 164 -
trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp
r120057 r120168 30 30 #include "ContentDistributor.h" 31 31 #include "ContentSelectorQuery.h" 32 #include "Context EnabledFeatures.h"32 #include "ContextFeatures.h" 33 33 #include "ElementShadow.h" 34 34 #include "HTMLNames.h" … … 44 44 { 45 45 #if ENABLE(SHADOW_DOM) 46 if (!Context EnabledFeatures::shadowDOMEnabled(document->domWindow()))46 if (!ContextFeatures::shadowDOMEnabled(document)) 47 47 return HTMLNames::webkitShadowContentTag; 48 48 return HTMLNames::contentTag; -
trunk/Source/WebCore/inspector/DOMPatchSupport.cpp
r120057 r120168 37 37 #include "Attribute.h" 38 38 #include "Base64.h" 39 #include "ContextFeatures.h" 39 40 #include "DOMEditor.h" 40 41 #include "Document.h" … … 90 91 { 91 92 RefPtr<HTMLDocument> newDocument = HTMLDocument::create(0, KURL()); 93 newDocument->setContextFeatures(m_document->contextFeatures()); 92 94 RefPtr<DocumentParser> parser = HTMLDocumentParser::create(newDocument.get(), false); 93 95 parser->insert(markup); // Use insert() so that the parser will not yield. -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r120057 r120168 312 312 virtual bool allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin*, const KURL&) { return enabledPerSettings; } 313 313 314 virtual bool allowShadowDOM(bool enabledAsRuntimeFeatures) { return enabledAsRuntimeFeatures; }315 virtual bool allowStyleScoped(bool enabledAsRuntimeFeatures) { return enabledAsRuntimeFeatures; }316 #if ENABLE(PAGE_POPUP)317 virtual bool allowPagePopup() { return false; }318 #endif319 320 314 // This callback notifies the client that the frame was about to run 321 315 // JavaScript but did not because allowScript returned false. We -
trunk/Source/WebCore/platform/RefCountedSupplement.h
r120167 r120168 24 24 */ 25 25 26 #ifndef Supplementable_h27 #define Supplementable_h26 #ifndef RefCountedSupplement_h 27 #define RefCountedSupplement_H 28 28 29 #include <wtf/HashMap.h> 30 #include <wtf/PassOwnPtr.h> 31 #include <wtf/text/AtomicString.h> 32 #include <wtf/text/AtomicStringHash.h> 29 #include "Supplementable.h" 30 #include <wtf/RefCounted.h> 31 #include <wtf/RefPtr.h> 33 32 34 33 namespace WebCore { 35 34 36 template<typename T> 37 class Supplementable; 35 template<class T, class S> 36 class RefCountedSupplement : public RefCounted<S> { 37 public: 38 typedef RefCountedSupplement<T, S> ThisType; 38 39 39 template<typename T> 40 class Supplement { 41 public: 42 virtual ~Supplement() { } 40 virtual ~RefCountedSupplement() { } 41 virtual void hostDestroyed() { } 43 42 44 static void provideTo(Supplementable<T>* host, const AtomicString& key, PassOwnPtr<Supplement<T> > supplement) 43 class Wrapper : public Supplement<T> { 44 public: 45 explicit Wrapper(PassRefPtr<ThisType> wrapped) : m_wrapped(wrapped) { } 46 virtual ~Wrapper() { m_wrapped->hostDestroyed(); } 47 #if !ASSERT_DISABLED 48 virtual bool isRefCountedWrapper() const OVERRIDE { return true; } 49 #endif 50 ThisType* wrapped() const { return m_wrapped.get(); } 51 private: 52 53 RefPtr<ThisType> m_wrapped; 54 }; 55 56 static void provideTo(Supplementable<T>* host, const AtomicString& key, PassRefPtr<ThisType> supplement) 45 57 { 46 host->provideSupplement(key, supplement);58 host->provideSupplement(key, adoptPtr(new Wrapper(supplement))); 47 59 } 48 60 49 static Supplement<T>* from(Supplementable<T>* host, const AtomicString& key)61 static ThisType* from(Supplementable<T>* host, const AtomicString& key) 50 62 { 51 return host ? host->requireSupplement(key) : 0; 63 Supplement<T>* found = host->requireSupplement(key); 64 if (!found) 65 return 0; 66 ASSERT(found->isRefCountedWrapper()); 67 return static_cast<Wrapper*>(found)->wrapped(); 52 68 } 53 };54 55 template<typename T>56 class Supplementable {57 public:58 void provideSupplement(const AtomicString& key, PassOwnPtr<Supplement<T> > supplement)59 {60 ASSERT(!m_supplements.get(key.impl()));61 m_supplements.set(key, supplement);62 }63 64 Supplement<T>* requireSupplement(const AtomicString& key)65 {66 return m_supplements.get(key);67 }68 69 private:70 typedef HashMap<AtomicString, OwnPtr<Supplement<T> > > SupplementMap;71 SupplementMap m_supplements;72 69 }; 73 70 74 71 } // namespace WebCore 75 72 76 #endif // Supplementable_h73 #endif // RefCountedSupplement_h -
trunk/Source/WebCore/platform/Supplementable.h
r120057 r120168 41 41 public: 42 42 virtual ~Supplement() { } 43 #if !ASSERT_DISABLED 44 virtual bool isRefCountedWrapper() const { return false; } 45 #endif 43 46 44 47 static void provideTo(Supplementable<T>* host, const AtomicString& key, PassOwnPtr<Supplement<T> > supplement) -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r120057 r120168 26 26 #include "BlobData.h" 27 27 #include "ContentSecurityPolicy.h" 28 #include "ContextFeatures.h" 28 29 #include "CrossOriginAccessControl.h" 29 30 #include "DOMFormData.h" … … 254 255 m_responseDocument->setContent(m_responseBuilder.toStringPreserveCapacity()); 255 256 m_responseDocument->setSecurityOrigin(securityOrigin()); 257 m_responseDocument->setContextFeatures(document()->contextFeatures()); 256 258 if (!m_responseDocument->wellFormed()) 257 259 m_responseDocument = 0; -
trunk/Source/WebKit/chromium/ChangeLog
r120161 r120168 1 2012-06-13 MORITA Hajime <morrita@google.com> 2 3 REGRESSION(r118098): <content> element does not render distributed children when cloned from another document 4 https://bugs.webkit.org/show_bug.cgi?id=88148 5 6 Reviewed by Dimitri Glazkov. 7 8 - Added ContextFeaturesClientImpl which implements WebCore::ContextFeaturesClient. 9 - Replaced PagePopupFrameLoaderClient with PagePopupFeaturesClient. 10 11 * WebKit.gyp: 12 * public/WebPermissionClient.h: 13 (WebKit): 14 (WebKit::WebPermissionClient::allowWebComponents): 15 * src/ContextFeaturesClientImpl.cpp: Renamed from Source/WebCore/bindings/generic/ContextEnabledFeatures.cpp. 16 (WebKit): 17 (WebKit::ContextFeaturesClientImpl::isEnabled): 18 * src/ContextFeaturesClientImpl.h: Renamed from Source/WebCore/bindings/generic/ContextEnabledFeatures.h. 19 (WebKit): 20 (ContextFeaturesClientImpl): 21 (WebKit::ContextFeaturesClientImpl::ContextFeaturesClientImpl): 22 (WebKit::ContextFeaturesClientImpl::setPermissionClient): 23 * src/FrameLoaderClientImpl.cpp: 24 * src/FrameLoaderClientImpl.h: 25 (FrameLoaderClientImpl): 26 * src/WebPagePopupImpl.cpp: 27 (PagePopupFeaturesClient): 28 (WebKit::PagePopupFeaturesClient::isEnabled): 29 (WebKit): 30 (WebKit::WebPagePopupImpl::initPage): 31 * src/WebViewImpl.cpp: 32 (WebKit::WebViewImpl::setPermissionClient): 33 (WebKit::WebViewImpl::WebViewImpl): 34 * src/WebViewImpl.h: 35 (WebKit): 36 1 37 2012-06-12 Ian Vollick <vollick@chromium.org> 2 38 -
trunk/Source/WebKit/chromium/WebKit.gyp
r120057 r120168 372 372 'src/CompositionUnderlineVectorBuilder.cpp', 373 373 'src/CompositionUnderlineVectorBuilder.h', 374 'src/ContextFeaturesClientImpl.cpp', 375 'src/ContextFeaturesClientImpl.h', 374 376 'src/ContextMenuClientImpl.cpp', 375 377 'src/ContextMenuClientImpl.h', -
trunk/Source/WebKit/chromium/public/WebPermissionClient.h
r120057 r120168 34 34 namespace WebKit { 35 35 36 class WebDocument; 36 37 class WebFrame; 37 38 class WebSecurityOrigin; … … 91 92 92 93 // Controls whether enabling Web Components API for this frame. 93 virtual bool allowWebComponents( WebFrame*, bool defaultValue) { return defaultValue; }94 virtual bool allowWebComponents(const WebDocument&, bool defaultValue) { return defaultValue; } 94 95 95 96 // Notifies the client that the frame would have instantiated a plug-in if plug-ins were enabled. -
trunk/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
r120167 r120168 30 30 31 31 #include "config.h" 32 #include "Context EnabledFeatures.h"32 #include "ContextFeaturesClientImpl.h" 33 33 34 #include "DOMWindow.h"35 34 #include "Document.h" 36 #include "Frame.h" 37 #include "FrameLoader.h" 38 #include "FrameLoaderClient.h" 39 #include "RuntimeEnabledFeatures.h" 35 #include "WebDocument.h" 36 #include "WebPermissionClient.h" 40 37 41 namespace Web Core{38 namespace WebKit { 42 39 43 #if ENABLE(SHADOW_DOM) 44 bool ContextEnabledFeatures::shadowDOMEnabled(DOMWindow* window) 40 bool ContextFeaturesClientImpl::isEnabled(WebCore::Document* document, WebCore::ContextFeatures::FeatureType type, bool defaultValue) 45 41 { 46 if (!window) 47 return false; 48 if (Frame* frame = window->frame()) 49 return frame->loader()->client()->allowShadowDOM(RuntimeEnabledFeatures::shadowDOMEnabled()); 50 return false; 42 if (!m_client) 43 return defaultValue; 44 45 switch (type) { 46 case WebCore::ContextFeatures::ShadowDOM: 47 case WebCore::ContextFeatures::StyleScoped: 48 return m_client->allowWebComponents(WebDocument(document), defaultValue); 49 default: 50 return defaultValue; 51 } 51 52 } 52 #endif53 53 54 #if ENABLE(STYLE_SCOPED) 55 bool ContextEnabledFeatures::styleScopedEnabled(Document* document) 56 { 57 if (!document) 58 return false; 59 if (Frame* frame = document->frame()) 60 return frame->loader()->client()->allowStyleScoped(RuntimeEnabledFeatures::styleScopedEnabled()); 61 return false; 62 } 63 #endif 64 65 #if ENABLE(PAGE_POPUP) 66 bool ContextEnabledFeatures::pagePopupEnabled(DOMWindow* window) 67 { 68 if (!window) 69 return false; 70 if (Frame* frame = window->frame()) 71 return frame->loader()->client()->allowPagePopup(); 72 return false; 73 } 74 #endif 75 76 } // namespace WebCore 54 } // namespace WebKit -
trunk/Source/WebKit/chromium/src/ContextFeaturesClientImpl.h
r120167 r120168 29 29 */ 30 30 31 #ifndef Context EnabledFeatures_h32 #define Context EnabledFeatures_h31 #ifndef ContextFeaturesClientImpl_h 32 #define ContextFeaturesClientImpl_h 33 33 34 namespace WebCore { 34 #include "ContextFeatures.h" 35 35 36 class DOMWindow; 37 class Document; 36 namespace WebKit { 38 37 39 // A class that stores static enablers for all experimental features. Note that 40 // the method names must line up with the JavaScript method they enable for code 41 // generation to work properly. 38 class WebPermissionClient; 42 39 43 class Context EnabledFeatures{40 class ContextFeaturesClientImpl : public WebCore::ContextFeaturesClient { 44 41 public: 45 #if ENABLE(SHADOW_DOM)46 static bool shadowDOMEnabled(DOMWindow*);47 #endif 48 #if ENABLE(STYLE_SCOPED) 49 static bool styleScopedEnabled(Document*);50 #endif 51 #if ENABLE(PAGE_POPUP) 52 static bool pagePopupEnabled(DOMWindow*); 53 #endif 42 ContextFeaturesClientImpl() 43 : m_client(0) 44 { } 45 46 virtual bool isEnabled(WebCore::Document*, WebCore::ContextFeatures::FeatureType, bool defaultValue) OVERRIDE; 47 void setPermissionClient(WebPermissionClient* client) { m_client = client; } 48 49 private: 50 WebPermissionClient* m_client; 54 51 }; 55 52 56 } // namespace Web Core53 } // namespace WebKit 57 54 58 #endif // Context EnabledFeatures_h55 #endif // ContextFeaturesClientImpl_h -
trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r120057 r120168 240 240 } 241 241 242 bool FrameLoaderClientImpl::allowShadowDOM(bool enabledAsRuntimeFeature)243 {244 WebViewImpl* webview = m_webFrame->viewImpl();245 if (webview && webview->permissionClient())246 return webview->permissionClient()->allowWebComponents(m_webFrame, enabledAsRuntimeFeature);247 248 return enabledAsRuntimeFeature;249 }250 251 bool FrameLoaderClientImpl::allowStyleScoped(bool enabledAsRuntimeFeature)252 {253 WebViewImpl* webview = m_webFrame->viewImpl();254 if (webview && webview->permissionClient())255 return webview->permissionClient()->allowWebComponents(m_webFrame, enabledAsRuntimeFeature);256 257 return enabledAsRuntimeFeature;258 }259 260 242 void FrameLoaderClientImpl::didNotAllowScript() 261 243 { -
trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
r120057 r120168 200 200 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, WebCore::SecurityOrigin*, const WebCore::KURL&); 201 201 virtual bool allowRunningInsecureContent(bool enabledPerSettings, WebCore::SecurityOrigin*, const WebCore::KURL&); 202 virtual bool allowShadowDOM(bool enabledAsRuntimeFeature) OVERRIDE;203 virtual bool allowStyleScoped(bool enabledAsRuntimeFeature) OVERRIDE;204 202 virtual void didNotAllowScript(); 205 203 virtual void didNotAllowPlugins(); -
trunk/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
r120057 r120168 33 33 34 34 #include "Chrome.h" 35 #include "ContextFeatures.h" 35 36 #include "DOMWindowPagePopup.h" 36 37 #include "DocumentLoader.h" … … 126 127 }; 127 128 128 class PagePopupF rameLoaderClient : public EmptyFrameLoaderClient {129 virtual bool allowPagePopup() OVERRIDE { return true; }129 class PagePopupFeaturesClient : public ContextFeaturesClient { 130 virtual bool isEnabled(Document*, ContextFeatures::FeatureType, bool) OVERRIDE; 130 131 }; 132 133 bool PagePopupFeaturesClient::isEnabled(Document*, ContextFeatures::FeatureType type, bool defaultValue) 134 { 135 if (type == ContextFeatures::PagePopup) 136 return true; 137 return defaultValue; 138 } 131 139 132 140 // WebPagePopupImpl ---------------------------------------------------------------- … … 184 192 m_page->settings()->setAllowScriptsToCloseWindows(true); 185 193 186 static FrameLoaderClient* pagePopupFrameLoaderClient = new PagePopupFrameLoaderClient; 187 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, pagePopupFrameLoaderClient); 194 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeaturesClient(); 195 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient); 196 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClient(); 197 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient); 188 198 frame->setView(FrameView::create(frame.get())); 189 199 frame->init(); -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r120105 r120168 42 42 #include "ColorSpace.h" 43 43 #include "CompositionUnderlineVectorBuilder.h" 44 #include "ContextFeaturesClientImpl.h" 44 45 #include "ContextMenu.h" 45 46 #include "ContextMenuController.h" … … 338 339 { 339 340 m_permissionClient = permissionClient; 341 m_featureSwitchClient->setPermissionClient(permissionClient); 340 342 } 341 343 … … 393 395 , m_operationsAllowed(WebDragOperationNone) 394 396 , m_dragOperation(WebDragOperationNone) 397 , m_featureSwitchClient(adoptPtr(new ContextFeaturesClientImpl())) 395 398 , m_autofillPopupShowing(false) 396 399 , m_autofillPopup(0) … … 452 455 #endif 453 456 457 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); 454 458 provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get()); 455 459 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r120057 r120168 87 87 class AutofillPopupMenuClient; 88 88 class BatteryClientImpl; 89 class ContextFeaturesClientImpl; 89 90 class ContextMenuClientImpl; 90 91 class DeviceOrientationClientProxy; … … 734 735 WebDragOperation m_dragOperation; 735 736 737 // Context-based feature switches. 738 OwnPtr<ContextFeaturesClientImpl> m_featureSwitchClient; 739 736 740 // Whether an Autofill popup is currently showing. 737 741 bool m_autofillPopupShowing;
Note: See TracChangeset
for help on using the changeset viewer.