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