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