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