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