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