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