Move Windows safe file creation code into WebCore from WebPreferences
[WebKit-https.git] / WebCore / ChangeLog
1 2007-10-24  Adam Roben  <aroben@apple.com>
2
3         Move Windows safe file creation code into WebCore from WebPreferences
4
5         Reviewed by Brady.
6
7         * platform/FileSystem.h:
8         * platform/win/FileSystemWin.cpp:
9         (WebCore::safeCreateFile): Moved here from WebKit/win/WebPreferences.cpp.
10
11 2007-10-23  Adam Roben  <aroben@apple.com>
12
13         Add methods to FileSystemWin to get some user profile directories
14
15         These directories are used to hold things like preferences, caches,
16         etc.
17
18         Reviewed by Brady.
19
20         * platform/FileSystem.h: Added new method declarations for Windows
21         only.
22         * platform/win/FileSystemWin.cpp:
23         (WebCore::bundleName): Added.
24         (WebCore::storageDirectory): Added.
25         (WebCore::cachedStorageDirectory): Added.
26         (WebCore::localUserSpecificStorageDirectory): Added. Returns the
27         directory where WebKit should store any user-specific data that should
28         stay local to the current machine (i.e., shouldn't be stored in a
29         roaming profile).
30         (WebCore::roamingUserSpecificStorageDirectory): Added. Returns the
31         directory where WebKit should store any user-specific data that should
32         move with the user from machine to machine (i.e., should be stored in
33         a roaming profile).
34
35 2007-10-24  Alp Toker  <alp@atoker.com>
36
37         Reviewed by Mark Rowe.
38
39         http://bugs.webkit.org/show_bug.cgi?id=15659
40         InlineTextBox does not setStrokeStyle() as needed
41
42         GraphicsContextCairo workaround to support a GraphicsContextCG quirk:
43
44         Save and restore the StrokeStyle manually.
45
46         * platform/graphics/cairo/GraphicsContextCairo.cpp:
47         (WebCore::GraphicsContext::drawLineForText):
48
49 2007-10-24  Julien Chaffraix  <julien.chaffraix@gmail.com>
50
51         Reviewed by Darin.
52
53         Patch for http://bugs.webkit.org/show_bug.cgi?id=15356
54         Bug 15356: getResponseHeader and getAllResponseHeaders do not throw exceptions
55
56         - getAllResponseHeaders and getResponseHeader throws INVALID_STATE_ERR exception as specified in the specification
57
58         - Add the check to field-name production in getResponseHeader (call to isValidToken) and returns an empty string if the header is not valid (Opera and IE behaviour)
59
60         - Updated XMLHttpRequest::responseMIMEType() to keep its behaviour
61
62         Tests: http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getAllRequestHeaders.html
63                http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getRequestHeader.html
64                http/tests/xmlhttprequest/xmlhttprequest-invalidHeader-getRequestHeader.html
65
66         * bindings/js/JSXMLHttpRequest.cpp:
67         (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
68         * xml/XMLHttpRequest.cpp:
69         (WebCore::XMLHttpRequest::getAllResponseHeaders):
70         (WebCore::XMLHttpRequest::getResponseHeader):
71         (WebCore::XMLHttpRequest::responseMIMEType):
72         * xml/XMLHttpRequest.h:
73
74 2007-10-24  Lars Knoll  <lars@trolltech.com>
75
76         Reviewed by Simon.
77
78         implement most of DragData.
79
80         WARNING: NO TEST CASES ADDED OR CHANGED
81
82         * platform/qt/DragDataQt.cpp:
83         (WebCore::DragData::containsColor):
84         (WebCore::DragData::containsFiles):
85         (WebCore::DragData::asFilenames):
86         (WebCore::DragData::containsPlainText):
87         (WebCore::DragData::asPlainText):
88         (WebCore::DragData::asColor):
89         (WebCore::DragData::containsCompatibleContent):
90         (WebCore::DragData::containsURL):
91
92 2007-10-24  Lars Knoll  <lars@trolltech.com>
93
94         Reviewed by Simon.
95
96         remove a stupid notImplemented() warning and implement PasteBoad::clear().
97
98         WARNING: NO TEST CASES ADDED OR CHANGED
99
100         * platform/qt/PasteboardQt.cpp:
101
102 2007-10-24  Lars Knoll  <lars@trolltech.com>
103
104         Reviewed by Simon.
105
106         implement Pasteboard::documentFragment(), and fix a mem leak.
107
108         WARNING: NO TEST CASES ADDED OR CHANGED
109
110         * platform/qt/PasteboardQt.cpp:
111         (WebCore::Pasteboard::generalPasteboard):
112         (WebCore::Pasteboard::documentFragment):
113
114 2007-10-24  Lars Knoll  <lars@trolltech.com>
115
116         Reviewed by Simon.
117
118         Simplify the PlatformKeyEvent constructor. No need to have an extra boolean for isKeyUp in there, as the QKeyEvent has the information.
119
120         WARNING: NO TEST CASES ADDED OR CHANGED
121
122         * platform/PlatformKeyboardEvent.h:
123         * platform/qt/PlatformKeyboardEventQt.cpp:
124         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
125
126 2007-10-24  Lars Knoll  <lars@trolltech.com>
127
128         Reviewed by Simon.
129
130         use the new QTextBoundaryFinder class in Qt.
131
132         WARNING: NO TEST CASES ADDED OR CHANGED
133
134         * platform/qt/TextBoundaries.cpp:
135         (WebCore::findNextWordFromIndex):
136         (WebCore::findWordBoundary):
137         * platform/qt/TextBreakIteratorQt.cpp:
138         (WebCore::wordBreakIterator):
139         (WebCore::characterBreakIterator):
140         (WebCore::lineBreakIterator):
141         (WebCore::sentenceBreakIterator):
142         (WebCore::textBreakFirst):
143         (WebCore::textBreakNext):
144         (WebCore::textBreakPreceding):
145         (WebCore::textBreakFollowing):
146         (WebCore::textBreakCurrent):
147         (WebCore::isTextBreak):
148
149 2007-10-24  Darin Adler  <darin@apple.com>
150
151         Reviewed by Maciej.
152
153         - http://bugs.webkit.org/show_bug.cgi?id=15657
154           change static hash tables to use powers of two for speed
155
156         * bindings/scripts/CodeGeneratorJS.pm: Updated to generate new format.
157
158 2007-10-24  Simon Hausmann  <hausmann@kde.org>
159
160         Reviewed by Lars.
161
162         Make the implementation of pathByAppendingComponent use QDir.
163
164         * platform/qt/FileSystemQt.cpp:
165
166 2007-10-24  David Hyatt  <hyatt@apple.com>
167
168         Make repainting work with transforms.
169
170         Reviewed by John Sullivan
171
172         * rendering/RenderBox.cpp:
173         (WebCore::RenderBox::computeAbsoluteRepaintRect):
174
175 2007-10-23  Alp Toker  <alp@atoker.com>
176
177         Reviewed by Maciej.
178
179         http://bugs.webkit.org/show_bug.cgi?id=14412
180         [GDK] Clipboard support
181
182         Initial clipboard implementation for the GTK+ port.
183
184         * platform/gtk/ClipboardGtk.cpp:
185         (WebCore::Editor::newGeneralClipboard):
186         * platform/gtk/PasteboardGtk.cpp:
187         (WebCore::Pasteboard::generalPasteboard):
188         (WebCore::Pasteboard::Pasteboard):
189         (WebCore::Pasteboard::~Pasteboard):
190         (WebCore::Pasteboard::writeSelection):
191         (WebCore::Pasteboard::writeImage):
192         (WebCore::Pasteboard::clear):
193         (WebCore::Pasteboard::plainText):
194         * platform/gtk/TemporaryLinkStubs.cpp:
195
196 2007-10-23  Timothy Hatcher  <timothy@apple.com>
197
198         Reviewed by Adam.
199
200         Fixes the Network panel so that it refreshes as needed.
201
202         * page/inspector/ConsolePanel.js: Call the base class show() and hide() first.
203         * page/inspector/NetworkPanel.js: Add refreshNeeded and refreshIfNeeded back. Ditto.
204
205 2007-10-23  Justin Garcia  <justin.garcia@apple.com>
206
207         Reviewed by Oliver Hunt.
208
209         <rdar://problem/5544856> 
210         REGRESSION: After typing 2-byte text, undo only undoes one keystroke at a time
211         
212         No layout test for now because I'm having trouble getting Undo during a layout
213         test to only undo the last Undo step, and I want to write a test that fails
214         without the code change.
215
216         * editing/Editor.cpp:
217         (WebCore::Editor::confirmComposition): When we replace the previous composition,
218         delete it with a sub-command of the command used to insert the new composition,
219         instead of with a separate command.  No new code was added because insertText
220         already deletes the current selection.
221         (WebCore::Editor::setComposition): Ditto.
222
223 2007-10-23  Adam Roben  <aroben@apple.com>
224
225         Fix the behavior of pathByAppendingComponent when path is empty
226
227         We now use the Windows Shell API function PathAppendW instead of
228         rolling our own broken implementation.
229
230         Reviewed by Anders.
231
232         * platform/win/FileSystemWin.cpp:
233         (WebCore::pathByAppendingComponent):
234
235 2007-10-23  Adele Peterson  <adele@apple.com>
236
237         Reviewed by Darin.
238
239         Fix for <rdar://problem/5543228> CrashTracer: [USER] 2 crashes in Safari at com.apple.WebCore: WebCore::HTMLInputElement::defaultEventHandler + 872
240
241         Test: fast/forms/textfield-onchange-deletion.html
242
243         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
244           Refetch the renderer since arbitrary JS code run during onchange can do anything, including destroying it.
245
246 2007-10-23  Timothy Hatcher  <timothy@apple.com>
247
248         Reviewed by Sam Weinig.
249
250         - Made seperate files for the various classes in ResourcePanel.js.
251         - Broke up ResourcePanel.js and created seperate panel classes for different resource types.
252         - Moved View code down to the Panel base-class.
253         - Reduced code duplication in DatabasePanel.js by sub-classing from the new ResourcePanel.
254
255         * page/inspector/DatabasePanel.js:
256         * page/inspector/DocumentPanel.js: Added.
257         * page/inspector/FontPanel.js: Added.
258         * page/inspector/ImagePanel.js: Added.
259         * page/inspector/Panel.js: Added.
260         * page/inspector/PropertiesSection.js: Added.
261         * page/inspector/Resource.js:
262         * page/inspector/ResourcePanel.js:
263         * page/inspector/SidebarPane.js: Added.
264         * page/inspector/SourcePanel.js: Added.
265         * page/inspector/inspector.css:
266         * page/inspector/inspector.html:
267         * page/inspector/inspector.js:
268
269 2007-10-23  Anders Carlsson  <andersca@apple.com>
270
271         Correct the version #if check.
272         
273         * platform/sql/SQLDatabase.cpp:
274         (WebCore::SQLDatabase::authorizerFunction):
275
276 2007-10-23  Jon Honeycutt  <jhoneycutt@apple.com>
277
278         Reviewed by Anders.
279
280         <rdar://5548217>: [NTS] Java 6 update 3 crashes Safari when loading a 
281         java page
282
283         It is possible to load Mozilla's Java plugin instead of our own, which
284         can lead to a crash. The fix is to prefer plugins in our own Plugins
285         directory when searching for a plugin.
286
287         * plugins/win/PluginDatabaseWin.cpp:
288         (WebCore::safariPluginsPath): Return the path to our own Plugins
289         directory
290         (WebCore::PluginDatabaseWin::defaultPluginPaths): Use new method
291         safariPluginsPath()
292         (WebCore::PluginDatabaseWin::pluginForMIMEType): If the plugin's path is
293         our Plugins path, return this plugin. Otherwise, continue scanning the
294         list of plugins
295         (WebCore::PluginDatabaseWin::pluginForExtension): Same
296         * plugins/win/PluginPackageWin.h:
297         (WebCore::PluginPackageWin::path): Return this plugin's path
298
299 2007-10-23  Jasper Bryant-Greene  <m@ni.ac.nz>
300
301         Reviewed by Darin.
302
303         http://bugs.webkit.org/show_bug.cgi?id=15058
304         Precedence fault in KeyEventGdk causes shift, control, alt etc to work incorrectly
305
306         Corrected precendence fault which was causing Shift, Alt, Control and
307         Meta to behave incorrectly on GTK.
308
309         Coding style fix by Alp.
310
311         * platform/gtk/KeyEventGtk.cpp:
312         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
313
314 2007-10-23  Sam Weinig  <sam@webkit.org>
315
316         Reviewed by Tim Hatcher.
317
318         Add resizing of the DOM view right sidebar.  This allows us to actually see the values now.
319
320         * page/inspector/ResourcePanel.js:
321         * page/inspector/inspector.css:
322         * page/inspector/inspector.js:
323         * page/inspector/utilities.js:
324
325 2007-10-23  David Hyatt  <hyatt@apple.com>
326
327         Get basic hit testing right for transforms.
328
329         Reviewed by ollliej
330
331         * platform/graphics/AffineTransform.cpp:
332         (WebCore::AffineTransform::mapPoint):
333         * platform/graphics/AffineTransform.h:
334         * rendering/InlineBox.cpp:
335         (WebCore::InlineBox::nodeAtPoint):
336         * rendering/RenderBlock.cpp:
337         (WebCore::RenderBlock::nodeAtPoint):
338         * rendering/RenderLayer.cpp:
339         (WebCore::RenderLayer::paintLayer):
340         (WebCore::RenderLayer::hitTest):
341         (WebCore::RenderLayer::hitTestLayer):
342         * rendering/RenderLayer.h:
343         * rendering/RenderObject.cpp:
344         (WebCore::RenderObject::hitTest):
345         * rendering/RenderObject.h:
346
347 2007-10-23  Eric Seidel  <eric@webkit.org>
348
349         Reviewed by Mark Rowe.
350
351         Fix leaks seen on TOT from new font-face code.
352
353         * ksvg2/svg/SVGFontFaceElement.cpp:
354         (WebCore::SVGFontFaceElement::rebuildFontFace): use a stack allocated CSSProperty instead of mallocing
355
356 2007-10-23  Eric Seidel  <eric@webkit.org>
357
358         Build fix only, no review.
359
360         Sacrifice three virgin hours upon the altar of the heathen XCode gods
361         and pray that our build troubles are finally over. :(
362
363         * DerivedSources.make: add DOMSVGException.h
364         * WebCore.xcodeproj/project.pbxproj: Remove DOMSVG*Interal.h files from "Copy Generated Headers" phase. Why?  Who knows.
365
366 2007-10-22  Steve Falkenburg  <sfalken@apple.com>
367
368         Fix build.
369
370         * plugins/win/PluginViewWin.cpp:
371
372 2007-10-22  Eric Seidel  <eric@webkit.org>
373
374         Build fix only, no review.
375
376         * WebCore.xcodeproj/project.pbxproj: re-add all DOMSVG headers to copy-files phase to make sure.
377
378 2007-10-22  Eric Seidel  <eric@webkit.org>
379
380         Build fix only, no review.
381
382         * WebCore.xcodeproj/project.pbxproj: make sure DOMSVGAnimateElement.h is copied into headers.
383
384 2007-10-22  Eric Seidel  <eric@webkit.org>
385
386         Reviewed by Maciej.
387
388         Fix build by properly exposing SVG font-face dom bindings.
389
390         * DerivedSources.make:
391         * WebCore.vcproj/WebCore.vcproj: add font-face files to build
392         * WebCore.xcodeproj/project.pbxproj: add missing DOM bindings files
393         * bindings/js/JSSVGElementWrapperFactory.cpp:
394         * bindings/objc/DOM.mm:
395         (WebCore::createElementClassMap):
396         * bindings/objc/DOMSVG.h:
397         * ksvg2/svg/SVGDefinitionSrcElement.idl: inherit from SVGElement
398
399 2007-10-22  Mark Rowe  <mrowe@apple.com>
400
401         Gtk build fix.
402
403         * WebCore.pro:
404
405 2007-10-22  Darin Adler  <darin@apple.com>
406
407         - a first cut at fixing the Qt and GTK builds
408
409         * WebCore.pro: Add new .idl and .cpp files.
410         * DerivedSources.make: Re-sorted.
411
412 2007-10-22  Eric Seidel  <eric@webkit.org>
413
414         Reviewed by hyatt.
415
416         Implement <font-face> and friends for SVG.
417         http://bugs.webkit.org/show_bug.cgi?id=10652
418
419         * DerivedSources.make:
420         * WebCore.xcodeproj/project.pbxproj:
421         * bindings/js/JSSVGElementWrapperFactory.cpp:
422         * dom/Document.cpp:
423         (WebCore::Document::mappedElementSheet):
424         (WebCore::Document::recalcStyleSelector):
425         * dom/Document.h:
426         * ksvg2/scripts/make_names.pl:
427         * ksvg2/svg/SVGDefinitionSrcElement.cpp: Added.
428         (WebCore::SVGDefinitionSrcElement::SVGDefinitionSrcElement):
429         (WebCore::SVGDefinitionSrcElement::~SVGDefinitionSrcElement):
430         (WebCore::SVGDefinitionSrcElement::childrenChanged):
431         * ksvg2/svg/SVGDefinitionSrcElement.h: Added.
432         * ksvg2/svg/SVGDefinitionSrcElement.idl: Added.
433         * ksvg2/svg/SVGFontFaceElement.cpp: Added.
434         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
435         (WebCore::SVGFontFaceElement::~SVGFontFaceElement):
436         (WebCore::cssPropertyIdForName):
437         (WebCore::mapAttributeToCSSProperty):
438         (WebCore::cssPropertyIdForSVGAttributeName):
439         (WebCore::SVGFontFaceElement::parseMappedAttribute):
440         (WebCore::SVGFontFaceElement::rebuildFontFace):
441         (WebCore::SVGFontFaceElement::childrenChanged):
442         * ksvg2/svg/SVGFontFaceElement.h: Added.
443         * ksvg2/svg/SVGFontFaceElement.idl: Added.
444         * ksvg2/svg/SVGFontFaceFormatElement.cpp: Added.
445         (WebCore::SVGFontFaceFormatElement::SVGFontFaceFormatElement):
446         (WebCore::SVGFontFaceFormatElement::~SVGFontFaceFormatElement):
447         (WebCore::SVGFontFaceFormatElement::childrenChanged):
448         * ksvg2/svg/SVGFontFaceFormatElement.h: Added.
449         * ksvg2/svg/SVGFontFaceFormatElement.idl: Added.
450         * ksvg2/svg/SVGFontFaceNameElement.cpp: Added.
451         (WebCore::SVGFontFaceNameElement::SVGFontFaceNameElement):
452         (WebCore::SVGFontFaceNameElement::~SVGFontFaceNameElement):
453         (WebCore::SVGFontFaceNameElement::srcValue):
454         * ksvg2/svg/SVGFontFaceNameElement.h: Added.
455         * ksvg2/svg/SVGFontFaceNameElement.idl: Added.
456         * ksvg2/svg/SVGFontFaceSrcElement.cpp: Added.
457         (WebCore::SVGFontFaceSrcElement::SVGFontFaceSrcElement):
458         (WebCore::SVGFontFaceSrcElement::~SVGFontFaceSrcElement):
459         (WebCore::SVGFontFaceSrcElement::srcValue):
460         (WebCore::SVGFontFaceSrcElement::childrenChanged):
461         * ksvg2/svg/SVGFontFaceSrcElement.h: Added.
462         * ksvg2/svg/SVGFontFaceSrcElement.idl: Added.
463         * ksvg2/svg/SVGFontFaceUriElement.cpp: Added.
464         (WebCore::SVGFontFaceUriElement::SVGFontFaceUriElement):
465         (WebCore::SVGFontFaceUriElement::~SVGFontFaceUriElement):
466         (WebCore::SVGFontFaceUriElement::srcValue):
467         (WebCore::SVGFontFaceUriElement::childrenChanged):
468         * ksvg2/svg/SVGFontFaceUriElement.h: Added.
469         * ksvg2/svg/SVGFontFaceUriElement.idl: Added.
470         * ksvg2/svg/svgtags.in:
471
472 2007-10-22  Jon Honeycutt  <jhoneycutt@apple.com>
473
474         Reviewed by Anders.
475
476         <rdar://5548217>: [NTS] Java 6 update 3 crashes Safari when loading a 
477         java page
478
479         We purposefully do not destroy our Java VM when its reference count
480         reaches 0, but we were unloading our JavaPlugin.dll when its reference
481         count reached 0, which lost the reference to the VM. This led to our
482         process trying to create a new VM the next time a page using Java was
483         loaded, and the JNI spec states that a single process is not allowed to
484         create more than one VM. The fix is to avoid unloading the Java plugin
485         via our PluginQuirkDontUnloadPlugin. 
486
487         * plugins/win/PluginViewWin.cpp:
488         (WebCore::PluginViewWin::determineQuirks):
489
490 2007-10-22  David Hyatt  <hyatt@apple.com>
491
492         Fix for bug 15624, make transforms work properly with opacity.
493
494         Make sure a unitless 0 is allowed as an angle argument to rotation/skew.
495
496         Reviewed by Mitz Pettel
497
498         fast/transforms/transforms-with-opacity.html
499         fast/transforms/skew-with-unitless-zero.html
500
501         * css/CSSParser.cpp:
502         (WebCore::CSSParser::validUnit):
503         * rendering/RenderLayer.cpp:
504         (WebCore::transparencyClipBox):
505         (WebCore::RenderLayer::beginTransparencyLayers):
506         (WebCore::RenderLayer::paintLayer):
507         (WebCore::RenderLayer::calculateClipRects):
508         * rendering/RenderLayer.h:
509         (WebCore::RenderLayer::transform):
510
511 2007-10-22  Adam Roben  <aroben@apple.com>
512
513         Windows build fix
514
515         Reviewed by NOBODY.
516
517         * WebCore.vcproj/WebCore.vcproj: Copy header files from platform/sql.
518         * page/Page.cpp: Touched to force the header files to be copied.
519
520 2007-10-22  Nikolas Zimmermann  <zimmermann@kde.org>
521
522         Reviewed by Simon.
523
524         Move textPath related SVGChar data in it's own structure SVGCharOnPath.
525         Store a pointer to that datastructure inside SVGChar, instead of 4 floats & one bool.
526
527         Saves space for the common case. And allows me to add more data (another float) to support
528         glyph-orientation-* on textPath later on...
529
530         * rendering/SVGCharacterLayoutInfo.cpp:
531         (WebCore::SVGChar::characterTransform):
532         * rendering/SVGCharacterLayoutInfo.h:
533         * rendering/SVGRootInlineBox.cpp:
534         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
535         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
536
537 2007-10-22  Alp Toker  <alp@atoker.com>
538
539         Reviewed by Nikolas Zimmermann.
540
541         Implement more GraphicsContextCairo stubs.
542
543         Remove a hack "to work around no current point bug" that was breaking
544         canvas tests.
545
546         Fix warnings.
547
548         * platform/graphics/cairo/CairoPath.h:
549         (WebCore::CairoPath::CairoPath):
550         * platform/graphics/cairo/GraphicsContextCairo.cpp:
551         (WebCore::GraphicsContext::addInnerRoundedRectClip):
552         (WebCore::GraphicsContext::strokeRect):
553         * platform/graphics/cairo/PathCairo.cpp:
554         (WebCore::Path::isEmpty):
555         * platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp:
556         (WebCore::SVGPaintServerGradient::setup):
557         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp:
558         (WebCore::SVGPaintServerSolid::setup):
559
560 2007-10-22  Simon Hausmann  <hausmann@kde.org>
561
562         Reviewed by Nikolas.
563
564         Fix compilation from a clean build with the database feature disabled.
565         JSCustomVersionChangeCallback.cpp doesn't actually need the SQL header file, just ScriptInterpreter.
566
567         * bindings/js/JSCustomVersionChangeCallback.cpp:
568         * page/InspectorController.cpp:
569
570 2007-10-22  Andrew Wellington  <proton@wiretapped.net>
571
572         Reviewed by Mark Rowe.
573
574         Fix for local database support after r26879
575         Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set
576
577         * Configurations/WebCore.xcconfig:
578         * WebCore.pro:
579         * WebCore.vcproj/build-generated-files.sh:
580
581 2007-10-22  Simon Hausmann  <hausmann@kde.org>
582
583         Reviewed by Lars.
584
585         Disable the Database feature for the qmake build for now.
586
587         * WebCore.pro:
588
589 2007-10-22  Simon Hausmann  <hausmann@kde.org>
590
591         Reviewed by Lars.
592
593         Make disabling the database feature (ENABLE_DATABASE=0) work by
594         placing various #ifdefs into the code and making the compilation of
595         some files optional.
596
597         * WebCore.pro:
598         * dom/Document.cpp:
599         (WebCore::Document::~Document):
600         (WebCore::Document::defaultEventHandler):
601         * dom/Document.h:
602         * page/DOMWindow.cpp:
603         * page/DOMWindow.h:
604         * page/DOMWindow.idl:
605         * page/InspectorController.cpp:
606         (WebCore::InspectorController::windowScriptObjectAvailable):
607         (WebCore::InspectorController::populateScriptResources):
608         (WebCore::InspectorController::clearDatabaseScriptResources):
609         (WebCore::InspectorController::didCommitLoad):
610         * page/InspectorController.h:
611
612 2007-10-22  Alp Toker  <alp@atoker.com>
613
614         Reviewed by Mark Rowe.
615
616         http://bugs.webkit.org/show_bug.cgi?id=15611
617         [GTK] Text selection behaviour different in Debug and Release builds
618
619         http://bugs.webkit.org/show_bug.cgi?id=15578
620         [GTK] Text editor caret does not blink
621
622         Never allow control to reach the end of non-void functions.
623
624         Return more sensible values, or in some cases, nulls.
625
626         * page/gtk/EventHandlerGtk.cpp:
627         (WebCore::isKeyboardOptionTab):
628         (WebCore::EventHandler::tabsToAllControls):
629         (WebCore::EventHandler::eventActivatedView):
630
631 2007-10-22  Holger Freyther  <zecke@selfish.org>
632
633         Reviewed by Simon Hausmann <hausmann@kde.org>.
634
635         Implement ResourceHandle::loadResourceSynchronously using ResourceHandle and a special ResourceHandleClient. This approach has the possible danger of reentrancy.
636
637         * platform/network/qt/ResourceHandleQt.cpp:
638         (WebCore::WebCoreSynchronousLoader::resourceResponse):
639         (WebCore::WebCoreSynchronousLoader::resourceError):
640         (WebCore::WebCoreSynchronousLoader::data):
641         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
642         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
643         (WebCore::WebCoreSynchronousLoader::didReceiveData):
644         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
645         (WebCore::WebCoreSynchronousLoader::didFail):
646         (WebCore::WebCoreSynchronousLoader::waitForCompletion):
647         (WebCore::ResourceHandle::loadResourceSynchronously):
648
649 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
650
651         Reviewed by Lars Knoll <lars@trolltech.com>.
652
653         Style fix. It is allowed to attempt to delete 0.
654
655         * platform/qt/ClipboardQt.cpp:
656
657 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
658
659         Reviewed by Lars Knoll <lars@trolltech.com>.
660
661         Make it actually localizable....
662
663         * platform/qt/Localizations.cpp:
664         (WebCore::submitButtonDefaultLabel):
665         (WebCore::inputElementAltText):
666         (WebCore::searchableIndexIntroduction):
667         (WebCore::fileButtonChooseFileLabel):
668         (WebCore::fileButtonNoFileSelectedLabel):
669         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
670         (WebCore::contextMenuItemTagDownloadLinkToDisk):
671         (WebCore::contextMenuItemTagCopyLinkToClipboard):
672         (WebCore::contextMenuItemTagOpenImageInNewWindow):
673         (WebCore::contextMenuItemTagDownloadImageToDisk):
674         (WebCore::contextMenuItemTagCopyImageToClipboard):
675         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
676         (WebCore::contextMenuItemTagCopy):
677         (WebCore::contextMenuItemTagGoBack):
678         (WebCore::contextMenuItemTagGoForward):
679         (WebCore::contextMenuItemTagStop):
680         (WebCore::contextMenuItemTagReload):
681         (WebCore::contextMenuItemTagCut):
682         (WebCore::contextMenuItemTagPaste):
683         (WebCore::contextMenuItemTagNoGuessesFound):
684         (WebCore::contextMenuItemTagIgnoreSpelling):
685         (WebCore::contextMenuItemTagLearnSpelling):
686         (WebCore::contextMenuItemTagSearchWeb):
687         (WebCore::contextMenuItemTagLookUpInDictionary):
688         (WebCore::contextMenuItemTagOpenLink):
689         (WebCore::contextMenuItemTagIgnoreGrammar):
690         (WebCore::contextMenuItemTagSpellingMenu):
691         (WebCore::contextMenuItemTagShowSpellingPanel):
692         (WebCore::contextMenuItemTagCheckSpelling):
693         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
694         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
695         (WebCore::contextMenuItemTagFontMenu):
696         (WebCore::contextMenuItemTagBold):
697         (WebCore::contextMenuItemTagItalic):
698         (WebCore::contextMenuItemTagUnderline):
699         (WebCore::contextMenuItemTagOutline):
700         (WebCore::contextMenuItemTagWritingDirectionMenu):
701         (WebCore::contextMenuItemTagDefaultDirection):
702         (WebCore::contextMenuItemTagLeftToRight):
703         (WebCore::contextMenuItemTagRightToLeft):
704         (WebCore::contextMenuItemTagInspectElement):
705         (WebCore::searchMenuNoRecentSearchesText):
706         (WebCore::searchMenuRecentSearchesText):
707
708 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
709
710         Reviewed by Lars Knoll <lars@trolltech.com>.
711
712         Adjust the code to obey the Coding Style.
713
714         * platform/qt/Localizations.cpp:
715         (WebCore::submitButtonDefaultLabel):
716         (WebCore::inputElementAltText):
717         (WebCore::resetButtonDefaultLabel):
718         (WebCore::defaultLanguage):
719         (WebCore::searchableIndexIntroduction):
720         (WebCore::fileButtonChooseFileLabel):
721         (WebCore::fileButtonNoFileSelectedLabel):
722         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
723         (WebCore::contextMenuItemTagDownloadLinkToDisk):
724         (WebCore::contextMenuItemTagCopyLinkToClipboard):
725         (WebCore::contextMenuItemTagOpenImageInNewWindow):
726         (WebCore::contextMenuItemTagDownloadImageToDisk):
727         (WebCore::contextMenuItemTagCopyImageToClipboard):
728         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
729         (WebCore::contextMenuItemTagCopy):
730         (WebCore::contextMenuItemTagGoBack):
731         (WebCore::contextMenuItemTagGoForward):
732         (WebCore::contextMenuItemTagStop):
733         (WebCore::contextMenuItemTagReload):
734         (WebCore::contextMenuItemTagCut):
735         (WebCore::contextMenuItemTagPaste):
736         (WebCore::contextMenuItemTagNoGuessesFound):
737         (WebCore::contextMenuItemTagIgnoreSpelling):
738         (WebCore::contextMenuItemTagLearnSpelling):
739         (WebCore::contextMenuItemTagSearchWeb):
740         (WebCore::contextMenuItemTagLookUpInDictionary):
741         (WebCore::contextMenuItemTagOpenLink):
742         (WebCore::contextMenuItemTagIgnoreGrammar):
743         (WebCore::contextMenuItemTagSpellingMenu):
744         (WebCore::contextMenuItemTagShowSpellingPanel):
745         (WebCore::contextMenuItemTagCheckSpelling):
746         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
747         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
748         (WebCore::contextMenuItemTagFontMenu):
749         (WebCore::contextMenuItemTagBold):
750         (WebCore::contextMenuItemTagItalic):
751         (WebCore::contextMenuItemTagUnderline):
752         (WebCore::contextMenuItemTagOutline):
753         (WebCore::contextMenuItemTagWritingDirectionMenu):
754         (WebCore::contextMenuItemTagDefaultDirection):
755         (WebCore::contextMenuItemTagLeftToRight):
756         (WebCore::contextMenuItemTagRightToLeft):
757         (WebCore::contextMenuItemTagInspectElement):
758         (WebCore::searchMenuNoRecentSearchesText):
759         (WebCore::searchMenuRecentSearchesText):
760         (WebCore::searchMenuClearRecentSearchesText):
761         (WebCore::AXWebAreaText):
762         (WebCore::AXLinkText):
763         (WebCore::AXListMarkerText):
764         (WebCore::AXImageMapText):
765         (WebCore::AXHeadingText):
766         (WebCore::unknownFileSizeText):
767
768 2007-10-22 Holger Hans Peter Freyther <zecke@selfish.org>
769
770         Reviewed by Lars Knoll <lars@trolltech.com>.
771
772         Return a non empty string in more functions.
773
774         * platform/qt/Localizations.cpp:
775         (WebCore::contextMenuItemTagShowSpellingPanel):
776
777 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
778
779         Reviewed by Lars Knoll <lars@trolltech.com>.
780
781         Shrink the TemporaryLinkStubs and move the
782         Frame::setNeedsReapplyStyles stub to FrameQt.cpp
783
784         * page/qt/FrameQt.cpp:
785         (WebCore::Frame::setNeedsReapplyStyles):
786         * platform/qt/TemporaryLinkStubs.cpp:
787
788 2007-10-22  Holger Freyther  <zecke@selfish.org>
789
790         Reviewed by Lars Knoll <lars@trolltech.com>.
791
792         Implement the WebCore::fileSize function. The
793         implementation assumes that QFileInfo will cache
794         the result of the stat so that info.size() and
795         info.exists() use the same stat result.
796
797         * platform/qt/FileSystemQt.cpp:
798         (WebCore::deleteFile):
799         * platform/qt/TemporaryLinkStubs.cpp:
800
801 2007-10-21  Alp Toker  <alp@atoker.com>
802
803         Reviewed by Mark Rowe.
804
805         Use the portable GLib time function.
806
807         Use event timestamps rather than the current time where available.
808
809         Rename SharedTimerLinux.cpp since it isn't Linux-specific.
810
811         * WebCore.pro:
812         * platform/gtk/MouseEventGtk.cpp:
813         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
814         * platform/gtk/SystemTimeGtk.cpp: Added.
815         (WebCore::currentTime):
816         * platform/gtk/SharedTimerGtk.cpp: Copied from platform/gtk/SharedTimerLinux.cpp.
817         * platform/gtk/SharedTimerLinux.cpp: Removed.
818
819 2007-10-22  David Hyatt  <hyatt@apple.com>
820
821         Fix for 15596, regression from my transform changes.  Preserve null checks on the clip rects calls for parent(),
822         since the method is called on orphaned layers.  This is not very well understood.
823
824         Reviewed by eric
825
826         * rendering/RenderLayer.cpp:
827         (WebCore::RenderLayer::calculateClipRects):
828         (WebCore::RenderLayer::calculateRects):
829
830 2007-10-21  Mark Rowe  <mrowe@apple.com>
831
832         Reviewed by Alp.
833
834         http://bugs.webkit.org/show_bug.cgi?id=15575
835         Bug 15575: [GTK] Implement threading using GThread
836
837         * WebCore.pro: Remove ThreadingPthreads.cpp from the Gtk build and link against libgthreads.
838         * loader/icon/IconDatabase.cpp: Initialize threading before the mutex is created to be compatible with gthreads.
839         (WebCore::iconDatabase):
840         (WebCore::IconDatabase::open):
841         * platform/Threading.h:
842         * platform/gtk/ThreadingGtk.cpp: Threading implementation in terms of GThread, based heavily on the pthreads implementation.
843         (WebCore::initializeThreading):
844         (WebCore::threadMapMutex):
845         (WebCore::threadMap):
846         (WebCore::establishIdentifierForThread):
847         (WebCore::threadForIdentifier):
848         (WebCore::clearThreadForIdentifier):
849         (WebCore::createThread):
850         (WebCore::waitForThreadCompletion):
851         (WebCore::detachThread):
852         (WebCore::Mutex::Mutex):
853         (WebCore::Mutex::~Mutex):
854         (WebCore::Mutex::lock):
855         (WebCore::Mutex::tryLock):
856         (WebCore::Mutex::unlock):
857         (WebCore::ThreadCondition::ThreadCondition):
858         (WebCore::ThreadCondition::~ThreadCondition):
859         (WebCore::ThreadCondition::wait):
860         (WebCore::ThreadCondition::signal):
861         (WebCore::ThreadCondition::broadcast):
862         * storage/Database.cpp:
863         (WebCore::Database::Database): Initialize threading when Database is used so that it will be initialized even
864         if the icon database is compiled out
865
866 2007-10-21  Mark Rowe  <mrowe@apple.com>
867
868         Build fix.
869
870         * ksvg2/css/SVGCSSStyleSelector.cpp: Use fabsf when dealing with a float to prevent the
871         implicit conversion warning.
872
873 2007-10-21  Alp Toker  <alp@atoker.com>
874
875         Reviewed by Mark Rowe.
876
877         Implement spelling and grammar mistake underlining with Pango/Cairo.
878
879         This change does not add any actual support for spelling or grammar
880         checking to any port.
881
882         * platform/graphics/cairo/GraphicsContextCairo.cpp:
883         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
884
885 2007-10-21  Alp Toker  <alp@atoker.com>
886
887         Reviewed by Mark Rowe.
888
889         Cairo canvas fixes:
890
891         Fix a refcounting issue leading to leaks and crashes on canvas
892         content.
893
894         Delegate memory management of canvas images to Cairo.
895
896         Mark unhandled conditions with notImplemented() instead of silently
897         ignoring them.
898
899         * html/CanvasRenderingContext2D.cpp:
900         (WebCore::CanvasRenderingContext2D::drawImage):
901         * html/CanvasStyle.cpp:
902         (WebCore::CanvasStyle::applyStrokeColor):
903         * html/CanvasStyle.h:
904         * html/HTMLCanvasElement.cpp:
905         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
906         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
907         (WebCore::HTMLCanvasElement::reset):
908         (WebCore::HTMLCanvasElement::paint):
909         (WebCore::HTMLCanvasElement::createDrawingContext):
910         (WebCore::HTMLCanvasElement::createPlatformImage):
911
912 2007-10-21  Nikolas Zimmermann  <zimmermann@kde.org>
913
914         Reviewed by Eric.
915
916         Handle glyph-orientation-vertical / glyph-orientation-horizontal SVG CSS properties.
917
918         The SVG layouting code itself doesn't handle these properties yet,
919         it's just about recognizing them in the SVG CSS engine.
920
921         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp:
922         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
923         * ksvg2/css/SVGCSSParser.cpp:
924         (WebCore::CSSParser::parseSVGValue):
925         * ksvg2/css/SVGCSSStyleSelector.cpp:
926         (WebCore::CSSStyleSelector::applySVGProperty):
927         * ksvg2/css/SVGRenderStyle.h:
928         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
929         (WebCore::SVGRenderStyle::InheritedFlags::operator!=):
930         (WebCore::SVGRenderStyle::setBitDefaults):
931         * ksvg2/css/SVGRenderStyleDefs.h:
932
933 2007-10-21  Christian Dywan  <christian@twotoasts.de>
934
935         Reviewed by Alp.
936
937         http://bugs.webkit.org/show_bug.cgi?id=15589
938         Use glib's path separator on gtk
939
940         * platform/gtk/FileSystemGtk.cpp:
941         (WebCore::pathByAppendingComponent):
942
943 2007-10-21  Dan Bernstein  <mitz@apple.com>
944
945         Reviewed by Dave Hyatt.
946
947         - fix http://bugs.webkit.org/show_bug.cgi?id=15259
948           <rdar://problem/5499902> REGRESSION: Text overflows when using word spacing and centering (affects myspace.com music videos page)
949
950         Test: fast/text/word-space.html
951
952         * rendering/RenderBlock.cpp:
953         (WebCore::stripTrailingSpace): Added word-spacing to the width of the
954         space being stripped out.
955         * rendering/RenderText.cpp:
956         (WebCore::RenderText::trimmedPrefWidths): Changed handling of
957         leading space. Since Font::width includes leading space width but not
958         leading word spacing, this method needs to either remove the width of a
959         space character or add word spacing,
960         depending on stripFrontSpaces. 
961         (WebCore::RenderText::calcPrefWidths): Corrected the check for adding
962         trailing word spacing so that it would work in the case where the last
963         space is ignored.
964         * rendering/bidi.cpp:
965         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to
966         actually add word spacing to the total width.
967
968 2007-10-20  David Hyatt  <hyatt@apple.com>
969
970         Land support for the transform CSS property.  Basic painting now works properly. There are many open issues
971         that will have to be covered by individual bugs.
972
973         Reviewed by olliej
974
975         * css/CSSParser.cpp:
976         (WebCore::CSSParser::validUnit):
977         (WebCore::CSSParser::parseTransform):
978         * rendering/RenderLayer.cpp:
979         (WebCore::RenderLayer::RenderLayer):
980         (WebCore::RenderLayer::~RenderLayer):
981         (WebCore::RenderLayer::updateLayerPositions):
982         (WebCore::RenderLayer::updateTransform):
983         (WebCore::transparencyClipBox):
984         (WebCore::RenderLayer::beginTransparencyLayers):
985         (WebCore::RenderLayer::paintLayer):
986         (WebCore::RenderLayer::calculateClipRects):
987         (WebCore::RenderLayer::calculateRects):
988         (WebCore::RenderLayer::childrenClipRect):
989         (WebCore::RenderLayer::selfClipRect):
990         (WebCore::RenderLayer::intersectsDamageRect):
991         (WebCore::RenderLayer::boundingBox):
992         * rendering/RenderLayer.h:
993         * rendering/RenderObject.cpp:
994         (WebCore::RenderObject::containingBlock):
995         (WebCore::RenderObject::container):
996         * rendering/RenderStyle.cpp:
997         (WebCore::RenderStyle::applyTransform):
998         * rendering/RenderStyle.h:
999         (WebCore::TransformOperation::isScaleOperation):
1000         (WebCore::TransformOperation::isRotateOperation):
1001         (WebCore::TransformOperation::isSkewOperation):
1002         (WebCore::TransformOperation::isTranslateOperation):
1003         (WebCore::TransformOperation::isMatrixOperation):
1004         (WebCore::ScaleTransformOperation::isScaleOperation):
1005         (WebCore::RotateTransformOperation::isRotateOperation):
1006         (WebCore::SkewTransformOperation::isSkewOperation):
1007         (WebCore::TranslateTransformOperation::isTranslateOperation):
1008         (WebCore::MatrixTransformOperation::isMatrixOperation):
1009         * rendering/RenderTableRow.h:
1010         (WebCore::RenderTableRow::requiresLayer):
1011         * rendering/RenderTreeAsText.cpp:
1012         (WebCore::writeLayers):
1013
1014 2007-10-20  Timothy Hatcher  <timothy@apple.com>
1015
1016         Reviewed by Adam.
1017
1018         Add basic @font-face to the Web Inspector.
1019
1020         * page/InspectorController.cpp:
1021         (WebCore::InspectorResource::type): Check for CachedResource::FontResource.
1022         * page/inspector/Resource.js: Add support for Font types and font preview in the icon.
1023         * page/inspector/ResourcePanel.js: Show a font preview for font resources.
1024         * page/inspector/inspector.css: Style for the font preview and font icon.
1025         * page/inspector/inspector.js: Add font mime types.
1026
1027 2007-10-20  Sam Weinig  <sam@webkit.org>
1028
1029         Reviewed by Mark Rowe.
1030
1031         Fixes:
1032             - http://bugs.webkit.org/show_bug.cgi?id=14393
1033               Column on the left side of the Web Inspector should have a smaller minimum width for resizing
1034             - http://bugs.webkit.org/show_bug.cgi?id=14394
1035               Left pane of the Web Inspector "shakes" when resizing it to maximum width
1036
1037         * page/inspector/inspector.js: Change the constraint logic to only enforce a 100px min-width
1038           and window.innerWidth - 100 max-width for the sidebar.  The change also makes the viewbuttons
1039           move with the sidebar.
1040
1041 2007-10-20  Dan Bernstein  <mitz@apple.com>
1042
1043         Reviewed by Dave Hyatt.
1044
1045         - fix http://bugs.webkit.org/show_bug.cgi?id=15208
1046           display:table causes the collapsed text to show at a different position when expanded
1047
1048         Test: fast/table/insert-before-anonymous-ancestors.html
1049
1050         * rendering/RenderTable.cpp:
1051         (WebCore::RenderTable::addChild): Rolled out r11579. I think whatever
1052         that change was supposed to accomplish has since been done in other
1053         places in the code.
1054
1055 2007-10-20  Mark Rowe  <mrowe@apple.com>
1056
1057         Reviewed by Dave Hyatt.
1058
1059         Fix http://bugs.webkit.org/show_bug.cgi?id=15584
1060         Bug 15584: REGRESSION(r26696): GtkLauncher segfaults on WebCore::WidthIterator::advance
1061
1062         * platform/Font.cpp:
1063         (WebCore::Font::glyphDataForCharacter): If the fallback page exists but does not have a
1064         glyph for the character, fall back to the missing glyph data rather than returning an
1065         invalid GlyphData.
1066
1067 2007-10-20  Jasper Bryant-Greene  <m@ni.ac.nz>
1068
1069         Reviewed by Maciej.
1070
1071         Changed the hard-coded scroll delta in WheelEventGtk from 120 to 0.25,
1072         as suggested by George Wright in #15108 (which this patch will
1073         resolve).
1074
1075         This gives a more sane scrolling behaviour, rather than the
1076         jumping to the end or start of the document as occurred previously.
1077
1078         * platform/gtk/WheelEventGtk.cpp:
1079         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1080
1081 2007-10-20  Alp Toker  <alp@atoker.com>
1082
1083         Reviewed by Eric.
1084
1085         Support text boundary detection.
1086         Move TextBoundariesWin.cpp to platform/ since it's portable and useful.
1087         Split out and implement some TemporaryLinkStubs.
1088
1089         * WebCore.pro:
1090         * WebCore.vcproj/WebCore.vcproj:
1091         * platform/TextBoundariesICU.cpp: Copied from WebCore/platform/win/TextBoundariesWin.cpp.
1092         * platform/gtk/Language.cpp: Added.
1093         (WebCore::defaultLanguage):
1094         * platform/gtk/TemporaryLinkStubs.cpp:
1095         * platform/gtk/TextBreakIteratorInternalICUGtk.cpp: Added.
1096         (WebCore::currentTextBreakLocaleID):
1097         * platform/win/TextBoundariesWin.cpp: Removed.
1098
1099 2007-10-20  Mark Rowe  <mrowe@apple.com>
1100
1101         Reviewed by Tim Hatcher.
1102
1103         Workaround for http://bugs.webkit.org/show_bug.cgi?id=15574
1104         Bug 15574: Web Inspector doesn't work with the new Database feature
1105
1106         The executeSql callback is executed in the security domain of the web page that owns the database,
1107         while the inspector's window object is in the callback functions scope chain.  This is leading to a
1108         security violation when the callback attempts to access "document".  We can work around this by
1109         ensuring that "document" can be found in the scope chain before the window object.
1110
1111         * page/inspector/DatabasePanel.js:
1112
1113 2007-10-20  Darin Adler  <darin@apple.com>
1114
1115         Reviewed by Maciej.
1116
1117         - http://bugs.webkit.org/show_bug.cgi?id=15567
1118           speed up hashing const char* by removing call to strlen
1119
1120         This includes one other fix as well. Both were from a day where I did some
1121         profiling to find hot spots when running the page load test.
1122
1123         * platform/StringImpl.cpp:
1124         (WebCore::StringImpl::computeHash): Compute the hash without calling strlen.
1125         Also change the argument names to not confusingly use m_ prefixes.
1126         (WebCore::StringImpl::createStrippingNull): Added a faster case for strings that
1127         don't have null.
1128
1129 2007-10-20  Mark Rowe  <mrowe@apple.com>
1130
1131         Reviewed by Alp.
1132
1133         Gtk changes needed to enable HTML 5 client-side database storage.
1134
1135         * WebCore.pro: Have Gtk use ThreadingPthreads.cpp.
1136         * platform/pthreads/ThreadingPthreads.cpp: Include errno so that EDEADLK and EBUSY are available.
1137
1138 2007-10-20  Mark Rowe  <mrowe@apple.com>
1139
1140         Reviewed by Alp.
1141
1142         Implement callOnMainThread for Gtk+ via a one-shot zero-delay timer that will be dispatched
1143         from the main event loop.
1144
1145         * WebCore.pro:
1146         * platform/gtk/TemporaryLinkStubs.cpp:
1147         * platform/gtk/ThreadingGtk.cpp: Added.
1148         (WebCore::callFunctionOnMainThread):
1149         (WebCore::callOnMainThread):
1150
1151 2007-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
1152
1153         Reviewed by Eric.
1154
1155         Fix non-functional display="inline" / display="none" for SVG text.
1156
1157         Fixes: svg/W3C-SVG-1.1/animate-elem-39-t.svg (display="inline" support)
1158         Fixes: svg/batik/text/textProperties2.svg (display="inline/none" support)
1159         Fixes: svg/carto.net/tabgroup.svg (display="none" support, stray content before layouting)
1160         
1161         * css/svg.css: Remove "important" flag on text/foreignObject display: block property
1162         * rendering/RenderSVGBlock.cpp:
1163         (WebCore::RenderSVGBlock::setStyle):
1164
1165 2007-10-20  Mark Rowe  <mrowe@apple.com>
1166
1167         Reviewed by Alp.
1168
1169         Replace #ifdef'd code with the appropriate use of a forwarding header.
1170
1171         * ForwardingHeaders/kjs/array_instance.h: Added.
1172         * bindings/js/JSDatabaseCustom.cpp:
1173
1174 2007-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
1175
1176         Reviewed by Oliver.
1177
1178         Add support for 'kerning' property in SVG text layout code.
1179         Support all textLength/lengthAdjust modes on normal text & textPaths.
1180
1181         Support letter & word spacing on textPath.
1182         Fix text selection when any spacing (letter/word/kerning) is involved.
1183
1184         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15571
1185         Fixes: svg/batik/text/textOnPathSpaces.svg (spacing)
1186                svg/batik/text/textLayout.svg (kerning support)
1187                svg/text/text-spacing-01-b.svg (text selection)
1188
1189         * platform/Font.cpp:
1190         (WebCore::WidthIterator::advance):
1191         * platform/TextStyle.h:
1192         (WebCore::TextStyle::TextStyle):
1193         (WebCore::TextStyle::spacingDisabled):
1194         (WebCore::TextStyle::disableSpacing):
1195         * rendering/SVGCharacterLayoutInfo.cpp:
1196         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
1197         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
1198         (WebCore::SVGCharacterLayoutInfo::setInPathLayout):
1199         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
1200         (WebCore::SVGChar::characterTransform):
1201         * rendering/SVGCharacterLayoutInfo.h:
1202         (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
1203         * rendering/SVGRootInlineBox.cpp:
1204         (WebCore::closeTextChunk):
1205         (WebCore::calculateKerning):
1206         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
1207         (WebCore::svgTextStyleForInlineTextBox):
1208         (WebCore::calculateTextAnchorShiftForTextChunk):
1209         (WebCore::applyTextAnchorToTextChunk):
1210         (WebCore::calculateTextLengthCorrectionForTextChunk):
1211         (WebCore::applyTextLengthCorrectionToTextChunk):
1212         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1213         (WebCore::SVGRootInlineBox::buildLayoutInformation):
1214         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1215         (WebCore::SVGRootInlineBox::buildTextChunks):
1216         (WebCore::SVGRootInlineBox::layoutTextChunks):
1217         * rendering/SVGRootInlineBox.h:
1218
1219 2007-10-20  Rodney Dawes  <dobey@wayofthemonkey.com>
1220
1221         Reviewd by Darin.
1222
1223         http://bugs.webkit.org/show_bug.cgi?id=15563
1224         Fix conflict with X11 Window type in WebCore
1225
1226         * WebCore/bindings/js/JSDocumentCustom.cpp:
1227         * WebCore/bindings/js/JSHTMLDocumentCustom.cpp:
1228         * WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp:
1229         * WebCore/bindings/js/kjs_dom.cpp:
1230         * WebCore/bindings/js/kjs_events.cpp:
1231         * WebCore/bindings/js/kjs_proxy.cpp:
1232         * WebCore/history/CachedPage.cpp:
1233         * WebCore/page/Chrome.cpp:
1234         * WebCore/page/Frame.cpp:
1235
1236 2007-10-20  Simon Hausmann  <hausmann@kde.org>
1237
1238         Build fix, not reviewed.
1239
1240         Fix the Qt build by adding the two missing FileSystem functions.
1241
1242         * platform/qt/FileSystemQt.cpp:
1243         (WebCore::makeAllDirectories):
1244         (WebCore::pathByAppendingComponent):
1245
1246 2007-10-19  Alp Toker  <alp@atoker.com>
1247
1248         Reviewed by Oliver.
1249
1250         GTK+ build fix enabling the new local database storage feature.
1251         There is also a prospective Qt build fix.
1252
1253         * WebCore.pro:
1254         * bindings/js/JSDatabaseCustom.cpp:
1255         * platform/gtk/FileSystemGtk.cpp:
1256         (WebCore::pathByAppendingComponent):
1257         (WebCore::makeAllDirectories):
1258
1259 2007-10-19  Andrew Wellington  <proton@wiretapped.net>
1260
1261         Reviewed by Brady Eidson.
1262
1263         Mac build fix.
1264
1265         * WebCore.xcodeproj/project.pbxproj:
1266
1267 2007-10-19  Alp Toker  <alp@atoker.com>
1268
1269         Reviewed by Oliver.
1270
1271         Use platform colors for text selection.
1272         Update the cache when the GTK style is changed.
1273
1274         * platform/gtk/RenderThemeGtk.cpp:
1275         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
1276         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
1277         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
1278         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
1279         (WebCore::RenderThemeGtk::gtkStyleSet):
1280         (WebCore::RenderThemeGtk::gtkEntry):
1281         * platform/gtk/RenderThemeGtk.h:
1282
1283 2007-10-19  Adele Peterson  <adele@apple.com>
1284
1285         Reviewed by Beth.
1286
1287         Fix for: <rdar://problem/5518461> REGRESSION (2.0.4-3): Popup arrows are missing in small popups at homedepot.com
1288
1289         Test: fast/forms/menulist-no-overflow.html
1290
1291         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::setStyle): Don't allow overflow on menu lists.
1292
1293 2007-10-19  Anders Carlsson  <andersca@apple.com>
1294
1295         Reviewed by Brady.
1296
1297         Move some SQL-related classes to platform/sql.
1298         
1299         * WebCore.vcproj/WebCore.vcproj:
1300         * WebCore.xcodeproj/project.pbxproj:
1301         * loader/icon/SQLDatabase.cpp: Removed.
1302         * loader/icon/SQLDatabase.h: Removed.
1303         * loader/icon/SQLStatement.cpp: Removed.
1304         * loader/icon/SQLStatement.h: Removed.
1305         * loader/icon/SQLTransaction.cpp: Removed.
1306         * loader/icon/SQLTransaction.h: Removed.
1307         * platform/sql/SQLDatabase.cpp: Copied from loader/icon/SQLDatabase.cpp.
1308         * platform/sql/SQLDatabase.h: Copied from loader/icon/SQLDatabase.h.
1309         * platform/sql/SQLStatement.cpp: Copied from loader/icon/SQLStatement.cpp.
1310         * platform/sql/SQLStatement.h: Copied from loader/icon/SQLStatement.h.
1311         * platform/sql/SQLTransaction.cpp: Copied from loader/icon/SQLTransaction.cpp.
1312         * platform/sql/SQLTransaction.h: Copied from loader/icon/SQLTransaction.h.
1313
1314 2007-10-19  Anders Carlsson  <andersca@apple.com>
1315
1316         Reviewed by Adam.
1317
1318         Update to match the latest version of the spec. Now, executeSQL takes an array
1319         of SQL parameters instead of them being passed as arguments.
1320         
1321         * bindings/js/JSDatabaseCustom.cpp:
1322         (WebCore::JSDatabase::executeSql):
1323         * page/inspector/DatabasePanel.js:
1324         * storage/Database.idl:
1325
1326 2007-10-19  Brady Eidson  <beidson@apple.com>
1327
1328         Reviewed by Tim
1329
1330         Tiger's SQLite doesn't support CREATE TABLE IF NOT EXISTS :(
1331
1332         * storage/Database.cpp:
1333         (WebCore::Database::performOpenAndVerify):
1334         * storage/DatabaseTracker.cpp:
1335         (WebCore::DatabaseTracker::DatabaseTracker):
1336
1337 2007-10-19  Anders Carlsson  <andersca@apple.com>
1338
1339         Release build fix.
1340         
1341         * WebCore.vcproj/WebCore.vcproj:
1342
1343 2007-10-19  Brady Eidson  <beidson@apple.com>
1344
1345         Remove stray printfs
1346
1347         * dom/Document.cpp:
1348         (WebCore::Document::Document):
1349         (WebCore::Document::~Document):
1350
1351 2007-10-19  Anders Carlsson  <andersca@apple.com>
1352
1353         Reviewed by Brady.
1354
1355         Apparently the Win32 pthreads impl we use does not allow unlocking a mutex that has not
1356         already been locked, so lock the mutex first.
1357         
1358         * storage/DatabaseThread.cpp:
1359         (WebCore::DatabaseThread::databaseThread):
1360
1361 2007-10-19  Brady Eidson  <beidson@apple.com>
1362
1363         Better build fix
1364
1365         * loader/icon/SQLDatabase.cpp:
1366         (WebCore::SQLDatabase::authorizerFunction):  Definite works by 3.3.13
1367
1368 2007-10-19  Brady Eidson  <beidson@apple.com>
1369
1370         Build fix
1371
1372         * loader/icon/SQLDatabase.cpp:
1373         (WebCore::SQLDatabase::authorizerFunction): I don't know *when* these constants were
1374           added to SQLite, but I know they were by 3.4.0
1375
1376 2007-10-19  Brady Eidson  <beidson@apple.com>
1377         Reviewed by Anders
1378
1379         Windows specific changes, as well as renaming Queue -> Deque
1380
1381         * ForwardingHeaders/wtf/Deque.h: Added.
1382         * ForwardingHeaders/wtf/Queue.h: Removed.
1383         * platform/win/FileSystemWin.cpp:
1384         (WebCore::fileSize):
1385         (WebCore::fileExists):
1386         (WebCore::deleteFile):
1387         (WebCore::pathByAppendingComponent):
1388         (WebCore::fileSystemRepresentation):
1389         (WebCore::makeAllDirectories):
1390         (WebCore::homeDirectoryPath):
1391         * storage/Database.h:
1392         * storage/DatabaseThread.cpp:
1393         (WebCore::DatabaseThread::documentGoingAway):
1394         (WebCore::DatabaseThread::databaseGoingAway):
1395         (WebCore::DatabaseThread::dispatchNextTaskIdentifier):
1396         (WebCore::DatabaseThread::scheduleTask):
1397         (WebCore::DatabaseThread::scheduleImmediateTask):
1398         * storage/DatabaseThread.h:
1399
1400 2007-10-19  Brady Eidson <beidson@apple.com>
1401
1402         Reviewed by Tim and Anders
1403
1404         Preliminary support for HTML5 local database storage (http://www.whatwg.org/specs/web-apps/current-work/)
1405
1406         The specification is still in flux but the fundamentals are pretty solid and we can start using and testing 
1407         this implementation even while filing bugs to track changes in the spec as it becomes more final
1408
1409         There are some implementation details in this patch that seem unused or useless, but they remain in place 
1410         while the spec is in flux and might go one way or another.
1411
1412         * platform/Logging.cpp: Add StorageAPI logging channel
1413         * platform/Logging.h:
1414
1415         * storage/Database.cpp: Added.
1416         (WebCore::Database::databaseInfoTableName):
1417         (WebCore::databaseVersionKey):
1418         (WebCore::Database::openDatabase): C++ version of the window.openDatabase() javascript API
1419         (WebCore::Database::Database):
1420         (WebCore::Database::~Database):
1421         (WebCore::Database::openAndVerifyVersion):
1422         (WebCore::retrieveTextResultFromDatabase):
1423         (WebCore::Database::getVersionFromDatabase):
1424         (WebCore::setTextValueInDatabase):
1425         (WebCore::Database::setVersionInDatabase):
1426         (WebCore::Database::databaseThreadGoingAway): May be removed in the future
1427         (WebCore::Database::disableAuthorizer): For internal (WebInspector) use to get around the authorizer's restrictions
1428         (WebCore::Database::enableAuthorizer):
1429         (WebCore::Database::guidForOriginAndName): Candidate for refactoring and/or moving to the database tracker.  
1430           The GUID for each database identifier is currently for tracking the database version, but might be rescoped in the future
1431         (WebCore::Database::resetAuthorizer):
1432         (WebCore::Database::performPolicyChecks): Currently, the only post-executeSql policy check planned is the origin size usage 
1433         (WebCore::Database::scheduleDatabaseCallback):
1434         (WebCore::Database::performOpenAndVerify): 
1435         (WebCore::Database::performChangeVersion):
1436         (WebCore::Database::performExecuteSql):
1437         (WebCore::Database::performCloseTransaction):
1438         (WebCore::Database::performGetTableNames):
1439         (WebCore::Database::version): C++ version of the javascript API
1440         (WebCore::Database::changeVersion): Ditto
1441         (WebCore::Database::executeSql): Ditto
1442         (WebCore::Database::closeTransaction): Ditto
1443         (WebCore::Database::tableNames): For internal (WebInspector) use
1444         (WebCore::Database::deliverAllPendingCallbacks):
1445         (WebCore::Database::deliverPendingCallbacks):
1446         * storage/Database.h: Added.
1447         (WebCore::Database::databaseDebugName): For debug logging purposes
1448         * storage/Database.idl: Added.
1449
1450         * storage/DatabaseAuthorizer.cpp: Added.
1451           The DatabaseAuthorizer is used to both prevent the script from doing "illegal" things in sql as well as
1452           tracking when effects certain sql statements might have (such as increasing the size of the database)
1453         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
1454         (WebCore::DatabaseAuthorizer::reset):
1455         (WebCore::DatabaseAuthorizer::createTable):
1456         (WebCore::DatabaseAuthorizer::createTempTable):
1457         (WebCore::DatabaseAuthorizer::dropTable):
1458         (WebCore::DatabaseAuthorizer::dropTempTable):
1459         (WebCore::DatabaseAuthorizer::allowAlterTable):
1460         (WebCore::DatabaseAuthorizer::createIndex):
1461         (WebCore::DatabaseAuthorizer::createTempIndex):
1462         (WebCore::DatabaseAuthorizer::dropIndex):
1463         (WebCore::DatabaseAuthorizer::dropTempIndex):
1464         (WebCore::DatabaseAuthorizer::createTrigger):
1465         (WebCore::DatabaseAuthorizer::createTempTrigger):
1466         (WebCore::DatabaseAuthorizer::dropTrigger):
1467         (WebCore::DatabaseAuthorizer::dropTempTrigger):
1468         (WebCore::DatabaseAuthorizer::createVTable):
1469         (WebCore::DatabaseAuthorizer::dropVTable):
1470         (WebCore::DatabaseAuthorizer::allowDelete):
1471         (WebCore::DatabaseAuthorizer::allowInsert):
1472         (WebCore::DatabaseAuthorizer::allowUpdate):
1473         (WebCore::DatabaseAuthorizer::allowRead):
1474         (WebCore::DatabaseAuthorizer::allowAnalyze):
1475         (WebCore::DatabaseAuthorizer::allowPragma):
1476         (WebCore::DatabaseAuthorizer::allowAttach):
1477         (WebCore::DatabaseAuthorizer::allowDetach):
1478         (WebCore::DatabaseAuthorizer::allowFunction):
1479         (WebCore::DatabaseAuthorizer::disable):
1480         (WebCore::DatabaseAuthorizer::enable):
1481         (WebCore::DatabaseAuthorizer::denyBasedOnTableName): Don't allow access to the __WebKit meta info table as
1482           it should be invisible to scripts
1483         * storage/DatabaseAuthorizer.h: Added.
1484         (WebCore::DatabaseAuthorizer::lastActionWasInsert):
1485         (WebCore::DatabaseAuthorizer::lastActionIncreasedSize):
1486
1487         * storage/DatabaseCallback.cpp: Added.
1488           Generic item to queue up for callbacks on the main thread for database activities that take place on 
1489           a secondary thread
1490         (WebCore::DatabaseChangeVersionCallback::DatabaseChangeVersionCallback):
1491         (WebCore::DatabaseChangeVersionCallback::performCallback):
1492         (WebCore::DatabaseExecuteSqlCallback::DatabaseExecuteSqlCallback):
1493         (WebCore::DatabaseExecuteSqlCallback::performCallback):
1494         * storage/DatabaseCallback.h: Added.
1495         (WebCore::DatabaseCallback::~DatabaseCallback):
1496         (WebCore::DatabaseChangeVersionCallback::~DatabaseChangeVersionCallback):
1497         (WebCore::DatabaseExecuteSqlCallback::~DatabaseExecuteSqlCallback):
1498
1499         * storage/DatabaseTask.h: Added.
1500           Generic work-item to be queued up on the background database thread
1501         (WebCore::DatabaseTask::isComplete):
1502         (WebCore::DatabaseOpenTask::exceptionCode):
1503         (WebCore::DatabaseOpenTask::openSuccessful):
1504         (WebCore::DatabaseTableNamesTask::tableNames):
1505         * storage/DatabaseTask.cpp: Added.
1506         (WebCore::DatabaseTask::DatabaseTask):
1507         (WebCore::DatabaseTask::~DatabaseTask):
1508         (WebCore::DatabaseTask::performTask):
1509         (WebCore::DatabaseTask::lockForSynchronousScheduling): Used when the main thread needs this task accomplished 
1510           synchronously
1511         (WebCore::DatabaseTask::waitForSynchronousCompletion):
1512
1513         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1514         (WebCore::DatabaseOpenTask::doPerformTask):
1515
1516         (WebCore::DatabaseExecuteSqlTask::DatabaseExecuteSqlTask):
1517         (WebCore::DatabaseExecuteSqlTask::doPerformTask):
1518
1519         (WebCore::DatabaseChangeVersionTask::DatabaseChangeVersionTask):
1520         (WebCore::DatabaseChangeVersionTask::doPerformTask):
1521
1522         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1523         (WebCore::DatabaseTableNamesTask::doPerformTask):
1524
1525         * storage/DatabaseThread.cpp: Added.
1526           The current design is that each Document will have its own DatabaseThread.  This makes scripts on each
1527           individual document more response at the cost of adding more threads and potentially creating concurrency
1528           issues when the same database is open twice from two different documents
1529         (WebCore::DatabaseThread::DatabaseThread):
1530         (WebCore::DatabaseThread::~DatabaseThread):
1531         (WebCore::DatabaseThread::start):
1532         (WebCore::DatabaseThread::documentGoingAway): Called to shut the thread down when the document is destroyed
1533         (WebCore::DatabaseThread::databaseGoingAway): Remove all pending tasks for this database
1534         (WebCore::DatabaseThread::databaseThreadStart):
1535         (WebCore::DatabaseThread::databaseThread):
1536         (WebCore::DatabaseThread::dispatchNextTaskIdentifier):
1537         (WebCore::DatabaseThread::scheduleTask):
1538         (WebCore::DatabaseThread::scheduleImmediateTask): Schedule a task that gets to "cut to the front of the line" when
1539           the main thread requires a task be performed synchronously
1540         (WebCore::DatabaseThread::wakeWorkThread):
1541         * storage/DatabaseThread.h: Added.
1542
1543         * storage/DatabaseTracker.cpp: Added.
1544           The DatabaseTracker is the master management of all databases.  It will keep track of the filename for a given
1545           unique database, keep track of the total disk usage per-origin, and policys per database/origin
1546         (WebCore::DatabaseTracker::setDatabasePath):
1547         (WebCore::DatabaseTracker::databasePath):
1548         (WebCore::DatabaseTracker::tracker):
1549         (WebCore::DatabaseTracker::DatabaseTracker):
1550         (WebCore::DatabaseTracker::fullPathForDatabase):
1551         (WebCore::DatabaseTracker::populateOrigins):
1552         (WebCore::DatabaseTracker::origins):
1553         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1554         (WebCore::DatabaseTracker::addDatabase):
1555         (WebCore::DatabaseTracker::deleteAllDatabases):
1556         (WebCore::DatabaseTracker::deleteAllDatabasesForOrigin):
1557         * storage/DatabaseTracker.h: Added.
1558
1559         * storage/SQLCallback.h: Added. C++ version of the javascript executeSql() callback
1560         (WebCore::SQLCallback::~SQLCallback):
1561         * storage/SQLCallback.idl: Added.
1562
1563         * storage/SQLResultSet.cpp: Added. C++ version of the javascript SQLResultSet object
1564         (WebCore::SQLResultSet::SQLResultSet):
1565         (WebCore::SQLResultSet::insertId):
1566         (WebCore::SQLResultSet::rowsAffected):
1567         (WebCore::SQLResultSet::errorCode):
1568         (WebCore::SQLResultSet::error):
1569         (WebCore::SQLResultSet::rows):
1570         (WebCore::SQLResultSet::setInsertId):
1571         (WebCore::SQLResultSet::setRowsAffected):
1572         (WebCore::SQLResultSet::setErrorCode):
1573         (WebCore::SQLResultSet::setErrorMessage):
1574         * storage/SQLResultSet.h: Added.
1575         * storage/SQLResultSet.idl: Added.
1576
1577         * storage/SQLResultSetRowList.cpp: Added. C++ version of the javascript SQLResultSetRowList object
1578         (WebCore::SQLResultSetRowList::length):
1579         * storage/SQLResultSetRowList.h: Added.
1580         (WebCore::SQLResultSetRowList::columnNames):
1581         (WebCore::SQLResultSetRowList::values):
1582         (WebCore::SQLResultSetRowList::addColumn):
1583         (WebCore::SQLResultSetRowList::addResult):
1584         * storage/SQLResultSetRowList.idl: Added.
1585
1586         * storage/VersionChangeCallback.h: Added. C++ version of the javascript changeVersion() callback
1587         (WebCore::VersionChangeCallback::~VersionChangeCallback):
1588         * storage/VersionChangeCallback.idl: Added.
1589
1590 2007-10-19  Brady Eidson <beidson@apple.com>
1591
1592         Reviewed by Oliver + Same
1593
1594         Forwarding header for the new wtf/Queue.h
1595
1596         * ForwardingHeaders/wtf/Queue.h: Added.
1597
1598 2007-10-19  Anders Carlsson <beidson@apple.com>
1599
1600         Reviewed by Sam Weinig
1601
1602         Most of the Javascript binding support for the Storage API
1603
1604         * bindings/js/JSCustomSQLCallback.cpp: Added.
1605         (WebCore::JSCustomSQLCallback::JSCustomSQLCallback):
1606         (WebCore::JSCustomSQLCallback::handleEvent):
1607         * bindings/js/JSCustomSQLCallback.h: Added.
1608                 Add JSCustomSQLCallback which is an SQLCallback implementation that dispatches
1609                 handleEvent to a JS function or a JS object with a handleEvent function.
1610
1611         * bindings/js/JSCustomVersionChangeCallback.cpp: Added.
1612         (WebCore::JSCustomVersionChangeCallback::JSCustomVersionChangeCallback):
1613         (WebCore::JSCustomVersionChangeCallback::handleEvent):
1614         * bindings/js/JSCustomVersionChangeCallback.h: Added.
1615                 Add JSCustomSQLCallback which is an SQLCallback implementation that dispatches
1616                 handleEvent to a JS function or a JS object with a handleEvent function.
1617
1618         * bindings/js/JSDatabaseCustom.cpp: Added.
1619         (WebCore::JSDatabase::executeSql):
1620                 Custom implementation of executeSql that takes an array of parameters.
1621                 
1622         (WebCore::JSDatabase::changeVersion):
1623                 Custom implementation of changeVersion.
1624                 
1625         * bindings/js/JSSQLResultSetRowListCustom.cpp: Added.
1626         (WebCore::JSSQLResultSetRowList::item):
1627                 Custom method that returns a JS object that corresponds to a given row in the database.
1628
1629         * bindings/scripts/CodeGeneratorJS.pm:
1630
1631         * page/DOMWindow.cpp:
1632         (WebCore::DOMWindow::openDatabase):
1633         * page/DOMWindow.h:
1634         * page/DOMWindow.idl:
1635                 Add openDatabase implementation.
1636
1637 2007-10-19  Brady Eidson <beidson@apple.com>
1638
1639         Reviewed by Oliver
1640
1641         Added tons of utility to the FileSystem abstractions, including moving
1642         some stuff over from IconDatabase
1643
1644         * platform/FileSystem.h:
1645
1646         * platform/cf/FileSystemCF.cpp: Added.
1647         (WebCore::fileSystemRepresentation):
1648
1649         * platform/mac/FileSystemMac.mm:
1650
1651         * platform/posix/FileSystemPOSIX.cpp: Added.
1652         (WebCore::fileExists):
1653         (WebCore::deleteFile):
1654         (WebCore::fileSize):
1655         (WebCore::pathByAppendingComponent):
1656         (WebCore::makeAllDirectories):
1657
1658 2007-10-19  Timothy Hatcher  <timothy@apple.com>
1659
1660         Reviewed by Adam Roben
1661
1662         Preliminary Web Inspector support for the Storage API
1663         (This patch does not include the support artwork)
1664
1665         * page/InspectorController.cpp:
1666         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
1667         (WebCore::InspectorDatabaseResource::setScriptObject):
1668         (WebCore::databaseTableNames): Return the table names for a Database object.
1669         (WebCore::InspectorController::setWindowVisible):
1670         (WebCore::InspectorController::windowScriptObjectAvailable):
1671         (WebCore::InspectorController::populateScriptResources):
1672         (WebCore::InspectorController::addDatabaseScriptResource): Add the script object for the database.
1673         (WebCore::InspectorController::removeDatabaseScriptResource): Remove the script object for the database.
1674         (WebCore::InspectorController::clearDatabaseScriptResources): Remove all the database resources.
1675         (WebCore::InspectorController::didCommitLoad): Call clearDatabaseScriptResources().
1676         (WebCore::InspectorController::didOpenDatabase): Make a new InspectorDatabaseResource and add it to m_databaseResources.
1677         * page/InspectorController.h:
1678         * page/inspector/Database.js: Added.
1679         * page/inspector/DatabasePanel.js: Added.
1680         * page/inspector/ResourceCategory.js: Make resource categories assume less about the resource.
1681         * page/inspector/inspector.css: Add styles for the database panel.
1682         * page/inspector/inspector.html: Include DatabasePanel.js
1683         * page/inspector/inspector.js: Support for adding and removing Database resources.
1684
1685 2007-10-19  Brady Eidson <beidson@apple.com>
1686
1687         Reviewed by Tim Hatcher
1688
1689         Added support for Chrome prompts required by the Storage API
1690
1691         * page/Chrome.cpp:
1692         (WebCore::Chrome::runDatabaseSizeLimitPrompt):
1693         * page/Chrome.h:
1694         * page/ChromeClient.h:
1695         * platform/graphics/svg/SVGImageEmptyClients.h:
1696
1697 2007-10-19  Brady Eidson <beidson@apple.com>
1698
1699         Contributions and Review by Anders
1700
1701         Various SQLite tweaks in preparation for the storage API
1702
1703         * loader/icon/SQLDatabase.cpp:
1704         (WebCore::SQLDatabase::~SQLDatabase):
1705         (WebCore::SQLDatabase::authorizerFunction): Static callback from sqlite for authorizer functions
1706         (WebCore::SQLDatabase::setAuthorizer):
1707         (WebCore::SQLDatabase::lock):
1708         (WebCore::SQLDatabase::unlock):
1709         * loader/icon/SQLDatabase.h:
1710
1711         * loader/icon/SQLStatement.cpp:
1712         (WebCore::SQLStatement::prepare): Switch to prepare16_v2
1713         (WebCore::SQLStatement::bindDouble): Added
1714         (WebCore::SQLStatement::bindValue): Bind a wrapped SQLValue object (described later)
1715         (WebCore::SQLStatement::bindParameterCount): Accessor to the sqlite3 API for validating statements
1716         * loader/icon/SQLStatement.h:
1717         (WebCore::SQLStatement::isPrepared):
1718
1719         * platform/sql/SQLAuthorizer.cpp: Added.  Fully virtual interface to implement your own SQLite authorizer
1720         * platform/sql/SQLAuthorizer.h: Added.
1721         (WebCore::SQLAuthorizer::~SQLAuthorizer):
1722         (WebCore::SQLAuthorizer::createTable):
1723         (WebCore::SQLAuthorizer::createTempTable):
1724         (WebCore::SQLAuthorizer::dropTable):
1725         (WebCore::SQLAuthorizer::dropTempTable):
1726         (WebCore::SQLAuthorizer::allowAlterTable):
1727         (WebCore::SQLAuthorizer::createIndex):
1728         (WebCore::SQLAuthorizer::createTempIndex):
1729         (WebCore::SQLAuthorizer::dropIndex):
1730         (WebCore::SQLAuthorizer::dropTempIndex):
1731         (WebCore::SQLAuthorizer::createTrigger):
1732         (WebCore::SQLAuthorizer::createTempTrigger):
1733         (WebCore::SQLAuthorizer::dropTrigger):
1734         (WebCore::SQLAuthorizer::dropTempTrigger):
1735         (WebCore::SQLAuthorizer::createView):
1736         (WebCore::SQLAuthorizer::createTempView):
1737         (WebCore::SQLAuthorizer::dropView):
1738         (WebCore::SQLAuthorizer::dropTempView):
1739         (WebCore::SQLAuthorizer::createVTable):
1740         (WebCore::SQLAuthorizer::dropVTable):
1741         (WebCore::SQLAuthorizer::allowDelete):
1742         (WebCore::SQLAuthorizer::allowInsert):
1743         (WebCore::SQLAuthorizer::allowUpdate):
1744         (WebCore::SQLAuthorizer::allowTransaction):
1745         (WebCore::SQLAuthorizer::allowSelect):
1746         (WebCore::SQLAuthorizer::allowRead):
1747         (WebCore::SQLAuthorizer::allowAttach):
1748         (WebCore::SQLAuthorizer::allowDetach):
1749         (WebCore::SQLAuthorizer::allowReindex):
1750         (WebCore::SQLAuthorizer::allowAnalyze):
1751         (WebCore::SQLAuthorizer::allowFunction):
1752
1753         * platform/sql/SQLValue.cpp: Added.  Contains a value for a SQLite database that can be one of a few types.  
1754           For now, just a String or a double
1755         (WebCore::SQLValue::SQLValue):
1756         (WebCore::SQLValue::string):
1757         (WebCore::SQLValue::number):
1758         * platform/sql/SQLValue.h: Added.
1759         (WebCore::SQLValue::):
1760         (WebCore::SQLValue::SQLValue):
1761         (WebCore::SQLValue::type):
1762
1763 2007-10-19  Brady Eidson <beidson@apple.com>
1764
1765         Reviewed by Maciej
1766
1767         Changed IconDatabase over to use new FileSystem apis
1768
1769         * loader/icon/IconDatabase.cpp:
1770         (WebCore::IconDatabase::open):
1771
1772 2007-10-19  David Hyatt  <hyatt@apple.com>
1773
1774         Fix for ebay parser crash.
1775
1776         Reviewed by Beth
1777
1778         fast/invalid/table-residual-style-crash.html added as a test
1779
1780         * html/HTMLParser.cpp:
1781         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
1782
1783 2007-10-19  Sam Weinig  <sam@webkit.org>
1784
1785         Fix Windows, Qt and GTK builds.
1786
1787         * WebCore.pro:
1788         * WebCore.vcproj/WebCore.vcproj:
1789
1790 2007-10-19  Sam Weinig  <sam@webkit.org>
1791
1792         Reviewed by Darin.
1793
1794         Encapsulate the same origin check into the new SecurityOrigin class.
1795
1796         * WebCore.xcodeproj/project.pbxproj:
1797         * bindings/js/kjs_window.cpp:
1798         (KJS::Window::isSafeScript):
1799         * dom/Document.cpp:
1800         (WebCore::Document::Document):
1801         (WebCore::Document::defaultEventHandler):
1802         * dom/Document.h:
1803         (WebCore::Document::securityOrigin):
1804         * loader/FrameLoader.cpp:
1805         (WebCore::FrameLoader::begin):
1806         (WebCore::FrameLoader::setOpener):
1807         * loader/FrameLoader.h:
1808         * platform/SecurityOrigin.cpp: Added.
1809         (WebCore::SecurityOrigin::SecurityOrigin):
1810         (WebCore::SecurityOrigin::clear):
1811         (WebCore::SecurityOrigin::isEmpty):
1812         (WebCore::SecurityOrigin::setForFrame):
1813         (WebCore::SecurityOrigin::setDomainFromDOM):
1814         (WebCore::SecurityOrigin::allowsAccessFrom):
1815         (WebCore::SecurityOrigin::isSecureTransitionTo):
1816         * platform/SecurityOrigin.h: Added.
1817
1818 2007-10-19  Simon Hausmann  <hausmann@kde.org>
1819
1820         Fix the Qt/Windows build: Added missing FontSelector.h include.
1821
1822         * platform/qt/FontQt.cpp:
1823
1824 2007-10-19  Simon Hausmann  <hausmann@kde.org>
1825
1826         Reviewed by Lars.
1827
1828         Qt/Windows build fix: Threading.h uses int32_t but doesn't include stdint.h.
1829
1830         * platform/Threading.h:
1831
1832 2007-10-19  Simon Hausmann  <hausmann@kde.org>
1833
1834         Reviewed by Lars.
1835
1836         Fix the Qt/Windows build, don't use cat but use the perl print trick
1837         instead.
1838
1839         * WebCore.pro:
1840
1841 2007-10-18  Justin Garcia  <justin.garcia@apple.com>
1842
1843         Reviewed by Kevin McCullough.
1844
1845         <rdar://problem/5483526> 
1846         GoogleDocs: A hang occurs when applying list styling to a selection containing a table and line breaks
1847
1848         * editing/TextIterator.cpp:
1849         (WebCore::TextIterator::exitNode): For selection preservation, we must emit a character
1850         between every VisiblePosition.  We weren't emitting a space after some tables, because
1851         we won't try to emit a space if shouldEmitNewlineAFterNode is true, even if no newline
1852         was emitted.
1853
1854 2007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
1855
1856         Reviewed by Adam Roben.
1857
1858         - fix <rdar://problem/5313523>
1859         REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard
1860
1861         * platform/network/mac/ResourceResponseMac.mm:
1862         (WebCore::ResourceResponse::doUpdateResourceResponse): Work around
1863         <rdar://problem/5321972> by testing for the case of a response
1864         with a MIME type of application/octet-stream and a Content-Type header
1865         starting with text/plain and setting the MIME type to text/plain in
1866         that case.
1867
1868 2007-10-18  Mark Rowe  <mrowe@apple.com>
1869
1870         Fix the no-SVG build.
1871
1872         * css/CSSPrimitiveValueMappings.h: Move the CSSPrimitiveValue implementations for
1873         LineCap, LineJoin and WindRule inside #if ENABLE(SVG).
1874
1875 2007-10-18  Darin Adler  <darin@apple.com>
1876
1877         Reviewed by Anders.
1878
1879         - some small tweaks to the threading implementation
1880
1881         I had trouble building on Windows. Either the problem went away by itself
1882         or one of these changes fixed it.
1883
1884         * platform/Threading.h: Eliminated the use of friend, and shared a single
1885         declaration for the initializeThreading function.
1886
1887         * platform/pthreads/ThreadingPthreads.cpp: (WebCore::ThreadCondition::wait):
1888         Call impl() here.
1889
1890         * platform/win/ThreadingWin.cpp: Got rid of two globals here with static
1891         constructors. Also added a typedef for the type of the function queue.
1892         (WebCore::functionQueueMutex): Added function.
1893         (WebCore::functionQueue): Ditto.
1894         (WebCore::callFunctionsOnMainThread): Use functions instead of using the
1895         globals directly.
1896         (WebCore::callOnMainThread): Ditto.
1897
1898         * css/CSSParser.cpp: Had to touch this file to make things build.
1899
1900 2007-10-18  Adam Roben  <aroben@apple.com>
1901
1902         Fix <rdar://5547462> Need to copy Inspector resources in Production builds
1903
1904         I also added an excludes file for the xcopy command to avoid copying
1905         .svn folders.
1906
1907         Reviewed by Geoff.
1908
1909         * WebCore.vcproj/WebCore.make: Make sure we copy the Inspector
1910         resources.
1911         * WebCore.vcproj/WebCore.vcproj: Pass /exclude:xcopy.excludes to
1912         xcopy.
1913         * WebCore.vcproj/xcopy.excludes: Added.
1914
1915 2007-10-18  Darin Adler  <darin@apple.com>
1916
1917         Reviewed by Sam.
1918
1919         - fix http://bugs.webkit.org/show_bug.cgi?id=15541
1920           REGRESSION (r26616): prompt with one argument uses the literal "undefined" as default reply
1921
1922         * page/DOMWindow.idl: Add ConvertUndefinedOrNullToNullString back for defaultValue.
1923
1924 2007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
1925
1926         Build fix. Not reviewed.
1927
1928         Hopefully fix win build by including wtf/MathExtras.h.
1929
1930         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1931
1932 2007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
1933
1934         Reviewed by Nikolas Zimmermann.
1935
1936         - fix http://bugs.webkit.org/show_bug.cgi?id=15367
1937           Assertion failure inspecting a document including soft hyphen code (0xad)
1938
1939         Test: fast/text/word-break-soft-hyphen.html
1940
1941         * rendering/RenderText.cpp:
1942         (WebCore::RenderText::calcPrefWidths): Changed to treat soft hyphens as 
1943         word boundaries. This fixes the bug and is consistent with the fact that
1944         run rounding does occur at soft hyphens.
1945
1946 2007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
1947
1948         Reviewed by Anders.
1949
1950         Fix last layout test failure seen on buildbot "trunk-mac-ppc-release".
1951         Problem: "svg/custom/mask-excessive-malloc.svg -> crashed"
1952
1953         Clamp any ImageBuffer allocation within SVG to the RenderView's visibleSize
1954         to avoid excessive mallocs (in the testcase above 1000000x1000000)
1955
1956         * ksvg2/svg/SVGMaskElement.cpp:
1957         (WebCore::SVGMaskElement::drawMaskerContent):
1958         * ksvg2/svg/SVGPatternElement.cpp:
1959         (WebCore::SVGPatternElement::buildPattern):
1960         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1961         (WebCore::SVGPaintServerGradient::teardown):
1962         (WebCore::SVGPaintServerGradient::setup):
1963         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
1964         (WebCore::SVGResourceMasker::applyMask):
1965         * rendering/SVGRenderSupport.cpp:
1966         (WebCore::clampImageBufferSizeToViewport):
1967         * rendering/SVGRenderSupport.h:
1968
1969 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
1970
1971         Windows build fix.
1972
1973         * css/CSSStyleSelector.cpp:
1974         (WebCore::CSSStyleSelector::applyProperty): Add braces around cases that have local variables now.
1975
1976 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
1977
1978         Release build fix.
1979
1980         * css/CSSStyleSelector.cpp:
1981         (WebCore::CSSStyleSelector::applyProperty): 
1982
1983 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
1984
1985         Reviewed by Darin.
1986
1987         Split most of CSSPrimitiveValue enum mapping out of CSSComputedStyleDeclaration::getPropertyCSSValue()
1988         and CSSStyleSelector::applyProperty() (and their SVG counterparts). This should make the code more readable.
1989
1990         * WebCore.xcodeproj/project.pbxproj:
1991         * css/CSSComputedStyleDeclaration.cpp:
1992         (WebCore::getPositionOffsetValue):
1993         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1994         * css/CSSPrimitiveValue.cpp:
1995         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1996         (WebCore::CSSPrimitiveValue::init):
1997         * css/CSSPrimitiveValue.h:
1998         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1999         * css/CSSPrimitiveValueMappings.h: Added.
2000         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2001         (WebCore::CSSPrimitiveValue::operator EBorderStyle):
2002         (WebCore::CSSPrimitiveValue::operator CompositeOperator):
2003         (WebCore::CSSPrimitiveValue::operator EAppearance):
2004         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
2005         (WebCore::CSSPrimitiveValue::operator EBackgroundRepeat):
2006         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
2007         (WebCore::CSSPrimitiveValue::operator EBoxDirection):
2008         (WebCore::CSSPrimitiveValue::operator EBoxLines):
2009         (WebCore::CSSPrimitiveValue::operator EBoxOrient):
2010         (WebCore::CSSPrimitiveValue::operator ECaptionSide):
2011         (WebCore::CSSPrimitiveValue::operator EClear):
2012         (WebCore::CSSPrimitiveValue::operator ECursor):
2013         (WebCore::CSSPrimitiveValue::operator EDisplay):
2014         (WebCore::CSSPrimitiveValue::operator EEmptyCell):
2015         (WebCore::CSSPrimitiveValue::operator EFloat):
2016         (WebCore::CSSPrimitiveValue::operator EKHTMLLineBreak):
2017         (WebCore::CSSPrimitiveValue::operator EListStylePosition):
2018         (WebCore::CSSPrimitiveValue::operator EListStyleType):
2019         (WebCore::CSSPrimitiveValue::operator EMarginCollapse):
2020         (WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
2021         (WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
2022         (WebCore::CSSPrimitiveValue::operator EMatchNearestMailBlockquoteColor):
2023         (WebCore::CSSPrimitiveValue::operator ENBSPMode):
2024         (WebCore::CSSPrimitiveValue::operator EOverflow):
2025         (WebCore::CSSPrimitiveValue::operator EPageBreak):
2026         (WebCore::CSSPrimitiveValue::operator EPosition):
2027         (WebCore::CSSPrimitiveValue::operator EResize):
2028         (WebCore::CSSPrimitiveValue::operator ETableLayout):
2029         (WebCore::CSSPrimitiveValue::operator ETextAlign):
2030         (WebCore::CSSPrimitiveValue::operator ETextSecurity):
2031         (WebCore::CSSPrimitiveValue::operator ETextTransform):
2032         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
2033         (WebCore::CSSPrimitiveValue::operator EUserDrag):
2034         (WebCore::CSSPrimitiveValue::operator EUserModify):
2035         (WebCore::CSSPrimitiveValue::operator EUserSelect):
2036         (WebCore::CSSPrimitiveValue::operator EVisibility):
2037         (WebCore::CSSPrimitiveValue::operator EWhiteSpace):
2038         (WebCore::CSSPrimitiveValue::operator EWordBreak):
2039         (WebCore::CSSPrimitiveValue::operator EWordWrap):
2040         (WebCore::CSSPrimitiveValue::operator LineCap):
2041         (WebCore::CSSPrimitiveValue::operator LineJoin):
2042         (WebCore::CSSPrimitiveValue::operator TextDirection):
2043         (WebCore::CSSPrimitiveValue::operator WindRule):
2044         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
2045         (WebCore::CSSPrimitiveValue::operator EColorInterpolation):
2046         (WebCore::CSSPrimitiveValue::operator EColorRendering):
2047         (WebCore::CSSPrimitiveValue::operator EDominantBaseline):
2048         (WebCore::CSSPrimitiveValue::operator EImageRendering):
2049         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
2050         (WebCore::CSSPrimitiveValue::operator EShapeRendering):
2051         (WebCore::CSSPrimitiveValue::operator ETextAnchor):
2052         (WebCore::CSSPrimitiveValue::operator ETextRendering):
2053         (WebCore::CSSPrimitiveValue::operator EWritingMode):
2054         * css/CSSStyleSelector.cpp:
2055         (WebCore::CSSStyleSelector::checkSelector):
2056         (WebCore::CSSStyleSelector::checkOneSelector):
2057         (WebCore::CSSRuleSet::addRulesFromSheet):
2058         (WebCore::convertToLength):
2059         (WebCore::CSSStyleSelector::applyDeclarations):
2060         (WebCore::CSSStyleSelector::applyProperty):
2061         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
2062         (WebCore::CSSStyleSelector::mapBackgroundClip):
2063         (WebCore::CSSStyleSelector::mapBackgroundComposite):
2064         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
2065         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
2066         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2067         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2068         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp:
2069         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
2070         * ksvg2/css/SVGCSSStyleSelector.cpp:
2071         (WebCore::CSSStyleSelector::applySVGProperty):
2072
2073 2007-10-18  Eric Seidel  <eric@webkit.org>
2074
2075         Reviewed by Maciej.
2076
2077         Fix crashers in SVGViewSpec::parseViewSpec
2078         http://bugs.webkit.org/show_bug.cgi?id=15504
2079
2080         Test is blocked by bug 15503, landed as:
2081         * svg/dom/viewspec-parser.html-disabled
2082
2083         * bindings/scripts/CodeGeneratorObjC.pm: support classes where all parents are interfaces
2084         * ksvg2/svg/SVGViewSpec.cpp:
2085         (WebCore::SVGViewSpec::parseViewSpec):
2086         * ksvg2/svg/SVGViewSpec.idl: Added.
2087
2088 2007-10-17  Rob Buis  <buis@kde.org>
2089
2090         Reviewed by Darin, Adam, and Maciej.
2091
2092         http://bugs.webkit.org/show_bug.cgi?id=12988
2093         First element (in document order) is not returned when other duplicate ID-ed elements were created first
2094
2095         Reset the element id cache when an id is added and there is a duplicate for that id.
2096
2097         * dom/Document.cpp:
2098         (WebCore::Document::addElementById):
2099
2100 2007-10-17  Mark Rowe  <mrowe@apple.com>
2101
2102         Mac build fix.
2103
2104         * Configurations/WebCore.xcconfig:  Make it possible to include CoreGraphics header files.
2105
2106 2007-10-17  Adam Roben  <aroben@apple.com>
2107
2108         Fix an ASSERT on launch on Windows
2109
2110         Fix dictated to me by Brady.
2111
2112         * loader/icon/IconDatabase.cpp:
2113         (WebCore::IconDatabase::syncThreadMainLoop): Make sure we hold
2114         m_syncLock before going into the loop.
2115
2116 2007-10-17  Adam Roben  <aroben@apple.com>
2117
2118         Windows build fix
2119
2120         Reviewed by NOBODY.
2121
2122         * platform/graphics/AffineTransform.h: Don't #include
2123         ApplicationServices.h.
2124         * platform/graphics/cg/GraphicsContextCG.cpp: Add an #include that's
2125         needed now that we're not #including ApplicationServices.h.
2126
2127 2007-10-17  Mark Rowe  <mrowe@apple.com>
2128
2129         Gtk build fix.  Move non-pthread stubs from Threading.h to ThreadingNone.cpp to prevent
2130         multiple-definition link errors.
2131
2132         * WebCore.pro:
2133         * platform/Threading.h:
2134         * platform/ThreadingNone.cpp: Added.
2135         (WebCore::createThread):
2136         (WebCore::waitForThreadCompletion):
2137         (WebCore::detachThread):
2138         (WebCore::Mutex::Mutex):
2139         (WebCore::Mutex::~Mutex):
2140         (WebCore::Mutex::lock):
2141         (WebCore::Mutex::tryLock):
2142         (WebCore::Mutex::unlock):
2143         (WebCore::ThreadCondition::ThreadCondition):
2144
2145 2007-10-17  Anders Carlsson  <andersca@apple.com>
2146
2147         Reviewed by Oliver.
2148
2149         * WebCore.xcodeproj/project.pbxproj:
2150         * WebCore.vcproj/WebCore.vcproj:
2151         
2152         * config.h:
2153         #define USE_PTHREADS on Windows.
2154         
2155         * loader/icon/IconDatabase.cpp:
2156         (WebCore::IconDatabase::getOrCreateIconRecord):
2157         (WebCore::IconDatabase::getOrCreatePageURLRecord):
2158         Update for mutex changes.
2159         
2160         * platform/Threading.h:
2161         (WebCore::):
2162         (WebCore::ThreadSafeShared::ThreadSafeShared):
2163         (WebCore::ThreadSafeShared::ref):
2164         (WebCore::ThreadSafeShared::deref):
2165         (WebCore::ThreadSafeShared::hasOneRef):
2166         (WebCore::ThreadSafeShared::refCount):
2167         (WebCore::ThreadSafeShared::isThreadSafe):
2168         Add a new Shared base class that uses a mutex to manage its refcount.
2169         
2170         (WebCore::createThread):
2171         (WebCore::waitForThreadCompletion):
2172         (WebCore::detachThread):
2173         New functions for thread creation.
2174         
2175         (WebCore::Mutex::Mutex):
2176         (WebCore::Mutex::~Mutex):
2177         (WebCore::Mutex::lock):
2178         (WebCore::Mutex::tryLock):
2179         (WebCore::Mutex::unlock):
2180         Move the definitions to ThreadingPthreads.cpp
2181         
2182         (WebCore::ThreadCondition::ThreadCondition):
2183         (WebCore::ThreadCondition::~ThreadCondition):
2184         (WebCore::ThreadCondition::wait):
2185         (WebCore::ThreadCondition::signal):
2186         (WebCore::ThreadCondition::broadcast):
2187         Move the definitions to ThreadingPthreads.cpp
2188         
2189         * platform/pthreads: Added.
2190         * platform/pthreads/ThreadingPthreads.cpp: Added.
2191         Add pthread specific implementation of the thread creation functions, Mutex and ThreadCondition.
2192
2193 2007-10-17  David Hyatt  <hyatt@apple.com>
2194
2195         Add support for creating a layer when a transform is in effect.  Add support to RenderStyle for
2196         handing back a computed AffineTransform.
2197
2198         Reviewed by Mitz Pettel
2199
2200         * css/CSSStyleSelector.cpp:
2201         (WebCore::CSSStyleSelector::adjustRenderStyle):
2202         * rendering/RenderBox.cpp:
2203         (WebCore::RenderBox::setStyle):
2204         * rendering/RenderObject.cpp:
2205         (WebCore::RenderObject::RenderObject):
2206         (WebCore::RenderObject::requiresLayer):
2207         (WebCore::RenderObject::setStyle):
2208         * rendering/RenderObject.h:
2209         (WebCore::RenderObject::hasTransform):
2210         (WebCore::RenderObject::setHasTransform):
2211         * rendering/RenderStyle.cpp:
2212         (WebCore::RenderStyle::applyTransform):
2213         * rendering/RenderStyle.h:
2214         (WebCore::RenderStyle::hasTransform):
2215         * rendering/RenderTableCell.cpp:
2216         (WebCore::RenderTableCell::requiresLayer):
2217         * rendering/RenderTableRow.h:
2218         (WebCore::RenderTableRow::requiresLayer):
2219
2220 2007-10-17  David Hyatt  <hyatt@apple.com>
2221
2222         Add support for mapping of the transform CSS property into RenderStyles.  Everything is now ready for the front
2223         end to use.
2224
2225         Reviewed by Mitz Pettel
2226
2227         * WebCore.xcodeproj/project.pbxproj:
2228         * css/CSSStyleSelector.cpp:
2229         (WebCore::CSSStyleSelector::applyProperty):
2230         * css/CSSTransformValue.h:
2231         (WebCore::CSSTransformValue::type):
2232         (WebCore::CSSTransformValue::values):
2233         * platform/graphics/AffineTransform.cpp:
2234         (WebCore::AffineTransform::skew):
2235         * platform/graphics/AffineTransform.h:
2236         * rendering/RenderStyle.cpp:
2237         (WebCore::StyleTransformData::StyleTransformData):
2238         (WebCore::StyleTransformData::operator==):
2239         (WebCore::StyleTransformData::transformDataEquivalent):
2240         * rendering/RenderStyle.h:
2241         (WebCore::TransformOperation::~TransformOperation):
2242         (WebCore::TransformOperation::operator!=):
2243         (WebCore::TransformOperation::isScaleOperation):
2244         (WebCore::TransformOperation::isRotateOperation):
2245         (WebCore::TransformOperation::isSkewOperation):
2246         (WebCore::TransformOperation::isTranslateOperation):
2247         (WebCore::TransformOperation::isMatrixOperation):
2248         (WebCore::ScaleTransformOperation::ScaleTransformOperation):
2249         (WebCore::ScaleTransformOperation::isScaleOperation):
2250         (WebCore::ScaleTransformOperation::operator==):
2251         (WebCore::ScaleTransformOperation::apply):
2252         (WebCore::RotateTransformOperation::RotateTransformOperation):
2253         (WebCore::RotateTransformOperation::isRotateOperation):
2254         (WebCore::RotateTransformOperation::operator==):
2255         (WebCore::RotateTransformOperation::apply):
2256         (WebCore::SkewTransformOperation::SkewTransformOperation):
2257         (WebCore::SkewTransformOperation::isSkewOperation):
2258         (WebCore::SkewTransformOperation::operator==):
2259         (WebCore::SkewTransformOperation::apply):
2260         (WebCore::TranslateTransformOperation::TranslateTransformOperation):
2261         (WebCore::TranslateTransformOperation::isTranslateOperation):
2262         (WebCore::TranslateTransformOperation::operator==):
2263         (WebCore::TranslateTransformOperation::apply):
2264         (WebCore::MatrixTransformOperation::MatrixTransformOperation):
2265         (WebCore::MatrixTransformOperation::isMatrixOperation):
2266         (WebCore::MatrixTransformOperation::operator==):
2267         (WebCore::MatrixTransformOperation::apply):
2268         (WebCore::StyleTransformData::operator!=):
2269         (WebCore::RenderStyle::transform):
2270         (WebCore::RenderStyle::setTransform):
2271         (WebCore::RenderStyle::initialTransform):
2272
2273 2007-10-17  Adam Roben  <aroben@apple.com>
2274
2275         * page/Frame.cpp: I had to touch this file when fixing the Windows
2276         build. Checking it in in case it helps others, too.
2277
2278 2007-10-17  Eric Seidel  <eric@webkit.org>
2279
2280         Reviewed by Mark Rowe.
2281         
2282         Remove a couple more uses of svg_dynamic_cast.
2283
2284         No functional changes, no tests.
2285
2286         * ksvg2/svg/SVGPatternElement.cpp:
2287         (WebCore::SVGPatternElement::buildPattern):
2288
2289 2007-10-17  Mark Rowe  <mrowe@apple.com>
2290
2291         Reviewed by Eric and Geoff.
2292
2293         <rdar://problem/5453743> Repro ASSERT in CachedResource::setEncodedSize() loading image in background tab
2294         http://bugs.webkit.org/show_bug.cgi?id=15191
2295
2296         * loader/DocLoader.cpp:
2297         (WebCore::DocLoader::setAutoLoadImages): Don't start a load if the CachedImage is already loading.
2298
2299 2007-10-17  Justin Garcia  <justin.garcia@apple.com>
2300
2301         Reviewed by Harrison.
2302         
2303         <rdar://problem/5481523> 
2304         GoogleDocs: Safari hangs when indenting a particular table twice
2305         
2306         Fixed by fixing problems with the selection preservation done by IndentOutdentCommand.
2307         It is now more difficult to create selections that cause hangs.  Those are covered by:
2308         <rdar://problem/5543472>
2309
2310         * editing/IndentOutdentCommand.cpp:
2311         (WebCore::indexForVisiblePosition): Compute indices from the first VisiblePosition
2312         in the document, instead of the first Position.
2313         Use rangeCompliantEquivalents when creating the Range that we pass to rangeLength.
2314         Tell TextIterator::rangeLength that we're doing selection preservation, so that it
2315         will emit characters between all VisiblePositions.
2316         (WebCore::IndentOutdentCommand::indentRegion): Fixed a bug where the range and location
2317         passed to rangeFromLocationAndLength were reversed.
2318         Tell rangeFromLocationAndLength that we're doing doing selection preservation, as
2319         above.
2320         * editing/TextIterator.cpp:
2321         (WebCore::CharacterIterator::CharacterIterator): 
2322         (WebCore::TextIterator::rangeLength): Rename emitSpacesForReplacedElements
2323         to forSelectionPreservation, to match the name of the boolean inside TextIterator and
2324         to match its meaning after r25522.
2325         (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
2326
2327 2007-10-16  Darin Adler  <darin@apple.com>
2328
2329         Reviewed by Mitz.
2330
2331         - fix http://bugs.webkit.org/show_bug.cgi?id=15536
2332           need to cache missing glyph so we're not slow on pages that show missing glyphs
2333
2334         - <rdar://problem/5404359> UI thread stall (>60sec) in MLANG running stress test
2335           (related to font data caching)
2336
2337         * platform/Font.cpp: (WebCore::Font::glyphDataForCharacter): Check for a null value
2338         for fontData rather than for glyph to detect non-cached entries in the glyph data.
2339
2340         * platform/gtk/GlyphPageTreeNodeGtk.cpp: (WebCore::GlyphPage::fill):
2341         * platform/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill):
2342         * platform/win/GlyphPageTreeNodeWin.cpp: (WebCore::GlyphPage::fill):
2343         Set fontData to 0 for missing glyph entries. Also fixed the Windows and GTK versions
2344         to return the proper value for haveGlyphs.
2345
2346 2007-10-16  Mark Rowe  <mrowe@apple.com>
2347
2348         Gtk build fix.  Replace use of assert with ASSERT_NOT_REACHED.
2349
2350         * platform/gtk/FontCacheGtk.cpp:
2351         (WebCore::FontCache::platformInit):
2352
2353 2007-10-16  Darin Adler  <darin@apple.com>
2354
2355         Reviewed by Adam.
2356
2357         - fix http://bugs.webkit.org/show_bug.cgi?id=15534
2358           WebScriptObject.h has some formatting and editorial mistakes
2359
2360         * bindings/objc/WebScriptObject.h: Fix wording and formatting.
2361
2362 2007-10-16  Darin Adler  <darin@apple.com>
2363
2364         - try to fix the Qt build
2365
2366         * config.h: Don't use DisallowCType.h, since it's incompatible with some C++ headers
2367         that are used in some Qt-specific source files.
2368
2369 2007-10-16  Darin Adler  <darin@apple.com>
2370
2371         Reviewed by Adele.
2372
2373         - fix http://bugs.webkit.org/show_bug.cgi?id=15525
2374           transpose (control-T) should do the last two characters on a line if at end of line
2375         - remove unused CommandByName class
2376         - move transpose command implementation here from Mac OS X WebKit
2377
2378         * editing/Editor.h:
2379         * editing/Editor.cpp:
2380         (WebCore::execTranspose): Added.
2381         (WebCore::Editor::transpose): Added. This has the transpose implementation from
2382         WebCoreFrameBridge and WebHTMLView, translated into WebCore-style C++ and with
2383         a special case for the end of a paragraph.
2384
2385         * page/Frame.h: Removed unused command() function member.
2386         * page/FramePrivate.h: Removed unused m_command data member.
2387         * page/Frame.cpp: Ditto.
2388
2389         * page/mac/WebCoreFrameBridge.h: Removed rangeOfCharactersAroundCaret method.
2390         * page/mac/WebCoreFrameBridge.mm: Ditto.
2391
2392         * WebCore.pro: Removed CommandByName.h/cpp.
2393         * WebCore.vcproj/WebCore.vcproj: Ditto.
2394         * WebCore.xcodeproj/project.pbxproj: Ditto.
2395
2396         * editing/CommandByName.cpp: Removed.
2397         * editing/CommandByName.h: Removed.
2398
2399 2007-10-16  Darin Adler  <darin@apple.com>
2400
2401         Reviewed by Maciej and Geoff (and looked over by Eric).
2402
2403         - http://bugs.webkit.org/show_bug.cgi?id=15519
2404           eliminate use of <ctype.h> for processing ASCII
2405
2406         * ForwardingHeaders/wtf/ASCIICType.h: Added.
2407         * ForwardingHeaders/wtf/DisallowCType.h: Added.
2408
2409         * WebCorePrefix.h: Get rid of inclusion of <ctype.h>.
2410         * config.h: Include DisallowCType.h.
2411
2412         * css/CSSParser.cpp:
2413         (WebCore::ParseString::lower):
2414         * css/CSSPrimitiveValue.cpp:
2415         (WebCore::isCSSTokenizerIdentifier):
2416         * css/CSSStyleDeclaration.cpp:
2417         (WebCore::propertyID):
2418         * html/HTMLSelectElement.cpp:
2419         (WebCore::stripLeadingWhiteSpace):
2420         * html/HTMLTokenizer.cpp:
2421         (WebCore::tagMatch):
2422         * loader/FTPDirectoryParser.cpp:
2423         (WebCore::parseOneFTPLine):
2424         * loader/TextResourceDecoder.cpp:
2425         (WebCore::TextResourceDecoder::checkForHeadCharset):
2426         * platform/DeprecatedCString.cpp:
2427         (WebCore::DeprecatedCString::lower):
2428         (WebCore::DeprecatedCString::upper):
2429         (WebCore::DeprecatedCString::find):
2430         (WebCore::DeprecatedCString::contains):
2431         * platform/DeprecatedString.cpp:
2432         (WebCore::equalCaseInsensitive):
2433         (WebCore::isCharacterAllowedInBase):
2434         (WebCore::DeprecatedString::find):
2435         (WebCore::DeprecatedString::contains):
2436         (WebCore::toIntegralType):
2437         * platform/DeprecatedString.h:
2438         (WebCore::DeprecatedChar::isSpace):
2439         (WebCore::DeprecatedChar::lower):
2440         (WebCore::DeprecatedChar::upper):
2441         * platform/KURL.cpp:
2442         (WebCore::KURL::parse):
2443         * platform/StringImpl.cpp:
2444         (WebCore::isSpace):
2445         (WebCore::StringImpl::containsOnlyWhitespace):
2446         (WebCore::StringImpl::isLower):
2447         (WebCore::StringImpl::lower):
2448         (WebCore::StringImpl::find):
2449         (WebCore::StringImpl::reverseFind):
2450         (WebCore::equalIgnoringCase):
2451         * platform/TextEncodingRegistry.cpp:
2452         (WebCore::TextEncodingNameHash::equal):
2453         (WebCore::TextEncodingNameHash::hash):
2454         (WebCore::atomicCanonicalTextEncodingName):
2455         * platform/mac/KeyEventMac.mm:
2456         (WebCore::keyIdentifierForKeyEvent):
2457         * platform/win/KeyEventWin.cpp:
2458         (WebCore::keyIdentifierForWindowsKeyCode):
2459         * platform/win/PopupMenuWin.cpp:
2460         (WebCore::isASCIIPrintable):
2461         (WebCore::PopupWndProc):
2462         * plugins/win/PluginViewWin.cpp:
2463         (WebCore::capitalizeRFC822HeaderFieldName):
2464         * rendering/RenderText.cpp:
2465         (WebCore::RenderText::widthFromCache):
2466         Use ASCIICType.h functions instead of ctype.h ones.
2467
2468 2007-10-16  Mitz Pettel  <mitz@webkit.org>
2469
2470         Reviewed by Dave Hyatt.
2471
2472         - fix http://bugs.webkit.org/show_bug.cgi?id=15296
2473           REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.
2474
2475         Test: fast/block/float/marquee-shrink-to-avoid-floats.html
2476
2477         * rendering/RenderObject.cpp:
2478         (WebCore::RenderObject::shrinkToAvoidFloats): Changed to return 'true' for <marquee>s with auto width.
2479
2480 2007-10-16  Beth Dakin  <bdakin@apple.com>
2481
2482         Reviewed by Darin.
2483
2484         Fix for <rdar://problem/5517118> REGRESSION: 9A570 - Safari renders 
2485         Amazon seller page way too small
2486
2487         The font size at Amazon was way too small because the calls to 
2488         getComputedStyle and getPropertyValue did not cause the div to 
2489         attach because there was a pending stylesheet. The fix is to call 
2490         updateLayoutIgnorePendingStylesheets() instead of just 
2491         updateLayout().
2492
2493         * css/CSSComputedStyleDeclaration.cpp:
2494         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2495
2496 2007-10-16  David Hyatt  <hyatt@apple.com>
2497
2498         Get transform-origin(x/y) mapped into the front end RenderStyle.  Adds a new StyleTransformData struct that
2499         holds transform-origin (and that will also eventually hold the parsed transform operations as well).
2500
2501         Reviewed by Beth
2502
2503         * css/CSSStyleSelector.cpp:
2504         (WebCore::CSSStyleSelector::applyProperty):
2505         * rendering/RenderStyle.cpp:
2506         (WebCore::StyleTransformData::StyleTransformData):
2507         (WebCore::StyleTransformData::operator==):
2508         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2509         (WebCore::StyleRareNonInheritedData::operator==):
2510         (WebCore::RenderStyle::RenderStyle):
2511         (WebCore::RenderStyle::diff):
2512         * rendering/RenderStyle.h:
2513         (WebCore::StyleTransformData::operator!=):
2514         (WebCore::RenderStyle::transformOriginX):
2515         (WebCore::RenderStyle::transformOriginY):
2516         (WebCore::RenderStyle::setTransformOriginX):
2517         (WebCore::RenderStyle::setTransformOriginY):
2518         (WebCore::RenderStyle::initialTransformOriginX):
2519         (WebCore::RenderStyle::initialTransformOriginY):
2520
2521 2007-10-16  Adele Peterson  <adele@apple.com>
2522
2523         Reviewed by Alice.
2524
2525         Fix for <rdar://problem/5538793> REGRESSION: Failing layout test: fast/forms/select-change-listbox-to-popup.html (due to landing feature branch)
2526
2527         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute):  When switching between types of select elements, call setRecalcListItems
2528           since recalcListItems updates the default selection in different ways for the different controls. 
2529
2530 2007-10-16  Alice Liu  <alice.liu@apple.com>
2531
2532         rubber-stamped by Darin.
2533
2534         flipping my previous fix around so that mac is special-cased instead of win.
2535
2536         * dom/Document.cpp:
2537         (WebCore::Document::defaultEventHandler):
2538
2539 2007-10-16  David Hyatt  <hyatt@apple.com>
2540
2541         Clean up transform parsing.  Fix a crash, ditch the extra parse context class, and use RefPtr/PassRefPtr more
2542         to simplify the code.
2543
2544         Reviewed by aroben
2545
2546         * css/CSSParser.cpp:
2547         (WebCore::CSSParser::parseValue):
2548         (WebCore::CSSParser::parseTransform):
2549         * css/CSSParser.h:
2550
2551 2007-10-16  Alice Liu  <alice.liu@apple.com>
2552
2553         Reviewed by Adele.
2554
2555         fixed <rdar://5085596> Accesskeys don't work
2556         
2557         * dom/Document.cpp:
2558         (WebCore::Document::defaultEventHandler):
2559         accesskey modifier is platform-depedent.
2560
2561 2007-10-15  Mark Rowe  <mrowe@apple.com>
2562
2563         Reviewed by John.
2564
2565         <rdar://problem/5494040> Reproducible assertion failure in WebCore::IconDatabase::iconForPageURL
2566
2567         A race condition between icon database import and Safari asking for an icon for the empty URL
2568         was resulting in a PageURLRecord being created for a URL that can never be retained.  By enforcing
2569         that PageURLRecord's cannot be created for the empty URL we can prevent the assertion from failing.
2570
2571         * loader/icon/IconDatabase.cpp:
2572         (WebCore::IconDatabase::iconForPageURL):
2573         (WebCore::IconDatabase::getOrCreatePageURLRecord): Bail out early if the URL is empty.
2574         (WebCore::IconDatabase::performURLImport): Don't create the PageURLRecord if the URL is empty.
2575
2576 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2577
2578         Reviewed by Ollie.
2579
2580         Use OwnPtr for m_deliveryData, and fix a bug where we were memmove()ing
2581         over m_deliveryData instead of its data buffer
2582
2583         * plugins/win/PluginStreamWin.cpp:
2584         (WebCore::PluginStreamWin::~PluginStreamWin): Don't delete
2585         m_deliveryData
2586         (WebCore::PluginStreamWin::deliverData): Fix memmove() call
2587         (WebCore::PluginStreamWin::didReceiveData): Assign using OwnPtr::set()
2588         * plugins/win/PluginStreamWin.h: Use OwnPtr
2589
2590 2007-10-15  Steve Falkenburg  <sfalken@apple.com>
2591
2592         Reviewed by Oliver.
2593
2594         Add missing null check.
2595
2596         * platform/network/cf/AuthenticationCF.cpp:
2597         (WebCore::core):
2598
2599 2007-10-15  Mark Rowe  <mrowe@apple.com>
2600
2601         Fix the no-SVG build again.  Add new transform CSS properties to the switch statements.
2602
2603         * css/CSSComputedStyleDeclaration.cpp:
2604         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2605         * css/CSSStyleSelector.cpp:
2606         (WebCore::CSSStyleSelector::applyProperty):
2607
2608 2007-10-15  Darin Adler  <darin@apple.com>
2609
2610         Reviewed by Mitz.
2611
2612         - http://bugs.webkit.org/show_bug.cgi?id=15518
2613           Remove the unused attemptFontSubstitution feature and do some
2614           cleanup of glyphDataForCharacter.
2615
2616         * platform/Font.h:
2617         * platform/Font.cpp:
2618         (WebCore::WidthIterator::advance): Eliminated uneeded attemptFontSubstitution
2619         and cluster parameters to the glyphDataForCharacter function.
2620         (WebCore::Font::glyphDataForCharacter): Removed the cluster parameter and
2621         attemptFontSubstitution parameter. Removed the isUpper check before calling
2622         toUpper in the small caps code path. Split up the inner loop into separate
2623         copies for non-small-caps and small caps. Broke out the system fallback
2624         page handling so it's not inside the loop. Changed system fallback so it uses
2625         the character and breaks it up into UTF-16 as needed, instead of using a
2626         passed-in "character cluster".
2627
2628         * platform/TextStyle.h:
2629         (WebCore::TextStyle::TextStyle): Removed attemptFontSubstitution.
2630         (WebCore::TextStyle::applyWordRounding): Ditto.
2631
2632 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2633
2634         Reviewed by Ollie.
2635
2636         Remove an operator precedence warning on Windows
2637
2638         * editing/markup.cpp:
2639         (WebCore::escapeContentText): Use (a) | (b)
2640         (WebCore::appendEscapedContent): Use (a) | (b)
2641
2642 2007-10-15  Kevin McCullough  <kmccullough@apple.com>
2643
2644         Reviewed by Darin.
2645
2646         - <rdar://problem/5238818> window.resizeTo doesn't restrict the resized window to the size of the screen
2647         - Now we take the doc into account when resizing.
2648         - Also I found an issue where we would resize to outside the window, because
2649           the resize would be smaller than the window size but the location of the
2650           window would make the resize go off-screen. Now we move the window back into the screen.
2651
2652         * bindings/js/kjs_window.cpp:
2653         (KJS::adjustWindowRect):
2654         (KJS::WindowFunc::callAsFunction):
2655
2656 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2657
2658         Reviewed by Anders.
2659
2660         <rdar://5510700> Repro crash loading embedded Windows Media Player
2661         content
2662
2663         Anders noticed that the older Windows Media Player plugin (npdsplay.dll)
2664         will crash if it receives its resource requests out of order, whereas we
2665         were immediately fulfilling untargeted, non-JavaScript requests and
2666         scheduling targeted or JavaScript resource requests. Implement his
2667         suggested fix, which is to schedule PluginRequests for all resource
2668         requests 
2669
2670         * plugins/win/PluginViewWin.cpp:
2671         (WebCore::getString):
2672         (WebCore::PluginViewWin::performRequest): If this non-JavaScript request
2673         has no target, create a stream for it
2674         (WebCore::PluginViewWin::load): Schedule PluginRequests for all resource
2675         requests
2676
2677 2007-10-15  Mark Rowe  <mrowe@apple.com>
2678
2679         Gtk and Qt build fix.  Add new .cpp file to project.
2680
2681         * WebCore.pro:
2682
2683 2007-10-15  John Sullivan  <sullivan@apple.com>
2684
2685         * platform/mac/FontDataMac.mm:
2686         D'oh! Added missing #import to fix build
2687
2688 2007-10-15  John Sullivan  <sullivan@apple.com>
2689
2690         Reviewed by Geoff
2691
2692         * platform/mac/FontDataMac.mm:
2693         (WebCore::FontData::smallCapsFontData):
2694         replace NS_DURING/NS_HANDLER with WebCore-style BEGIN/END_BLOCK_OBJC_EXCEPTIONS
2695
2696 2007-10-15  David Hyatt  <hyatt@apple.com>
2697
2698         The CSS WG has been discussing the concept of rotation.  In the latest draft specification, two properties
2699         have been introduced: rotation and rotation-point.  I believe these properties should be generalized to
2700         allow for arbitrary transformations (e.g., translation, skew, rotate, scale).
2701
2702         This patch adds support for the back-end parsing of two new CSS properties: transform and transform-origin.
2703         They are directly analogous to the properties specified by the CSS WG, except that they are designed to allow
2704         for arbitrary affine transforms rather than just rotation.
2705
2706         Reviewed by Beth Dakin
2707
2708         * WebCore.xcodeproj/project.pbxproj:
2709         * WebCore.vcproj/WebCore.vcproj:
2710         * css/CSSComputedStyleDeclaration.cpp:
2711         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2712         * css/CSSParser.cpp:
2713         (WebCore::CSSParser::parseValue):
2714         (WebCore::TransformParseContext:::m_list):
2715         (WebCore::TransformParseContext::list):
2716         (WebCore::TransformParseContext::failed):
2717         (WebCore::TransformParseContext::addValue):
2718         (WebCore::TransformOperationInfo::TransformOperationInfo):
2719         (WebCore::TransformOperationInfo::type):
2720         (WebCore::TransformOperationInfo::argCount):
2721         (WebCore::TransformOperationInfo::unit):
2722         (WebCore::TransformOperationInfo::unknown):
2723         (WebCore::TransformOperationInfo::hasCorrectArgCount):
2724         (WebCore::CSSParser::parseTransform):
2725         (WebCore::CSSParser::parseTransformOrigin):
2726         * css/CSSParser.h:
2727         * css/CSSPropertyNames.in:
2728         * css/CSSTransformValue.cpp: Added.
2729         (WebCore::CSSTransformValue::CSSTransformValue):
2730         (WebCore::CSSTransformValue::~CSSTransformValue):
2731         (WebCore::CSSTransformValue::addValue):
2732         (WebCore::CSSTransformValue::cssText):
2733         * css/CSSTransformValue.h: Added.
2734         (WebCore::CSSTransformValue::):
2735
2736 2007-10-15  Mark Rowe  <mrowe@apple.com>
2737
2738         Reviewed by Oliver.
2739
2740         Fix the no-SVG build.
2741
2742         * DerivedSources.make: Use the correct file as input to generate CSSPropertyNames.h.
2743         * rendering/RenderObject.cpp:
2744         (WebCore::objectIsRelayoutBoundary):
2745
2746 2007-10-15  Darin Adler  <darin@apple.com>
2747
2748         Reviewed by Sam.
2749
2750         - fix http://bugs.webkit.org/show_bug.cgi?id=15520
2751           alert(undefined) should say "undefined" in the alert
2752
2753         Test: fast/dom/Window/alert-undefined.html
2754
2755         * page/DOMWindow.idl: Remove ConvertUndefinedOrNullToNullString from alert, confirm, and prompt.
2756         It turns out that the default behavior is what the other browsers do (browsers tested: IE 7,
2757         Firefox 2).
2758
2759 2007-10-15  Adele Peterson  <adele@apple.com>
2760
2761         Reviewed by Darin.
2762
2763         Fix for http://bugs.webkit.org/show_bug.cgi?id=15252
2764         <rdar://problem/5498184> REGRESSION: <select multiple> doesn't scroll to top when old options are removed and new ones are added, leaving listbox empty-looking
2765
2766         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::calcHeight): If the scrollbar is disabled, make sure the scroll offset gets reset to 0.  In general,
2767           we don't want to unnecessarily adjust the scroll offset, but in this case, there won't be an obvious way for the user to adjust the scroller position once it's disabled.
2768
2769 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2770
2771         Reviewed by Maciej.
2772
2773         Return a more appropriate error from NPN_RequestRange, which is
2774         currently unimplemented
2775
2776         * plugins/win/npapi.cpp: return NPERR_STREAM_NOT_SEEKABLE 
2777         (NPN_RequestRead):
2778
2779 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2780
2781         Reviewed by Maciej.
2782
2783         Add a missing function pointer to the m_browserFuncs structure
2784
2785         * plugins/win/PluginPackageWin.cpp:
2786         (WebCore::PluginPackageWin::load):
2787
2788 2007-10-15  Simon Hausmann  <hausmann@kde.org>
2789
2790         Reviewed by Lars.
2791
2792         Fix the compilation of the Font code in the Qt port by adding the necessary stubs to support downloadable fonts through the @font-face rules.
2793
2794         * WebCore.pro:
2795         * loader/CachedFont.cpp:
2796         * platform/qt/FontCacheQt.cpp: Removed.
2797         * platform/qt/FontCustomPlatformData.cpp: Removed.
2798         * platform/qt/FontCustomPlatformData.h: Removed.
2799         * platform/qt/FontDataQt.cpp: Removed.
2800         * platform/qt/FontPlatformData.h: Removed.
2801         * platform/qt/FontQt.cpp:
2802         * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.
2803
2804 2007-10-15  Simon Hausmann  <hausmann@kde.org>
2805
2806         Reviewed by Lars.
2807
2808         Adapt to the latest API changes in the SVG API/Code.
2809
2810         * platform/graphics/svg/qt/RenderPathQt.cpp:
2811         (WebCore::RenderPath::strokeContains):
2812         (WebCore::getPathStroke):
2813         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
2814         (WebCore::SVGPaintServer::setPenProperties):
2815         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
2816
2817 2007-10-14  Nikolas Zimmermann  <zimmermann@kde.org>
2818
2819         Reviewed by Eric.
2820
2821         Fix bad abstraction in ImageBuffer class.
2822         While the class itself is platform-aware and thus it's location in platform/graphics
2823         is fine, it contains the "renderSubtreeToImage" method which operates on RenderObject.
2824
2825         As it's SVG specific I decided to move this method into SVGRenderSupport, to avoid
2826         implicit platform/ <-> rendering/ dependencies.
2827
2828         * WebCore.pro:
2829         * WebCore.vcproj/WebCore.vcproj:
2830         * WebCore.xcodeproj/project.pbxproj:
2831         * ksvg2/svg/SVGMaskElement.cpp:
2832         (WebCore::SVGMaskElement::drawMaskerContent):
2833         * ksvg2/svg/SVGPatternElement.cpp:
2834         (WebCore::SVGPatternElement::buildPattern):
2835         * platform/graphics/ImageBuffer.cpp: Removed.
2836         * platform/graphics/ImageBuffer.h:
2837         (WebCore::ImageBuffer::size):
2838         * platform/graphics/svg/SVGImage.cpp:
2839         (WebCore::SVGImage::nativeImageForCurrentFrame):
2840         * rendering/SVGRenderSupport.cpp:
2841         (WebCore::renderSubtreeToImage):
2842         * rendering/SVGRenderSupport.h:
2843
2844 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
2845
2846         Reviewed by Maciej.
2847
2848         http://bugs.webkit.org/show_bug.cgi?id=15210
2849         Draw the image outline even for broken images.
2850
2851         * rendering/RenderImage.cpp:
2852         (WebCore::RenderImage::paint):
2853
2854 2007-10-14  Kevin Ollivier  <kevino@theolliviers.com>
2855
2856         Reviewed by Adam.
2857
2858         Add support for MSVC7, and fix cases where PLATFORM(WIN) should
2859         be PLATFORM(WIN_OS) for other ports building on Windows.
2860
2861         * dom/XMLTokenizer.cpp:
2862         * page/FrameTree.cpp:
2863         * platform/StaticConstructors.h:
2864         * platform/String.cpp:
2865
2866 2007-10-14  Maxime Britto  <mbritto@pleyo.com>
2867
2868         Reviewed by Mitz.
2869
2870         Fix an error in the goBackOrForward() function : confusion between forwardListCount and backListCount.
2871         http://bugs.webkit.org/show_bug.cgi?id=15212
2872
2873         * loader/FrameLoader.cpp:
2874         (WebCore::FrameLoader::goBackOrForward):
2875
2876 2007-10-14  Mitz Pettel  <mitz@webkit.org>
2877
2878         Reviewed by Darin.
2879
2880         - fix http://bugs.webkit.org/show_bug.cgi?id=15181
2881           text-transform: uppercase not working in input (submit, reset, button) elements
2882           <rdar://problem/5474647>
2883
2884         Test: fast/forms/button-text-transform.html
2885
2886         Text transformations require access to the original text. The button's inner
2887         text was an anonymous RenderText, meaning it did not have a node to retrieve
2888         the original text from. The patch fixes this by changing the inner text into a
2889         RenderTextFragment, which stores its own original text.
2890
2891         * rendering/RenderButton.cpp:
2892         (WebCore::RenderButton::setText):
2893         * rendering/RenderButton.h:
2894
2895 2007-10-14  Eric Seidel  <eric@webkit.org>
2896
2897         Reviewed by Maciej.
2898
2899         REGRESSION: Javascript bug in getElementsByName
2900         http://bugs.webkit.org/show_bug.cgi?id=15274
2901
2902         Test: fast/dom/getelementbyname-invalidation.html
2903
2904         * dom/NameNodeList.h: remove empty rootNodeChildrenChanged override
2905
2906 2007-10-14  Mitz Pettel  <mitz@webkit.org>
2907
2908         Reviewed by Maciej.
2909
2910         - http://bugs.webkit.org/show_bug.cgi?id=15303
2911           Remove now-redundant code to restore dialog arguments after clear
2912
2913         This patch reverts the kjs_window.* parts of r25576 because following
2914         r25783, window properties, including dialog arguments, are not cleared
2915         when the newly created modal dialog transitions to the document.
2916
2917         * bindings/js/kjs_window.cpp:
2918         (KJS::WindowPrivate::WindowPrivate):
2919         (KJS::createWindow):
2920         (KJS::showModalDialog):
2921         (KJS::Window::clear):
2922         (KJS::WindowFunc::callAsFunction):
2923         (KJS::Window::setReturnValueSlot):
2924         * bindings/js/kjs_window.h:
2925
2926 2007-10-14  Mitz Pettel  <mitz@webkit.org>
2927
2928         Reviewed by Dave Hyatt.
2929
2930         - fix http://bugs.webkit.org/show_bug.cgi?id=15309
2931           <rdar://problem/5512020> Crash due to infinite recursion in RenderTable::addChild
2932
2933         Test: fast/table/generated-caption.html
2934
2935         * rendering/RenderTable.cpp:
2936         (WebCore::RenderTable::addChild): Changed to make sure that the child is
2937         not added into generated after content. Also made adding a child before
2938         a table caption work correctly instead of adding the child after the caption.
2939
2940 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
2941
2942         Reviewed by Maciej.
2943
2944         http://bugs.webkit.org/show_bug.cgi?id=15141
2945         Feed GIF reader data from the point in the stream it expects.  Also,
2946         mirror the reader's failure state up to the wrapping decoder.
2947
2948         * platform/image-decoders/gif/GIFImageReader.cpp:
2949         (GIFImageReader::read):
2950
2951 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
2952
2953         Reviewed by Maciej.
2954
2955         http://bugs.webkit.org/show_bug.cgi?id=15142
2956         Return correct frame count in GIFImageDecoder::frameBufferAtIndex(),
2957         even if more data has arrived since the last decoding pass.
2958
2959         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2960         (WebCore::GIFImageDecoder::frameBufferAtIndex):
2961
2962 == Rolled over to ChangeLog-2007-10-14 ==