Reviewed by Darin Adler.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-12  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Darin Adler.
4
5         Fix <rdar://problem/5784773>
6         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
7
8         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
9         because clients of the bridged objects are unlikely to prepared for a collection on 
10         non-main thread, which can happen with a PAC file.
11
12         * bridge/runtime_object.cpp:
13         (RuntimeObjectImp::RuntimeObjectImp):
14
15 2008-03-12  Adam Roben  <aroben@apple.com>
16
17         Fix Bug 17815: Inspector's DOM tree should descend into subframes
18
19         <http://bugs.webkit.org/show_bug.cgi?id=17815>
20
21         Reviewed by Tim.
22
23         * page/inspector/DocumentPanel.js:
24         (WebInspector.DocumentPanel.revealNode): Changed to provide
25         _isAncestorIncludingParentFramesWithinPanel and
26         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
27         parameters to findTreeElement so that parent frames will be searched.
28         (WebInspector.DocumentPanel.updateBreadcrumb):
29           - Changed while loop to for loop
30           - Use _parentNodeOrFrameElementWithinPanel instead of
31             Node.parentNode to move to the next node
32           - The loop now ends when we reach the DocumentPanel's document node
33           - Traversal past other Document nodes is now allowed
34           - We add the "start" class to the final crumb after the loop exits
35         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
36         that returns the node itself if the node is a Document node, or the
37         node's ownerDocument otherwise.
38         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
39         Added. Returns the node's parent node or, in the case of a Document
40         node, the node's window's owning frame element, but will not return a
41         node that is in a parent frame of the DocumentPanel's Document.
42         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
43         Added. Returns true if a is an ancestor of b if a is an ancestor of a
44         frame element whose subframe(s) contain b.
45         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
46         children if we have a contentDocument.
47         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
48         loop into a function so that we can add both children of our
49         contentDocument and children of our node to the tree.
50         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
51         the rootDOMNode by traversing the tree outline hierarchy instead of
52         the DOM hierarchy so that we can easily jump up to a parent frame.
53
54 2008-03-12  Adam Roben  <aroben@apple.com>
55
56         Update the styles/metrics panes and breadcrumb after editing DOM
57         attributes
58
59         Reviewed by Tim.
60
61         * page/inspector/DocumentPanel.js:
62         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
63         the parts of the DocumentPanel other than the DOM tree into a new
64         function, _focusedNodeChanged.
65         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
66         forceUpdate parameter specifies whether the update should occur even
67         if the focused node hasn't changed since the last update.
68         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
69         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
70         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
71         parameter. If forceUpdate is true, we always rebuild the styles pane.
72         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
73         call to DocumentPanel._focusedNodeChanged. We have to force the update
74         because we haven't changed the focused node (the attributes of the
75         node have changed).
76         * page/inspector/StylesSidebarPane.js:
77         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
78         parameter. If forceUpdate is true we always rebuild the styles.
79
80 2008-03-12  Mark Rowe  <mrowe@apple.com>
81
82         Further Gtk and Qt build fixes.
83
84         * bridge/runtime.cpp:
85         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
86         * page/gtk/FrameGtk.cpp: Add missing include.
87
88 2008-03-12  Mark Rowe  <mrowe@apple.com>
89
90         Fix Gtk and Qt builds.
91
92         * page/gtk/FrameGtk.cpp:
93         * page/qt/FrameQt.cpp:
94
95 2008-03-12  Mark Rowe  <mrowe@apple.com>
96
97         Mac build fix.
98
99         * WebCore.base.exp:  Remove symbol.
100
101 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
102
103         Build fix.
104
105         * page/win/FrameWin.cpp:
106
107 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
108
109         Build fix.
110
111         * plugins/win/PluginViewWin.cpp:
112         (WebCore::PluginView::bindingInstance):
113
114 2008-03-12  Darin Adler  <darin@apple.com>
115
116         Reviewed by Anders.
117
118         - http://bugs.webkit.org/show_bug.cgi?id=17640
119           eliminate WebCoreFrameBridge
120
121         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
122         to WebFrame in WebKit.
123         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
124         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
125
126         * page/Frame.cpp:
127         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
128         the WebCoreFrameBridge.
129         * page/Frame.h: Added initJavaJSBindings function.
130
131         * page/mac/FrameMac.mm:
132         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
133         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
134
135         * page/mac/WebCoreFrameBridge.h: Removed.
136         * page/mac/WebCoreFrameBridge.mm: Removed.
137
138 2008-03-12  Sam Weinig  <sam@webkit.org>
139
140         Reviewed by Anders Carlsson.
141
142         Don't go through the Document just to get the frame Element.
143
144         * page/DOMWindow.cpp:
145         (WebCore::DOMWindow::frameElement):
146
147 2008-03-12  Anders Carlsson  <andersca@apple.com>
148
149         Reviewed by Geoff and Sam.
150
151         More Instance cleanup:
152         
153         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
154         * Make all Instance subclasses private, add static create methods.         
155         * Have Instance start out with a refcount of 1.
156         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
157           instance constructor methods instead.
158         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
159           refcounting is done correctly.
160          
161         * bridge/c/c_instance.h:
162         (KJS::Bindings::CInstance::create):
163         * bridge/c/c_utility.cpp:
164         (KJS::Bindings::convertNPVariantToValue):
165         * bridge/jni/jni_instance.cpp:
166         (JavaInstance::invokeMethod):
167         * bridge/jni/jni_instance.h:
168         (KJS::Bindings::JavaInstance::create):
169         * bridge/jni/jni_jsobject.cpp:
170         (JavaJSObject::convertJObjectToValue):
171         * bridge/jni/jni_runtime.cpp:
172         (JavaField::valueFromInstance):
173         (JavaArray::valueAt):
174         * bridge/objc/objc_instance.h:
175         (KJS::Bindings::ObjcInstance::create):
176         * bridge/objc/objc_utility.mm:
177         (KJS::Bindings::convertObjcValueToValue):
178         * bridge/qt/qt_instance.cpp:
179         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
180         (KJS::Bindings::QtInstance::getQtInstance):
181         (KJS::Bindings::QtInstance::getRuntimeObject):
182         * bridge/qt/qt_instance.h:
183         * bridge/runtime.cpp:
184         (KJS::Bindings::Instance::Instance):
185         (KJS::Bindings::Instance::createRuntimeObject):
186         * bridge/runtime.h:
187         * bridge/runtime_object.cpp:
188         (RuntimeObjectImp::RuntimeObjectImp):
189         * bridge/runtime_object.h:
190         * page/Frame.h:
191         * page/mac/FrameMac.mm:
192         (WebCore::Frame::createScriptInstanceForWidget):
193         * page/win/FrameWin.cpp:
194         (WebCore::Frame::createScriptInstanceForWidget):
195         * plugins/PluginView.h:
196         * plugins/win/PluginViewWin.cpp:
197         (WebCore::PluginView::bindingInstance):
198
199 2008-03-12  Dan Bernstein  <mitz@apple.com>
200
201         Suggested by Darin Adler. Reviewed by Dave Hyatt.
202
203         - speed up BidiIterator::direction()
204
205         * rendering/bidi.cpp:
206         (WebCore::BidiIterator::current): Made inline and corrected the
207         out-of-bounds condition to work with 0-length text and offsets beyond
208         the end of the text.
209         (WebCore::BidiIterator::direction): Changed to call current() and not
210         call the virtual method isListMarker() most of the time.
211         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
212         (WebCore::appendRunsForObject): Ditto.
213
214 2008-03-12  Adam Roben  <aroben@apple.com>
215
216         Make URLs not be underlined while editing them in the DOM view
217
218         Reviewed by Tim.
219
220         * page/inspector/inspector.css:
221
222 2008-03-12  Adam Roben  <aroben@apple.com>
223
224         Part of Bug 17224: DOM nodes/attributes should be editable
225
226         <http://bugs.webkit.org/show_bug.cgi?id=17224>
227         <rdar://problem/5732825>
228
229         We now start editing if the user single-clicks on an attribute,
230         attribute value, or text node while the parent element is selected.
231         Previously, we started editing on double-click regardless of the
232         selection state of the element.
233
234         URLs in the DOM tree are now followed on Alt/Option-click, rather than
235         on just click.
236
237         Reviewed by Tim.
238
239         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
240         strings.
241         * page/inspector/DocumentPanel.js:
242         (WebInspector.DOMNodeTreeElement.onattach): Call new
243         _makeURLSActivateOnModifiedClick.
244         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
245         Added. Changes the tooltip of each link in this element to indicate
246         that Alt/Option-click will follow the URL, and sets the
247         followOnAltClick property on each link.
248         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
249         selected.
250         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
251         being selected, start editing.
252         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
253         editing here. We block re-rooting of the tree if we're currently
254         editing.
255         (WebInspector.DOMNodeTreeElement._startEditing):
256           - Don't do anything if we're not focused
257           - Pass the event down to _startEditingAttribute.
258         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
259         anything if the event target is a URL and the Alt/Option key is
260         pressed -- in this case we want to follow the link.
261         (WebInspector.DOMNodeTreeElement._updateTitle): Call
262         _makeURLsActivateOnClick again since the anchor elements have all been
263         recreated.
264         * page/inspector/inspector.js:
265         (WebInspector.documentClick): If the anchor as a followOnAltClick
266         property and the Alt/Option key is not pressed, do nothing.
267
268 2008-03-12  Ada Chan  <adachan@apple.com>
269
270         Fixed the initial value of zoom factor.
271
272         Reviewed by Adam.
273
274         * page/Frame.cpp:
275         (WebCore::FramePrivate::FramePrivate):
276
277 2008-03-12  David Hyatt  <hyatt@apple.com>
278
279         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
280         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
281         are just bugs with transforms themselves).
282
283         Reviewed by Adam Roben
284
285         * css/CSSStyleSelector.cpp:
286         (WebCore::CSSStyleSelector::applyProperty):
287         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
288         * dom/Document.cpp:
289         (WebCore::Document::recalcStyle):
290         * page/Frame.cpp:
291         (WebCore::Frame::shouldApplyTextZoom):
292         (WebCore::Frame::shouldApplyPageZoom):
293         * page/Frame.h:
294         * rendering/RenderLayer.cpp:
295         (WebCore::RenderLayer::updateLayerPositions):
296         (WebCore::RenderLayer::setHasVisibleContent):
297         (WebCore::RenderLayer::paintLayer):
298         (WebCore::RenderLayer::hitTestLayer):
299         * rendering/RenderLayer.h:
300
301 2008-03-12  David Hyatt  <hyatt@apple.com>
302
303         Make the zoom factor a float and not a percent.
304
305         Reviewed by antti
306
307         * WebCore.base.exp:
308         * css/CSSStyleSelector.cpp:
309         (WebCore::CSSStyleSelector::applyProperty):
310         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
311         * page/Frame.cpp:
312         (WebCore::Frame::zoomFactor):
313         (WebCore::Frame::setZoomFactor):
314         * page/Frame.h:
315         * page/FramePrivate.h:
316         * svg/SVGSVGElement.cpp:
317         (WebCore::SVGSVGElement::currentScale):
318         (WebCore::SVGSVGElement::setCurrentScale):
319
320 2008-03-12  David Hyatt  <hyatt@apple.com>
321
322         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
323
324         Reviewed by Tim H.
325
326         * WebCore.base.exp:
327         * page/mac/WebCoreFrameBridge.h:
328         * page/mac/WebCoreFrameBridge.mm:
329
330 2008-03-12  Dan Bernstein  <mitz@apple.com>
331
332         Reviewed by Darin Adler and Sam Weinig.
333
334         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
335
336         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
337         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
338         and CTFontRef being toll-free bridged.
339
340         * WebCore.Tiger.exp:
341         * WebCore.base.exp:
342         * platform/graphics/mac/FontMac.mm:
343         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
344         * platform/graphics/mac/FontPlatformData.h:
345         Made m_cgFont a RetainPtr on Leopard.
346         (WebCore::toCTFontRef): Added a function that encapsulates the
347         toll-free bridging.
348         (WebCore::FontPlatformData::FontPlatformData):
349         (WebCore::FontPlatformData::cgFont): Added this accessor method.
350         * platform/graphics/mac/FontPlatformDataMac.mm:
351         (WebCore::FontPlatformData::FontPlatformData): Changed to use
352         CoreText API on Leopard.
353         (WebCore::FontPlatformData::setFont): Ditto.
354         * platform/graphics/mac/SimpleFontDataMac.mm:
355         (WebCore::initFontData):
356         (WebCore::pathFromFont):
357         (WebCore::SimpleFontData::platformInit):
358         (WebCore::SimpleFontData::platformWidthForGlyph):
359         * platform/mac/WebCoreSystemInterface.mm:
360
361 2008-03-12  David Harrison  <harrison@apple.com>
362
363         Reviewed by Darin.
364
365         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
366
367         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
368         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
369         Also saw that cache clearing was missing from Document::detach(), and fixed that.
370         
371         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
372         
373         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
374        
375         * dom/Document.cpp:
376         (WebCore::Document::attach):
377         Assert that there is no AX cache (since there is no renderer).
378         
379         (WebCore::Document::detach):
380         Destroy the AX cache installed on this document.
381         
382         (WebCore::Document::clearAXObjectCache):
383         New. Destroy the AX cache associated with this document.
384         
385         (WebCore::Document::axObjectCache):
386         Added some comments.
387         
388         * dom/Document.h:
389         Declare clearAXObjectCache().
390         
391         * page/Frame.cpp:
392         (WebCore::Frame::disconnectOwnerElement):
393         Destroy the AX cache associated with this frame's document.
394         
395         * page/mac/AXObjectCacheMac.mm:
396         (WebCore::AXObjectCache::remove):        
397         * page/mac/WebCoreAXObject.mm:
398         (-[WebCoreAXObject initWithRenderer:]):
399         (-[WebCoreAXObject detach]):
400         * rendering/RenderObject.cpp:
401         (WebCore::RenderObject::RenderObject):
402         (WebCore::RenderObject::~RenderObject):
403         * rendering/RenderObject.h:
404         (WebCore::RenderObject::setHasAXObject):
405         (WebCore::RenderObject::hasAXObject):
406         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
407         
408         * rendering/RenderWidget.cpp:
409         (WebCore::RenderWidget::destroy):
410         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
411         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
412
413 2008-03-12  Xan Lopez  <xan@gnome.org>
414
415         Reviewed by Alp Toker.
416
417         http://bugs.webkit.org/show_bug.cgi?id=15229
418
419         Add Pango font backend.
420
421         Original patch by Sven Herzberg <sven@imendio.com>
422
423         * GNUmakefile.am:
424         * platform/graphics/gtk/FontCacheGtk.cpp:
425         (WebCore::FontCache::fontExists):
426         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
427         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
428         (WebCore::FontCustomPlatformData::fontPlatformData):
429         (WebCore::releaseData):
430         (WebCore::createFontCustomPlatformData):
431         * platform/graphics/gtk/FontPlatformData.h:
432         (WebCore::FontPlatformData::FontPlatformData):
433         (WebCore::FontPlatformData::hash):
434         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
435         (WebCore::FontPlatformData::FontPlatformData):
436         (WebCore::FontPlatformData::init):
437         (WebCore::FontPlatformData::~FontPlatformData):
438         (WebCore::FontPlatformData::isFixedPitch):
439         (WebCore::FontPlatformData::setFont):
440         (WebCore::FontPlatformData::operator==):
441         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
442         (WebCore::pango_font_get_glyph):
443         (WebCore::GlyphPage::fill):
444         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
445         (WebCore::SimpleFontData::platformInit):
446         (WebCore::SimpleFontData::platformDestroy):
447         (WebCore::SimpleFontData::smallCapsFontData):
448         (WebCore::SimpleFontData::containsCharacters):
449         (WebCore::SimpleFontData::determinePitch):
450         (WebCore::SimpleFontData::platformWidthForGlyph):
451         (WebCore::SimpleFontData::setFont):
452
453 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
454
455         Reviewed by Oliver.
456         
457         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
458         
459         Fixes some (but not all) of the instances of:
460         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
461         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
462
463         * editing/InsertLineBreakCommand.cpp:
464         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
465         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
466         * editing/RemoveFormatCommand.cpp:
467         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
468
469 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
470
471         Reviewed by Darin.
472
473         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
474         some sites.
475
476         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
477         if the frame and subframe belong to the same site, then the encoding is inherited from parent
478         frame to subframe. Otherwise, it is not.
479
480         Always inheriting the encoding would cause a security problem.
481
482         Tests: http/tests/misc/frame-default-enc-different-domain.html
483                http/tests/misc/frame-default-enc-same-domain.html
484                fast/encoding/frame-default-enc.html
485
486         * loader/FrameLoader.cpp:
487         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
488         this function also has code that uses it without checking, so it must be safe.
489
490 2008-03-12  Mark Rowe  <mrowe@apple.com>
491
492         Gtk build fix.
493
494         * page/Frame.h: Forward-declare FramePrivate.
495
496 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
497
498         Disable LTCG/PGO for all of WebCore for now.
499         We'll re-enable this as part of follow-on PGO work.
500         
501         Reviewed by Oliver.
502
503         * WebCore.vcproj/WebCore.vcproj:
504
505 2008-03-11  Darin Adler  <darin@apple.com>
506
507         Reviewed by Sam.
508
509         - remove all bridge-related things from WebCore except the bridge itself
510
511         * WebCore.base.exp: Removed the bridge and setBridge functions.
512
513         * loader/FrameLoader.cpp:
514         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
515         close method.
516
517         * page/Frame.cpp:
518         (WebCore::Frame::~Frame): Removed call to setBridge(0).
519         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
520         * page/Frame.h: Removed setBridge and bridge functions.
521         * page/FramePrivate.h: Removed m_bridge pointer.
522         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
523
524         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
525         Removed bridgeForDOMDocument: and clearFrame methods.
526         * page/mac/WebCoreFrameBridge.mm: Ditto.
527         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
528         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
529
530 2008-03-11  Darin Adler  <darin@apple.com>
531
532         - restored some code I removed in the Range change; this code can't go
533           until the rest of the Range fix is in
534
535         * dom/Range.cpp:
536         (WebCore::Range::commonAncestorContainer): Added back the check for 0
537         that I removed erroneously in the Range patch.
538         (WebCore::Range::processContents): Left in assertions I used to debug
539         this.
540
541 2008-03-11  Darin Adler  <darin@apple.com>
542
543         - fix Release build
544
545         * platform/mac/ScrollViewMac.mm:
546         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
547
548 2008-03-11  Darin Adler  <darin@apple.com>
549
550         Reviewed by Anders.
551
552         - simplify Mac code for ScrollView, since it's used only for FrameView
553           and not in two different modes like it was historically
554         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
555
556         * bindings/objc/DOMHTML.mm:
557         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
558
559         * bridge/jni/jni_jsobject.cpp:
560         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
561         and NSView, use the WebCoreFrameView interface to do it.
562
563         * editing/mac/EditorMac.mm:
564         (WebCore::Editor::paste): getDocumentView -> documentView.
565         * editing/mac/SelectionControllerMac.mm:
566         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
567
568         * page/FrameView.h: Fixed comment.
569
570         * page/InspectorController.cpp:
571         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
572         to ScrollView* since FrameView is derived from ScrollView.
573
574         * page/mac/EventHandlerMac.mm:
575         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
576         * page/mac/FrameMac.mm:
577         (WebCore::Frame::imageFromRect): Ditto.
578         * page/mac/WebCoreAXObject.mm:
579         (-[WebCoreAXObject position]): Ditto.
580         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
581         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
582         WebCoreBridgeHolder to use WebCoreFrameView instead.
583
584         * page/mac/WebCoreFrameBridge.mm:
585         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
586         getDocumentView -> documentView.
587
588         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
589         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
590         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
591         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
592         protocol, which returns a WebCore::Frame directly rather than a bridge.
593
594         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
595
596         * platform/ScrollView.h: Moved the constructor and destructor out of the
597         class-specific #if blocks. Renamed Mac-specific function that gets the
598         NSView for from getDocumentView to documentView and a scrollView function
599         that returns an appropriately classed NSScrollView.
600
601         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
602         instead of Widget.
603         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
604         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
605
606         * platform/mac/PopupMenuMac.mm:
607         (WebCore::PopupMenu::show): getDocumentView -> documentView.
608         * platform/mac/ScrollViewMac.mm:
609         (WebCore::ScrollView::ScrollView): Added.
610         (WebCore::ScrollView::~ScrollView): Added.
611         (WebCore::ScrollView::scrollView): Added.
612         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
613         (WebCore::ScrollView::visibleHeight): Ditto.
614         (WebCore::ScrollView::visibleContentRect): Ditto.
615         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
616         (WebCore::ScrollView::contentsWidth): Ditto.
617         (WebCore::ScrollView::contentsHeight): Ditto.
618         (WebCore::ScrollView::contentsX): Ditto.
619         (WebCore::ScrollView::contentsY): Ditto.
620         (WebCore::ScrollView::scrollOffset): Ditto.
621         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
622         (WebCore::ScrollView::setContentsPos): Ditto.
623         (WebCore::ScrollView::setVScrollbarMode): Ditto.
624         (WebCore::ScrollView::setHScrollbarMode): Ditto.
625         (WebCore::ScrollView::setScrollbarsMode): Ditto.
626         (WebCore::ScrollView::vScrollbarMode): Ditto.
627         (WebCore::ScrollView::hScrollbarMode): Ditto.
628         (WebCore::ScrollView::suppressScrollbars): Ditto.
629         (WebCore::ScrollView::addChild): Ditto.
630         (WebCore::ScrollView::resizeContents): Ditto.
631         (WebCore::ScrollView::updateContents): Ditto.
632         (WebCore::ScrollView::contentsToWindow): Ditto.
633         (WebCore::ScrollView::windowToContents): Ditto.
634         (WebCore::ScrollView::setStaticBackground): Ditto.
635         (WebCore::ScrollView::documentView): Renamed and removed unused case.
636         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
637
638         * platform/mac/WidgetMac.mm:
639         (WebCore::Widget::getOuterView): Update for protocol name change.
640
641         * rendering/RenderThemeMac.mm:
642         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
643         (WebCore::RenderThemeMac::paintRadio): Ditto.
644         (WebCore::RenderThemeMac::paintButton): Ditto.
645         (WebCore::RenderThemeMac::paintMenuList): Ditto.
646         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
647         (WebCore::RenderThemeMac::paintSearchField): Ditto.
648         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
649         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
650         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
651
652 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
653
654         Reviewed by Adam Roben.
655
656         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
657         reduce the massive amount of conditionalization in the file.
658         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
659
660         * WebCore.vcproj/WebCore.vcproj:
661         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
662         (WebCore::setCookies):
663         (WebCore::cookies):
664         (WebCore::cookiesEnabled):
665         * platform/network/win/CookieJarWin.cpp:
666         (WebCore::setCookies):
667         (WebCore::cookies):
668         (WebCore::cookiesEnabled):
669
670 2008-03-11  Darin Adler  <darin@apple.com>
671
672         Reviewed by Sam.
673
674         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
675
676         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
677         that were formerly handled by the bridge.
678
679         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
680         functions to a ScriptController section. Removed willPopupMenu.
681
682         * page/mac/ChromeMac.mm:
683         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
684         via the client instead of the bridge.
685
686         * page/mac/EventHandlerMac.mm:
687         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
688         and makeFirstResponder via the chrome client instead of the bridge.
689
690         * page/mac/FrameMac.mm: Removed willPopupMenu.
691
692         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
693         SubclassResponsibility category. Also removed some unneeded imports.
694
695         * platform/mac/PopupMenuMac.mm:
696         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
697
698         * platform/mac/WidgetMac.mm:
699         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
700         calling via the bridge.
701
702 2008-03-11  Darin Adler  <darin@apple.com>
703
704         Reviewed by Mitz.
705
706         - make some Range improvements (preparation for Range support for DOM mutation)
707
708         Made constructors private, added create functions.
709         Made refcount start at 1 rather than starting at 0 and being incremented.
710         Made Range use two Position objects for the start/end container/offset pairs.
711
712         * WebCore.base.exp: Updated.
713
714         * dom/Document.cpp:
715         (WebCore::Document::createRange): Changed to use Range::create.
716         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
717
718         * dom/Position.cpp:
719         (WebCore::Position::formatForDebugger): Updated for member variable name change.
720         (WebCore::Position::showTreeForThis): Ditto.
721         (WebCore::startPosition): Changed to use Range::startPosition.
722         (WebCore::endPosition): Changed to use Range::endPosition.
723
724         * dom/Position.h: Made the data members public and renamed them to container
725         and offset. But since offset() is already a function, temporarily used posOffset
726         for the data member. Later we'll get rid of offset(). Made more functions inline.
727         Removed the constructor that takes a PositionIterator.
728
729         * dom/PositionIterator.cpp:
730         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
731         that used to be in Position.
732         * dom/PositionIterator.h: Added conversion operator to produce a Position.
733         Removed friend declaration for Position.
734
735         * dom/Range.cpp:
736         (WebCore::Range::Range): Updated constructors for data member changes and made
737         them use a refcount of 1.
738         (WebCore::Range::create): Added.
739         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
740         is now indicated by m_start.container of 0. Also updated to use m_start instead
741         of the old m_startContainer.
742         (WebCore::Range::startOffset): Ditto.
743         (WebCore::Range::endContainer): Ditto.
744         (WebCore::Range::endOffset): Ditto.
745         (WebCore::Range::commonAncestorContainer): Ditto.
746         (WebCore::Range::collapsed): Ditto.
747         (WebCore::Range::setStart): Ditto.
748         (WebCore::Range::setEnd): Ditto.
749         (WebCore::Range::collapse): Ditto.
750         (WebCore::Range::isPointInRange): Ditto.
751         (WebCore::Range::comparePoint): Ditto.
752         (WebCore::Range::compareNode): Ditto.
753         (WebCore::Range::compareBoundaryPoints): Ditto.
754         (WebCore::Range::boundaryPointsValid): Ditto.
755         (WebCore::Range::deleteContents): Ditto.
756         (WebCore::Range::intersectsNode): Ditto.
757         (WebCore::Range::processContents): Ditto.
758         (WebCore::Range::extractContents): Ditto.
759         (WebCore::Range::cloneContents): Ditto.
760         (WebCore::Range::insertNode): Ditto.
761         (WebCore::Range::toString): Ditto.
762         (WebCore::Range::text): Ditto.
763         (WebCore::Range::createContextualFragment): Ditto.
764         (WebCore::Range::detach): Ditto.
765         (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
766         multiple calls to the virtual nodeType() function.
767         (WebCore::Range::cloneRange): Ditto.
768         (WebCore::Range::setStartAfter): Ditto.
769         (WebCore::Range::setEndBefore): Ditto.
770         (WebCore::Range::setEndAfter): Ditto.
771         (WebCore::Range::selectNode): Ditto.
772         (WebCore::Range::selectNodeContents): Ditto.
773         (WebCore::Range::surroundContents): Ditto.
774         (WebCore::Range::setStartBefore): Ditto.
775         (WebCore::Range::checkDeleteExtract): Ditto.
776         (WebCore::Range::containedByReadOnly): Ditto.
777         (WebCore::Range::firstNode): Ditto.
778         (WebCore::Range::editingStartPosition): Ditto.
779         (WebCore::Range::pastLastNode): Ditto.
780         (WebCore::Range::addLineBoxRects): Ditto.
781         (WebCore::Range::formatForDebugger): Ditto.
782         (WebCore::operator==): Ditto.
783         (WebCore::rangeOfContents): Ditto.
784         (WebCore::Range::maxStartOffset): Ditto.
785         (WebCore::Range::maxEndOffset): Ditto.
786
787         * dom/Range.h: Made constructors private. Added create functions.
788         Added getters for startContainer/Offset and endContainer/Offset that
789         return 0 instead of an exception for detached ranges that are inline
790         and don't require an ExceptionCode out parameter. Changed the parameters
791         to setStart and setEnd to PassRefPtr. Removed isDetached function.
792         Made ActionType and processContents private. Made startPosition and
793         endPosition inlines and have then return const&. Renamed startNode and
794         pastEndNode to firstNode and pastLastNode to reduce the chance of
795         confusion with startContainer/endContainer. Used Position for m_start
796         and m_end instead of separate container and offset members. Changed
797         maxStartOffset and maxEndOffset into int to match other offsets.
798
799         * editing/ApplyStyleCommand.cpp:
800         (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
801         (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
802         * editing/CompositeEditCommand.cpp:
803         (WebCore::CompositeEditCommand::inputText): Ditto.
804         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
805         * editing/DeleteSelectionCommand.cpp:
806         (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
807         * editing/Editor.cpp:
808         (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
809         (WebCore::Editor::setComposition): Changed to use Range::create.
810         (WebCore::paragraphAlignedRangeForRange): Ditto.
811         (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
812         isDetached and check for 0 from startContainer instead.
813         (WebCore::Editor::compositionRange): Changed to use Range::create.
814         * editing/EditorCommand.cpp:
815         (WebCore::unionDOMRanges): Ditto.
816         * editing/Selection.cpp:
817         (WebCore::Selection::toRange): Ditto.
818         * editing/TextIterator.cpp:
819         (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
820         name change.
821         (WebCore::TextIterator::range): Changed to use Range::create.
822         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
823         (WebCore::TextIterator::subrange): Ditto.
824         * editing/VisiblePosition.cpp:
825         (WebCore::makeRange): Ditto.
826         * editing/VisiblePosition.h: Added now-needed include.
827         * editing/htmlediting.cpp:
828         (WebCore::indexForVisiblePosition): Changed to use Range::create.
829         (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
830         isDetached and check for 0 instead and to use Range::create.
831         * editing/markup.cpp:
832         (WebCore::renderedText): Changed to use Range::create.
833         (WebCore::createMarkup): Changed to no longer use isDetached and also
834         for new firstNode/pastEndNode names.
835         (WebCore::createFragmentFromText): Ditto.
836         * editing/visible_units.cpp:
837         (WebCore::previousBoundary): Changed to use Range::create.
838         * page/mac/WebCoreFrameBridge.mm:
839         (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
840         isDetached().
841         * rendering/RenderTextControl.cpp:
842         (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
843         (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
844
845 2008-03-11  Daniel Zucker <zucker@wake3.com>
846
847         Reviewed by Adam Roben.
848
849         There are a handful of placed where the use of CFNetwork-specific
850         calls are protected by PLATFORM(CF).  Revise to use the more specific
851         USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783) 
852
853         * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
854         * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
855         * platform/network/win/CookieJarWin.cpp:  Correct error in
856           InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
857           as all other implementations in this file.
858
859 2008-03-11  Xan Lopez  <xan@gnome.org>
860
861         Reviewed by Alp Toker.
862
863         http://bugs.webkit.org/show_bug.cgi?id=16476
864
865         Add libsoup HTTP backend.
866         
867         * GNUmakefile.am:
868         * platform/network/ResourceHandleInternal.h:
869         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
870         * platform/network/soup/AuthenticationChallenge.h: Added.
871         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
872         * platform/network/soup/ResourceError.h: Added.
873         (WebCore::ResourceError::ResourceError):
874         * platform/network/soup/ResourceHandleSoup.cpp: Added.
875         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
876         (WebCore::ResourceHandle::~ResourceHandle):
877         (WebCore::dataCallback):
878         (WebCore::parseDataUrl):
879         (WebCore::ResourceHandle::start):
880         (WebCore::ResourceHandle::cancel):
881         (WebCore::ResourceHandle::bufferedData):
882         (WebCore::ResourceHandle::supportsBufferedData):
883         (WebCore::ResourceHandle::setDefersLoading):
884         (WebCore::ResourceHandle::loadsBlocked):
885         (WebCore::ResourceHandle::willLoadFromCache):
886         * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
887         (WebCore::ResourceRequest::ResourceRequest):
888         (WebCore::ResourceRequest::doUpdatePlatformRequest):
889         * platform/network/soup/ResourceResponse.h: Added.
890         (WebCore::ResourceResponse::ResourceResponse):
891         (WebCore::ResourceResponse::setResponseFired):
892         (WebCore::ResourceResponse::responseFired):
893         (WebCore::ResourceResponse::doUpdateResourceResponse):
894
895 2008-03-11  Rodney Dawes  <dobey@wayofthemonkey.com>
896
897         Fix Qt build.
898
899         * plugins/qt/PluginDataQt.cpp:
900         (PluginData::initPlugins)
901
902 2008-03-11  Adam Roben  <aroben@apple.com>
903
904         Make attribute quoting in DOM view more consistent with source view
905
906         Two changes which make the DOM view more consistent with source view:
907          1) We now quote all attribute values, including URLs
908          2) The quotes around the values are now purple, matching the left and
909             right angle brackets that surround the tag
910
911         One bug fixed by these changes:
912          1) The entire URL is selected for editing when you double-click a URL
913             that is an attribute value. Previously, the first and last
914             characters were not included in the selection.
915
916         Reviewed by Darin.
917
918         * page/inspector/DocumentPanel.js:
919         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
920         to account for the quotes around attribute values anymore because the
921         quotes are now outside the webkit-html-attribute-value span.
922         * page/inspector/utilities.js:
923         (nodeTitleInfo): Quote all attribute values, including URLs, and place
924         the quotes outside the webkit-html-attribute-value span.
925
926 2008-03-11  Adam Roben  <aroben@apple.com>
927
928         Stop including pthread.h in WebCore on Windows
929
930         Reviewed by Darin.
931
932         * WebCore.vcproj/WebCore.vcproj:
933           - Changed the include path to not contain pthreads/
934           - Let VS remove a duplicate FileConfiguration element
935           - Let VS have its way with the file ordering
936         * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
937         Windows.
938         * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
939         localtime_r (pthread.h was providing a macro that substituted plain
940         old localtime before, but localtime_s is "more secure", so I went with
941         that).
942         * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
943
944 2008-03-11  Adam Roben  <aroben@apple.com>
945
946         Roll out r30961 since it broke the default site icon on Windows
947
948         * loader/icon/IconDatabase.cpp:
949         (WebCore::IconDatabase::defaultIcon):
950
951 2008-03-11  Dan Bernstein  <mitz@apple.com>
952
953         Reviewed by Darin Adler.
954
955         - clean up line layout code
956
957         * platform/graphics/GraphicsContext.cpp:
958         (WebCore::TextRunIterator::increment): Removed the resolver parameter.
959         (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
960         createBidiRunsForLine(), which no longer takes a start parameter.
961         * platform/text/BidiResolver.h:
962         (WebCore::BidiResolver::): Made Noncopyable and removed the
963         m_adjustEmbedding member variable.
964         (WebCore::BidiResolver::position): Added. Returns the resolver's current
965         position.
966         (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
967         position without changing any other state.
968         (WebCore::BidiResolver::increment): Added. Advances the resolver to the
969         next position, allowing the iterator to push and pop embedding.
970         (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
971         the call to increment().
972         (WebCore::BidiResolver::embed): Removed code to save, set and restore
973         m_adjustEmbedding.
974         (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
975         'start' iterator. Instead, start at the current position. Removed code
976         to set m_adjustEmbedding. Changed for noncopyability.
977         * rendering/RenderBlock.h:
978         * rendering/bidi.cpp:
979         (WebCore::bidiNext): Made the resolver parameter optional. Changed to
980         null-check the 'end of inline' pointer only twice.
981         (WebCore::bidiFirst): Made the resolver parameter optional.
982         (WebCore::BidiIterator::increment): Ditto.
983         (WebCore::BidiState::increment): Added. Overrides the default
984         BidiResolver::increment() method by passing the resolver to
985         BidiIterator::increment().
986         (WebCore::checkMidpoints): Removed the resolver parameter.
987         (WebCore::BidiState::appendRun): Removed code to save, set and restore
988         m_adjustEmbedding. Adjusted for change to increment().
989         (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
990         and unreachable code.
991         (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
992         (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
993         the resolver from this method to determineStartPosition(). Unified the
994         resolver with the 'start' iterator. Removed unreachable code. Moved one
995         statement from the beginning of the while loop to the end.
996         (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
997         the resolver from layoutInlineChildren() into this method.
998         (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
999         the 'start' iterator being one object.
1000         (WebCore::skipNonBreakingSpace): Made the parameter const.
1001         (WebCore::requiresLineBox): Ditto.
1002         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
1003         the change to BidiIterator::increment().
1004         (WebCore::RenderBlock::skipWhitespace): Made two versions of this
1005         method, one for BidiIterator and one for BidiState.
1006         (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
1007         parameter.
1008         (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
1009         parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
1010         variable and changed the 'last' variable to do its job.
1011         * rendering/bidi.h:
1012
1013 2008-03-10  Adam Roben  <aroben@apple.com>
1014
1015         Part of Bug 17224: DOM nodes/attributes should be editable
1016
1017         <http://bugs.webkit.org/show_bug.cgi?id=17224>
1018         <rdar://problem/5732825>
1019
1020         This patch makes text nodes editable via double-click.
1021
1022         Reviewed by Tim.
1023
1024         * page/inspector/DocumentPanel.js:
1025         (WebInspector.DOMNodeTreeElement._startEditing):
1026           - Moved most of this code to _startEditingAttribute
1027           - Calls _startEditingTextNode or _startEditingAttribute as
1028             appropriate
1029         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
1030         came from _startEditing.
1031         (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
1032         (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
1033         (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
1034         _attributeEditingCancelled.
1035         * page/inspector/utilities.js:
1036         (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
1037         that we can easily recognize/edit them.
1038
1039 2008-03-11  Holger Hans Peter Freyther  <zecke@selfish.org>
1040
1041         Reviewed by Darin.
1042
1043         r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
1044         not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
1045         to theme this icon and the Gtk+ platform will probably end up with themable icons
1046         as well.
1047         
1048         Remove dead code from the windows port and move the urlIcon from the windows
1049         directory to the Resource directory to be used by Qt and other ports.
1050         
1051         Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
1052         it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
1053         once it does it wants to use this for getting the urlIcon as well.
1054
1055         * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
1056         * loader/icon/IconDatabase.cpp:
1057         (WebCore::IconDatabase::defaultIcon):
1058
1059 2008-03-11  Tor Arne Vestbø  <tavestbo@trolltech.com>
1060
1061         Reviewed by Darin.
1062
1063         Implemented HTML media element support for QtWebKit, using Phonon.
1064
1065         http://bugs.webkit.org/show_bug.cgi?id=17766
1066
1067         * WebCore.pro:
1068         * platform/graphics/MediaPlayer.cpp:
1069         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
1070         (debugMediaObject):
1071         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1072         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1073         (WebCore::MediaPlayerPrivate::getSupportedTypes):
1074         (WebCore::MediaPlayerPrivate::hasVideo):
1075         (WebCore::MediaPlayerPrivate::load):
1076         (WebCore::MediaPlayerPrivate::cancelLoad):
1077         (WebCore::MediaPlayerPrivate::play):
1078         (WebCore::MediaPlayerPrivate::pause):
1079         (WebCore::MediaPlayerPrivate::paused):
1080         (WebCore::MediaPlayerPrivate::seek):
1081         (WebCore::MediaPlayerPrivate::seeking):
1082         (WebCore::MediaPlayerPrivate::duration):
1083         (WebCore::MediaPlayerPrivate::currentTime):
1084         (WebCore::MediaPlayerPrivate::setEndTime):
1085         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
1086         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
1087         (WebCore::MediaPlayerPrivate::bytesLoaded):
1088         (WebCore::MediaPlayerPrivate::totalBytesKnown):
1089         (WebCore::MediaPlayerPrivate::totalBytes):
1090         (WebCore::MediaPlayerPrivate::setRate):
1091         (WebCore::MediaPlayerPrivate::setVolume):
1092         (WebCore::MediaPlayerPrivate::setMuted):
1093         (WebCore::MediaPlayerPrivate::dataRate):
1094         (WebCore::MediaPlayerPrivate::networkState):
1095         (WebCore::MediaPlayerPrivate::readyState):
1096         (WebCore::MediaPlayerPrivate::updateStates):
1097         (WebCore::MediaPlayerPrivate::setVisible):
1098         (WebCore::MediaPlayerPrivate::setRect):
1099         (WebCore::MediaPlayerPrivate::loadStateChanged):
1100         (WebCore::MediaPlayerPrivate::rateChanged):
1101         (WebCore::MediaPlayerPrivate::sizeChanged):
1102         (WebCore::MediaPlayerPrivate::timeChanged):
1103         (WebCore::MediaPlayerPrivate::volumeChanged):
1104         (WebCore::MediaPlayerPrivate::didEnd):
1105         (WebCore::MediaPlayerPrivate::loadingFailed):
1106         (WebCore::MediaPlayerPrivate::naturalSize):
1107         (WebCore::MediaPlayerPrivate::eventFilter):
1108         (WebCore::MediaPlayerPrivate::repaint):
1109         (WebCore::MediaPlayerPrivate::paint):
1110         (WebCore::MediaPlayerPrivate::stateChanged):
1111         (WebCore::MediaPlayerPrivate::tick):
1112         (WebCore::MediaPlayerPrivate::metaDataChanged):
1113         (WebCore::MediaPlayerPrivate::seekableChanged):
1114         (WebCore::MediaPlayerPrivate::hasVideoChanged):
1115         (WebCore::MediaPlayerPrivate::bufferStatus):
1116         (WebCore::MediaPlayerPrivate::finished):
1117         (WebCore::MediaPlayerPrivate::currentSourceChanged):
1118         (WebCore::MediaPlayerPrivate::aboutToFinish):
1119         (WebCore::MediaPlayerPrivate::prefinishMarkReached):
1120         (WebCore::MediaPlayerPrivate::totalTimeChanged):
1121         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
1122         (WebCore::MediaPlayerPrivate::):
1123         (WebCore::MediaPlayerPrivate::isAvailable):
1124
1125 2008-03-10  Sam Weinig  <sam@webkit.org>
1126
1127         Reviewed by Beth Dakin.
1128
1129         Throw a SECURITY_ERR when accessing a tainted canvas
1130         by CanvasRenderingContext2D::getImageData() and
1131         HTMLCanvasElement::toDataURL().
1132
1133         * html/CanvasRenderingContext2D.cpp:
1134         (WebCore::CanvasRenderingContext2D::getImageData):
1135         * html/CanvasRenderingContext2D.h:
1136         * html/CanvasRenderingContext2D.idl:
1137         * html/HTMLCanvasElement.cpp:
1138         (WebCore::HTMLCanvasElement::toDataURL):
1139         * html/HTMLCanvasElement.h:
1140         * html/HTMLCanvasElement.idl:
1141
1142 2008-03-10  Justin Garcia  <justin.garcia@apple.com>
1143
1144         Reviewed by Sam.
1145
1146         <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
1147
1148         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1149         (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
1150         comparing the first character of the prefix to the first character
1151         of the property name.
1152
1153 2008-03-10  Andre Boule  <aboule@apple.com>
1154
1155         Reviewed by Beth.
1156
1157         Hold off on initializing the frame to avoid the RenderView getting 
1158         a null FrameView. This could potentially cause problems.
1159
1160         * svg/graphics/SVGImage.cpp:
1161         (WebCore::SVGImage::dataChanged):
1162
1163 2008-03-10  Darin Adler  <darin@apple.com>
1164
1165         - try to fix Qt build
1166
1167         * bridge/qt/qt_runtime.cpp:
1168         (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
1169
1170 2008-03-10  Darin Adler  <darin@apple.com>
1171
1172         Reviewed by Antti.
1173
1174         - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
1175           should be redrawn as visited immediately
1176         - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
1177           the visited URL at directory.umi
1178         - fix http://bugs.webkit.org/show_bug.cgi?id=4941
1179           Visited links should be marked as visited
1180         - fix http://bugs.webkit.org/show_bug.cgi?id=7960
1181           REGRESSION: Visited link color doesn't displayed after loading page from cache
1182
1183         We now mark all links on a page as "changed" at the appropriate times.
1184
1185         * WebCore.base.exp: Update since I made completeURL be a const member function.
1186
1187         * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
1188         into locals. Also changed some static data members to file-scoped globals with
1189         internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
1190         prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
1191         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
1192         (WebCore::parseUASheet): Tweak the comment.
1193         (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
1194         use local variables instead of globals where possible.
1195         (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
1196         it can store the link in a hash. Also changed it to have a return value instead
1197         of having it modify a global variable. Added code to put the hash into a set so
1198         we can tell later if this is one of the links that affects this page.
1199         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
1200         checkPseudoState.
1201         (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
1202         (WebCore::CSSStyleSelector::styleForElement): Ditto.
1203         (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
1204         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
1205         the SVG style sheet to use a boolean global and put it right here in the function
1206         since this is the only code that needs to know about it.
1207         (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
1208         (WebCore::colorForCSSValue): Moved code inside the function that is not needed
1209         anywhere else.
1210         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
1211         to checkPseudoState.
1212         (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
1213         all links if there were any in the set.
1214         (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
1215         links if the one that changed is in the set.
1216
1217         * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
1218         CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
1219         didn't need to be public, and removed others that could be made into non-member
1220         functions. Changed pseudoStyleRulesForElement to take a const String& instead of
1221         a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
1222         Got rid of unneeded friend declarations.
1223
1224         * dom/Document.cpp:
1225         (WebCore::Document::completeURL): Made const.
1226         (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
1227         (WebCore::findSlashSlash): Ditto.
1228         (WebCore::findSlashDotSlash): Ditto.
1229         (WebCore::containsColonSlashSlash):
1230         (WebCore::cleanPath): Ditto.
1231         (WebCore::matchLetter): Ditto.
1232         (WebCore::needsTrailingSlash): Ditto.
1233         (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
1234         the poor-man's completeURL function. The idea of putting it here is that this
1235         way it can be alongside the real completeURL function. Later we should figure out
1236         a way to make this function share more code with the real thing and match behavior.
1237
1238         * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
1239
1240         * page/DOMWindow.cpp:
1241         (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
1242
1243         * page/Page.cpp:
1244         (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
1245         style selectors.
1246         (WebCore::Page::visitedStateChanged): Ditto.
1247         * page/Page.h: Added the above functions.
1248
1249         * page/PageGroup.cpp:
1250         (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
1251         The CSSStyleSelector now handles actually computing the hash, and it does so by
1252         calling code in Document.
1253         (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
1254         a bit more code. Added code that calls visitedStateChanged if a new link was added.
1255         (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
1256         if any visited links are removed.
1257         * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
1258         definition here.
1259
1260         * platform/text/StringHash.h:
1261         (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
1262         the StringImpl::computeHash function, using the same technique for avoiding 0.
1263         (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
1264         (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
1265
1266         * rendering/RenderStyle.cpp:
1267         (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
1268         of getting directly at a data member so the data member could be made private.
1269
1270         * loader/FrameLoader.cpp:
1271         (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
1272         (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
1273         * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
1274
1275 2008-03-10  Adam Roben  <aroben@apple.com>
1276
1277         Part of Bug 17224: DOM nodes/attributes should be editable
1278
1279         <http://bugs.webkit.org/show_bug.cgi?id=17224>
1280         <rdar://problem/5732825>
1281
1282         This patch makes DOM attributes editable via double-click.
1283
1284         Reviewed by Tim.
1285
1286         * page/inspector/DocumentPanel.js:
1287         (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
1288         we're being edited, since we want default editing behaviors to work.
1289         (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
1290         before doing anything else.
1291         (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
1292         lets you edit attributes.
1293         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
1294         Uses a scratch element to get the new attribute(s) parsed, then sets
1295         the attribute(s) on the node in the inspected document.
1296         (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
1297         (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
1298         representation of the node in the Inspector's DOM tree to reflect
1299         the node's current state.
1300         * page/inspector/inspector.css: Made the .editing class apply
1301         everywhere.
1302         * page/inspector/utilities.js:
1303         (nodeTitleInfo): Changed to surround attribute name/value pairs in a
1304         webkit-html-attribute span so that we can easily edit the pair as a
1305         whole.
1306
1307 2008-03-10  David Kilzer  <ddkilzer@apple.com>
1308
1309         Fix 64-bit builds.
1310
1311         Reviewed by Stephanie.
1312
1313         WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
1314         so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
1315
1316         * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
1317         r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
1318
1319 2008-03-10  Eric Seidel  <eric@webkit.org>
1320
1321         Reviewed by Darin.
1322
1323         Remove KJS::UChar, use ::UChar instead
1324         http://bugs.webkit.org/show_bug.cgi?id=17017
1325
1326         To functional changes, thus no tests.
1327
1328         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1329         (WebCore::hasCSSPropertyNamePrefix):
1330         (WebCore::cssPropertyName):
1331         * bindings/js/JSDOMWindowBase.cpp:
1332         (WebCore::windowProtoFuncAToB):
1333         (WebCore::windowProtoFuncBToA):
1334         * bindings/js/JSSVGPODTypeWrapper.h:
1335         * bindings/js/kjs_proxy.cpp:
1336         (WebCore::KJSProxy::evaluate):
1337         * bridge/objc/objc_utility.mm:
1338         (KJS::Bindings::throwError):
1339         * dom/Document.cpp:
1340         (WebCore::Document::parseQualifiedName):
1341         * platform/text/AtomicString.cpp:
1342         (WebCore::AtomicString::add):
1343         * platform/text/String.cpp:
1344         (WebCore::String::String):
1345         (WebCore::String::operator Identifier):
1346         (WebCore::String::operator UString):
1347         * platform/text/TextCodecICU.cpp:
1348         (WebCore::TextCodecICU::decode):
1349         * svg/SVGAnimatedTemplate.h:
1350
1351 2008-03-10  Darin Adler  <darin@apple.com>
1352
1353         Reviewed by Sam.
1354
1355         - eliminate keyboard UI mode method from WebCoreFrameBridge
1356
1357         * page/ChromeClient.h: Added keyboardUIMode function.
1358         (WebCore::ChromeClient::keyboardUIMode): Ditto.
1359         * page/mac/EventHandlerMac.mm:
1360         (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
1361         of bridge function.
1362         * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
1363         ones.
1364
1365         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
1366         Do not try to fight the Xcode.
1367
1368 2008-03-10  Darin Adler  <darin@apple.com>
1369
1370         - oops, forgot to save last couple changes from the editor
1371
1372         * bindings/js/JSDOMWindowCustom.cpp:
1373         (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
1374         (WebCore::JSDOMWindow::mark): Sorted alphabetically.
1375
1376 2008-03-10  Darin Adler  <darin@apple.com>
1377
1378         Reviewed by Geoff.
1379
1380         - fix failing regression test (window.navigator is getting garbage
1381           collected and thus losing its custom properties)
1382
1383         * bindings/js/JSDOMWindowCustom.cpp:
1384         (WebCore::markDOMObject): Added helper function.
1385         (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
1386         off the window object.
1387
1388         * page/DOMWindow.h:
1389         (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
1390         creating it if it's already there.
1391         (WebCore::DOMWindow::optionalSelection): Ditto.
1392         (WebCore::DOMWindow::optionalHistory): Ditto.
1393         (WebCore::DOMWindow::optionalLocationbar): Ditto.
1394         (WebCore::DOMWindow::optionalMenubar): Ditto.
1395         (WebCore::DOMWindow::optionalPersonalbar): Ditto.
1396         (WebCore::DOMWindow::optionalScrollbars): Ditto.
1397         (WebCore::DOMWindow::optionalStatusbar): Ditto.
1398         (WebCore::DOMWindow::optionalToolbar): Ditto.
1399         (WebCore::DOMWindow::optionalConsole): Ditto.
1400         (WebCore::DOMWindow::optionalNavigator): Ditto.
1401
1402         * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
1403         alphabetical order since there are a lot of them.
1404
1405 2008-03-10  Darin Adler  <darin@apple.com>
1406
1407         Reviewed by Sam.
1408
1409         - eliminate Java applet methods from WebCoreFrameBridge
1410
1411         * loader/FrameLoaderClient.h: Added a javaApplet function.
1412         * page/mac/FrameMac.mm:
1413         (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
1414         Use the loader client instead of the bridge to get the applet.
1415         * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
1416         pollForAppletInView methods. Also removed other unused things.
1417
1418 2008-03-10  Marc-Antoine Ruel  <maruel@gmail.com>
1419
1420         Reviewed by Eric, landed by Darin.
1421
1422         http://bugs.webkit.org/show_bug.cgi?id=16095
1423         Move GraphicsContextPrivate to its own header file.
1424
1425         Moves GraphicsContextState and GraphicsContextPrivate to its
1426         own header
1427
1428         * WebCore.vcproj/WebCore.vcproj:
1429         * platform/graphics/GraphicsContext.cpp:
1430         * platform/graphics/GraphicsContextPrivate.h: Added.
1431         (WebCore::GraphicsContextState::GraphicsContextState):
1432         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
1433
1434 2008-03-10  Julien Chaffraix  <julien.chaffraix@gmail.com>
1435
1436         Reviewed and landed by Darin.
1437
1438         bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
1439
1440         Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
1441         by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
1442
1443         * bindings/js/kjs_binding.cpp:
1444         (WebCore::setDOMException): Removed PERMISSION_DENIED code.
1445         * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
1446         * dom/ExceptionCode.h: Ditto.
1447         * xml/XMLHttpRequest.cpp:
1448         (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
1449         * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
1450
1451 2008-03-09  Adam Roben  <aroben@apple.com>
1452
1453         Refactor CSS editing code so we can share it with DOM editing
1454
1455         Add WebInspector.startEditing, which takes the element to be edited, a
1456         committedCallback, a cancelledCallback, and a context parameter. This
1457         function takes care of setting up the element for editing, and calls
1458         either the cancelledCallback or committedCallback when editing ends.
1459
1460         Reviewed by Tim.
1461
1462         * page/inspector/StylesSidebarPane.js:
1463         (WebInspector.StylePropertyTreeElement.startEditing):
1464           - Call WebInspector.isBeingEdited and WebInspector.startEditing
1465           - Removed code now handled by WebInspector.startEditing
1466         (WebInspector.StylePropertyTreeElement.editingEnded):
1467           - Renamed from endEditing
1468           - Removed code now handled by WebInspector.startEditing
1469         (WebInspector.StylePropertyTreeElement.editingCancelled):
1470           - Renamed from cancelEditing
1471           - Changed parameters to match WebInspector.startEditing's
1472             cancelledCallback
1473         (WebInspector.StylePropertyTreeElement.editingCommitted):
1474           - Renamed from commitEditing
1475           - Changed parameters to match WebInspector.startEditing's
1476             committedCallback
1477         * page/inspector/inspector.js:
1478         (WebInspector.changeFocus): Changed a call to firstParentWithClassName
1479         to firstParentOrSelfWithClassName so that if the focusable element
1480         itself is the target it will be recognized. I don't know why this
1481         change wasn't needed before this.
1482         (WebInspector.isBeingEdited): Added.
1483         (WebInspector.startEditing): Added.
1484
1485 2008-03-10  Adam Roben  <aroben@apple.com>
1486
1487         Windows build fix
1488
1489         * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
1490         $(WebKitOutputDir) instead of hard-coding WebKitBuild.
1491
1492 2008-03-10  Darin Adler  <darin@apple.com>
1493
1494         * DerivedSources.make: Merge plug-in-related changes with the new way of handling
1495         autogenerated DOM classes.
1496
1497 2008-03-10  Johnny Ding  <johnnyding.webkit@gmail.com>
1498
1499         Reviewed, tweaked and landed by Alexey.
1500
1501         - fix http://bugs.webkit.org/show_bug.cgi?id=17732        
1502
1503         We didn't have a fallback to frame encoding in the case of loading a script via
1504         changing its src attribute.
1505
1506         Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
1507
1508         * html/HTMLScriptElement.cpp:
1509         (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
1510         charset for correct decoding of script content.
1511         (WebCore::HTMLScriptElement::insertedIntoDocument):
1512         (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
1513         for the script (as much as can be determined prior to loading it).
1514         * html/HTMLScriptElement.h:
1515         * html/HTMLTokenizer.cpp:
1516         (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
1517         decoding of script content.
1518
1519 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1520
1521         Reviewed by Lars.
1522
1523         Fix reference counting of returned MimeType and Plugin objects
1524         created in the array wrappers.
1525
1526         * plugins/MimeTypeArray.cpp:
1527         * plugins/MimeTypeArray.h:
1528         * plugins/Plugin.cpp:
1529         * plugins/Plugin.h:
1530         * plugins/PluginArray.cpp:
1531         * plugins/PluginArray.h:
1532
1533 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1534
1535         Wx linking fix.
1536
1537         Added missing stubs for PluginData.
1538
1539         * platform/wx/TemporaryLinkStubs.cpp:
1540
1541 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1542
1543         Windows build fix that I forgot to merge earlier ;(
1544
1545         Forward declare Page as class, not struct.
1546
1547         * plugins/PluginData.h:
1548
1549 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1550
1551         Attempt to fix the Wx build.
1552
1553         * WebCoreSources.bkl:
1554
1555 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
1556
1557         Reviewed by Darin.
1558
1559         Done with Lars.
1560
1561         http://bugs.webkit.org/show_bug.cgi?id=16815
1562
1563         Ported the manually written JS bindings of window.navigator,
1564         window.navigator.plugins and window.navigator.mimeTypes to
1565         auto-generated bindings.
1566
1567         Moved the globally cached plugin and mimetype information to a
1568         per WebCore::Page shared PluginData structure.
1569
1570         Implemented window.navigator.plugins.refresh() in a
1571         platform-independent way.
1572
1573         * DerivedSources.make:
1574         * GNUmakefile.am:
1575         * WebCore.pro:
1576         * WebCore.vcproj/WebCore.vcproj:
1577         * WebCore.xcodeproj/project.pbxproj:
1578         * bindings/js/JSDOMWindowBase.cpp:
1579         (WebCore::JSDOMWindowBase::getValueProperty):
1580         * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
1581         (WebCore::JSMimeTypeArray::canGetItemsForName):
1582         (WebCore::JSMimeTypeArray::nameGetter):
1583         * bindings/js/JSNavigatorCustom.cpp: Added.
1584         (WebCore::needsYouTubeQuirk):
1585         (WebCore::JSNavigator::appVersion):
1586         * bindings/js/JSPluginArrayCustom.cpp: Added.
1587         (WebCore::JSPluginArray::canGetItemsForName):
1588         (WebCore::JSPluginArray::nameGetter):
1589         * bindings/js/JSPluginCustom.cpp: Added.
1590         (WebCore::JSPlugin::canGetItemsForName):
1591         (WebCore::JSPlugin::nameGetter):
1592         * bindings/js/kjs_navigator.cpp: Removed.
1593         * bindings/js/kjs_navigator.h: Removed.
1594         * dom/Clipboard.cpp:
1595         * dom/DOMImplementation.cpp:
1596         (WebCore::DOMImplementation::createDocument):
1597         * loader/FrameLoader.cpp:
1598         (WebCore::FrameLoader::shouldUsePlugin):
1599         * page/DOMWindow.cpp:
1600         (WebCore::DOMWindow::clear):
1601         (WebCore::DOMWindow::navigator):
1602         * page/DOMWindow.h:
1603         * page/DOMWindow.idl:
1604         * page/DragController.cpp:
1605         * page/Frame.cpp:
1606         * page/Frame.h:
1607         * page/Navigator.cpp: Added.
1608         (WebCore::Navigator::Navigator):
1609         (WebCore::Navigator::~Navigator):
1610         (WebCore::Navigator::disconnectFrame):
1611         (WebCore::Navigator::appCodeName):
1612         (WebCore::Navigator::appName):
1613         (WebCore::Navigator::appVersion):
1614         (WebCore::Navigator::language):
1615         (WebCore::Navigator::userAgent):
1616         (WebCore::Navigator::platform):
1617         (WebCore::Navigator::plugins):
1618         (WebCore::Navigator::mimeTypes):
1619         (WebCore::Navigator::product):
1620         (WebCore::Navigator::productSub):
1621         (WebCore::Navigator::vendor):
1622         (WebCore::Navigator::vendorSub):
1623         (WebCore::Navigator::cookieEnabled):
1624         (WebCore::Navigator::javaEnabled):
1625         * page/Navigator.h: Added.
1626         (WebCore::Navigator::create):
1627         (WebCore::Navigator::frame):
1628         * page/Navigator.idl: Added.
1629         * page/Page.cpp:
1630         (WebCore::Page::refreshPlugins):
1631         (WebCore::Page::pluginData):
1632         * page/Page.h:
1633         * page/Plugin.h: Removed.
1634         * page/mac/FrameMac.mm:
1635         * page/mac/WebCoreFrameBridge.mm:
1636         (-[WebCoreFrameBridge canProvideDocumentSource]):
1637         * page/mac/WebCoreViewFactory.h:
1638         * page/qt/FrameQt.cpp:
1639         * page/win/FrameWin.cpp:
1640         * platform/gtk/TemporaryLinkStubs.cpp:
1641         * platform/mac/PlugInInfoStoreMac.mm: Removed.
1642         * platform/qt/MIMETypeRegistryQt.cpp:
1643         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1644         * plugins/MimeType.cpp: Added.
1645         (WebCore::MimeType::MimeType):
1646         (WebCore::MimeType::~MimeType):
1647         (WebCore::MimeType::type):
1648         (WebCore::MimeType::suffixes):
1649         (WebCore::MimeType::description):
1650         (WebCore::MimeType::enabledPlugin):
1651         * plugins/MimeType.h: Added.
1652         (WebCore::MimeType::create):
1653         * plugins/MimeType.idl: Added.
1654         * plugins/MimeTypeArray.cpp: Added.
1655         (WebCore::MimeTypeArray::MimeTypeArray):
1656         (WebCore::MimeTypeArray::~MimeTypeArray):
1657         (WebCore::MimeTypeArray::length):
1658         (WebCore::MimeTypeArray::item):
1659         (WebCore::MimeTypeArray::canGetItemsForName):
1660         (WebCore::MimeTypeArray::nameGetter):
1661         (WebCore::MimeTypeArray::getPluginData):
1662         * plugins/MimeTypeArray.h: Added.
1663         (WebCore::MimeTypeArray::create):
1664         (WebCore::MimeTypeArray::disconnectFrame):
1665         * plugins/MimeTypeArray.idl: Added.
1666         * plugins/Plugin.cpp: Added.
1667         (WebCore::Plugin::Plugin):
1668         (WebCore::Plugin::~Plugin):
1669         (WebCore::Plugin::name):
1670         (WebCore::Plugin::filename):
1671         (WebCore::Plugin::description):
1672         (WebCore::Plugin::length):
1673         (WebCore::Plugin::item):
1674         (WebCore::Plugin::canGetItemsForName):
1675         (WebCore::Plugin::nameGetter):
1676         * plugins/Plugin.h: Added.
1677         (WebCore::Plugin::create):
1678         * plugins/Plugin.idl: Added.
1679         * plugins/PluginArray.cpp: Added.
1680         (WebCore::PluginArray::PluginArray):
1681         (WebCore::PluginArray::~PluginArray):
1682         (WebCore::PluginArray::length):
1683         (WebCore::PluginArray::item):
1684         (WebCore::PluginArray::canGetItemsForName):
1685         (WebCore::PluginArray::nameGetter):
1686         (WebCore::PluginArray::refresh):
1687         (WebCore::PluginArray::getPluginData):
1688         * plugins/PluginArray.h: Added.
1689         (WebCore::PluginArray::create):
1690         (WebCore::PluginArray::disconnectFrame):
1691         * plugins/PluginArray.idl: Added.
1692         * plugins/PluginData.cpp: Added.
1693         (WebCore::PluginData::PluginData):
1694         (WebCore::PluginData::~PluginData):
1695         (WebCore::PluginData::supportsMimeType):
1696         (WebCore::PluginData::pluginNameForMimeType):
1697         * plugins/PluginData.h: Added.
1698         (WebCore::PluginData::create):
1699         (WebCore::PluginData::disconnectPage):
1700         (WebCore::PluginData::page):
1701         (WebCore::PluginData::plugins):
1702         (WebCore::PluginData::mimes):
1703         * plugins/mac/PluginDataMac.mm: Added.
1704         (WebCore::PluginData::initPlugins):
1705         (WebCore::PluginData::refresh):
1706         * plugins/qt/PluginDataQt.cpp: Added.
1707         (WebCore::PluginData::initPlugins):
1708         * plugins/win/PluginDataWin.cpp: Added.
1709         (WebCore::PluginData::initPlugins):
1710         (WebCore::PluginData::refresh):
1711
1712 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1713
1714         Reviewed by Holger.
1715
1716         Replace two printfs() in the Qt port with notImplemented().
1717
1718         * html/CanvasRenderingContext2D.cpp:
1719         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
1720         (WebCore::CanvasRenderingContext2D::applyFillPattern):
1721
1722 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1723
1724         Reviewed by Alp.
1725
1726         Compilation fix with gcc 4.3: Include stdio.h for printf.
1727
1728         * html/CanvasRenderingContext2D.cpp:
1729         * html/HTMLCanvasElement.cpp:
1730
1731 2008-03-09  Steve Falkenburg  <sfalken@apple.com>
1732
1733         Stop Windows build if an error occurs in a prior project.
1734
1735         Rubber stamped by Darin.
1736
1737         * WebCore.vcproj/WebCore.vcproj:
1738         * WebCore.vcproj/WebCoreGenerated.vcproj:
1739
1740 2008-03-09  Darin Adler  <darin@apple.com>
1741
1742         * DerivedSources.make: Third try at fixing the build.
1743         * bindings/js/JSRGBColor.cpp: And touching this file.
1744
1745 2008-03-09  Darin Adler  <darin@apple.com>
1746
1747         * DerivedSources.make: One *more* try at fixing the build.
1748
1749 2008-03-09  Darin Adler  <darin@apple.com>
1750
1751         * DerivedSources.make: One more try at fixing the build.
1752
1753 2008-03-09  Darin Adler  <darin@apple.com>
1754
1755         * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
1756         bots by removing the incorrect file.
1757
1758 2008-03-09  Oliver Hunt  <oliver@apple.com>
1759
1760         RS=Mark Rowe
1761
1762         Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
1763
1764         * DerivedSources.make:
1765
1766 2008-03-09  Darin Adler  <darin@apple.com>
1767
1768         Reviewed by Adam.
1769
1770         * DerivedSources.make: Put the list of DOM classes into its own
1771         variable, and generate the JavaScript bindings and Objective-C
1772         bindings dependencies from that. Added some separators to make it
1773         a little easier to see the sections of the file. Moved all the
1774         Mac-specific rules (except for the SVG conditional part) down
1775         to the bottom of the file in a separate section.
1776
1777 2008-03-09  Adam Roben  <aroben@apple.com>
1778
1779         Windows build fix
1780
1781         * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
1782         excluded from all three CG-based configurations: Debug, Release, and
1783         Debug_Internal.
1784
1785 2008-03-08  Mark Rowe  <mrowe@apple.com>
1786
1787         Attempt to fix the Qt build.
1788
1789         * platform/MIMETypeRegistry.cpp:  Add missing include.
1790
1791 2008-03-08  Oliver Hunt  <oliver@apple.com>
1792
1793         Reviewed by Sam W.
1794
1795         Bug 16516: canvas image patterns stop working with some transformations
1796
1797         Simple fix.  We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
1798         with CG.  However any transforms involving FLT_MAX immediately get
1799         consumed by the introduced floating point error.  yStep had already been
1800         clamped to a much smaller arbitrary value, and this patch makes us use
1801         that clamp value for xStep as well.
1802
1803         * html/CanvasPattern.cpp:
1804         (WebCore::CanvasPattern::createPattern):
1805
1806 2008-03-08  Oliver Hunt  <oliver@apple.com>
1807
1808         Reviewed by Mitz.
1809
1810         Bug 17728: Canvas.createPattern with null repeat argument throws an exception
1811
1812         Trivial fix, we were calling toString on null which produces the string "null",
1813         we just needed to switch to using valueToStringWithNullCheck rather than 
1814         JSValue::toString directly
1815
1816         Test: fast/canvas/canvas-pattern-behaviour.html
1817
1818         * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1819         (WebCore::JSCanvasRenderingContext2D::createPattern):
1820
1821 2008-03-08  Mark Rowe  <mrowe@apple.com>
1822
1823         Reviewed by Darin Adler.
1824
1825         Fix 64-bit build with GCC 4.2.
1826
1827         * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
1828         * platform/mac/SharedBufferMac.mm: Ditto.
1829
1830 2008-03-08  Dan Bernstein  <mitz@apple.com>
1831
1832         Reviewed by Oliver Hunt.
1833
1834         - fix garbage in transparent areas in canvas.toDataURL results
1835
1836         * platform/graphics/cg/ImageBufferCG.cpp:
1837         (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
1838         painting the canvas image onto it.
1839
1840 2008-03-08  Darin Adler  <darin@apple.com>
1841
1842         Reviewed by Adele.
1843
1844         - eliminate custom highlight methods from WebCoreFrameBridge
1845
1846         * page/Chrome.cpp:
1847         (WebCore::ChromeClient::customHighlightRect): Added.
1848         (WebCore::ChromeClient::paintCustomHighlight): Added.
1849         * page/ChromeClient.h: Added custom highlight functions.
1850         * page/Frame.h: Removed custom highlight functions.
1851         * page/mac/FrameMac.mm: Ditto.
1852         * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
1853         * rendering/InlineTextBox.cpp:
1854         (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
1855         the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
1856         * rendering/RenderBox.cpp:
1857         (WebCore::RenderBox::paintCustomHighlight): Ditto.
1858         * rendering/RootInlineBox.cpp:
1859         (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
1860         (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
1861
1862 2008-03-07  Stephanie Lewis  <slewis@apple.com>
1863
1864         Reviewed by Oliver.
1865
1866         Fix Windows build.
1867
1868         * platform/graphics/cg/ImageBufferCG.cpp:
1869         (WebCore::ImageBuffer::toDataURL):
1870
1871 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
1872
1873         Unify concept of enabling Netscape Plug-in API (NPAPI).
1874
1875         Reviewed by Darin.
1876
1877         No test cases since there is no change in functionality.
1878
1879         * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
1880         If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
1881         * WebCore.NPAPI.exp: Added.
1882         * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
1883         * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
1884         comments) since we now handle exported NPAPI methods via DerivedSources.make.
1885
1886         * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
1887         defined in Platform.h.
1888
1889         * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1890         (-[DOMElement _NPObject]):
1891
1892         * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
1893         ENABLE(NETSCAPE_PLUGIN_API).
1894         * bridge/NP_jsobject.h: Ditto.
1895         * bridge/c/c_class.cpp: Ditto.
1896         * bridge/c/c_class.h: Ditto.
1897         * bridge/c/c_instance.cpp: Ditto.
1898         * bridge/c/c_instance.h: Ditto.
1899         * bridge/c/c_runtime.cpp: Ditto.
1900         * bridge/c/c_runtime.h: Ditto.
1901         * bridge/c/c_utility.cpp: Ditto.
1902         * bridge/c/c_utility.h: Ditto.
1903         * bridge/npruntime.cpp: Ditto.
1904         * bridge/npruntime_impl.h: Ditto.
1905         * bridge/npruntime_priv.h: Ditto.
1906         * bridge/runtime.cpp: Ditto.
1907         (KJS::Bindings::Instance::createBindingForLanguageInstance):
1908
1909         * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1910         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
1911         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
1912         * html/HTMLPlugInElement.h: Ditto.
1913
1914         * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1915         (WebCore::Frame::clearScriptObjects):
1916         (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
1917         guard around m_windowScriptNPObject.
1918         * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1919         * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
1920         m_windowScriptNPObject.
1921         * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1922         (WebCore::Frame::createScriptInstanceForWidget):
1923
1924 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
1925
1926         Reviewed by Darin.
1927
1928         REGRESSION: Korean decoding doesn't support extended EUC-KR.
1929
1930         Test: fast/encoding/char-decoding.html
1931
1932         * platform/text/TextCodecICU.cpp:
1933         (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
1934         encoding names by manually registering windows-939-2000, and mapping all other related
1935         encodings to it.
1936
1937 2008-03-07  Dan Bernstein  <mitz@apple.com>
1938
1939         Reviewed by Stephanie.
1940
1941         - try to fix leaks seen on Tiger after r30840
1942
1943         * css/CSSStyleSelector.cpp:
1944         (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
1945         delete, rather than arena delete, to deallocate the root default style.
1946
1947 2008-03-07  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
1948
1949         Reviewed by Alp Toker.
1950
1951         http://bugs.webkit.org/show_bug.cgi?id=17681
1952         GtkLauncher fails to render an element with position: fixed
1953
1954         Implement the required parts of PlatformScreenGtk.
1955
1956         * ChangeLog:
1957         * platform/gtk/PlatformScreenGtk.cpp:
1958         (WebCore::screenDepth):
1959         (WebCore::screenIsMonochrome):
1960         (WebCore::screenRect):
1961
1962 2008-03-07  Oliver Hunt  <oliver@apple.com>
1963
1964         Reviewed by Darin Adler.
1965
1966         Bug 16610: <canvas> restore() removes path segments created before it
1967
1968         The problem here is that WebKit stored the Path as part of the state, so
1969         restore would incorrectly lose changes made to the canvas path.  To match
1970         Firefox and HTML5 we make two real changes:
1971           * Move the context path from the state object directly onto the context.
1972             This is responsible for all the changes to the path manipulation functions
1973           * Add transform tracking to each state -- this is needed to correctly transform
1974             the current path when restore()-ing to a prior state.
1975
1976         Test: fast/canvas/canvas-save-restore-with-path.html
1977
1978         * html/CanvasRenderingContext2D.cpp:
1979         (WebCore::CanvasRenderingContext2D::restore):
1980         (WebCore::CanvasRenderingContext2D::scale):
1981         (WebCore::CanvasRenderingContext2D::rotate):
1982         (WebCore::CanvasRenderingContext2D::translate):
1983         (WebCore::CanvasRenderingContext2D::transform):
1984         (WebCore::CanvasRenderingContext2D::beginPath):
1985         (WebCore::CanvasRenderingContext2D::closePath):
1986         (WebCore::CanvasRenderingContext2D::moveTo):
1987         (WebCore::CanvasRenderingContext2D::lineTo):
1988         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
1989         (WebCore::CanvasRenderingContext2D::arcTo):
1990         (WebCore::CanvasRenderingContext2D::arc):
1991         (WebCore::CanvasRenderingContext2D::rect):
1992         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
1993         (WebCore::CanvasRenderingContext2D::fill):
1994         (WebCore::CanvasRenderingContext2D::stroke):
1995         (WebCore::CanvasRenderingContext2D::clip):
1996         (WebCore::CanvasRenderingContext2D::isPointInPath):
1997         * html/CanvasRenderingContext2D.h:
1998
1999 2008-03-07  Oliver Hunt  <oliver@apple.com>
2000
2001         Reviewed by Ada.
2002
2003         Fix for crash caused by FrameLoader incorrectly assuming it has
2004         a RenderWidget
2005
2006         In some circumstances an application embedding a WebView may 
2007         choose to prevent a webview from loading a resource.  If that
2008         resource was requested by an <object> element then we may 
2009         fallback to different content which may not produce a RenderWidget.
2010         Unfortunately FrameLoader::loadSubframe was assuming that if a
2011         renderer was produced it would always be a RenderWidget, and arbitrarily
2012         performed what could be an incorrect cast.  This could then lead to
2013         a crash.
2014
2015         We currently don't have anyway of making a test for this.
2016
2017         * loader/FrameLoader.cpp:
2018         (WebCore::FrameLoader::loadSubframe):
2019
2020 2008-03-07  Samuel Weinig  <sam@webkit.org>
2021
2022         Reviewed by Oliver Hunt.
2023
2024         Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
2025         <canvas> lacks toDataURL()
2026
2027         Tests: fast/canvas/toDataURL-noData.html
2028                fast/canvas/toDataURL-supportedTypes.html
2029
2030         * html/CanvasRenderingContext2D.cpp:
2031         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
2032         * html/HTMLCanvasElement.cpp:
2033         (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
2034         been called on a tainted canvas. 
2035         (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
2036         data, checks to see if the MIME type is supported.  Unsupported MIME types and the null string (which is made
2037         by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec.  The actual 
2038         toDataURL logic is actually done in the ImageBuffer class.
2039         * html/HTMLCanvasElement.h: Add function declarations.
2040         * html/HTMLCanvasElement.idl: Add function declaration.
2041
2042         * platform/MIMETypeRegistry.cpp:
2043         (WebCore::initializeSupportedImageMIMETypes):
2044         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2045         (WebCore::initializeSupportedJavaScriptMIMETypes):
2046         (WebCore::initializeSupportedNonImageMimeTypes):
2047         (WebCore::initializeSupportedMediaMIMETypes):
2048         (WebCore::initializeMIMETypeRegistry):
2049         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
2050         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2051         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
2052         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
2053         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
2054         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2055         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
2056         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
2057         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
2058         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
2059         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
2060         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
2061         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
2062         * platform/MIMETypeRegistry.h:
2063         Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
2064         MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
2065
2066         * platform/graphics/ImageBuffer.h: Add toDataURL method.
2067         * platform/graphics/cairo/ImageBufferCairo.cpp:
2068         (WebCore::ImageBuffer::toDataURL): Add stub.
2069         * platform/graphics/cg/ImageBufferCG.cpp:
2070         (WebCore::ImageBuffer::create):
2071         (WebCore::ImageBuffer::getImageData):
2072         (WebCore::ImageBuffer::putImageData):
2073         (WebCore::ImageBuffer::toDataURL):
2074         Converts the current context to a data: url of the specified MIME type.  This method
2075         unfortunately has to flip the context, resulting in less than optimal code.
2076
2077         * platform/graphics/qt/ImageBufferQt.cpp:
2078         (WebCore::ImageBuffer::toDataURL): Add stub.
2079         * platform/graphics/wx/ImageBufferWx.cpp:
2080         (WebCore::ImageBuffer::toDataURL): Add stub.
2081
2082 2008-03-07  Steve Falkenburg  <sfalken@apple.com>
2083
2084         Build fix.
2085
2086         * WebCore.vcproj/WebCore.vcproj:
2087
2088 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
2089
2090         Reviewed by Mark Rowe.
2091
2092         Correct build intermediary output
2093         (http://bugs.webkit.org/show_bug.cgi?id=17713)
2094
2095         * WebCore/WebCore.vcproj:  Correct intermediary paths
2096
2097 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
2098
2099         Reviewed by Steve Falkenburg.
2100
2101         Add Cairo build requirements to WebCore.vcproj under a new
2102         set of targets.  Exclude Cairo elements from normal CG build.
2103         Exclude CG elements from Cairo builds.
2104         (http://bugs.webkit.org/show_bug.cgi?id=17300)
2105
2106         * WebCore.vcproj/WebCore.vcproj:
2107         * WebCore.vcproj/webcore.vsprops: Added.
2108
2109 2008-03-07  Darin Adler  <darin@apple.com>
2110
2111         Reviewed by Adam.
2112
2113         - eliminated WebCoreFrameBridge runOpenPanel
2114
2115         * page/ChromeClient.h: Added runOpenPanel function.
2116         * page/mac/ChromeMac.mm:
2117         (WebCore::ChromeClient::runOpenPanel): Added.
2118         * platform/FileChooser.cpp:
2119         (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
2120         Also start the refcount at 1.
2121         (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
2122         (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.
2123         * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.
2124         * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
2125         since they are no longer platform-specific.
2126         * platform/qt/FileChooserQt.cpp: Ditto.
2127         * platform/win/FileChooserWin.cpp: Ditto.
2128         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
2129         * platform/mac/FileChooserMac.mm:
2130         (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
2131         bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
2132         class and m_controller data member and move the cosntrutor/destructor to platform-
2133         independent code.
2134
2135 2008-03-07  Adam Roben  <aroben@apple.com>
2136
2137         Add JavaScriptDebugServer
2138
2139         This class is a singleton which allows one or more
2140         JavaScriptDebugListeners to receive callbacks during JavaScript
2141         execution.
2142
2143         Right now all listeners receive callbacks for all Pages in the
2144         process. Eventually we will want to support listeners registering for
2145         callbacks for specific Pages (e.g., the Inspector will want to listen
2146         for execution in just the Page it's inspecting).
2147
2148         Pages notify the JavaScriptDebugServer when they are created so that
2149         it can install itself as the Page's debugger.
2150
2151         Reviewed by Darin.
2152
2153         * GNUMakefile.am: Added new files to project.
2154         * WebCore.pro: Ditto.
2155         * WebCore.vcproj/WebCore.vcproj: Ditto.
2156         * WebCore.xcodeproj/project.pbxproj: Ditto.
2157         * WebCoreSources.bkl: Ditto.
2158         * page/JavaScriptDebugListener.h: Added.
2159         * page/JavaScriptDebugServer.cpp: Added.
2160         (WebCore::toFrame):
2161         (WebCore::JavaScriptDebugServer::shared):
2162         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
2163         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
2164         (WebCore::JavaScriptDebugServer::addListener): Registers as the
2165         debugger for all Pages if we're adding our first listener.
2166         (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
2167         debugger for all Pages if we're removing our last listner.
2168         (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
2169         debugger for the newly created Page if we have any listeners.
2170         (WebCore::dispatchDidParseSource): Helper function.
2171         (WebCore::dispatchFailedToParseSource): Ditto.
2172         (WebCore::JavaScriptDebugServer::sourceParsed): Call
2173         dispatchDidParseSource or dispatchFailedToParseSource depending on
2174         whether there was an error or not.
2175         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
2176         the passed-in JavaScriptExecutionCallback on each listener, guarding
2177         against re-entry.
2178         (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
2179         (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
2180         (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
2181         (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.
2182         * page/JavaScriptDebugServer.h: Added.
2183         * page/Page.cpp:
2184         (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
2185         created so it can register as our debugger if needed.
2186
2187 2008-03-07  Darin Adler  <darin@apple.com>
2188
2189         Reviewed by Brady.
2190
2191         - fix a theoretical problem with the visited-link hash table by avoiding collision
2192           with the special "deleted" value
2193         - improve efficiency of with the visited-link hash table by not hashing twice
2194
2195         * page/PageGroup.cpp:
2196         (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
2197         value, since the hash table uses that for deleted hash table entries.
2198         (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
2199         value with the HashSet.
2200         (WebCore::PageGroup::addVisitedLink): Ditto.
2201
2202         * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
2203         values. This assumes that the value is already a hash value, and doesn't try to
2204         hash it again. Used this for m_visitedLinkHashes.
2205
2206 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
2207
2208         Fix the Qt build.
2209
2210         * WebCore.pro:
2211
2212 2008-03-06  Sam Weinig  <sam@webkit.org> with a little help from Oliver Hunt  <oliver@apple.com>
2213
2214         Reviewed by Mitz.
2215
2216         Implement the HTML5 canvas tainting rules to prevent potential data leakage
2217
2218         Added originClean to HTMLCanvasElement and CanvasPattern
2219         to track whether a canvas (or pattern) is tainted by remote
2220         data.
2221         Use originClean flag to determine whether getImageData should
2222         return, well, image data.
2223
2224         Test: http/tests/security/canvas-remote-read-remote-image.html
2225
2226         * html/CanvasPattern.cpp:
2227         (WebCore::CanvasPattern::CanvasPattern):
2228         * html/CanvasPattern.h:
2229         * html/CanvasRenderingContext2D.cpp:
2230         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
2231         (WebCore::CanvasRenderingContext2D::setFillStyle):
2232         (WebCore::CanvasRenderingContext2D::checkOrigin):
2233         (WebCore::CanvasRenderingContext2D::drawImage):
2234         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2235         (WebCore::CanvasRenderingContext2D::createPattern):
2236         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage):
2237         (WebCore::CanvasRenderingContext2D::getImageData):
2238         * html/CanvasRenderingContext2D.h:
2239         * html/HTMLCanvasElement.cpp:
2240         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2241         * html/HTMLCanvasElement.h:
2242         (WebCore::HTMLCanvasElement::setOriginTainted):
2243         (WebCore::HTMLCanvasElement::originClean):
2244
2245 2008-03-06  Anders Carlsson  <andersca@apple.com>
2246
2247         Reviewed by Jon.
2248
2249         Templatize the JNI call code to reduce the amount of code that has
2250         to be duplicated.
2251
2252         * bridge/jni/jni_class.cpp:
2253         (JavaClass::JavaClass):
2254         * bridge/jni/jni_instance.cpp:
2255         (JavaInstance::stringValue):
2256         (JavaInstance::numberValue):
2257         (JavaInstance::booleanValue):
2258         (JavaInstance::invokeMethod):
2259         * bridge/jni/jni_jsobject.cpp:
2260         (JavaJSObject::convertJObjectToValue):
2261         * bridge/jni/jni_runtime.cpp:
2262         (JavaField::JavaField):
2263         (JavaMethod::JavaMethod):
2264         * bridge/jni/jni_utility.cpp:
2265         * bridge/jni/jni_utility.h:
2266         (KJS::Bindings::):
2267         (KJS::Bindings::callJNIMethodIDA):
2268         (KJS::Bindings::callJNIMethodV):
2269         (KJS::Bindings::callJNIMethod):
2270         (KJS::Bindings::callJNIStaticMethod):
2271
2272 2008-03-06  Darin Adler  <darin@apple.com>
2273
2274         Reviewed by Mitz.
2275
2276         - fix regression test failures from the visited-link change
2277
2278         * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
2279         * page/PageGroup.cpp:
2280         (WebCore::PageGroup::addVisitedLink): Do nothing and return early
2281         if shouldTrackVisitedLinks is false.
2282         (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
2283         so the next time a link is queried this will be populated from history.
2284         (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
2285         * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
2286         for now, but it would be better if it was per-page-group instead.
2287
2288 2008-03-06  Adele Peterson  <adele@apple.com>
2289
2290         Reviewed by Darin.
2291
2292         Fixes for for <rdar://problem/5785892> Implement activeElement attribute for HTMLDocument (HTML5)
2293         and <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
2294
2295         Tests: fast/dom/HTMLDocument/activeElement.html
2296                fast/dom/HTMLDocument/hasFocus.html
2297
2298         * html/HTMLDocument.cpp:
2299         (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
2300         (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).
2301         * html/HTMLDocument.h: Added methods for activeElement and hasFocus.
2302         * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus.
2303
2304 2008-03-06  Dan Bernstein  <mitz@apple.com>
2305
2306         Reviewed by Darin Adler.
2307
2308         - fix <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)
2309
2310         Test: fast/text/soft-hyphen-3.html
2311
2312         * rendering/bidi.cpp:
2313         (WebCore::checkMidpoints):
2314         (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
2315         midpoint after a hyphen always be a valid iterator, not allowing an
2316         offset past the end of a text node. Changed the check for consecutive
2317         soft hyphens to account for that.
2318
2319 2008-03-06  Darin Adler  <darin@apple.com>
2320
2321         - try to fix Wx build
2322
2323         * WebCoreSources.bkl: Added PageGroup.cpp.
2324
2325 2008-03-06  Darin Adler  <darin@apple.com>
2326
2327         - fix some builds
2328
2329         * GNUmakefile.am: Added PageGroup.cpp.
2330         * WebCore.base.exp: Removed WebCoreHistory.
2331         * WebCore.pro: Added PageGroup.cpp.
2332
2333 2008-03-06  Alexey Proskuryakov  <ap@webkit.org>
2334
2335         Reviewed by Darin.
2336
2337         <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore
2338         
2339         * ForwardingHeaders/wtf/unicode/Collator.h: Added.
2340         * xml/XSLTUnicodeSort.cpp:
2341         (WebCore::xsltUnicodeSortFunction):
2342         * xml/XSLTUnicodeSort.h:
2343
2344 2008-03-06  Darin Adler  <darin@apple.com>
2345
2346         Reviewed by Mitz.
2347
2348         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
2349           REGRESSION: iframes are added to Safari's History menu
2350           by separating the visited link machinery from global history
2351
2352         This should also make page loading faster due to more efficient visited link coloring.
2353
2354         * WebCore.base.exp: Updated.
2355         * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp.
2356         * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m.
2357
2358         * css/CSSStyleSelector.cpp: Updated includes.
2359         (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
2360         currentEncodedURL.
2361         (WebCore::checkPseudoState): Moved most of the code inside a new
2362         PageGroup::isLinkVisited function.
2363         (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
2364         references and only getting colors when needed.
2365         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
2366         * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL.
2367
2368         * dom/Document.cpp:
2369         (WebCore::Document::attach): Removed call to setEncodedURL.
2370         (WebCore::Document::setURL): Ditto.
2371         (WebCore::Document::recalcStyleSelector): Ditto.
2372
2373         * loader/FrameLoader.cpp:
2374         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
2375         early exit idiom to be a little more readable.
2376         (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
2377         better efficiency.
2378         (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
2379         readable.
2380         (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
2381         in here and got rid of the helper function updateGlobalHistory, restoring the
2382         logic before r30549. Also added a call to the new addVisitedLink function.
2383         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
2384         addVisitedLink here.
2385         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
2386         (WebCore::FrameLoader::updateHistoryForReload): Removed call to
2387         updateGlobalHistory; we can just go without updating global history or
2388         visited links here, at least for now, since it's not clear that a reload
2389         is a "history event".
2390         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
2391         history code back where it was, and added the call to addVisitedLink, just
2392         as in updateHistoryForStandardLoad above.
2393         * loader/FrameLoader.h: Removed updateGlobalHistory function.
2394
2395         * page/Chrome.cpp:
2396         (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
2397         don't have to implement this for every port all at once.
2398         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
2399         new PageGroup class.
2400         * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
2401         visited links set from the global history at application startup time.
2402
2403         * page/FrameTree.cpp:
2404         (WebCore::FrameTree::find): Updated to use the new PageGroup class.
2405
2406         * page/GlobalHistory.h: Removed.
2407         * page/win/GlobalHistoryWin.cpp: Removed.
2408         * page/mac/GlobalHistoryMac.mm: Removed.
2409         * platform/mac/WebCoreHistory.h: Removed.
2410         * platform/mac/WebCoreHistory.m: Removed.
2411         * platform/win/WebCoreHistory.cpp: Removed.
2412         * platform/win/WebCoreHistory.h: Removed.
2413
2414         * page/Page.cpp:
2415         (WebCore::Page::Page): Set m_group to 0.
2416         (WebCore::Page::setGroupName): Set up m_group. If the page is not in any
2417         group, set it to 0 for now to postpone the cost of creating a group.
2418         (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
2419         group; used when getting a group.
2420         (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
2421         on all page groups.
2422         * page/Page.h: Moved enums inside the WebCore namespace. Removed the
2423         frameNamespace function and instead added the group and groupPtr functions.
2424
2425         * page/PageGroup.cpp: Added. Contains all the visited code from the
2426         CSSStyleSelector in the isVisitedLink function, but more efficient because
2427         we don't allocate memory for the buffer.
2428         * page/PageGroup.h: Added.
2429
2430         * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains.
2431         * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include.
2432         * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains.
2433
2434 2008-03-06  Mark Rowe  <mrowe@apple.com>
2435
2436         Fix 64-bit Mac build.
2437
2438         * WebCore.xcodeproj/project.pbxproj:  Exclude _NPN symbols from the exports list as they
2439         are compiled out of 64-bit builds.
2440
2441 2008-03-06  Mark Rowe  <mrowe@apple.com>
2442
2443         Leopard build fix.
2444
2445         * WebCore.base.exp:
2446
2447 2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>
2448
2449         Fix the wx build after the bindings move.
2450
2451         * WebCoreSources.bkl:
2452         * webcore-base.bkl:
2453         * webcore-wx.bkl:
2454
2455 2008-03-05  Dan Bernstein  <mitz@apple.com>
2456
2457         Reviewed by Adele Peterson.
2458
2459         - fix "background-position: inherit"
2460
2461         * css/CSSStyleSelector.cpp:
2462         Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
2463         a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
2464         macro.
2465
2466 2008-03-05  Alp Toker  <alp@atoker.com>
2467
2468         Add a missing make dependency for derived sources to improve
2469         autotools build dependency tracking.
2470
2471         Issue spotted by Ori Bernstein.
2472
2473         * GNUmakefile.am:
2474
2475 2008-03-05  Alp Toker  <alp@atoker.com>
2476
2477         GTK+ build fix for breakage introduced in r30800.
2478
2479         Track moved bridge sources from JavaScriptCore to WebCore.
2480
2481         * GNUmakefile.am:
2482
2483 2008-03-05  Justin Garcia  <justin.garcia@apple.com>
2484
2485         Reviewed by Darin.
2486
2487         One part of fix for:
2488         <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
2489
2490         * editing/markup.cpp:
2491         (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
2492         inline style declarations, not the other way around. 
2493
2494 2008-03-05  Anders Carlsson  <andersca@apple.com>
2495
2496         Reviewed by Darin.
2497
2498         Move JNI specific code from runtime_root over to jni_jsobject, where it is used.
2499
2500         * bridge/jni/jni_jsobject.cpp:
2501         (completedJavaScriptAccess):
2502         (initializeJavaScriptAccessLock):
2503         (lockJavaScriptAccess):
2504         (unlockJavaScriptAccess):
2505         (dispatchToJavaScriptThread):
2506         (performJavaScriptAccess):
2507         (JavaJSObject::initializeJNIThreading):
2508         (isJavaScriptThread):
2509         (JavaJSObject::invoke):
2510         * bridge/jni/jni_jsobject.h:
2511         * bridge/runtime_root.cpp:
2512         * bridge/runtime_root.h:
2513         * page/mac/WebCoreFrameBridge.mm:
2514         (-[WebCoreFrameBridge init]):
2515
2516 2008-03-05  Darin Adler  <darin@apple.com>
2517
2518         Reviewed by Sam.
2519
2520         - add functions giving offsets within a KURL, slated to replace the
2521           EncodedURL object in CSSStyleSelector (in a future "visited link" change)
2522         - changed all KURL data members names to use the traditional m_ prefix
2523         - initialize all members to 0 in invalid KURLs rather than having all
2524           functions check m_isValid
2525
2526         * platform/KURL.cpp:
2527         (WebCore::KURL::invalidate): Added. Initializes all the fields except for
2528         m_string to the "invalid" values. For use in the empty constructor and
2529         in the init and parse functions.
2530         (WebCore::KURL::init): Tweaked comments. Changed all code paths that return
2531         early to use the invalidate() function. Updated for member variable name
2532         changes.
2533         (WebCore::KURL::hasPath): Updated for member variable name changes.
2534         Remove now-unneeded check of m_isValid.
2535         (WebCore::KURL::lastPathComponent): Ditto.
2536         (WebCore::KURL::protocol): Ditto.
2537         (WebCore::KURL::host): Ditto.
2538         (WebCore::KURL::port): Ditto.
2539         (WebCore::KURL::pass): Ditto.
2540         (WebCore::KURL::user): Ditto.
2541         (WebCore::KURL::ref): Ditto.
2542         (WebCore::KURL::hasRef): Ditto.
2543         (WebCore::KURL::protocolIs): Ditto.
2544         (WebCore::KURL::query): Ditto.
2545         (WebCore::KURL::path): Ditto.
2546         (WebCore::KURL::setProtocol): Ditto.
2547         (WebCore::KURL::setHost): Ditto.
2548         (WebCore::KURL::setPort): Ditto.
2549         (WebCore::KURL::setHostAndPort): Ditto.
2550         (WebCore::KURL::setUser): Ditto.
2551         (WebCore::KURL::setPass): Ditto.
2552         (WebCore::KURL::setRef): Ditto.
2553         (WebCore::KURL::setQuery): Ditto.
2554         (WebCore::KURL::setPath): Ditto.
2555         (WebCore::KURL::prettyURL): Ditto.
2556         (WebCore::copyPathRemovingDots): Removed braces to match our code style.
2557         (WebCore::KURL::parse): Changed all code paths that return early to use
2558         the invalidate function. Moved code to set m_isValid to true to the very
2559         end of the function. Removed braces to match our code style. Removed an
2560         extra copy of the path/query/fragment code (there were two identical copies
2561         in the two sides of an if statement). Removed some commented-out code.
2562         Reversed an if statment. Added code to set the new m_pathAfterLastSlash
2563         field. Updated for member variable name changes.
2564         (WebCore::equalIgnoringRef): Updated for member variable name changes.
2565         (WebCore::KURL::isHierarchical): Ditto.
2566
2567         * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty
2568         constructor inline and called the new invalidate function. Added new
2569         pathStart, pathEnd, and pathAfterLastSlash functions, for use in the
2570         new visited link code. Added an invalidate function. Renamed all the
2571         data members to use the m_ prefix.
2572
2573         * WebCore.base.exp: Updated.
2574
2575 2008-03-05  Anders Carlsson  <andersca@apple.com>
2576
2577         Reviewed by Sam.
2578
2579         * WebCore.xcodeproj/project.pbxproj:
2580         Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge 
2581         this with jni_objc.mm and create jni_jsobject.mm.
2582         
2583         * bridge/jni/jni_jsobject.cpp:
2584         (createRootObject):
2585         Move createRootObject here from WebCoreFrameBridge.
2586         
2587         (JavaJSObject::createNative):
2588         Call the newly added createRootObject function.
2589         
2590         * bridge/runtime_root.cpp:
2591         (KJS::Bindings::RootObject::initializeJNIThreading):
2592         * bridge/runtime_root.h:
2593         setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading.
2594
2595         * page/mac/FrameMac.mm:
2596         (WebCore::Frame::createScriptInstanceForWidget):
2597         Just call Frame::createRootObject here.
2598         
2599         * page/mac/WebCoreFrameBridge.mm:
2600         (-[WebCoreFrameBridge init]):
2601         Call initializeJNIThreading.
2602
2603 2008-03-05  Anders Carlsson  <andersca@apple.com>
2604
2605         Reviewed by Sam.
2606
2607         Change some static class variables to be regular static variables,
2608         making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h]
2609
2610         * bridge/runtime_root.cpp:
2611         (KJS::Bindings::completedJavaScriptAccess):
2612         (KJS::Bindings::RootObject::dispatchToJavaScriptThread):
2613         (KJS::Bindings::performJavaScriptAccess):
2614         (KJS::Bindings::RootObject::createRootObject):
2615         (KJS::Bindings::RootObject::runLoop):
2616         (KJS::Bindings::RootObject::setCreateRootObject):
2617         * bridge/runtime_root.h:
2618
2619 2008-03-05  Brent Fulgham <bfulgham@gmail.com>
2620
2621         Reviewed by Adam Roben.
2622
2623         Modify source files to use the USE(SAFARI_THEME) macro, rather than
2624         USE_SAFARI_THEME.  (http://bugs.webkit.org/show_bug.cgi?id=17683)
2625
2626         * WebCore/platform/win/PlatformScrollBarSafari.cpp
2627         * WebCore/rendering/RenderThemeSafari.cpp
2628         * WebCore/rendering/RenderThemeSafari.h
2629         * config.h: Move definition of WTF_USE_SAFARI_THEME here 
2630
2631 2008-03-05  Brady Eidson  <beidson@apple.com>
2632
2633         Reviewed by Alexey and Mark Rowe
2634
2635         Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
2636
2637         DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
2638         removing particular items for Databases that were shutting down.
2639
2640         This filtering operation is not atomic, and therefore causes a race condition with the
2641         database thread waking up and reading from the message queue.  
2642
2643         The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
2644         seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
2645         assertion with a crash in a release build is what revealed this bug.
2646
2647         The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
2648         place, another crash popped up in the layout tests that was related to dereferencing a 
2649         deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
2650         when it needed to be a ref pointer.
2651
2652         * storage/SQLTransaction.cpp:
2653         (WebCore::SQLTransaction::runCurrentStatement):
2654         * storage/SQLTransaction.h: Change m_database to be a RefPtr
2655         (WebCore::SQLTransaction::database):
2656
2657 2008-03-05  Mark Rowe  <mrowe@apple.com>
2658
2659         Build fix.
2660
2661         * WebCore.base.exp:  Remove symbol that no longer exists from the exports file.
2662
2663 2008-03-05  Adam Roben  <aroben@apple.com>
2664
2665         Export a header/symbol for WebKit
2666
2667         Reviewed by Kevin M.
2668
2669         * WebCore.base.exp:
2670         * WebCore.xcodeproj/project.pbxproj:
2671
2672 2008-03-05  Adam Roben  <aroben@apple.com>
2673
2674         Move WebCoreScriptDebugger up to WebKit
2675
2676         Reviewed by Darin.
2677
2678         * WebCore.base.exp: Exported some functions used by
2679         WebCoreScriptDebugger, and sorted the list.
2680         * WebCore.xcodeproj/project.pbxproj: Removed
2681         WebCoreScriptDebugger.{h,mm} from the project and marked
2682         a few headers private so that WebKit can use them.
2683         * page/mac/WebCoreScriptDebugger.h: Removed.
2684         * page/mac/WebCoreScriptDebugger.mm: Removed.
2685
2686 2008-03-05  Anders Carlsson  <andersca@apple.com>
2687
2688         Build bridge/. Copy some headers over to WebKit as part of the post-build step.
2689         
2690         * WebCore.vcproj/WebCore.vcproj:
2691
2692 2008-03-05  Anders Carlsson  <andersca@apple.com>
2693
2694         Reviewed by Geoff.
2695
2696         * WebCore.base.exp:
2697         Add the NPN and KJS methods.
2698         
2699         * WebCore.xcodeproj/project.pbxproj:
2700         Bring in bridge/
2701
2702         * config.h:
2703         Add HAVE_JNI define.
2704         
2705         * bindings/js/kjs_html.cpp:
2706         * bindings/objc/DOMInternal.mm:
2707         * bindings/objc/DOMUtility.mm:
2708         * bindings/objc/WebScriptObject.mm:
2709         * html/HTMLAppletElement.cpp:
2710         * html/HTMLEmbedElement.cpp:
2711         * html/HTMLObjectElement.cpp:
2712         * html/HTMLPlugInElement.cpp:
2713         * page/Frame.cpp:
2714         * page/mac/FrameMac.mm:
2715         * page/mac/WebCoreFrameBridge.mm:
2716         * page/mac/WebCoreScriptDebugger.mm:
2717         * plugins/win/PluginViewWin.cpp:
2718         Include file changes.
2719
2720 2008-03-04  Anders Carlsson  <andersca@apple.com>
2721
2722         Reviewed by Sam.
2723
2724         Rewrite NPRuntime string conversion routines to use WebCore::String
2725         
2726         * bridge/NP_jsobject.cpp:
2727         (_NPN_Evaluate):
2728         * bridge/c/c_utility.cpp:
2729         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
2730         (KJS::Bindings::convertNPVariantToValue):
2731         (KJS::Bindings::convertNPStringToUTF16):
2732         (KJS::Bindings::identifierFromNPIdentifier):
2733         * bridge/c/c_utility.h:
2734
2735 2008-03-05  Oliver Hunt  <oliver@apple.com>
2736
2737         Reviewed by Alexey P.
2738
2739         Small performance improvement to putImageData (3-5% on assignment in my tests)
2740
2741         * html/CanvasPixelArray.h:
2742         (WebCore::CanvasPixelArray::set):
2743
2744 2008-03-04  Sam Weinig  <sam@webkit.org>
2745
2746         Reviewed by Adele.
2747
2748         * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
2749
2750 2008-03-04  Maciej Stachowiak  <mjs@apple.com>
2751
2752         Reviewed by Sam and Oliver.
2753
2754         - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
2755         - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
2756
2757         * bindings/js/JSNodeCustom.cpp:
2758         (WebCore::JSNode::mark): When marking a node that's in-document,
2759         mark the owner document if it hasn't been already. This means holding on
2760         to a single node from an unreferenced document now keeps the whole document alive.
2761         
2762         We are now at 90/100 on Acid3.
2763
2764 2008-03-04  Sam Weinig  <sam@webkit.org>
2765
2766         Qt build fix.
2767
2768         * page/qt/FrameQt.cpp:
2769
2770 2008-03-04  Sam Weinig  <sam@webkit.org>
2771
2772         Reviewed by Mark Rowe.
2773
2774         Rename kjs_window to JSDOMWindowBase.
2775
2776         - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
2777           JSDOMWindow.h
2778
2779         * ChangeLog:
2780         * DerivedSources.make:
2781         * GNUmakefile.am:
2782         * WebCore.pro:
2783         * WebCore.vcproj/WebCore.vcproj:
2784         * WebCore.xcodeproj/project.pbxproj:
2785         * WebCoreSources.bkl:
2786         * bindings/js/JSCustomVoidCallback.cpp:
2787         * bindings/js/JSCustomXPathNSResolver.cpp:
2788         * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
2789         * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
2790         * bindings/js/JSDOMWindowCustom.cpp:
2791         * bindings/js/JSDatabaseCustom.cpp:
2792         * bindings/js/JSEventTargetBase.cpp:
2793         * bindings/js/JSEventTargetBase.h:
2794         * bindings/js/JSEventTargetNode.cpp:
2795         * bindings/js/JSHTMLDocumentCustom.cpp:
2796         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2797         * bindings/js/JSHistoryCustom.cpp:
2798         * bindings/js/JSLocation.cpp:
2799         * bindings/js/JSSQLTransactionCustom.cpp:
2800         * bindings/js/JSXMLHttpRequest.cpp:
2801         * bindings/js/ScheduledAction.cpp:
2802         * bindings/js/kjs_binding.cpp:
2803         * bindings/js/kjs_events.cpp:
2804         * bindings/js/kjs_navigator.cpp:
2805         * bindings/js/kjs_proxy.cpp:
2806         * bindings/js/kjs_window.cpp: Removed.
2807         * bindings/js/kjs_window.h: Removed.
2808         * bindings/scripts/CodeGeneratorJS.pm:
2809         * history/CachedPage.cpp:
2810         * loader/FrameLoader.cpp:
2811         * page/Chrome.cpp:
2812         * page/InspectorController.cpp:
2813         * page/mac/FrameMac.mm:
2814         * page/mac/WebCoreFrameBridge.mm:
2815         * page/qt/FrameQt.cpp:
2816         * page/win/FrameWin.cpp:
2817         * plugins/win/PluginViewWin.cpp:
2818
2819 2008-03-04  Mark Rowe  <mrowe@apple.com>
2820
2821         Speculative Qt build fix.
2822
2823         * platform/qt/PasteboardQt.cpp:
2824
2825 2008-03-04  Anders Carlsson  <andersca@apple.com>
2826
2827         Reviewed by Sam.
2828
2829         Update include paths. This code is not used yet.
2830
2831         * bridge/NP_jsobject.cpp:
2832         * bridge/c/c_class.cpp:
2833         * bridge/c/c_instance.cpp:
2834         * bridge/c/c_utility.cpp:
2835         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
2836         #if 0 this out for now. 
2837         
2838         * bridge/jni/jni_class.cpp:
2839         * bridge/jni/jni_jsobject.cpp:
2840         * bridge/jni/jni_objc.mm:
2841         * bridge/jni/jni_runtime.cpp:
2842         * bridge/jni/jni_utility.cpp:
2843         * bridge/jni/jni_utility.h:
2844         * bridge/npruntime.cpp:
2845         * bridge/objc/WebScriptObject.h:
2846         * bridge/objc/objc_class.h:
2847         * bridge/objc/objc_instance.h:
2848         * bridge/objc/objc_runtime.h:
2849         * bridge/objc/objc_utility.h:
2850         * bridge/objc/objc_utility.mm:
2851         * bridge/runtime.cpp:
2852         * bridge/runtime.h:
2853         * bridge/runtime_array.cpp:
2854         * bridge/runtime_array.h:
2855         * bridge/runtime_method.cpp:
2856         * bridge/runtime_method.h:
2857         * bridge/runtime_object.cpp:
2858         * bridge/runtime_object.h:
2859         * bridge/runtime_root.cpp:
2860         * bridge/runtime_root.h:
2861
2862 2008-03-04  Dan Bernstein  <mitz@apple.com>
2863
2864         Reviewed by Darin Adler.
2865
2866         - fix http://bugs.webkit.org/show_bug.cgi?id=17676
2867           <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
2868
2869         Test: fast/encoding/url-host-name-non-ascii.html
2870
2871         * platform/KURL.cpp:
2872         (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
2873         case to avoid copying the host name twice and corrected the error
2874         checking after calling uidna_IDNToASCII().
2875
2876 2008-03-04  Sam Weinig  <sam@webkit.org>
2877
2878         Reviewed by Dan Bernstein.
2879
2880         Use JSDOMWindow exclusively instead of JSDOMWindowBase.
2881
2882         * bindings/js/ScheduledAction.cpp:
2883         (WebCore::ScheduledAction::execute):
2884         * bindings/js/ScheduledAction.h:
2885         * bindings/js/kjs_window.cpp:
2886         (WebCore::JSDOMWindowBase::timerFired):
2887
2888 2008-03-04  Timothy Hatcher  <timothy@apple.com>
2889
2890         Reviewed by Darin Adler.
2891
2892         <rdar://problem/5720160> Browser windows "do nothing" while modal
2893         dialog or menu is up due to run loop modes (or while scrolling)
2894
2895         Adds a new SchedulePair object that holds a runloop and the mode to use.
2896         A HashSet of SchedulePairs is tracked by Page so it can be used for resource
2897         loading and, in the future, maybe SharedTimerMac.
2898
2899         * WebCore.base.exp: Add new exports for WebKit.
2900         * WebCore.xcodeproj/project.pbxproj: Add new files.
2901         * loader/mac/DocumentLoaderMac.cpp: Added.
2902         (WebCore::scheduleAll): Call schedule all the ResourceLoader handles.
2903         (WebCore::unscheduleAll): Call unschedule all the ResourceLoader handles.
2904         (WebCore::DocumentLoader::schedule): Schedule all the ResourceLoaders owned by the DocumentLoader.
2905         (WebCore::DocumentLoader::unschedule): Unschedule all the ResourceLoaders owned by the DocumentLoader.
2906         * loader/DocumentLoader.h:
2907         * page/Page.h:
2908         (WebCore::Page::scheduledRunLoopPairs): Return m_scheduledRunLoopPairs.
2909         * page/mac/PageMac.cpp:
2910         (WebCore::Page::addSchedulePair): Add a SchedulePair to m_scheduledRunLoopPairs.
2911         (WebCore::Page::removeSchedulePair): Removes a SchedulePair from m_scheduledRunLoopPairs.
2912         * platform/cf/SchedulePair.cpp: Added.
2913         * platform/cf/SchedulePair.h: Added.
2914         * platform/mac/SchedulePairMac.mm: Added.
2915         * platform/network/ResourceHandle.h:
2916         * platform/network/mac/FormDataStreamMac.mm:
2917         (WebCore::advanceCurrentStream): Use the new SchedulePair.
2918         (WebCore::formCreate): Ditto.
2919         (WebCore::formFinalize): Ditto.
2920         (WebCore::formSchedule): Ditto.
2921         (WebCore::formUnschedule): Ditto.
2922         * platform/network/mac/ResourceHandleMac.mm:
2923         (WebCore::ResourceHandle::start): Schedule the connection with all the SchedulePairs
2924         that Page holds. If Page has no SchedulePairs, schedule with the current runloop, and
2925         pick the mode based on ResourceHandle::loadsDuringCommonRunLoopModes.
2926         (WebCore::ResourceHandle::schedule):
2927         (WebCore::ResourceHandle::unschedule):
2928
2929 2008-03-04  Sam Weinig  <sam@webkit.org>
2930
2931         Reviewed by Darin Adler.
2932
2933         Rename kjs_css to JSRGBColor.
2934
2935         * DerivedSources.make:
2936         * GNUmakefile.am:
2937         * WebCore.pro:
2938         * WebCore.vcproj/WebCore.vcproj:
2939         * WebCore.xcodeproj/project.pbxproj:
2940         * WebCoreSources.bkl:
2941         * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp.
2942         * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h.
2943         * bindings/js/kjs_css.cpp: Removed.
2944         * bindings/js/kjs_css.h: Removed.
2945         * bindings/js/kjs_window.cpp:
2946         * bindings/objc/DOMUtility.mm:
2947         * bindings/scripts/CodeGeneratorJS.pm:
2948
2949 2008-03-04  Anders Carlsson  <andersca@apple.com>
2950
2951         Fix 64-bit build.
2952         
2953         * html/HTMLPlugInElement.cpp:
2954
2955 2008-03-04  Nikolas Zimmermann  <zimmermann@kde.org>
2956
2957         Reviewed by Eric & David.
2958
2959         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078
2960
2961         Fix getSubStringLength() handling, verified by Acid3 test 77.
2962         Brings up Acid3 score to 88/100.
2963
2964         Added test: svg/custom/acid3-test-77.html
2965                     svg/custom/getSubStringLength.html
2966
2967         * svg/SVGTextContentElement.cpp:
2968         (WebCore::cummulatedCharacterRangeLength): Simplify some code.
2969         (WebCore::SVGTextContentElement::getSubStringLength):
2970
2971 2008-03-04  Anders Carlsson  <andersca@apple.com>
2972
2973         Mac build fix. Neither me, Sam nor Adam know why we need to do this though :(
2974
2975         * bindings/js/kjs_proxy.cpp:
2976         (WebCore::KJSProxy::attachDebugger):
2977         * page/Page.cpp:
2978         (WebCore::Page::setDebuggerForAllPages):
2979         (WebCore::Page::setDebugger):
2980
2981 2008-03-04  Adam Roben  <aroben@apple.com>
2982
2983         Add ExecState.h to ForwardingHeaders
2984
2985         Reviewed by Anders.
2986
2987         * ForwardingHeaders/kjs/ExecState.h: Added.
2988         * page/Page.cpp: Touch this to force WebCore to build and the headers
2989         to be copied.
2990
2991 2008-03-04  Adam Roben  <aroben@apple.com>
2992
2993         Make it possible to set a KJS::Debugger on all Frames in a Page and
2994         all Pages in the process
2995
2996         Reviewed by Kevin M.
2997
2998         * ForwardingHeaders/kjs/debugger.h: Added.
2999         * bindings/js/kjs_proxy.cpp:
3000         (WebCore::KJSProxy::initScript): Attach the Page's debugger if there
3001         is one.
3002         (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or
3003         detach any existing debugger if none was passed in.
3004         * bindings/js/kjs_proxy.h:
3005         * page/Page.cpp:
3006         (WebCore::Page::Page): Initialize new member.
3007         (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page
3008         in the process.
3009         (WebCore::Page::setDebugger): Store the debugger and pass it off to
3010         all our Frames.
3011         * page/Page.h:
3012
3013 2008-03-04  Sam Weinig  <sam@webkit.org>
3014
3015         Reviewed by Darin Adler.
3016
3017         Add ClassInfo to custom constructors so that they toString properly
3018
3019         - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
3020           and XSLTProcessorConstructorImp and prefix all the classes with JS. 
3021
3022         * bindings/js/JSAudioConstructor.cpp:
3023         (WebCore::): Added ClassInfo definition.
3024         (WebCore::JSAudioConstructor::JSAudioConstructor):
3025         (WebCore::JSAudioConstructor::construct): Cleanup.
3026         * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
3027         (WebCore::JSAudioConstructor::classInfo): Added.
3028
3029         * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
3030         to JSHTMLInputElementBasePrototype as seen if toString'ed.
3031         (WebCore::):
3032
3033         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3034         (WebCore::): Added ClassInfo definition.
3035         * bindings/js/JSHTMLOptionElementConstructor.h:
3036         (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
3037
3038         * bindings/js/JSImageConstructor.cpp:
3039         (WebCore::): Added ClassInfo definition.
3040         (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
3041         * bindings/js/JSImageConstructor.h:
3042         (WebCore::JSImageConstructor::classInfo): Added.
3043
3044         * bindings/js/JSXMLHttpRequest.cpp:
3045         (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
3046         as seen if toString'ed.
3047         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3048         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
3049         (WebCore::JSXMLHttpRequestConstructor::construct):
3050         * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
3051         JSXMLHttpRequestConstructor and doc to m_document and 
3052         (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
3053
3054         * bindings/js/JSXSLTProcessor.cpp:
3055         (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
3056         XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
3057         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
3058         (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
3059         (WebCore::JSXSLTProcessorConstructor::construct):
3060         * bindings/js/JSXSLTProcessor.h:
3061         (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
3062
3063         * bindings/js/kjs_window.cpp:
3064         (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
3065
3066 2008-03-04  Dan Bernstein  <mitz@apple.com>
3067
3068         Reviewed by Oliver Hunt and Geoffrey Garen.
3069
3070         - fix http://bugs.webkit.org/show_bug.cgi?id=17667
3071           <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
3072
3073         * loader/loader.cpp:
3074         (WebCore::Loader::didFinishLoading): Changed to call
3075         setLoadInProgress(false) even for 4xx errors, because that triggers
3076         load completion check.
3077
3078 2008-03-04  Adele Peterson  <adele@apple.com>
3079
3080         Reviewed by Beth.
3081
3082         Fix for <rdar://problem/5779718> focus() does not work for anchor elements with no content
3083
3084         If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it
3085         from being keyboard focusable (using the tab key).
3086
3087         * html/HTMLAnchorElement.cpp:
3088         (WebCore::HTMLAnchorElement::isFocusable):
3089         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
3090
3091 2008-03-04  Chris Fleizach  <cfleizach@apple.com>
3092
3093         Reviewed by Darin Adler.
3094
3095         - fix <rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
3096
3097         * page/mac/WebCoreAXObject.mm:
3098         (headingLevel):
3099         (-[WebCoreAXObject accessibilityIsIgnored]):
3100
3101 2008-03-04  Sam Weinig  <sam@webkit.org>
3102
3103         GTK+ build fix.
3104
3105         * GNUmakefile.am:
3106
3107 2008-03-04  Sam Weinig  <sam@webkit.org>
3108
3109         Reviewed by Darin Adler.
3110
3111         Remame ImageConstructorImp to JSImageConstructor and move it into its
3112         own file.
3113
3114         * GNUmakefile.am:
3115         * WebCore.pro:
3116         * WebCore.vcproj/WebCore.vcproj:
3117         * WebCore.xcodeproj/project.pbxproj:
3118         * WebCoreSources.bkl:
3119         * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp.
3120         (WebCore::JSImageConstructor::JSImageConstructor):
3121         (WebCore::JSImageConstructor::construct):
3122         * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h.
3123         * bindings/js/kjs_html.cpp:
3124         (WebCore::getRuntimeObject): Make this function static since it is only used
3125         in this file.
3126         * bindings/js/kjs_html.h:
3127         * bindings/js/kjs_window.cpp:
3128         (WebCore::JSDOMWindowBase::getValueProperty):
3129
3130 2008-03-04  Adam Roben  <aroben@apple.com>
3131
3132         Fix an uninitialized value warning in CodeGeneratorJS.pm
3133
3134         * bindings/scripts/CodeGeneratorJS.pm: Remove reference to
3135         non-existent $maybeOkParam (this was removed in r30753).
3136
3137 2008-03-04  Sam Weinig  <sam@webkit.org>
3138
3139         Reviewed by Darin Adler.
3140
3141         Remove kjs_dom.{h,cpp}.
3142
3143         - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
3144           to us a null return value as an indication of failure. (This new logic is used
3145           for toVoidCallback as well.)
3146         - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
3147           functions currently live.
3148         - Move checkNodeSecurity to kjs_binding, where other frame security functions 
3149           currently live.
3150         - Remove getNodeConstructor.  It had no implementation.
3151
3152         * GNUmakefile.am:
3153         * WebCore.pro:
3154         * WebCore.vcproj/WebCore.vcproj:
3155         * WebCore.xcodeproj/project.pbxproj:
3156         * WebCoreSources.bkl:
3157         * bindings/js/JSAttrCustom.cpp:
3158         * bindings/js/JSCustomVoidCallback.cpp:
3159         (WebCore::toVoidCallback):
3160         * bindings/js/JSCustomVoidCallback.h:
3161         * bindings/js/JSDatabaseCustom.cpp:
3162         (WebCore::JSDatabase::changeVersion):
3163         (WebCore::JSDatabase::transaction):
3164         * bindings/js/JSElementCustom.cpp:
3165         (WebCore::JSElement::setAttributeNode):
3166         (WebCore::JSElement::setAttributeNodeNS):
3167         * bindings/js/JSEventTargetBase.cpp:
3168         (WebCore::toJS):
3169         * bindings/js/JSEventTargetBase.h:
3170         * bindings/js/JSHTMLAppletElementCustom.cpp:
3171         * bindings/js/JSHTMLElementCustom.cpp:
3172         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3173         * bindings/js/JSHTMLFormElementCustom.cpp:
3174         * bindings/js/JSHTMLFrameElementCustom.cpp:
3175         * bindings/js/JSHTMLIFrameElementCustom.cpp:
3176         * bindings/js/JSHTMLObjectElementCustom.cpp:
3177         * bindings/js/JSNamedNodeMapCustom.cpp:
3178         * bindings/js/JSNamedNodesCollection.cpp:
3179         * bindings/js/JSNodeFilterCustom.cpp:
3180         * bindings/js/JSXSLTProcessor.cpp:
3181         * bindings/js/kjs_binding.cpp:
3182         (WebCore::checkNodeSecurity):
3183         * bindings/js/kjs_binding.h:
3184         * bindings/js/kjs_css.cpp:
3185         * bindings/js/kjs_dom.cpp: Removed.
3186         * bindings/js/kjs_dom.h: Removed.
3187         * bindings/js/kjs_events.cpp:
3188         * bindings/js/kjs_html.cpp:
3189         (WebCore::getRuntimeObject):
3190         * bindings/js/kjs_html.h:
3191         * bindings/js/kjs_window.cpp:
3192         * bindings/scripts/CodeGeneratorJS.pm:
3193         * dom/Attr.idl:
3194         * html/HTMLPlugInElement.cpp:
3195         * page/InspectorController.cpp:
3196
3197 2008-03-04  Adam Roben  <aroben@apple.com>
3198
3199         Win/Qt/GTK+/wx build fix after r30740
3200
3201         * editing/Editor.cpp: Added missing #include.
3202         * page/qt/FrameQt.cpp: Removed Frame::dashboardRegionsChanged.
3203         * page/win/FrameWin.cpp: Ditto.
3204         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3205
3206 2008-03-04  Alp Toker  <alp@atoker.com>
3207
3208         GTK+ build fix for breakage introduced in r30740.
3209
3210         Remove Frame::dashboardRegionsChanged(). There's now a default
3211         implementation at ChromeClient::dashboardRegionsChanged().
3212
3213         * page/gtk/FrameGtk.cpp:
3214
3215 2008-03-04  Alp Toker  <alp@atoker.com>
3216
3217         GTK+ build fix suggested by aroben. Remove an unused Mac-specific
3218         included introduced in r30740.
3219
3220         * page/ChromeClient.h:
3221
3222 2008-03-04  Dan Bernstein  <mitz@apple.com>
3223
3224         Reviewed by Sam Weinig.
3225
3226         - fix <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
3227
3228         Test: platform/win/fast/text/uniscribe-missing-glyph.html
3229
3230         Note that default installations of Windows do not have Myanmar fonts.
3231         What this patch does is ensure that the Myanmar and other complex
3232         scripts are rendered as missing glyphs rather than not rendered at all.
3233         The particular page in the bug measures the relative widths of two
3234         rendered strings and, if they are rendered as missing glyphs, detects
3235         that a Myanmar fonts is not available and substitutes the text with
3236         images. By not rendering (and measuring) missing glyphs, WebKit was
3237         throwing the page's detection code off.
3238
3239         * platform/graphics/win/UniscribeController.cpp:
3240         (WebCore::UniscribeController::shape): Removed an early return in case
3241         shaping resulted in missing glyphs. This is now expected if font
3242         fallback failed to produce a font containing glyphs for the character.
3243         Also changed two resize()s to shrink()s.
3244
3245 2008-03-04  Darin Adler  <darin@apple.com>
3246
3247         Reviewed by Adam.
3248
3249         - remove WebCoreFrameBridge reapplyStyles method
3250
3251         * WebCore.base.exp: Added exports.
3252         * page/mac/WebCoreFrameBridge.h: Removed WebCoreDeviceType and
3253         reapplyStylesForDeviceType: method.
3254         * page/mac/WebCoreFrameBridge.mm: Ditto.
3255
3256 2008-03-04  Darin Adler  <darin@apple.com>
3257
3258         Reviewed by Adam.
3259
3260         - eliminate WebCoreFrameBridge createFrameViewWithNSView
3261
3262         * WebCore.base.exp: Added some more exports.
3263         * page/mac/WebCoreFrameBridge.h: Deleted createFrameViewWithNSView.
3264         * page/mac/WebCoreFrameBridge.mm: Ditto.
3265
3266 2008-03-04  Darin Adler  <darin@apple.com>
3267
3268         Reviewed by Adam.
3269
3270         - removed WebCoreFrameBridge scrollOverflowInDirection
3271
3272         * WebCore.base.exp: Export function needed by WebKit.
3273         * page/mac/WebCoreFrameBridge.h: Removed WebScrollDirection, WebScrollGranularity,
3274         and scrollOverflowInDirection.
3275         * page/mac/WebCoreFrameBridge.mm: Removed method.
3276
3277 2008-03-04  Darin Adler  <darin@apple.com>
3278
3279         Reviewed by Adam.
3280
3281         - remove WebCoreFrameBridge installInFrame: method
3282
3283         * WebCore.base.exp: Export a few symbols.
3284         * WebCore.xcodeproj/project.pbxproj: Export a few files.
3285         * page/mac/WebCoreFrameBridge.h: Remove installInFrame:.
3286         * page/mac/WebCoreFrameBridge.mm: Ditto.
3287
3288 2008-03-04  Darin Adler  <darin@apple.com>
3289
3290         Reviewed by Adam.
3291
3292         - remove WebCoreFrameBridge window method
3293
3294         * page/mac/EventHandlerMac.mm:
3295         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Get the window by calling
3296         window on the NSView instead of using the bridge. The WebKit side wasn't doing anything
3297         special, so a call to -[NSView window] is fine.
3298
3299         * page/mac/WebCoreFrameBridge.h: Removed the window method.
3300
3301 2008-03-04  Darin Adler  <darin@apple.com>
3302
3303         Reviewed by Adam.
3304
3305         - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
3306
3307         * WebCore.base.exp: Updated.
3308         * page/Chrome.cpp:
3309         (WebCore::ChromeClient::dashboardRegionsChanged): Added.
3310         * page/ChromeClient.h: Added virtual function for dashboardRegionsChanged.
3311         * page/Frame.h: Removed dashboardRegionsChanged function.
3312         * page/FrameView.cpp:
3313         (WebCore::FrameView::updateDashboardRegions): Changed to call dashboardRegionsChanged
3314         on ChromeClient and to only call it when the regions actually changed.
3315         * page/mac/FrameMac.mm: Removed dashboardRegionsChanged function.
3316         * page/mac/WebCoreFrameBridge.h: Removed dashboardRegionsChanged: method.
3317
3318 2008-03-04  Darin Adler  <darin@apple.com>
3319
3320         Reviewed by Adam.
3321
3322         - remove WebCoreFrameBridge issuePasteComand method
3323
3324         * editing/Editor.cpp:
3325         (WebCore::Editor::paste): Moved the Mac-specific part of this to EditorMac.
3326         * editing/mac/EditorMac.mm:
3327         (WebCore::Editor::paste): Added. Calls paste: on the document view (normally a
3328         WebHTMLView). We should get rid of this eventually.
3329         * page/Frame.h: Removed issuePasteCommand.
3330         * page/mac/FrameMac.mm: Ditto.
3331         * page/mac/WebCoreFrameBridge.h: Ditto.
3332
3333 2008-03-04  Alexey Proskuryakov  <ap@webkit.org>
3334
3335         Suggested by Darin, rubber-stamped by Mark.
3336
3337         http://bugs.webkit.org/show_bug.cgi?id=17569
3338         REGRESSION (r30571): Buzzword.com doesn't load
3339
3340         Rolling out r30571, as determining what is wrong with it proved tricky.
3341
3342         * loader/FrameLoader.cpp:
3343         (WebCore::FrameLoader::load):
3344         (WebCore::FrameLoader::tokenizerProcessedData):
3345         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
3346
3347 2008-03-04  Sam Weinig  <sam@webkit.org>
3348
3349         Build fix.
3350
3351         * bindings/js/kjs_events.cpp:
3352
3353 2008-03-03  Sam Weinig  <sam@webkit.org>
3354
3355         Reviewed by Mark Rowe.
3356
3357         Move JSClipboard into its own file.
3358
3359         * DerivedSources.make:
3360         * GNUmakefile.am:
3361         * WebCore.pro:
3362         * WebCore.vcproj/WebCore.vcproj:
3363         * WebCore.xcodeproj/project.pbxproj:
3364         * WebCoreSources.bkl:
3365         * bindings/js/JSAttrCustom.cpp:
3366         * bindings/js/JSClipboardCustom.cpp: Added.
3367         (WebCore::JSClipboard::types):
3368         (WebCore::JSClipboard::clearData):
3369         (WebCore::JSClipboard::getData):
3370         (WebCore::JSClipboard::setData):
3371         (WebCore::JSClipboard::setDragImage):
3372         * bindings/js/JSElementCustom.cpp:
3373         * bindings/js/JSEventCustom.cpp:
3374         * bindings/js/JSHTMLFrameElementCustom.cpp:
3375         * bindings/js/JSHTMLIFrameElementCustom.cpp:
3376         * bindings/js/kjs_events.cpp:
3377         * bindings/js/kjs_events.h:
3378         * bindings/js/kjs_window.cpp:
3379         * bindings/scripts/CodeGeneratorJS.pm:
3380         * dom/Clipboard.cpp:
3381         (WebCore::Clipboard::setDropEffect):
3382         (WebCore::Clipboard::setEffectAllowed):
3383         * dom/Clipboard.idl: Added.
3384
3385 2008-03-03  Sam Weinig  <sam@webkit.org>
3386
3387         Windows build-fix.
3388
3389         * page/Chrome.cpp:
3390         * plugins/win/PluginViewWin.cpp:
3391
3392 2008-03-03  Sam Weinig  <sam@webkit.org>
3393
3394         Reviewed by Darin Adler.
3395
3396         Cleanup and plumbing in preparation for the great Window split.
3397
3398         - Rename KJS::Window to WebCore::JSDOMWindowBase.
3399         - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace
3400           with the new toJSDOMWindow().
3401         - Remove KJS::Window::retrieveActive() and replace with explicit call to 
3402           exec->dynamicGlobalObject() and toJSDOMWindow().
3403
3404         * bindings/js/JSCustomVoidCallback.cpp:
3405         (WebCore::toVoidCallback):.
3406         * bindings/js/JSCustomXPathNSResolver.cpp:
3407         (WebCore::JSCustomXPathNSResolver::create):
3408         * bindings/js/JSDatabaseCustom.cpp:
3409         (WebCore::JSDatabase::changeVersion):
3410         (WebCore::JSDatabase::transaction):
3411         * bindings/js/JSDocumentCustom.cpp:
3412         (WebCore::JSDocument::location):
3413         (WebCore::toJS):
3414         * bindings/js/JSEventTargetBase.cpp:
3415         (WebCore::jsEventTargetAddEventListener):
3416         (WebCore::jsEventTargetRemoveEventListener):
3417         * bindings/js/JSEventTargetNode.cpp:
3418         (WebCore::JSEventTargetNode::setListener):
3419         * bindings/js/JSHTMLDocumentCustom.cpp:
3420         (WebCore::JSHTMLDocument::nameGetter):
3421         (WebCore::JSHTMLDocument::open):
3422         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3423         (WebCore::JSHTMLFrameSetElement::nameGetter):
3424         * bindings/js/JSLocation.cpp:
3425         (WebCore::JSLocation::put):
3426         (WebCore::jsLocationProtoFuncReplace):
3427         (WebCore::jsLocationProtoFuncReload):
3428         (WebCore::jsLocationProtoFuncAssign):
3429         * bindings/js/JSLocation.h:
3430         * bindings/js/JSSQLTransactionCustom.cpp:
3431         (WebCore::JSSQLTransaction::executeSql):
3432         * bindings/js/JSSVGLazyEventListener.cpp:
3433         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
3434         (WebCore::JSSVGLazyEventListener::eventParameterName):
3435         * bindings/js/JSSVGLazyEventListener.h:
3436         * bindings/js/JSXMLHttpRequest.cpp:
3437         (WebCore::JSXMLHttpRequest::putValueProperty):
3438         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen):
3439         (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener):
3440         (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
3441         * bindings/js/ScheduledAction.cpp:
3442         (WebCore::ScheduledAction::execute):
3443         * bindings/js/ScheduledAction.h:
3444         * bindings/js/kjs_binding.cpp:
3445         (WebCore::allowsAccessFromFrame):
3446         (WebCore::printErrorMessageForFrame):
3447         * bindings/js/kjs_events.cpp:
3448         (WebCore::JSAbstractEventListener::handleEvent):
3449         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
3450         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
3451         (WebCore::JSUnprotectedEventListener::windowObj):
3452         (WebCore::JSEventListener::JSEventListener):
3453         (WebCore::JSEventListener::~JSEventListener):
3454         (WebCore::JSEventListener::windowObj):
3455         (WebCore::JSLazyEventListener::JSLazyEventListener):
3456         (WebCore::JSLazyEventListener::parseCode):
3457         * bindings/js/kjs_events.h:
3458         * bindings/js/kjs_navigator.cpp:
3459         (WebCore::MimeType::getValueProperty):
3460         * bindings/js/kjs_proxy.cpp:
3461         (WebCore::KJSProxy::evaluate):
3462         (WebCore::KJSProxy::createHTMLEventHandler):
3463         (WebCore::KJSProxy::createSVGEventHandler):
3464         * bindings/js/kjs_window.cpp:
3465         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
3466         (WebCore::DOMWindowTimer::DOMWindowTimer):
3467         (WebCore::DOMWindowTimer::action):
3468         (WebCore::DOMWindowTimer::takeAction):
3469         (WebCore::):
3470         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3471         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
3472         (WebCore::JSDOMWindowBase::location):
3473         (WebCore::JSDOMWindowBase::mark):
3474         (WebCore::allowPopUp):
3475         (WebCore::createWindow):
3476         (WebCore::showModalDialog):
3477         (WebCore::JSDOMWindowBase::getValueProperty):
3478         (WebCore::JSDOMWindowBase::childFrameGetter):
3479         (WebCore::JSDOMWindowBase::indexGetter):
3480         (WebCore::JSDOMWindowBase::namedItemGetter):
3481         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
3482         (WebCore::JSDOMWindowBase::put):
3483         (WebCore::JSDOMWindowBase::allowsAccessFrom):
3484         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
3485         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
3486         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
3487         (WebCore::JSDOMWindowBase::printErrorMessage):
3488         (WebCore::JSDOMWindowBase::globalExec):
3489         (WebCore::JSDOMWindowBase::shouldInterruptScript):
3490         (WebCore::JSDOMWindowBase::setListener):
3491         (WebCore::JSDOMWindowBase::getListener):
3492         (WebCore::JSDOMWindowBase::findJSEventListener):
3493         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
3494         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
3495         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
3496         (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
3497         (WebCore::JSDOMWindowBase::clear):
3498         (WebCore::JSDOMWindowBase::setCurrentEvent):
3499         (WebCore::JSDOMWindowBase::currentEvent):
3500         (WebCore::windowProtoFuncAToB):
3501         (WebCore::windowProtoFuncBToA):
3502         (WebCore::windowProtoFuncOpen):
3503         (WebCore::windowProtoFuncSetTimeout):
3504         (WebCore::windowProtoFuncClearTimeout):
3505         (WebCore::windowProtoFuncSetInterval):
3506         (WebCore::windowProtoFuncAddEventListener):
3507         (WebCore::windowProtoFuncRemoveEventListener):
3508         (WebCore::windowProtoFuncShowModalDialog):
3509         (WebCore::windowProtoFuncNotImplemented):
3510         (WebCore::JSDOMWindowBase::setReturnValueSlot):
3511         (WebCore::JSDOMWindowBase::clearAllTimeouts):
3512         (WebCore::JSDOMWindowBase::installTimeout):
3513         (WebCore::JSDOMWindowBase::pauseTimeouts):
3514         (WebCore::JSDOMWindowBase::resumeTimeouts):
3515         (WebCore::JSDOMWindowBase::clearTimeout):
3516         (WebCore::JSDOMWindowBase::timerFired):
3517         (WebCore::JSDOMWindowBase::disconnectFrame):
3518         (WebCore::JSDOMWindowBase::jsEventListeners):
3519         (WebCore::JSDOMWindowBase::jsHTMLEventListeners):
3520         (WebCore::JSDOMWindowBase::jsUnprotectedEventListeners):
3521         (WebCore::JSDOMWindowBase::jsUnprotectedHTMLEventListeners):
3522         (WebCore::toJS):
3523         (WebCore::toJSDOMWindow):
3524         (WebCore::toJSDOMWindow):
3525         * bindings/js/kjs_window.h:
3526         (WebCore::JSDOMWindowBase::impl):
3527         (WebCore::JSDOMWindowBase::classInfo):
3528         (WebCore::JSDOMWindowBase::):
3529         * bindings/objc/DOMUtility.mm:
3530         (KJS::createDOMWrapper):
3531         * bindings/scripts/CodeGeneratorJS.pm:
3532         * history/CachedPage.cpp:
3533         (WebCore::CachedPage::CachedPage):
3534         (WebCore::CachedPage::restore):
3535         * page/Chrome.cpp:
3536         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
3537         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
3538         * page/DOMWindow.idl:
3539         * page/Frame.cpp:
3540         (WebCore::Frame::~Frame):
3541         (WebCore::Frame::windowScriptNPObject):
3542         (WebCore::Frame::pageDestroyed):
3543         * page/InspectorController.cpp:
3544         (WebCore::inspectedWindow):
3545         * page/mac/FrameMac.mm:
3546         (WebCore::Frame::windowScriptObject):
3547         * page/mac/WebCoreFrameBridge.mm:
3548         (updateRenderingForBindings):