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