2007-11-19 Doug Turner <dougt@meer.net>
[WebKit-https.git] / WebCore / ChangeLog
1 2007-11-19  Doug Turner  <dougt@meer.net>
2
3         Reviewed by Timothy Hatcher.
4
5         http://bugs.webkit.org/show_bug.cgi?id=16050
6         sqlite3_prepare16_v2 build bustage.
7
8         Using the correct SQLITE_VERSION_NUMBER around sqlite_prepare16_v2
9         to fix build bustage.
10
11         * platform/sql/SQLiteStatement.cpp:
12         (WebCore::SQLiteStatement::prepare):
13
14 2007-11-19  Mark Rowe  <mrowe@apple.com>
15
16         Build fix.  Don't over-qualify the constructor name.
17
18         * storage/DatabaseDetails.h:
19
20 2007-11-19  Brady Eidson <beidson@apple.com>
21
22         Reviewed by Maciej
23
24         Stub out the WebCore parts of the WebKit API
25
26         * WebCore.base.exp:
27         * WebCore.xcodeproj/project.pbxproj:
28
29         * storage/DatabaseDetails.h: Added.  Simple container for vitals on a specific database
30         (WebCore::DatabaseDetails::DatabaseDetails::DatabaseDetails):
31         (WebCore::DatabaseDetails::DatabaseDetails):
32         (WebCore::DatabaseDetails::isValid):
33         (WebCore::DatabaseDetails::name):
34         (WebCore::DatabaseDetails::version):
35         (WebCore::DatabaseDetails::displayName):
36         (WebCore::DatabaseDetails::expectedUsage):
37         (WebCore::DatabaseDetails::currentUsage):
38
39         * storage/DatabaseTracker.cpp:  Added various methods for API usage
40         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
41         (WebCore::DatabaseTracker::usageForOrigin):
42         (WebCore::DatabaseTracker::quotaForOrigin):
43         (WebCore::DatabaseTracker::setQuota):
44         * storage/DatabaseTracker.h:
45
46 2007-11-19  Kevin Ollivier  <kevino@theolliviers.com>
47
48         wx port build fix.
49
50         * platform/graphics/wx/AffineTransformWx.cpp:
51         (WebCore::AffineTransform::operator== ):
52         m_transform is only available when using wxGraphicsContext.
53
54 2007-11-19  Alp Toker  <alp@atoker.com>
55
56         Reviewed by Mark Rowe.
57
58         GTK+ drawing fixes.
59
60         Add a check to avoid crashing when the GraphicsContext is not
61         associated with a GdkDrawable. This was noticed when adding printing
62         support but might be triggered in other situations too.
63
64         Do not render themes when painting is disabled. This is an
65         optimisation for cases where GraphicsContext is used to calculate page
66         dimensions etc. without actually rendering.
67
68         * platform/graphics/cairo/GraphicsContextCairo.cpp:
69         (WebCore::GraphicsContext::gdkDrawable):
70         * platform/gtk/RenderThemeGtk.cpp:
71         (WebCore::paintMozWidget):
72
73 2007-11-13  Rahul Abrol  <ra5ul@comcast.net>
74
75         Reviewed by Tim Hatcher.
76
77         http://bugs.webkit.org/show_bug.cgi?id=15977
78         Resizing images preference now toggles default image state.
79
80         * loader/ImageDocument.cpp:
81         (WebCore::ImageDocument::ImageDocument):
82         (WebCore::ImageDocument::createDocumentStructure):
83         (WebCore::ImageDocument::imageChanged):
84
85 2007-11-19  Kevin Ollivier  <kevino@theolliviers.com>
86
87         Update wx port build sources with recent changes, update
88         wx FontPlatformData to be a class (MSVC7 gets confused
89         otherwise...) and implement its hash() method.
90
91         Reviewed by Adam.
92
93         * WebCoreSources.bkl:
94         * platform/wx/FontPlatformData.h:
95         (WebCore::FontPlatformData::hash):
96
97 2007-11-19  Julien Chaffraix  <julien.chaffraix@gmail.com>
98
99         Reviewed by Darin.
100
101         http://bugs.webkit.org/show_bug.cgi?id=12194
102         Bug 12194: Trying to access XMLHttpRequest.responseText or responseXML when they 
103         are not available should raise an exception
104
105         Tests: http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html
106                http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html
107
108         * bindings/js/JSXMLHttpRequest.cpp:
109         (KJS::JSXMLHttpRequest::getValueProperty):
110         * xml/XMLHttpRequest.cpp:
111         (WebCore::XMLHttpRequest::getResponseText):
112         (WebCore::XMLHttpRequest::getResponseXML):
113         * xml/XMLHttpRequest.h:
114
115 2007-11-19  Peter Kasting  <zerodpx@gmail.com>
116
117         Reviewed by Darin Adler.
118
119         http://bugs.webkit.org/show_bug.cgi?id=15971
120         The GIF decoder should not fail decoding if the caller asks it to
121         decode again when no new data has arrived since the last call.
122
123         * platform/image-decoders/gif/GIFImageReader.cpp:
124         (GIFImageReader::read):
125
126 2007-11-18  Brady Eidson <beidson@apple.com>
127
128         Reviewed by Eric
129
130         Fix a crash hashing a default SecurityOriginData object 
131
132         * storage/DatabaseTracker.cpp:
133         (WebCore::SecurityOriginDataHash::hash): The default object has some default strings with NULL
134           StringImpls - don't try to hash those!
135
136 2007-11-18  Timothy Hatcher  <timothy@apple.com>
137
138         Reviewed by Sam Weinig.
139
140         Bug 16043: Remove InspectorController.log now that console.log works
141         http://bugs.webkit.org/show_bug.cgi?id=16043
142
143         Remove the last uses of InspectorController.log. Once use was no longer needed,
144         checking an erro case that can't happen anymore. The other case now uses console.error.
145
146         * page/InspectorController.cpp: Remove the log function.
147         (WebCore::InspectorController::windowScriptObjectAvailable): Remove the log function from
148         InspectorController script class.
149         * page/inspector/DocumentPanel.js: Remove a use of InspectorController.log that isn't needed.
150         * page/inspector/Panel.js: Change InspectorController.log to console.log and early return.
151
152 2007-11-18  Timothy Hatcher  <timothy@apple.com>
153
154         Reviewed by Brady.
155
156         Bug 16041: REGRESSION: the Database panel in the Inspector stopped showing errors
157         http://bugs.webkit.org/show_bug.cgi?id=16041
158
159         * page/inspector/DatabasePanel.js: Implement error callbacks to pass to executeSql()
160           and transaction(). Refactored some code for the success and error callbacks to use.
161
162 2007-11-18  Alexey Proskuryakov  <ap@webkit.org>
163
164         Reviewed by Maciej.
165
166         <rdar://problem/5546393> Whitespace handling doesn't match HTML5.
167
168         HTML5 definition is the same as MSIE's, with the exception that the latter strips null
169         characters. Firefox also treats U+0008 as whitespace, but not U+000B or U+000C.
170
171         Test: fast/parser/html-whitespace.html
172
173         * html/HTMLTokenizer.cpp:
174         (WebCore::HTMLTokenizer::parseSpecial):
175         (WebCore::HTMLTokenizer::parseTag):
176         Use isASCIISpace, which matches HTML5 definition of whitespace, and also what we use to
177         check for whitespace almost everywhere.
178
179 2007-11-17  Mark Rowe  <mrowe@apple.com>
180
181         Reviewed by Darin Adler.
182
183         Fix: <rdar://problem/5607032> REGRESSION: testapi exits with assertion failure in debug build
184              <rdar://problem/5440659> JSGlobalContextCreate throws away globalObjectClass's prototype
185              http://bugs.webkit.org/show_bug.cgi?id=16033
186
187         Update for changes in Interpreter method signatures.
188
189         * bindings/js/kjs_binding.cpp:
190         (KJS::ScriptInterpreter::ScriptInterpreter):
191         * bindings/js/kjs_window.cpp:
192         (KJS::Window::clear):
193
194 2007-11-17  Timothy Hatcher  <timothy@apple.com>
195
196         Reviewed by Mark Rowe.
197
198         Bug 13470: i18n: The Web Inspector is not localizable
199         http://bugs.webkit.org/show_bug.cgi?id=13470
200
201         Add support for localization to the Web Inspector. Clients need to
202         implement localizedStringsURL() to return the URL of the
203         InspectorLocalizedStrings.js that best matches the user's language.
204
205         * English.lproj: Added.
206         * English.lproj/InspectorLocalizedStrings.js: Added.
207         * WebCore.xcodeproj/project.pbxproj: Add InspectorLocalizedStrings.js.
208         * page/InspectorClient.h: Add localizedStringsURL.
209         * page/InspectorController.cpp: Add localizedStringsURL that calls
210           the client. Also added a version exposed to JavaScript.
211         * page/InspectorController.h: Add localizedStringsURL.
212         * page/inspector/ConsolePanel.js: Call WebInspector.UIString
213           for user visible strings.
214         * page/inspector/DatabasePanel.js: Ditto.
215         * page/inspector/DocumentPanel.js: Ditto.
216         * page/inspector/ImagePanel.js: Ditto.
217         * page/inspector/MetricsSidebarPane.js: Ditto.
218         * page/inspector/NetworkPanel.js: Ditto.
219         * page/inspector/Panel.js: Ditto.
220         * page/inspector/PropertiesSidebarPane.js: Ditto.
221         * page/inspector/Resource.js: Ditto.
222         * page/inspector/ResourceCategory.js: Ditto.
223         * page/inspector/SourcePanel.js: Ditto.
224         * page/inspector/StylesSidebarPane.js: Ditto.
225         * page/inspector/inspector.css: Use pre-wrap so database errors can use \n.
226         * page/inspector/inspector.html: Remove some user visible strings.
227         * page/inspector/inspector.js: Added WebInspector.UIString and call
228           WebInspector.UIString for user visible strings. Some code needed to be 
229           moved to WebInspector.loaded to use UIString after the localized strings
230           get loaded.
231         * platform/graphics/svg/SVGImageEmptyClients.h:
232         (WebCore::SVGEmptyFrameLoaderClient::redirectDataToPlugin): Remove WebCore:: prefix.
233         (WebCore::SVGEmptyInspectorClient::createPage): Ditto.
234         (WebCore::SVGEmptyInspectorClient::localizedStringsURL): Add empty stub.
235         (WebCore::SVGEmptyInspectorClient::highlight): Remove WebCore:: prefix.
236         (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto.
237
238 2007-11-17  Timothy Hatcher  <timothy@apple.com>
239
240         Reviewed by Adam.
241
242         Reworte String.sprintf to fix many bad bugs and to not use RegExp. Also added
243         String.vsprintf so it can be used later for the localization function.
244
245         This version only supports argument reordering, precision for floats, and these
246         format characters: d, f, s and @. Any unsupported format characters are logged
247         and substituted like strings.
248
249         * page/inspector/utilities.js:
250
251 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
252
253         Windows build fix.
254
255         * editing/Editor.h: Made canSmartCopyOrDelete public, as Windows WebView still needs it.
256
257 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
258
259         Reviewed by Darin.
260
261         http://bugs.webkit.org/show_bug.cgi?id=15969
262         Eliminate Editor::deleteRange()
263
264         No change in functionality.
265
266         * editing/CompositeEditCommand.h: Removed unimplemented deleteKeyPressed().
267
268         * editing/Editor.cpp:
269         (WebCore::Editor::deleteWithDirection):
270         (WebCore::Editor::cut):
271         (WebCore::Editor::performDelete):
272         * editing/Editor.h:
273         Moved relevant Editor::deleteRange() functionality to its callers.
274         Removed deleteSelectionWithSmartDelete(void), which was more confusing than helpful
275         in my opinion.
276
277         * editing/mac/EditorMac.mm:
278         (WebCore::initializeKillRingIfNeeded):
279         (WebCore::Editor::addToKillRing):
280         (WebCore::Editor::yank):
281         (WebCore::Editor::yankAndSelect):
282         (WebCore::Editor::setMark):
283         (WebCore::unionDOMRanges):
284         (WebCore::Editor::deleteToMark):
285         (WebCore::Editor::selectToMark):
286         (WebCore::Editor::swapWithMark):
287         Pushed kill ring handling down from WebCore.
288
289         * page/mac/WebCoreFrameBridge.h:
290         * page/mac/WebCoreFrameBridge.mm:
291         Removed setMarkDOMRange (the corresponding getter is still needed).
292
293         * WebCore.base.exp: No longer need to export Editor::deleteRange() and Editor::insertTextWithoutSendingTextEvent().
294         Export the new kill ring functions.
295
296 2007-11-16  Ryan Leavengood  <leavengood@gmail.com>
297
298         Reviewed by David Kilzer.
299
300         Build fix: the needed headers for POSIX file functions were not
301         included.
302
303         * platform/posix/FileSystemPOSIX.cpp:
304
305 2007-11-16  Dan Bernstein  <mitz@apple.com>
306
307         Reviewed by Darin Adler.
308
309         - fix the common case of <http://bugs.webkit.org/show_bug.cgi?id=15994>
310           REGRESSION: Incomplete repaint of CSS image substitution
311
312         Test: fast/repaint/clip-with-layout-delta.html
313
314         * rendering/LayoutState.cpp:
315         (WebCore::LayoutState::LayoutState): Account for layout delta when
316         pushing additional clip.
317
318 2007-11-16  Antti Koivisto  <antti@apple.com>
319
320         Reviewed by Adele.
321         
322         Seeking related fixes, updates to match the latest specification
323         - rename loopCount of HTMLMediaElement to playCount
324         - add explicit seeking attribute to HTMLMediaElement to get semantics right
325         - implement the specification behavior that currentTime must immediately return seeked position in HTMLMediaElement 
326           instead of MoviePrivateQTKit 
327         - fix broken behavior when seeking past end of the media, add tests
328         - replace Movie didEnd callback with broader timeChanged callback (which gets called in didEnd case too)
329         - use setDelayCallbacks: in various MoviePrivateQTKit methods to avoid bug prone synchronous callbacks from QT, make
330           HTMLMediaElement not depend on synchronous callbacks
331         - do some cleanups and simplifications in MoviePrivateQTKit, get rid of m_rateBeforeSeek and m_blockStateUpdate variables
332
333         Tests: http/tests/media/video-seekable-stall.html
334                media/video-seeking.html
335                media/video-seek-past-end-paused.html
336                media/video-seek-past-end-playing.html
337
338         * html/HTMLAttributeNames.in: 
339         * html/HTMLMediaElement.cpp:
340         (WebCore::HTMLMediaElement::HTMLMediaElement):
341         (WebCore::HTMLMediaElement::load):
342         (WebCore::HTMLMediaElement::movieNetworkStateChanged):
343         (WebCore::HTMLMediaElement::setReadyState):
344         (WebCore::HTMLMediaElement::seek):
345         (WebCore::HTMLMediaElement::seeking):
346         (WebCore::HTMLMediaElement::currentTime):
347         (WebCore::HTMLMediaElement::ended):
348         (WebCore::HTMLMediaElement::play):
349         (WebCore::HTMLMediaElement::pause):
350         (WebCore::HTMLMediaElement::playCount):
351         (WebCore::HTMLMediaElement::setPlayCount):
352         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
353         (WebCore::HTMLMediaElement::movieTimeChanged):
354         (WebCore::HTMLMediaElement::endedPlayback):
355         (WebCore::HTMLMediaElement::updateMovie):
356         * html/HTMLMediaElement.h:
357         * html/HTMLMediaElement.idl:
358         * platform/graphics/Movie.cpp:
359         (WebCore::Movie::timeChanged):
360         * platform/graphics/Movie.h:
361         (WebCore::MovieClient::movieTimeChanged):
362         * platform/graphics/mac/MoviePrivateQTKit.h:
363         * platform/graphics/mac/MoviePrivateQTKit.mm:
364         (WebCore::MoviePrivate::MoviePrivate):
365         (WebCore::MoviePrivate::load):
366         (WebCore::MoviePrivate::play):
367         (WebCore::MoviePrivate::pause):
368         (WebCore::MoviePrivate::currentTime):
369         (WebCore::MoviePrivate::seek):
370         (WebCore::MoviePrivate::doSeek):
371         (WebCore::MoviePrivate::cancelSeek):
372         (WebCore::MoviePrivate::seekTimerFired):
373         (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
374         (WebCore::MoviePrivate::paused):
375         (WebCore::MoviePrivate::updateStates):
376         (WebCore::MoviePrivate::timeChanged):
377         (WebCore::MoviePrivate::didEnd):
378
379 2007-11-16  Anders Carlsson  <andersca@apple.com>
380
381         Reviewed by Adam.
382
383         <rdar://problem/5603832>
384         XMLHttpRequest readyState 3 & responseText buffer issues.
385
386         * platform/network/cf/ResourceHandleCFNet.cpp:
387         (WebCore::makeFinalRequest):
388         Add new parameter which controls whether content sniffing should be turned off.
389         
390         (WebCore::ResourceHandle::loadResourceSynchronously):
391         Always content sniff sync loads.
392         
393         * platform/network/cf/ResourceRequestCFNet.cpp:
394         (WebCore::ResourceRequest::doUpdatePlatformRequest):
395         If the ResourceRequest already has a backing CFURLRequest, make a copy of it. This preserves
396         any properties set on the CFURLRequest.
397
398 2007-11-16  Jon Honeycutt  <jhoneycutt@apple.com>
399
400         Reviewed by Ollie.
401
402         <rdar://problem/5605175> Crash closing or leaving window with ViewPoint 
403         Media player plugin
404
405         ViewPoint plugin requires that we pass a valid NPSavedData* to
406         NPP_Destroy.
407
408         * plugins/win/PluginViewWin.cpp: Pass a valid NPSavedData* to
409         NPP_Destroy. If the plugin allocates data, discard it
410
411 2007-11-16  Mark Rowe  <mrowe@apple.com>
412
413         Reviewed by Tim Hatcher.
414
415         Build WebCore as a sub-framework of WebKit in all configurations.
416
417         * Configurations/WebCore.xcconfig:
418         * WebCore.xcodeproj/project.pbxproj:
419
420 2007-11-16  Doug Turner  <dougt@meer.net>
421
422         Reviewed by Alp.
423
424         http://bugs.webkit.org/show_bug.cgi?id=16018
425         build bustage when building on debian 4.0
426
427         Fix build bustage on GTK+ with older versions of Pango.
428
429         Don't cache the return value since the docs say it can change.
430
431         * platform/gtk/Language.cpp:
432         (WebCore::defaultLanguage):
433
434 2007-11-16  Brady Eidson  <beidson@apple.com>
435
436         Build fix
437
438         * platform/SecurityOriginData.h:
439         (WebCore::operator!=): Whoops!
440
441 2007-11-16  Brady Eidson  <beidson@apple.com>
442
443         Reviewed by Sam
444
445         Further purify DatabaseTracker to use SecurityOriginData instead of "a String"
446
447         * WebCore.base.exp:
448         * WebCore.xcodeproj/project.pbxproj:
449         * WebCore.vcproj/WebCore.vcproj
450         * WebCore.pro
451
452         * platform/SecurityOriginData.cpp: Added.
453         (WebCore::SecurityOriginData::SecurityOriginData): Add a constructor that takes a "stringIdentifier"-style string,
454           since that form is what will be stored in the Databases.db on disk
455         (WebCore::SecurityOriginData::stringIdentifier):
456         * platform/SecurityOriginData.h:
457         (WebCore::SecurityOriginData::protocol):
458         (WebCore::SecurityOriginData::host):
459         (WebCore::SecurityOriginData::port):
460
461         * storage/DatabaseTracker.cpp:
462         (WebCore::SecurityOriginDataHash::hash): Follow the pattern Darin set in FontCache.cpp to make a decent hash for 
463           a SecurityOriginData object
464         (WebCore::SecurityOriginDataHash::equal):
465         (WebCore::SecurityOriginDataTraits::deletedValue): "file::1" will never exist in normal operation
466         (WebCore::SecurityOriginDataTraits::emptyValue): "file::2" will never exist in normal operation
467         (WebCore::DatabaseTracker::fullPathForDatabase):
468         (WebCore::DatabaseTracker::populateOrigins):
469         (WebCore::DatabaseTracker::origins):
470         (WebCore::DatabaseTracker::addDatabase):
471         * storage/DatabaseTracker.h:
472
473 2007-11-16  Alexey Proskuryakov  <ap@webkit.org>
474
475         Windows build fix.
476
477         * WebCore.vcproj/WebCore.vcproj: Removed VoidCallback.cpp, added JSCustomVoidCallback.{h,cpp}.
478
479 2007-11-16  Nikolas Zimmermann  <zimmermann@kde.org>
480
481         Reviewed by Eric.
482
483         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12290
484
485         Implement all SVGTextContentElement DOM methods.
486         This is the last missing SVG text feature. SVG fonts is next.
487
488         Added testcase: svg/custom/text-dom-01-f.svg (tests all new methods)
489
490         * ksvg2/svg/SVGTextContentElement.cpp:
491         (WebCore::cummulatedCharacterRangeLength):
492         (WebCore::SVGInlineTextBoxQueryWalker::):
493         (WebCore::SVGInlineTextBoxQueryWalker::SVGInlineTextBoxQueryWalker):
494         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
495         (WebCore::SVGInlineTextBoxQueryWalker::setQueryInputParameters):
496         (WebCore::SVGInlineTextBoxQueryWalker::longResult):
497         (WebCore::SVGInlineTextBoxQueryWalker::floatResult):
498         (WebCore::SVGInlineTextBoxQueryWalker::pointResult):
499         (WebCore::SVGInlineTextBoxQueryWalker::rectResult):
500         (WebCore::SVGInlineTextBoxQueryWalker::stopProcessing):
501         (WebCore::findInlineTextBoxInTextChunks):
502         (WebCore::rootInlineBoxForTextContentElement):
503         (WebCore::executeTextQuery):
504         (WebCore::SVGTextContentElement::getNumberOfChars):
505         (WebCore::SVGTextContentElement::getComputedTextLength):
506         (WebCore::SVGTextContentElement::getSubStringLength):
507         (WebCore::SVGTextContentElement::getStartPositionOfChar):
508         (WebCore::SVGTextContentElement::getEndPositionOfChar):
509         (WebCore::SVGTextContentElement::getExtentOfChar):
510         (WebCore::SVGTextContentElement::getRotationOfChar):
511         (WebCore::SVGTextContentElement::getCharNumAtPosition):
512         (WebCore::SVGTextContentElement::selectSubString):
513         * ksvg2/svg/SVGTextContentElement.h:
514         * rendering/SVGInlineTextBox.h:
515
516 2007-11-15  Adele Peterson  <adele@apple.com>
517
518         Reviewed by Oliver.
519
520         Fix for <rdar://problem/5566652> CrashTracer: [USER] 3 crashes in Safari at HTMLSelectElement::menuListDefaultEventHandler (reproducible on mactc30.com)
521
522         Test: fast/forms/menulist-no-renderer-onmousedown.html
523
524         * html/HTMLSelectElement.cpp:
525         (WebCore::HTMLSelectElement::defaultEventHandler): Nil check the renderer here.  None of the default behavior makes sense if there's no renderer.
526         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Moved the nil check to the main defaultEventHandler.
527
528 2007-11-15  Antti Koivisto  <antti@apple.com>
529
530         Reviewed by Adele.
531
532         Fix <rdar://problem/5601598>
533         The movie tag should do initialization on need and not during startup.
534         
535         Initialize Movie MIME type hash on demand
536
537         * platform/MIMETypeRegistry.cpp:
538         (WebCore::initialiseSupportedMovieMIMETypes):
539         (WebCore::initialiseMIMETypeRegistry):
540         (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
541         (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
542
543 2007-11-15  Mark Rowe  <mrowe@apple.com>
544
545         Build fix for Qt on Windows.
546
547         * xml/XPathStep.cpp:
548         (WebCore::XPath::Step::nodesInAxis):
549
550 2007-11-15  Timothy Hatcher  <timothy@apple.com>
551
552         Reviewed by Mark Rowe.
553
554         Bug 14761: Web Inspector leaks JS objects and DOM nodes
555         http://bugs.webkit.org/show_bug.cgi?id=14761
556
557         * page/InspectorController.cpp:
558         (WebCore::InspectorController::~InspectorController):
559         Change the tear down order so that inspectorDestroyed() is called before
560         InspectorController private data is set to Zero. The inspectorDestroyed()
561         call ends up closing the WebView and triggering InspectorController::close()
562         which unprotects m_scriptObject. This didn't happen when the private data
563         was cleared before calling inspectorDestroyed().
564
565 2007-11-15  Mark Rowe  <mrowe@apple.com>
566
567         Gtk build fix.
568
569         * WebCore.pro:
570
571 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
572
573         Reviewed by Darin.
574
575         http://bugs.webkit.org/show_bug.cgi?id=15989
576         XPath queries with predicates incorrectly retains the current node across unions
577
578         Test: fast/xpath/union-context-node.xhtml
579
580         * xml/XPathPath.cpp:
581         (WebCore::XPath::LocationPath::evaluate): Restore context after evaluation.
582         * xml/XPathStep.cpp:
583         (WebCore::XPath::Step::evaluate): Do not backup context, as we can easily re-create it.
584
585 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
586
587         Reviewed by Darin.
588
589         http://bugs.webkit.org/show_bug.cgi?id=15988
590         REGRESSION: XPath preceding-axis query misses nested elements
591
592         Test: fast/xpath/preceding-axis.xhtml
593
594         * xml/XPathStep.cpp:
595         (WebCore::XPath::Step::nodesInAxis): Hopefully correct this time.
596
597 2007-11-15  Timothy Hatcher  <timothy@apple.com>
598
599         Reviewed by Mark Rowe and Sam.
600
601         This corrects a couple of issues in the Web Inspector where selected search results
602         would not have the right text color when the window is inactive or the results are focused.
603
604         * page/inspector/inspector.css:
605
606 2007-11-15  Timothy Hatcher  <timothy@apple.com>
607
608         Reviewed by Sam.
609
610         Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels
611         http://bugs.webkit.org/show_bug.cgi?id=16007
612
613         Makes the click width an option on TreeElement and make ResourceCategoryTreeElement
614         a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is 
615         20 pixels, and the default is 10 pixels.
616
617         * page/inspector/ResourceCategory.js:
618         * page/inspector/treeoutline.js:
619
620 2007-11-15  Anders Carlsson  <andersca@apple.com>
621
622         Reviewed by Brady.
623
624         Pass a VoidCallback to Database::transaction and Database::changeVersion.
625         This is not yet hooked up to the database machinery.
626         
627         * WebCore.vcproj/WebCore.vcproj:
628         * bindings/js/JSDatabaseCustom.cpp:
629         (WebCore::JSDatabase::changeVersion):
630         (WebCore::JSDatabase::transaction):
631         * storage/Database.cpp:
632         (WebCore::Database::changeVersion):
633         (WebCore::Database::transaction):
634         * storage/Database.h:
635
636 2007-11-15  Timothy Hatcher  <timothy@apple.com>
637
638         Reviewed by Adam.
639
640         Bug 16005: Hovering in the breadcrumbs causes jumpy behavior
641         http://bugs.webkit.org/show_bug.cgi?id=16005
642
643         Hovering over cumbs no longer exposes new crumbs. Clicking on a collapsed
644         crumb will expose as many hidden crumbs as possible to the user. Also crumbs
645         that have ID attributes will compact to the ID over the tag name.
646
647         * page/inspector/DocumentPanel.js:
648
649 2007-11-15  Anders Carlsson  <andersca@apple.com>
650
651         Reviewed by Sam.
652
653         Make the VoidCallback DOM interface behave more like our other DOM interfaces.
654         
655         * bindings/js/JSCustomVoidCallback.h: Added.
656         * bindings/js/JSCustomVoidCallback.cpp: Added.
657         (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
658         (WebCore::JSCustomVoidCallback::handleEvent):
659         VoidCallback implementation that wraps a JS object.
660         
661         (WebCore::toVoidCallback):
662         New method that creates a VoidCallback implementation given a JS object.
663         
664         * bindings/scripts/CodeGeneratorJS.pm:
665         Specify that VoidCallback can fail conversion and add a custom conversion function.
666         
667         * html/HTMLMediaElement.cpp:
668         (WebCore::HTMLMediaElement::movieCuePointReached):
669         Call handleEvent on the callback.
670         
671         (WebCore::HTMLMediaElement::removeCuePoint):
672         Comment out parts of this method, it has already been removed in the HTML5 spec and it relies
673         on overriding VoidCallback equality.
674         
675         * html/VoidCallback.cpp: Removed.
676         
677         * html/VoidCallback.h:
678         (WebCore::VoidCallback::VoidCallback):
679         (WebCore::VoidCallback::~VoidCallback):
680         Make this an abstract class with a pure virtual handleEvent method.
681         
682 2007-11-15  Adam Roben  <aroben@apple.com>
683
684         Fix <rdar://5485108> Type-select while a <select> menu is open doesn't work
685
686         There were two things broken here:
687            - WebView now requires a WM_CHAR message to be sent before it will
688              create a keyboard event with a charCode, but we were only sending
689              a WM_KEYDOWN event.
690            - The popup menu was not updating its focused index when the
691              <select> element's selectedIndex changed.
692
693         Reviewed by Adele.
694
695         * platform/win/PopupMenuWin.cpp:
696         (WebCore::PopupMenu::updateFromElement): Update the focused index from
697         the client's selected index.
698         (WebCore::PopupWndProc): When we receive a WM_CHAR message for a
699         printable character, manufacture a WM_KEYDOWN message for it and post
700         both that and the current WM_CHAR message to the WebView.
701
702 2007-11-15  Brady Eidson  <beidson@apple.com>
703
704         Build fix
705
706         * storage/DatabaseTracker.cpp:
707         (WebCore::DatabaseTracker::fullPathForDatabase):
708         (WebCore::DatabaseTracker::databaseNamesForOrigin):
709
710 2007-11-15  Brady Eidson  <beidson@apple.com>
711
712         Reviewed by John and Sam
713
714         Stubbing out everything required for a WebKit API for databases
715
716         Biggest change in WebCore is that we passed around SecurityOriginData as the representation
717         of a SecurityOrigin, instead of a String or a SecurityOrigin itself (which is an opaque object
718         that has a different purpose besides just hanging on to the data)
719
720         * WebCore.base.exp:
721         * WebCore.xcodeproj/project.pbxproj:
722
723         * platform/SecurityOrigin.cpp:
724         * platform/SecurityOrigin.h:
725         * platform/SecurityOriginData.h: Added.  Simple object to encapsulate the 3
726           pieces of data in the SecurityOrigin tuple
727         (WebCore::SecurityOriginData::SecurityOriginData):
728         (WebCore::SecurityOriginData::protocol):
729         (WebCore::SecurityOriginData::host):
730         (WebCore::SecurityOriginData::port):
731         (WebCore::SecurityOriginData::toString): Simple concatenation of the 3 components,
732           colon separated
733
734         * storage/Database.cpp:
735         (WebCore::Database::Database): Use SecurityOriginData instead
736
737         * storage/DatabaseTracker.cpp:
738         (WebCore::DatabaseTracker::fullPathForDatabase):
739         (WebCore::DatabaseTracker::databaseNamesForOrigin):
740         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
741         (WebCore::DatabaseTracker::deleteDatabase):
742         * storage/DatabaseTracker.h:
743
744         * storage/DatabaseTrackerClient.h: Added.  For dispatching notifications up to WebKit
745         (WebCore::DatabaseTrackerClient::~DatabaseTrackerClient):2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
746
747 2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
748
749         Reviewed by Anders.
750
751         NP_ASFILEONLY streams should not buffer data in m_deliveryData.
752
753         * plugins/win/PluginStreamWin.cpp:
754         (WebCore::PluginStreamWin::didReceiveData):
755
756 2007-11-15  Justin Garcia  <justin.garcia@apple.com>
757
758         Reviewed by Adele Peterson.
759
760         <rdar://problem/5497643> Crash at Node::isDescendantOf when switching out of Edit HTML Source mode
761         
762         A textarea that contained the selection was removed but the selection wasn't cleared,
763         and we'd crash in code that assumed a valid, in-document selection.
764
765         * editing/SelectionController.cpp:
766         (WebCore::removingNodeRemovesPosition): Clear the selection if the node being removed is the
767         shadowAncestorNode of the node that contains the position, not just if the node being removed
768         contains that shadowAncestorNode.
769
770 2007-11-15  Nikolas Zimmermann  <zimmermann@kde.org>
771
772         Reviewed by Maciej.
773
774         Fix logic error: calculateGlyphBoundaries takes RTL text into account itself, no need to adjust offsets before.
775
776         * rendering/SVGInlineTextBox.cpp:
777         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
778         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
779
780 2007-11-15  Anders Carlsson  <andersca@apple.com>
781
782         Reviewed by Brady.
783
784         <rdar://problem/5562470>
785         openDatabase does not work when the version string is empty
786
787         If the string is empty, pass a real empty string to sqlite3_bind_text16.
788         
789         * platform/sql/SQLiteStatement.cpp:
790         (WebCore::SQLiteStatement::bindText):
791
792 2007-11-15  Anders Carlsson  <andersca@apple.com>
793
794         Reviewed by Brady.
795
796         Get rid of SQLiteStatement::bindText and rename bindText16 to bindText.
797         Remove the copy parameter from bindText and bindBlob and always copy passed in data instead.
798
799         * loader/icon/IconDatabase.cpp:
800         (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
801         (WebCore::IconDatabase::removePageURLFromSQLDatabase):
802         (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
803         (WebCore::IconDatabase::addIconURLToSQLDatabase):
804         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
805         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
806         * platform/sql/SQLiteStatement.cpp:
807         (WebCore::SQLiteStatement::prepare):
808         * platform/sql/SQLiteStatement.h:
809         * storage/Database.cpp:
810         (WebCore::setTextValueInDatabase):
811         * storage/DatabaseTracker.cpp:
812         (WebCore::DatabaseTracker::fullPathForDatabase):
813         (WebCore::DatabaseTracker::databaseNamesForOrigin):
814         (WebCore::DatabaseTracker::addDatabase):
815
816 2007-11-14  Brady Eidson <beidson@apple.com>
817
818         Rubberstamped by Sam
819
820         * platform/SecurityOrigin.h: Lets make this an unsigned short and *not* rule out half the possible ports?
821
822 2007-11-14  Alexey Proskuryakov  <ap@webkit.org>
823
824         Reviewed by Justin Garcia.
825
826         http://bugs.webkit.org/show_bug.cgi?id=15781
827         REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit can't handle
828         a marked range that covers half of a composed character sequence)
829
830         Test: platform/mac/editing/input/devanagari-ligature.html
831
832         This fix is somewhat of a hack, as it asks editing commands to work with invalid selections.
833         However, this is not entirely new for them, as Roman accents are typed in a similar manner.
834
835         In the future, we probably want to make commands work with ranges (or Positions explicitly).
836
837         * editing/Editor.cpp:
838         (WebCore::Editor::selectComposition): Force selection to composition range.
839         * editing/InsertTextCommand.cpp:
840         (WebCore::InsertTextCommand::input): Force ending selection to inserted text range.
841
842 2007-11-14  Beth Dakin  <bdakin@apple.com>
843
844         Reviewed by Hyatt.
845
846         Fix for <rdar://problem/5540855> REGRESSION: Combination of client-
847         side image map and <a> tag is not working properly (15522)
848
849         * html/HTMLMapElement.cpp:
850         (WebCore::HTMLMapElement::checkDTD): Allow <map> to have both block 
851         and inline children rather than just block children. This matches 
852         Firefox. 
853
854 2007-11-14  Justin Garcia  <justin.garcia@apple.com>
855
856         Reviewed by Alexey Proskuryakov.
857
858         <rdar://problem/5546763> CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs
859
860         * editing/DeleteSelectionCommand.cpp:
861         (WebCore::DeleteSelectionCommand::handleGeneralDelete): 
862         Removed an irrelevant FIXME.
863         (WebCore::DeleteSelectionCommand::mergeParagraphs): If the block that contained the end of the selection
864         hasn't been removed but has been emptied by deletion, we would to try and fail to create a VisiblePosition
865         inside that block, which could lead to a crash.  If that happens, there's no content in the block to move,
866         so just remove the block and return.
867         Preserve m_needPlaceholder during the call to moveParagraphs, since it may change it and since it does
868         its own placeholder insertion when necessary.
869         (WebCore::DeleteSelectionCommand::doApply): No need to check m_needPlaceholder before calling mergeParagraphs,
870         because it handles preserving m_needPlaceholder when it calls moveParagraphs.
871         
872 2007-11-14  Timothy Hatcher  <timothy@apple.com>
873
874         Reviewed by Adam.
875
876         Bug 14380: Long DOM ancestry breadcrumb lists get cut off
877         http://bugs.webkit.org/show_bug.cgi?id=14380
878
879         The breadcumbs will now be compacted and collapsed if there isn't enough room
880         to show everything. The collapsing algorithm always affects the crumbs that
881         are farthest away from the selected or hovered crumb first.
882
883         * page/inspector/DocumentPanel.js:
884         * page/inspector/inspector.css:
885
886 2007-11-14  Anders Carlsson  <andersca@apple.com>
887
888         Use the correct include path.
889         
890         * platform/Cursor.h:
891         * plugins/win/PluginPackageWin.h:
892         * plugins/win/PluginStreamWin.h:
893
894 2007-11-13  Brady Eidson  <beidson@apple.com>
895
896         Reviewed by Adam
897
898         http://bugs.webkit.org/show_bug.cgi?id=15976 - ASSERT/crash when SQLTransactionCallback throws an exception
899
900         * storage/SQLTransaction.cpp:
901         (WebCore::SQLTransaction::deliverTransactionCallback): Make a transaction error for the case where the 
902           SQLTransactionCallback fails
903         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Don't assert on the error callback, but null check it
904           and make the commit/rollback decision accordingly
905
906 2007-11-13  Oliver Hunt  <oliver@apple.com>
907
908         Reviewed by Anders.
909
910         <rdar://problem/5365030> calling dataWithPDFInsideRect on an SVG with a gradient crashes (14780)
911
912         When drawing directly to PDF CG may delay the use of the gradient function until outside our
913         standard drawing path, which in turn could let us invalidate the caches before they were used.
914
915         To work around this we now store the cached stops in a RefCounted object, so that we can ensure
916         that cache exists as long as required.
917         
918         * platform/graphics/svg/SVGPaintServerGradient.cpp:
919         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
920         * platform/graphics/svg/SVGPaintServerGradient.h:
921         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
922         (WebCore::cgGradientCallback):
923         (WebCore::CGShadingRefForLinearGradient):
924         (WebCore::CGShadingRefForRadialGradient):
925         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
926
927 2007-11-13  Anders Carlsson  <andersca@apple.com>
928
929         Fix Windows build.
930         
931         * platform/Cursor.h:
932         * plugins/win/PluginPackageWin.h:
933         * plugins/win/PluginStreamWin.h:
934
935 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
936
937         Reviewed by Anders Carlsson.
938
939         Renamed Shared to RefCounted.
940
941         * ForwardingHeaders/wtf/RefCounted.h: Copied from WebCore/ForwardingHeaders/wtf/Shared.h.
942         * ForwardingHeaders/wtf/Shared.h: Removed.
943         * bindings/js/JSSVGPODTypeWrapper.h:
944         * css/CSSFontFace.h:
945         * css/CSSRuleList.h:
946         * css/Counter.h:
947         * css/Pair.h:
948         * css/Rect.h:
949         * css/StyleBase.h:
950         * css/StyleSheetList.h:
951         * dom/Attribute.h:
952         * dom/Clipboard.h:
953         * dom/DOMImplementation.h:
954         * dom/Event.h:
955         * dom/EventListener.h:
956         * dom/NamedNodeMap.h:
957         * dom/NodeFilter.h:
958         * dom/NodeFilterCondition.h:
959         * dom/NodeList.h:
960         * dom/QualifiedName.h:
961         * dom/Range.h:
962         * dom/RangeException.h:
963         * dom/RegisteredEventListener.h:
964         * dom/Traversal.h:
965         * editing/EditCommand.h:
966         * history/BackForwardList.h:
967         * history/CachedPage.h:
968         * history/HistoryItem.cpp:
969         (WebCore::HistoryItem::HistoryItem):
970         * history/HistoryItem.h:
971         * html/CanvasGradient.h:
972         * html/CanvasPattern.h:
973         * html/CanvasRenderingContext2D.h:
974         * html/CanvasStyle.h:
975         * html/HTMLCollection.h:
976         * html/MediaError.h:
977         * html/TimeRanges.h:
978         * html/VoidCallback.h:
979         * ksvg2/css/SVGRenderStyle.cpp:
980         (WebCore::SVGRenderStyle::SVGRenderStyle):
981         * ksvg2/css/SVGRenderStyle.h:
982         * ksvg2/css/SVGRenderStyleDefs.cpp:
983         (StyleFillData::StyleFillData):
984         (StyleStrokeData::StyleStrokeData):
985         (StyleStopData::StyleStopData):
986         (StyleTextData::StyleTextData):
987         (StyleClipData::StyleClipData):
988         (StyleMaskData::StyleMaskData):
989         (StyleMarkerData::StyleMarkerData):
990         (StyleMiscData::StyleMiscData):
991         * ksvg2/css/SVGRenderStyleDefs.h:
992         * ksvg2/svg/SVGAngle.cpp:
993         (WebCore::SVGAngle::SVGAngle):
994         * ksvg2/svg/SVGAngle.h:
995         * ksvg2/svg/SVGAnimatedTemplate.h:
996         * ksvg2/svg/SVGElementInstanceList.h:
997         * ksvg2/svg/SVGException.h:
998         * ksvg2/svg/SVGList.h:
999         * ksvg2/svg/SVGPathSeg.h:
1000         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
1001         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
1002         * ksvg2/svg/SVGPreserveAspectRatio.h:
1003         * ksvg2/svg/SVGRenderingIntent.h:
1004         * ksvg2/svg/SVGTransform.h:
1005         * ksvg2/svg/SVGUnitTypes.h:
1006         * loader/DocumentLoader.h:
1007         * loader/FormState.h:
1008         * loader/ResourceLoader.h:
1009         * loader/TextResourceDecoder.h:
1010         * loader/icon/IconRecord.h:
1011         * page/BarInfo.h:
1012         * page/Console.h:
1013         * page/DOMSelection.h:
1014         * page/DOMWindow.h:
1015         * page/Frame.h:
1016         * page/History.h:
1017         * page/InspectorController.cpp:
1018         * page/Plugin.h:
1019         * page/Screen.h:
1020         * platform/ArrayImpl.h:
1021         * platform/CString.h:
1022         * platform/Cursor.h:
1023         * platform/DeprecatedValueListImpl.cpp:
1024         (WebCore::DeprecatedValueListImpl::Private::Private):
1025         * platform/FileChooser.h:
1026         * platform/FontFallbackList.h:
1027         * platform/FontFamily.cpp:
1028         (WebCore::FontFamily::FontFamily):
1029         * platform/FontFamily.h:
1030         * platform/FontSelector.h:
1031         * platform/GlyphPageTreeNode.h:
1032         * platform/PopupMenu.h:
1033         * platform/RegularExpression.cpp:
1034         * platform/ScrollBar.h:
1035         * platform/SharedBuffer.h:
1036         * platform/StringImpl.h:
1037         * platform/graphics/Icon.h:
1038         * platform/graphics/svg/SVGResource.h:
1039         * platform/network/FormData.cpp:
1040         (WebCore::FormData::FormData):
1041         * platform/network/FormData.h:
1042         * platform/network/ResourceHandle.h:
1043         * platform/network/ResourceHandleClient.h:
1044         * rendering/RenderStyle.cpp:
1045         (WebCore::StyleSurroundData::StyleSurroundData):
1046         (WebCore::StyleBoxData::StyleBoxData):
1047         (WebCore::StyleVisualData::StyleVisualData):
1048         (WebCore::StyleBackgroundData::StyleBackgroundData):
1049         (WebCore::StyleMarqueeData::StyleMarqueeData):
1050         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1051         (WebCore::StyleMultiColData::StyleMultiColData):
1052         (WebCore::StyleTransformData::StyleTransformData):
1053         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1054         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1055         (WebCore::StyleInheritedData::StyleInheritedData):
1056         * rendering/RenderStyle.h:
1057         * rendering/SVGCharacterLayoutInfo.h:
1058         (WebCore::SVGCharOnPath::SVGCharOnPath):
1059         * storage/SQLResultSetRowList.h:
1060         * xml/DOMParser.h:
1061         * xml/XMLHttpRequest.h:
1062         * xml/XMLSerializer.h:
1063         * xml/XPathEvaluator.h:
1064         * xml/XPathExpression.h:
1065         * xml/XPathNSResolver.h:
1066         * xml/XPathResult.h:
1067         * xml/XPathValue.h:
1068         * xml/XSLTProcessor.h:
1069
1070 2007-11-13  Brady Eidson  <beidson@apple.com>
1071
1072         Reviewed by Mark Rowe
1073
1074         Remove errantly added files, and fix the idl (for reference's sake)
1075
1076         * storage/JSCustomSQLStatementCallback.h: Removed.
1077         * storage/JSCustomSQLStatementErrorCallback.h: Removed.
1078         * storage/JSCustomSQLTransactionCallback.h: Removed.
1079         * storage/JSCustomSQLTransactionErrorCallback.h: Removed.
1080         * storage/SQLStatementCallback.idl:
1081
1082 2007-11-13  Adam Roben  <aroben@apple.com>
1083
1084         Fix a bug and improve upon Brady's fix
1085
1086         Reviewed by Anders.
1087
1088         * bindings/js/JSSQLTransactionCustom.cpp:
1089         (WebCore::JSSQLTransaction::executeSql): Made the code a little
1090         clearer and more correct.
1091         * loader/icon/IconDatabase.cpp: Put parentheses around the expansion
1092         of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the
1093         comparison it meant to.
1094
1095 2007-11-13  Sam Weinig  <sam@webkit.org>
1096
1097         Fix Qt and Gtk builds.
1098
1099         * WebCore.pro: Remove non-generated idl files.
1100
1101 2007-11-13  Mark Rowe  <mrowe@apple.com>
1102
1103         Remove removed file from the project.
1104
1105         * WebCore.pro:
1106
1107 2007-11-13  Brady Eidson  <beidson@apple.com>
1108
1109         Release build fix
1110
1111         * bindings/js/JSSQLTransactionCustom.cpp:
1112         (WebCore::JSSQLTransaction::executeSql):
1113
1114 2007-11-13  Adam Roben  <aroben@apple.com>
1115
1116         Add WindowMessageBroadcaster
1117
1118         This class is used to listen in on messages sent to HWNDs. Multiple
1119         WindowMessageListeners can be notified about messages sent to a single
1120         HWND, and one WindowMessageListener can listen to messages from
1121         multiple HWNDs.
1122
1123         Reviewed by Ada.
1124
1125         * WebCore.vcproj/WebCore.vcproj: Added new files to project.
1126         * platform/win/WindowMessageBroadcaster.cpp: Added.
1127         (WebCore::instancesMap): Static helper.
1128         (WebCore::WindowMessageBroadcaster::addListener): Registers a listener
1129         for a particular HWND.
1130         (WebCore::WindowMessageBroadcaster::removeListener): Removes a
1131         listener for a particular HWND.
1132         (WebCore::WindowMessageBroadcaster::WindowMessageBroadcaster):
1133         (WebCore::WindowMessageBroadcaster::~WindowMessageBroadcaster):
1134         (WebCore::WindowMessageBroadcaster::destroy): Removes this broadcaster
1135         from the instancesMap, removes all of its listeners, unsubclasses the
1136         window, and deletes the broadcaster.
1137         (WebCore::WindowMessageBroadcaster::unsubclassWindow): Unsubclasses
1138         the window (which means that SubclassedWndProc won't be called again
1139         for this window).
1140         (WebCore::WindowMessageBroadcaster::SubclassedWndProc): Notifies all
1141         the listeners about every message sent to the HWND
1142         * platform/win/WindowMessageBroadcaster.h: Added.
1143         (WebCore::WindowMessageBroadcaster::listeners):
1144         (WebCore::WindowMessageBroadcaster::originalWndProc):
1145         * platform/win/WindowMessageListener.h: Added.
1146
1147 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
1148
1149         Reviewed by Sam Weinig.
1150
1151         Moved Shared.h into wtf so it could be used in more places. Retained 
1152         TreeShared, but moved it to its own file, TreeShared.h.
1153
1154         * ForwardingHeaders/wtf/Shared.h: Added.
1155         * WebCore.xcodeproj/project.pbxproj:
1156         * bindings/js/JSSVGPODTypeWrapper.h:
1157         * css/CSSFontFace.h:
1158         * css/CSSRuleList.h:
1159         * css/Counter.h:
1160         * css/Pair.h:
1161         * css/Rect.h:
1162         * css/StyleBase.h:
1163         * css/StyleSheetList.h:
1164         * dom/Clipboard.h:
1165         * dom/DOMImplementation.h:
1166         * dom/Event.h:
1167         * dom/EventListener.h:
1168         * dom/NamedNodeMap.h:
1169         * dom/NodeFilterCondition.h:
1170         * dom/NodeList.h:
1171         * dom/Range.h:
1172         * dom/RangeException.h:
1173         * dom/RegisteredEventListener.h:
1174         * dom/Traversal.h:
1175         * history/BackForwardList.h:
1176         * history/CachedPage.h:
1177         * history/HistoryItem.h:
1178         * html/CanvasGradient.h:
1179         * html/CanvasPattern.h:
1180         * html/HTMLCollection.h:
1181         * html/MediaError.h:
1182         * html/TimeRanges.h:
1183         * html/VoidCallback.h:
1184         * ksvg2/css/SVGRenderStyleDefs.h:
1185         * ksvg2/svg/SVGAnimatedTemplate.h:
1186         * ksvg2/svg/SVGElementInstanceList.h:
1187         * ksvg2/svg/SVGList.h:
1188         * ksvg2/svg/SVGPathSeg.h:
1189         * ksvg2/svg/SVGPreserveAspectRatio.h:
1190         * ksvg2/svg/SVGRenderingIntent.h:
1191         * ksvg2/svg/SVGTransform.h:
1192         * ksvg2/svg/SVGUnitTypes.h:
1193         * loader/DocumentLoader.h:
1194         * loader/FormState.h:
1195         * loader/ResourceLoader.h:
1196         * loader/TextResourceDecoder.h:
1197         * loader/icon/IconRecord.h:
1198         * page/BarInfo.h:
1199         * page/Console.h:
1200         * page/DOMSelection.h:
1201         * page/DOMWindow.h:
1202         * page/History.h:
1203         * page/InspectorController.cpp:
1204         * page/Plugin.h:
1205         * page/Screen.h:
1206         * platform/ArrayImpl.h:
1207         * platform/CString.h:
1208         * platform/DeprecatedValueListImpl.cpp:
1209         * platform/FontFallbackList.h:
1210         * platform/FontFamily.h:
1211         * platform/FontSelector.h:
1212         * platform/GlyphPageTreeNode.h:
1213         * platform/PopupMenu.h:
1214         * platform/RegularExpression.cpp:
1215         * platform/ScrollBar.h:
1216         * platform/Shared.h: Removed.
1217         * platform/SharedBuffer.h:
1218         * platform/StringImpl.h:
1219         * platform/graphics/Icon.h:
1220         * platform/graphics/svg/SVGResource.h:
1221         * platform/network/FormData.h:
1222         * platform/network/ResourceHandleClient.h:
1223         * rendering/RenderStyle.h:
1224         * rendering/SVGCharacterLayoutInfo.h:
1225         * storage/SQLResultSetRowList.h:
1226         * xml/DOMParser.h:
1227         * xml/XMLSerializer.h:
1228         * xml/XPathEvaluator.h:
1229         * xml/XPathExpression.h:
1230         * xml/XPathNSResolver.h:
1231         * xml/XPathResult.h:
1232
1233 2007-11-13  Brady Eidson  <beidson@apple.com>
1234
1235         JS bindings by Anders, reviewed by Brady
1236         WebCore changes by Brady, reviewed by Anders and Tim
1237
1238         Adapt to the new iteration of the HTML5 client-side storage spec.
1239
1240         Based largely on implementation feedback we generated in landing our first version of this API and also
1241         on the input of others in the community, the database spec went through a large overhaul that addresses
1242         many concerns.  Amongst other changes/improvements:
1243         - SQLTransaction object is added and all transactions are explicit.  In addition, since the API manages
1244           transactions explicitly, transaction-related language in SQL statements is disallowed
1245         - executeSql() is now on a transaction object instead of the database object.
1246         - Database.changeVersion() now takes place within the context of a transaction.  Therefore the version 
1247           change can be atomic along with the statements that modify the DB schema
1248
1249         Most of the logic now takes place during the "transaction steps," which the specification clearly lays out
1250         as a chain of events on the SQLTransaction object where processing is handed off between being processed 
1251         asynchronously and calling back up to javascript.  To accomplish this voodoo, SQLTransaction has a series of 
1252         methods that roughly match up with the "transaction steps" and it keeps a pointer to the next step.
1253
1254         * DerivedSources.make:
1255         * WebCore.xcodeproj/project.pbxproj:
1256
1257         * bindings/js/JSDatabaseCustom.cpp:
1258         (WebCore::JSDatabase::changeVersion): Adapt to the new API
1259         (WebCore::JSDatabase::transaction): Added
1260
1261         * bindings/js/JSSQLTransactionCustom.cpp: Added.
1262         (WebCore::JSSQLTransaction::executeSql): Added
1263
1264         * page/DOMWindow.cpp:
1265         (WebCore::DOMWindow::openDatabase): Add the new arguments
1266         * page/DOMWindow.h:
1267         * page/DOMWindow.idl:
1268
1269         * page/inspector/DatabasePanel.js: Use the new API
1270
1271         * storage/ChangeVersionWrapper.cpp: Added.  Implementation of "SQLTransactionWrapper" that enforces
1272           changing the version of the database
1273         (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
1274         (WebCore::ChangeVersionWrapper::performPreflight):
1275         (WebCore::ChangeVersionWrapper::performPostflight):
1276         * storage/ChangeVersionWrapper.h: Added.
1277         (WebCore::ChangeVersionWrapper::sqlError):
1278
1279         * storage/Database.cpp: Removed the "main thread" and "background thread" sqlite handles as all sqlite operations can now
1280           happen solely on the background thread - most of these changes result from that change
1281         (WebCore::Database::Database): Removed an obsolete FIXME
1282         (WebCore::Database::openAndVerifyVersion): 
1283         (WebCore::Database::getVersionFromDatabase):
1284         (WebCore::Database::setVersionInDatabase):
1285         (WebCore::Database::versionMatchesExpected): Atomically guarantee that the current version and expected version are the same
1286         (WebCore::Database::performOpenAndVerify):
1287         (WebCore::Database::performTransactionStep): Added, as a hook for the DatabaseTransactionTask on the DatabaseThread
1288         (WebCore::Database::changeVersion): Changed for the new API from JS
1289         (WebCore::Database::transaction): Added, for the new API from JS
1290         (WebCore::Database::scheduleTransaction): Add a transaction to this Database's transaction queue
1291         (WebCore::Database::scheduleTransactionStep): Schedule the current transaction to be called on the background thread
1292         (WebCore::Database::scheduleTransactionCallback): Schedule the current transaction to perform a callback on the main thread
1293         (WebCore::Database::performGetTableNames):
1294         (WebCore::Database::deliverAllPendingCallbacks):
1295         (WebCore::Database::deliverPendingCallback):
1296         (WebCore::Database::setExpectedVersion):
1297         * storage/Database.h: 
1298         * storage/Database.idl:
1299
1300         * storage/DatabaseTask.cpp:  Changed DatabaseTask to create a mutex on demand, and use the existence of that mutex
1301           to replace the m_synchronous flag
1302         (WebCore::DatabaseTask::performTask):
1303         (WebCore::DatabaseTask::lockForSynchronousScheduling):
1304         (WebCore::DatabaseTask::waitForSynchronousCompletion):
1305         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1306         * storage/DatabaseTask.h:
1307
1308         * storage/SQLError.h: New API object
1309
1310         * storage/SQLResultSet.cpp:
1311         (WebCore::SQLResultSet::SQLResultSet): Small changes to the API object
1312         * storage/SQLResultSet.h:
1313         * storage/SQLResultSet.idl:
1314
1315         * storage/SQLStatement.cpp: Added.
1316         (WebCore::SQLStatement::SQLStatement):
1317         (WebCore::SQLStatement::execute): Actually execute the sql statement on the SQLiteDatabase if it's still valid
1318         (WebCore::SQLStatement::setVersionMismatchedError): Flag this statement as bad before it even starts in case
1319           of an actual version vs. expected version mismatch
1320         (WebCore::SQLStatement::performCallback): Call the right callback (SQLStatement or SQLStatementError) for this statement
1321         * storage/SQLStatement.h: Added.
1322         (WebCore::SQLStatement::hasStatementCallback):
1323         (WebCore::SQLStatement::hasStatementErrorCallback):
1324         (WebCore::SQLStatement::sqlError): Get the error for this statement, if any
1325
1326         * storage/SQLTransaction.cpp: Added.
1327         (WebCore::SQLTransaction::SQLTransaction):
1328         (WebCore::SQLTransaction::executeSQL): Entry point for the API from JS
1329         (WebCore::SQLTransaction::enqueueStatement): Add a new statement onto the queue
1330         (WebCore::SQLTransaction::performNextStep): Call the method for the next step
1331         (WebCore::SQLTransaction::performPendingCallback): Call the method for the pending callback
1332         (WebCore::SQLTransaction::openTransactionAndPreflight): Open a transaction to the database and preflight 
1333           using the SQLTransactionWrapper, if any
1334         (WebCore::SQLTransaction::deliverTransactionCallback): Deliver the transaction callback to the javascript thread
1335         (WebCore::SQLTransaction::scheduleToRunStatements): Convinience to schedule this transaction on the database thread 
1336           and make runStatements() the next step
1337         (WebCore::SQLTransaction::runStatements): Start running the sql statements queued up for this transaction 
1338         (WebCore::SQLTransaction::getNextStatement): Bring the next statement off the queue
1339         (WebCore::SQLTransaction::runCurrentStatement): Execute the current statement
1340         (WebCore::SQLTransaction::deliverStatementCallback): Deliver the SQLStatementCallback for this statement
1341         (WebCore::SQLTransaction::postflightAndCommit): Postflight the transaction using SQLTransactionWrapper and commit it
1342         (WebCore::SQLTransaction::handleTransactionError): Make the right call for any error that occurred on the Transaction
1343         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Deliver the SQLTransactionErrorCallback
1344         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Either do a final commit or rollback to cleanup the
1345           transaction after it error'ed out
1346         * storage/SQLTransaction.h:
1347         (WebCore::SQLTransactionWrapper::~SQLTransactionWrapper): 
1348         (WebCore::SQLTransaction::database):
1349         * storage/SQLTransaction.idl:
1350
1351         The following were made obsolete by the new version of the API:
1352         * bindings/js/JSCustomSQLCallback.cpp: Removed.
1353         * bindings/js/JSCustomSQLCallback.h: Removed.
1354         * bindings/js/JSCustomVersionChangeCallback.cpp: Removed.
1355         * bindings/js/JSCustomVersionChangeCallback.h: Removed.
1356         * storage/DatabaseCallback.cpp: Removed.
1357         * storage/DatabaseCallback.h: Removed.
1358         * storage/SQLCallback.h: Removed.
1359         * storage/SQLCallback.idl: Removed.
1360         * storage/VersionChangeCallback.h: Removed.
1361         * storage/VersionChangeCallback.idl: Removed.
1362
1363 2007-11-13  Dan Bernstein  <mitz@apple.com>
1364
1365         Reviewed by Beth Dakin.
1366
1367         - fix <rdar://problem/5551163> REGRESSION: Cursor does not change to arrow on "X" button in google maps, making it hard to click
1368
1369         * css/html4.css: Added a 'cursor: auto' rule for links.
1370         * manual-tests/link-cursor-auto.html: Added.
1371
1372 2007-11-13  Dan Bernstein  <mitz@apple.com>
1373
1374         Reviewed by Beth Dakin.
1375
1376         - fix <rdar://problem/5516272> Reproducible crash in RenderObject::setStyle involving going Back from a non-HTML document (Bookmarks view, PDF view)
1377
1378         The root cause for the crash is that when a non-HTML view enters the
1379         frame, the frame's document pointer keeps pointing at the last HTML-type
1380         document it contained. This patch does not address the root cause, but
1381         makes changes to account for that condition.
1382
1383         * loader/FrameLoader.cpp:
1384         (WebCore::FrameLoader::receivedMainResourceError): Do not change the
1385         frame's current document's page cache state here.
1386         (WebCore::FrameLoader::invalidateCurrentItemCachedPage): If the frame's
1387         current document is in fact the history item being invalidated, then
1388         set its page cache state here.
1389
1390 2007-11-12  Antti Koivisto  <antti@apple.com>
1391
1392         Reviewed by Adele.
1393
1394         Fix that 'timeupdate' and 'waiting' events were never dispatched.
1395         
1396         Add explicit m_paused attribute instead of trying to derive paused state from
1397         underlying media. Call updatePlayState() to start/stop media playback
1398         when any attribute that affects active playback state changes. This matches 
1399         specification text.
1400         
1401         Test: http/tests/media/video-play-stall.html
1402
1403         * html/HTMLMediaElement.cpp:
1404         (WebCore::HTMLMediaElement::HTMLMediaElement):
1405         (WebCore::HTMLMediaElement::setReadyState):
1406         (WebCore::HTMLMediaElement::paused):
1407         (WebCore::HTMLMediaElement::play):
1408         (WebCore::HTMLMediaElement::pause):
1409         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
1410         (WebCore::HTMLMediaElement::movieDidEnd):
1411         (WebCore::HTMLMediaElement::updatePlayState):
1412         * html/HTMLMediaElement.h:
1413
1414 2007-11-13  John Sullivan  <sullivan@apple.com>
1415
1416         Reviewed by Darin.
1417
1418         removed recently-added PreferredType concept; we found a better way to do what
1419         ths was accomplishing
1420
1421         * bridge/WindowFeatures.h:
1422         (WebCore::WindowFeatures::WindowFeatures):
1423         removed definition of PreferredType
1424                         
1425         * page/ContextMenuController.cpp:
1426         (WebCore::openNewWindow):
1427         removed use of PreferredType
1428
1429 2007-11-12  Alexey Proskuryakov  <ap@webkit.org>
1430
1431         Reviewed by Darin.
1432
1433         http://bugs.webkit.org/show_bug.cgi?id=15954
1434         Move DOM Selection operations out of SelectionController
1435
1436         No change in functionality.
1437
1438         * editing/SelectionController.cpp:
1439         (WebCore::SelectionController::setSelectedRange):
1440         * editing/SelectionController.h:
1441         * page/DOMSelection.cpp:
1442         (WebCore::DOMSelection::anchorNode):
1443         (WebCore::DOMSelection::baseNode):
1444         (WebCore::DOMSelection::anchorOffset):
1445         (WebCore::DOMSelection::baseOffset):
1446         (WebCore::DOMSelection::focusNode):
1447         (WebCore::DOMSelection::extentNode):
1448         (WebCore::DOMSelection::focusOffset):
1449         (WebCore::DOMSelection::extentOffset):
1450         (WebCore::DOMSelection::isCollapsed):
1451         (WebCore::DOMSelection::type):
1452         (WebCore::DOMSelection::rangeCount):
1453         (WebCore::DOMSelection::collapse):
1454         (WebCore::DOMSelection::collapseToEnd):
1455         (WebCore::DOMSelection::collapseToStart):
1456         (WebCore::DOMSelection::empty):
1457         (WebCore::DOMSelection::setBaseAndExtent):
1458         (WebCore::DOMSelection::setPosition):
1459         (WebCore::DOMSelection::modify):
1460         (WebCore::DOMSelection::extend):
1461         (WebCore::DOMSelection::getRangeAt):
1462         (WebCore::DOMSelection::removeAllRanges):
1463         (WebCore::DOMSelection::addRange):
1464         (WebCore::DOMSelection::deleteFromDocument):
1465         (WebCore::DOMSelection::containsNode):
1466         (WebCore::DOMSelection::selectAllChildren):
1467         (WebCore::DOMSelection::toString):
1468         * page/DOMSelection.h:
1469         Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange()
1470         to return its result directly instead of via an ExceptionCode that no caller wanted.
1471
1472         * editing/Editor.cpp:
1473         (WebCore::Editor::deleteRange):
1474         (WebCore::Editor::removeFormattingAndStyle):
1475         (WebCore::Editor::selectComposition):
1476         (WebCore::Editor::setComposition):
1477         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
1478         Adapted for SelectionController::setSelectedRange() now returning a bool.
1479         SelectionController::toString() is no longer avasilable, use plainText() explicitly.
1480
1481         * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature.
1482
1483 2007-11-12  Dan Bernstein  <mitz@apple.com>
1484
1485         Reviewed by Darin Adler.
1486
1487         - <http://bugs.webkit.org/show_bug.cgi?id=15890>
1488           Most of www.aol.com still redraws unnecessarily when headline/photo section changes
1489
1490         Test: fast/repaint/invisible-objects.html
1491
1492         Avoid repainting invisible blocks if they are enclosed in a layer that
1493         contains no visible objects.
1494
1495         * rendering/RenderBlock.cpp:
1496         (WebCore::RenderBlock::layoutBlock):
1497         * rendering/RenderBox.cpp:
1498         (WebCore::RenderBox::absoluteClippedOverflowRect):
1499
1500 2007-11-12  Timothy Hatcher  <timothy@apple.com>
1501
1502         Reviewed by Mark Rowe.
1503
1504         Prevent selecting a word in the breadcrumb or the styles section when double
1505         clicking on a DOM node in the outline tree.
1506
1507         * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
1508           with a detail of 2 or higher comes in. This prevents the selection.
1509         * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
1510
1511 2007-11-12  Oliver Hunt  <oliver@apple.com>
1512
1513         Reviewed by John S.
1514
1515         <rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)
1516         
1517         EventHandler needs to reset these fields when a drag terminates, otherwise
1518         EventHandler is left in an inconsistent state when a drag is initiated on a
1519         page with multiple frames.
1520
1521         * page/EventHandler.cpp:
1522         (WebCore::EventHandler::cancelDragAndDrop):
1523         (WebCore::EventHandler::performDragAndDrop):
1524         (WebCore::EventHandler::clearDragState):
1525         * page/EventHandler.h:
1526
1527 2007-11-12  Oliver Hunt  <oliver@apple.com>
1528
1529         Reviewed by Darin and Antti.
1530
1531         Return behaviour for 0 sized pattern back to what it was prior to r27704
1532
1533         This change in behaviour broke two layout tests in DRT, so correcting it
1534         corrects existing tests.
1535
1536         * platform/graphics/cg/ImageBufferCG.cpp:
1537
1538 2007-11-12  Timothy Hatcher  <timothy@apple.com>
1539
1540         Reviewed by John.
1541
1542         <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]
1543
1544         * page/mac/WebCoreFrameBridge.mm:
1545         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
1546         If the SharedBuffer is null insert an empty NSData instead of nil.
1547
1548 2007-11-12  Darin Adler  <darin@apple.com>
1549
1550         Reviewed by Tim.
1551
1552         - http://bugs.webkit.org/show_bug.cgi?id=15947
1553           speed up page loading a bit by inlining
1554
1555         * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
1556         Factored out the slow case of isScheduledLocationChangePending into this.
1557
1558         * loader/FrameLoader.h:
1559         (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
1560         inline check of the far and away most common case, where m_scheduledRedirection
1561         is 0; the rest is in the isLocationChange function.
1562
1563 2007-11-12  George Staikos  <staikos@kde.org>
1564
1565         Reviewed by Tim.
1566
1567         Extract the text match marker highlight color into RenderTheme instead
1568         of the hardcoded yellow.
1569
1570         * rendering/InlineTextBox.cpp:
1571         (WebCore::InlineTextBox::paintTextMatchMarker):
1572         * rendering/RenderTheme.cpp:
1573         (WebCore::RenderTheme::platformTextSearchHighlightColor):
1574         * rendering/RenderTheme.h:
1575
1576 2007-11-12  Mark Rowe  <mrowe@apple.com>
1577
1578         Fix deadlock on launch on the Mac.
1579
1580         * loader/icon/IconDatabase.cpp:
1581         (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717.
1582
1583 2007-11-12  Justin Haygood  <jhaygood@reaktix.com>
1584
1585         Reviewed by Brady.
1586
1587         http://bugs.webkit.org/show_bug.cgi?id=15955
1588         Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions
1589
1590         * loader/icon/IconDatabase.cpp:
1591         (WebCore::IconDatabase::open):
1592         (WebCore::IconDatabase::close):
1593         * loader/icon/IconDatabase.h:
1594         * platform/sql/SQLiteDatabase.cpp:
1595         (WebCore::SQLiteDatabase::SQLiteDatabase):
1596         (WebCore::SQLiteDatabase::open):
1597         (WebCore::SQLiteDatabase::close):
1598         * platform/sql/SQLiteDatabase.h:
1599
1600 2007-11-12  Adam Roben  <aroben@apple.com>
1601
1602         Windows build fix
1603
1604         * config.h: Touch because VS apparently can't figure out which files
1605         depend on ResourceResponse.h.
1606         * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to
1607         project and remove old ResourceResponse files.
1608
1609 2007-11-12  Julien Chaffraix  <julien.chaffraix@gmail.com>
1610
1611         Reviewed by Darin.
1612
1613         http://bugs.webkit.org/show_bug.cgi?id=15334
1614         Split ResourceResponse into platform specific files
1615
1616         * WebCore.base.exp:
1617         * WebCore.pro:
1618         * WebCore.vcproj/WebCore.vcproj:
1619         * WebCore.xcodeproj/project.pbxproj:
1620         * platform/network/ResourceResponse.cpp: Removed.
1621         * platform/network/ResourceResponse.h: Removed.
1622         * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp.
1623         (WebCore::ResourceResponseBase::asResourceResponse):
1624         (WebCore::ResourceResponseBase::isHTTP):
1625         (WebCore::ResourceResponseBase::url):
1626         (WebCore::ResourceResponseBase::setUrl):
1627         (WebCore::ResourceResponseBase::mimeType):
1628         (WebCore::ResourceResponseBase::setMimeType):
1629         (WebCore::ResourceResponseBase::expectedContentLength):
1630         (WebCore::ResourceResponseBase::setExpectedContentLength):
1631         (WebCore::ResourceResponseBase::textEncodingName):
1632         (WebCore::ResourceResponseBase::setTextEncodingName):
1633         (WebCore::ResourceResponseBase::suggestedFilename):
1634         (WebCore::ResourceResponseBase::setSuggestedFilename):
1635         (WebCore::ResourceResponseBase::httpStatusCode):
1636         (WebCore::ResourceResponseBase::setHTTPStatusCode):
1637         (WebCore::ResourceResponseBase::httpStatusText):
1638         (WebCore::ResourceResponseBase::setHTTPStatusText):
1639         (WebCore::ResourceResponseBase::httpHeaderField):
1640         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1641         (WebCore::ResourceResponseBase::httpHeaderFields):
1642         (WebCore::ResourceResponseBase::isAttachment):
1643         (WebCore::ResourceResponseBase::setExpirationDate):
1644         (WebCore::ResourceResponseBase::expirationDate):
1645         (WebCore::ResourceResponseBase::setLastModifiedDate):
1646         (WebCore::ResourceResponseBase::lastModifiedDate):
1647         (WebCore::ResourceResponseBase::updateResourceResponse):
1648         * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h.
1649         (WebCore::ResourceResponseBase::ResourceResponseBase):
1650         * platform/network/cf/ResourceResponse.h: Added.
1651         (WebCore::ResourceResponse::ResourceResponse):
1652         * platform/network/curl/ResourceResponse.h: Added.
1653         (WebCore::ResourceResponse::ResourceResponse):
1654         (WebCore::ResourceResponse::doUpdateResourceResponse):
1655         * platform/network/mac/ResourceResponse.h: Added.
1656         (WebCore::ResourceResponse::ResourceResponse):
1657         * platform/network/qt/ResourceResponse.h: Added.
1658         (WebCore::ResourceResponse::ResourceResponse):
1659         (WebCore::ResourceResponse::doUpdateResourceResponse):
1660
1661 2007-11-11  Justin Haygood  <jhaygood@reaktix.com>
1662
1663         Reviewed by Adam Roben.
1664
1665         http://bugs.webkit.org/show_bug.cgi?id=15939
1666         Adds a currentThread API for use by SQLiteDatabase, etc.
1667
1668         * platform/Threading.h:
1669         * platform/ThreadingNone.cpp:
1670         (WebCore::currentThread):
1671         * platform/gtk/ThreadingGtk.cpp:
1672         (WebCore::identifierByGthreadHandle):
1673         (WebCore::):
1674         * platform/pthreads/ThreadingPthreads.cpp:
1675         (WebCore::identifierByPthreadHandle):
1676         (WebCore::currentThread):
1677
1678 2007-11-11  Dan Bernstein  <mitz@apple.com>
1679
1680         Reviewed by Adam Roben.
1681
1682         - fix http://bugs.webkit.org/show_bug.cgi?id=15942
1683           REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())
1684
1685         Test: editing/selection/cleared-by-relayout.html
1686
1687         * editing/Selection.cpp:
1688         (WebCore::Selection::toRange): Check if the selection has been cleared
1689         by updating layout.
1690
1691 2007-11-11  Darin Adler  <darin@apple.com>
1692
1693         Reviewed by Mark Rowe.
1694
1695         - fix line numbers that were off since my recent patch
1696
1697         * platform/SegmentedString.h:
1698         (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers
1699         and rename it to m_doNotExcludeLineNumbers.
1700         (WebCore::SegmentedSubstring::excludeLineNumbers): Updated.
1701         (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added.
1702         (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated.
1703         (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix
1704         the regression, but keep the speediness. I accidentally had removed a ! here.
1705
1706         * platform/SegmentedString.cpp:
1707         (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers.
1708
1709 2007-11-11  Oliver Hunt  <oliver@apple.com>
1710
1711         Reviewed by Darin.
1712
1713         Fix for <rdar://problem/5585334> numfuzz: integer overflows opening
1714         malformed SVG file in WebCore::ImageBuffer::create. Add protection
1715         against a potential overflow.
1716
1717         * platform/graphics/cg/ImageBufferCG.cpp:
1718
1719 2007-11-11  Antti Koivisto  <antti@apple.com>
1720
1721         Reviewed by Darin.
1722
1723         Fix a bunch of cases where the exception code is checked by the function but is not zeroed first.
1724
1725         * bindings/js/kjs_binding.cpp:
1726         (KJS::setDOMException):
1727         * dom/Attr.cpp:
1728         (WebCore::Attr::setPrefix):
1729         * dom/Document.cpp:
1730         (WebCore::Document::createElement):
1731         * dom/Element.cpp:
1732         (WebCore::Element::setPrefix):
1733         * dom/Range.cpp:
1734         (WebCore::Range::setStart):
1735         (WebCore::Range::setEnd):
1736         (WebCore::Range::isPointInRange):
1737         (WebCore::Range::comparePoint):
1738         (WebCore::Range::compareBoundaryPoints):
1739         (WebCore::Range::deleteContents):
1740         (WebCore::Range::processContents):
1741         (WebCore::Range::extractContents):
1742         (WebCore::Range::insertNode):
1743         (WebCore::Range::setStartAfter):
1744         (WebCore::Range::setEndBefore):
1745         (WebCore::Range::setEndAfter):
1746         (WebCore::Range::selectNode):
1747         (WebCore::Range::surroundContents):
1748         (WebCore::Range::setStartBefore):
1749         * editing/TextIterator.cpp:
1750         (WebCore::TextIterator::TextIterator):
1751         * html/CanvasRenderingContext2D.cpp:
1752         (WebCore::CanvasRenderingContext2D::createPattern):
1753         * html/HTMLMediaElement.cpp:
1754         (WebCore::HTMLMediaElement::play):
1755         (WebCore::HTMLMediaElement::pause):
1756         * html/HTMLSelectElement.cpp:
1757         (WebCore::HTMLSelectElement::add):
1758         (WebCore::HTMLSelectElement::setOption):
1759         * xml/XPathEvaluator.cpp:
1760         (WebCore::XPathEvaluator::evaluate):
1761
1762 2007-11-11  Darin Adler  <darin@apple.com>
1763
1764         Reviewed by Mitz.
1765
1766         - http://bugs.webkit.org/show_bug.cgi?id=15945
1767           speed up GraphicsContextCG typical case by skipping roundToDevicePixels
1768
1769         * platform/graphics/cg/GraphicsContextCG.cpp:
1770         (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no
1771         longer know if the transform is identity or not.
1772         (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant
1773         CGContextSave/RestoreGState.
1774         (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no
1775         longer know if the transform is identity or not.
1776         (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
1777         (WebCore::GraphicsContext::scale): Ditto.
1778         (WebCore::GraphicsContext::rotate): Ditto.
1779         (WebCore::GraphicsContext::translate): Ditto.
1780         (WebCore::GraphicsContext::concatCTM): Ditto.
1781         (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform
1782         is known to be identity, and record that fact when we discover it otherwise.
1783
1784         * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
1785         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1786         Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false.
1787
1788 2007-11-11  Darin Adler  <darin@apple.com>
1789
1790         Reviewed by Mitz.
1791
1792         - http://bugs.webkit.org/show_bug.cgi?id=15944
1793           streamline SegmentedString to speed up parsing
1794
1795         I measured a speed-up of the page load test while developing this patch. I don't
1796         have a precise figure, though.
1797
1798         * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed
1799         lineno to m_lineNumber.
1800         * html/HTMLTokenizer.cpp:
1801         (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function
1802         since we don't want to update a line number.
1803         (WebCore::HTMLTokenizer::parseSpecial): Ditto.
1804         (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly
1805         instead of lineNumberPtr() since the advance function now takes a reference.
1806         (WebCore::HTMLTokenizer::parseServer): Ditto.
1807         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
1808         (WebCore::HTMLTokenizer::parseText): Ditto.
1809         (WebCore::HTMLTokenizer::parseEntity): Ditto.
1810         (WebCore::HTMLTokenizer::parseTag): Ditto.
1811         (WebCore::HTMLTokenizer::write): Ditto.
1812
1813         * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write):
1814         * loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
1815         Don't pass 0 to the advance function.
1816
1817         * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined
1818         the most common case, and pushed less common cases into a separate function
1819         that is not inlined. Also got rid of a branch by separating the case with a
1820         line number from the case without one.
1821
1822         * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase):
1823         Added. The aforementioned less common cases are here.
1824
1825 2007-11-11  Antti Koivisto  <antti@apple.com>
1826
1827         Forgot to do this review change (and test HTTP commit).
1828
1829         * html/HTMLMediaElement.cpp:
1830         (WebCore::HTMLMediaElement::play):
1831
1832 2007-11-11  Antti Koivisto  <antti@apple.com>
1833
1834         Reviewed by Darin.
1835         
1836         - Update play() and pause() to match current HTML5 draft
1837             - send events asynchronously
1838             - add timeupdate event to pause
1839             - rethrow load() exception, not others
1840         - Use list for async events to get ordering right
1841
1842         Tests: media/video-pause-empty-events.html
1843                media/video-play-empty-events.html
1844                media/video-play-pause-events.html
1845                media/video-play-pause-exception.html
1846
1847         * html/HTMLMediaElement.cpp:
1848         (WebCore::HTMLMediaElement::dispatchEventAsync): 
1849         (WebCore::HTMLMediaElement::asyncEventTimerFired):
1850         (WebCore::HTMLMediaElement::play):
1851         (WebCore::HTMLMediaElement::pause):
1852         * html/HTMLMediaElement.h:
1853
1854 2007-11-11  Nikolas Zimmermann  <zimmermann@kde.org>
1855
1856         Reviewed by Eric.
1857
1858         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6424 (<text>, <tspan> dominant-baseline attribute is not respected)
1859
1860         Add (basic) support for dominant-baseline / alignment-baseline text properties.
1861         Note: there are no official testcases, and no-one implemented it before. Only ASV3
1862               supported dominant-baseline, but not correct it seems.
1863
1864         * rendering/SVGRootInlineBox.cpp:
1865         (WebCore::dominantBaselineToShift):
1866         (WebCore::alignmentBaselineToShift):
1867         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1868
1869 2007-11-11  Adam Roben  <aroben@apple.com>
1870
1871         Add wrappers around CoCreateInstance to COMPtr
1872
1873         I followed the example of the Query constructor and query method by
1874         adding a Create constructor and create method.
1875
1876         Reviewed by Darin.
1877
1878         * platform/win/COMPtr.h:
1879         (COMPtr::COMPtr): Added a new constructor that calls
1880         CoCreateInstance.
1881         (COMPtr::create): Added.
1882         (COMPtr::createInstance): Added.
1883
1884 2007-11-11  Alexey Proskuryakov  <ap@nypop.com>
1885
1886         Reviewed by Darin.
1887
1888         http://bugs.webkit.org/show_bug.cgi?id=15896
1889         More editing cleanup
1890
1891         No functionality changes.
1892
1893         * dom/Node.h: Moved several editing-related methods elsewhere.
1894         * dom/Node.cpp: (WebCore::Node::maxCharacterOffset): Renamed from maxOffset()
1895         to highlight that it is a match to offsetInCharacters(), and much different from other
1896         offset-related methods. Added ASSERT_NOT_REACHED(), as callers are supposed to check
1897         offsetInCharacters() before calling this.
1898
1899         * dom/CharacterData.cpp: (WebCore::CharacterData::maxCharacterOffset):
1900         * dom/CharacterData.h: (WebCore::CharacterData::isCharacterDataNode):
1901         Updated for above renamings.
1902
1903         * dom/Comment.{h,cpp}: Removed an override for offsetInCharacters(), which is already present in CharacterData.
1904
1905         * dom/Document.{h,cpp}: Folded updateSelection() into Frame::selectionLayoutChanged().
1906
1907         * dom/Position.h:
1908         * dom/Position.cpp:
1909         (WebCore::Position::uncheckedPreviousOffset): Moved from Node::previousOffset().
1910         (WebCore::Position::uncheckedNextOffset): Moved from Node::NextOffset().
1911         (WebCore::Position::previous): Adapted to the above move.
1912         (WebCore::Position::next): Ditto.
1913         (WebCore::Position::upstream): Removed an isBR() check, since a non-BR element cannot have a BR renderer (I think),
1914         and BR elements are covered by editingIgnoresContent().
1915         (WebCore::Position::downstream): Ditto.
1916         (WebCore::caretMaxRenderedOffset): Moved from Node::caretMaxRenderedOffset().
1917         (WebCore::Position::rendersInDifferentPosition): Updated for the above moves.
1918
1919         * dom/PositionIterator.h: Added a comment describing this class from the original check-in.
1920         * dom/PositionIterator.cpp:
1921         (WebCore::PositionIterator::increment): Updated for the above moves.
1922         (WebCore::PositionIterator::decrement): Ditto.
1923
1924         * dom/ProcessingInstruction.h:
1925         * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::maxCharacterOffset):
1926         ProcessingInstruction was already returning true from offsetInCharacters(), but didn't override maxCharacterOffset().
1927         I think that implementing it has no actual effect, as PIs are not rendered, but it looks cleaner this way.
1928
1929         * dom/Range.cpp:
1930         (WebCore::Range::selectNodeContents):
1931         * editing/ApplyStyleCommand.cpp:
1932         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1933         (WebCore::ApplyStyleCommand::applyInlineStyle):
1934         (WebCore::maxRangeOffset):
1935         (WebCore::ApplyStyleCommand::removeInlineStyle):
1936         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
1937         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
1938         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1939         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1940         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1941         * editing/CompositeEditCommand.cpp:
1942         (WebCore::CompositeEditCommand::insertNodeAt):
1943         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
1944         * editing/DeleteSelectionCommand.cpp:
1945         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1946         * editing/InsertLineBreakCommand.cpp:
1947         (WebCore::InsertLineBreakCommand::doApply):
1948         * editing/InsertParagraphSeparatorCommand.cpp:
1949         (WebCore::InsertParagraphSeparatorCommand::doApply):
1950         * editing/InsertTextCommand.cpp:
1951         (WebCore::InsertTextCommand::insertTab):
1952         * editing/visible_units.cpp:
1953         (WebCore::previousLinePosition):
1954         (WebCore::nextLinePosition):
1955         Updated for the above moves.
1956
1957         * editing/Editor.cpp:
1958         (WebCore::Editor::advanceToNextMisspelling): Added a missing rangeCompliantEquivalent() call.
1959
1960         * editing/TextIterator.cpp:
1961         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Changed the condition to obviously
1962         match a maxCharacterOffset() call made after it; hopefully, this doesn't break any border cases.
1963         (WebCore::SimplifiedBackwardsTextIterator::advance): Updated for the above moves.
1964
1965         * editing/htmlediting.h:
1966         * editing/htmlediting.cpp:
1967         (WebCore::canHaveChildrenForEditing): Removed a bogus comment: I don't thin BRs have a special ability to accept
1968         child nodes, other than via DOM manipulation, which is not specific to BRs.
1969         (WebCore::rangeCompliantEquivalent): Removed a check for BR, which is already covered by editingIgnoresContent().
1970         (WebCore::maxDeepOffset): Ditto.
1971         (WebCore::caretMinOffset): Moved from Node. Changed some runtime checks that seemingly cannot fail into assertions.
1972         (WebCore::caretMaxOffset): Ditto.
1973
1974         * page/EventHandler.cpp:
1975         (WebCore::EventHandler::handleMousePressEventSingleClick): Pass 0 to VisiblePosition constructor instead of
1976         caretMinOffset. I didn't want to include htmlediting.h here, and I think that VisiblePosition constructor
1977         will take care of adjusting the offset.
1978
1979         * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Folded Document::updateSelection() here.
1980         * page/mac/WebCoreFrameBridge.mm:
1981         (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]): Added missing rangeCompliantEquivalent() calls.
1982         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForRenderer): Changed to not round-trip via editing.
1983         Changed some runtime checks that seemingly cannot fail into assertions.
1984
1985 2007-11-11  Darin Adler  <darin@apple.com>
1986
1987         Reviewed by Sam.
1988
1989         - updated for JSRegExp function changes
1990
1991         * platform/RegularExpression.cpp:
1992         (WebCore::RegularExpression::Private::compile):
1993         (WebCore::RegularExpression::match):
1994
1995 2007-11-10  Mark Rowe  <mrowe@apple.com>
1996
1997         Qt Linux build fix.
1998
1999         * platform/UnicodeRange.h:
2000
2001 2007-11-10  Mark Rowe  <mrowe@apple.com>
2002
2003         Qt Windows build fix.
2004
2005         * platform/UnicodeRange.h:
2006
2007 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
2008
2009         Reviewed by Eric.
2010
2011         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15937 (Add glyph-orientation-horizontal/vertical support)
2012         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13971 (text-anchor support on vertical text seems slightly off)
2013
2014         Add glyph-orientation-* support for text & textPath. (90/180/270 and 'auto')
2015         Also fix all vertical text handling - for text & textPath! (especially latin1 characters auto orientation in vertical writing modes)
2016
2017         * WebCore.pro: Add platform/UnicodeRange.cpp to build
2018         * WebCore.xcodeproj/project.pbxproj: Dito.
2019         * rendering/SVGCharacterLayoutInfo.cpp: Respect orientationShiftX/Y & angle in characterTransform()
2020         (WebCore::SVGChar::characterTransform):
2021         * rendering/SVGCharacterLayoutInfo.h: New variables.
2022         (WebCore::SVGCharOnPath::SVGCharOnPath):
2023         (WebCore::SVGChar::SVGChar):
2024         * rendering/SVGRootInlineBox.cpp: Added glyph-orientation-* handling.
2025         (WebCore::glyphOrientationToAngle):
2026         (WebCore::glyphOrientationIsMultiplyOf180Degrees):
2027         (WebCore::calculateGlyphAdvanceAndShiftRespectingOrientation):
2028         (WebCore::cummulatedHeightOfInlineBoxCharacterRange):
2029         (WebCore::cummulatedWidthOrHeightOfTextChunk):
2030         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2031
2032 2007-11-10  Timothy Hatcher  <timothy@apple.com>
2033
2034         Reviewed by Sam Weinig.
2035
2036         * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
2037           and switch over to use getUniqueProperties in another place.
2038
2039 2007-11-10  John Sullivan  <sullivan@apple.com>
2040
2041         Reviewed by Sam Weinig
2042
2043         Rest of fix for 5394877
2044
2045         * bindings/js/kjs_window.cpp:
2046         (KJS::Window::isSafeScript):
2047         Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in
2048         private browsing mode either.
2049
2050 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
2051
2052         Reviewed by Oliver.
2053
2054         Fix function name difference - header said 'unicodeRangeForCharacter', actually
2055         implemented function is 'findCharUnicodeRange'. They are not compiled yet.
2056
2057         * platform/UnicodeRange.h:
2058
2059 2007-11-10  Dan Bernstein  <mitz@apple.com>
2060
2061         Reviewed by Darin Adler.
2062
2063         - fix <rdar://problem/5450655> Control-clicking text in a link can surprisingly select only part of the link, should select entire link
2064
2065         No test because context menu events cannot be tested in DumpRenderTree.
2066
2067         * page/EventHandler.cpp:
2068         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added.
2069         If the click occurred in an active link, selects the entire link
2070         element. Otherwise selects the closest word.
2071         (WebCore::EventHandler::sendContextMenuEvent): Call
2072         selectClosestWordOrLinkFromMouseEvent().
2073         * page/EventHandler.h:
2074
2075 2007-11-10  John Sullivan  <sullivan@apple.com>
2076
2077         Reviewed by Tim Hatcher
2078
2079         - fixed <rdar://problem/5394877> Safari should not log unsafe JavaScript attempts when 
2080           in private browsing mode (only an issue if Log JavaScript Exceptions is turned on)
2081
2082         * bindings/js/kjs_window.cpp:
2083         (KJS::Window::isSafeScript):
2084         Don't log unsafe JavaScript attempts to console or chromeClient if in private browsing mode
2085
2086 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
2087
2088         Reviewed by Darin.
2089
2090         http://bugs.webkit.org/show_bug.cgi?id=15922
2091         Implement more of Mozilla Selection API
2092
2093         Tests: editing/selection/containsNode.html
2094                editing/selection/deleteFromDocument.html
2095                editing/selection/extend.html
2096                editing/selection/selectAllChildren.html
2097
2098         * editing/SelectionController.cpp:
2099         (WebCore::SelectionController::deleteFromDocument):
2100         (WebCore::SelectionController::containsNode):
2101         (WebCore::SelectionController::selectAllChildren):
2102         (WebCore::SelectionController::extend):
2103         * editing/SelectionController.h:
2104         Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(),
2105         which existed, but didn't match Firefox behavior and wasn't exposed via bindings.
2106         Removed a comment mentioning removeRange(), as this method makes no sense without multiple
2107         selection range support.
2108
2109         * page/DOMSelection.cpp:
2110         (WebCore::DOMSelection::extend):
2111         (WebCore::DOMSelection::deleteFromDocument):
2112         (WebCore::DOMSelection::containsNode):
2113         (WebCore::DOMSelection::selectAllChildren):
2114         * page/DOMSelection.h:
2115         * page/DOMSelection.idl:
2116         Exposed the new methods.
2117
2118 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
2119
2120         Reviewed by Darin.
2121
2122         http://bugs.webkit.org/show_bug.cgi?id=15892
2123         DOM Range operations are not implemented for ProcessingInstruction nodes
2124
2125         Test: fast/dom/Range/range-processing-instructions.html
2126
2127         * dom/Range.cpp:
2128         (WebCore::Range::processContents): Implemented ProcessingInstruction cases.
2129         (WebCore::Range::checkNodeWOffset): Removed a FIXME - yes, I think that we are supposed
2130         to use ProcessingInstruction.data.
2131
2132 2007-11-09  Timothy Hatcher  <timothy@apple.com>
2133
2134         Reviewed by Mark Rowe.
2135
2136         Bug 12054: Ability to serialize an element subtree (into clipboard?) from the DOM inspector
2137         http://bugs.webkit.org/show_bug.cgi?id=12054
2138
2139         - Add support code for routing copy events to the focused element.
2140         - Implement copying the currently selected DOM node. The node
2141           and it's subtree is copied to the clipboard. If the node has no
2142           outerHTML, the nodeValue is copied (text nodes, etc.)
2143         - Implement copy for the resource sidebar. The URL is copied for the
2144           currently selected resource.
2145
2146         * page/inspector/DocumentPanel.js:
2147         * page/inspector/inspector.js:
2148
2149 2007-11-09  Antti Koivisto  <antti@apple.com>
2150
2151         Reviewed by Adele.
2152
2153         Fix occasional blank video with poster attribute.
2154
2155         * ChangeLog:
2156         * html/HTMLMediaElement.cpp:
2157         (WebCore::HTMLMediaElement::load):
2158         (WebCore::HTMLMediaElement::didRestoreFromCache):
2159         Just calling updateFromElement() does the right thing for both poster image and video.
2160
2161 2007-11-04  Sam Weinig  <sam@webkit.org>
2162
2163         Reviewed by Adam Roben.
2164
2165         <rdar://problem/5435940>
2166         The COM bindings for the DOM should be autogenerated like the other DOM bindings
2167
2168         Initial commit of the autogeneration of the COM DOM Bindings.  No behavior change
2169         is being introduced in this patch and to insure that no conflicts arise, a temporary
2170         prefix of "GEN_" has been used for all the new classes.
2171
2172         The build architecture for these bindings differs slightly from the other autogenerated
2173         bindings.  Instead of building in WebCore and migrating the resuting code to WebKit (as
2174         is done for the Objective-C bindigs currently), the IDLs and generation scripts are
2175         migrated to WebKit and built there.  This is done with a series of scripts and Makefiles.
2176
2177         This commit includes:
2178             - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation
2179               and ref-counting.
2180             - Generating all of the Core DOM and most of HTML and CSS
2181             - Generating Event, EventTarget, and EventListener
2182
2183         * WebCore.vcproj/MigrateIDLAndScripts.make: Added.
2184         * WebCore.vcproj/WebCore.vcproj:
2185         * WebCore.vcproj/migrate-idls.sh: Added.
2186         * bindings/scripts/CodeGenerator.pm:
2187         * bindings/scripts/CodeGeneratorCOM.pm: Added.
2188         * dom/EventListener.h: Make the isWindowEvent parameter default to false
2189         to allow autogeneration based on the IDL.
2190
2191 2007-11-09  Tristan O'Tierney  <tristan@apple.com>
2192
2193         Reviewed by Timothy Hatcher.
2194         
2195         This patch is for the WebKit side of <rdar://problem/5591115>.
2196         We need a way to tell context menu navigations, such as "Open in New Window"
2197         to override any sort of browser preference for tab based navigation.
2198
2199         * bridge/WindowFeatures.h:
2200         (WebCore::WindowFeatures::WindowFeatures):
2201         Added a new struct member var, preferredType
2202         and an accompanying enum type PreferredType
2203         to send a window type recommendation up to the Chrome. 
2204         
2205         * page/ContextMenuController.cpp:
2206         (WebCore::openNewWindow):
2207         Set the window features to recommend a new Window for
2208         "Open in New Window" context menu action.
2209
2210 2007-11-08  Adam Roben  <aroben@apple.com>
2211
2212         Fix <rdar://5483519> Pressing Enter on selected buttons should fire onclick
2213
2214         We now match the behavior of Firefox and IE, which is to always just
2215         send a click event to the focused button when the Enter key is pressed
2216         (previously we were submitting forms directly in some cases).
2217
2218         Reviewed by Adele.
2219
2220         Test: fast/forms/enter-clicks-buttons.html
2221
2222         * html/HTMLButtonElement.cpp:
2223         (WebCore::HTMLButtonElement::defaultEventHandler): Don't do anything
2224         fancy when Enter is pressed on a <button type=button> -- just send a
2225         click event like we do for other button types.
2226         * html/HTMLInputElement.cpp:
2227         (WebCore::HTMLInputElement::defaultEventHandler): Treat type=button
2228         the same way we treat type=submit and type=reset: just send a click
2229         event when Enter is pressed.
2230
2231 2007-11-09  Dan Bernstein  <mitz@apple.com>
2232
2233         Reviewed by Antti Koivisto.
2234
2235         - fix a bug in invisible layer culling: dynamically changing a 
2236           descendant of an invisible layer to be visible did not work
2237
2238         Test: fast/layers/layer-content-visibility-change.html
2239
2240         * rendering/RenderLayer.cpp:
2241         (WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
2242         make sure that our stacking context rebuilds its z-order lists to
2243         include us.
2244
2245 2007-11-09  David Hyatt  <hyatt@apple.com>
2246
2247         Clean up matrix() parsing.  Make sure the first four arguments can be lengths or numbers.  The last two
2248         args can be lengths or numbers or percents.
2249
2250         Reviewed by Beth
2251
2252         * WebCore.xcodeproj/project.pbxproj:
2253         * css/CSSParser.cpp:
2254         (WebCore::TransformOperationInfo::TransformOperationInfo):
2255         (WebCore::CSSParser::parseTransform):
2256         * rendering/RenderStyle.h:
2257         (WebCore::MatrixTransformOperation::apply):
2258
2259 2007-11-09  Beth Dakin  <bdakin@apple.com>
2260
2261         Reviewed by Oliver.
2262
2263         Fix for <rdar://problem/5586370> CSS Transform - incorrect matrix 
2264         math leads to crazy problems
2265
2266         Transform matrices accept the first four parameters as CSS lengths. 
2267         CSS lengths get mapped into WebCore::Lengths as percents by 
2268         WebCore::convertToLength(). Percent lengths cannot call value(). It 
2269         does not yield a correct result and it asserts on Debug builds. 
2270
2271         * rendering/RenderStyle.h:
2272         (WebCore::MatrixTransformOperation::apply): Instead of calling 
2273         value() on the lengths, call calcValue. This fixes the assert and 
2274         the bad rendering. 
2275
2276 2007-11-09  Simon Hausmann  <hausmann@kde.org>
2277
2278         Reviewed by nobody, build/link fix for Qt/Windows.
2279
2280         userIdleTime() is stubbed in win/SystemTimeWin.cpp, so don't
2281         define it twice.
2282
2283         * platform/qt/TemporaryLinkStubs.cpp:
2284
2285 2007-11-09  Simon Hausmann  <hausmann@kde.org>
2286
2287         Reviewed by Holger.
2288
2289         Fix ContextMenu allocation in the Qt port.
2290
2291         Store all items and submenus value based in ContextMenu and ContextMenuItem.
2292         That fixes the crashes when the context menu was populated with sub-menus because
2293         of the use of temporary ContextMenu objects like this:
2294
2295         ContextMenu subMenu(...);
2296         subMenu.appendItem(...);
2297         subMenu.appendItem(...);
2298
2299         subMenuItem.setSubMenu(&subMenu); // temporary pointer, need to _copy_ contents
2300
2301         * platform/ContextMenu.h:
2302         * platform/ContextMenuItem.h:
2303         * platform/PlatformMenuDescription.h:
2304         * platform/qt/ContextMenuItemQt.cpp:
2305         (WebCore::ContextMenuItem::ContextMenuItem):
2306         (WebCore::ContextMenuItem::platformSubMenu):
2307         * platform/qt/ContextMenuQt.cpp:
2308         (WebCore::ContextMenu::ContextMenu):
2309         (WebCore::ContextMenu::~ContextMenu):
2310         (WebCore::ContextMenu::appendItem):
2311         (WebCore::ContextMenu::itemCount):
2312
2313 2007-11-09  Peter Kasting  <zerodpx@gmail.com>
2314
2315         Reviewed by Mark Rowe.
2316
2317         http://bugs.webkit.org/show_bug.cgi?id=15909
2318         Malformed GIFs should not result in memory corruption.
2319
2320         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2321         (WebCore::GIFImageDecoder::haveDecodedRow):
2322
2323 2007-11-08  Timothy Hatcher  <timothy@apple.com>
2324
2325         Reviewed by Sam Weinig.
2326
2327         Some Web Inspector CSS editing changes.
2328         - Only delete the property if all the text is delete or the new user input correctly parses.
2329           This prevents deleting the existing property if the new text is invalid.
2330         - Intercept the Escape key and cancel editing, not saving any changes.
2331
2332         * page/inspector/StylesSidebarPane.js:
2333
2334 2007-11-08  Kevin Ollivier  <kevino@theolliviers.com>
2335
2336         Bakefiles for building WebCore, needed by wx port.
2337
2338         Reviewed by Mark Rowe.
2339
2340         * WebCoreSources.bkl: Added.
2341         * webcore-base.bkl: Added.
2342         * webcore-wx.bkl: Added.
2343
2344 2007-11-08  Justin Haygood  <jhaygood@reaktix.com>
2345
2346         Reviewed by Mark Rowe.
2347
2348         http://bugs.webkit.org/show_bug.cgi?id=15905
2349
2350         Fix builds with HTML 5 Storage support disabled.
2351         ENABLE(DATABASE) needs to be added in a few places.
2352
2353         * page/InspectorController.cpp:
2354         * storage/Database.h:
2355
2356 2007-11-08  Steve Falkenburg  <sfalken@apple.com>
2357
2358         <rdar://problem/5524082> Allow images to be dragged out directly into other apps
2359         
2360         We weren't including CF_HDROP in our image drops.  This broke drag of
2361         images out of the browser window directly into other apps (examples
2362         include notepad, mspaint, msword).
2363         
2364         Reviewed by Oliver, Ada.
2365
2366         * platform/win/ClipboardWin.cpp:
2367         (WebCore::createGlobalImageFileContent): Removed unused variable.
2368         (WebCore::createGlobalHDropContent): Added
2369         (WebCore::writeFileToDataObject): Write HDROP data if available.
2370         (WebCore::writeImageToDataObject): Write HDROP for dragged images.
2371         (WebCore::ClipboardWin::writeURL): Don't write HDROP for dragged URLs.
2372
2373 2007-11-08  Xan Lopez  <xan@gnome.org>
2374
2375         Reviewed by Alp.
2376
2377         http://bugs.webkit.org/show_bug.cgi?id=15908
2378         Use g_object_ref_sink when available
2379
2380         * platform/gtk/PopupMenuGtk.cpp:
2381         (WebCore::PopupMenu::show):
2382         * platform/gtk/ScrollViewGtk.cpp:
2383         (WebCore::ScrollView::setGtkAdjustments):
2384
2385 2007-11-08  Dan Bernstein  <mitz@apple.com>
2386
2387         Reviewed by Beth Dakin.
2388
2389         - fix <rdar://problem/5491922> REGRESSION (Safari 2-3): Flash-based "Cash Optimizer" on etrade.com does not draw completely
2390
2391         Test: fast/dom/length-attribute-mapping.html
2392
2393         * dom/StyledElement.cpp:
2394         (WebCore::StyledElement::addCSSLength): Changed the garbage-stripping
2395         logic to stop after the first "%" or "*" in the string. This allows for
2396         "100%25" to be mapped to "100%" like it is in Firefox and WinIE.
2397
2398 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
2399
2400         - Build fix.
2401
2402         * loader/FrameLoaderClient.h:
2403         * platform/graphics/svg/SVGImageEmptyClients.h:
2404         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
2405
2406 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
2407
2408         Reviewed by Sam.
2409
2410         - windowObjectCleared() is no longer const.  It needs to setup the
2411         script debugger and cannot be const to do so.
2412
2413         * loader/FrameLoaderClient.h:
2414         * platform/graphics/svg/SVGImageEmptyClients.h:
2415         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
2416
2417 2007-11-08  Adam Roben  <aroben@apple.com>
2418
2419         Hopeful Windows build fix
2420
2421         * rendering/RenderObject.cpp: Touch this file to make it recompile.
2422
2423 2007-11-08  Sam Weinig  <sam@webkit.org>
2424
2425         Reviewed by Darin.
2426
2427         Convert JavaScript internal function objects to use one class per
2428         function.  This avoids a switch statement inside what used to be
2429         the shared function classes and will allow Shark to better analyze
2430         the code.
2431
2432         To make this switch, the value property of the HashEntry was changed
2433         to a union of an intptr_t (which is used to continue handle valueGetters)
2434         and function pointer which points to a static constructor for the
2435         individual new function objects.
2436
2437         SunSpider claims this is a 1.0% speedup.
2438
2439         - On the WebCore side, I updated CodeGeneratorJS.pm to generate the
2440           new classes and hand updated the remain non-generated (groan) classes.
2441
2442         * bindings/js/JSDOMWindowCustom.cpp:
2443         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2444         * bindings/js/JSEventTargetNode.cpp:
2445         (WebCore::JSEventTargetNodePrototypeFunctionAddEventListener::callAsFunction):
2446         (WebCore::JSEventTargetNodePrototypeFunctionRemoveEventListener::callAsFunction):
2447         (WebCore::JSEventTargetNodePrototypeFunctionDispatchEvent::callAsFunction):
2448         * bindings/js/JSEventTargetNode.h:
2449         * bindings/js/JSHTMLInputElementBase.cpp:
2450         (WebCore::JSHTMLInputElementBaseFunctionSetSelectionRange::callAsFunction):
2451         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
2452         * bindings/js/JSHTMLInputElementBase.h:
2453         (WebCore::JSHTMLInputElementBase::):
2454         * bindings/js/JSXMLHttpRequest.cpp:
2455         (KJS::JSXMLHttpRequestPrototypeFunctionAbort::callAsFunction):
2456         (KJS::JSXMLHttpRequestPrototypeFunctionGetAllResponseHeaders::callAsFunction):
2457         (KJS::JSXMLHttpRequestPrototypeFunctionGetResponseHeader::callAsFunction):
2458         (KJS::JSXMLHttpRequestPrototypeFunctionOpen::callAsFunction):
2459         (KJS::JSXMLHttpRequestPrototypeFunctionSend::callAsFunction):
2460         (KJS::JSXMLHttpRequestPrototypeFunctionSetRequestHeader::callAsFunction):
2461         (KJS::JSXMLHttpRequestPrototypeFunctionOverrideMIMEType::callAsFunction):
2462         (KJS::JSXMLHttpRequestPrototypeFunctionAddEventListener::callAsFunction):
2463         (KJS::JSXMLHttpRequestPrototypeFunctionRemoveEventListener::callAsFunction):
2464         (KJS::JSXMLHttpRequestPrototypeFunctionDispatchEvent::callAsFunction):
2465         * bindings/js/JSXMLHttpRequest.h:
2466         (KJS::JSXMLHttpRequest::impl):
2467         * bindings/js/JSXSLTProcessor.cpp:
2468         (KJS::JSXSLTProcessorPrototypeFunctionImportStylesheet::callAsFunction):
2469         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
2470         (KJS::JSXSLTProcessorPrototypeFunctionTransformToDocument::callAsFunction):
2471         (KJS::JSXSLTProcessorPrototypeFunctionSetParameter::callAsFunction):
2472         (KJS::JSXSLTProcessorPrototypeFunctionGetParameter::callAsFunction):
2473         (KJS::JSXSLTProcessorPrototypeFunctionRemoveParameter::callAsFunction):
2474         (KJS::JSXSLTProcessorPrototypeFunctionClearParameters::callAsFunction):
2475         (KJS::JSXSLTProcessorPrototypeFunctionReset::callAsFunction):
2476         * bindings/js/JSXSLTProcessor.h:
2477         * bindings/js/kjs_events.cpp:
2478         (WebCore::JSClipboardPrototypeFunctionClearData::callAsFunction):
2479         (WebCore::JSClipboardPrototypeFunctionGetData::callAsFunction):
2480         (WebCore::JSClipboardPrototypeFunctionSetData::callAsFunction):
2481         (WebCore::JSClipboardPrototypeFunctionSetDragImage::callAsFunction):
2482         * bindings/js/kjs_events.h:
2483         * bindings/js/kjs_navigator.cpp:
2484         (KJS::Plugins::):
2485         (KJS::Navigator::getOwnPropertySlot):
2486         (KJS::Plugins::getOwnPropertySlot):
2487         (KJS::PluginsFunctionRefresh::callAsFunction):
2488         (KJS::NavigatorProtoFuncJavaEnabled::callAsFunction):
2489         * bindings/js/kjs_navigator.h:
2490         (KJS::Navigator::):
2491         * bindings/js/kjs_window.cpp:
2492         (KJS::Window::getOwnPropertySlot):
2493         (KJS::Window::put):
2494         (KJS::WindowProtoFuncAToB::callAsFunction):
2495         (KJS::WindowProtoFuncBToA::callAsFunction):
2496         (KJS::WindowProtoFuncOpen::callAsFunction):
2497         (KJS::WindowProtoFuncScrollBy::callAsFunction):
2498         (KJS::WindowProtoFuncScrollTo::callAsFunction):
2499         (KJS::WindowProtoFuncMoveBy::callAsFunction):
2500         (KJS::WindowProtoFuncMoveTo::callAsFunction):
2501         (KJS::WindowProtoFuncResizeBy::callAsFunction):
2502         (KJS::WindowProtoFuncResizeTo::callAsFunction):
2503         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
2504         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
2505         (KJS::WindowProtoFuncSetInterval::callAsFunction):
2506         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
2507         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
2508         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
2509         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
2510         (KJS::Location::getOwnPropertySlot):
2511         (KJS::Location::put):
2512         (KJS::LocationProtoFuncReplace::callAsFunction):
2513         (KJS::LocationProtoFuncReload::callAsFunction):
2514         (KJS::LocationProtoFuncAssign::callAsFunction):
2515         (KJS::LocationProtoFuncToString::callAsFunction):
2516         * bindings/js/kjs_window.h:
2517         (KJS::Window::):
2518         * bindings/scripts/CodeGeneratorJS.pm:
2519
2520 2007-11-08  Mark Rowe  <mrowe@apple.com>
2521
2522         Fix the Gtk, Qt and Wx builds.
2523
2524         * platform/gtk/TemporaryLinkStubs.cpp:
2525         * platform/qt/TemporaryLinkStubs.cpp:
2526         * platform/wx/TemporaryLinkStubs.cpp:
2527
2528 2007-11-08  Mark Rowe  <mrowe@apple.com>
2529
2530         Not reviewed.  Fix two instances of includes using the wrong case in the filename.
2531
2532         * platform/graphics/mac/MoviePrivateQTKit.mm:
2533         * platform/wx/MimeTypeRegistryWx.cpp:
2534
2535 2007-11-08  Darin Adler  <darin@apple.com>
2536
2537         Reviewed by Adam.
2538
2539         - fix <rdar://problem/5552943> accesskey does not focus <button> elements
2540
2541         Test: fast/forms/access-key.html
2542
2543         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::accessKeyAction):
2544         Added a call to focus.
2545
2546 2007-11-07  Darin Adler  <darin@apple.com>
2547
2548         Reviewed by Steve.
2549
2550         - cut down on notImplemented() functions on Windows
2551
2552         * bridge/AXObjectCache.h: Put #if around the accessibility
2553         global.
2554
2555         * bridge/win/FrameWin.cpp: (WebCore::Frame::setNeedsReapplyStyles):
2556         Moved here from TemporaryLinkStubs.
2557
2558         * dom/Document.cpp: (WebCore::Document::lastModified): Re-implemented
2559         using the ResourceResponse that's now available from the DocumentLoader.
2560
2561         * editing/JSEditor.cpp: (execTranspose): Changed to call transpose() on
2562         the Editor instead of the obsolete one on the Frame.
2563
2564         * loader/DocumentLoader.h: Removed getResponseModifiedHeader.
2565         * loader/FrameLoader.h: Removed overrideMediaType.
2566
2567         * loader/gtk/DocumentLoaderGtk.cpp: Removed.
2568         * loader/mac/DocumentLoaderMac.mm: Removed.
2569         * loader/qt/DocumentLoaderQt.cpp: Removed.
2570
2571         * page/Frame.cpp: Removed transpose.
2572         * page/Frame.h: Ditto.
2573         * page/FrameView.h: Removed updateBorder.
2574         * page/gtk/FrameGtk.cpp: Removed issueTransposeCommand.
2575         * page/mac/FrameMac.mm: Ditto.
2576         * page/mac/WebCoreFrameBridge.h: Removed issueTransposeCommand and
2577         overrideMediaType.
2578         * page/qt/FrameQt.cpp: Removed issueTransposeCommand.
2579
2580         * platform/gtk/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled.
2581         * platform/qt/TemporaryLinkStubs.cpp: Ditto.
2582         * platform/win/TemporaryLinkStubs.cpp: Removed or moved all but 3 of the stubs.
2583         * platform/wx/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled,
2584         issueTransposeCommand, and overrideMediaType.
2585
2586         * platform/network/cf/ResourceHandleCFNet.cpp:
2587         (WebCore::ResourceHandle::loadsBlocked): Moved here from TemporaryLinkStubs.
2588         (WebCore::ResourceHandle::willLoadFromCache): Ditto.
2589         * platform/win/GraphicsContextWin.cpp:
2590         (WebCore::GraphicsContextPlatformPrivate::clip): Ditto.
2591         * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::inWindow): Ditto.
2592         * platform/win/SystemTimeWin.cpp: (WebCore::userIdleTime): Ditto.
2593         * platform/win/WidgetWin.cpp: (WebCore::Widget::setIsSelected): Ditto.
2594
2595         * WebCore.pro: Updated for removed files.
2596         * WebCore.xcodeproj/project.pbxproj: Updated for removed file.
2597
2598 2007-11-08  Mark Rowe  <mrowe@apple.com>
2599
2600        Build fix for case-sensitive file systems.  Fix case of file names
2601        in #include's.
2602
2603         * html/HTMLMediaElement.cpp:
2604         * platform/graphics/Movie.cpp:
2605
2606 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2607
2608         Reviewed by Lars Knoll <lars@trolltech.com>.
2609
2610         Remove some warnings about not implemented methods.
2611
2612         * ResourceHandle::loadsBlocked and ResourceHandle::supportsBufferedData are
2613         specific to the NS API and won't be implemented on Qt.
2614         * ResourceHandle::bufferedData can not be reached as we return false in
2615         ResourceHandle::supportsBufferedData.
2616
2617
2618         * platform/network/qt/ResourceHandleQt.cpp:
2619         (WebCore::ResourceHandle::supportsBufferedData):
2620
2621 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2622
2623         Reviewed by Lars Knoll <lars@trolltech.com>.
2624
2625         Cleanup checking for the request method.
2626
2627         * Check the request method only in QWebNetworkManager::add.
2628         * Currently HEAD, GET, POST are allowed and for everything else
2629         QWebNetworkManager::add returns false.
2630         * Returning false is compatible with ResourceHandle::start and it
2631         can be used in ResourceHandle::loadResourceSynchronously to generate
2632         a ResourceError
2633
2634
2635         * platform/network/qt/ResourceHandleQt.cpp:
2636         (WebCore::ResourceHandle::start):
2637         (WebCore::ResourceHandle::loadResourceSynchronously):
2638
2639 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2640
2641         Reviewed by Lars Knoll <lars@trolltech.com>.
2642
2643         Implement WebCore::callOnMainThread
2644
2645         Implemented using a global QObject, that is moved to the main thread
2646         and then sending a custom event to it.
2647         Picked a number below QEvent::User but above any other documented value.
2648
2649
2650         * platform/qt/ThreadingQt.cpp:
2651         (WebCore::PerformFunctionEvent::PerformFunctionEvent):
2652         (WebCore::MainThreadInvoker::MainThreadInvoker):
2653         (WebCore::MainThreadInvoker::event):
2654         (WebCore::callOnMainThread):
2655
2656 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2657
2658         Reviewed by Lars Knoll <lars@trolltech.com>.
2659
2660         Avoid problems with calling QPainter::begin() on an already active paintdevice
2661
2662         * Partial pick from 6200e04c3e0a77873c3b3f3969b65bc701020326 to avoid getting
2663         crashes on Qt/Mac 4.4 with QPainter::begin to fail because we already draw.
2664         * If we are in a layout or need one do not paint. This can happen for the PlatformScrollBar
2665         used by the ScrollView on a layout triggered by QWebPage::paintEvent.
2666
2667
2668         * platform/qt/WidgetQt.cpp:
2669         (WebCore::Widget::invalidateRect):
2670
2671 2007-11-08  Eric Seidel  <eric@webkit.org>
2672
2673         No review.
2674
2675         * ksvg2/svg/SVGPathElement.h: remove old comment
2676
2677 2007-11-07  Antti Koivisto  <antti@apple.com>
2678
2679         Reviewed by Ollie.
2680
2681         Ensure video renderer has correct size if video has already been loaded
2682         when it is constructed.
2683
2684         * rendering/RenderVideo.cpp:
2685         (WebCore::RenderVideo::RenderVideo):
2686
2687 2007-11-07  Antti Koivisto  <antti@apple.com>
2688
2689         Reviewed by Ollie.
2690
2691         Ensure video is visible when it should be.
2692
2693         * rendering/RenderVideo.cpp:
2694         (WebCore::RenderVideo::updateMovie):
2695
2696 2007-11-07  Dan Bernstein  <mitz@apple.com>
2697
2698         Reviewed by Darin Adler.
2699
2700         - fix <rdar://problem/5523503> Safari crashes clicking scroll bar in FaceBook 'Trips'
2701
2702         Layers and listboxes are two kinds of ScrollBarClient that can be
2703         removed while the scrollbar is tracking the mouse. The scrollbar is not
2704         destroyed until later, and meanwhile it can try to call the client,
2705         which results in a crash.
2706
2707         * manual-tests/stale-scrollbar-client-crash.html: Added.
2708         * platform/ScrollBar.h:
2709         (WebCore::Scrollbar::setClient): Added.
2710         * rendering/RenderLayer.cpp:
2711         (WebCore::RenderLayer::destroyScrollbar): Call Scrollbar::setClient().
2712         * rendering/RenderListBox.cpp:
2713         (WebCore::RenderListBox::~RenderListBox): Ditto.
2714
2715 2007-11-07  Adam Roben  <aroben@apple.com>
2716
2717         Fix <rdar://5569268> Crash when opening any FTP site in second tab/window
2718
2719         Reviewed by Sam.
2720
2721         No test possible.
2722
2723         * platform/win/SharedBufferWin.cpp:
2724         (WebCore::SharedBuffer::createWithContentsOfFile): Bail if we get an
2725         empty path, because _wfopen_s will crash if we pass it a null pointer.
2726
2727 2007-11-07  David Kilzer  <ddkilzer@apple.com>
2728
2729         WebKit confuses width/height for Media Queries device-aspect-ratio evaluation
2730         <http://bugs.webkit.org/show_bug.cgi?id=14893>
2731         <rdar://problem/5380295>
2732
2733         Reviewed by Darin.
2734
2735         Tests: fast/css/device-aspect-ratio.html
2736                fast/css/max-device-aspect-ratio.html
2737                fast/css/min-device-aspect-ratio.html
2738
2739         * css/MediaQueryEvaluator.cpp:
2740         (WebCore::parseAspectRatio): Renamed method parameters from a/b to h/v.
2741         (WebCore::device_aspect_ratioMediaFeatureEval): Renamed local variables from
2742         a/b to h/v.  Switched first two arguments of the call to cmpvalue() to fix
2743         the bug.
2744
2745 2007-11-07  Dan Bernstein  <mitz@apple.com>
2746
2747         Reviewed by Dave Hyatt.
2748
2749         - fix http://bugs.webkit.org/show_bug.cgi?id=15887
2750           REGRESSION (r27576): Crash in RenderStyle::affectedByHoverRules clicking link on Digg
2751
2752         Test: fast/css/display-none-inline-style-change-crash.html
2753
2754         * dom/Element.cpp:
2755         (WebCore::Element::recalcStyle): Fixed the crash by null-checking
2756         the current style and removed other checks that are not strictly
2757         necessary.
2758
2759 2007-11-07  Brady Eidson  <beidson@apple.com>
2760
2761         Rubberstamped by Sam
2762
2763         Remove FrameLoaderClient methods from SVG that were pruned awhile ago
2764
2765         * platform/graphics/svg/SVGImageEmptyClients.h:
2766
2767 2007-11-07  Dan Bernstein  <mitz@apple.com>
2768
2769         Reviewed by Darin Adler.
2770
2771         - fix a bug where CSS rules with :hover in the ancestor chain stopped
2772           working after changing the inline style declaration of the ancestor
2773
2774         Test: fast/css/affected-by-hover-after-style-change.html
2775
2776         * dom/Element.cpp:
2777         (WebCore::Element::recalcStyle): If we are not forcing style
2778         recalculation for all descendants, preserve any "affected by
2779         {hover|active|drag} bits that we may have acquired from them.
2780         Also renamed _style to currentStyle.
2781
2782 2007-11-06  Timothy Hatcher  <timothy@apple.com>
2783
2784         Reviewed by Adam.
2785
2786         Bug 11920: Web Inspector should have Firebug-like CSS editing
2787         http://bugs.webkit.org/show_bug.cgi?id=11920
2788
2789         * css/CSSComputedStyleDeclaration.h:
2790           (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit): Return false. I'm not sure why
2791           this was true, but computed style has no concept of implicit. So false makes more sense
2792           and makes the code simpler in the inspector. This function was added for the inspector,
2793           so this isn't a compatibility change.
2794         * page/inspector/PropertiesSection.js: Add a getter/setter to reset populated status.
2795         * page/inspector/StylesSidebarPane.js: Some refactoring along with the main support for
2796           style editing.
2797         * page/inspector/inspector.css: Style changes for propery editing and focus correctness.
2798         * page/inspector/inspector.js: Look for a handleKeyEvent function of the focus element before
2799           trying to call a function based on the element's id. Call focused and blurred on the focused
2800           element when currentFocusElement is changed. Use the new listItemElement getter instead of
2801           the private property.
2802         * page/inspector/treeoutline.js: No longer expand on double click if ondblclick is implemented.
2803           Shrink the toggle zone to 10px to better match the size of the arrow. Add an onattach call
2804           to allow generation of the title using the DOM element. Add listItemElement and
2805           childrenListElement getters.
2806         * page/inspector/utilities.js: Add new helper prototype methods on CSSStyleDeclaration.
2807         * page/inspector/DocumentPanel.js: Use the new listItemElement getter instead of the private
2808           property. Also expand the DOM node on double click now that the TreeOutline dosen't do it.
2809         * page/inspector/Resource.js: Use the new listItemElement and childrenListElement getters
2810           instead of the private properties.
2811
2812 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2813
2814         Reviewed by Alexey Proskuryakov.
2815
2816         Coding style fix, don't use inline explicitly.
2817
2818         * bridge/WindowFeatures.h:
2819
2820 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2821
2822         Reviewed by Maciej.
2823
2824         For safety provide a default constructor for WindowFeatures().
2825         ContextMenuController.cpp: createNewWindow as well as QWebPage need to
2826         create a default initialized WindowFeatures object on the fly.
2827
2828         * bridge/WindowFeatures.h:
2829         (WebCore::WindowFeatures::WindowFeatures):
2830
2831 2007-11-07  Simon Hausmann  <shausman@trolltech.com>
2832
2833         Reviewed by Lars.
2834
2835         Fix "nmake clean" for the Qt/Windows build by replacing tmp/ with a variable that ends with the correct type of slash/backslash depending on the choice of compiler/make tool.
2836
2837         * WebCore.pro:
2838
2839 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2840
2841         Reviewed by Lars.
2842
2843         Made the QWebSettings::webGraphic functions static. The implementation was using QWebSettings::global() anyway.
2844
2845         * platform/graphics/qt/ImageQt.cpp:
2846         (loadResourcePixmap):
2847
2848 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2849
2850         Reviewed by Lars.
2851
2852         Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
2853
2854         * platform/graphics/qt/ImageQt.cpp:
2855         (loadResourcePixmap):
2856
2857 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2858
2859         Reviewed by Lars.
2860
2861         Restructure the context menu classes for the Qt port. ContextMenu and ContextMenuItem don't store
2862         QActions/QMenus anymore but just store the action type, tag, title and optionally submenu as created
2863         in ContextMenu::populate().
2864         For the actual Qt context menu we traverse this structure after sendContextMenuEvent and create a QMenu
2865         out of it. That menu is currently not functional anymore though.
2866
2867         * platform/ContextMenu.h:
2868         * platform/ContextMenuItem.h:
2869         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
2870         * platform/PlatformMenuDescription.h:
2871         * platform/qt/ContextMenuItemQt.cpp:
2872         (WebCore::ContextMenuItem::ContextMenuItem):
2873         (WebCore::ContextMenuItem::type):
2874         (WebCore::ContextMenuItem::setType):
2875         (WebCore::ContextMenuItem::action):
2876         (WebCore::ContextMenuItem::setAction):
2877         (WebCore::ContextMenuItem::title):
2878         (WebCore::ContextMenuItem::setTitle):
2879         (WebCore::ContextMenuItem::platformSubMenu):
2880         (WebCore::ContextMenuItem::setSubMenu):
2881         (WebCore::ContextMenuItem::setChecked):
2882         (WebCore::ContextMenuItem::setEnabled):
2883         * platform/qt/ContextMenuQt.cpp:
2884         (WebCore::ContextMenu::ContextMenu):
2885         (WebCore::ContextMenu::~ContextMenu):
2886         (WebCore::ContextMenu::appendItem):
2887         (WebCore::ContextMenu::itemCount):
2888         (WebCore::ContextMenu::insertItem):
2889         (WebCore::ContextMenu::setPlatformDescription):
2890         (WebCore::ContextMenu::platformDescription):
2891
2892 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2893
2894         Reviewed by Lars.
2895
2896         Changed ContextMenu::setPlatformDescription for the Qt port to not show the qmenu right away
2897         but instead just behave as a normal setter that takes ownership of the platform menu description (the qmenu).
2898         Instead now QWebPage::contextMenuEvent() retrieves the QMenu after calling sendContextMenuEvent and calls exec()
2899         on it.
2900
2901         * platform/qt/ContextMenuQt.cpp:
2902
2903 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2904
2905         Reviewed by Lars.
2906
2907         Changed to PlatformMouseEvent constructor to allow construction from a QContextMenuEvent.
2908         Call sendContextMenuEvent on the event handler from a QWidget::contextMenuEvent re-implementation instead of in mousePressEvent.
2909
2910         * platform/PlatformMouseEvent.h:
2911         * platform/qt/PlatformMouseEventQt.cpp:
2912         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2913
2914 2007-11-07  Lars Knoll  <lars@trolltech.com>
2915
2916         Reviewed by Simon.
2917
2918         don't put nbsp's into the plan text paste
2919         
2920         Fix both ClipboardQt and PasteboardQt to replace
2921         nbsp's with spaces before putting the text onto the
2922         native clipboard. This is consistent with Mac and Win
2923         and fixes at least editing/pasteboard/4076267-3.html
2924
2925         * platform/qt/ClipboardQt.cpp:
2926         (WebCore::ClipboardQt::writeRange):
2927         * platform/qt/PasteboardQt.cpp:
2928         (WebCore::Pasteboard::writeSelection):
2929
2930 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2931
2932         Reviewed by Lars Knoll <lars@trolltech.com>.
2933
2934         Implement Pasteboard::writeImage()
2935         
2936         * Pasteboard is now fully implemented. Copying of Images into the Clipboard
2937         is now supported.
2938         * As with URLs we only copy into the Clipboard (and not additionally to the
2939         Selection)
2940         
2941
2942         WARNING: NO TEST CASES ADDED OR CHANGED
2943
2944         * platform/qt/PasteboardQt.cpp:
2945         (WebCore::Pasteboard::writeImage):
2946
2947 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2948
2949         Reviewed by Lars Knoll <lars@trolltech.com>.
2950
2951         Apple CodingStyle fixes
2952         
2953
2954         WARNING: NO TEST CASES ADDED OR CHANGED
2955
2956         * platform/qt/PasteboardQt.cpp:
2957         (WebCore::Pasteboard::documentFragment):
2958
2959 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2960
2961         Reviewed by Lars Knoll <lars@trolltech.com>.
2962
2963         Implement Pasteboard::writeURL()
2964         * The URL currently gets written as text/plain and text/uri-list.
2965         The win and mac port have some more types which we currently do
2966         not support. When supporting them we can use the 'titleString'
2967         as well.
2968         * As with writeSelection we only copy into the Clipboard. We could
2969         consider copying into the Selection as well.
2970         
2971
2972         WARNING: NO TEST CASES ADDED OR CHANGED
2973
2974         * platform/qt/PasteboardQt.cpp:
2975         (WebCore::Pasteboard::writeURL):
2976
2977 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2978
2979         Reviewed by Lars Knoll <lars@trolltech.com>.
2980
2981         Kill whitespace
2982         
2983
2984         WARNING: NO TEST CASES ADDED OR CHANGED
2985
2986         * platform/qt/PasteboardQt.cpp:
2987         (WebCore::Pasteboard::documentFragment):
2988
2989 2007-11-07  Lars Knoll  <lars@trolltech.com>
2990
2991         Reviewed by Simon.
2992
2993         Use the correct function calls to convert a selection to
2994         HTML or plain text.
2995
2996         WARNING: NO TEST CASES ADDED OR CHANGED
2997
2998         * platform/qt/ClipboardQt.cpp:
2999         (WebCore::ClipboardQt::setData):
3000         (WebCore::ClipboardQt::writeRange):
3001         * platform/qt/PasteboardQt.cpp:
3002         (WebCore::Pasteboard::writeSelection):
3003
3004 2007-11-07  Lars Knoll  <lars@trolltech.com>
3005
3006         Reviewed by Simon.
3007
3008         Some more clipboard fixes.
3009         
3010         We have to set things immediately on the QClipBoard if the
3011         Clipboard object is not for dragging.
3012         
3013         This is due to the fact that the Clipboard object might be
3014         rather long lived if accessed through javascript (it'll only
3015         get deleted by JS garbage collection). We have to transfer
3016         the data over to the QClipboard before that to make things work.
3017         
3018         Fixes editing/execCommand/copy-without-selection.html
3019
3020         * platform/qt/ClipboardQt.cpp:
3021         (WebCore::ClipboardQt::ClipboardQt):
3022         (WebCore::ClipboardQt::~ClipboardQt):
3023         (WebCore::ClipboardQt::clearData):
3024         (WebCore::ClipboardQt::clearAllData):
3025         (WebCore::ClipboardQt::getData):
3026         (WebCore::ClipboardQt::setData):
3027         (WebCore::ClipboardQt::declareAndWriteDragImage):
3028         (WebCore::ClipboardQt::writeURL):
3029         (WebCore::ClipboardQt::writeRange):
3030
3031 2007-11-07  Simon Hausmann  <hausmann@kde.org>
3032
3033         Reviewed by Mark.
3034
3035         Fix compilation on Windows with non-cygwin perl. open FILE, "|-" is
3036         not supported due to implicit forks, use IPC::Open2 instead.
3037
3038         * bindings/scripts/IDLParser.pm:
3039
3040 2007-11-07  Dan Bernstein  <mitz@apple.com>
3041
3042         Reviewed by Brady Eidson.
3043
3044         - fix http://bugs.webkit.org/show_bug.cgi?id=15877
3045           REGRESSION: r27486 caused a layout regression at my bank's website
3046
3047         Test: fast/block/float/overhanging-after-height-decrease-offsets.html
3048
3049         * rendering/RenderBlock.cpp:
3050         (WebCore::RenderBlock::layoutBlock):
3051
3052 2007-11-06  Beth Dakin  <bdakin@apple.com>
3053
3054         Reviewed by Sam.
3055
3056         <rdar://problem/5575812> REGRESSION:When using absolute positioning 
3057         with overflow:auto div, WebKit seems to add an additional 15px
3058
3059         * rendering/RenderBox.cpp:
3060         (WebCore::RenderBox::containingBlockWidthForPositioned): We need to 
3061         subtract off the vertical scrollbar width too.
3062
3063 2007-11-06  Justin Garcia  <justin.garcia@apple.com>
3064
3065         Reviewed by Dan Bernstein.
3066         
3067         <rdar://problem/5583387> ASSERTION FAILED: !refChild->hasTagName(bodyTag) when pasting newline in plain text into rich text Mail
3068         <rdar://problem/5583362> REGRESSION (5523.10.3-TOT): Newlines stripped when pasting plain text in Mail
3069
3070         * editing/markup.cpp:
3071         (WebCore::createFragmentFromText): Put paragraphs of text into clones of the block
3072         that encloses the input context, unless that block is the body, which shouldn't
3073         be cloned.  In that case, use regular divs, as we did before r27369.
3074
3075 2007-11-06  Christian Dywan  <christian@twotoasts.de>
3076
3077         Reviewed by Darin.
3078
3079         Fix http://bugs.webkit.org/show_bug.cgi?id=15828
3080         Bug 15828: WebKit GTK include and lib directory is installed in qt4-named directory
3081
3082         * WebCore.pro: Use sane default install paths for the gtk port.
3083
3084 2007-11-06  Justin Garcia  <justin.garcia@apple.com>
3085
3086         Reviewed by Darin Adler.
3087         
3088         <rdar://problem/5576619> 
3089         REGRESSION: Caret disappears after deleting the last character in inline hole (15714)
3090
3091         * editing/TypingCommand.cpp:
3092         (WebCore::TypingCommand::deleteSelection): Like the other TypingCommands, including
3093         both of the other deletion commands, call typingAddedToOpenCommand(), which takes 
3094         the command's endingSelection and sets it as selection.
3095
3096 2007-11-06  Dan Bernstein  <mitz@apple.com>
3097
3098         Reviewed by Antti Koivisto and Dave Hyatt.
3099
3100         - fix <rdar://problem/5582961> Incorrect layout and floating object list corruption when CSS decreases a block's height
3101
3102         Test: fast/block/float/overhanging-after-height-decrease.html
3103
3104         * rendering/RenderBlock.cpp:
3105         (WebCore::RenderBlock::layoutBlock): If after calculating the height
3106         it turns out that there are overhanging floats that were not overhanging
3107         before, rescan children with overhanging floats and add them. 
3108         (WebCore::RenderBlock::layoutBlockChildren): Added a parameter that
3109         returns the lowest float bottom of any of the children.
3110         (WebCore::RenderBlock::addOverhangingFloats): Changed to return the
3111         lowest float bottom.
3112         * rendering/RenderBlock.h:
3113
3114 2007-11-06  Adele Peterson  <adele@apple.com>
3115
3116         Reviewed by Darin.
3117
3118         Switched all uses of HTMLImageLoader to use OwnPtrs.
3119
3120         * html/HTMLInputElement.h:
3121         * html/HTMLInputElement.cpp:
3122         (WebCore::HTMLInputElement::init):
3123         (WebCore::HTMLInputElement::~HTMLInputElement):
3124         (WebCore::HTMLInputElement::setInputType):
3125         (WebCore::HTMLInputElement::parseMappedAttribute):
3126         (WebCore::HTMLInputElement::attach):
3127         * html/HTMLObjectElement.h:
3128         * html/HTMLObjectElement.cpp:
3129         (WebCore::HTMLObjectElement::HTMLObjectElement):
3130         (WebCore::HTMLObjectElement::~HTMLObjectElement):
3131         (WebCore::HTMLObjectElement::parseMappedAttribute):
3132         (WebCore::HTMLObjectElement::attach):
3133         * html/HTMLVideoElement.h:
3134         * html/HTMLVideoElement.cpp:
3135         (WebCore::HTMLVideoElement::HTMLVideoElement):
3136         (WebCore::HTMLVideoElement::attach):
3137         (WebCore::HTMLVideoElement::detach):
3138         (WebCore::HTMLVideoElement::parseMappedAttribute):
3139
3140 2007-11-06  Antti Koivisto  <antti@apple.com>
3141
3142         Reviewed by Darin.
3143         
3144         Trigger media load on on src attribute changes as specified in new HTML5 draft.
3145
3146         Tests: media/video-src-change.html
3147                media/video-src-remove.html
3148                media/video-src-set.html
3149
3150         * html/HTMLMediaElement.cpp:
3151         (WebCore::HTMLMediaElement::attributeChanged):
3152         * html/HTMLMediaElement.h:
3153
3154 2007-11-06  Dan Bernstein  <mitz@apple.com>
3155
3156         Reviewed by Darin Adler.
3157
3158         - fix http://bugs.webkit.org/show_bug.cgi?id=15838
3159           Incomplete repaint toggling "How you know this person" on Facebook
3160
3161         Test: fast/repaint/make-children-non-inline.html
3162
3163         * rendering/RenderBlock.cpp:
3164         (WebCore::RenderBlock::makeChildrenNonInline): Repaint the block. This
3165         is needed because the inline children may be repositioned as they move
3166         into new anonymous blocks, but those blocks have no knowledge of where
3167         their children used to be, so they cannot invalidate those areas.
3168
3169 2007-11-06  Alexey Proskuryakov  <ap@webkit.org>
3170
3171         Reviewed by Darin.
3172
3173         http://bugs.webkit.org/show_bug.cgi?id=15847
3174         Some editing cleanup
3175
3176         No change in functionality.
3177
3178         * editing/TextIterator.cpp:
3179         (WebCore::plainText):
3180         * editing/TextIterator.h:
3181         Made WebCore::plainText() return String instead of DeprecatedString.
3182
3183         * bridge/mac/WebCoreAXObject.mm:
3184         (-[WebCoreAXObject textUnderElement]):
3185         (-[WebCoreAXObject value]):
3186         (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
3187         (-[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]):
3188         (-[WebCoreAXObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
3189         Updated for the above change. There is no need to explicitly convert to NSString now.
3190
3191         * editing/EditCommand.cpp:
3192         (WebCore::EditCommand::EditCommand): m_startingSelection and m_endingSelection are actually
3193         initialized in constructor body, so the work done in initializer list was wasted.
3194
3195         (WebCore::EditCommand::apply): Moved some stars.
3196         (WebCore::EditCommand::unapply): Ditto.
3197         (WebCore::EditCommand::reapply): Ditto.
3198         (WebCore::EditCommand::setStartingSelection): The loop exit condition was evaluated twice,
3199         removed one of the checks.
3200
3201         * editing/SelectionController.cpp:
3202         (WebCore::SelectionController::toString): plainText() result type now matches what we need here.
3203
3204         * page/mac/WebCoreFrameBridge.h:
3205         * page/mac/WebCoreFrameBridge.mm:
3206         Removed unused -[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:] and
3207         -[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:].
3208
3209 2007-11-05  Mark Rowe  <mrowe@apple.com>
3210
3211         Mac build fix.
3212
3213         * bindings/js/JSHTMLDocumentCustom.cpp:
3214         (WebCore::writeHelper):
3215
3216 2007-11-05  Adam Roben  <aroben@apple.com>
3217
3218         Don't crash if SafariTheme can't be loaded
3219
3220         PlatformScrollBarSafari and RenderThemeSafari were not checking
3221         whether SafariTheme was successfully loaded. All other uses of
3222         SafariTheme already check this.
3223
3224         Reviewed by Steve.
3225
3226         * platform/win/PlatformScrollBarSafari.cpp: Don't paint if SafariTheme
3227         couldn't be loaded.
3228         (WebCore::PlatformScrollbar::paintButton):
3229         (WebCore::PlatformScrollbar::paintTrack):
3230         (WebCore::PlatformScrollbar::paintThumb):
3231         * rendering/RenderThemeSafari.cpp:
3232         (WebCore::RenderThemeSafari::isControlStyled): Always return true if
3233         we couldn't load SafariTheme. This way we should never try to paint
3234         themed controls (and we assert as such in the paint functions).
3235         (WebCore::RenderThemeSafari::paintCheckbox):
3236         (WebCore::RenderThemeSafari::paintRadio):
3237         (WebCore::RenderThemeSafari::paintButton):
3238         (WebCore::RenderThemeSafari::paintTextField):
3239         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
3240         (WebCore::RenderThemeSafari::paintTextArea):
3241         (WebCore::RenderThemeSafari::paintMenuList):
3242         (WebCore::RenderThemeSafari::paintSliderThumb):
3243         (WebCore::RenderThemeSafari::paintSearchField):
3244         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
3245         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration):
3246         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
3247
3248 2007-11-05  Kevin Ollivier  <kevino@theolliviers.com>
3249
3250         Adding the rest of wx port's graphics impl. 
3251
3252         Rubber-stamped by Maciej Stachowiak.
3253
3254         * platform/graphics/wx/AffineTransformWx.cpp: Added.
3255         * platform/graphics/wx/GraphicsContextWx.cpp: Added.
3256         * platform/graphics/wx/ImageBufferWx.cpp: Added.
3257         * platform/graphics/wx/ImageSourceWx.cpp: Added.
3258         * platform/graphics/wx/ImageWx.cpp: Added.
3259         * platform/graphics/wx/PathWx.cpp: Added.
3260
3261 2007-11-05  Kevin Ollivier  <kevino@theolliviers.com>
3262
3263         wx port bug fixes and new files to get platform/wx building on trunk.
3264
3265         Rubber-stamped by Maciej Stachowiak.
3266
3267         * platform/wx/CursorWx.cpp:
3268         * platform/wx/FileSystemWx.cpp: Added.
3269         * platform/wx/FontCacheWx.cpp:
3270         * platform/wx/FontPlatformDataWx.cpp:
3271         * platform/wx/FontWx.cpp:
3272         * platform/wx/KeyboardEventWx.cpp:
3273         * platform/wx/LocalizedStringsWx.cpp: Added.
3274         * platform/wx/LoggingWx.cpp: Added.
3275         * platform/wx/RenderThemeWx.cpp:
3276         * platform/wx/ScrollViewWx.cpp:
3277         * platform/wx/SharedTimerWx.cpp:
3278         * platform/wx/StringWx.cpp:
3279         * platform/wx/ThreadingWx.cpp: Added.
3280         * platform/wx/WidgetWx.cpp:
3281
3282 2007-11-05  Adele Peterson  <adele@apple.com>
3283
3284         Reviewed by Maciej.
3285
3286         Fix for <rdar://problem/5579999> Add poster attribute for video element
3287
3288         * html/HTMLAttributeNames.in: Added poster attribute.
3289
3290         * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement):
3291           Calls imageSourceAttributeName instead of having special cases for the different kinds of elements. 
3292         * dom/Element.cpp: (WebCore::Element::imageSourceAttributeName): Added.
3293         * dom/Element.h:
3294         * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::imageSourceAttributeName): Added.
3295         * html/HTMLObjectElement.h:
3296
3297         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::movieNetworkStateChanged):
3298           Calls updatePosterImage when the network state is empty and when the first frame has been loaded.
3299         * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::rendererIsNeeded): Made this inline.  HTMLVideoElement now also implements this.
3300
3301         * html/HTMLVideoElement.idl: Added case for poster attribute.
3302         * html/HTMLVideoElement.h: Added image loader and flag to keep track of whether or not the poster image should be shown.
3303         * html/HTMLVideoElement.cpp:
3304         (WebCore::HTMLVideoElement::HTMLVideoElement): Initialize m_imageLoader and m_shouldShowPosterImage.
3305         (WebCore::HTMLVideoElement::rendererIsNeeded): Calls HTMLElement::rendererIsNeeded since HTMLMediaElements have renderer by default.
3306         (WebCore::HTMLVideoElement::createRenderer): Create a RenderImage or RenderVideo depending on whether or not the poster image should be shown.
3307         (WebCore::HTMLVideoElement::attach): Set up image loader and RenderImage if necessary.
3308         (WebCore::HTMLVideoElement::detach): Delete image loader if its no longer needed.
3309         (WebCore::HTMLVideoElement::parseMappedAttribute): Added case to process poster attribute.
3310         (WebCore::HTMLVideoElement::poster): Added getter for poster attribute.
3311         (WebCore::HTMLVideoElement::setPoster): Added setter for poster attribute.
3312         (WebCore::HTMLVideoElement::isURLAttribute): Added.
3313         (WebCore::HTMLVideoElement::imageSourceAttributeName): Added.
3314         (WebCore::HTMLVideoElement::updatePosterImage): Added.  Updates m_shouldShowPosterImage and if its changed, detaches and attaches so the renderer is correct.
3315
3316 2007-11-05  Adam Roben  <aroben@apple.com>
3317
3318         Fix <rdar://5563572> SVG image support is turned off
3319
3320         Turned on SVG images for all platforms.
3321
3322         Reviewed by Eric.
3323
3324         * WebCore.vcproj/WebCore.vcproj: Added SVGImage.{cpp,h}
3325         * loader/CachedImage.cpp:
3326         (WebCore::CachedImage::createImage): Removed platform checks for
3327         SVGImage.
3328
3329 2007-11-05  Antti Koivisto  <antti@apple.com>
3330
3331         Reviewed by Darin.
3332
3333         QTMovieView can generate callbacks during paint. This can lead to crashes.
3334         
3335         Delay callbacks so they get handled after painting is completed. No test case,
3336         I don't know how to reliably reproduce this.
3337
3338         * platform/graphics/mac/MoviePrivateQTKit.mm:
3339         (WebCore::MoviePrivate::MoviePrivate):
3340         (WebCore::MoviePrivate::~MoviePrivate):
3341         (WebCore::MoviePrivate::paint):
3342         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
3343         (-[WebCoreMovieObserver disconnect]):
3344         (-[WebCoreMovieObserver loadStateChanged:]):
3345         (-[WebCoreMovieObserver rateChanged:]):
3346         (-[WebCoreMovieObserver sizeChanged:]):
3347         (-[WebCoreMovieObserver timeChanged:]):
3348         (-[WebCoreMovieObserver volumeChanged:]):
3349         (-[WebCoreMovieObserver didEnd:]):
3350         (-[WebCoreMovieObserver setDelayCallbacks:]):
3351
3352 2007-11-05  Antti Koivisto  <antti@apple.com>
3353
3354         Reviewed by Adam.
3355
3356         Add some missing WebCore* prefixes to ObjC classes
3357
3358         * platform/mac/FileChooserMac.mm:
3359         (WebCore::FileChooser::FileChooser):
3360         * platform/mac/SharedBufferMac.mm:
3361         (WebCore::SharedBuffer::createNSData):
3362         (WebCore::SharedBuffer::createCFData):
3363         * platform/mac/SharedTimerMac.cpp:
3364         (WebCore::setSharedTimerFireTime):
3365
3366 2007-11-05  Ada Chan  <adachan@apple.com>
3367
3368         <rdar://problem/5579772> Regression: AltGr does not work
3369         We now store the system key event info in PlatforkKeyboardEvent().
3370
3371         Reviewed by Oliver.
3372
3373         * platform/PlatformKeyboardEvent.h:
3374         (WebCore::PlatformKeyboardEvent::isSystemKey):
3375         * platform/win/KeyEventWin.cpp:
3376         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3377
3378 2007-11-02  Tristan O'Tierney  <tristan@apple.com>
3379
3380         Reviewed by Darin Adler.
3381
3382         * WebCore.xcodeproj/project.pbxproj:
3383         Set WindowFeatures.h as a Private header.
3384         
3385         * loader/FrameLoader.cpp:
3386         (WebCore::FrameLoader::createWindow):
3387         Revised to use a single createWindow function instead of
3388         two createWindow functions and one createModalDialog function.
3389         The logic for this is now addressed in WebKit in an effort
3390         to make this easier to follow.
3391         
3392         * page/Chrome.cpp:
3393         (WebCore::Chrome::createWindow):
3394         * page/Chrome.h:
3395         * page/ChromeClient.h:
3396         * page/ContextMenuController.cpp:
3397         (WebCore::openNewWindow):
3398         * platform/graphics/svg/SVGImageEmptyClients.h:
3399         (WebCore::SVGEmptyChromeClient::createWindow):
3400         Revised to take new additional windowFeatures parameter.
3401
3402 2007-11-04  Geoffrey Garen  <ggaren@apple.com>
3403
3404         Reviewed by Darin Adler.
3405         
3406         http://bugs.webkit.org/show_bug.cgi?id=15835
3407
3408         Small adaptations to new KJS::List class.
3409
3410         * bindings/js/kjs_window.cpp:
3411         (KJS::WindowFunc::callAsFunction):
3412         (KJS::ScheduledAction::ScheduledAction):
3413
3414 2007-11-05  Adam Roben  <aroben@apple.com>
3415
3416         Allow passing a base class pointer to COMPtr::copyRefTo
3417
3418         Reviewed by Sam.
3419
3420         * platform/win/COMPtr.h:
3421
3422 2007-11-05  Dan Bernstein  <mitz@apple.com>
3423
3424         Reviewed by Oliver Hunt.
3425
3426         - fix ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) when a class attribute is all-whitespace
3427
3428         Test: fast/dom/class-all-whitespace.html
3429
3430         * dom/StyledElement.cpp:
3431         (WebCore::StyledElement::parseMappedAttribute): Check if there is any
3432         non-whitespace character in the class attribute.
3433
3434 2007-11-05  Brady Eidson  <beidson@apple.com>
3435
3436         Reviewed by Sam
3437
3438         Add transaction blocking to the DatabaseAuthorizer in preparation for the new version
3439         of the sql storage API
3440
3441         * storage/DatabaseAuthorizer.cpp:
3442         (WebCore::DatabaseAuthorizer::allowTransaction):
3443         * storage/DatabaseAuthorizer.h:
3444
3445 2007-11-05  Mark Rowe  <mrowe@apple.com>
3446
3447         Reviewed by Alp Toker.
3448
3449         Have getMIMETypeForExtension return a null string when no MIME type is known
3450         for the extension rather than returning "text/plain".  This prevents plugin data
3451         being dumped into object elements when plugins are disabled.
3452
3453         * platform/gtk/MIMETypeRegistryGtk.cpp:
3454         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3455
3456 2007-11-04  Sam Weinig  <sam@webkit.org>
3457
3458         Rubber-stamped by Adam Roben.
3459
3460         Rename SecurityOrigin::allowsAccessFrom to SecurityOrigin::canAccess to 
3461         clear up ambiguity.
3462
3463         * bindings/js/kjs_window.cpp:
3464         (KJS::Window::isSafeScript):
3465         * platform/SecurityOrigin.cpp:
3466         (WebCore::SecurityOrigin::canAccess):
3467         * platform/SecurityOrigin.h:
3468
3469 2007-11-04  Timothy Hatcher  <timothy@apple.com>
3470
3471         Reviewed by Adam.
3472
3473         Bug 15834: There are many subtle bugs in the Styles pane of the Web Inspector
3474         http://bugs.webkit.org/show_bug.cgi?id=15834
3475
3476         - Broke up DocumentPanel and added three SidebarPane sub-classes.
3477         - Fixed many Style pane bugs, including:
3478           * Poor handling of duplicate properties in the same rule. Some of this can't be
3479             fixed since we can't only get the "winning" value for duplicate properties.
3480             So we should only show one entry per unique property name.
3481           * Computed style does not show font shorthand sub-properties if 'font' was used.
3482           * Property priority was broken, the wrong properties were crossed out.
3483           * The 'border' shorthand shows null for the shorthand value.
3484           * Shorthands didn't show their priority (e.g. !important).
3485           * HSL and HTML hex colors didn't have preview swatch blocks.
3486           * Code refactoring, making it easier to reuse for console.log later.
3487
3488         * page/inspector/DocumentPanel.js: Move sidebar pane code to three seperate
3489           classes in new files.
3490         * page/inspector/MetricsSidebarPane.js: Added.
3491         * page/inspector/Panel.js: Remove an InspectorController.log() call.
3492         * page/inspector/PropertiesSection.js: Add the section to the TreeOutline.
3493           So TreeElements can access properties on their section.
3494         * page/inspector/PropertiesSidebarPane.js: Added.
3495         * page/inspector/SidebarPane.js: Remove the explicit asignment of the
3496           onexpand and oncollapse to null. These were hiding prototypes.
3497         * page/inspector/StylesSidebarPane.js: Added.
3498         * page/inspector/inspector.html: Include the new script files.
3499         * page/inspector/treeoutline.js: If a null representedObject is passed
3500           in just use a empty object.
3501
3502 2007-11-04  David D. Kilzer  <ddkilzer@webkit.org>
3503
3504         Fix build when spaces appear in the WebKit source path.
3505
3506         Reviewed by Mark Rowe.
3507
3508         * bindings/scripts/IDLParser.pm: Use safer open() method which lists
3509         arguments individually and prevents the need to work around spaces
3510         in the path.
3511
3512 2007-11-04  Alp Toker  <alp@atoker.com>
3513
3514         Reviewed by Alexey Proskuryakov.
3515
3516         Fix a crash when no clipboard text is available
3517
3518         * platform/gtk/PasteboardGtk.cpp:
3519         (WebCore::Pasteboard::plainText):
3520
3521 2007-11-03  Darin Adler  <darin@apple.com>
3522
3523         Reviewed by Maciej.
3524
3525         - WebCore part of http://bugs.webkit.org/show_bug.cgi?id=15821
3526           remove unused PCRE features for speed
3527
3528         * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement):
3529         * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement):
3530         Remove use of "[[:digit:]]" syntax. This hasn't worked for some time.
3531         Use "\d" instead.
3532
3533         * platform/RegularExpression.h: Remove the unused cap function. We can
3534         add it back later if we find we need it.
3535         * platform/RegularExpression.cpp:
3536         (WebCore::RegularExpression::Private::compile): Update for JavaScriptCore
3537         regular expression entry point changes.
3538         (WebCore::RegularExpression::Private::~Private): Ditto.
3539         (WebCore::RegularExpression::match): Remove the code to set PCRE_NOTBOL.
3540         This means that regular expressions with metacharactesr like ^ in them
3541         won't work any more with non-whole-string searches, but we don't use
3542         any regular expressions like that.
3543
3544 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3545
3546         Update the link stubs to match the current build,
3547         and fix coding style issues.
3548
3549         Reviewed by Mark Rowe.
3550
3551         * platform/wx/TemporaryLinkStubs.cpp:
3552         (loadResourceIntoArray):
3553         (findNextSentenceFromIndex):
3554         (findSentenceBoundary):
3555         (Frame::dashboardRegionsChanged):
3556         (WebCore::historyContains):
3557         (CachedPage::close):
3558         (Editor::showStylesPanel):
3559         (EventHandler::passSubframeEventToSubframe):
3560         (EventHandler::passWheelEventToWidget):
3561         (WebCore::currentTextBreakLocaleID):
3562
3563 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3564
3565         wx <-> WebKit conversions for IntPoint, IntRect and FloatRect
3566
3567         Reviewed by Mark Rowe.
3568
3569         * platform/graphics/wx/FloatRectWx.cpp: Added.
3570         * platform/graphics/wx/IntPointWx.cpp: Added.
3571         * platform/graphics/wx/IntRectWx.cpp: Added.
3572
3573 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3574
3575         wx <-> WebKit data type conversions for Pen and Color.
3576
3577         Reviewed by Darin Adler.
3578
3579         * platform/graphics/wx: Added.
3580         * platform/graphics/wx/ColorWx.cpp: Added.
3581         * platform/graphics/wx/PenWx.cpp: Added.
3582
3583