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