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