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