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