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