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