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