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