Changeset 11588 in webkit
- Timestamp:
- Dec 14, 2005 3:32:02 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 deleted
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog-2005-12-19
r11585 r11588 1 2005-12-14 Eric Seidel <eseidel@apple.com> 2 3 Reviewed by darin. 4 5 SVG test cases changed (now the svg.css is loaded properly). 6 No other functionality changes, just code removal. 7 http://bugzilla.opendarwin.org/show_bug.cgi?id=6078 8 9 * ForwardingHeaders/klibloader.h: Removed. 10 * WebCore.xcodeproj/project.pbxproj: 11 * khtml/css/csshelper.cpp: 12 * khtml/css/cssstyleselector.cpp: 13 (khtml::CSSStyleSelector::CSSStyleSelector): 14 (khtml::parseUASheet): 15 (khtml::CSSStyleSelector::loadDefaultStyle): 16 * khtml/css/cssstyleselector.h: 17 * khtml/ecma/kjs_dom.h: 18 * khtml/ecma/kjs_events.cpp: 19 (KJS::JSAbstractEventListener::handleEvent): 20 (KJS::JSLazyEventListener::eventParameterName): 21 (KJS::JSLazyEventListener::parseCode): 22 * khtml/ecma/kjs_events.h: 23 * khtml/ecma/kjs_html.cpp: 24 (KJS::KJS::HTMLElement::implementsCall): 25 * khtml/ecma/kjs_navigator.cpp: 26 (KJS::Navigator::getValueProperty): 27 (KJS::PluginBase::PluginBase): 28 * khtml/ecma/kjs_proxy.cpp: 29 (KJSProxyImpl::KJSProxyImpl): 30 (KJSProxyImpl::evaluate): 31 (KJSProxyImpl::clear): 32 (KJSProxyImpl::createHTMLEventHandler): 33 (KJSProxyImpl::initScript): 34 * khtml/ecma/kjs_proxy.h: 35 (KJSProxyImpl::setEventHandlerLineno): 36 * khtml/ecma/kjs_traversal.cpp: 37 (KJS::JSNodeFilterCondition::acceptNode): 38 * khtml/ecma/kjs_window.cpp: 39 (KJS::Window::interpreter): 40 (KJS::Window::retrieve): 41 (KJS::Window::clear): 42 (KJS::ScheduledAction::execute): 43 * khtml/ecma/kjs_window.h: 44 * khtml/html/html_canvasimpl.cpp: 45 * khtml/html/html_documentimpl.cpp: 46 * khtml/html/html_formimpl.cpp: 47 (DOM::HTMLFormElementImpl::formData): 48 * khtml/html/html_headimpl.cpp: 49 (HTMLScriptElementImpl::evaluateScript): 50 * khtml/html/html_imageimpl.cpp: 51 * khtml/html/html_tableimpl.cpp: 52 * khtml/html/htmltokenizer.cpp: 53 (khtml::HTMLTokenizer::HTMLTokenizer): 54 (khtml::HTMLTokenizer::processToken): 55 * khtml/khtml_part.cpp: 56 (KHTMLPart::KHTMLPart): 57 (KHTMLPart::init): 58 (KHTMLPart::~KHTMLPart): 59 (KHTMLPart::restoreURL): 60 (KHTMLPart::didOpenURL): 61 (KHTMLPart::jScript): 62 (KHTMLPart::executeScript): 63 (KHTMLPart::write): 64 (KHTMLPart::reparseConfiguration): 65 (KHTMLPart::createHTMLEventListener): 66 * khtml/khtml_part.h: 67 * khtml/khtmlpart_p.h: 68 (KHTMLPartPrivate::KHTMLPartPrivate): 69 (KHTMLPartPrivate::~KHTMLPartPrivate): 70 * khtml/misc/decoder.cpp: 71 * khtml/misc/loader.cpp: 72 (CachedCSSStyleSheet::CachedCSSStyleSheet): 73 (CachedScript::CachedScript): 74 * khtml/rendering/render_flow.cpp: 75 * khtml/rendering/render_frames.cpp: 76 * khtml/rendering/render_inline.cpp: 77 * khtml/rendering/render_line.cpp: 78 * khtml/rendering/render_table.cpp: 79 * khtml/rendering/table_layout.cpp: 80 * khtml/xml/dom_docimpl.cpp: 81 (DocumentImpl::implicitOpen): 82 (DocumentImpl::write): 83 * khtml/xml/dom_nodeimpl.cpp: 84 * ksvg2/svg/SVGTestsImpl.cpp: 85 (SVGTestsImpl::isValid): 86 * kwq/DOMInternal.mm: 87 (-[WebScriptObject _initializeScriptDOMNodeImp]): 88 * kwq/KWQKGlobal.h: 89 * kwq/KWQKHTMLFactory.h: 90 (KHTMLFactory::vLinks): 91 * kwq/KWQKHTMLFactory.mm: 92 * kwq/KWQKHTMLPart.mm: 93 (KWQKHTMLPart::KWQKHTMLPart): 94 (KWQKHTMLPart::userGestureHint): 95 (KWQKHTMLPart::bindingRootObject): 96 * kwq/KWQKHTMLSettings.h: 97 (KHTMLSettings::fantasyFontName): 98 (KHTMLSettings::isJavaScriptEnabled): 99 * kwq/KWQKInstance.h: Removed. 100 * kwq/KWQKLibrary.h: Removed. 101 * kwq/KWQKPartsFactory.h: Removed. 102 * kwq/KWQKPartsPart.h: 103 (KParts::ReadOnlyPart::name): 104 * kwq/KWQKStandardDirs.h: 105 * kwq/KWQKStandardDirs.mm: 106 (locate): 107 * kwq/WebCoreBridge.mm: 108 (-[WebCoreBridge executionContextForView:]): 109 1 110 2005-12-14 Beth Dakin <bdakin@apple.com> 2 111 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r11529 r11588 211 211 93F1995608245E59001E9ABC /* KWQKJobClasses.h in Headers */ = {isa = PBXBuildFile; fileRef = F587864B02DE3A9A01EA4122 /* KWQKJobClasses.h */; }; 212 212 93F1995708245E59001E9ABC /* KWQKKAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F587861D02DE398401EA4122 /* KWQKKAction.h */; }; 213 93F1995808245E59001E9ABC /* KWQKLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = F58785F902DE382001EA4122 /* KWQKLibrary.h */; };214 213 93F1995908245E59001E9ABC /* KWQKLineEdit.h in Headers */ = {isa = PBXBuildFile; fileRef = F587862102DE398401EA4122 /* KWQKLineEdit.h */; }; 215 214 93F1995A08245E59001E9ABC /* KWQKListBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587862202DE398401EA4122 /* KWQKListBox.h */; }; … … 218 217 93F1995D08245E59001E9ABC /* KWQKPartsBrowserInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866802DE3B3201EA4122 /* KWQKPartsBrowserInterface.h */; }; 219 218 93F1995E08245E59001E9ABC /* KWQKPartsEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866902DE3B3201EA4122 /* KWQKPartsEvent.h */; }; 220 93F1995F08245E59001E9ABC /* KWQKPartsFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866A02DE3B3201EA4122 /* KWQKPartsFactory.h */; };221 219 93F1996008245E59001E9ABC /* KWQKPartsHistoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866B02DE3B3201EA4122 /* KWQKPartsHistoryProvider.h */; }; 222 220 93F1996108245E59001E9ABC /* KWQKPartsPart.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866C02DE3B3201EA4122 /* KWQKPartsPart.h */; }; … … 747 745 A8212B2108794A2300677359 /* KWQKJobClasses.h in Headers */ = {isa = PBXBuildFile; fileRef = F587864B02DE3A9A01EA4122 /* KWQKJobClasses.h */; }; 748 746 A8212B2208794A2300677359 /* KWQKKAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F587861D02DE398401EA4122 /* KWQKKAction.h */; }; 749 A8212B2308794A2300677359 /* KWQKLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = F58785F902DE382001EA4122 /* KWQKLibrary.h */; };750 747 A8212B2408794A2300677359 /* KWQKLineEdit.h in Headers */ = {isa = PBXBuildFile; fileRef = F587862102DE398401EA4122 /* KWQKLineEdit.h */; }; 751 748 A8212B2508794A2300677359 /* KWQKListBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587862202DE398401EA4122 /* KWQKListBox.h */; }; … … 754 751 A8212B2808794A2300677359 /* KWQKPartsBrowserInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866802DE3B3201EA4122 /* KWQKPartsBrowserInterface.h */; }; 755 752 A8212B2908794A2300677359 /* KWQKPartsEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866902DE3B3201EA4122 /* KWQKPartsEvent.h */; }; 756 A8212B2A08794A2300677359 /* KWQKPartsFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866A02DE3B3201EA4122 /* KWQKPartsFactory.h */; };757 753 A8212B2B08794A2300677359 /* KWQKPartsHistoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866B02DE3B3201EA4122 /* KWQKPartsHistoryProvider.h */; }; 758 754 A8212B2C08794A2300677359 /* KWQKPartsPart.h in Headers */ = {isa = PBXBuildFile; fileRef = F587866C02DE3B3201EA4122 /* KWQKPartsPart.h */; }; … … 1264 1260 A8C0FBA0089701F900BA5114 /* KSVGTimeScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6EF089701F100BA5114 /* KSVGTimeScheduler.cpp */; }; 1265 1261 A8C0FBA1089701F900BA5114 /* KSVGTimeScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F6F0089701F100BA5114 /* KSVGTimeScheduler.h */; }; 1266 A8C0FBA6089701F900BA5114 /* KSVGCSSParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F6F7089701F100BA5114 /* KSVGCSSParser.h */; };1267 1262 A8C0FBA7089701F900BA5114 /* svg.css in Resources */ = {isa = PBXBuildFile; fileRef = A8C0F6F8089701F100BA5114 /* svg.css */; }; 1268 1263 A8C0FBAA089701F900BA5114 /* SVGCSSStyleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FB089701F100BA5114 /* SVGCSSStyleSelector.cpp */; }; 1269 A8C0FBAB089701F900BA5114 /* SVGCSSStyleSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F6FC089701F100BA5114 /* SVGCSSStyleSelector.h */; };1270 1264 A8C0FBAE089701F900BA5114 /* SVGRenderStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FF089701F100BA5114 /* SVGRenderStyle.cpp */; }; 1271 1265 A8C0FBAF089701F900BA5114 /* SVGRenderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F700089701F100BA5114 /* SVGRenderStyle.h */; }; … … 1974 1968 A8C0F6F5089701F100BA5114 /* cssvalues.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cssvalues.in; sourceTree = "<group>"; }; 1975 1969 A8C0F6F6089701F100BA5114 /* KSVGCSSParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KSVGCSSParser.cpp; sourceTree = "<group>"; }; 1976 A8C0F6F7089701F100BA5114 /* KSVGCSSParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSVGCSSParser.h; sourceTree = "<group>"; };1977 1970 A8C0F6F8089701F100BA5114 /* svg.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = svg.css; sourceTree = "<group>"; }; 1978 1971 A8C0F6FB089701F100BA5114 /* SVGCSSStyleSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGCSSStyleSelector.cpp; sourceTree = "<group>"; }; 1979 A8C0F6FC089701F100BA5114 /* SVGCSSStyleSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCSSStyleSelector.h; sourceTree = "<group>"; };1980 1972 A8C0F6FF089701F100BA5114 /* SVGRenderStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGRenderStyle.cpp; sourceTree = "<group>"; }; 1981 1973 A8C0F700089701F100BA5114 /* SVGRenderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRenderStyle.h; sourceTree = "<group>"; }; … … 2664 2656 F58785F602DE382001EA4122 /* KWQKGlobalSettings.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKGlobalSettings.h; sourceTree = "<group>"; }; 2665 2657 F58785F802DE382001EA4122 /* KWQKInstance.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKInstance.h; sourceTree = "<group>"; }; 2666 F58785F902DE382001EA4122 /* KWQKLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKLibrary.h; sourceTree = "<group>"; };2667 2658 F58785FA02DE382001EA4122 /* KWQKLocale.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKLocale.h; sourceTree = "<group>"; }; 2668 2659 F58785FD02DE382001EA4122 /* KWQKStandardDirs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKStandardDirs.h; sourceTree = "<group>"; }; … … 2693 2684 F587866802DE3B3201EA4122 /* KWQKPartsBrowserInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKPartsBrowserInterface.h; sourceTree = "<group>"; }; 2694 2685 F587866902DE3B3201EA4122 /* KWQKPartsEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKPartsEvent.h; sourceTree = "<group>"; }; 2695 F587866A02DE3B3201EA4122 /* KWQKPartsFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKPartsFactory.h; sourceTree = "<group>"; };2696 2686 F587866B02DE3B3201EA4122 /* KWQKPartsHistoryProvider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKPartsHistoryProvider.h; sourceTree = "<group>"; }; 2697 2687 F587866C02DE3B3201EA4122 /* KWQKPartsPart.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQKPartsPart.h; sourceTree = "<group>"; }; … … 3099 3089 A8C0F6F5089701F100BA5114 /* cssvalues.in */, 3100 3090 A8C0F6F6089701F100BA5114 /* KSVGCSSParser.cpp */, 3101 A8C0F6F7089701F100BA5114 /* KSVGCSSParser.h */,3102 3091 A8C0F6F8089701F100BA5114 /* svg.css */, 3103 3092 A8C0F6FB089701F100BA5114 /* SVGCSSStyleSelector.cpp */, 3104 A8C0F6FC089701F100BA5114 /* SVGCSSStyleSelector.h */,3105 3093 A8C0F6FF089701F100BA5114 /* SVGRenderStyle.cpp */, 3106 3094 A8C0F700089701F100BA5114 /* SVGRenderStyle.h */, … … 4057 4045 F58784F502DE375901EA4122 /* KWQKGlobalSettings.mm */, 4058 4046 F58785F802DE382001EA4122 /* KWQKInstance.h */, 4059 F58785F902DE382001EA4122 /* KWQKLibrary.h */,4060 4047 F58785FA02DE382001EA4122 /* KWQKLocale.h */, 4061 4048 F587850402DE375901EA4122 /* KWQKLocale.mm */, … … 4130 4117 F587866902DE3B3201EA4122 /* KWQKPartsEvent.h */, 4131 4118 F587850802DE375901EA4122 /* KWQKPartsEvent.mm */, 4132 F587866A02DE3B3201EA4122 /* KWQKPartsFactory.h */,4133 4119 F587866B02DE3B3201EA4122 /* KWQKPartsHistoryProvider.h */, 4134 4120 F58784F602DE375901EA4122 /* KWQKHistoryProvider.mm */, … … 4412 4398 93F1995608245E59001E9ABC /* KWQKJobClasses.h in Headers */, 4413 4399 93F1995708245E59001E9ABC /* KWQKKAction.h in Headers */, 4414 93F1995808245E59001E9ABC /* KWQKLibrary.h in Headers */,4415 4400 93F1995908245E59001E9ABC /* KWQKLineEdit.h in Headers */, 4416 4401 93F1995A08245E59001E9ABC /* KWQKListBox.h in Headers */, … … 4419 4404 93F1995D08245E59001E9ABC /* KWQKPartsBrowserInterface.h in Headers */, 4420 4405 93F1995E08245E59001E9ABC /* KWQKPartsEvent.h in Headers */, 4421 93F1995F08245E59001E9ABC /* KWQKPartsFactory.h in Headers */,4422 4406 93F1996008245E59001E9ABC /* KWQKPartsHistoryProvider.h in Headers */, 4423 4407 93F1996108245E59001E9ABC /* KWQKPartsPart.h in Headers */, … … 4753 4737 A8212B2108794A2300677359 /* KWQKJobClasses.h in Headers */, 4754 4738 A8212B2208794A2300677359 /* KWQKKAction.h in Headers */, 4755 A8212B2308794A2300677359 /* KWQKLibrary.h in Headers */,4756 4739 A8212B2408794A2300677359 /* KWQKLineEdit.h in Headers */, 4757 4740 A8212B2508794A2300677359 /* KWQKListBox.h in Headers */, … … 4760 4743 A8212B2808794A2300677359 /* KWQKPartsBrowserInterface.h in Headers */, 4761 4744 A8212B2908794A2300677359 /* KWQKPartsEvent.h in Headers */, 4762 A8212B2A08794A2300677359 /* KWQKPartsFactory.h in Headers */,4763 4745 A8212B2B08794A2300677359 /* KWQKPartsHistoryProvider.h in Headers */, 4764 4746 A8212B2C08794A2300677359 /* KWQKPartsPart.h in Headers */, … … 4944 4926 A8C0FB9D089701F900BA5114 /* KCanvasRenderingStyle.h in Headers */, 4945 4927 A8C0FBA1089701F900BA5114 /* KSVGTimeScheduler.h in Headers */, 4946 A8C0FBA6089701F900BA5114 /* KSVGCSSParser.h in Headers */,4947 A8C0FBAB089701F900BA5114 /* SVGCSSStyleSelector.h in Headers */,4948 4928 A8C0FBAF089701F900BA5114 /* SVGRenderStyle.h in Headers */, 4949 4929 A8C0FBB1089701F900BA5114 /* SVGRenderStyleDefs.h in Headers */, -
trunk/WebCore/khtml/css/csshelper.cpp
r10701 r11588 30 30 31 31 #include <kcharsets.h> 32 #include <kglobal.h>33 32 #include <kdebug.h> 34 33 -
trunk/WebCore/khtml/css/cssstyleselector.cpp
r11529 r11588 54 54 #include <kstandarddirs.h> 55 55 #include <kcharsets.h> 56 #include <kglobal.h>57 56 #include <qfile.h> 58 57 #include <qfontdatabase.h> … … 226 225 strictParsing = _strictParsing; 227 226 settings = view ? view->part()->settings() : 0; 228 if(!defaultStyle) loadDefaultStyle(settings); 227 if (!defaultStyle) 228 loadDefaultStyle(); 229 229 m_medium = view ? view->mediaType() : QString("all"); 230 230 … … 303 303 } 304 304 305 static CSSStyleSheetImpl* parseUASheet(const KHTMLSettings* s, constchar* sheetName)305 static CSSStyleSheetImpl* parseUASheet(const char* sheetName) 306 306 { 307 307 QFile f(locate( "data", sheetName)); … … 315 315 316 316 QString style = QString::fromLatin1(file.data()); 317 if (s)318 style += s->settingsToCSS();319 317 DOMString str(style); 320 318 … … 324 322 } 325 323 326 void CSSStyleSelector::loadDefaultStyle( const KHTMLSettings *s)324 void CSSStyleSelector::loadDefaultStyle() 327 325 { 328 326 if(defaultStyle) return; 329 defaultSheet = parseUASheet( s, "khtml/css/html4.css");327 defaultSheet = parseUASheet("html4.css"); 330 328 331 329 // Collect only strict-mode rules. … … 337 335 338 336 #if SVG_SUPPORT 339 svgSheet = parseUASheet( 0, "ksvg2/css/svg.css");337 svgSheet = parseUASheet("svg.css"); 340 338 defaultStyle->addRulesFromSheet(svgSheet, "screen"); 341 339 defaultPrintStyle->addRulesFromSheet(svgSheet, "print"); … … 343 341 344 342 // Collect only quirks-mode rules. 345 quirksSheet = parseUASheet( 0, "khtml/css/quirks.css");343 quirksSheet = parseUASheet("quirks.css"); 346 344 defaultQuirksStyle = new CSSRuleSet(); 347 345 defaultQuirksStyle->addRulesFromSheet(quirksSheet, "screen"); -
trunk/WebCore/khtml/css/cssstyleselector.h
r11529 r11588 103 103 ~CSSStyleSelector(); 104 104 105 static void loadDefaultStyle( const KHTMLSettings *s = 0);105 static void loadDefaultStyle(); 106 106 107 107 void initElementAndPseudoState(DOM::ElementImpl* e); -
trunk/WebCore/khtml/ecma/kjs_dom.h
r11569 r11588 23 23 24 24 #include "kjs_binding.h" 25 #include "dom_nodeimpl.h" 25 26 26 27 #include <qvaluelist.h> … … 36 37 class EntityImpl; 37 38 class NamedNodeMapImpl; 38 class NodeImpl;39 class NodeListImpl;40 39 class NotationImpl; 41 40 class ProcessingInstructionImpl; -
trunk/WebCore/khtml/ecma/kjs_events.cpp
r11527 r11588 81 81 82 82 KHTMLPart *part = static_cast<Window*>(win)->part(); 83 KJSProxy *proxy = 0;83 KJSProxyImpl *proxy = 0; 84 84 if (part) 85 proxy = KJSProxy::proxy( part);85 proxy = part->jScript(); 86 86 if (!proxy) 87 87 return; … … 89 89 JSLock lock; 90 90 91 ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(proxy->interpreter());91 ScriptInterpreter *interpreter = proxy->interpreter(); 92 92 ExecState *exec = interpreter->globalExec(); 93 93 … … 284 284 } 285 285 286 JSValue *JSLazyEventListener::eventParameterName() const 287 { 288 static ProtectedPtr<JSValue> eventString = jsString("event"); 289 return eventString.get(); 290 } 291 286 292 void JSLazyEventListener::parseCode() const 287 293 { … … 289 295 JSObject *w = win; 290 296 KHTMLPart *part = static_cast<Window *>(w)->part(); 291 KJSProxy *proxy = 0L;297 KJSProxyImpl *proxy = 0; 292 298 if (part) 293 proxy = KJSProxy::proxy( part);299 proxy = part->jScript(); 294 300 295 301 if (proxy) { 296 ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(proxy->interpreter());302 ScriptInterpreter *interpreter = proxy->interpreter(); 297 303 ExecState *exec = interpreter->globalExec(); 298 304 … … 301 307 List args; 302 308 303 static ProtectedPtr<JSValue> eventString = jsString("event");304 309 UString sourceURL(part->m_url.url()); 305 args.append(event String);310 args.append(eventParameterName()); 306 311 args.append(jsString(code)); 307 312 listener = constr->construct(exec, args, sourceURL, lineNumber); // ### is globalExec ok ? -
trunk/WebCore/khtml/ecma/kjs_events.h
r11527 r11588 87 87 JSObject *listenerObj() const; 88 88 89 protected: 90 virtual JSValue *eventParameterName() const; 91 89 92 private: 90 93 void parseCode() const; -
trunk/WebCore/khtml/ecma/kjs_html.cpp
r11569 r11588 1421 1421 if (element->hasTagName(embedTag) || element->hasTagName(objectTag) || element->hasTagName(appletTag)) { 1422 1422 DocumentImpl* doc = element->getDocument(); 1423 KJSProxy *proxy = KJSProxy::proxy(doc->part());1423 KJSProxyImpl *proxy = doc->part()->jScript(); 1424 1424 ExecState *exec = proxy->interpreter()->globalExec(); 1425 1425 if (JSValue *runtimeObject = getRuntimeObject(exec, element)) -
trunk/WebCore/khtml/ecma/kjs_navigator.cpp
r11569 r11588 204 204 return jsString("Apple Computer, Inc."); 205 205 case Language: 206 // We don't have an implementation of KGlobal::locale(). We do however207 // have a static method on KLocale to access the current language.208 206 return jsString(KLocale::language()); 209 207 case UserAgent: … … 242 240 243 241 // read configuration 244 KConfig c( KGlobal::dirs()->saveLocation("data","nsplugins")+"/pluginsinfo");242 KConfig c(""); 245 243 unsigned num = (unsigned int)c.readNumEntry("number"); 246 244 for ( unsigned n=0; n<num; n++ ) { -
trunk/WebCore/khtml/ecma/kjs_proxy.cpp
r11527 r11588 33 33 using DOM::EventListener; 34 34 35 extern "C" {36 KJSProxy *kjs_html_init(KHTMLPart *khtmlpart);37 }38 39 class KJSProxyImpl : public KJSProxy {40 public:41 KJSProxyImpl(KHTMLPart *part);42 virtual ~KJSProxyImpl();43 virtual QVariant evaluate(QString filename, int baseLine, const QString&str, DOM::NodeImpl *n);44 virtual void clear();45 virtual DOM::EventListener *createHTMLEventHandler(QString sourceUrl, QString code, DOM::NodeImpl *node);46 virtual void finishedWithEvent(DOM::EventImpl *event);47 virtual KJS::ScriptInterpreter *interpreter();48 49 virtual void setDebugEnabled(bool enabled);50 virtual bool paused() const;51 virtual void setSourceFile(QString url, QString code);52 virtual void appendSourceFile(QString url, QString code);53 54 void initScript();55 56 private:57 KJS::ScriptInterpreter* m_script;58 bool m_debugEnabled;59 #ifndef NDEBUG60 static int s_count;61 #endif62 };63 64 35 #ifndef NDEBUG 65 36 int KJSProxyImpl::s_count = 0; … … 70 41 m_script = 0; 71 42 m_part = part; 72 m_debugEnabled = false;73 43 #ifndef NDEBUG 74 44 s_count++; … … 104 74 bool inlineCode = filename.isNull(); 105 75 106 #ifdef KJS_DEBUGGER107 if (inlineCode)108 filename = "(unknown file)";109 if (KJSDebugWin::instance())110 KJSDebugWin::instance()->setNextSourceInfo(filename,baseLine);111 #endif112 113 76 m_script->setInlineCode(inlineCode); 114 77 … … 140 103 // (we used to delete and re-create it, previously) 141 104 if (m_script) { 142 #ifdef KJS_DEBUGGER143 KJSDebugWin *debugWin = KJSDebugWin::instance();144 if (debugWin && debugWin->currentScript() == m_script) {145 debugWin->setMode(KJSDebugWin::Stop);146 }147 #endif148 105 Window *win = Window::retrieveWindow(m_part); 149 106 if (win) … … 152 109 } 153 110 154 DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(QString sourceUrl, QStringcode, DOM::NodeImpl *node)111 DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(QString code, DOM::NodeImpl *node) 155 112 { 156 #ifdef KJS_DEBUGGER157 if (KJSDebugWin::instance())158 KJSDebugWin::instance()->setNextSourceInfo(sourceUrl,m_handlerLineno);159 #else160 Q_UNUSED(sourceUrl);161 #endif162 163 113 initScript(); 164 114 JSLock lock; 165 return KJS::Window::retrieveWindow(m_part)->getJSLazyEventListener(code, node,m_handlerLineno);115 return KJS::Window::retrieveWindow(m_part)->getJSLazyEventListener(code, node, m_handlerLineno); 166 116 } 167 117 … … 181 131 m_part->keepAlive(); 182 132 return m_script; 183 }184 185 void KJSProxyImpl::setDebugEnabled(bool enabled)186 {187 #ifdef KJS_DEBUGGER188 m_debugEnabled = enabled;189 if (m_script)190 m_script->setDebuggingEnabled(enabled);191 // NOTE: this is consistent across all KJSProxyImpl instances, as we only192 // ever have 1 debug window193 if (!enabled && KJSDebugWin::instance()) {194 KJSDebugWin::destroyInstance();195 }196 else if (enabled && !KJSDebugWin::instance()) {197 KJSDebugWin::createInstance();198 initScript();199 KJSDebugWin::instance()->attach(m_script);200 }201 #else202 Q_UNUSED(enabled);203 #endif204 }205 206 bool KJSProxyImpl::paused() const207 {208 #ifdef KJS_DEBUGGER209 if (KJSDebugWin::instance())210 return KJSDebugWin::instance()->inSession();211 #endif212 return false;213 }214 215 void KJSProxyImpl::setSourceFile(QString url, QString code)216 {217 #ifdef KJS_DEBUGGER218 if (KJSDebugWin::instance())219 KJSDebugWin::instance()->setSourceFile(url,code);220 #else221 Q_UNUSED(url);222 Q_UNUSED(code);223 #endif224 225 }226 227 void KJSProxyImpl::appendSourceFile(QString url, QString code)228 {229 #ifdef KJS_DEBUGGER230 if (KJSDebugWin::instance())231 KJSDebugWin::instance()->appendSourceFile(url,code);232 #else233 Q_UNUSED(url);234 Q_UNUSED(code);235 #endif236 133 } 237 134 … … 265 162 m_script->setDebuggingEnabled(m_debugEnabled); 266 163 #endif 267 //m_script->enableDebug();268 164 globalObject->put(m_script->globalExec(), "debug", new TestFunctionImp(), Internal); 269 165 … … 278 174 m_script->setCompatMode(Interpreter::NetscapeCompat); 279 175 } 280 281 // Helper method, so that all classes which need jScript() don't need to be added282 // as friend to KHTMLPart283 KJSProxy * KJSProxy::proxy( KHTMLPart *part )284 {285 return part ? part->jScript() : NULL;286 }287 288 // initialize HTML module289 KJSProxy *kjs_html_init(KHTMLPart *khtmlpart)290 {291 return new KJSProxyImpl(khtmlpart);292 } -
trunk/WebCore/khtml/ecma/kjs_proxy.h
r9165 r11588 27 27 28 28 class KHTMLPart; 29 class KJSDebugWin;30 29 31 30 namespace DOM { … … 37 36 namespace KJS { 38 37 class List; 39 class Interpreter;38 class ScriptInterpreter; 40 39 } 41 40 42 /** 43 * @internal 44 * 45 * @short Proxy class serving as interface when being dlopen'ed. 46 */ 47 class KJSProxy { 41 class KJSProxyImpl { 48 42 public: 49 KJSProxy() { m_handlerLineno = 0; } 50 virtual ~KJSProxy() { } 51 virtual QVariant evaluate(QString filename, int baseLine, const QString &, DOM::NodeImpl *n) = 0; 52 virtual void clear() = 0; 53 virtual DOM::EventListener *createHTMLEventHandler(QString sourceUrl, QString code, DOM::NodeImpl *node) = 0; 54 virtual void finishedWithEvent(DOM::EventImpl *event) = 0; 55 virtual KJS::Interpreter *interpreter() = 0; 43 KJSProxyImpl(KHTMLPart *part); 44 ~KJSProxyImpl(); 45 QVariant evaluate(QString filename, int baseLine, const QString& str, DOM::NodeImpl *n); 46 void clear(); 47 DOM::EventListener *createHTMLEventHandler(QString code, DOM::NodeImpl *node); 48 void finishedWithEvent(DOM::EventImpl *event); 49 KJS::ScriptInterpreter *interpreter(); 50 void setEventHandlerLineno(int lineno) { m_handlerLineno = lineno; } 56 51 57 virtual void setDebugEnabled(bool enabled) = 0; 58 virtual bool paused() const = 0; 59 virtual void setSourceFile(QString url, QString code) = 0; 60 virtual void appendSourceFile(QString url, QString code) = 0; 52 void initScript(); 61 53 62 void setEventHandlerLineno(int lineno) { m_handlerLineno = lineno; } 63 64 KHTMLPart *m_part;65 int m_handlerLineno;66 67 // Helper method, to access the private KHTMLPart::jScript()68 static KJSProxy *proxy( KHTMLPart *part ); 54 private: 55 KJS::ScriptInterpreter* m_script; 56 KHTMLPart *m_part; 57 int m_handlerLineno; 58 #ifndef NDEBUG 59 static int s_count; 60 #endif 69 61 }; 70 62 63 71 64 #endif -
trunk/WebCore/khtml/ecma/kjs_traversal.cpp
r11527 r11588 26 26 #include <xml/dom_docimpl.h> 27 27 #include <khtmlview.h> 28 #include <khtml_part.h> 28 29 #include <kdebug.h> 29 30 #include <kjs/protect.h> … … 317 318 NodeImpl *node = filterNode; 318 319 KHTMLPart *part = node->getDocument()->part(); 319 KJSProxy *proxy = KJSProxy::proxy(part);320 KJSProxyImpl *proxy = part->jScript(); 320 321 if (proxy && filter->implementsCall()) { 321 322 JSLock lock; -
trunk/WebCore/khtml/ecma/kjs_window.cpp
r11569 r11588 357 357 } 358 358 359 Interpreter *Window::interpreter() const360 { 361 return KJSProxy::proxy( m_part)->interpreter();359 ScriptInterpreter *Window::interpreter() const 360 { 361 return m_part->jScript()->interpreter(); 362 362 } 363 363 … … 384 384 JSValue *Window::retrieve(KHTMLPart *p) 385 385 { 386 assert(p); 387 KJSProxy *proxy = KJSProxy::proxy( p ); 388 if (proxy) { 389 #ifdef KJS_VERBOSE 390 kdDebug(6070) << "Window::retrieve part=" << p << " interpreter=" << proxy->interpreter() << " window=" << proxy->interpreter()->globalObject() << endl; 391 #endif 392 return proxy->interpreter()->globalObject(); // the Global object is the "window" 393 } else 386 assert(p); 387 if (KJSProxyImpl *proxy = p->jScript()) 388 return proxy->interpreter()->globalObject(); // the Global object is the "window" 389 394 390 return jsUndefined(); // This can happen with JS disabled on the domain of that window 395 391 } … … 1424 1420 1425 1421 // Now recreate a working global object for the next URL that will use us 1426 Interpreter *interpreter = KJSProxy::proxy( m_part )->interpreter(); 1427 interpreter->initGlobalObject(); 1422 interpreter()->initGlobalObject(); 1428 1423 } 1429 1424 … … 1871 1866 return; 1872 1867 1873 ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(KJSProxy::proxy(window->m_part)->interpreter());1868 ScriptInterpreter *interpreter = window->interpreter(); 1874 1869 1875 1870 interpreter->setProcessingTimerCallback(true); -
trunk/WebCore/khtml/ecma/kjs_window.h
r11569 r11588 146 146 void resumeTimeouts(PausedTimeouts* t) { winq->resumeTimeouts(t); } 147 147 148 KJS:: Interpreter *interpreter() const;148 KJS::ScriptInterpreter *interpreter() const; 149 149 150 150 void scheduleClose(); -
trunk/WebCore/khtml/html/html_canvasimpl.cpp
r11096 r11588 32 32 33 33 #include <kstringhandler.h> 34 #include <kglobal.h>35 34 #include <kdebug.h> 36 35 -
trunk/WebCore/khtml/html/html_documentimpl.cpp
r11272 r11588 80 80 #include <kdebug.h> 81 81 #include <kurl.h> 82 #include <kglobal.h>83 82 #include <kcharsets.h> 84 83 #include <kglobalsettings.h> -
trunk/WebCore/khtml/html/html_formimpl.cpp
r11581 r11588 51 51 52 52 #include <kcharsets.h> 53 #include <kglobal.h>54 53 #include <kdebug.h> 55 54 #include <kmimetype.h> … … 327 326 enc = part->encoding(); 328 327 } 329 if((codec = KGlobal::charsets()->codecForName(enc.latin1())))328 if((codec = QTextCodec::codecForName(enc.latin1()))) 330 329 break; 331 330 } -
trunk/WebCore/khtml/html/html_headimpl.cpp
r11359 r11588 594 594 KHTMLPart *part = getDocument()->part(); 595 595 if (part) { 596 KJSProxy *proxy = KJSProxy::proxy(part);596 KJSProxyImpl *proxy = part->jScript(); 597 597 if (proxy) { 598 598 m_evaluated = true; -
trunk/WebCore/khtml/html/html_imageimpl.cpp
r11424 r11588 32 32 33 33 #include <kstringhandler.h> 34 #include <kglobal.h>35 34 #include <kdebug.h> 36 35 -
trunk/WebCore/khtml/html/html_tableimpl.cpp
r11392 r11588 45 45 46 46 #include <kdebug.h> 47 #include <kglobal.h>48 47 49 48 using namespace khtml; -
trunk/WebCore/khtml/html/htmltokenizer.cpp
r11271 r11588 47 47 #include "ecma/kjs_proxy.h" 48 48 #include <kcharsets.h> 49 #include <kglobal.h>50 49 #include <ctype.h> 51 50 #include <assert.h> … … 165 164 scriptCode = 0; 166 165 scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0; 167 charsets = KGlobal::charsets();168 166 parser = new HTMLParser(_view, _doc, includesComments); 169 167 m_executingScript = 0; … … 182 180 scriptCode = 0; 183 181 scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0; 184 charsets = KGlobal::charsets();185 182 parser = new HTMLParser(i, _doc, includesComments); 186 183 m_executingScript = 0; … … 1676 1673 void HTMLTokenizer::processToken() 1677 1674 { 1678 KJSProxy *jsProxy = (view && view->part()) ? view->part()->jScript() : 0L;1675 KJSProxyImpl *jsProxy = (view && view->part()) ? view->part()->jScript() : 0L; 1679 1676 if (jsProxy) 1680 1677 jsProxy->setEventHandlerLineno(tagStartLineno); -
trunk/WebCore/khtml/khtml_part.cpp
r11539 r11588 28 28 #include "khtml_part.h" 29 29 30 #define DIRECT_LINKAGE_TO_ECMA31 30 #define QT_NO_CLIPBOARD 32 31 #define QT_NO_DRAGANDDROP … … 180 179 } 181 180 182 KHTMLPart::KHTMLPart( QWidget *parentWidget, const char *widgetname, QObject *parent, const char *name, 183 GUIProfile prof ) 184 : KParts::ReadOnlyPart( parent, name ) 185 { 186 d = 0; 187 KHTMLFactory::registerPart( this ); 188 setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() ); 189 } 190 191 192 void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) 181 KHTMLPart::KHTMLPart(QWidget *parentWidget, const char *widgetname, QObject *parent, const char *name) 182 : KParts::ReadOnlyPart(parent, name), d(0) 183 { 184 } 185 186 void KHTMLPart::init(KHTMLView *view) 193 187 { 194 188 AtomicString::init(); … … 200 194 XLinkNames::init(); 201 195 #endif 202 if ( prof == DefaultGUI )203 setXMLFile( "khtml.rc" );204 else if ( prof == BrowserViewGUI )205 setXMLFile( "khtml_browser.rc" );206 196 207 197 frameCount = 0; … … 221 211 // have been initialized. 222 212 d->m_bJScriptEnabled = true; 223 d->m_bJScriptDebugEnabled = true;224 213 d->m_bJavaEnabled = true; 225 214 d->m_bPluginsEnabled = true; 226 227 215 228 216 connect( khtml::Cache::loader(), SIGNAL( requestStarted( khtml::DocLoader*, khtml::CachedObject* ) ), … … 233 221 this, SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) ); 234 222 235 236 223 connect( &d->m_redirectionTimer, SIGNAL( timeout() ), 237 224 this, SLOT( slotRedirect() ) ); 238 225 239 226 connect(&d->m_lifeSupportTimer, SIGNAL(timeout()), this, SLOT(slotEndLifeSupport())); 240 241 227 } 242 228 243 229 KHTMLPart::~KHTMLPart() 244 230 { 245 //kdDebug(6050) << "KHTMLPart::~KHTMLPart " << this << endl;246 247 231 stopAutoScroll(); 248 232 cancelRedirection(); … … 270 254 271 255 delete d; d = 0; 272 KHTMLFactory::deregisterPart( this );273 256 } 274 257 … … 295 278 // set the java(script) flags according to the current host. 296 279 d->m_bJScriptEnabled = d->m_settings->isJavaScriptEnabled(url.host()); 297 d->m_bJScriptDebugEnabled = d->m_settings->isJavaScriptDebugEnabled();298 280 d->m_bJavaEnabled = d->m_settings->isJavaEnabled(url.host()); 299 281 d->m_bPluginsEnabled = d->m_settings->isPluginsEnabled(url.host()); 300 282 301 283 m_url = url; 302 303 284 304 285 emit started( 0L ); … … 374 355 375 356 // set the javascript flags according to the current url 376 d->m_bJScriptDebugEnabled = d->m_settings->isJavaScriptDebugEnabled();377 357 d->m_bJavaEnabled = d->m_settings->isJavaEnabled(url.host()); 378 358 d->m_bPluginsEnabled = d->m_settings->isPluginsEnabled(url.host()); … … 532 512 } 533 513 534 // Define this to disable dlopening kjs_html, when directly linking to it. 535 // You need to edit khtml/Makefile.am to add ./ecma/libkjs_html.la to LIBADD 536 // and to edit khtml/ecma/Makefile.am to s/kjs_html/libkjs_html/, remove libkhtml from LIBADD, 537 // remove LDFLAGS line, and replace kde_module with either lib (shared) or noinst (static) 538 //#define DIRECT_LINKAGE_TO_ECMA 539 540 #ifdef DIRECT_LINKAGE_TO_ECMA 541 extern "C" { KJSProxy *kjs_html_init(KHTMLPart *khtmlpart); } 542 #endif 543 544 KJSProxy *KHTMLPart::jScript() 545 { 546 if (!jScriptEnabled()){ 547 return 0; 548 } 549 550 if ( !d->m_jscript ) 551 { 552 #ifndef DIRECT_LINKAGE_TO_ECMA 553 KLibrary *lib = KLibLoader::self()->library("kjs_html"); 554 if ( !lib ) { 555 setJScriptEnabled( false ); 556 return 0; 557 } 558 // look for plain C init function 559 void *sym = lib->symbol("kjs_html_init"); 560 if ( !sym ) { 561 lib->unload(); 562 setJScriptEnabled( false ); 563 return 0; 564 } 565 typedef KJSProxy* (*initFunction)(KHTMLPart *); 566 initFunction initSym = (initFunction) sym; 567 d->m_jscript = (*initSym)(this); 568 d->m_kjs_lib = lib; 569 #else 570 d->m_jscript = kjs_html_init(this); 571 // d->m_kjs_lib remains 0L. 572 #endif 573 if (d->m_bJScriptDebugEnabled) 574 d->m_jscript->setDebugEnabled(true); 575 } 576 577 return d->m_jscript; 514 KJSProxyImpl *KHTMLPart::jScript() 515 { 516 if (!jScriptEnabled()) 517 return 0; 518 519 if (!d->m_jscript) 520 d->m_jscript = new KJSProxyImpl(this); 521 522 return d->m_jscript; 578 523 } 579 524 … … 603 548 kdDebug(6070) << "KHTMLPart::executeScript n=" << n.nodeName().qstring().latin1() << "(" << (n.isNull() ? 0 : n.nodeType()) << ") " << script << endl; 604 549 #endif 605 KJSProxy *proxy = jScript();606 607 if (!proxy || proxy->paused())550 KJSProxyImpl *proxy = jScript(); 551 552 if (!proxy) 608 553 return QVariant(); 609 554 d->m_runningScripts++; … … 1067 1012 d->m_bFirstData = false; 1068 1013 1069 //kdDebug(6050) << "KHTMLPart::write haveEnc = " << d->m_haveEncoding << endl;1070 1014 // ### this is still quite hacky, but should work a lot better than the old solution 1071 1015 if(d->m_decoder->visuallyOrdered()) d->m_doc->setVisuallyOrdered(); … … 1073 1017 } 1074 1018 1075 if (jScript()) 1076 jScript()->appendSourceFile(m_url.url(),decoded); 1077 Tokenizer* t = d->m_doc->tokenizer(); 1078 1079 if(t) 1080 t->write( decoded, true ); 1019 if (Tokenizer* t = d->m_doc->tokenizer()) 1020 t->write( decoded, true ); 1081 1021 } 1082 1022 … … 1091 1031 d->m_bFirstData = false; 1092 1032 } 1093 if (jScript())1094 jScript()->appendSourceFile(m_url.url(),str);1095 1033 Tokenizer* t = d->m_doc->tokenizer(); 1096 1034 if(t) … … 2369 2307 2370 2308 d->m_bJScriptEnabled = d->m_settings->isJavaScriptEnabled(m_url.host()); 2371 d->m_bJScriptDebugEnabled = d->m_settings->isJavaScriptDebugEnabled();2372 2309 d->m_bJavaEnabled = d->m_settings->isJavaEnabled(m_url.host()); 2373 2310 d->m_bPluginsEnabled = d->m_settings->isPluginsEnabled(m_url.host()); … … 2937 2874 kdDebug(6070) << "executeScript: filename=" << filename << " baseLine=" << baseLine << " script=" << script << endl; 2938 2875 #endif 2939 KJSProxy *proxy = jScript();2940 2941 if (!proxy || proxy->paused())2876 KJSProxyImpl *proxy = jScript(); 2877 2878 if (!proxy) 2942 2879 return QVariant(); 2943 2880 QVariant ret = proxy->evaluate(filename,baseLine,script, n ); … … 2955 2892 DOM::EventListener *KHTMLPart::createHTMLEventListener( QString code, NodeImpl *node ) 2956 2893 { 2957 KJSProxy *proxy = jScript(); 2958 2959 if (!proxy) 2894 if (KJSProxyImpl *proxy = jScript()) 2895 return proxy->createHTMLEventHandler(code, node); 2960 2896 return 0; 2961 2962 return proxy->createHTMLEventHandler( m_url.url(), code, node );2963 2897 } 2964 2898 -
trunk/WebCore/khtml/khtml_part.h
r11529 r11588 36 36 class KHTMLPartPrivate; 37 37 class KHTMLPartBrowserExtension; 38 class KJSProxy ;38 class KJSProxyImpl; 39 39 class KHTMLView; 40 40 class KHTMLSettings; … … 162 162 friend class KJS::WindowFunc; 163 163 friend class KJS::DOMDocument; 164 friend class KJSProxy;165 164 friend class KHTMLPartBrowserExtension; 166 165 friend class DOM::DocumentImpl; … … 182 181 183 182 public: 184 enum GUIProfile { DefaultGUI, BrowserViewGUI /* ... */ };185 183 enum { NoXPosForVerticalArrowNavigation = INT_MIN }; 186 184 … … 197 195 * the view. 198 196 */ 199 KHTMLPart( QWidget *parentWidget = 0, const char *widgetname = 0, 200 QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); 201 202 KHTMLPart( KHTMLView *view, QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); 197 KHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0, QObject *parent = 0, const char *name = 0); 198 KHTMLPart(KHTMLView *view, QObject *parent = 0, const char *name = 0); 203 199 204 200 /** … … 1139 1135 1140 1136 1141 void init( KHTMLView *view, GUIProfile prof);1137 void init(KHTMLView *view); 1142 1138 1143 1139 virtual void clear(); … … 1191 1187 void cancelRedirection(bool newLoadInProgress = false); 1192 1188 1193 KJSProxy *jScript();1194 1195 1189 public: 1190 KJSProxyImpl *jScript(); 1196 1191 KHTMLPart *opener(); 1197 1192 void setOpener(KHTMLPart *_opener); -
trunk/WebCore/khtml/khtmlpart_p.h
r11375 r11588 29 29 30 30 #include <kcursor.h> 31 #include <klibloader.h>32 #include <kxmlguifactory.h>33 31 #include <kaction.h> 34 32 #include <kparts/partmanager.h> 35 36 #include "khtml_run.h" 33 #include <kio/global.h> 34 37 35 #include "khtml_find.h" 38 36 #include "khtml_factory.h" 39 37 #include "khtml_events.h" 40 38 #include "khtml_ext.h" 41 #include "khtml_iface.h"42 39 #include "khtml_settings.h" 43 40 #include "misc/decoder.h" … … 111 108 m_jscript = 0L; 112 109 m_runningScripts = 0; 113 m_kjs_lib = 0;114 110 m_job = 0L; 115 111 m_bComplete = true; … … 194 190 delete m_extension; 195 191 delete m_jscript; 196 if ( m_kjs_lib)197 m_kjs_lib->unload();198 192 #ifndef Q_WS_QWS 199 193 delete m_javaContext; … … 219 213 RefPtr<DOM::NodeImpl> scheduledScriptNode; 220 214 221 KJSProxy *m_jscript; 222 KLibrary *m_kjs_lib; 215 KJSProxyImpl *m_jscript; 223 216 int m_runningScripts; 224 217 bool m_bJScriptEnabled :1; 225 bool m_bJScriptDebugEnabled :1;226 218 bool m_bJavaEnabled :1; 227 219 bool m_bPluginsEnabled :1; -
trunk/WebCore/khtml/misc/decoder.cpp
r11302 r11588 33 33 #include <qtextcodec.h> 34 34 35 #include <kglobal.h>36 35 #include <kcharsets.h> 37 36 -
trunk/WebCore/khtml/misc/loader.cpp
r11271 r11588 46 46 #include <kio/job.h> 47 47 #include <kio/jobclasses.h> 48 #include <kglobal.h>49 48 #include <kimageio.h> 50 49 #include <kcharsets.h> … … 181 180 Cache::loader()->load(dl, this, false); 182 181 m_loading = true; 183 bool b;184 182 if(!charset.isEmpty()) 185 m_codec = KGlobal::charsets()->codecForName(charset, b);183 m_codec = QTextCodec::codecForName(charset.latin1()); 186 184 else 187 185 m_codec = QTextCodec::codecForName("iso8859-1"); … … 274 272 Cache::loader()->load(dl, this, false); 275 273 m_loading = true; 276 bool b;277 274 if(!charset.isEmpty()) 278 m_codec = KGlobal::charsets()->codecForName(charset, b);275 m_codec = QTextCodec::codecForName(charset.latin1()); 279 276 else 280 277 m_codec = QTextCodec::codecForName("iso8859-1"); -
trunk/WebCore/khtml/rendering/render_flow.cpp
r11520 r11588 27 27 #include <assert.h> 28 28 #include <qpainter.h> 29 #include <kglobal.h>30 29 31 30 #include "rendering/render_flow.h" -
trunk/WebCore/khtml/rendering/render_frames.cpp
r11271 r11588 46 46 #include <klocale.h> 47 47 #include <kdebug.h> 48 #include <kglobal.h>49 48 #include <qtimer.h> 50 49 #include <qpainter.h> -
trunk/WebCore/khtml/rendering/render_inline.cpp
r10701 r11588 24 24 25 25 #include "config.h" 26 #include <kglobal.h>27 26 #include "render_arena.h" 28 27 #include "render_inline.h" -
trunk/WebCore/khtml/rendering/render_line.cpp
r11306 r11588 26 26 #include <qpainter.h> 27 27 #include <qpen.h> 28 #include <kglobal.h>29 28 30 29 #include "rendering/render_flow.h" -
trunk/WebCore/khtml/rendering/render_table.cpp
r11579 r11588 35 35 #include "htmlnames.h" 36 36 #include "xml/dom_docimpl.h" 37 38 #include <kglobal.h>39 37 40 38 #include <qapplication.h> -
trunk/WebCore/khtml/rendering/table_layout.cpp
r11421 r11588 26 26 #include "table_layout.h" 27 27 #include "render_table.h" 28 29 #include <kglobal.h>30 28 31 29 using namespace khtml; -
trunk/WebCore/khtml/xml/dom_docimpl.cpp
r11529 r11588 1367 1367 connect(m_tokenizer,SIGNAL(finishedParsing()),this,SIGNAL(finishedParsing())); 1368 1368 setParsing(true); 1369 1370 if (m_view && m_view->part()->jScript()) {1371 m_view->part()->jScript()->setSourceFile(m_url,""); //fixme1372 }1373 1369 } 1374 1370 … … 1537 1533 } 1538 1534 m_tokenizer->write(text, false); 1539 1540 if (m_view && m_view->part()->jScript())1541 m_view->part()->jScript()->appendSourceFile(m_url,text);1542 1535 1543 1536 #ifdef INSTRUMENT_LAYOUT_SCHEDULING -
trunk/WebCore/khtml/xml/dom_nodeimpl.cpp
r11495 r11588 40 40 #include "editing/SelectionController.h" 41 41 42 #include <kglobal.h>43 42 #include <kdebug.h> 44 43 -
trunk/WebCore/ksvg2/svg/SVGTestsImpl.cpp
r11292 r11588 78 78 { 79 79 KDOM::DOMString value = KDOM::DOMString(list->getItem(i)); 80 if(value.isEmpty() || value.qstring() != (K Global::locale()->language()).left(2))80 if(value.isEmpty() || value.qstring() != (KLocale::language()).left(2)) 81 81 return false; 82 82 } -
trunk/WebCore/kwq/DOMInternal.mm
r11527 r11588 186 186 // Dig up Interpreter and ExecState. 187 187 KHTMLPart *part = nodeImpl->getDocument()->part(); 188 Interpreter *interpreter = KJSProxy::proxy(part)->interpreter();188 Interpreter *interpreter = part->jScript()->interpreter(); 189 189 ExecState *exec = interpreter->globalExec(); 190 190 -
trunk/WebCore/kwq/KWQKGlobal.h
r9096 r11588 28 28 29 29 #include "KWQString.h" 30 #include "KWQKInstance.h"31 30 32 class KCharsets;33 class KLocale;34 class KStandardDirs;35 31 class KConfig; 36 32 37 33 class KGlobal { 38 34 public: 39 static KInstance *instance() { return 0; }40 static KCharsets *charsets() { return 0; }41 static KLocale *locale() { return 0; }42 static KStandardDirs *dirs() { return 0; }43 35 static KConfig *config(); 44 36 -
trunk/WebCore/kwq/KWQKHTMLFactory.h
r3376 r11588 28 28 29 29 #include "khtml_part.h" 30 #include "KWQKPartsFactory.h"31 30 #include "KWQKPartsHistoryProvider.h" 32 31 33 class KInstance;34 32 class KHTMLPart; 35 33 class KHTMLSettings; … … 38 36 { 39 37 public: 40 static KInstance *instance();41 42 38 static KHTMLSettings *defaultHTMLSettings(); 43 39 … … 46 42 return KParts::HistoryProvider::self(); 47 43 } 48 49 static void registerPart(KHTMLPart *) { }50 static void deregisterPart(KHTMLPart *) { }51 44 }; 52 45 -
trunk/WebCore/kwq/KWQKHTMLFactory.mm
r10701 r11588 27 27 #import "KWQKHTMLFactory.h" 28 28 29 #import "KWQKInstance.h"30 29 #import "KWQKHTMLSettings.h" 31 32 KInstance *KHTMLFactory::instance()33 {34 static KInstance instance;35 return &instance;36 }37 30 38 31 KHTMLSettings *KHTMLFactory::defaultHTMLSettings() -
trunk/WebCore/kwq/KWQKHTMLPart.mm
r11527 r11588 177 177 178 178 // The widget is made outside this class in our case. 179 KHTMLPart::init( 0, DefaultGUI);179 KHTMLPart::init(0); 180 180 181 181 mutableInstances().prepend(this); … … 240 240 while (rootPart->parentPart() != 0) 241 241 rootPart = rootPart->parentPart(); 242 KJS::ScriptInterpreter *interpreter = static_cast<KJS::ScriptInterpreter *>(KJSProxy::proxy(rootPart)->interpreter());242 KJS::ScriptInterpreter *interpreter = rootPart->jScript()->interpreter(); 243 243 return interpreter->wasRunByUserGesture(); 244 244 } else … … 1374 1374 KJS::JSObject *win = KJS::Window::retrieveWindow(this); 1375 1375 _bindingRoot->setRootObjectImp (win); 1376 _bindingRoot->setInterpreter (KJSProxy::proxy(this)->interpreter());1376 _bindingRoot->setInterpreter(jScript()->interpreter()); 1377 1377 addPluginRootObject (_bindingRoot); 1378 1378 } -
trunk/WebCore/kwq/KWQKHTMLSettings.h
r9198 r11588 49 49 const QString &cursiveFontName() const { return _cursiveFontName; } 50 50 const QString &fantasyFontName() const { return _fantasyFontName; } 51 52 static QString settingsToCSS() { return QString(); }53 51 54 52 int minFontSize() const { return _minimumFontSize; } … … 68 66 bool JavaScriptCanOpenWindowsAutomatically() const { return _JavaScriptCanOpenWindowsAutomatically; } 69 67 bool isJavaScriptEnabled(const QString &host) const { return _JavaScriptEnabled; } 70 static bool isJavaScriptDebugEnabled() { return false; }71 68 bool isJavaEnabled() const { return _JavaEnabled; } 72 69 bool isJavaEnabled(const QString &host) const { return _JavaEnabled; } -
trunk/WebCore/kwq/KWQKPartsPart.h
r8198 r11588 27 27 #define PART_H_ 28 28 29 #include "KWQKInstance.h"30 29 #include "KWQKURL.h" 31 30 #include "KWQObject.h" … … 74 73 virtual void setName(const QString &name); 75 74 QString name() { return _name; } 76 77 void setXMLFile(const char *) { }78 void setInstance(KInstance *, bool) { }79 75 80 76 virtual bool openURL(const KURL &) = 0; -
trunk/WebCore/kwq/KWQKStandardDirs.h
r3376 r11588 30 30 #include "KWQKGlobal.h" 31 31 32 QString locate(const char *type, const QString& filename, 33 const KInstance* instance=KGlobal::instance()); 34 35 QString locateLocal(const char *type, const QString &filename, 36 const KInstance *instance=KGlobal::instance()); 37 38 class KStandardDirs { 39 public: 40 static QString saveLocation(const char *, const QString &) { return 0; } 41 }; 32 QString locate(const char *type, const QString& filename); 42 33 43 34 #endif -
trunk/WebCore/kwq/KWQKStandardDirs.mm
r10701 r11588 26 26 #include "config.h" 27 27 #import "KWQKStandardDirs.h" 28 #import "KWQStringList.h" 28 29 29 30 // The NSBundle calls in this file can't throw, so no need to block … … 35 36 @end 36 37 37 QString locate(const char *type, const QString &filename , const KInstance *instance)38 QString locate(const char *type, const QString &filename) 38 39 { 39 // FIXME: Eliminate this hard-coding at some point? 40 bool quirk = true; 41 if (filename.contains("html4")) 42 quirk = false; 40 QStringList list = QStringList::split('.', filename); 41 if (list.count() != 2) 42 return QString(); 43 43 NSBundle *bundle = [NSBundle bundleForClass:[KWQKStandardDirsBundleDummy class]]; 44 if (quirk) 45 return QString::fromNSString([bundle pathForResource:@"quirks" ofType:@"css"]); 46 return QString::fromNSString([bundle pathForResource:@"html4" ofType:@"css"]); 44 return QString::fromNSString([bundle pathForResource:list[0].getNSString() ofType:list[1].getNSString()]); 47 45 } 48 49 QString locateLocal(const char *type, const QString &filename, const KInstance *instance)50 {51 return QString();52 } -
trunk/WebCore/kwq/WebCoreBridge.mm
r11527 r11588 2360 2360 RootObject *root = new RootObject(aView); // The root gets deleted by JavaScriptCore. 2361 2361 root->setRootObjectImp(Window::retrieveWindow(part)); 2362 root->setInterpreter( KJSProxy::proxy(part)->interpreter());2362 root->setInterpreter(part->jScript()->interpreter()); 2363 2363 part->addPluginRootObject(root); 2364 2364 return root;
Note: See TracChangeset
for help on using the changeset viewer.