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