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