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