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