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