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