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