3146197bd7503caa46a26010301b1aa1f88b940a
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-04  Darin Adler  <darin@apple.com>
2
3         Reviewed by Geoff.
4
5         - fix <rdar://problem/5715692> REGRESSION (r28570): JavaScript window.scrollTo()
6           calls no longer accept 'undefined' values
7
8         By default, we should accept non-numeric parameters and non-integral numbers for
9         parameters that expect integers, without throwing exceptions.
10
11         While creating the test for this, I ran into a couple minor bugs with the
12         functions involved, and this patch fixes those too.
13
14         Test: fast/dom/non-numeric-values-numeric-parameters.html
15
16         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
17         (WebCore::JSHTMLOptionsCollection::add): Added. This function has unusual behavior
18         when passed non-integral values for its second parameter, so it needs to be written
19         by hand. I think that [Custom] is better here than inventing a new keyword.
20
21         * bindings/scripts/CodeGeneratorJS.pm: Changed default for "long" and "unsigned long"
22         to ignore errors rather than failing due to type differences. Also changed a couple
23         functions to use hashes.
24
25         * css/CSSStyleSheet.h:
26         (WebCore::CSSStyleSheet::removeRule): Remove overload of removeRule without a second
27         parameters. While we do allow this from JavaScript, it's not a true optional parameter,
28         but rather just a case of "you can omit parameters and they are treated as undefined"
29         combined with "undefined turns into 0 when passed to a function that takes an integer".
30         * css/CSSStyleSheet.idl: Removed [Optional] on the index parameter for removeRule.
31         This is not truly an optional parameter.
32
33         * dom/ProgressEvent.cpp:
34         (WebCore::ProgressEvent::initProgressEvent): Updated this function to match other
35         DOM event init functions -- important to do nothing if this is called on the an
36         already-dispatched event and we need to respect the bubble and cancelable arguments.
37         Also removed initProgressEventNS. We don't support namespaced events, and if we add
38         support, it should be across all event classes, not just ProgressEvent.
39         * dom/ProgressEvent.h: Removed initProgressEventNS.
40         * dom/ProgressEvent.idl: Ditto.
41
42         * dom/Range.cpp:
43         (WebCore::Range::createContextualFragment): Added a check for 0. This can happen
44         if the passed-in start container is a node that's not an HTML element and also
45         does not have a parent.
46
47         * html/HTMLOptionsCollection.idl: Added the [Custom] attribute to add, since the
48         rules for processing its parameters are unusual.
49
50         * page/DOMSelection.cpp: Removed the version of setPosition that has only
51         one parameter. The offset is not really optional.
52         * page/DOMSelection.h: Ditto.
53         * page/DOMSelection.idl: Removed the [Optional] keyword for the second parameter of
54         setPosition. It's not a true optional parameter (see discussion of removeRule above).
55
56         * page/DOMWindow.cpp:
57         (WebCore::DOMWindow::adjustWindowRect): Simplified logic for constraining the X
58         and Y coordinates, in a way that makes them work even when the window coordinates
59         are infinite. Also strengthened the assertion.
60
61 2008-02-04  Alp Toker  <alp@atoker.com>
62
63         Rubber-stamped by Mark Rowe.
64
65         Remove all trailing whitespace in the GTK+ port and related
66         components.
67
68         * GNUmakefile.am:
69         * page/gtk/DragControllerGtk.cpp:
70         (WebCore::DragController::dragOperation):
71         (WebCore::DragController::maxDragImageSize):
72         * page/gtk/EventHandlerGtk.cpp:
73         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
74         (WebCore::EventHandler::createDraggingClipboard):
75         * page/gtk/FrameGtk.cpp:
76         (WebCore::Frame::dragImageForSelection):
77         * platform/graphics/cairo/AffineTransformCairo.cpp:
78         (WebCore::AffineTransform::mapRect):
79         (WebCore::AffineTransform::isIdentity):
80         (WebCore::AffineTransform::operator== ):
81         * platform/graphics/cairo/GraphicsContextCairo.cpp:
82         (WebCore::GraphicsContext::drawLine):
83         * platform/graphics/cairo/ImageBufferCairo.cpp:
84         * platform/graphics/cairo/ImageCairo.cpp:
85         * platform/graphics/cairo/ImageSourceCairo.cpp:
86         (WebCore::createDecoder):
87         * platform/graphics/gtk/FontCacheGtk.cpp:
88         * platform/graphics/gtk/FontGtk.cpp:
89         * platform/graphics/gtk/FontPlatformData.h:
90         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
91         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
92         * platform/graphics/gtk/IconGtk.cpp:
93         * platform/graphics/gtk/ImageGtk.cpp:
94         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
95         * platform/gtk/ClipboardGtk.h:
96         * platform/gtk/ContextMenuItemGtk.cpp:
97         (WebCore::ContextMenuItem::createNativeMenuItem):
98         * platform/gtk/CursorGtk.cpp:
99         * platform/gtk/DragDataGtk.cpp:
100         * platform/gtk/DragImageGtk.cpp:
101         (WebCore::createDragImageIconForCachedImage):
102         * platform/gtk/FileChooserGtk.cpp:
103         (WebCore::stringByAdoptingFileSystemRepresentation):
104         * platform/gtk/FileSystemGtk.cpp:
105         (WebCore::fileExists):
106         (WebCore::deleteFile):
107         (WebCore::deleteEmptyDirectory):
108         * platform/gtk/KeyEventGtk.cpp:
109         * platform/gtk/KeyboardCodes.h:
110         * platform/gtk/LocalizedStringsGtk.cpp:
111         (WebCore::inputElementAltText):
112         (WebCore::resetButtonDefaultLabel):
113         (WebCore::fileButtonChooseFileLabel):
114         (WebCore::fileButtonNoFileSelectedLabel):
115         (WebCore::contextMenuItemTagOpenImageInNewWindow):
116         * platform/gtk/MIMETypeRegistryGtk.cpp:
117         (WebCore::):
118         * platform/gtk/MouseEventGtk.cpp:
119         * platform/gtk/PasteboardGtk.cpp:
120         (WebCore::PasteboardSelectionData::markup):
121         (WebCore::Pasteboard::writeSelection):
122         * platform/gtk/PasteboardHelper.h:
123         * platform/gtk/PlatformScreenGtk.cpp:
124         (WebCore::screenDepth):
125         (WebCore::screenIsMonochrome):
126         (WebCore::screenRect):
127         (WebCore::screenAvailableRect):
128         * platform/gtk/PlatformScrollBar.h:
129         * platform/gtk/PlatformScrollBarGtk.cpp:
130         (PlatformScrollbar::PlatformScrollbar):
131         (PlatformScrollbar::updateThumbPosition):
132         * platform/gtk/PopupMenuGtk.cpp:
133         (WebCore::PopupMenu::updateFromElement):
134         * platform/gtk/RenderThemeGtk.h:
135         * platform/gtk/ScrollViewGtk.cpp:
136         (WebCore::ScrollView::scrollBy):
137         (WebCore::ScrollView::addChild):
138         (WebCore::ScrollView::updateScrollbars):
139         (WebCore::ScrollView::windowToContents):
140         (WebCore::ScrollView::contentsToWindow):
141         (WebCore::ScrollView::scrollbarUnderMouse):
142         * platform/gtk/SearchPopupMenuGtk.cpp:
143         * platform/gtk/SharedTimerGtk.cpp:
144         * platform/gtk/SystemTimeLinux.cpp:
145         (WebCore::currentTime):
146         * platform/gtk/TemporaryLinkStubs.cpp:
147         (PlugInInfoStore::pluginNameForMIMEType):
148         * platform/gtk/ThreadingGtk.cpp:
149         (WebCore::establishIdentifierForThread):
150         (WebCore::threadForIdentifier):
151         (WebCore::clearThreadForIdentifier):
152         (WebCore::ThreadCondition::ThreadCondition):
153         * platform/gtk/WheelEventGtk.cpp:
154         * platform/gtk/WidgetGtk.cpp:
155         * platform/network/curl/ResourceHandleCurl.cpp:
156         * platform/network/curl/ResourceHandleManager.cpp:
157         (WebCore::ResourceHandleManager::setupPOST):
158         * platform/network/curl/ResourceHandleManager.h:
159         * platform/network/curl/ResourceRequest.h:
160         (WebCore::ResourceRequest::ResourceRequest):
161         * platform/network/curl/ResourceResponse.h:
162
163 2008-02-03  Christian Dywan  <christian@imendio.com>
164
165         Reviewed by Alp Toker.
166
167         http://bugs.webkit.org/show_bug.cgi?id=17046
168         [GTK] Context menu fixes and customisation suport
169
170         Provide standard GTK+ context menu items where appropriate.
171
172         Note that this change makes direct use of WebKit from WebCore which is
173         against WebKit/GTK+ guidelines. The ContextMenu abstraction should be
174         fixed at some point.
175
176         * page/ContextMenuController.cpp:
177         (WebCore::ContextMenuController::contextMenuItemSelected):
178         * platform/ContextMenu.cpp:
179         (WebCore::createAndAppendInputMethodsSubMenu):
180         (WebCore::):
181         (WebCore::insertControlCharacter):
182         (WebCore::createAndAppendUnicodeSubMenu):
183         (WebCore::ContextMenu::populate):
184         (ContextMenu::checkOrEnableIfNeeded):
185         * platform/ContextMenuItem.h:
186         (WebCore::):
187         * platform/LocalizedStrings.h:
188         * platform/gtk/ContextMenuItemGtk.cpp:
189         (WebCore::gtkStockIDFromContextMenuAction):
190         * platform/gtk/LocalizedStringsGtk.cpp:
191         (WebCore::gtkStockLabel):
192         (WebCore::contextMenuItemTagCopy):
193         (WebCore::contextMenuItemTagDelete):
194         (WebCore::contextMenuItemTagSelectAll):
195         (WebCore::contextMenuItemTagUnicode):
196         (WebCore::contextMenuItemTagInputMethods):
197         (WebCore::contextMenuItemTagGoBack):
198         (WebCore::contextMenuItemTagGoForward):
199         (WebCore::contextMenuItemTagStop):
200         (WebCore::contextMenuItemTagCut):
201         (WebCore::contextMenuItemTagPaste):
202         (WebCore::contextMenuItemTagBold):
203         (WebCore::contextMenuItemTagItalic):
204         (WebCore::contextMenuItemTagUnderline):
205
206 2008-02-03  Oliver Hunt  <oliver@apple.com>
207
208         Reviewed by Maciej.
209
210         Bug 17169: Support transform on Canvas
211
212         Nice and simple patch as the cross-platform code to apply
213         a transform was already there.
214
215         Tests: fast/canvas/canvas-transform-identity.html
216                fast/canvas/canvas-transform-infinity.html
217                fast/canvas/canvas-transform-multiply.html
218                fast/canvas/canvas-transform-nan.html
219                fast/canvas/canvas-transform-skewed.html
220
221         * html/CanvasRenderingContext2D.cpp:
222         (WebCore::CanvasRenderingContext2D::transform):
223         * html/CanvasRenderingContext2D.h:
224         * html/CanvasRenderingContext2D.idl:
225
226 2008-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
227
228         Reviewed by Oliver.
229
230         Fix mistake in SVGImageElement, breaking "Dock" example of carto.net
231         It was comparing against the wrong attribute names in svgAttributeChanged().
232
233         Added testcase: svg/custom/js-update-image.svg
234
235         * svg/SVGImageElement.cpp:
236         (WebCore::SVGImageElement::svgAttributeChanged):
237
238 2008-02-03  Eric Seidel  <eric@webkit.org>
239
240         Reviewed by darin.
241
242         Acid3 expects textNode.localName === null
243         http://bugs.webkit.org/show_bug.cgi?id=17060
244
245         Test: fast/dom/Node/initial-values.html
246
247         * dom/Comment.cpp: remove localName implementation
248         * dom/Comment.h:
249         * dom/Node.cpp: return nullAtom instead of emptyAtom
250         * dom/Text.cpp: remove localName implementation
251         * dom/Text.h:
252
253 2008-02-03  Eric Seidel  <eric@webkit.org>
254
255         Reviewed by darin.
256
257         Make createElementNS and createAttributeNS follow the (vague) DOM Core 2 spec
258         by throwing exceptions for more types of invalid qualified names.
259         http://bugs.webkit.org/show_bug.cgi?id=16833
260
261         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
262                fast/dom/Document/createElementNS-namespace-err.html
263
264         * dom/Document.cpp:
265         (WebCore::Document::createElement):
266         (WebCore::hasNamespaceError):
267         (WebCore::Document::createElementNS):
268         (WebCore::Document::createAttributeNS):
269         * dom/Document.idl:
270
271 2008-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
272
273         Reviewed by Eric.
274
275         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15394
276
277         Dramatically improve dynamic update performance in DOM / SVG DOM.
278
279         The notifyAttributeChange() sledgehammer is gone now. It was implemented on quite a lot of
280         SVG*Element classes and blindly reacted on any property change caused by DOM / SVG DOM
281         by rebuilding style/renderer etc. without actually checking what changed. SVG used a hack
282         for years that attributeChanged() called notifyAttributeChange() - which results in poor
283         scripting performance and/or dynamic creation/modification of elements using SVG DOM.
284
285         Properly implement childrenChanged / attributeChanged in SVG with some derivation from the HTML code.
286         Our SVG* element classes implement "svgAttributeChanged(const QualifiedName&)" instead of
287         "attributeChanged(Attribute*...)" to be able to unify DOM / SVG DOM updates. SVG DOM classes
288         are aware of the attribute name they belong to. So when using "rectElement.transform.baseVal.getItem(0).setRotate(45)"
289         SVG DOM updates the <rect> element by calling svgAttributeChanged(SVGNames::transformAttr) on the corresponding
290         SVGRectElement. So we're now able to handle fast dynamic updates in a unified way - leading to less bugs.
291
292         HTML dynamic updates vs. SVG dynamic updates:
293
294         HTML:
295             1) setAttribute("foo", "bar") -> attributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
296             2) someObject.foo = "bar" -> HTML code maps to setAttribute calls, ends up taking the same route as 1)
297             3) someObject.style.foo = "bar" -> setChanged -> recalcStyle (possible relayout)
298
299         SVG:
300             1) setAttribute("foo", "bar") -> attributeChanged -> svgAttributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
301             2) same, currently most functions are not yet converted to this new system! (most noticeable in SVGMarkerElement::setOrientToAngle)    
302             3) same
303             4) someRectElement.x.baseVal.value = 100 -> svgAttributeChanged -> setChanged/setNeedsLayout (special SVG DOM updating)
304         
305         The new SVG DOM updating concept 4) uses the same updating logic as 1) and 2), so we're actually modelling the HTML way.
306         SVG handles calling setChanged/setNeedsLayout in svgAttributeChanged, unlike HTML which uses parseMappedAttribute for that.
307
308         Only updated all elements necessary to let us pass layout tests w/o regressions. Need to crawl through
309         all SVG*Element classes and implement svgAttributeChanged / childrenChanged anywhere needed in a follow-up patch.
310
311         * bindings/js/JSSVGPODTypeWrapper.h:
312         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
313         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
314         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
315         (WebCore::JSSVGPODTypeWrapperCreatorForList::operator PODType):
316         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
317         * bindings/js/JSSVGPathSegListCustom.cpp:
318         (WebCore::JSSVGPathSegList::clear):
319         (WebCore::JSSVGPathSegList::initialize):
320         (WebCore::JSSVGPathSegList::insertItemBefore):
321         (WebCore::JSSVGPathSegList::replaceItem):
322         (WebCore::JSSVGPathSegList::removeItem):
323         (WebCore::JSSVGPathSegList::appendItem):
324         * bindings/js/JSSVGPointListCustom.cpp:
325         (WebCore::JSSVGPointList::clear):
326         (WebCore::JSSVGPointList::initialize):
327         (WebCore::JSSVGPointList::getItem):
328         (WebCore::JSSVGPointList::insertItemBefore):
329         (WebCore::JSSVGPointList::replaceItem):
330         (WebCore::JSSVGPointList::removeItem):
331         (WebCore::JSSVGPointList::appendItem):
332         * bindings/js/JSSVGTransformListCustom.cpp:
333         (WebCore::JSSVGTransformList::clear):
334         (WebCore::JSSVGTransformList::initialize):
335         (WebCore::JSSVGTransformList::getItem):
336         (WebCore::JSSVGTransformList::insertItemBefore):
337         (WebCore::JSSVGTransformList::replaceItem):
338         (WebCore::JSSVGTransformList::removeItem):
339         (WebCore::JSSVGTransformList::appendItem):
340         * bindings/scripts/CodeGeneratorJS.pm:
341         * rendering/RenderSVGGradientStop.cpp:
342         (WebCore::RenderSVGGradientStop::setStyle):
343         * rendering/RenderSVGGradientStop.h:
344         * svg/SVGAElement.cpp:
345         (WebCore::SVGAElement::defaultEventHandler):
346         * svg/SVGAElement.h:
347         * svg/SVGAngle.cpp:
348         * svg/SVGAngle.h:
349         (WebCore::SVGAngle::associatedAttributeName):
350         * svg/SVGAnimatedTemplate.h:
351         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
352         (WebCore::SVGAnimatedTemplate::wrapperCache):
353         (WebCore::SVGAnimatedTemplate::associatedAttributeName):
354         (WebCore::lookupOrCreateWrapper):
355         * svg/SVGAnimationElement.cpp:
356         (WebCore::SVGAnimationElement::parseBeginOrEndValue):
357         * svg/SVGAnimationElement.h:
358         * svg/SVGCircleElement.cpp:
359         (WebCore::SVGCircleElement::svgAttributeChanged):
360         * svg/SVGCircleElement.h:
361         * svg/SVGClipPathElement.cpp:
362         (WebCore::SVGClipPathElement::svgAttributeChanged):
363         (WebCore::SVGClipPathElement::childrenChanged):
364         (WebCore::SVGClipPathElement::canvasResource):
365         * svg/SVGClipPathElement.h:
366         (WebCore::SVGClipPathElement::isValid):
367         (WebCore::SVGClipPathElement::rendererIsNeeded):
368         * svg/SVGComponentTransferFunctionElement.cpp:
369         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
370         * svg/SVGComponentTransferFunctionElement.h:
371         * svg/SVGCursorElement.cpp:
372         * svg/SVGElement.cpp:
373         (WebCore::SVGElement::insertedIntoDocument):
374         (WebCore::SVGElement::attributeChanged):
375         * svg/SVGElement.h:
376         (WebCore::SVGElement::svgAttributeChanged):
377         * svg/SVGEllipseElement.cpp:
378         (WebCore::SVGEllipseElement::svgAttributeChanged):
379         * svg/SVGEllipseElement.h:
380         * svg/SVGExternalResourcesRequired.cpp:
381         (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
382         * svg/SVGExternalResourcesRequired.h:
383         * svg/SVGFEBlendElement.cpp:
384         * svg/SVGFEColorMatrixElement.cpp:
385         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
386         * svg/SVGFEComponentTransferElement.cpp:
387         * svg/SVGFECompositeElement.cpp:
388         * svg/SVGFEDiffuseLightingElement.cpp:
389         * svg/SVGFEDisplacementMapElement.cpp:
390         * svg/SVGFEFloodElement.cpp:
391         * svg/SVGFEGaussianBlurElement.cpp:
392         * svg/SVGFEImageElement.cpp:
393         * svg/SVGFELightElement.cpp:
394         * svg/SVGFEMergeNodeElement.cpp:
395         * svg/SVGFEOffsetElement.cpp:
396         * svg/SVGFESpecularLightingElement.cpp:
397         * svg/SVGFETileElement.cpp:
398         * svg/SVGFETurbulenceElement.cpp:
399         * svg/SVGFilterElement.cpp:
400         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
401         * svg/SVGFitToViewBox.cpp:
402         (WebCore::SVGFitToViewBox::isKnownAttribute):
403         * svg/SVGFitToViewBox.h:
404         * svg/SVGForeignObjectElement.cpp:
405         * svg/SVGGElement.cpp:
406         (WebCore::SVGGElement::svgAttributeChanged):
407         (WebCore::SVGGElement::childrenChanged):
408         * svg/SVGGElement.h:
409         * svg/SVGGradientElement.cpp:
410         (WebCore::SVGGradientElement::SVGGradientElement):
411         (WebCore::SVGGradientElement::svgAttributeChanged):
412         (WebCore::SVGGradientElement::childrenChanged):
413         (WebCore::SVGGradientElement::buildStops):
414         * svg/SVGGradientElement.h:
415         * svg/SVGImageElement.cpp:
416         (WebCore::SVGImageElement::parseMappedAttribute):
417         (WebCore::SVGImageElement::svgAttributeChanged):
418         * svg/SVGImageElement.h:
419         * svg/SVGLangSpace.cpp:
420         (WebCore::SVGLangSpace::isKnownAttribute):
421         * svg/SVGLangSpace.h:
422         * svg/SVGLengthList.cpp:
423         (WebCore::SVGLengthList::SVGLengthList):
424         * svg/SVGLengthList.h:
425         * svg/SVGLineElement.cpp:
426         (WebCore::SVGLineElement::svgAttributeChanged):
427         * svg/SVGLineElement.h:
428         * svg/SVGLinearGradientElement.cpp:
429         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
430         * svg/SVGLinearGradientElement.h:
431         * svg/SVGList.h:
432         (WebCore::SVGList::SVGList):
433         (WebCore::SVGList::associatedAttributeName):
434         (WebCore::SVGPODList::SVGPODList):
435         * svg/SVGMarkerElement.cpp:
436         (WebCore::SVGMarkerElement::svgAttributeChanged):
437         (WebCore::SVGMarkerElement::childrenChanged):
438         * svg/SVGMarkerElement.h:
439         * svg/SVGMaskElement.cpp:
440         (WebCore::SVGMaskElement::svgAttributeChanged):
441         (WebCore::SVGMaskElement::childrenChanged):
442         * svg/SVGMaskElement.h:
443         * svg/SVGNumberList.cpp:
444         (WebCore::SVGNumberList::SVGNumberList):
445         * svg/SVGNumberList.h:
446         * svg/SVGPathElement.cpp:
447         (WebCore::SVGPathElement::svgAttributeChanged):
448         (WebCore::SVGPathElement::pathSegList):
449         * svg/SVGPathElement.h:
450         * svg/SVGPathSeg.h:
451         (WebCore::SVGPathSeg::associatedAttributeName):
452         * svg/SVGPathSegList.cpp:
453         (WebCore::SVGPathSegList::SVGPathSegList):
454         * svg/SVGPathSegList.h:
455         * svg/SVGPatternElement.cpp:
456         (WebCore::SVGPatternElement::SVGPatternElement):
457         (WebCore::SVGPatternElement::svgAttributeChanged):
458         (WebCore::SVGPatternElement::childrenChanged):
459         * svg/SVGPatternElement.h:
460         * svg/SVGPointList.cpp:
461         (WebCore::SVGPointList::SVGPointList):
462         * svg/SVGPointList.h:
463         * svg/SVGPolyElement.cpp:
464         (WebCore::SVGPolyElement::SVGPolyElement):
465         (WebCore::SVGPolyElement::points):
466         (WebCore::SVGPolyElement::parseMappedAttribute):
467         (WebCore::SVGPolyElement::svgAttributeChanged):
468         * svg/SVGPolyElement.h:
469         * svg/SVGPolygonElement.cpp:
470         * svg/SVGPolygonElement.h:
471         * svg/SVGPolylineElement.cpp:
472         * svg/SVGPolylineElement.h:
473         * svg/SVGPreserveAspectRatio.cpp:
474         * svg/SVGPreserveAspectRatio.h:
475         (WebCore::SVGPreserveAspectRatio::associatedAttributeName):
476         * svg/SVGRadialGradientElement.cpp:
477         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
478         * svg/SVGRadialGradientElement.h:
479         * svg/SVGRectElement.cpp:
480         (WebCore::SVGRectElement::svgAttributeChanged):
481         * svg/SVGRectElement.h:
482         * svg/SVGSVGElement.cpp:
483         (WebCore::SVGSVGElement::parseMappedAttribute):
484         (WebCore::SVGSVGElement::svgAttributeChanged):
485         * svg/SVGSVGElement.h:
486         * svg/SVGStopElement.cpp:
487         (WebCore::SVGStopElement::parseMappedAttribute):
488         (WebCore::SVGStopElement::createRenderer):
489         * svg/SVGStopElement.h:
490         * svg/SVGStringList.cpp:
491         (WebCore::SVGStringList::SVGStringList):
492         * svg/SVGStringList.h:
493         * svg/SVGStylable.cpp:
494         * svg/SVGStylable.h:
495         * svg/SVGStyledElement.cpp:
496         (WebCore::SVGStyledElement::isKnownAttribute):
497         (WebCore::SVGStyledElement::svgAttributeChanged):
498         (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain):
499         (WebCore::SVGStyledElement::childrenChanged):
500         * svg/SVGStyledElement.h:
501         * svg/SVGStyledLocatableElement.cpp:
502         * svg/SVGStyledLocatableElement.h:
503         * svg/SVGStyledTransformableElement.cpp:
504         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
505         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
506         (WebCore::SVGStyledTransformableElement::isKnownAttribute):
507         * svg/SVGStyledTransformableElement.h:
508         * svg/SVGTests.cpp:
509         (WebCore::SVGTests::requiredFeatures):
510         (WebCore::SVGTests::requiredExtensions):
511         (WebCore::SVGTests::systemLanguage):
512         (WebCore::SVGTests::isKnownAttribute):
513         * svg/SVGTests.h:
514         * svg/SVGTextContentElement.cpp:
515         * svg/SVGTextElement.cpp:
516         (WebCore::SVGTextElement::SVGTextElement):
517         * svg/SVGTextElement.h:
518         * svg/SVGTextPathElement.cpp:
519         * svg/SVGTextPathElement.h:
520         * svg/SVGTextPositioningElement.cpp:
521         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
522         * svg/SVGTextPositioningElement.h:
523         * svg/SVGTransformList.cpp:
524         (SVGTransformList::SVGTransformList):
525         * svg/SVGTransformList.h:
526         * svg/SVGTransformable.cpp:
527         (WebCore::SVGTransformable::isKnownAttribute):
528         * svg/SVGTransformable.h:
529         * svg/SVGURIReference.cpp:
530         (WebCore::SVGURIReference::isKnownAttribute):
531         * svg/SVGURIReference.h:
532         * svg/SVGUseElement.cpp:
533         (WebCore::SVGUseElement::insertedIntoDocument):
534         (WebCore::SVGUseElement::svgAttributeChanged):
535         (WebCore::SVGUseElement::childrenChanged):
536         (WebCore::SVGUseElement::buildPendingResource):
537         * svg/SVGUseElement.h:
538         * svg/SVGViewElement.cpp:
539         (WebCore::SVGViewElement::SVGViewElement):
540         (WebCore::SVGViewElement::viewTarget):
541         (WebCore::SVGViewElement::parseMappedAttribute):
542         * svg/SVGViewElement.h:
543         * svg/SVGViewSpec.cpp:
544         (WebCore::SVGViewSpec::SVGViewSpec):
545         * svg/SVGViewSpec.h:
546         * svg/SVGZoomAndPan.cpp:
547         (WebCore::SVGZoomAndPan::isKnownAttribute):
548         * svg/SVGZoomAndPan.h:
549         * svg/graphics/SVGResource.cpp:
550         (WebCore::SVGResource::invalidate):
551         (WebCore::SVGResource::invalidateClients):
552         (WebCore::SVGResource::addClient):
553         * svg/graphics/SVGResource.h:
554         * svg/graphics/SVGResourceMasker.cpp:
555         (WebCore::SVGResourceMasker::invalidate):
556         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
557         (WebCore::SVGPaintServerGradient::invalidate):
558         * svg/graphics/filters/SVGFEImage.cpp:
559         (WebCore::SVGFEImage::imageChanged):
560
561 2008-02-03  Kevin Ollivier  <kevino@theolliviers.com>
562
563         Build fix for last wx commit (a couple things were not committed).
564
565         * platform/ScrollView.h:
566         * platform/Widget.h:
567
568 2008-02-03  Kevin Ollivier  <kevino@theolliviers.com>
569
570         Clean up overlooked coding guideline issues from last commit.
571
572         * platform/wx/ScrollViewWx.cpp:
573         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
574         (WebCore::ScrollView::update):
575         (WebCore::ScrollView::scrollBy):
576         (WebCore::ScrollView::resizeContents):
577         (WebCore::ScrollView::adjustScrollbars):
578         (WebCore::ScrollView::setScrollbarsMode):
579         (WebCore::ScrollView::setHScrollbarMode):
580         (WebCore::ScrollView::setVScrollbarMode):
581         (WebCore::ScrollView::suppressScrollbars):
582         * platform/wx/WidgetWx.cpp:
583         (WebCore::Widget::setCursor):
584
585 2008-02-03  Kevin Watters  <kevinwatters@gmail.com>
586
587         Reviewed by Kevin Ollivier.
588
589         * platform/wx/RenderThemeWx.cpp:
590         (WebCore::RenderThemeWx::paintButton):
591         * platform/wx/ScrollViewWx.cpp:
592         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
593         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
594         (WebCore::ScrollView::ScrollViewPrivate::OnMouseWheelEvents):
595         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
596         (WebCore::ScrollView::ScrollView):
597         (WebCore::ScrollView::setNativeWindow):
598         (WebCore::ScrollView::updateContents):
599         (WebCore::ScrollView::update):
600         (WebCore::ScrollView::visibleWidth):
601         (WebCore::ScrollView::visibleHeight):
602         (WebCore::ScrollView::setContentsPos):
603         (WebCore::ScrollView::scrollBy):
604         (WebCore::ScrollView::resizeContents):
605         (WebCore::ScrollView::contentsX):
606         (WebCore::ScrollView::contentsY):
607         (WebCore::ScrollView::contentsWidth):
608         (WebCore::ScrollView::contentsHeight):
609         (WebCore::ScrollView::AdjustScrollbars):
610         (WebCore::ScrollView::setScrollbarsMode):
611         (WebCore::ScrollView::setHScrollbarMode):
612         (WebCore::ScrollView::setVScrollbarMode):
613         (WebCore::ScrollView::suppressScrollbars):
614         (WebCore::ScrollView::inWindow):
615         (WebCore::ScrollView::wheelEvent):
616         (WebCore::ScrollView::addChild):
617         (WebCore::ScrollView::removeChild):
618         (WebCore::ScrollView::children):
619         (WebCore::ScrollView::scrollRectIntoViewRecursively):
620         (WebCore::ScrollView::scrollbarUnderMouse):
621         * platform/wx/WidgetWx.cpp:
622         (WebCore::Widget::Widget):
623         (WebCore::Widget::~Widget):
624         (WebCore::Widget::nativeWindow):
625         (WebCore::Widget::setNativeWindow):
626
627 2008-02-02  David Hyatt  <hyatt@apple.com>
628
629         Fix for bug 5468, support CSS3 :only-child and :only-of-type selectors.
630
631         Reviewed by olliej
632
633         Added fast/css/only-child-pseudo-class.html, fast/css/only-of-type-pseudo-class.html
634
635         * css/CSSSelector.cpp:
636         (WebCore::CSSSelector::extractPseudoType):
637         * css/CSSSelector.h:
638         (WebCore::CSSSelector::):
639         * css/CSSStyleSelector.cpp:
640         (WebCore::CSSStyleSelector::checkOneSelector):
641
642 2008-02-02  Darin Adler  <darin@apple.com>
643
644         Reviewed by Geoff Garen.
645
646         PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
647         slower due to r28884 (global variable symbol table optimization)
648
649         * history/CachedPage.cpp:
650         (WebCore::CachedPage::CachedPage): Removed saveSymbolTable call.
651         (WebCore::CachedPage::restore): Removed restoreSymbolTable call.
652         (WebCore::CachedPage::clear): Removed clear of m_windowSymbolTable.
653
654         * history/CachedPage.h: Removed m_windowSymbolTable, since save/restoreLocalStorage
655         now takes care of the symbol table. Also removed many unnecessary includes.
656
657 2008-02-02  Tony Chang  <idealisms@gmail.com>
658
659         Reviewed by eseidel.
660
661         Add an include for for <objidl.h> which isn't included
662         by default with WIN32_LEAN_AND_MEAN.
663         * platform/graphics/FontCache.h:
664
665 2008-02-02  Kevin Watters  <kevin@dotsyntax.com>
666
667         Reviewed by Kevin Ollivier.
668
669         wxFont is reference counted and meant to be used as as a value
670         object; when using wxFont*, ref-counting was not happening properly
671         and the font object would be destroyed while still in use.
672
673         Also, fix memory leak in wx's FrameData::clear() method.
674
675         * platform/graphics/SimpleFontData.h:
676         (WebCore::SimpleFontData::getWxFont):
677         * platform/graphics/wx/FontPlatformData.h:
678         (WebCore::FontPlatformData::):
679         (WebCore::FontPlatformData::FontPlatformData):
680         (WebCore::FontPlatformData::font):
681         (WebCore::FontPlatformData::hash):
682         (WebCore::FontPlatformData::operator==):
683         (WebCore::FontPlatformData::computeHash):
684         * platform/graphics/wx/FontPlatformDataWx.cpp:
685         (WebCore::fontFamilyToWxFontFamily):
686         (WebCore::FontPlatformData::FontPlatformData):
687         (WebCore::FontPlatformData::~FontPlatformData):
688         * platform/graphics/wx/FontWx.cpp:
689         (WebCore::Font::drawGlyphs):
690         * platform/graphics/wx/SimpleFontDataWx.cpp:
691         (WebCore::SimpleFontData::platformInit):
692         (WebCore::SimpleFontData::determinePitch):
693         (WebCore::SimpleFontData::platformWidthForGlyph):
694
695 2008-02-02  Kevin Ollivier  <kevino@theolliviers.com>
696
697         Reviewed by Adam Roben.
698
699         On MSW, the wx port internally uses callbacks for wxTimer, so the
700         wx port suffers from the same crash problem that was fixed
701         in r28500 for the Windows port. For now, use the SharedTimerWin.cpp
702         impl. for wx too on MSW, until a version of wx is released that
703         fixes the issue by reworking wxTimer.
704
705         * page/Page.h:
706         * platform/win/SharedTimerWin.cpp:
707         (WebCore::TimerWindowWndProc):
708         * webcore-wx.bkl:
709
710 2008-02-02  Mark Rowe  <mrowe@apple.com>
711
712         Qt build fix.
713
714         * platform/qt/ThreadingQt.cpp: Fix typo.
715
716 2008-02-02  Kevin Ollivier  <kevino@theolliviers.com>
717
718         Blind build fix for Qt port. Add Threading.h include.
719
720         * platform/qt/ThreadingQt.cpp:
721
722 2008-02-02  Kevin Ollivier  <kevino@theolliviers.com>
723
724         wx build fix - add missing include file.
725
726         * platform/wx/ThreadingWx.cpp:
727
728 2008-02-02  David Hyatt  <hyatt@apple.com>
729
730         Fix for bug 4812. Support last-child and last-of-type CSS3 selectors.  Brings Acid3 score up to 68/100.
731
732         Reviewed by olliej
733
734         Added fast/css/last-child-pseudo-class.html, fast/css/last-of-type-pseudo-class.html
735
736         * css/CSSGrammar.y:
737         * css/CSSSelector.cpp:
738         (WebCore::CSSSelector::extractPseudoType):
739         * css/CSSSelector.h:
740         (WebCore::CSSSelector::):
741         * css/CSSStyleSelector.cpp:
742         (WebCore::CSSStyleSelector::checkOneSelector):
743
744 2008-02-01  David Hyatt  <hyatt@apple.com>
745
746         Make :first-child and :first-of-type properly dynamic when the DOM changes.  Brings the Acid3 score up
747         to 66/100.
748
749         Reviewed by olliej
750
751         Added fast/css/first-child-pseudo-class.html, fast/css/first-of-type-pseudo-class.html, fast/css/empty-body-test.html
752
753         * css/CSSGrammar.y:
754         * css/CSSStyleSelector.cpp:
755         (WebCore::CSSStyleSelector::checkOneSelector):
756         * dom/Element.cpp:
757         (WebCore::Element::recalcStyle):
758         (WebCore::Element::childrenChanged):
759         * rendering/RenderStyle.cpp:
760         (WebCore::RenderStyle::RenderStyle):
761         * rendering/RenderStyle.h:
762         (WebCore::RenderStyle::childrenAffectedByFirstChildRules):
763         (WebCore::RenderStyle::setChildrenAffectedByFirstChildRules):
764         (WebCore::RenderStyle::childrenAffectedByLastChildRules):
765         (WebCore::RenderStyle::setChildrenAffectedByLastChildRules):
766         (WebCore::RenderStyle::childrenAffectedByPositionalRules):
767         (WebCore::RenderStyle::setChildrenAffectedByPositionalRules):
768         (WebCore::RenderStyle::firstChildState):
769         (WebCore::RenderStyle::setFirstChildState):
770         (WebCore::RenderStyle::lastChildState):
771         (WebCore::RenderStyle::setLastChildState):
772
773 2008-02-02  Dan Bernstein  <mitz@apple.com>
774
775         Reviewed by Oliver Hunt.
776
777         - fix <rdar://problem/5720637> Missing characters in right-to-left complex text where different fonts are used in the same run
778
779         * platform/graphics/win/UniscribeController.cpp:
780         (WebCore::UniscribeController::advance): Fixed an off-by-1 error in the
781         start offset of sub-runs of RTL runs. Changed to update
782         m_currentCharacter to the first character of the sub-run before calling
783         itemizeShapeAndPlace. In RTL runs, m_currentCharacter decreases as
784         sub-runs are processed from left to right.
785         (WebCore::UniscribeController::itemizeShapeAndPlace): Removed the
786         updating of m_currentCharacter because advance() does it now.
787
788 2008-02-01  Brady Eidson  <beidson@apple.com>
789
790         Reviewed by Darin's rubberstamp
791
792         Move the SecurityOriginHash out into a separate header as it will soon be used in different places
793
794         * WebCore.xcodeproj/project.pbxproj:
795         * platform/SecurityOriginHash.h: Added.
796         (WebCore::SecurityOriginHash::hash):
797         (WebCore::SecurityOriginHash::equal):
798         (WebCore::SecurityOriginTraits::deletedValue):
799         (WebCore::SecurityOriginTraits::emptyValue):
800         * storage/DatabaseTracker.cpp:
801
802 2008-02-01  Darin Adler  <darin@apple.com>
803
804         Reviewed by Tim.
805
806         - fixed mistake in the JSLock fix that caused an assertion every time
807
808         * bindings/js/JSCustomSQLTransactionCallback.cpp:
809         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): Added JSLock.
810         (WebCore::unprotectOnMainThread): Ditto.
811
812 2008-02-01  Anders Carlsson  <andersca@apple.com>
813
814         Reviewed by Antti and Darin.
815
816         Change Text::createWithLengthLimit to take a UChar pointer instead of a string. This
817         lets us avoid making a copy of the buffer in TextDocument.cpp.
818         
819         * dom/Text.cpp:
820         (WebCore::Text::createWithLengthLimit):
821         * dom/Text.h:
822         * html/HTMLParser.cpp:
823         (WebCore::HTMLParser::parseToken):
824         * loader/TextDocument.cpp:
825         (WebCore::TextTokenizer::write):
826
827 2008-02-01  Darin Adler  <darin@apple.com>
828
829         Reviewed by Adam.
830
831         * platform/network/mac/ResourceHandleMac.mm:
832         (WebCore::ResourceHandle::loadsBlocked): Fix grammar and word typo.
833
834 2008-02-01  Darin Adler  <darin@apple.com>
835
836         Reviewed by Adam.
837
838         - fix <rdar://problem/4527931> showModalDialog calls from onload functions fail (Aspect)
839
840         No automated regression test because showModalDialog doesn't work in DumpRenderTree.
841
842         * platform/network/mac/ResourceHandleMac.mm:
843         (WebCore::CallbackGuard::CallbackGuard): Added.
844         (WebCore::CallbackGuard::~CallbackGuard): Added.
845         (WebCore::ResourceHandle::supportsBufferedData): Simplified to take advantage of how
846         static initialization works in C++.
847         (WebCore::ResourceHandle::loadsBlocked): Always return false on Leopard. The problem in
848         NSURLConnection that created the need to block loads is fixed in Leoaprd. This is the
849         bug fix.
850         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
851         Use CallbackGuard instead of directly incrementing the count; allows us to omit the code
852         entirely on Leopard.
853         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
854         Ditto.
855         (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]):
856         Ditto.
857         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
858         Ditto.
859         (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
860         Ditto.
861         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
862         Ditto.
863         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
864         Ditto.
865         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
866         Ditto.
867         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
868         Ditto. Fixes a problem where this could leave inNSURLConnectionCallback set
869         permanently in one of the code paths; this would break showModalDialog from that
870         point on. This problem doesn't affect Safari.
871
872 2008-02-01  Darin Adler  <darin@apple.com>
873
874         * platform/network/mac/ResourceHandleMac.mm:
875         (WebCore::ResourceHandle::loadsBlocked): Roll out accidentally checked in file.
876
877 2008-02-01  Darin Adler  <darin@apple.com>
878
879         Reviewed by Geoff and Brady.
880
881         - fix <rdar://problem/5680469> Each database worker thread takes a JSLock,
882           which slows down all JavaScript execution until the thread terminates
883
884         * bindings/js/JSCustomSQLTransactionCallback.cpp:
885         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
886         Explicitly gcProtect, since we aren't using ProtectedPtr any more.
887         (WebCore::unprotectOnMainThread): Added.
888         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
889         Use unprotectOnMainThread rather than doing a gcUnprotect here.
890         * bindings/js/JSCustomSQLTransactionCallback.h: Changed m_callback from
891         a ProtectedPtr to a plain old JSObject*; we gcProtect by hand now.
892
893         * loader/icon/IconDatabase.cpp:
894         (WebCore::IconDatabase::notifyPendingLoadDecisionsOnMainThread):
895         Renamed. Changed to takea a void* with the icon database pointer.
896         (WebCore::IconDatabase::notifyPendingLoadDecisions): Renamed.
897         (WebCore::IconDatabase::performURLImport): Updated name, and pass the
898         icon database pointer in.
899         * loader/icon/IconDatabase.h: Renamed and added void* parameter.
900
901         * platform/Threading.h: Changed callOnMainThread to take a function with a
902         single parameter rather than a function with no parameters. Added a typedef.
903
904         * platform/gtk/ThreadingGtk.cpp:
905         (WebCore::callFunctionOnMainThread): Changed to use a structure with both
906         a function pointer and a context pointer, and delete it after calling.
907         (WebCore::callOnMainThread): Changed to create the structure with both
908         the function and context pointer.
909
910         * platform/mac/Threading.mm:
911         (-[WebCoreFunctionWrapper initWithFunction:context:]): Added context.
912         (-[WebCoreFunctionWrapper invoke]): Updated to do both function and context.
913         Renamed from _call.
914         (WebCore::callOnMainThread): Updated to take both function and context.
915
916         * platform/qt/ThreadingQt.cpp:
917         (WebCore::PerformFunctionEvent::PerformFunctionEvent): Added context.
918         (WebCore::PerformFunctionEvent::invoke): Added. Calls function with context pointer.
919         (WebCore::MainThreadInvoker::event): Changed to call invoke.
920         (WebCore::callOnMainThread): Updated to take both function and context.
921
922         * platform/win/ThreadingWin.cpp: Added FunctionWithContext.
923         (WebCore::callFunctionsOnMainThread): Changed to pass call function with context.
924         (WebCore::callOnMainThread): Updated to queue both function and context.
925
926         * platform/wx/ThreadingWx.cpp:
927         (WebCore::callOnMainThread): Updated to take both function and context.
928
929         * storage/Database.cpp:
930         (WebCore::Database::scheduleTransactionCallback): Pass 0 for context.
931         (WebCore::Database::deliverAllPendingCallbacks): Changed to take ignored context pointer.
932         * storage/Database.h: Added void* parameter to deliverAllPendingCallbacks.
933
934         * storage/DatabaseTracker.cpp:
935         (WebCore::DatabaseTracker::scheduleForNotification): Pass 0 for context.
936         (WebCore::DatabaseTracker::notifyDatabasesChanged): Changed to take ignored context pointer.
937         * storage/DatabaseTracker.h: Added void* parameter to notifyDatabasesChanged.
938
939 2008-02-01  Jon Honeycutt  <jhoneycutt@apple.com>
940
941         Rubber-stamped by Ollie.
942
943         * plugins/win/PluginPackageWin.cpp:
944         (WebCore::PluginPackageWin::load): Fix two function pointers
945
946 2008-02-01  Geoffrey Garen  <ggaren@apple.com>
947
948         Reviewed by John Sullivan, Oliver Hunt.
949
950         Fixed <rdar://problem/5688039> REGRESSION (r29428): Weather widget
951         fails to load due to reliance on "var location" quirk
952         
953         Added a Dashboard quirk.
954
955         * bindings/js/kjs_window.cpp:
956         (KJS::Window::put): In DB backwards compatibility mode, make assignment
957         to window.location in top-level windows shadow the DOM location API
958         instead of performing a navigation. This makes a reasonable amount of
959         sense, because widgets can't navigate their top-level frames, anyway.
960
961 2008-02-01  David Hyatt  <hyatt@apple.com>
962
963         Fix for bug 11387, CSS3 :empty selector is not dynamic.
964
965         Add support for dynamically updating elements whose style is affected by :empty when the child count changes.
966
967         Reviewed by olliej, mitzpettel
968
969         fast/css/empty-pseudo-class.html
970
971         * css/CSSStyleSelector.cpp:
972         (WebCore::CSSStyleSelector::locateSharedStyle):
973         (WebCore::CSSStyleSelector::checkOneSelector):
974         * dom/Element.cpp:
975         (WebCore::Element::childrenChanged):
976         * dom/Element.h:
977         * rendering/RenderStyle.h:
978         (WebCore::RenderStyle::affectedByEmpty):
979         (WebCore::RenderStyle::emptyState):
980         (WebCore::RenderStyle::setEmptyState):
981
982 2008-02-01  Dan Bernstein  <mitz@apple.com>
983
984         Reviewed by Darin Adler.
985
986         - switch line breaking from using Carbon Unicode Utilities to using ICU
987           on Leopard
988           <http://bugs.webkit.org/show_bug.cgi?id=4628>
989
990         fast/text/international/thai-line-breaks.html results do not change.
991
992         * rendering/break_lines.cpp:
993         (WebCore::nextBreakablePosition): Changed to use Carbon only on Tiger.
994
995 2008-02-01  Rodney Dawes  <dobey@wayofthemonkey.com>
996
997         Reviewed by Darin.
998
999         Update npfunctions.h to export the proper function signatures for UNIX and add
1000         the appropriate #if around the Windows versions
1001
1002         * plugins/npfunctions.h:
1003
1004 2008-02-01  Eric Seidel  <eric@webkit.org>
1005
1006         Reviewed by Oliver.
1007
1008         Add getSVGDocument to frame and iframe.
1009
1010         Test: svg/custom/frame-getSVGDocument.html
1011
1012         * html/HTMLEmbedElement.cpp:
1013         * html/HTMLEmbedElement.h:
1014         * html/HTMLFrameElement.idl:
1015         * html/HTMLFrameOwnerElement.cpp:
1016         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
1017         * html/HTMLFrameOwnerElement.h:
1018         * html/HTMLIFrameElement.idl:
1019         * html/HTMLObjectElement.cpp:
1020         * html/HTMLObjectElement.h:
1021
1022 2008-01-30  Eric Seidel  <eric@webkit.org>
1023
1024         Reviewed by darin.
1025
1026         Beat CSSParser with the RefPtr stick.  Hopefully squashing any leaks in the process.
1027         (Deploy RefPtr and PassRefPtr throughout CSSParser)
1028         http://bugs.webkit.org/show_bug.cgi?id=17108
1029
1030         No functional changes, thus no tests.
1031
1032         * css/CSSParser.cpp:
1033         (WebCore::CSSParser::parseColor):
1034         (WebCore::CSSParser::parseValue):
1035         (WebCore::CSSParser::addBackgroundValue):
1036         (WebCore::CSSParser::parseBackgroundShorthand):
1037         (WebCore::CSSParser::addTransitionValue):
1038         (WebCore::CSSParser::parseTransitionShorthand):
1039         (WebCore::CSSParser::parseBackgroundPosition):
1040         (WebCore::CSSParser::parseBackgroundProperty):
1041         (WebCore::CSSParser::parseTransitionProperty):
1042         (WebCore::CSSParser::parseFontFaceSrc):
1043         (WebCore::ShadowParseContext::ShadowParseContext):
1044         (WebCore::CSSParser::parseShadow):
1045         (WebCore::BorderImageParseContext::BorderImageParseContext):
1046         (WebCore::BorderImageParseContext::commitBorderImage):
1047         * css/CSSParser.h:
1048         * css/SVGCSSParser.cpp:
1049         (WebCore::CSSParser::parseSVGValue):
1050
1051 2008-01-31  Oliver Hunt  <oliver@apple.com>
1052
1053         RS=Brady.
1054
1055         Add platform/Locker.h to vcproj
1056
1057         * WebCore.vcproj/WebCore.vcproj:
1058
1059 2008-01-31  Brady Eidson  <beidson@apple.com>
1060
1061         Build fix
1062
1063         * WebCore.xcodeproj/project.pbxproj: Header -> WebKit
1064
1065 2008-01-31  Brady Eidson  <beidson@apple.com>
1066
1067         Reviewed by Maciej
1068
1069         Abstracted the concept of a "Locker" as upcoming work will rely on it.
1070
1071         * platform/Locker.h: Added.  Template class to "lock()" and "unlock()" some arbitrary object
1072         (WebCore::Locker::Locker): Lock the object
1073         (WebCore::Locker::~Locker): Unlock it
1074         * platform/Threading.h: `class MutexLocker` is now `typedef Locker<Mutex>`
1075         * WebCore.xcodeproj/project.pbxproj:
1076
1077 2008-01-31  Kevin McCullough  <kmccullough@apple.com>
1078
1079         <rdar://problem/5716912> REGRESSION (r29816): Can't navigate back to
1080         Gmail Inbox from Gmail Compose page
1081         Rolling out the change that caused the regression.
1082
1083         * WebCore.base.exp:
1084         * bindings/js/JSHTMLDocumentCustom.cpp:
1085         (WebCore::JSHTMLDocument::open):
1086         * dom/DOMImplementation.cpp:
1087         (WebCore::DOMImplementation::createHTMLDocument):
1088         * dom/Document.cpp:
1089         (WebCore::Document::recalcStyle):
1090         (WebCore::Document::open):
1091         (WebCore::Document::write):
1092         (WebCore::Document::clear):
1093         * dom/Document.h:
1094         * history/HistoryItem.cpp:
1095         (WebCore::HistoryItem::HistoryItem):
1096         * history/HistoryItem.h:
1097         * loader/FrameLoader.cpp:
1098         (WebCore::FrameLoader::didExplicitOpen):
1099         (WebCore::FrameLoader::load):
1100         (WebCore::FrameLoader::reloadAllowingStaleData):
1101         (WebCore::FrameLoader::reload):
1102         (WebCore::FrameLoader::tokenizerProcessedData):
1103         (WebCore::FrameLoader::post):
1104         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1105         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
1106         (WebCore::FrameLoader::loadItem):
1107         * loader/FrameLoader.h:
1108         * platform/text/CharacterNames.h:
1109         * xml/DOMParser.cpp:
1110         (WebCore::DOMParser::parseFromString):
1111         * xml/XMLHttpRequest.cpp:
1112         (WebCore::XMLHttpRequest::getResponseXML):
1113         * xml/XSLTProcessor.cpp:
1114         (WebCore::XSLTProcessor::createDocumentFromSource):
1115
1116 2008-01-31  Matt Lilek  <webkit@mattlilek.com>
1117
1118         Reviewed by Tim Hatcher.
1119
1120         Bug 14960: Cannot copy text in Web Inspector Network panel
1121         http://bugs.webkit.org/show_bug.cgi?id=14960
1122
1123         * page/inspector/inspector.css:
1124
1125 2008-01-31  Matt Lilek  <webkit@mattlilek.com>
1126
1127         Reviewed by Adam Roben.
1128
1129         Bug 14514: Add full URL view on mouseOver in the network page
1130         http://bugs.webkit.org/show_bug.cgi?id=14514
1131         <rdar://problem/5712841>
1132
1133         * page/inspector/inspector.js:
1134
1135 2008-01-31  Alp Toker  <alp@atoker.com>
1136
1137         Rubber-stamped Adam Roben.
1138
1139         http://bugs.webkit.org/show_bug.cgi?id=17006
1140         [GTK] Header path should be webkit/webkit.h
1141
1142         Move the GTK+ API sources as needed and update the build systems.
1143
1144         * GNUmakefile.am:
1145         * WebCore.pro:
1146
1147 2008-01-31  Sam Weinig  <sam@webkit.org>
1148
1149         Reviewed by Geoff Garen.
1150
1151         No need to get the prototype just to compare compare property names.
1152
1153         * bindings/js/JSHistoryCustom.cpp:
1154         (WebCore::JSHistory::customGetOwnPropertySlot):
1155
1156 2008-01-31  Sam Weinig  <sam@webkit.org>
1157
1158         Fix non-mac builds.
1159
1160         * GNUmakefile.am:
1161         * WebCore.pro:
1162         * WebCore.vcproj/WebCore.vcproj:
1163         * WebCoreSources.bkl:
1164
1165 2008-01-31  David Hyatt  <hyatt@apple.com>
1166
1167         Fix for bug 17101.
1168
1169         List items need to ignore the line box shrinking quirk, since IE and Firefox both do.
1170
1171         Reviewed by Eric
1172
1173         fast/lists/list-item-line-height.html
1174
1175         * rendering/InlineFlowBox.h:
1176         (WebCore::InlineFlowBox::InlineFlowBox):
1177
1178 2008-01-31  Samuel Weinig  <sam@webkit.org>
1179
1180         Reviewed by Darin Adler.
1181
1182         Fix for <rdar://problem/5708993> Mutability of the History object
1183
1184         - Don't allow cross-domain get access to any of the history objects properties
1185           except the back(), forward() and go() methods.
1186         - Don't allow cross-domain put access to any of the history objects properties.
1187         - Don't allow cross-domain enumeration of the History or Location objects.
1188
1189         Tests: http/tests/security/cross-frame-access-history-get-override.html
1190                http/tests/security/cross-frame-access-history-get.html
1191                http/tests/security/cross-frame-access-history-put.html
1192
1193         * WebCore.xcodeproj/project.pbxproj:
1194         * bindings/js/JSDOMWindowCustom.cpp: Remove unnessary KJS::'s
1195         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1196         (WebCore::JSDOMWindow::customPut):
1197         (WebCore::JSDOMWindow::getPropertyNames): Moved implementation from KJS::Window now that the declaration is autogenerated
1198         using the new CustomGetPropertyNames.
1199         (WebCore::JSDOMWindow::postMessage):
1200
1201         * bindings/js/JSHistoryCustom.cpp: Added.
1202         (WebCore::allowsAccessFromFrame):
1203         (WebCore::JSHistory::customGetOwnPropertySlot): Only allow getting the declared functions back(), forward() and go() from cross-domain.
1204         Deny all other gets.
1205         (WebCore::JSHistory::customPut): Don't allow putting cross-domain.
1206         (WebCore::JSHistory::getPropertyNames): Don't allow enumeration cross-domain.
1207
1208         * bindings/js/JSLocation.cpp:
1209         (WebCore::allowsAccessFromFrame):
1210         (WebCore::JSLocation::getPropertyNames): Don't allow enumeration cross-domain.
1211         * bindings/js/JSLocation.h:
1212
1213         * bindings/js/kjs_window.cpp:
1214         * bindings/js/kjs_window.h:
1215
1216         * bindings/scripts/CodeGeneratorJS.pm:
1217         Add support for new CustomGetPropertNames extended attribute and changed the logic of CustomPutFunction
1218         to create an overrided put() function even if no read-write properties exist.
1219
1220         * page/DOMWindow.idl: Added CustomGetPropertNames
1221         * page/History.idl: Added CustomGetPropertNames
1222
1223 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
1224
1225         Reviewed by Darin Adler.
1226         
1227         <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
1228
1229         * page/mac/WebCoreFrameBridge.h: Re-exposed smartInsertForString:, it's used by a WebKit method used by Mail.
1230
1231 2008-01-31  Adam Roben  <aroben@apple.com>
1232
1233         Add line box drawing code to InspectorController::drawNodeHighlight
1234
1235         This makes drawNodeHighlight a complete replacement for the painting
1236         code in WebKit/mac/WebNodeHighlightView.mm, and also brings line box
1237         rects to Windows for the first time.
1238
1239         Reviewed by Darin.
1240
1241         * dom/Node.h: Changed isSVGElement to always exist, but to only be
1242         virtual when ENABLE(SVG) is true. This way you can always call
1243         node->isSVGElement() without checking ENABLE(SVG).
1244         * page/InspectorController.cpp:
1245         (WebCore::InspectorController::drawNodeHighlight): Ported line box
1246         rect code from the Mac implementation in WebNodeHighlightView.mm.
1247
1248 2008-01-31  Adam Roben  <aroben@apple.com>
1249
1250         Put more knowledge about the node highlight in WebCore
1251
1252         InspectorController now calculates the overlay rect and node rect when
1253         drawing the node highlight instead of having them be passed in.
1254         InspectorController now holds onto the highlighted node so that it can
1255         determine these rects.
1256
1257         Once all platforms are calling down to drawNodeHighlight instead of
1258         drawing the highlight themselves, we can change
1259         InspectorClient::highlight(Node*) to something like
1260         InspectorClient::updateAndShowHighlight().
1261
1262         This also fixes Bug 14264: Node highlight makes it impossible to
1263         scroll the page
1264         <http://bugs.webkit.org/show_bug.cgi?id=14264>
1265         <rdar://5712788>
1266
1267         Reviewed by Darin.
1268
1269         * page/InspectorController.cpp:
1270         (WebCore::InspectorController::highlight): Store the node for use in
1271         drawNodeHighlight.
1272         (WebCore::InspectorController::drawNodeHighlight): Changed to be a
1273         const instance method. Now calculates the overlay rect and node rect
1274         instead of having them passed in.
1275         * page/InspectorController.h:
1276
1277 2008-01-31  Adam Roben  <aroben@apple.com>
1278
1279         Add node highlight drawing code to InspectorController
1280
1281         The code came from WebKit/win/WebNodeHighlight.cpp. It's not quite as
1282         complete as the Mac implementation (in particular, it doesn't handle
1283         line-box rects), but it's a start.
1284
1285         Reviewed by Darin.
1286
1287         * page/InspectorController.cpp:
1288         (WebCore::InspectorController::drawNodeHighlight): Added.
1289         * page/InspectorController.h:
1290
1291 2008-01-31  Dan Bernstein  <mitz@apple.com>
1292
1293         Reviewed by Dave Hyatt.
1294
1295         - fix http://bugs.webkit.org/show_bug.cgi?id=17107
1296           <rdar://problem/5716722> REGRESSION (r29834): Article text on redhat.com magazine site appears to be painting twice
1297
1298         Test: fast/block/float/intruding-painted-twice.html
1299
1300         * rendering/RenderBlock.cpp:
1301         (WebCore::RenderBlock::layoutBlock): Pass 'false' for the new
1302         makeChildPaintOtherFloats parameter to addOverhangingFloats() because at
1303         this point we are only taking away floats from the child.
1304         (WebCore::RenderBlock::layoutBlockChildren): Pass 'true' for the new
1305         makeChildPaintOtherFloats parameter to addOverhangingFloats() iff the
1306         child was not laid out again. Only in that case, it may have overhanging
1307         floats that it does not paint because they used to be overhanging from
1308         the parent, but now they are not.
1309         (WebCore::RenderBlock::addOverhangingFloats): Refined the conditions for
1310         making the child paint the float: require that the float be a descendant
1311         of the child (the other case is when it intrudes into the child from
1312         another sibling) and that it does not have a layer (in which case it
1313         paints itself). In addition, do the check only if the caller passed
1314         'true' for the makeChildPaintOtherFloats parameter.
1315         * rendering/RenderBlock.h:
1316
1317 2008-01-30  Dan Bernstein  <mitz@apple.com>
1318
1319         Reviewed by Sam Weinig.
1320
1321         - change the interpretation of unicode-range values in "from-to" form
1322           to include the "to" character.
1323
1324         Test: fast/css/font-face-unicode-range.html
1325
1326         * css/CSSParser.cpp:
1327         (WebCore::CSSParser::parseFontFaceUnicodeRange):
1328         * css/CSSSegmentedFontFace.cpp:
1329         (WebCore::CSSSegmentedFontFace::overlayRange):
1330         * platform/graphics/GlyphPageTreeNode.cpp:
1331         (WebCore::GlyphPageTreeNode::initializePage):
1332         * platform/graphics/SegmentedFontData.cpp:
1333         (WebCore::SegmentedFontData::fontDataForCharacter):
1334         (WebCore::SegmentedFontData::containsCharacters):
1335
1336 2008-01-30  Dan Bernstein  <mitz@apple.com>
1337
1338         Reviewed by Darin Adler.
1339
1340         - prune references to custom fonts' SimpleFontData from the glyph page
1341           tree when they are destroyed
1342
1343         * css/CSSFontFaceSource.cpp:
1344         (WebCore::CSSFontFaceSource::pruneTable):
1345
1346 2008-01-30  Darin Adler  <darin@apple.com>
1347
1348         Reviewed by Tim Hatcher.
1349
1350         New fix for <rdar://problem/5688428> Reproducible assertion failure
1351         in SQLTransaction::performNextStep() (16876)
1352
1353         Fixes a deadlock that was happening for all Database use. All
1354         storage layout tests pass.
1355
1356         * storage/Database.cpp:
1357         (WebCore::CurrentThreadSetter::CurrentThreadSetter): New helper class
1358         to set the current thread and zero it on destruction.
1359         (WebCore::CurrentThreadSetter::~CurrentThreadSetter): Set threadIdentifierStorage to 0.
1360         (WebCore::Database::Database): Set m_transactionStepThread to 0.
1361         (WebCore::Database::performTransactionStep): Set m_transactionStepThread to currentThread().
1362         (WebCore::Database::scheduleTransactionCallback): Assert m_transactionStepThread
1363         is currentThread().
1364         * storage/Database.h: Add m_transactionStepThread for debug builds
1365         to track which thread performTransactionStep() was called on. 
1366
1367 2008-01-30  Timothy Hatcher  <timothy@apple.com>
1368
1369         Reviewed by Darin Adler.
1370
1371         ASSERTION FAILED: JSLock::lockCount() > 0 when opening the
1372         Web Inspector on a page with a Database.
1373
1374         Fix the ASSERT by taking a JSLock before calling toJS().
1375
1376         * page/InspectorController.cpp:
1377         (WebCore::InspectorController::addDatabaseScriptResource):
1378
1379 2008-01-30  Beth Dakin  <bdakin@apple.com>
1380
1381         Reviewed by Darin.
1382
1383         Fix for <rdar://problem/5598609> CrashTracer: [USER] 626 crashes in 
1384         Safari at com.apple.WebCore: WebCore::FrameView::needsFullRepaint 
1385         const + 6
1386
1387         The real problem here is tracked by rdar://5598072, which is that 
1388         frames can lose sync between their view and their document when a 
1389         non-HTML view is loaded (such as bookmarks view or a PDF). That can 
1390         cause this crash if the layout timer fires before things have fixed 
1391         themselves. This fix turns an ASSERT in FrameView::layout() into an 
1392         early return to cause graceful failure until the root of the 
1393         problem is addressed. 
1394
1395         * page/FrameView.cpp:
1396         (WebCore::FrameView::layout):
1397
1398 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
1399
1400         Reviewed by Darin Adler.
1401
1402         <rdar://problem/5700414> REGRESSION (Adama-ToT): Selecting "Header 1" style in Leopard Server wiki inserts newline
1403
1404         * editing/FormatBlockCommand.cpp:
1405         (WebCore::FormatBlockCommand::doApply): If the selected paragraph was empty,
1406         we may still need to call moveParagrah to remove the line break that holds that
1407         paragraph open because the new block of the requested type needs to to replace it.
1408
1409 2008-01-30  Timothy Hatcher  <timothy@apple.com>
1410
1411         Reviewed by Darin Adler.
1412
1413         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
1414
1415         Revised fix to use the globalCallbackMutex() mutex and hold the mutex
1416         for the entire function scope.
1417
1418         * storage/Database.cpp:
1419         (WebCore::Database::performTransactionStep):
1420
1421 2008-01-30  Timothy Hatcher  <timothy@apple.com>
1422
1423         Reviewed by Adam Roben.
1424
1425         Make ResourceTreeElement inherit the prototype of TreeElement.
1426
1427         * page/inspector/Resource.js:
1428
1429 2008-01-30  Sam Weinig  <sam@webkit.org>
1430
1431         Reviewed by Adam Roben.
1432
1433         Don't include SecurityOrigin.h in Document.h so that we can avoid massive
1434         recompilation when changing the SecurityOrigin.
1435
1436         * dom/Document.cpp:
1437         (WebCore::Document::setSecurityOrigin):
1438         * dom/Document.h:
1439
1440 2008-01-30  Tim Omernick  <timo@apple.com>
1441
1442         Reviewed by Tim Hatcher and Brady.
1443
1444         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
1445
1446         * storage/Database.cpp:
1447         (WebCore::Database::performTransactionStep): Do not perform the next transaction if
1448         a global callback is already scheduled.
1449
1450 2008-01-30  Jon Honeycutt  <jhoneycutt@apple.com>
1451
1452         Reviewed by Darin.
1453
1454         <rdar://problem/5669317> Crash closing pop up window with Real Player
1455         content
1456
1457         Some RealPlayer versions hang on unload. To prevent this hang, don't
1458         unload versions since the last known unloadable version.
1459         <rdar://problem/5713147> tracks revisiting this when the bug in
1460         RealPlayer is fixed and we can again unload the plug-in.
1461
1462         * plugins/win/PluginPackageWin.cpp:
1463         (WebCore::PluginPackageWin::compareFileVersion): Compare the plug-in's
1464         file version to the passed file version, returning -1, 0, or 1 if the
1465         plug-in's version is less than, equal to, or greater than the version
1466         passed.
1467         (WebCore::PluginPackageWin::isPluginBlacklisted): Use
1468         compareFileVersion()
1469         * plugins/win/PluginPackageWin.h:
1470         * plugins/win/PluginViewWin.cpp:
1471         (WebCore::PluginViewWin::determineQuirks): If the plug-in version is
1472         newer than the last-known unloadable version, add the DontUnloadPlugin
1473         quirk
1474
1475 2008-01-29  Mark Rowe  <mrowe@apple.com>
1476
1477         Reviewed by Tim Hatcher.
1478
1479         Look for headers relative to NEXT_ROOT so that build-root picks up the WebCoreSQLite
1480         version of sqlite3.h rather than the older system version.
1481
1482         * Configurations/Base.xcconfig:
1483
1484 2008-01-29  Dan Bernstein  <mitz@apple.com>
1485
1486         - build fix
1487
1488         * loader/CachedFont.cpp:
1489         (WebCore::CachedFont::CachedFont):
1490
1491 2008-01-29  Mark Rowe  <mrowe@apple.com>
1492
1493         Reviewed by Brady Eidson.
1494
1495         Add the correct directory to the header search paths in Production builds.
1496
1497         * Configurations/Base.xcconfig:
1498
1499 2008-01-29  Dan Bernstein  <mitz@apple.com>
1500
1501         Reviewed by Dave Hyatt.
1502
1503         - fix http://bugs.webkit.org/show_bug.cgi?id=17085
1504           <rdar://problem/5714136> REGRESSION (r29839): All remote fonts are treated as SVG fonts
1505
1506         Test: fast/css/font-face-remote.html
1507
1508         Added an isSVGFont method to CachedFont and use it to decide how to
1509         process the font data. Currently whether the data is SVG is determined
1510         based on the format property in the @font-face rule, but in the future
1511         the MIME type or other metadata may be used when the format is
1512         unspecified.
1513
1514         * css/CSSFontFaceSource.cpp:
1515         (WebCore::CSSFontFaceSource::getFontData): Changed to parse the data as
1516         SVG only if the CachedFont is an SVG font.
1517         * css/CSSFontSelector.cpp:
1518         (WebCore::CSSFontSelector::addFontFaceRule): Mark the CachedFont as an
1519         SVG font based on format.
1520         * loader/CachedFont.cpp:
1521         (WebCore::CachedFont::CachedFont): Initialize m_isSVGFont to false.
1522         (WebCore::CachedFont::ensureCustomFontData):
1523         (WebCore::CachedFont::ensureSVGFontData):
1524         (WebCore::CachedFont::getSVGFontById):
1525         * loader/CachedFont.h:
1526         (WebCore::CachedFont::isSVGFont): Added.
1527         (WebCore::CachedFont::setSVGFont): Added.
1528
1529 2008-01-29  Antti Koivisto  <antti@apple.com>
1530
1531         Some comment cleanup.
1532
1533         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1534         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
1535         * platform/graphics/win/QTMovieWin.cpp:
1536         (QTMovieWin::load):
1537         (QTMovieWin::disableUnsupportedTracks):
1538
1539 2008-01-29  Adele Peterson  <adele@apple.com>
1540
1541         Reviewed by Antti.
1542
1543         Fix for <rdar://5683527> media/{audio,video|-controls-rendering.html failing
1544         
1545         * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled):
1546         Don't treat all media controls as styled.  This causes builds with an old version of SafariTheme to have different metrics for these controls.
1547
1548 2008-01-29  Dan Bernstein  <mitz@apple.com>
1549
1550         Reviewed by Dave Hyatt.
1551
1552         - make Font instances cache their primary font
1553
1554         * WebCore.base.exp:
1555         * platform/graphics/Font.cpp:
1556         (WebCore::Font::Font):
1557         (WebCore::Font::operator=):
1558         (WebCore::Font::cachePrimaryFont):
1559         (WebCore::Font::update):
1560         * platform/graphics/Font.h:
1561         (WebCore::Font::primaryFont):
1562
1563 2008-01-29  Dan Bernstein  <mitz@apple.com>
1564
1565         - Leopard build fix
1566
1567         * platform/graphics/SimpleFontData.cpp:
1568         (WebCore::SimpleFontData::SimpleFontData):
1569
1570 2008-01-29  Mark Rowe  <mrowe@apple.com>
1571
1572         Reviewed by Tim Hatcher.
1573
1574         <rdar://problem/5600926> WebCore on Tiger must link to its own copy of SQLite 3.4 or newer (so HTML database behavior will be correct).
1575
1576         * Configurations/Base.xcconfig: Update the header search path on Tiger.
1577         * Configurations/DebugRelease.xcconfig: Update the header search path on Tiger.
1578         * Configurations/WebCore.xcconfig: Link against libWebCoreSQLite3.a when building on Tiger.
1579         * WebCore.xcodeproj/project.pbxproj: Update the header search path in Production builds on Tiger.
1580
1581 2008-01-29  Dan Bernstein  <mitz@apple.com>
1582
1583         Reviewed by Adam Roben and Oliver Hunt.
1584
1585         - fix <rdar://problem/5713131> REGRESSION (r29246): Many SVG font tests are failing
1586
1587         * platform/graphics/SimpleFontData.cpp:
1588         (WebCore::SimpleFontData::SimpleFontData): Use double instead of float
1589         for consistent rounding behavior between Mac OS X and Windows.
1590
1591 2008-01-29  Adam Roben  <aroben@apple.com>
1592
1593         Fix <rdar://5713302> Web Inspector on Windows is not using the
1594         localized strings
1595
1596         Reviewed by Steve.
1597
1598         * WebCore.vcproj/WebCore.vcproj: Copy InspectorLocalizedStrings.js to
1599         $WebKitOutputDir.
1600         * page/InspectorController.cpp: Touch this to force the project to
1601         build.
1602
1603 2008-01-29  Eric Seidel  <eric@webkit.org>
1604
1605         Reviewed by Nikolas.
1606
1607         Acid3 after double-attach
1608         http://bugs.webkit.org/show_bug.cgi?id=17058
1609         
1610         I believe SVGTextPathElement::buildPendingResource() was entirely
1611         bogus, removing it did not cause any tests to fail.
1612
1613         Test: svg/custom/textPath-assert.svg
1614
1615         * svg/SVGTextPathElement.cpp:
1616         (WebCore::SVGTextPathElement::insertedIntoDocument): remove buildPendingResource()
1617         * svg/SVGTextPathElement.h:
1618
1619 2008-01-29  Adam Roben  <aroben@apple.com>
1620
1621         Fix Bug 16234: Inspector should support searching for elements by CSS selectors
1622
1623         <http://bugs.webkit.org/show_bugs.cgi?id=16234>
1624         <rdar://5712862>
1625
1626         Reviewed by Tim.
1627
1628         * page/inspector/inspector.js: Use Document.querySelectorAll to search
1629         for elements by CSS selector. Also store a custom property on nodes
1630         being added to the search results to avoid showing the same node more
1631         than once.
1632
1633 2008-01-29  Adam Roben  <aroben@apple.com>
1634
1635         Fix <rdar://5711136> Full-screen Flash on 1up.com is unresponsive
1636
1637         Reviewed by Anders and Darin.
1638
1639         No test possible.
1640
1641         * plugins/win/PluginViewWin.cpp:
1642         (WebCore::PluginViewWin::wndProc): Set/release capture on mouse
1643         down/up, like Firefox does.
1644
1645 2008-01-28  Dan Bernstein  <mitz@apple.com>
1646
1647         Reviewed by Sam Weinig.
1648
1649         - make isSVGFont non-virtual
1650
1651         * platform/graphics/FontData.h:
1652         * platform/graphics/SegmentedFontData.cpp:
1653         * platform/graphics/SegmentedFontData.h:
1654         * platform/graphics/SimpleFontData.h:
1655         (WebCore::SimpleFontData::isSVGFont):
1656
1657 2008-01-28  Dan Bernstein  <mitz@apple.com>
1658
1659         Reviewed by Adam Roben.
1660
1661         - fix <rdar://problem/5700824> Chunky scrolling + scrolling artifacts @ netflix.com/Notebook
1662
1663         * platform/win/ScrollViewWin.cpp:
1664         (WebCore::ScrollView::ScrollViewPrivate::valueChanged): Send the scroll
1665         event before updating the window, thus giving event handlers a chance
1666         to update layout for the new scroll position, eliminating the jitter.
1667
1668 2008-01-28  Adam Roben  <aroben@apple.com>
1669
1670         Fix <rdar://5555260> Gmail doesn't load when a user stylesheet is specified
1671
1672         Reviewed by Darin.
1673
1674         A null value exception was being thrown in Gmail's JS code because a
1675         call to document.write failed. document.write failed because
1676         Document::close had not yet been called. Document::close was not
1677         called because the Document was considered to not be "complete" in
1678         FrameLoader::checkComplete because the user stylesheet was in the
1679         process of loading. The user stylesheet was loading because it had
1680         previously been evicted from the cache and was loading fresh from
1681         disk. It had been evicted from the cache because the calculation of
1682         the expiration date was incorrectly casting/overflowing in
1683         ResourceResponseCFNet.cpp.
1684
1685         We now calculate the expiration date in a way that does not cause us
1686         to overflow a time_t, and we correctly clamp the value to the range of
1687         a time_t. I also made the fix for the last modified date, though that
1688         was not causing any bug I am aware of.
1689
1690         In the long-term it seems like whether or not Document::close is
1691         called should not be dependent upon whether the user stylesheet has
1692         finished loading or not.
1693
1694         * platform/network/cf/ResourceResponseCFNet.cpp:
1695         (WebCore::toTimeT): Added. Converts from CFAbsoluteTime to time_t and
1696         clamps to the range of time_t.
1697         (WebCore::ResourceResponse::doUpdateResourceResponse): Call toTimeT.
1698
1699 2008-01-28  Dan Bernstein  <mitz@apple.com>
1700
1701         Reviewed by Nikolas Zimmermann.
1702
1703         - fix leaks introduced in r29838
1704
1705         * svg/SVGFont.cpp:
1706         (WebCore::floatWidthMissingGlyphCallback):
1707         (WebCore::drawTextMissingGlyphCallback):
1708
1709 2008-01-28  Nikolas Zimmermann  <zimmermann@kde.org>
1710
1711         Reviewed by Eric, Dan & Oliver.
1712
1713         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16980
1714
1715         Support external SVG Fonts, by reusing the custom font handling logic.
1716         This enables us - as first engine - to render HTML pages using SVG Fonts.
1717
1718         Fixes fonts-elem-03-b.svg / fonts-elem-04-b.svg / fonts-elem-07-b.svg
1719         Add new testcase svg-fonts-in-html.html.
1720
1721         * css/CSSFontFaceSource.cpp:
1722         (WebCore::CSSFontFaceSource::getFontData):
1723         * css/CSSFontFaceSource.h:
1724         * css/CSSFontFaceSrcValue.cpp:
1725         (WebCore::CSSFontFaceSrcValue::isSVGFontFaceSrc):
1726         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
1727         * css/CSSFontFaceSrcValue.h:
1728         * css/CSSFontSelector.cpp:
1729         (WebCore::CSSFontSelector::addFontFaceRule):
1730         * loader/CachedFont.cpp:
1731         (WebCore::CachedFont::~CachedFont):
1732         (WebCore::CachedFont::ensureSVGFontData):
1733         (WebCore::CachedFont::extractFontFromSVGData):
1734         (WebCore::CachedFont::platformDataFromSVGData):
1735         * loader/CachedFont.h:
1736         * platform/graphics/Font.cpp:
1737         (WebCore::Font::offsetForPosition):
1738         * platform/graphics/Font.h:
1739         * svg/SVGFont.cpp:
1740         (WebCore::floatWidthOfSubStringUsingSVGFont):
1741         (WebCore::Font::drawTextUsingSVGFont):
1742         (WebCore::Font::offsetForPositionForTextUsingSVGFont):
1743         * svg/SVGFontFaceElement.cpp:
1744         (WebCore::SVGFontFaceElement::rebuildFontFace):
1745         * svg/SVGFontFaceElement.h:
1746         * svg/SVGFontFaceUriElement.cpp:
1747         (WebCore::SVGFontFaceUriElement::srcValue):
1748
1749 2008-01-28  Dan Bernstein  <mitz@apple.com>
1750
1751         Reviewed by Adam Roben.
1752
1753         - fix svg/W3C-SVG-1.1/fonts-glyph-04-t.svg failure on Windows
1754
1755         The results differed between Mac OS X and Windows because the code was
1756         using a 0-size font, which Mac OS X changes to 12pt.
1757
1758         * svg/SVGFont.cpp:
1759         (WebCore::floatWidthMissingGlyphCallback): Use the font description of
1760         the primary font to initialize the fallback font.
1761         (WebCore::drawTextMissingGlyphCallback): Ditto.
1762
1763 2008-01-28  Eric Seidel  <eric@webkit.org>
1764
1765         Reviewed by Nikolas Zimmermann.
1766
1767         Use class instead of struct to appease MSVC.
1768
1769         * history/HistoryItem.h:
1770         * loader/FrameLoaderClient.h:
1771         * page/InspectorController.h:
1772         * platform/network/ResourceRequestBase.h:
1773         * platform/network/mac/ResourceRequest.h:
1774
1775 2008-01-28  Dan Bernstein  <mitz@apple.com>
1776
1777         Reviewed by Darin Adler.
1778
1779         - fix http://bugs.webkit.org/show_bug.cgi?id=16774
1780           REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button
1781
1782         Test: fast/dynamic/float-no-longer-overhanging.html
1783
1784         * rendering/RenderBlock.cpp:
1785         (WebCore::RenderBlock::addOverhangingFloats): If a child's float turns
1786         out not to be overhanging at this time, ensure that the child paints it.
1787
1788 2008-01-28  Oliver Hunt  <oliver@apple.com>
1789
1790         More wx fixes
1791
1792         * platform/graphics/wx/AffineTransformWx.cpp:
1793
1794 2008-01-28  Oliver Hunt  <oliver@apple.com>
1795
1796         And another Wx build fix
1797
1798         * platform/graphics/wx/AffineTransformWx.cpp:
1799         (WebCore::AffineTransform::mapRect):
1800
1801 2008-01-28  Oliver Hunt  <oliver@apple.com>
1802
1803         Yet another Wx build fix
1804
1805         * platform/graphics/wx/GraphicsContextWx.cpp:
1806
1807 2008-01-28  Oliver Hunt  <oliver@apple.com>
1808
1809         Wx build fix
1810
1811         * platform/graphics/wx/GraphicsContextWx.cpp:
1812         (WebCore::GraphicsContext::getCTM):
1813
1814 2008-01-28  Oliver Hunt  <oliver@apple.com>
1815
1816         Gtk build fix
1817
1818         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1819
1820 2008-01-27  Oliver Hunt  <oliver@apple.com>
1821
1822         Reviewed by Sam Weinig.
1823
1824         Bug 16629: <canvas> does not support isPointInPath()
1825
1826         Relatively trivial change to implement pointInPath and add
1827         it to the bindings.  Most of this patch is the addition of
1828         GraphicsContext::getCTM() by pulling the various platform
1829         implementations from CanvasRenderingContext2D::willDraw
1830
1831         Test: fast/canvas/pointInPath.html
1832
1833         * html/CanvasRenderingContext2D.cpp:
1834         (WebCore::CanvasRenderingContext2D::isPointInPath):
1835         (WebCore::CanvasRenderingContext2D::willDraw):
1836         * html/CanvasRenderingContext2D.h:
1837         * html/CanvasRenderingContext2D.idl:
1838         * platform/graphics/AffineTransform.cpp:
1839         (WebCore::AffineTransform::mapPoint):
1840           Support mapping of FloatRects
1841         * platform/graphics/AffineTransform.h:
1842         * platform/graphics/GraphicsContext.h:
1843         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1844         (WebCore::GraphicsContext::getCTM):
1845         * platform/graphics/cg/GraphicsContextCG.cpp:
1846         (WebCore::GraphicsContext::getCTM):
1847         * platform/graphics/qt/GraphicsContextQt.cpp:
1848         (WebCore::GraphicsContext::getCTM):
1849
1850 2008-01-27  Alexey Proskuryakov  <ap@webkit.org>
1851
1852         Reviewed by Darin.
1853
1854         http://bugs.webkit.org/show_bug.cgi?id=17014
1855         REGRESSION: EUC-CN code A3A0 is mapped to U+E5E5 instead of U+3000
1856
1857         Test: fast/encoding/char-decoding.html
1858
1859         * platform/text/TextCodecICU.cpp:
1860         (WebCore::TextCodecICU::decode): Added a workaround that we used to have in Mac code.
1861
1862         * platform/text/mac/TextCodecMac.cpp:
1863         (WebCore::TextCodecMac::decode): Corrected a comment.
1864
1865 2008-01-27  Alp Toker  <alp@atoker.com>
1866
1867         Reviewed by Mark Rowe.
1868
1869         http://bugs.webkit.org/show_bug.cgi?id=17029
1870         Use of deprecated class function but declares GTK_DISABLE_DEPRECATED
1871
1872         Sync gtkdrawing.h (1.51) and gtk2drawing.c (1.71) from Mozilla
1873         upstream.
1874
1875         Adapt RenderThemeGtk.cpp to track minor changes.
1876
1877         * platform/gtk/RenderThemeGtk.cpp:
1878         (WebCore::gtkTextDirection):
1879         (WebCore::adjustMozStyle):
1880         (WebCore::setMozState):
1881         (WebCore::paintMozWidget):
1882         * platform/gtk/gtk2drawing.c:
1883         (setup_widget_prototype):
1884         (ensure_hpaned_widget):
1885         (ensure_vpaned_widget):
1886         (ensure_toggle_button_widget):
1887         (ensure_combo_box_entry_widget):
1888         (ensure_dropdown_entry_widget):
1889         (moz_gtk_get_dropdown_button):
1890         (ensure_arrow_widget):
1891         (ensure_toolbar_separator_widget):
1892         (ensure_statusbar_widget):
1893         (ensure_frame_widget):
1894         (ensure_menu_separator_widget):
1895         (ensure_tree_view_widget):
1896         (ensure_tree_header_cell_widget):
1897         (ensure_expander_widget):
1898         (ConvertGtkState):
1899         (moz_gtk_button_paint):
1900         (moz_gtk_widget_get_focus):
1901         (moz_gtk_splitter_get_metrics):
1902         (moz_gtk_toggle_paint):
1903         (moz_gtk_scrollbar_button_paint):
1904         (moz_gtk_scrollbar_trough_paint):
1905         (moz_gtk_scrollbar_thumb_paint):
1906         (moz_gtk_spin_paint):
1907         (moz_gtk_spin_updown_paint):
1908         (moz_gtk_scale_paint):
1909         (moz_gtk_scale_thumb_paint):
1910         (moz_gtk_gripper_paint):
1911         (moz_gtk_hpaned_paint):
1912         (moz_gtk_vpaned_paint):
1913         (moz_gtk_entry_paint):
1914         (moz_gtk_treeview_paint):
1915         (moz_gtk_tree_header_cell_paint):
1916         (moz_gtk_tree_header_sort_arrow_paint):
1917         (moz_gtk_treeview_expander_paint):
1918         (moz_gtk_expander_paint):
1919         (moz_gtk_option_menu_paint):
1920         (moz_gtk_downarrow_paint):
1921         (moz_gtk_dropdown_arrow_paint):
1922         (moz_gtk_container_paint):
1923         (moz_gtk_toggle_label_paint):
1924         (moz_gtk_toolbar_paint):
1925         (moz_gtk_toolbar_separator_paint):
1926         (moz_gtk_tooltip_paint):
1927         (moz_gtk_resizer_paint):
1928         (moz_gtk_frame_paint):
1929         (moz_gtk_progressbar_paint):
1930         (moz_gtk_progress_chunk_paint):
1931         (moz_gtk_get_tab_thickness):
1932         (moz_gtk_tab_paint):
1933         (moz_gtk_tabpanels_paint):
1934         (moz_gtk_menu_bar_paint):
1935         (moz_gtk_menu_popup_paint):
1936         (moz_gtk_menu_separator_paint):
1937         (moz_gtk_menu_item_paint):
1938         (moz_gtk_menu_arrow_paint):
1939         (moz_gtk_check_menu_item_paint):
1940         (moz_gtk_window_paint):
1941         (moz_gtk_get_widget_border):
1942         (moz_gtk_get_dropdown_arrow_size):
1943         (moz_gtk_get_toolbar_separator_width):
1944         (moz_gtk_get_expander_size):
1945         (moz_gtk_get_treeview_expander_size):
1946         (moz_gtk_get_menu_separator_height):
1947         (moz_gtk_widget_paint):
1948         (moz_gtk_shutdown):
1949         * platform/gtk/gtkdrawing.h:
1950
1951 2008-01-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1952
1953         Reviewed by Alp Toker.
1954
1955         http://bugs.webkit.org/show_bug.cgi?id=14811
1956         [gtk] [request] add a webkit_gtk_page_go_to_history_item function
1957
1958         Added webkit/gtk webkitwebbackforwardlist and webkitwebhistoryitem
1959
1960         * WebCore.pro:
1961
1962 2008-01-27  Matt Perry  <mpComplete@gmail.com>
1963
1964         Reviewed and tweaked quite a bit by Darin.
1965
1966         Fix for http://bugs.webkit.org/show_bug.cgi?id=14959
1967         No back forward entry added for pages created in javascript
1968
1969         A new HistoryItem is created for calls to Document::open. Calls to
1970         Document::write save the written data to a SharedBuffer that is also
1971         stored on the HistoryItem. When the user navigates back to a
1972         HistoryItem that has a valid buffer, that data is used for the page
1973         content.
1974
1975         Tests: http/tests/navigation/document-open-adds-history-item.html
1976                http/tests/navigation/document-open-delayed-adds-history-item.html
1977                http/tests/navigation/document-open-new-window-adds-history-item.html
1978                http/tests/navigation/document-open-replace-no-history-item.html
1979
1980         * bindings/js/JSHTMLDocumentCustom.cpp:
1981         (WebCore::JSHTMLDocument::open): Pass a MIME type of either "text/html" or
1982         "text/plain" and a boolean for "replace" in rather than always setting replace
1983         to true and the MIME type to "text/html".
1984
1985         * dom/DOMImplementation.cpp:
1986         (WebCore::DOMImplementation::createHTMLDocument): Pass in MIME type and
1987         replace boolean explicitly, since we don't want to rely on Document::open()'s
1988         default.
1989
1990         * dom/Document.cpp:
1991         (WebCore::Document::open): Correctly determine the "replace" boolean.
1992         Pass along the MIME type, replace boolean, and shared buffer to the
1993         frame loader's didExplicitOpen function.
1994         (WebCore::Document::write): Pass MIME type and replace boolean explicitly
1995         to the open function so we don't do treat it as replace if you write without
1996         an open. Store text written by the script so it can be used later for history.
1997         (WebCore::Document::clear): Drop the text written byt he script.
1998
1999         * dom/Document.h: Added MIME type and replace boolean parameters for open.
2000         Had to keep the old version for the sake of DOM bindings. Added the shared
2001         buffer used for text written by script.
2002
2003         * history/HistoryItem.cpp:
2004         (WebCore::HistoryItem::HistoryItem): Copy m_substituteData.
2005         (WebCore::HistoryItem::substituteData): Added.
2006         (WebCore::HistoryItem::setSubstituteData): Added.
2007         * history/HistoryItem.h: Added m_substituteData, getter, and setter.
2008
2009         * loader/FrameLoader.cpp:
2010         (WebCore::FrameLoader::didExplicitOpen): Added code to create or update the
2011         history item, including attaching the shared buffer that will contain all
2012         the data written by script.
2013         (WebCore::FrameLoader::load): Added a SubstituteData parameter, passed through
2014         when creating the document loader.
2015         (WebCore::FrameLoader::reloadAllowingStaleData): Create the document loader
2016         with the substitute data from the current history item.
2017         (WebCore::FrameLoader::reload): Ditto.
2018         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent): If the current history
2019         item has substitute data, then consider the URL from the substitute data
2020         rather than the one in the history item itself.
2021         (WebCore::FrameLoader::loadItem): Pass in the history item's substitute data.
2022         * loader/FrameLoader.h: Added parameters to load and didExplicitOpen.
2023
2024         * platform/text/CharacterNames.h: Added byteOrderMark, and also added it under
2025         its other official name, zeroWidthNoBreakSpace.
2026
2027         * xml/DOMParser.cpp:
2028         (WebCore::DOMParser::parseFromString): Pass in MIME type and replace boolean
2029         explicitly, since we don't want to rely on Document::open()'s default.
2030         * xml/XMLHttpRequest.cpp:
2031         (WebCore::XMLHttpRequest::getResponseXML): Ditto.
2032         * xml/XSLTProcessor.cpp:
2033         (WebCore::XSLTProcessor::createDocumentFromSource): Ditto.
2034
2035 2008-01-25  Eric Seidel  <eric@webkit.org>
2036
2037         Reviewed by Sam and Darin.
2038
2039         Fire a warning shot in DeprecatedChar's direction.
2040
2041         Remove DeprecatedChar::isSpace() usage, in preparation for removing DeprecatedChar
2042         Remove a needless String -> DeprecatedString -> String conversion for <script> tags
2043
2044         * css/MediaQueryEvaluator.cpp:
2045         (WebCore::parseAspectRatio):
2046         * css/SVGCSSParser.cpp:
2047         * dom/Position.cpp:
2048         (WebCore::Position::leadingWhitespacePosition):
2049         (WebCore::Position::trailingWhitespacePosition):
2050         * editing/TextIterator.cpp:
2051         (WebCore::WordAwareIterator::advance):
2052         * html/HTMLFontElement.cpp:
2053         (WebCore::parseFontSizeNumber):
2054         * html/HTMLTokenizer.cpp:
2055         (WebCore::HTMLTokenizer::scriptHandler):
2056         (WebCore::HTMLTokenizer::scriptExecution):
2057         (WebCore::HTMLTokenizer::notifyFinished):
2058         * html/HTMLTokenizer.h:
2059         * loader/CachedCSSStyleSheet.cpp:
2060         * loader/TextResourceDecoder.cpp:
2061         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2062         * platform/mac/ClipboardMac.mm:
2063         (WebCore::ClipboardMac::getData):
2064         * platform/network/HTTPParsers.cpp:
2065         (WebCore::extractMIMETypeFromMediaType):
2066         * platform/text/PlatformString.h:
2067         * platform/text/StringImpl.cpp:
2068         (WebCore::parseLength):
2069         (WebCore::StringImpl::stripWhiteSpace):
2070         (WebCore::StringImpl::simplifyWhiteSpace):
2071         (WebCore::StringImpl::toInt):
2072         (WebCore::StringImpl::toInt64):
2073         (WebCore::StringImpl::toUInt64):
2074         * platform/text/StringImpl.h:
2075         (WebCore::isSpaceOrNewline):
2076         * rendering/InlineFlowBox.cpp:
2077         (WebCore::InlineFlowBox::placeBoxesHorizontally):
2078         * rendering/RenderBlock.cpp:
2079         (WebCore::RenderBlock::updateFirstLetter):
2080         * rendering/bidi.cpp:
2081         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
2082         * svg/SVGFontFaceElement.cpp:
2083         (WebCore::mapAttributeToCSSProperty):
2084         * svg/SVGLength.cpp:
2085         * svg/SVGStyledElement.cpp:
2086         (WebCore::mapAttributeToCSSProperty):
2087         * xml/XPathParser.cpp:
2088
2089 2008-01-25  Stephanie Lewis  <slewis@apple.com>
2090
2091         Reviewed by Tim.
2092
2093         expand workaround for <rdar://5695848> to include js files so that the
2094         web inspector can work
2095
2096         * platform/network/cf/ResourceResponseCFNet.cpp:
2097         (WebCore::ResourceResponse::doUpdateResourceResponse):
2098
2099 2008-01-25  Antti Koivisto  <antti@apple.com>
2100
2101         Reviewed by Adele.
2102         
2103         (this is for r29798, my commit failed to include the log)
2104         
2105         Windows fix to match r29773
2106         If the media is playing and the load stalls the playback wont restart by seeking backwards.      
2107
2108         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2109         (WebCore::MediaPlayerPrivate::updateStates):
2110
2111 2008-01-25  Darin Adler  <darin@apple.com>
2112
2113         Reviewed by Anders.
2114
2115         - fix <rdar://problem/5691072> ASSERTION FAILED: isPrepared() when executing an empty statement
2116
2117         For empty statements, SQLite returns 0 for the statement. We have to cope with that.
2118
2119         Test: storage/empty-statement.html
2120
2121         * platform/sql/SQLiteStatement.cpp:
2122         (WebCore::sqlite3_prepare16_v2): Added overload so we don't need an #if inside the prepare
2123         function.
2124         (WebCore::SQLiteStatement::SQLiteStatement): Initialize the m_isPrepared boolean. Removed
2125         the code to add a null character to the end of the string; instead we will use
2126         charactersWithNullTermination.
2127         (WebCore::SQLiteStatement::prepare): Set m_isPrepared based on the error value returned.
2128         Use the error value from sqlite3_prepare16_v2, not from lastError().
2129         (WebCore::SQLiteStatement::step): Assert that the statement is prepared rather than checking
2130         it at runtime. However, in the case where this is called with m_statement of 0, return
2131         success rather than an error. That's needed for empty statements.
2132         (WebCore::SQLiteStatement::finalize): Use early return idiom for clarity. When there is no
2133         statement, return SQLITE_OK instead of calling lastError().
2134         (WebCore::SQLiteStatement::reset): Use early return idiom for clarity. When there is no
2135         statement, return SQLITE_OK rather than SQLITE_ERROR, but assert the statement is prepared.
2136         (WebCore::SQLiteStatement::executeCommand): Adjust the code that does a prepare so that it
2137         will work for empty statements. Do we really need to allow calling this without prepare?
2138         It would be simpler to just be able to assert that it's prepared.
2139         (WebCore::SQLiteStatement::returnsAtLeastOneResult): Ditto.
2140         (WebCore::SQLiteStatement::bindBlob): Added some assertions. Return SQLITE_ERROR if this
2141         is called with m_statement of 0 (should not be possible without assertions firing first).
2142         Return the actual error code rather than lastError().
2143         (WebCore::SQLiteStatement::bindText): Ditto. Also simplified the special case for empty
2144         strings, since it requires any non-null pointer, not a pointer to a global zero character.
2145         (WebCore::SQLiteStatement::bindInt64): Ditto.
2146         (WebCore::SQLiteStatement::bindDouble): Ditto.
2147         (WebCore::SQLiteStatement::bindNull): Ditto.
2148         (WebCore::SQLiteStatement::bindValue): Moved default case out of the switch to take
2149         advantage of the gcc compiler warning for unhandled enum values in a switch.
2150         (WebCore::SQLiteStatement::bindParameterCount): Added assertion and code to handle the
2151         empty statement case.
2152         (WebCore::SQLiteStatement::columnCount): Added assertion and changed the code to use
2153         the early-return idiom.
2154         (WebCore::SQLiteStatement::getColumnName): Removed getColumnName16 -- we always use 16-bit
2155         characters and have no reason to ever use the 8-bit function. Added assertions about the
2156         passed-in column number. It's a little strange that this function checks the column number
2157         for too-large column numbers, but not for negative ones. I didn't change that for now.
2158         (WebCore::SQLiteStatement::getColumnText): Ditto.
2159         (WebCore::SQLiteStatement::getColumnDouble): Ditto.
2160         (WebCore::SQLiteStatement::getColumnInt): Ditto.
2161         (WebCore::SQLiteStatement::getColumnInt64): Ditto.
2162         (WebCore::SQLiteStatement::getColumnBlobAsVector): Ditto.
2163         (WebCore::SQLiteStatement::getColumnBlob): Tightened up function a bit, including use of
2164         the early-return idiom and replacing the multiple "size = 0" with a single one at the
2165         start of the function.
2166         (WebCore::SQLiteStatement::returnTextResults): Added a failure case when the prepare
2167         call doesn't work. Cleared the vector earlier to make the failure code simpler. Moved
2168         the declaration of the result boolean down lower to make it clearer what it's for.
2169         Changed use of lastError() to call on the database, to make it clearer that there's
2170         no per-statement last error kept around. It'd be even better to not use lastError() here.
2171         (WebCore::SQLiteStatement::returnIntResults): Ditto.
2172         (WebCore::SQLiteStatement::returnInt64Results): Ditto.
2173         (WebCore::SQLiteStatement::returnDoubleResults): Ditto.
2174         (WebCore::SQLiteStatement::isExpired): Changed to use || rather than ?: because I think
2175         it's slightly easier to read that way.
2176
2177         * platform/sql/SQLiteStatement.h: Removed unneeded includes and forward declarations.
2178         Also removed unnneeded functions isPrepared, getColumnName16, getColumnText16,
2179         returnTextResults16, lastError, and lastErrorMsg. Changed prepareAndStep so that it
2180         checks the result of prepare before callling step. Added a debug-only m_isPrepared boolean.
2181
2182         * loader/icon/IconDatabase.cpp:
2183         (WebCore::IconDatabase::checkIntegrity): Remove 16 suffix from text-related function names.
2184         (WebCore::IconDatabase::performURLImport): Ditto.
2185         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto.
2186         * platform/sql/SQLiteDatabase.cpp:
2187         (WebCore::SQLiteDatabase::clearAllTables): Ditto.
2188         * storage/Database.cpp:
2189         (WebCore::retrieveTextResultFromDatabase): Ditto.
2190         (WebCore::Database::performGetTableNames): Ditto.
2191         * storage/DatabaseTracker.cpp:
2192         (WebCore::DatabaseTracker::fullPathForDatabase): Ditto.
2193         (WebCore::DatabaseTracker::populateOrigins): Ditto.
2194         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
2195         (WebCore::DatabaseTracker::addDatabase): Ditto.
2196         * storage/SQLStatement.cpp:
2197         (WebCore::SQLStatement::execute): Ditto.
2198
2199         * platform/sql/SQLiteDatabase.h: Removed unneeded includes.
2200         * storage/SQLResultSet.h: Ditto.
2201         * storage/SQLResultSetRowList.h: Ditto.
2202
2203 2008-01-25  Adele Peterson  <adele@apple.com>
2204
2205         Reviewed by Sam.
2206
2207         Fix for <rdar://problem/5679452> Finish tweaking layout/alignment of media controls slider to match QuickTime plug-in
2208
2209         * css/html4.css: Add horizontal padding to the media slider.
2210         * rendering/RenderSlider.cpp:
2211         (WebCore::HTMLSliderThumbElement::defaultEventHandler): Replace use of absoluteBoundingBox() with width() and height()
2212         (WebCore::RenderSlider::positionForOffset): ditto. Also, use the trackSize() for the maximum offset.
2213         (WebCore::RenderSlider::layout):  Use contentWidth() and contentHeight() to take padding into account.
2214         (WebCore::RenderSlider::trackSize): ditto.
2215
2216 2008-01-24  Adam Roben  <aroben@apple.com>
2217
2218         Better fix for Bug 16996
2219
2220         Rubberstamped by Mitz.
2221
2222         * loader/CachedFont.cpp:
2223         (WebCore::CachedFont::ensureCustomFontData): Don't call
2224         createFontCustomPlatformData if m_data is null.
2225         * platform/graphics/gtk/FontCustomPlatformData.cpp:
2226         (WebCore::createFontCustomPlatformData): Added an assertion.
2227         * platform/graphics/mac/FontCustomPlatformData.cpp:
2228         (WebCore::createFontCustomPlatformData): Ditto.
2229         * platform/graphics/qt/FontCustomPlatformData.cpp:
2230         (WebCore::createFontCustomPlatformData): Ditto.
2231         * platform/graphics/win/FontCustomPlatformData.cpp:
2232         (WebCore::createFontCustomPlatformData): Ditto.
2233
2234 2008-01-24  Adam Roben  <aroben@apple.com>
2235
2236         Fix Bug 16996: Crash in createFontCustomPlatformData when loading
2237         0-byte font via @font-face
2238
2239         <http://bugs.webkit.org/show_bug.cgi?id=16996>
2240
2241         Reviewed by Hyatt.
2242
2243         Test: fast/loader/font-face-empty.html
2244
2245         * platform/graphics/win/FontCustomPlatformData.cpp:
2246         (WebCore::createFontCustomPlatformData): Null-check the buffer
2247         parameter.
2248
2249 2008-01-24  Jon Honeycutt  <jhoneycutt@apple.com>
2250
2251         Reviewed by Anders.
2252
2253         <rdar://problem/5588807> Crash in Flash when destroying plug-in (found
2254         using yahoo beta mail)
2255
2256         Flash can dereference NULL in the call to NPP_URLNotify if a request
2257         made with NPN_PostURLNotify fails before NPP_NewStream is called.
2258
2259         Work around this by creating a quirk, PluginQuirkFlashURLNotifyBug, and
2260         checking for this quirk before calling NPP_URLNotify for any request
2261         made with NPN_PostURLNotify. If the quirk is present, call NPP_NewStream
2262         and NPP_DestroyStream before calling NPP_URLNotify.
2263
2264         * WebCore.vcproj/WebCore.vcproj:
2265         * plugins/PluginQuirkSet.h: Added. Moved quirks out of PluginViewWin so
2266         PluginViewWin and PluginStream could share it. Created a class,
2267         PluginQuirkSet, to store plug-in quirks
2268         (WebCore::):
2269         (WebCore::PluginQuirkSet::PluginQuirkSet):
2270         (WebCore::PluginQuirkSet::add):
2271         (WebCore::PluginQuirkSet::contains):
2272         * plugins/PluginStream.cpp:
2273         (WebCore::PluginStream::PluginStream): Copy the PluginQuirkSet for this
2274         plug-in
2275         (WebCore::PluginStream::destroyStream): Check for the FlashURLNotifyBug
2276         quirk
2277         * plugins/PluginStream.h:
2278         * plugins/win/PluginViewWin.cpp:
2279         (WebCore::PluginViewWin::performRequest): Pass the quirks when creating
2280         the PluginStream
2281         (WebCore::PluginViewWin::didReceiveResponse): Same
2282         (WebCore::PluginViewWin::wndProc): Use add / contains instead of
2283         bit ops
2284         (WebCore::PluginViewWin::userAgent): Same
2285         (WebCore::PluginViewWin::invalidateRect): Same
2286         (WebCore::PluginViewWin::~PluginViewWin): Same
2287         (WebCore::PluginViewWin::determineQuirks): Same
2288         (WebCore::PluginViewWin::setParameters): Same
2289         (WebCore::PluginViewWin::PluginViewWin): Same
2290         (WebCore::PluginViewWin::init): Same
2291         (WebCore::PluginViewWin::setCallingPlugin): Same
2292         * plugins/win/PluginViewWin.h:
2293
2294 2008-01-24  David Hyatt  <hyatt@apple.com>
2295
2296         http://bugs.webkit.org/show_bug.cgi?id=16982
2297
2298         Make sure to make <head> the current block if it is created before a <body> already exists.
2299
2300         Reviewed by Dan
2301
2302         * html/HTMLParser.cpp:
2303         (WebCore::HTMLParser::createHead):
2304
2305 2008-01-24  Alexey Proskuryakov  <ap@webkit.org>
2306
2307         http://bugs.webkit.org/show_bug.cgi?id=16993
2308         <rdar://problem/5704331> REGRESSION: Loading page leads to many unexpected redirections
2309
2310         Rolled out r29590, which was not a correct fix for <rdar://problem/5692566>.
2311
2312         * loader/FrameLoader.cpp:
2313         (WebCore::FrameLoader::clear):
2314
2315 2008-01-24  Antti Koivisto  <antti@apple.com>
2316
2317         Reviewed by Adam.
2318         
2319         If the media is playing and the load stalls the playback wont restart by seeking backwards.
2320         
2321         We should be in CAN_PLAY state if the current time is less than the maximum loaded time. Rate 
2322         tricks were for streaming case and are not necessary now since that is now disabled.
2323         
2324         Windows patch coming separately.
2325
2326         Test: http/tests/media/video-play-stall-seek.html
2327
2328         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2329         (WebCore::MediaPlayerPrivate::updateStates):
2330
2331 2008-01-24  Antti Koivisto  <antti@apple.com>
2332
2333         Reviewed by Adam.
2334
2335         Fix <rdar://problem/5684815>
2336         After navigating back to the page that contains a <audio> that has been muted, the audio is still heard
2337         
2338         - get rid of the separate muted state in MediaPlayer, maintain the state in the cross platform code only
2339         - remove volumeChanged() callbacks from HTMLMediaElement and OS X MediaPlayer, they were not used for anything
2340         - rename updateMediaPlayer -> updatePlayState which tells more about what it actually does
2341
2342         * html/HTMLMediaElement.cpp:
2343         (WebCore::HTMLMediaElement::load):
2344         (WebCore::HTMLMediaElement::setReadyState):
2345         (WebCore::HTMLMediaElement::play):
2346         (WebCore::HTMLMediaElement::pause):
2347         (WebCore::HTMLMediaElement::setVolume):
2348         (WebCore::HTMLMediaElement::setMuted):
2349         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
2350         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2351         (WebCore::HTMLMediaElement::updateVolume):
2352         (WebCore::HTMLMediaElement::updatePlayState):
2353         (WebCore::HTMLMediaElement::setPausedInternal):
2354         * html/HTMLMediaElement.h:
2355         * platform/graphics/MediaPlayer.cpp:
2356         (WebCore::MediaPlayer::MediaPlayer):
2357         * platform/graphics/MediaPlayer.h:
2358         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2359         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2360         (WebCore::MediaPlayerPrivate::createQTMovie):
2361         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2362         * platform/graphics/win/QTMovieWin.cpp:
2363         * platform/graphics/win/QTMovieWin.h:
2364
2365 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2366
2367         Reviewed by Simon.
2368
2369         * Fix "QObject::startTimer: QTimer can only be used with threads started with QThread"
2370         * The JSC GCController gets automatically destructed on application exit, it will stop
2371         its timer and we try to schedule the next timer. Now the GCController can get destructed
2372         after our QApplication is gone. This will trigger the above warning, we can avoid this
2373         by checking if our qApp is still around.
2374
2375         * platform/qt/SharedTimerQt.cpp:
2376         (WebCore::setSharedTimerFireTime):
2377
2378 2008-01-24  Morten Johan Sørvig  <msorvig@trolltech.com>
2379
2380         Reviewed by Simon.
2381
2382         Qt/Mac: Make sure the scrollbars does not overlap the grow box.
2383
2384         When showing only one scrollbar we need to move it so it doesn't overlap the
2385         grow box. This is similar to the code in QAbstractScrollArea.
2386
2387
2388         * platform/qt/ScrollViewQt.cpp:
2389         (WebCore::ScrollView::updateScrollbars):
2390
2391 2008-01-15  Michael Goddard  <michael.goddard@trolltech.com>
2392
2393         Reviewed by Darin.
2394
2395         While parsing -webkit-border-image, store
2396         the border widths as naked pointers rather
2397         than as OwnPtrs, since they point to the
2398         middle of an array.
2399
2400         Test: fast/css/border-image-crash.html
2401
2402         * css/CSSParser.cpp:
2403
2404 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2405
2406         Reviewed by Simon.
2407
2408         * Attempt to fix showing of popup again after a popup has been shown but
2409         the user did not select any item (e.g. clicked outside of the popup)
2410         * Keep track of the popup status using the virtuals showPopup and hidePopup
2411         and do not go into recursion when hiding a popup.
2412
2413         * platform/qt/QWebPopup.cpp:
2414         (WebCore::QWebPopup::showPopup):
2415         (WebCore::QWebPopup::hidePopup):
2416         * platform/qt/QWebPopup.h:
2417
2418 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2419
2420         Reviewed by Simon.
2421
2422         * Assert the presence of the PopupMenuClient
2423
2424         * platform/qt/QWebPopup.cpp:
2425         (WebCore::QWebPopup::QWebPopup):
2426         (WebCore::QWebPopup::hideEvent):
2427         (WebCore::QWebPopup::activeChanged):
2428
2429 2008-01-23  David Kilzer  <ddkilzer@apple.com>
2430
2431         <rdar://problem/5702947> WebCore: CGContextDrawPDFDocument will be deprecated
2432
2433         Reviewed by Darin.
2434
2435         No test cases added since there is no change in behavior.
2436
2437         * platform/graphics/cg/PDFDocumentImage.cpp:
2438         (WebCore::PDFDocumentImage::draw): Replace CGContextDrawPDFDocument() with
2439         calls to CG methods that perform the equivalent work.
2440
2441 2008-01-23  Antti Koivisto  <antti@apple.com>
2442
2443         Reviewed by Hyatt, Adele.
2444
2445         Timers for media controls keep running when the page is in the page cache.
2446         
2447         Stop timers in RenderMedia and get rid of the controls tree when the page goes to the cache. 
2448
2449         * html/HTMLMediaElement.cpp:
2450         (WebCore::HTMLMediaElement::HTMLMediaElement):
2451         (WebCore::HTMLMediaElement::willSaveToCache):
2452         (WebCore::HTMLMediaElement::didRestoreFromCache):
2453         * html/HTMLMediaElement.h:
2454         (WebCore::HTMLMediaElement::inPageCache):
2455         * rendering/RenderMedia.cpp:
2456         (WebCore::RenderMedia::updateControls):
2457
2458 2008-01-23  Antti Koivisto  <antti@apple.com>
2459
2460         Reviewed by Adam.
2461
2462         Video that had already played to the end would start playing (from beginning) on back/forward navigation.
2463         
2464         Use setPausedInternal() instead of pause(). This avoid generating pause/play events and matches specification text.
2465
2466         * html/HTMLMediaElement.cpp:
2467         (WebCore::HTMLMediaElement::willSaveToCache):
2468
2469 2008-01-23  Alexey Proskuryakov  <ap@webkit.org>
2470
2471         Reviewed by Darin.
2472
2473         <rdar://problem/4200075> Missing support for accented chars in mailto forms
2474
2475         With some combinations of form parameters, this was resulting in regressed behavior.
2476
2477         Tests: fast/forms/mailto/get-non-ascii-text-plain-latin-1.html
2478                fast/forms/mailto/post-text-plain-with-accept-charset.html
2479                fast/forms/mailto/post-text-plain.html
2480
2481         * html/HTMLFormElement.cpp:
2482         (WebCore::HTMLFormElement::formData): Ignore accept-charset for mailto forms, which are always
2483         encoded as UTF-8.
2484         (WebCore::HTMLFormElement::isMailtoForm): Added.
2485         (WebCore::HTMLFormElement::dataEncoding): Added (factored out from formData).
2486         (WebCore::HTMLFormElement::submit): When round-tripping in text/plain case, use utf-8 encoding.
2487         * html/HTMLFormElement.h: Added a isMailtoForm() function. It may be a bit unfortunate that
2488         its result is calculated repeatedly, but this doesn't seem to be anywhere near hot code.
2489
2490 2008-01-22  Justin Garcia  <justin.garcia@apple.com>
2491
2492         Reviewed by Alice Liu.
2493
2494         <rdar://problem/5658727> Undo/redo for pasted or typed text in yahoo mail becomes disabled after one round of being selected
2495
2496         * rendering/RenderTextControl.cpp:
2497         (WebCore::RenderTextControl::updateFromElement): If value == text() and
2498         m_innerText is empty, then value and text() are "". In that case both DOM 
2499         mutations are no-ops and there is no reason to clear the Undo stack.
2500
2501 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
2502
2503         <rdar://problem/5698732> Copyright strings should include 2008
2504
2505         Reviewed by Sam.
2506
2507         * WebCore.vcproj/QTMovieWin.rc:
2508
2509 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
2510
2511         <rdar://problem/5699509> Allow file upload dialog to be localized.
2512
2513         Reviewed by Darin.
2514
2515         * platform/LocalizedStrings.h:
2516         * platform/win/FileChooserWin.cpp:
2517         (WebCore::FileChooser::openFileChooser):
2518
2519 2008-01-23  Adam Roben  <aroben@apple.com>
2520
2521         Fix behavior of type-to-select in <select> menus
2522
2523         In r27825 we started posting both a WM_KEYDOWN and WM_CHAR message
2524         whenever a key was pressed in the dropdown menu. However, since posted
2525         messages go through TranslateMessage, the WM_KEYDOWN was generating
2526         another WM_CHAR message, so two WM_CHAR messages in a row would reach
2527         the WebView. This caused the searching to happen twice for each key,
2528         so typing "dog" would search for "ddoogg".
2529
2530         Reviewed by Darin.
2531
2532         * platform/win/PopupMenuWin.cpp:
2533         (WebCore::PopupWndProc): Repost the WM_KEYDOWN message to the WebView.
2534         This is will generate a WM_CHAR message which will trigger the
2535         type-to-select behavior. This is very similar to our behavior prior to
2536         r27825, except that we're now calling PostMessage instead of
2537         SendMessage.
2538
2539 2008-01-23  Alp Toker  <alp@atoker.com>
2540
2541         Rubber-stamped by Mark Rowe.
2542
2543         Remove whitespace after -I in automake include lists.
2544
2545         * GNUmakefile.am:
2546
2547 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2548
2549         * Rubber stamped by Simon
2550
2551         * Load images incrementally. This will show warnings on the console
2552         and we want to fix them for Qt4.4. If that happens we have to remove
2553         the comment from the enum inside the ImageDecoderQt.cpp
2554
2555         * platform/graphics/qt/ImageDecoderQt.cpp:
2556         (WebCore::ImageDecoderQt::setData):
2557
2558 2008-01-23  Lars Knoll  <lars@trolltech.com>
2559
2560         Reviewed by Holger Freyther <holger.freyther@trolltech.com>.
2561
2562         Fix rendering of the Scrollbar as well as mouse handling for some styles.
2563
2564         The QStyle expects that that painter is set up to clip to the scrollbar bounds
2565         and some of the styles seem to paint somewhat outside of these bounds. Clipping to
2566         the scrollbar bounds before drawing removes some artifacts.
2567
2568         Also set m_opt.rect.topLeft to (0/0) in the mouse handlers. Fixes some issues with
2569         the oxygen style.
2570
2571
2572         * platform/qt/PlatformScrollBarQt.cpp:
2573         (WebCore::PlatformScrollbar::paint):
2574         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
2575         (WebCore::PlatformScrollbar::handleMousePressEvent):
2576
2577 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
2578
2579         Reviewed by Simon.
2580
2581         Rendering fixes for Qtopia.
2582
2583         Make the focus ring work with line breaks (until we have QPainterPath::simplify) and
2584         call QStyle with better arguments when painting themed elements.
2585
2586         * platform/graphics/qt/GraphicsContextQt.cpp:
2587         (WebCore::GraphicsContext::drawFocusRing):
2588         * platform/qt/RenderThemeQt.cpp:
2589         (WebCore::RenderThemeQt::paintButton):
2590         (WebCore::RenderThemeQt::applyTheme):
2591
2592 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2593
2594         Reviewed by Simon.
2595
2596         * FormData::flatten does not include to be uploaded files. Create our own QIODevice
2597         for the QNetworkAccessManager and feed the complete content of the FormData* to
2598         the (HTTP) backend.
2599         * Try to optimize the ::readData implementation to fill the buffer as best as possible
2600
2601         * platform/network/qt/QNetworkReplyHandler.cpp:
2602         (WebCore::FormDataIODevice::FormDataIODevice):
2603         (WebCore::FormDataIODevice::~FormDataIODevice):
2604         (WebCore::FormDataIODevice::moveToNextElement):
2605         (WebCore::FormDataIODevice::readData):
2606         (WebCore::FormDataIODevice::writeData):
2607         (WebCore::FormDataIODevice::setParent):
2608         (WebCore::FormDataIODevice::isSequential):
2609         (WebCore::FormDataIODevice::slotFinished):
2610         (WebCore::QNetworkReplyHandler::start):
2611         * platform/network/qt/QNetworkReplyHandler.h:
2612
2613 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2614
2615         Reviewed by Simon.
2616
2617         * Coding-Style fixes
2618
2619         * platform/network/qt/QNetworkReplyHandler.cpp:
2620         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2621
2622 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
2623
2624         Reviewed by Simon.
2625
2626         use PopupClient's font for popup menu. Otherwise, in Qtopia, the popup's font is much bigger (QApplication::font()?) and the text doesn't fit.
2627
2628         * platform/qt/QWebPopup.cpp:
2629         (WebCore::QWebPopup::QWebPopup):
2630
2631 2008-01-23  Simon Hausmann  <hausmann@webkit.org>
2632
2633         Reviewed by Lars.
2634
2635         Implemented FrameLoaderClient::startDownload() and FrameLoaderClient::download().
2636         
2637         Added two signals to QWebPage to handle downloading of links and handling of
2638         unsupported content.
2639         
2640
2641         * platform/network/qt/QNetworkReplyHandler.cpp:
2642         (WebCore::QNetworkReplyHandler::release):
2643         * platform/network/qt/QNetworkReplyHandler.h:
2644
2645 2008-01-22  Dan Bernstein  <mitz@apple.com>
2646
2647         Reviewed by Adele Peterson.
2648
2649         - fix http://bugs.webkit.org/show_bug.cgi?id=16905
2650           <rdar://problem/5692407> REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
2651
2652         The regression test for this is fast/css/css2-system-color.html which
2653         is currently disabled.
2654
2655         * rendering/RenderThemeMac.mm:
2656         (WebCore::menuBackgroundColor): Added. Uses HIThemeDrawMenuBackground
2657         to draw the menu item background into a bitmap graphics context and
2658         returns the color of the pixel at (0, 0).
2659         (WebCore::RenderThemeMac::systemColor): Changed to call
2660         menuBackgroundColor for the CSS2 menu color.
2661
2662 2008-01-22  Darin Adler  <darin@apple.com>
2663
2664         Reviewed by Oliver Hunt.
2665
2666         - turn full repainting back on for <canvas> until we get incremental
2667           repaint working properly
2668
2669         Ollie and I came up with a plan for testing this, but for now we should
2670         just fall back on the "repaint everything" behavior we have always had.
2671
2672         * html/HTMLCanvasElement.cpp:
2673         (WebCore::HTMLCanvasElement::willDraw): Just call repaint.
2674
2675 2008-01-22  Alp Toker  <alp@atoker.com>
2676
2677         GTK+/qmake build fix.
2678
2679         * WebCore.pro:
2680
2681 2008-01-22  Adam Roben  <aroben@apple.com>
2682
2683         Add HTMLFrameOwnerElement::scrollingMode
2684
2685         This new virtual method is overridden by HTMLFrameElementBase to
2686         provide the scrolling mode set on the frame or iframe element. Object
2687         elements always have scrolling=auto, so there's no need to override
2688         this method for HTMLPlugInElement.
2689
2690         Reviewed by Hyatt.
2691
2692         * html/HTMLFrameElementBase.h: Declare scrollingMode as virtual.
2693         * html/HTMLFrameOwnerElement.h:
2694         (WebCore::HTMLFrameOwnerElement::scrollingMode): Added.
2695
2696 2008-01-22  David Hyatt  <hyatt@apple.com>
2697
2698         Fix for <rdar://problem/5698481> REGRESSION: Web Inspector source view gutter double divider and no padding
2699
2700         Now that cellpadding cascades properly on <td>s, we need to make the view source padding rules in the user
2701         agent sheet have !important in order to override author settings.
2702
2703         Reviewed by Tim
2704
2705         * css/view-source.css:
2706
2707 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
2708
2709         Reviewed by Alp.
2710
2711         Allow to use SVGPaintServerSolid without RenderObject/RenderStyle. Used later to draw SVG Fonts in HTML.
2712
2713         * svg/graphics/SVGPaintServer.cpp:
2714         (WebCore::SVGPaintServer::sharedSolidPaintServer):
2715         * svg/graphics/SVGPaintServer.h:
2716         * svg/graphics/cg/SVGPaintServerCg.cpp:
2717         (WebCore::SVGPaintServer::renderPath):
2718         (WebCore::SVGPaintServer::fillPath):
2719         (WebCore::SVGPaintServer::clipToFillPath):
2720         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
2721         (WebCore::SVGPaintServerSolid::setup):
2722
2723 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
2724
2725         Reviewed by Alp.
2726
2727         Initialize missing variables, m_lineGap / m_lineSpacing.
2728         Only noticeable when trying to render HTML text using SVG Fonts (which is not possible with trunk, but with my local version).
2729
2730         * platform/graphics/SimpleFontData.cpp:
2731         (WebCore::SimpleFontData::SimpleFontData):
2732
2733 2008-01-22  Alp Toker  <alp@atoker.com>
2734
2735         Reviewed by Nikolas.
2736
2737         Fix Cairo SVG fonts following changes in r29700.
2738
2739         Set the font description's details as needed in FontPlatformData and
2740         eliminate GraphicsContext::setPlatformFont() since it was redundant
2741         and assumed all fonts were Cairo fonts.
2742
2743         * platform/graphics/GraphicsContext.cpp:
2744         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2745         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2746         (WebCore::FontPlatformData::FontPlatformData):
2747
2748 2008-01-22  Dan Bernstein  <mitz@apple.com>
2749  
2750          Reviewed by Eric.
2751  
2752          - fix http://bugs.webkit.org/show_bug.cgi?id=16967
2753            <rdar://problem/5699344> Reproducible crash when navigating back to a page using SVG fonts
2754  
2755          Test: svg/custom/font-platformDestroy-crash.svg
2756  
2757          * platform/graphics/SimpleFontData.cpp:
2758          (WebCore::SimpleFontData::~SimpleFontData): Changed to call
2759          platformDestroy() only if platformInit() was called from the
2760          constructor.
2761
2762 2008-01-22  Lars Knoll  <lars@trolltech.com>
2763
2764         Reviewed by Simon.
2765
2766         cleanup the CookieJarQt implementation and implement cookiesEnabled.
2767
2768         * platform/qt/CookieJarQt.cpp:
2769         (WebCore::cookieJar):
2770         (WebCore::setCookies):
2771         (WebCore::cookies):
2772         (WebCore::cookiesEnabled):
2773
2774 2008-01-22  Lars Knoll  <lars@trolltech.com>
2775
2776         Reviewed by Simon.
2777
2778         Ported the font implementation to use the new QFont features of Qt 4.4.
2779         
2780
2781         * platform/graphics/Font.h:
2782         (WebCore::Font::setWordSpacing):
2783         (WebCore::Font::setLetterSpacing):
2784         (WebCore::Font::font):
2785         (WebCore::Font::):
2786         * platform/graphics/qt/FontQt.cpp:
2787         (WebCore::Font::Font):
2788         (WebCore::Font::setWordSpacing):
2789         (WebCore::Font::setLetterSpacing):
2790         (WebCore::qstring):
2791         (WebCore::setupLayout):
2792         (WebCore::Font::drawText):
2793         (WebCore::Font::width):
2794         (WebCore::Font::floatWidth):
2795         (WebCore::Font::offsetForPosition):
2796         (WebCore::Font::selectionRectForText):
2797         (WebCore::generateComponents):
2798         (WebCore::cursorToX):
2799         (WebCore::Font::~Font):
2800         (WebCore::Font::operator=):
2801         (WebCore::Font::operator==):
2802         (WebCore::Font::update):
2803
2804 2008-01-21  Eric Seidel  <eric@webkit.org>
2805
2806         Reviewed by Nikolas & Oliver.
2807         
2808         Tested by svg/custom/svg-features.html
2809         
2810         * dom/DOMImplementation.cpp:
2811         (WebCore::isSVG10Feature): use ENABLE(SVG_*) conditionals
2812         (WebCore::isSVG11Feature): use ENABLE(SVG_*) conditionals
2813
2814 2008-01-21  Geoffrey Garen  <ggaren@apple.com>
2815
2816         Reviewed by Maciej Stachowiak.
2817
2818         Adapted WebCore to the fix for http://bugs.webkit.org/show_bug.cgi?id=16909
2819         REGRESSION: Amazon.com crash (ActivationImp)
2820
2821         * bindings/js/kjs_proxy.cpp:
2822         (WebCore::KJSProxy::~KJSProxy): No convenient way to make this assertion
2823         anymore. (It wasn't firing for anyone, anyway, so it's no big loss.)
2824
2825         * bindings/objc/WebScriptObject.mm:
2826         (+[WebScriptObject throwException:]): Use the ExecState stack, instead
2827         of currentExec.
2828         (-[WebScriptObject setException:]): ditto. Also, a slight change in
2829         behavior: If no ExecStates are active, we no longer throw an exception
2830         in the global ExecState. The JavaScriptCore ChangeLog explains why.
2831         This also matches the behavior of +throwException.
2832
2833 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2834
2835         Not reviewed. Try to fix Qt build, after the rmdir() fixes.c
2836
2837         * platform/graphics/qt/SimpleFontDataQt.cpp:
2838         (WebCore::SimpleFontData::SimpleFontData):
2839
2840 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2841
2842         Not reviewed. Another Wx build fix.
2843
2844         * platform/graphics/wx/FontWx.cpp:
2845         (WebCore::Font::drawGlyphs):
2846
2847 2008-01-21  Darin Adler  <darin@apple.com>
2848
2849         - try to fix Qt build
2850
2851         * platform/qt/FileSystemQt.cpp:
2852         (WebCore::deleteEmptyDirectory): QDir::root().rmdir() instead of QDir::rmdir().
2853
2854 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2855
2856         Not reviewed. Yet another win/gtk build fix.
2857
2858         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2859         (WebCore::FontPlatformData::FontPlatformData):
2860         * platform/graphics/win/FontWin.cpp:
2861         (WebCore::Font::drawGlyphs):
2862
2863 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2864
2865         Not reviewed. Another build fix for Gtk/Linux & Wx/Mac.
2866
2867         * platform/graphics/SimpleFontData.cpp:
2868         (WebCore::SimpleFontData::SimpleFontData):
2869
2870 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2871
2872         Not reviewed. Build fix for Qt/Gtk & Wx.
2873
2874         * css/CSSFontSelector.cpp:
2875         * platform/graphics/SegmentedFontData.cpp:
2876         (WebCore::SegmentedFontData::isSVGFont): Remove SVG_FONTS block, it's a pure virtual function in the base class.
2877         * platform/graphics/SegmentedFontData.h:
2878
2879 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2880
2881         Not reviewed. Build fix for ports that don't build SVG: wx.
2882
2883         * css/CSSFontFaceSource.h: Wrap include in ENABLE(SVG_FONTS) blocks.
2884         * css/CSSFontFaceSrcValue.h: Ditto.
2885
2886 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2887
2888         Not reviewed. Build fix for Qt/Gtk.
2889
2890         * platform/graphics/SimpleFontData.h:
2891         (WebCore::SimpleFontData::svgFontData):
2892         (WebCore::SimpleFontData::isSVGFont):
2893
2894 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
2895
2896         Reviewed by Eric. Older parts reviewed by Dan.
2897
2898         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16880 (SVGCSSFontFace should die, instead integrate within the FontCache.)
2899         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16784 (In-document fonts work only as the first child to font-face-src)
2900
2901         Proper integration of SVG Fonts within the existing custom font concept, removing the need for a custom SVGCSSFontFace.
2902         Integrate within the CSSFontFaceSource logic for caching support, as well as the framework for external SVG Fonts.
2903
2904         Proper handling of missing glyphs, using <missing-glyph> element. If that is not specified in a font, fallback to non-SVG font rendering.
2905
2906         * GNUmakefile.am:
2907         * WebCore.pro:
2908         * WebCore.vcproj/WebCore.vcproj:
2909         * WebCore.xcodeproj/project.pbxproj:
2910         * css/CSSFontFaceSource.cpp:
2911         (WebCore::CSSFontFaceSource::getFontData):
2912         * css/CSSFontFaceSource.h:
2913         (WebCore::CSSFontFaceSource::svgFontFaceElement):
2914         (WebCore::CSSFontFaceSource::setSVGFontFaceElement):
2915         * css/CSSFontFaceSrcValue.h:
2916         (WebCore::CSSFontFaceSrcValue::m_isLocal):
2917         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
2918         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
2919         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
2920         * css/CSSFontSelector.cpp:
2921         (WebCore::CSSFontSelector::addFontFaceRule):
2922         * css/SVGCSSFontFace.cpp: Removed.
2923         * css/SVGCSSFontFace.h: Removed.
2924         * platform/graphics/Font.cpp:
2925         (WebCore::Font::ascent):
2926         (WebCore::Font::descent):
2927         (WebCore::Font::lineSpacing):
2928         (WebCore::Font::xHeight):
2929         (WebCore::Font::fontSelector):
2930         * platform/graphics/Font.h:
2931         * platform/graphics/FontData.h:
2932         * platform/graphics/SegmentedFontData.cpp:
2933         (WebCore::SegmentedFontData::isSVGFont):
2934         * platform/graphics/SegmentedFontData.h:
2935         * platform/graphics/SimpleFontData.cpp:
2936         (WebCore::SimpleFontData::SimpleFontData):
2937         * platform/graphics/SimpleFontData.h:
2938         (WebCore::SimpleFontData::ascent):
2939         (WebCore::SimpleFontData::descent):
2940         (WebCore::SimpleFontData::lineSpacing):
2941         (WebCore::SimpleFontData::lineGap):
2942         (WebCore::SimpleFontData::xHeight):
2943         (WebCore::SimpleFontData::isSVGFont):
2944         (WebCore::SimpleFontData::svgFontData):
2945         * platform/graphics/gtk/FontPlatformData.h:
2946         (WebCore::FontPlatformData::size):
2947         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2948         (WebCore::FontPlatformData):
2949         * platform/graphics/mac/FontPlatformData.h:
2950         (WebCore::FontPlatformData::FontPlatformData):
2951         (WebCore::FontPlatformData::size):
2952         * platform/graphics/win/FontPlatformData.h:
2953         * platform/graphics/win/FontPlatformDataWin.cpp:
2954         (WebCore::FontPlatformData::FontPlatformData):
2955         * rendering/RenderSVGText.cpp:
2956         (WebCore::RenderSVGText::relativeBBox):
2957         * svg/SVGFont.cpp:
2958         (WebCore::convertEmUnitToPixel):
2959         (WebCore::isCompatibleGlyph):
2960         (WebCore::svgFontAndFontFaceElementForFontData):
2961         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
2962         (WebCore::SVGTextRunWalker::walk):
2963         (WebCore::floatWidthUsingSVGFontCallback):
2964         (WebCore::floatWidthMissingGlyphCallback):
2965         (WebCore::floatWidthOfSubStringUsingSVGFont):
2966         (WebCore::drawTextUsingSVGFontCallback):
2967         (WebCore::drawTextMissingGlyphCallback):
2968         (WebCore::Font::drawTextUsingSVGFont):
2969         * svg/SVGFontData.cpp: Added.
2970         (WebCore::SVGFontData::SVGFontData):
2971         (WebCore::SVGFontData::~SVGFontData):
2972         * svg/SVGFontData.h: Added.
2973         (WebCore::SVGFontData::svgFontFaceElement):
2974         (WebCore::SVGFontData::horizontalOriginX):
2975         (WebCore::SVGFontData::horizontalOriginY):
2976         (WebCore::SVGFontData::horizontalAdvanceX):
2977         (WebCore::SVGFontData::verticalOriginX):
2978         (WebCore::SVGFontData::verticalOriginY):
2979         (WebCore::SVGFontData::verticalAdvanceY):
2980         * svg/SVGFontFaceElement.cpp:
2981         (WebCore::SVGFontFaceElement::unitsPerEm):
2982         (WebCore::SVGFontFaceElement::xHeight):
2983         (WebCore::SVGFontFaceElement::horizontalOriginX):
2984         (WebCore::SVGFontFaceElement::horizontalOriginY):
2985         (WebCore::SVGFontFaceElement::horizontalAdvanceX):
2986         (WebCore::SVGFontFaceElement::verticalOriginX):
2987         (WebCore::SVGFontFaceElement::verticalOriginY):
2988         (WebCore::SVGFontFaceElement::verticalAdvanceY):
2989         (WebCore::SVGFontFaceElement::ascent):
2990         (WebCore::SVGFontFaceElement::descent):
2991         (WebCore::SVGFontFaceElement::fontFamily):
2992         (WebCore::SVGFontFaceElement::associatedFontElement):
2993         (WebCore::SVGFontFaceElement::rebuildFontFace):
2994         * svg/SVGFontFaceElement.h:
2995         * svg/SVGGlyphElement.cpp:
2996         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
2997         (WebCore::parseSVGGlyphAttribute):
2998         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
2999         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
3000         * svg/SVGGlyphElement.h:
3001         * svg/SVGMissingGlyphElement.cpp:
3002         * svg/svgattrs.in:
3003
3004 2008-01-21  Darin Adler  <darin@apple.com>
3005
3006         Reviewed by John Sullivan.
3007
3008         - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
3009
3010         - remove the default database quota setting
3011
3012         - simplify the quota-related client calls by merging the one for a new database with
3013           the one for an existing database, adding a feature where you can get details about
3014           a database being created using the same functions that work on the other databases,
3015           and removing the parameters and return values, instead having clients use a function
3016           to set the quota
3017
3018         - fix unsafe multi-thread access to the database tracker's quota map
3019         - fix bug in deleteAllDatabases where it would iterate a HashMap while modifying it
3020
3021         The tracker database is now only created when we set the quota for a database origin.
3022         Thus asking for info about databases won't cause anything to be written to disk.
3023
3024         * WebCore.base.exp: Updated.
3025
3026         * bindings/js/GCController.cpp: Added an #if to get rid of an unused function warning.
3027
3028         * page/Chrome.cpp: Removed database-related functions. There's no problem having the
3029         code deal directly with the client.
3030         * page/Chrome.h: Ditto. Also made Chrome inherit from Noncopyable.
3031
3032         * page/ChromeClient.h: Replaced the two quota-related functions with a single one.
3033         The details about the state of databases in the origin are now available by asking
3034         for database details. There's also no need to pass the security origin, since
3035         it's easy to get that from the frame's document.
3036
3037         * page/Settings.cpp: Removed the default quota setting.
3038         * page/Settings.h: Ditto.
3039
3040         * platform/FileSystem.h: Added deleteEmptyDirectory.
3041         * platform/gtk/FileSystemGtk.cpp:
3042         (WebCore::deleteEmptyDirectory): Added.
3043         * platform/posix/FileSystemPOSIX.cpp:
3044         (WebCore::deleteEmptyDirectory): Added.
3045         * platform/qt/FileSystemQt.cpp:
3046         (WebCore::deleteEmptyDirectory): Added.
3047         * platform/win/FileSystemWin.cpp:
3048         (WebCore::deleteEmptyDirectory): Added.
3049         * platform/wx/FileSystemWx.cpp:
3050         (WebCore::deleteEmptyDirectory): Added placeholder.
3051
3052         * storage/DatabaseDetails.h: Removed the isValid() function since its name is
3053         confusing -- we removed our other isValid() functions. For the few callers that
3054         need this, it's fine to just check name().isEmpty(). Made the member functions
3055         all const.
3056
3057         * storage/DatabaseTracker.cpp:
3058         (WebCore::DatabaseTracker::DatabaseTracker): Removed m_defaultQuota initialization.
3059         Added m_proposedDatabase and m_thread.
3060         (WebCore::DatabaseTracker::setDatabaseDirectoryPath): Got rid of code that would
3061         open the tracker database here. This might slightly speed up launch time, since
3062         we won't do the I/O until we have to, and before we were actually creating an SQL
3063         database in this code that's run when we go to the first webpage.
3064         (WebCore::DatabaseTracker::trackerDatabasePath): Added.
3065         (WebCore::DatabaseTracker::openTrackerDatabase): Added a boolean parameter telling
3066         this function whether to create the database. Made this function safe to call if
3067         the database is already open. Also made the function fail quietly if the path has
3068         not been set yet.
3069         (WebCore::DatabaseTracker::canEstablishDatabase): Got rid of the call to the
3070         establishEntryForOrigin function. The origin is now put in the tracker database
3071         when the quota is set to a non-zero value. When judging if there's enough space
3072         for the new database, require at least one byte even if estimatedSize is 0, and
3073         check for overflow. Also added code here to populate the origins map, which
3074         guarantees it will be ready when the database uses it on another thread later.
3075         Also changed this to call the new ChromeClient function.
3076         (WebCore::DatabaseTracker::hasEntryForDatabase): Added code to open the
3077         tracker database, since that's no longer done by setDatabaseDirectoryPath.
3078         (WebCore::DatabaseTracker::originPath): Added.
3079         (WebCore::DatabaseTracker::fullPathForDatabase): Added code so that this will
3080         return a null string for the proposed database if called from within the
3081         ChromeClient function. Also switched from empty string to null string for the
3082         error cases.
3083         (WebCore::DatabaseTracker::populateOrigins): Added code to open the tracker
3084         database.
3085         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
3086         (WebCore::DatabaseTracker::detailsForNameAndOrigin): Ditto. Also added code that
3087         will return the details of the proposed database if called from within the
3088         ChromeClient function. This is how the client can learn of the display name and
3089         the estimated size of the new database.
3090         (WebCore::DatabaseTracker::setDatabaseDetails): Added code to open the tracker
3091         database.
3092         (WebCore::DatabaseTracker::quotaForOrigin): Made this code OK to call on a non-main
3093         thread by using m_quotaMapGuard to guard access to the map. Other code runs on the
3094         main thread only, and only functions that write to the map use the lock.
3095         (WebCore::DatabaseTracker::setQuota): Changed this function so it can insert the
3096         initial quota as well as updating an existing quota. Added locking since this
3097         function modifies the quota map. Added code to open the tracker database. Added
3098         an early exit if the quota is already correct, which is guarantees that if you
3099         set a quota to 0 it won't trigger creation of a tracker database.
3100         (WebCore::DatabaseTracker::addDatabase): Added code to open the tracker database.
3101         (WebCore::DatabaseTracker::deleteAllDatabases): Made a copy of the quota map before
3102         iterating it to find all the origins. This fixes a problem with the old code where
3103         it would modify the map while iterating it, which gives assertions in debug builds
3104         and unpredictable results.
3105         (WebCore::DatabaseTracker::deleteOrigin): Replaced deleteDatabasesWithOrigin with
3106         this function. Added code to open the tracker database if needed. Added code to
3107         delete the origin from the tracker database, and to close the tracker database
3108         and delete files and directories as needed if we are deleting the final origin.
3109         (WebCore::DatabaseTracker::deleteDatabase): Added code to open the tracker database
3110         if needed.
3111
3112         * storage/DatabaseTracker.h: Renamed databasePath to databaseDirectoryPath for
3113         clarity, including the data member, and the getter and setter functions.
3114         Replaced deleteDatabasesWithOrigin with deleteOrigin. Removed the functions
3115         dealing with default origin quota. There is no default any more; origins start
3116         with no quota and the client must set a quota. Added trackerDatabasePath and
3117         originPath helper functions. Added a boolean parameter to openTrackerDatabase
3118         to tell it whether to create the database or not. Removed the
3119         establishEntryForOrigin function. Renamed m_originQuotaMap to just m_quotaMap,
3120         and added m_quotaMapGuard. Added a QuotaMap typedef. Added m_proposedDatabase,
3121         which holds the origin and details for the current proposed database during
3122         the client callback function that must decide whether to grant quota. Added a
3123         m_thread data member for debugging use to assert if functions that can only
3124         be called on a single thread are misused.
3125
3126         * storage/SQLTransaction.cpp:
3127         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Changed to call the
3128         new exceededDatabaseQuota function instead of the old one.
3129
3130         * svg/graphics/SVGImageEmptyClients.h: Updated for the change to ChromeClient.
3131
3132 2008-01-21  David Hyatt  <hyatt@apple.com>
3133
3134         Fix for http://bugs.webkit.org/show_bug.cgi?id=16935
3135
3136         Fix a bug in layers where the positioned ancestor was being computed incorrectly (the root should not
3137         automatically be included).
3138
3139         Reviewed by olliej
3140
3141         Added fast/layers/positioned-inside-root-with-margins.html
3142
3143         * rendering/RenderLayer.cpp:
3144         (WebCore::RenderLayer::stackingContext):
3145         (WebCore::RenderLayer::enclosingPositionedAncestor):
3146
3147 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
3148
3149         Reviewed by Holger.
3150
3151         Fix KURL to QUrl conversion.
3152         
3153         Stick to the encoded version of the URL and in addition to KURL we encode the
3154         characters mentioned in section 2.4.3 of RFC 2396 as QUrl requires these, too.
3155         
3156         This fixes fast/css/import-rule-regression-11590.html,
3157         fast/css/import-style-update.html, svg/hixie/processing-model/003.xml and
3158         svg/hixie/processing-model/004.xml.
3159
3160
3161         * platform/qt/KURLQt.cpp:
3162         (WebCore::toHex):
3163         (WebCore::KURL::operator QUrl):
3164
3165 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
3166
3167         Reviewed by Holger.
3168
3169         Fix focus chain handling and cycling through focusable objects (links) using tab/backtab.
3170         
3171         * Fix GraphicsContext::drawFocusRing to also draw single focus rects.
3172         * Implemented QWebPage::focusNextPrevChild by sending fake tab/shift-tab events
3173         and make the return value depend on whether we successfully determined a focusable
3174         node or not.
3175         * Changed QWebView::focusNextPrevChild() to call the base QWidget implementation correctly
3176         if we could not handle the focus chain ourselves.
3177         * Changed the focus policy of QWebView to correctly use WheelFocus instead of ClickFocus.
3178         * Made ChromeClientQt::canTakeFocus() and takeFocus() dummy method since they are only
3179         used to control the situation of stepping out of the focus chain inside the page.
3180         * Made inclusion of links in the focus chain configurable through QWebSettings::LinksIncludedInFocusChain.
3181         The layout tests expect this to be disabled but for the user it seems sensible to have it
3182         on by default, hence the default in qwebsettings.cpp
3183
3184         * platform/graphics/qt/GraphicsContextQt.cpp:
3185         (WebCore::GraphicsContext::drawFocusRing):
3186
3187 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
3188
3189         Reviewed by Holger.
3190
3191         Fix access key support and fast/forms/legend-access-key.html
3192
3193         SVN revision 26664 changed the default access key for the non-mac build to Alt
3194         while this test relies on Ctrl.
3195
3196         * page/EventHandler.cpp:
3197
3198 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
3199
3200         Reviewed by Holger.
3201
3202         Fix error reporting when parsing X(HT)ML fragments.
3203         
3204         We use the regular XMLTokenizer write()/.../end() sequence to parse those
3205         fragments, but we should not report any parsing errors inline inside the
3206         content. Instead we should just return the error and the DOM layer will take
3207         care of throwing an exception.
3208         
3209         This fixes fast/innerHTML/innerHTML-changing-document-properties.xhtml
3210         
3211
3212         * dom/XMLTokenizer.cpp:
3213         (WebCore::createXHTMLParserErrorHeader):
3214
3215 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
3216
3217         Reviewed by Simon.
3218
3219         Fix some issues with redirections.
3220         
3221         * Ensure that we deliver the response to the ResourceHandleClient only once by
3222         setting m_responseSent back to false only before calling start() for the
3223         redirection
3224         * Added 307 as another HTTP status code that causes a redirection after POST to
3225         become get, just like in MainResourceLoader::isPostOrRedirectAfterPost
3226         * Also set the HTTP method on the ResourceRequest to GET before passing it to
3227         willSendRequest.
3228         * willSendRequest's newRequest argument is actually an in/out argument and could be
3229         modified in theory, so set m_request accordingly after the call.
3230         
3231
3232         * platform/network/qt/QNetworkReplyHandler.cpp:
3233         (WebCore::QNetworkReplyHandler::finish):
3234         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3235
3236 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
3237
3238         Reviewed by Simon.
3239
3240         Fixed WebCore::cookies() to return all cookies, not only the first one.
3241         
3242         Fixes login into mail.yahoo.com.
3243         
3244
3245         * platform/qt/CookieJarQt.cpp:
3246         (WebCore::cookies):
3247
3248 2008-01-20  Oliver Hunt  <oliver@apple.com>
3249
3250         Reviewed by Mitz.
3251
3252         Fix http://bugs.webkit.org/show_bug.cgi?id=16816 , rdar://problem/5682985
3253         
3254         Correctly trigger willPerformDragDestinationAction when a drop causes a 
3255         load to occur.  The logic that originally did this was lost during the
3256         great drag migration of '07.
3257
3258         * page/DragController.cpp:
3259         (WebCore::DragController::performDrag):
3260
3261 2008-01-20  Dan Bernstein  <mitz@apple.com>
3262
3263         Reviewed by Darin Adler.
3264
3265         - fix http://bugs.webkit.org/show_bug.cgi?id=16951
3266           Assertion failure in FrameView::scheduleRelayout (!m_frame->document() || !m_frame->document()->inPageCache()) when going back from a page with a focused popup
3267
3268         * dom/Document.cpp:
3269         (WebCore::Document::setFocusedNode): Bail out if the document is in the
3270         page cache. Documents in the back/forward cache are "frozen" and should
3271         not change state.
3272
3273 2008-01-20  Collin Jackson  <webkit@collinjackson.com>
3274
3275         Reviewed by Sam Weinig.
3276
3277         Fix for http://bugs.webkit.org/show_bug.cgi?id=16775
3278
3279         We now use frame()->loader()->url() for postMessage, preventing a
3280         malicious sender from overwriting the uri property (using a <base> tag,
3281         for example). Also, use frame->loader()->url().host() instead of 
3282         instead of document()->SecurityOrigin()->domain() to reflect a recent
3283         clarification in the HTML5 spec. 
3284
3285         Tests: http/tests/security/postMessage/domain-affected-by-document-domain.html
3286                http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html
3287                http/tests/security/postMessage/javascript-page-still-sends-domain.html
3288
3289         * bindings/js/JSDOMWindowCustom.cpp:
3290         (WebCore::JSDOMWindow::postMessage):
3291
3292 2008-01-20  Antti Koivisto  <antti@apple.com>
3293
3294         Reviewed by Adele.
3295
3296         Fix <rdar://problem/5695451>
3297         Middle part of the media timeline missing on Windows if load failed
3298
3299         Add some null checking to avoid getting garbage results from the functions.
3300
3301         * platform/graphics/MediaPlayer.cpp:
3302         * platform/graphics/win/QTMovieWin.cpp:
3303         (QTMovieWin::duration):
3304         (QTMovieWin::currentTime):
3305         (QTMovieWin::setCurrentTime):
3306         (QTMovieWin::maxTimeLoaded):
3307
3308 2008-01-19  Alp Toker  <alp@atoker.com>
3309
3310         Reviewed by Mark Rowe.
3311
3312         http://bugs.webkit.org/show_bug.cgi?id=16944
3313         Use of GST_PLUGIN_DEFINE_STATIC results in a module-level constructor
3314
3315         http://bugzilla.gnome.org/show_bug.cgi?id=510547
3316         Epiphany/Webkit fails to start due to initializing threads twice
3317
3318         Don't call GST_PLUGIN_DEFINE_STATIC() as it performs g_thread_init()
3319         in the global initializer, breaking subsequent calls to
3320         g_thread_init() in applications.
3321
3322         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
3323
3324 2008-01-19  Alp Toker  <alp@atoker.com>
3325
3326         Reviewed by Mark Rowe.
3327
3328         Remove any fragment part from the URL to be requested just before
3329         passing it to curl, otherwise curl sends it as part of the HTTP/local
3330         file request, causing page loads to fail.
3331
3332         * platform/network/curl/ResourceHandleManager.cpp:
3333         (WebCore::ResourceHandleManager::startJob):
3334
3335 2008-01-19  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3336
3337         Reviewed by Alp Toker.
3338
3339         Add svg foreign object and svg experimental to the GTK+/autotools
3340         build system.
3341
3342         * GNUmakefile.am:
3343
3344 2008-01-19  Dan Bernstein  <mitz@apple.com>
3345
3346         Reviewed by Maciej Stachowiak.
3347
3348         - fix <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
3349
3350         Test: editing/selection/inconsistent-in-removeChildNode.html
3351
3352         * editing/SelectionController.cpp:
3353         (WebCore::SelectionController::nodeWillBeRemoved): If the selection
3354         base or extent are not visible any more, adjust the selection.
3355
3356 2008-01-19  Oliver Hunt  <oliver@apple.com>
3357
3358         Reviewed by Eric Seidel.
3359
3360         Build fix for --svg-foreign-object path
3361
3362         * svg/SVGForeignObjectElement.idl:
3363
3364 2008-01-18  Stephanie  <slewis@apple.com>
3365
3366         Reviewed by Oliver.
3367
3368         Workaround for <rdar://problem/5695848>.  Set mime_type for local files based on file extension. 
3369
3370         * platform/network/cf/ResourceResponseCFNet.cpp:
3371         (WebCore::ResourceResponse::doUpdateResourceResponse):
3372
3373 2008-01-18  Ada Chan  <adachan@apple.com>
3374
3375         <rdar://problem/5682340> REGRESSION (r28188): Context menu appears at wrong place when clicking in iframe whose parent is scrolled (16827)
3376         Calling absolutePosition() in EventHandler::hitTestResultAtPoint() is extremely inefficient and passing in
3377         true as fixed before was wrong.  Use HitTestResult::localPoint() instead, and take into account border and padding widths.
3378
3379         Reviewed by Hyatt and Darin.
3380
3381         * page/EventHandler.cpp:
3382         (WebCore::EventHandler::hitTestResultAtPoint):
3383         * rendering/HitTestResult.cpp:
3384         (WebCore::HitTestResult::operator=):
3385
3386 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3387
3388         Reviewed by Darin, landed by Beth.
3389
3390         - fixed http://bugs.webkit.org/show_bug.cgi?id=15765
3391
3392         The call to HTMLTokenizer::write might result in a call to ::end which will invoke
3393         HTMLParser::finished() or Document::finishedParsing(). HTMLParser::finished() will eventually
3394         call Document::finishedParsing. The Document will delete the calling HTMLTokenizer and from the deleted
3395         tokenizer we will call into FrameLoader::tokenizerProcessedData.
3396         -) FrameLoader::tokenizerProcessedData calls FrameLoader::checkCompleted which gets called from the Document::finishedParsing
3397            (FrameLoader::finishedParsing).
3398
3399         * html/HTMLTokenizer.cpp:
3400         (WebCore::HTMLTokenizer::timerFired):
3401
3402 2008-01-18  David Hyatt  <hyatt@apple.com>
3403
3404         Don't apply the border/margin/padding check to root line boxes, since their renderers
3405         are blocks.
3406
3407         * rendering/InlineFlowBox.cpp:
3408         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
3409         (WebCore::InlineFlowBox::placeBoxesVertically):
3410
3411 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
3412
3413         Not reviewed: rolling out a previous patch.
3414         
3415         Fixed <rdar://problem/5695439> Crash during GCController destructor on
3416         quitting browser
3417
3418         Used svn merge to roll out r29603 because it introduced some crashes
3419         on quit.
3420         
3421         GC relies on static hash tables, so it's not safe to GC from a static
3422         destructor, which might run after the static hash tables' destructors.
3423
3424         * bindings/js/GCController.cpp:
3425         (WebCore::GCController::garbageCollectNow):
3426         * bindings/js/GCController.h:
3427
3428 2008-01-18  David Hyatt  <hyatt@apple.com>
3429
3430         Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
3431
3432         Building on Beth's earlier work to start building line boxes for empty inlines, this patch makes more
3433         empty inline cases work.  Empty inlines on lines by themselves now set isLineEmpty to false so that
3434         bidiReorderLine will get properly called.  In addition, the "shrink boxes with no text children" quirk
3435         needs to be disabled for inlines with padding, margins or borders.
3436
3437         Reviewed by Beth
3438
3439         Added fast/inline/inline-padding-disables-text-quirk.html
3440
3441         * rendering/InlineFlowBox.cpp:
3442         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
3443         (WebCore::InlineFlowBox::placeBoxesVertically):
3444         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
3445         * rendering/RenderObject.h:
3446         (WebCore::RenderObject::hasBordersPaddingOrMargin):
3447         * rendering/bidi.cpp:
3448         (WebCore::inlineFlowRequiresLineBox):
3449         (WebCore::RenderBlock::findNextLineBreak):
3450
3451 2008-01-18  David Hyatt  <hyatt@apple.com>
3452
3453         Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
3454
3455         Computed size of padding is incorrect because we default padding to auto.  This is a made-up value that
3456         was only used to implement cellpadding on tables.  We needed this made-up value in order to tell that
3457         padding wasn't set so that we could then apply cellpadding.
3458        
3459         This patch rewrites cellpadding to be like other browsers.  Instead of being a setting on the table
3460         renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
3461         style of <td>s.  With this change it effectively becomes a content model feature and not a rendering
3462         feature.
3463
3464         For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
3465         not a table.  Anonymous cells and CSS-display-type cells will now never pick up cellpadding.  This behavior
3466         is all consistent with other browsers.
3467
3468         Reviewed by Antti
3469
3470         Added fast/css/padding-no-renderer.html
3471
3472         * css/CSSStyleSelector.cpp:
3473         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3474         (WebCore::CSSStyleSelector::styleForElement):
3475         * css/CSSStyleSelector.h:
3476         * dom/StyledElement.cpp:
3477         * dom/StyledElement.h:
3478         (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls):
3479         (WebCore::StyledElement::additionalAttributeStyleDecls):
3480         * html/HTMLTableCellElement.cpp:
3481         (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
3482         * html/HTMLTableCellElement.h:
3483         (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
3484         * html/HTMLTableColElement.cpp:
3485         (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
3486         * html/HTMLTableColElement.h:
3487         (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
3488         * html/HTMLTableElement.cpp:
3489         (WebCore::HTMLTableElement::parseMappedAttribute):
3490         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
3491         (WebCore::HTMLTableElement::addSharedCellDecls):
3492         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
3493         (WebCore::HTMLTableElement::addSharedCellPaddingDecl):
3494         (WebCore::HTMLTableElement::addSharedGroupDecls):
3495         (WebCore::HTMLTableElement::attach):
3496         * html/HTMLTableElement.h:
3497         (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
3498         * html/HTMLTableSectionElement.cpp:
3499         (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
3500         * html/HTMLTableSectionElement.h:
3501         (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
3502         * rendering/AutoTableLayout.cpp:
3503         (WebCore::AutoTableLayout::recalcColumn):
3504         * rendering/RenderObject.cpp:
3505         (WebCore::RenderObject::paddingTop):
3506         (WebCore::RenderObject::paddingBottom):
3507         (WebCore::RenderObject::paddingLeft):
3508         (WebCore::RenderObject::paddingRight):
3509         * rendering/RenderStyle.cpp:
3510         (WebCore::StyleSurroundData::StyleSurroundData):
3511         * rendering/RenderStyle.h:
3512         (WebCore::RenderStyle::initialPadding):
3513         * rendering/RenderTable.cpp:
3514         (WebCore::RenderTable::RenderTable):
3515         * rendering/RenderTable.h:
3516
3517 2008-01-18  Dan Bernstein  <mitz@apple.com>
3518
3519         Reviewed by Dave Hyatt.
3520
3521         - fix <rdar://problem/5615307> Repro crash in WebKit!WebCore::RenderContainer::destroyLeftoverChildren
3522
3523         Test: fast/table/insert-row-before-form.html
3524
3525         * rendering/RenderTableRow.cpp:
3526         (WebCore::RenderTableRow::addChild): Changed to ensure that the
3527         object a new cell is inserted before is a child of the row, and
3528         added an assertion that that object is either a cell or a form.
3529         * rendering/RenderTableSection.cpp:
3530         (WebCore::RenderTableSection::addChild): Changed to ensure that the
3531         object a new row is inserted before is a child of the table section, and
3532         added an assertion that that object is either a table row or a form.
3533
3534 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
3535
3536         Reviewed by Brady Eidson.
3537
3538         Fixed <rdar://problem/5622424> World Leak dialog when closing a page
3539         that has a Database
3540         
3541         The problem was that each transaction and SQL statement would hold on
3542         to its callback indefinitely. By design, callbacks often establish
3543         reference cycles to temporarily protect their execution environments.
3544         To break the cycle, we need to explicitly release each callback as soon
3545         as it is no longer needed.
3546
3547         * storage/SQLStatement.cpp:
3548         (WebCore::SQLStatement::performCallback): Release our callback objects
3549         after performing our callback.
3550
3551         * storage/SQLTransaction.cpp:
3552         (WebCore::SQLTransaction::postflightAndCommit): Release our callback
3553         objects after the transaction has terminated.
3554         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): ditto.
3555
3556 2008-01-18  Adele Peterson  <adele@apple.com>
3557
3558         Reviewed by Antti.
3559
3560         Fix for <rdar://problem/5679490> media controls fade in and out too jerkily and too slowly
3561
3562         * rendering/RenderMedia.cpp: Shorten the duration for the fade in/out animation.
3563
3564 2008-01-18  Beth Dakin  <bdakin@apple.com>
3565
3566         Reviewed by Oliver.
3567
3568         Disables SVG foreign object for <rdar://problem/5686989> turn off 
3569         SVG foreignobject because it does not repaint/dirty correctly
3570
3571         * DerivedSources.make:
3572         * WebCore.SVG.ForeignObject.exp: Added.
3573         * WebCore.SVG.exp:
3574         * bindings/js/JSSVGElementWrapperFactory.cpp:
3575         (WebCore::createJSSVGWrapper):
3576         * rendering/RenderForeignObject.cpp:
3577         * rendering/RenderForeignObject.h:
3578         * svg/SVGForeignObjectElement.cpp:
3579         * svg/SVGForeignObjectElement.h:
3580         * svg/SVGForeignObjectElement.idl:
3581         * svg/SVGLocatable.cpp:
3582         (WebCore::SVGLocatable::nearestViewportElement):
3583         (WebCore::SVGLocatable::farthestViewportElement):
3584         * svg/SVGUseElement.cpp:
3585         (WebCore::isDisallowedElement):
3586         * svg/svgtags.in:
3587
3588 2008-01-18  Mark Rowe  <mrowe@apple.com>
3589
3590         Rubber-stamped by Adam Roben.
3591
3592         Fix mixed line endings in FileSystemWin.cpp and set svn:eol-style to native
3593         to try and keep them consistent in the future.
3594
3595         * platform/win/FileSystemWin.cpp:
3596         (WebCore::fileSize):
3597         (WebCore::fileExists):
3598         (WebCore::deleteFile):
3599         (WebCore::pathByAppendingComponent):
3600         (WebCore::fileSystemRepresentation):
3601         (WebCore::makeAllDirectories):
3602         (WebCore::homeDirectoryPath):
3603         (WebCore::bundleName):
3604         (WebCore::storageDirectory):
3605         (WebCore::cachedStorageDirectory):
3606
3607 2008-01-18  Antti Koivisto  <antti@apple.com>
3608
3609         Reviewed by Adam.
3610
3611         Fix unreachable code warning in RenderVideo on Windows.
3612         
3613         Make switch cases explicit.
3614
3615         * rendering/RenderImage.cpp:
3616         (WebCore::RenderImage::isWidthSpecified):
3617         (WebCore::RenderImage::isHeightSpecified):
3618         * rendering/RenderVideo.cpp:
3619         (WebCore::RenderVideo::isWidthSpecified):
3620         (WebCore::RenderVideo::isHeightSpecified):
3621
3622 2008-01-18  Timothy Hatcher  <timothy@apple.com>
3623
3624         Reviewed by Adam Roben.
3625
3626         <rdar://problem/5693558> REGRESSION (r29581): no form field focus
3627         rings and inactive text selection after loading a page
3628         Bug 16910: [GTK] REGRESSION: keyboard cursor doesn't blink
3629         Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
3630
3631         * page/FocusController.cpp:
3632         (WebCore::FocusController::setActive): Use focusedOrMainFrame() instead of focusedFrame()
3633         to call selectionController()->pageActivationChanged() for cases when the focusedFrame()
3634         has not been set yet. 
3635
3636 2008-01-18  Alexey Proskuryakov  <ap@webkit.org>
3637
3638         Reviewed by Brady.
3639
3640         Database origin tracking is broken.
3641
3642         * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::populateOrigins):
3643         Move reading from statement back into the loop (broken in r29386).
3644
3645 2008-01-18  Marius Storm-Olsen  <marius@trolltech.com>
3646
3647         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3648
3649         Add use of precompiled header, when building inside Qt.
3650         
3651         Compiling WebKit was taking forever; 17 minutes on my machine for _one_ build! Adding the PCH at least brings it down to 12 minutes for one build, for me.
3652         
3653
3654         * WebCore.pro:
3655
3656 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3657
3658         Reviewed by Holger.
3659
3660         Fix fast/forms/button-state-restore.html
3661         
3662         Similar to the fix for fast/forms/form-post-urlencoded.html transform POST
3663         requests to data urls into GET.
3664         
3665
3666         * platform/network/qt/QNetworkReplyHandler.cpp:
3667         (WebCore::QNetworkReplyHandler::start):
3668
3669 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3670
3671         Reviewed by Holger.
3672
3673         Fix LayoutTests/fast/cookies/local-file-can-set-cookies.html
3674         
3675         In WebCore::cookies() don't return the full raw form but only the name=value
3676         part. This fixes the getter part of the above test. The above test also
3677         requires a parsing fix in Qt 4.4's QNetworkCookie to fully pass.
3678         
3679
3680         * platform/qt/CookieJarQt.cpp:
3681         (WebCore::cookies):
3682
3683 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3684
3685         Reviewed by Holger.
3686
3687         Fix svg/custom/path-getTotalLength.svg
3688         
3689         Path::apply creates a PathElement and its points array on the stack,
3690         to fill it in from the QPainterPath data and then use the platform
3691         independent path applier functions to calculate properties such as
3692         the length. For converting a QPainterPath::CurveToElement we need
3693         three points in the path element. However we allocated only two
3694         on the stack and as a result we got memory corruption and the
3695         failing test.
3696         
3697
3698         * platform/graphics/qt/PathQt.cpp:
3699         (WebCore::Path::apply):
3700
3701 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3702
3703         Reviewed by Holger.
3704
3705         Fix LayoutTests/fast/dom/document-attribute-js-null.html
3706         
3707         Don't crash when trying to get/set cookies without a frameloader.
3708         
3709
3710         * platform/qt/CookieJarQt.cpp:
3711         (WebCore::setCookies):
3712         (WebCore::cookies):
3713
3714 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3715
3716         Reviewed by Holger.
3717
3718         Fix fast/dom/xmlhttprequest-get.xhtml
3719         
3720         For local file requests remove the content length and the last-modified
3721         headers in the response.
3722         
3723
3724         * platform/network/qt/QNetworkReplyHandler.cpp:
3725         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3726
3727 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3728
3729         Reviewed by Holger.
3730
3731         Fix fast/forms/form-post-urlencoded.html.
3732         
3733         Post requests on files don't really make sense, but for
3734         fast/forms/form-post-urlencoded.html we still need to retrieve the file,
3735         which means we map it to a Get instead.
3736         
3737
3738         * platform/network/qt/QNetworkReplyHandler.cpp:
3739         (WebCore::QNetworkReplyHandler::start):
3740
3741 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
3742
3743         Reviewed by Holger.
3744
3745         Make QNetworkReplyHandler::abort() more robust against multiple invocations.
3746
3747         During DRT runs I see cancel() being called on the same handle multiple times. Guard
3748         against this a bit better by setting m_reply to 0 after we called abort() on it.
3749
3750         * platform/network/qt/QNetworkReplyHandler.cpp:
3751         (WebCore::QNetworkReplyHandler::abort):
3752
3753 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3754
3755         Reviewed by Simon.
3756
3757         * httpBody() can return 0 and other ports (cf/mac) check for this condition
3758         * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
3759         as well.
3760         
3761
3762         WARNING: NO TEST CASES ADDED OR CHANGED
3763
3764         * platform/network/qt/QNetworkReplyHandler.cpp:
3765         (WebCore::QNetworkReplyHandler::start):
3766
3767 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
3768
3769         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3770
3771         Fix compilation in Win64(3): Due to the size of size_t cast the return value explicitly to double() to make sure the right Value() constructor is called.
3772
3773         * xml/XPathFunctions.cpp:
3774         (WebCore::XPath::FunCount::evaluate):
3775
3776 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3777
3778         Reviewed by Simon.
3779
3780         * Remove our windowClipRect reimplementation and instead have our own
3781         Widget::invalidate implementation that is invalidating
3782         IntRect(0, 0, width(), height()) without trying to clip it (in contrast
3783         to Widget::invalidateRect)
3784
3785         * platform/qt/PlatformScrollBar.h:
3786         * platform/qt/PlatformScrollBarQt.cpp:
3787         (WebCore::PlatformScrollbar::invalidate):
3788
3789 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3790
3791         Reviewed by Simon.
3792
3793         * Change the coordinate transformation in the PlatformMouseEvent handlers
3794         * We want to convert from coordinates of the containing window to our local
3795         position on the scrollbar.
3796
3797         * platform/qt/PlatformScrollBarQt.cpp:
3798         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3799         (WebCore::PlatformScrollbar::handleMousePressEvent):
3800
3801 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3802
3803         Reviewed by Simon.
3804
3805         * Make the qDebug more usable. Do not have an additional newline and print
3806         the untranslated coordinates as well.
3807
3808         * platform/qt/PlatformScrollBarQt.cpp:
3809         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3810         (WebCore::PlatformScrollbar::handleMousePressEvent):
3811
3812 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3813
3814         Reviewed by Simon.
3815
3816         * Dead code, remove it
3817
3818         * platform/qt/PlatformScrollBarQt.cpp:
3819
3820 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3821
3822         Reviewed by Simon.
3823
3824         * Coding-Style fixes.
3825
3826         * platform/qt/PlatformScrollBarQt.cpp:
3827         (WebCore::PlatformScrollbar::PlatformScrollbar):
3828
3829 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3830
3831         Reviewed by Simon.
3832
3833         * Coding-Style fix
3834
3835         * platform/graphics/qt/ImageDecoderQt.cpp:
3836         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
3837
3838 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
3839
3840         Reviewed by Darin Adler.
3841
3842         Fixed: lots of WebCore leaks reported when quitting Safari
3843         
3844         If we're quitting with a GC still scheduled, do the GC before quitting.
3845         That way, WebCore's leak counters won't count objects that were
3846         scheduled for GC.
3847
3848         * bindings/js/GCController.cpp:
3849         (WebCore::GCController::~GCController):
3850         (WebCore::GCController::garbageCollectNow):
3851         * bindings/js/GCController.h:
3852
3853 2008-01-17  Alp Toker  <alp@atoker.com>
3854
3855         Reviewed by Oliver Hunt.
3856
3857         gdk_screen_get_font_options() returns NULL if no default options are
3858         set so we always have to NULL check to avoid crashes later on since
3859         Cairo doesn't accept NULL font options.
3860
3861         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3862         (WebCore::FontPlatformData::FontPlatformData):
3863
3864 2008-01-17  Antti Koivisto  <antti@apple.com>
3865
3866         Reviewed by Adele.
3867
3868         Windows fix for <rdar://problem/5605682>
3869         Disallow streaming protocols for media elements
3870         and <rdar://problem/5668711>
3871         Limit the container and codec types that the <video> tag supports
3872         
3873         - Disable unsupported QuickTime tracks types. 
3874         - Disallow streaming protocols (for now).
3875
3876         * WebCore.vcproj/WebCore.vcproj:
3877         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3878         (WebCore::MediaPlayerPrivate::updateStates):
3879         * platform/graphics/win/QTMovieWin.cpp:
3880         (QTMovieWin::load):
3881         (QTMovieWin::disableUnsupportedTracks):
3882         * platform/graphics/win/QTMovieWin.h:
3883
3884 2008-01-17  Oliver Hunt  <oliver@apple.com>
3885
3886         Support smart copy and paste during drag and drop
3887         
3888         Reviewed by Alice
3889         
3890         In order for the drag and drop tests in Windows DRT to pass
3891         we need to support smart cut and paste operations during
3892         drag and drop on windows.
3893         
3894         There is no layout test as drag and drop is still unsupported
3895         on windows.  Once supported smart drag/drop is tested by existing
3896         tests
3897
3898         * platform/win/ClipboardUtilitiesWin.cpp:
3899         (WebCore::smartPasteFormat):
3900         * platform/win/ClipboardUtilitiesWin.h:
3901         * platform/win/ClipboardWin.cpp:
3902         (WebCore::ClipboardWin::writeRange):
3903         * platform/win/DragDataWin.cpp:
3904
3905 2008-01-17  Oliver Hunt  <oliver@apple.com>
3906
3907         Reviewed by Anders.
3908
3909         <rdar://problem/5692940> Crash when attempting to get text properties in
3910         SVG with no renderer
3911
3912         We use the element renderer to calculate the text element bounds,
3913         however there was no check against the possibility of the text dimension
3914         properties being requested on a element with no renderer (eg. unattached, 
3915         display: none).
3916
3917         Test: svg/text/text-property-with-display-none.html
3918
3919         * svg/SVGTextContentElement.cpp:
3920         (WebCore::rootInlineBoxForTextContentElement):
3921
3922 2008-01-17  Anders Carlsson  <andersca@apple.com>
3923
3924         Reviewed by Oliver.
3925
3926         <rdar://problem/5636742>
3927         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
3928         
3929         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
3930         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
3931         
3932         * WebCore.base.exp:
3933         * loader/DocumentLoader.h:
3934         (WebCore::DocumentLoader::mainResourceLoader):
3935         New accessor method.
3936         
3937         * loader/PluginDocument.cpp:
3938         (WebCore::PluginTokenizer::writeRawData):
3939         Disable buffering for the main resource loader.
3940         
3941         * loader/ResourceLoader.cpp:
3942         (WebCore::ResourceLoader::setShouldBufferData):
3943         * loader/ResourceLoader.h:
3944         Have this free the buffer when disabling buffering.
3945
3946 2008-01-17  Adam Roben  <aroben@apple.com>
3947
3948         More Qt/GTK+ build fixing.
3949
3950         * platform/gtk/ScrollViewGtk.cpp:
3951         * platform/qt/ScrollViewQt.cpp:
3952
3953 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
3954
3955         Reviewed by Darin.
3956
3957         http://bugs.webkit.org/show_bug.cgi?id=16902
3958         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
3959         fast/dom/Window/window-property-shadowing.html
3960
3961         Test: fast/dom/Window/window-property-shadowing_.html
3962
3963         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
3964
3965 2008-01-17  Adam Roben  <aroben@apple.com>
3966
3967         Qt/GTK+ build fix.
3968
3969         * platform/gtk/ScrollViewGtk.cpp:
3970         (WebCore::ScrollView::ScrollViewPrivate::isActive):
3971         * platform/qt/ScrollViewQt.cpp:
3972         (WebCore::ScrollView::ScrollViewPrivate::isActive):
3973
3974 2008-01-16  Adam Roben  <aroben@apple.com>
3975
3976         Update scroll bars/form controls when FocusController::isActive changes
3977
3978         Part of <rdar://5006915> Inactive look for Aqua controls
3979
3980         Reviewed by Darin.
3981
3982         All tests pass.
3983
3984         * page/FocusController.cpp:
3985         (WebCore::FocusController::setActive): Update control tints when the
3986         active state changes.
3987         * page/FrameView.cpp:
3988         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
3989         ScrollView to paint so that the outermost scroll bars will paint. On
3990         Mac, the outermost scroll bars are taken care of by NSScroller.
3991         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
3992         * platform/ScrollBar.h: Added a new ScrollBarClient method.
3993         * platform/win/PlatformScrollBarSafari.cpp:
3994         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
3995         tints so that we can paint with the new tint later.
3996         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
3997         to SafariTheme.
3998         (WebCore::PlatformScrollbar::paintTrack): Ditto.
3999         (WebCore::PlatformScrollbar::paintThumb): Ditto.
4000         * platform/win/ScrollViewWin.cpp:
4001         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
4002         (WebCore::ScrollView::paint): Pass paint calls on down if we're
4003         updating control tints so the scroll bars can invalidate.
4004         * rendering/RenderLayer.cpp:
4005         (WebCore::RenderLayer::isActive): Added.
4006         * rendering/RenderLayer.h:
4007         * rendering/RenderListBox.cpp:
4008         (WebCore::RenderListBox::isActive): Added.
4009         * rendering/RenderListBox.h:
4010         * rendering/RenderTheme.cpp:
4011         (WebCore::RenderTheme::isActive): Added.
4012         * rendering/RenderTheme.h:
4013         * rendering/RenderThemeSafari.cpp:
4014         (WebCore::RenderThemeSafari::determineState): Pass the active state
4015         down to SafariTheme.
4016
4017 2008-01-16  Adam Roben  <aroben@apple.com>
4018
4019         Move focused/active state from Frame to SelectionController/FocusController
4020
4021         This is the first part of <rdar://5006915> Inactive look for Aqua
4022         controls.
4023
4024         The following methods were moved/renamed:
4025             - Frame::setIsActive -> FocusController::setActive
4026             - Frame::isActive -> SelectionController::isActiveAndFocused
4027             - Frame::setWindowHasFocus -> SelectionController::setFocused
4028
4029         Active state is now correctly a Page-level concept.
4030
4031         The Mac parts of this patch were written by Darin.
4032
4033         Reviewed by Darin.
4034
4035         All tests pass.
4036
4037         * WebCore.base.exp: Updated for method renames.
4038         * css/CSSStyleSelector.cpp:
4039         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
4040         * editing/SelectionController.cpp:
4041         (WebCore::SelectionController::SelectionController): Initialize new
4042         member.
4043         (WebCore::SelectionController::focusedOrActiveStateChanged): New
4044         private method. Most of this code came from Frame::setIsActive.
4045         (WebCore::SelectionController::pageActivationChanged): Added.
4046         (WebCore::SelectionController::setFocused): Added. Replaces
4047         Frame::setWindowHasFocus.
4048         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
4049         Frame::isActive.
4050         * editing/SelectionController.h:
4051         * page/FocusController.cpp:
4052         (WebCore::FocusController::FocusController): Initialize new member.
4053         (WebCore::FocusController::setFocusedFrame): Changed to just call
4054         SelectionController::setFocused, since active state has doesn't change
4055         when the focused frame changes.
4056         (WebCore::FocusController::setActive): Added. Replaces
4057         Frame::setIsActive.
4058         * page/FocusController.h:
4059         (WebCore::FocusController::isActive): Added.
4060         * page/Frame.cpp:
4061         (WebCore::Frame::setDocument): Updated for method renames.
4062         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
4063         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
4064         (WebCore::FramePrivate::FramePrivate): Removed initialization of
4065         removed members.
4066         * page/Frame.h:
4067         * page/FramePrivate.h:
4068         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
4069         * page/mac/WebCoreFrameBridge.mm: Ditto.
4070         * rendering/RenderListBox.cpp:
4071         (WebCore::RenderListBox::paintItemForeground): Updated for method
4072         renames.
4073         (WebCore::RenderListBox::paintItemBackground): Ditto.
4074         * rendering/RenderObject.cpp:
4075         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
4076         (WebCore::RenderObject::selectionForegroundColor): Ditto.
4077         * rendering/RenderTextControl.cpp:
4078         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
4079         * rendering/RenderTheme.cpp:
4080         (WebCore::RenderTheme::isFocused): Ditto.
4081
4082 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
4083
4084         Reviewed by Simon.
4085
4086         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
4087         on the image will zoom it.
4088         * It seems like our platform can only determine the size of the image once it is completely
4089         loaded. Call m_doc->imageChanged on the last chunk of data as well.
4090
4091         * loader/ImageDocument.cpp:
4092         (WebCore::ImageTokenizer::finish):
4093
4094 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4095
4096         Reviewed by Lars.
4097
4098         Set the library version of QtWebKit to the Qt version.
4099
4100         * WebCore.pro:
4101
4102 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4103
4104         Reviewed by Holger.
4105
4106         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
4107
4108         * platform/network/qt/QNetworkReplyHandler.cpp:
4109         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
4110
4111 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4112
4113         Another Windows build fix, setCookies accidentially had a const
4114         Document pointer.
4115
4116         * platform/network/win/CookieJarWin.cpp:
4117
4118 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4119
4120         MSVC Windows build fix. Forward declaring Document in CookieJar.h
4121         seems not enough for MSVC.
4122
4123         * platform/network/win/CookieJarWin.cpp:
4124
4125 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4126
4127         Reviewed by Maciej, Lars, Holger.
4128
4129         http://bugs.webkit.org/show_bug.cgi?id=16589
4130
4131         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
4132
4133         * WebCore.pro:
4134         * bindings/js/kjs_navigator.cpp:
4135         (KJS::Navigator::getValueProperty):
4136         * dom/Document.cpp:
4137         (WebCore::Document::cookie):
4138         * platform/CookieJar.h:
4139         * platform/gtk/CookieJarGtk.cpp:
4140         (WebCore::setCookies):
4141         (WebCore::cookies):
4142         * platform/mac/CookieJar.mm:
4143         * platform/network/win/CookieJarWin.cpp:
4144         * platform/qt/CookieJarQt.cpp:
4145         (WebCore::setCookies):
4146         (WebCore::cookies):
4147         (WebCore::cookiesEnabled):
4148         * platform/wx/TemporaryLinkStubs.cpp:
4149
4150 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4151
4152         Reviewed by Holger.
4153
4154         Windows build fix. (use localtime_r again instead of _s)
4155
4156         * loader/FTPDirectoryDocument.cpp:
4157         (WebCore::processFileDateString):
4158
4159 2008-01-17  Frans Englich  <fenglich@trolltech.com>
4160
4161         Reviewed by Simon Hausmann <hausmann@webkit.org>.
4162
4163         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
4164
4165         * loader/FTPDirectoryDocument.cpp:
4166
4167 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
4168
4169         Reviewed by Holger.
4170
4171         Don't link QtWebKit against libQtXml when building against Qt 4.4.
4172
4173         This is not necessary anymore since QXmlStream has been moved into QtCore.
4174
4175         * WebCore.pro:
4176
4177 2008-01-17  Håvard Wall  <hwall@trolltech.com>
4178
4179         Reviewed by Simon Hausmann <hausmann@webkit.org>.
4180
4181         Fix compilation on arm
4182
4183         * platform/graphics/qt/GraphicsContextQt.cpp:
4184         (WebCore::GraphicsContext::endTransparencyLayer):
4185
4186 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
4187
4188         Reviewed by Holger.
4189
4190         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
4191
4192         * WebCore.pro:
4193         * platform/network/qt/ResourceHandleQt.cpp:
4194         * platform/qt/MIMETypeRegistryQt.cpp:
4195         * platform/qt/PlugInInfoStoreQt.cpp:
4196
4197 2008-01-17  Frans Englich  <fenglich@trolltech.com>
4198
4199         Reviewed by Simon Hausmann <hausmann@webkit.org>.
4200
4201         Fixes compilation with MinGW.
4202         Neither localtime_r nor localtime_s are available on MingW, so instead of
4203         calling back to the thread-unsafe localtime use QDateTime instead.
4204
4205         * loader/FTPDirectoryDocument.cpp:
4206         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
4207         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
4208         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
4209         * loader/FTPDirectoryParser.cpp:
4210         (WebCore::parseOneFTPLine):
4211
4212 2008-01-17  Dan Bernstein  <mitz@apple.com>
4213
4214         Reviewed by Dave Hyatt.
4215
4216         - fix determinePitch for segmented fonts
4217
4218         Covered by fast/css/font-face-implicit-local-font.html
4219
4220         * platform/graphics/FontFallbackList.cpp: