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