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