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