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