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