Reviewed by Anders.
[WebKit-https.git] / WebCore / ChangeLog
1 2006-09-02  Adele Peterson  <adele@apple.com>
2
3         Reviewed by Anders.
4
5         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10667
6           Password: Double-click should select-all to avoid exposing word boundaries
7
8         Test: fast/forms/password-doubleclick-selection.html
9
10         * editing/visible_units.cpp:
11         (WebCore::previousBoundary): When searching for boundaries in renderers that use the textSecurity property, 
12          convert characters in strings to alpha-numeric characters (in this case, all 'x's) so that every character
13          isn't treated as a punctuation boundary.
14         (WebCore::nextBoundary): ditto.
15         * editing/TextIterator.cpp: (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Updated to use the renderer's 
16           string instead of the node value.  This matches the base class implementation of handleTextNode.
17
18         Code cleanup.
19         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): 
20           Avoid unnecessary check for password field case if the smart replace condition is false.
21         * page/Frame.cpp: (WebCore::Frame::mayCopy): Removed duplicate code.  Calls isSelectionInPasswordField now.
22         * rendering/RenderText.cpp: (WebCore::RenderText::setText): Updated formatting.
23
24 2006-09-01  David Hyatt  <hyatt@apple.com>
25
26         Fix for 10682, refine the FOUC paint suppression logic so that it
27         is only triggered when FOUC would really have occurred.
28
29         Reviewed by aroben
30
31         * css/cssstyleselector.cpp:
32         (WebCore::CSSStyleSelector::styleForElement):
33         * dom/Document.cpp:
34         (WebCore::Document::Document):
35         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
36         (WebCore::Document::updateStyleSelector):
37         * dom/Document.h:
38         (WebCore::Document::haveStylesheetsLoaded):
39         (WebCore::Document::):
40         (WebCore::Document::didLayoutWithPendingStylesheets):
41         * rendering/RenderBlock.cpp:
42         (WebCore::RenderBlock::paintChildren):
43         * rendering/RenderLayer.cpp:
44         (WebCore::RenderLayer::paintLayer):
45
46 2006-09-01  MorganL  <morlmor@yahoo.com>
47
48         Reviewed by Darin. Updated/landed by Adam.
49
50         Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=10553
51         Windows build fixes
52
53         * WebCore.vcproj/WebCore/WebCore.vcproj:
54         * WebCore.vcproj/WebCore/build-generated-files.sh:
55         * bridge/win/FrameWin.h:
56         * bridge/win/PageWin.cpp:
57         (WebCore::Page::Page):
58         * platform/win/FontWin.cpp:
59         * platform/win/TemporaryLinkStubs.cpp:
60         (FrameWin::registerCommandForUndo):
61         (FrameWin::canPaste):
62         (FrameWin::issuePasteAndMatchStyleCommand):
63         (WebCore::screenDepthPerComponent):
64         (WebCore::screenIsMonochrome):
65         (FrameWin::overrideMediaType):
66         (FrameWin::saveDocumentState):
67         (FrameWin::respondToChangedContents):
68         (FrameWin::handledOnloadEvents):
69         (FrameWin::createPlugin):
70         (FrameWin::objectContentType):
71         (Path::contains):
72         (TextField::TextField):
73         (RenderPopupMenuWin::hidePopup):
74         (RenderThemeWin::paintMenuList):
75         (RenderThemeWin::adjustMenuListStyle):
76         (CString::CString):
77         (CString::data):
78         * platform/win/WidgetWin.cpp:
79         * rendering/RenderPopupMenuWin.h:
80
81 2006-09-01  Brady Eidson  <beidson@apple.com>
82
83         Reviewed by Tim Omernick
84
85         Added an SQLDatabase logging channel.  Changed all SQLDatabase and SQLStatement errors to use this new channel.
86         Also, as a popular request from other contributers, added a log for all prepare(), step(), finalize(), and reset()s
87         Also, fixed a grammar error in my previous ChangeLog entry.
88
89         * bridge/mac/WebCorePageBridge.mm:
90         (initializeLoggingChannelsIfNecessary): Initialize the new channel
91         * loader/icon/SQLDatabase.cpp:
92         (WebCore::SQLDatabase::setBusyTimeout): Use SQLDatabase logging channel
93         (WebCore::SQLDatabase::setBusyHandler): ditto
94         (WebCore::SQLDatabase::clearAllTables): ditto
95         (WebCore::SQLDatabase::runVacuumCommand): ditto
96         * loader/icon/SQLStatement.cpp:
97         (WebCore::SQLStatement::prepare): Added a log
98         (WebCore::SQLStatement::step): ditto
99         (WebCore::SQLStatement::finalize): ditto
100         (WebCore::SQLStatement::reset): ditto
101         (WebCore::SQLStatement::getColumnBlob): Use SQLDatabase logging channel
102         (WebCore::SQLStatement::returnTextResults): ditto
103         (WebCore::SQLStatement::returnTextResults16): ditto
104         (WebCore::SQLStatement::returnIntResults): ditto
105         (WebCore::SQLStatement::returnInt64Results): ditto
106         (WebCore::SQLStatement::returnDoubleResults): ditto
107         * platform/Logging.cpp:
108         (WebCore::): Added new logging channel
109         * platform/Logging.h: ditto
110
111 2006-09-01  Adele Peterson  <adele@apple.com>
112
113         Reviewed by Tim Omernick.
114
115         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6990
116         Switch to use new text field implementation for <input type="password">
117
118         * css/html4.css: Give input[password] the same style properties as normal text fields.
119         * html/HTMLInputElement.cpp: Removed checks for TextFieldAppearance.
120         (WebCore::HTMLInputElement::selectionStart):
121         (WebCore::HTMLInputElement::selectionEnd):
122         (WebCore::HTMLInputElement::setSelectionStart):
123         (WebCore::HTMLInputElement::setSelectionEnd):
124         (WebCore::HTMLInputElement::select):
125         (WebCore::HTMLInputElement::setSelectionRange):
126         (WebCore::HTMLInputElement::createRenderer):
127         * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isNonWidgetTextField):
128
129 2006-09-01  Brady Eidson  <beidson@apple.com>
130
131         Reviewed by John (though Sarge reviewed a previous patch of mine in an attempt to review this one)
132
133         Added some constants for SQL Result Codes to SQLDatabase.h
134         This way, users of SQLDatabase can access all necessary SQLite functionality
135         without having access to sqlite3.h.
136         Also reordered some files in the xcodeproj and some #includes
137
138         * WebCore.xcodeproj/project.pbxproj:  Reordered some files 
139         * loader/icon/IconDataCache.cpp:
140         (WebCore::IconDataCache::writeToDatabase): Use our new result codes
141         * loader/icon/IconDatabase.cpp:
142         (WebCore::IconDatabase::sharedIconDatabase): Use our new result codes
143         (WebCore::IconDatabase::retainIconForPageURL): Use our new result codes
144         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Use our new result codes
145         (WebCore::IconDatabase::addIconForIconURLQuery): Use our new result codes
146         (WebCore::IconDatabase::hasIconForIconURLQuery): Use our new result codes
147         * loader/icon/SQLDatabase.cpp:
148         (WebCore::SQLDatabase::lastError): Moved from header to eliminate dependency on sqlite3.h in header
149         (WebCore::SQLDatabase::lastErrorMsg): Ditto
150         * loader/icon/SQLDatabase.h: Removed #include <sqlite3.h>
151         * loader/icon/SQLStatement.cpp: Added #include <sqlite3.h>
152         * loader/icon/SQLStatement.h: Removed #include <sqlite3.h>
153
154 2006-09-01  David Hyatt  <hyatt@apple.com>
155
156         Fix for 10680, contrained flexbox is not shrinking flexible children
157         properly.  (Fixing in case it's hit by the file upload control.)
158
159         Reviewed by aroben
160
161         Adding 026.html to fast/flexbox.
162
163         * rendering/RenderFlexibleBox.cpp:
164         (WebCore::RenderFlexibleBox::allowedChildFlex):
165
166 2006-09-01  Nikolas Zimmermann  <zimmermann@kde.org>
167
168         Reviewed by eseidel.  Landed by eseidel.
169
170         Implement support for multiple parents in the SVG idls.
171
172         For class "FooBar" go through all parents recursively,
173         collect their attributes & functions & constants and
174         add them directly into the class "FooBar".
175
176         (Note: It is NOT enabled by default for now - still some things related to SVGAnimated* need to be solved first)
177
178         * bindings/scripts/CodeGenerator.pm:
179         * bindings/scripts/CodeGeneratorJS.pm:
180         * bindings/scripts/generate-bindings.pl:
181
182 2006-09-02  Nikolas Zimmermann  <zimmermann@kde.org>
183
184         Reviewed by hyatt.  Landed by eseidel.
185
186         Fix build on Linux.
187
188         * CMakeLists.txt: Add platform/CString.cpp.
189         * platform/qt/FrameQt.cpp: Correct repsondToChangedContents() signature
190         * platform/qt/FrameQt.h:: Correct respondToChangedContents() signature
191
192 2006-09-01  Darin Adler  <darin@apple.com>
193
194         Reviewed by Brady.
195
196         - a few small tweaks to the icon database bridge
197
198         * bridge/mac/WebCoreIconDatabaseBridge.h: Removed unnecessary declarations.
199         Renamed sharedBridgeInstance to sharedInstance.
200         * bridge/mac/WebCoreIconDatabaseBridge.mm: Put functions inside WebCore namespace.
201         (WebCore::IconDatabase::loadIconFromURL): Updated for sharedInstance namespace.
202
203 2006-09-01  Timothy Hatcher  <timothy@apple.com>
204
205         Reviewed by Darin.
206
207         <rdar://problem/4651318> REGRESSION: can't drag library items to widget in Dashcode
208         <rdar://problem/4701626> REGRESSION: Unit Converter widget doesn't work convert data in its fields
209
210         jsNull should not be returned as NSNull because existing applications do not
211         expect that return value. Return as nil for backwards compatibility.
212
213         * bindings/objc/WebScriptObject.mm:
214         (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
215
216 2006-09-01  Alexey Proskuryakov  <ap@nypop.com>
217
218         Release build fix.
219
220         * loader/Decoder.cpp:
221         (Decoder::Decoder): Use String::latin1().
222
223 2006-09-01  Alexey Proskuryakov  <ap@nypop.com>
224
225         Reviewed by Eric.
226
227         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5620
228         Should only honor encoding from <meta> in HTML
229
230         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9783
231         An XML declaration without an explicit encoding incorrectly triggers
232         UTF-8 encoding in an HTML document
233
234         - http://bugzilla.opendarwin.org/show_bug.cgi?id=10155
235         CSS2: @charset is not supported
236         
237         * loader/Decoder.cpp:
238         (Decoder::Decoder): Decoder now knows what kind of content it is decoding.
239         Also, the browser default encoding can now be passed directly to the constructor,
240         to streamline the logic.
241         (Decoder::decode): Add support for @charset, differentiate between HTML and XML.
242         (Decoder::setEncodingName): Style cleanup.
243         (Decoder::encodingName): Ditto.
244         (Decoder::flush): Ditto.
245         * loader/Decoder.h:
246         (WebCore::Decoder::):
247
248         * bridge/mac/WebCoreEncodings.mm: Pass a content type of text/html to Decoder.
249
250         * loader/CachedCSSStyleSheet.cpp:
251         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
252         (WebCore::CachedCSSStyleSheet::setCharset):
253         (WebCore::CachedCSSStyleSheet::data):
254         * loader/CachedCSSStyleSheet.h:
255         Use Decoder instead of TextEncoding::toUnicode() to enable @charset support.
256
257         * loader/CachedXBLDocument.cpp:
258         (WebCore::CachedXBLDocument::CachedXBLDocument): Pass a content type.
259         * loader/CachedXSLStyleSheet.cpp:
260         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet): Ditto.
261         (WebCore::CachedXSLStyleSheet::data): Flush the decoder to be safe.
262
263         * page/Frame.cpp:
264         (WebCore::Frame::write): Pass a content type and a default encoding to 
265         the Decoder.
266         * xml/XSLTProcessor.cpp:
267         (WebCore::XSLTProcessor::createDocumentFromSource): Pass the output document
268         MIME type.
269         * xml/xmlhttprequest.cpp:
270         (WebCore::XMLHttpRequest::receivedData): Ditto.
271
272 2006-09-01  Adele Peterson  <adele@apple.com>
273
274         Reviewed by John.
275
276         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10580
277           Password: New secure text field allows non-Roman text entry
278
279         * bridge/mac/FrameMac.mm:
280         (WebCore::FrameMac::setSecureKeyboardEntry): Enable and disable Roman keyboards when switching in and out of this mode.
281         (WebCore::FrameMac::isSecureKeyboardEntry): Changed secureKeyboardEntry to isSecureKeyboardEntry.
282         * bridge/mac/FrameMac.h: ditto.
283         * page/Frame.cpp: (WebCore::Frame::setIsActive): ditto.
284         * page/Frame.h: (WebCore::Frame::isSecureKeyboardEntry): ditto.
285
286 2006-09-01  Adele Peterson  <adele@apple.com>
287
288         Reviewed by John.
289
290         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10665
291           Password: Disable smartReplace for new password fields
292
293         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
294           Don't smart replace when the selection being replaced is in a password field.
295
296 2006-08-31  Sam Weinig  <sam.weinig@gmail.com>
297
298         Reviewed by Tim H.
299
300         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10669
301           Auto-generate the remaining Objective-C HTML DOM bindings
302           
303           Auto-generates DOMHTMLAnchorElement, DOMHTMLAreaElement,
304           DOMHTMLBaseFontElement, DOMHTMLFontElement, DOMHTMLFrameElement,
305           DOMHTMLFrameSetElement, DOMHTMLHRElement, DOMHTMLIFrameElement,
306           DOMHTMLImageElement, DOMHTMLMapElement, DOMHTMLModElement,
307           DOMHTMLObjectElement, DOMHTMLParamElement, DOMHTMLScriptElement,
308           DOMHTMLTableCaptionElement, DOMHTMLTableCellElement,
309           DOMHTMLTableColElement, DOMHTMLTableElement, DOMHTMLTableRowElement,
310           and DOMHTMLTableSectionElement.  
311
312           Splits DOMHTMLAppletElement and DOMHTMLOptionElement into their own 
313           files.
314
315         * DerivedSources.make:
316         * WebCore.xcodeproj/project.pbxproj:
317         * bindings/objc/DOM.mm:
318         * bindings/objc/DOMExtensions.h:
319         * bindings/objc/DOMHTML.h:
320         * bindings/objc/DOMHTML.mm:
321         (-[DOMHTMLAnchorElement absoluteLinkURL]):
322         (-[DOMHTMLImageElement altDisplayString]):
323         (-[DOMHTMLImageElement absoluteImageURL]):
324         (-[DOMHTMLImageElement WebCore::]):
325         (-[DOMHTMLObjectElement absoluteImageURL]):
326         (-[DOMHTMLObjectElement WebCore::]):
327         (+[DOMHTMLTableCaptionElement _tableCaptionElementWith:]):
328         (-[DOMHTMLTableCaptionElement _tableCaptionElement]):
329         (+[DOMHTMLTableSectionElement _tableSectionElementWith:]):
330         (-[DOMHTMLTableSectionElement _tableSectionElement]):
331         (+[DOMHTMLTableElement _tableElementWith:]):
332         (-[DOMHTMLTableElement _tableElement]):
333         (+[DOMHTMLTableCellElement _tableCellElementWith:]):
334         (-[DOMHTMLTableCellElement _tableCellElement]):
335         * bindings/objc/DOMHTMLAppletElement.h: Added.
336         * bindings/objc/DOMHTMLAppletElement.mm: Added.
337         (-[DOMHTMLAppletElement WebCore::]):
338         (-[DOMHTMLAppletElement align]):
339         (-[DOMHTMLAppletElement setAlign:]):
340         (-[DOMHTMLAppletElement alt]):
341         (-[DOMHTMLAppletElement setAlt:]):
342         (-[DOMHTMLAppletElement archive]):
343         (-[DOMHTMLAppletElement setArchive:]):
344         (-[DOMHTMLAppletElement code]):
345         (-[DOMHTMLAppletElement setCode:]):
346         (-[DOMHTMLAppletElement codeBase]):
347         (-[DOMHTMLAppletElement setCodeBase:]):
348         (-[DOMHTMLAppletElement height]):
349         (-[DOMHTMLAppletElement setHeight:]):
350         (-[DOMHTMLAppletElement hspace]):
351         (-[DOMHTMLAppletElement setHspace:]):
352         (-[DOMHTMLAppletElement name]):
353         (-[DOMHTMLAppletElement setName:]):
354         (-[DOMHTMLAppletElement object]):
355         (-[DOMHTMLAppletElement setObject:]):
356         (-[DOMHTMLAppletElement vspace]):
357         (-[DOMHTMLAppletElement setVspace:]):
358         (-[DOMHTMLAppletElement width]):
359         (-[DOMHTMLAppletElement setWidth:]):
360         * bindings/objc/DOMHTMLInternal.h:
361         * bindings/objc/DOMHTMLOptionElement.h: Added.
362         * bindings/objc/DOMHTMLOptionElement.mm: Added.
363         (-[DOMHTMLOptionElement WebCore::]):
364         (-[DOMHTMLOptionElement form]):
365         (-[DOMHTMLOptionElement defaultSelected]):
366         (-[DOMHTMLOptionElement setDefaultSelected:]):
367         (-[DOMHTMLOptionElement text]):
368         (-[DOMHTMLOptionElement index]):
369         (-[DOMHTMLOptionElement disabled]):
370         (-[DOMHTMLOptionElement setDisabled:]):
371         (-[DOMHTMLOptionElement label]):
372         (-[DOMHTMLOptionElement setLabel:]):
373         (-[DOMHTMLOptionElement selected]):
374         (-[DOMHTMLOptionElement setSelected:]):
375         (-[DOMHTMLOptionElement value]):
376         (-[DOMHTMLOptionElement setValue:]):
377         * bindings/objc/DOMPrivate.h:
378         * bindings/scripts/CodeGeneratorObjC.pm:
379
380 2006-08-31  Alice Liu  <alice.liu@apple.com>
381
382         Reviewed by Darin.
383
384         Fixed <rdar://problem/4463870> Switch to use new text field implementation for <isindex>
385
386         * bindings/objc/DOMHTML.mm:
387         (-[DOMHTMLInputElement _isTextField]):
388         moved isindex from the list of nonTextInputTypes to the list of textInputTypes
389         * css/html4.css:
390         added isindex to certain rules that applied to input fields
391         * html/HTMLInputElement.cpp:
392         (WebCore::HTMLInputElement::canHaveSelection):
393         (WebCore::HTMLInputElement::selectionStart):
394         (WebCore::HTMLInputElement::selectionEnd):
395         (WebCore::HTMLInputElement::setSelectionStart):
396         (WebCore::HTMLInputElement::setSelectionEnd):
397         (WebCore::HTMLInputElement::select):
398         (WebCore::HTMLInputElement::setSelectionRange):
399         (WebCore::HTMLInputElement::createRenderer):
400         for the 8 methods above, moved the case for isindex to the same case as text
401         * html/HTMLInputElement.h:
402         (WebCore::HTMLInputElement::isNonWidgetTextField):
403         added isindex to this test
404         * html/HTMLIsIndexElement.idl:
405         HTMLIsIndexElement inherits from HTMLInputElement
406         * rendering/RenderLineEdit.cpp:
407         (WebCore::RenderLineEdit::RenderLineEdit):
408         removed the case for isindex since we changed the renderer type from a RenderLineEdit
409         to a RenderTextControl in WebCore::HTMLInputElement::createRenderer()
410
411 2006-08-31  David Harrison  <harrison@apple.com>
412
413         Reviewed by Adele.
414
415         <rdar://problem/4708119> REGRESSION: Cannot observe an AXTextField element directly
416
417         ... and most of
418         <rdar://problem/4708022> REGRESSION: TextRange-based attributes are missing from text fields
419         <rdar://problem/4709515> REGRESSION: Expose text areas
420
421         Remaining work for those two bugs in new bugs:
422
423         <rdar://problem/4712101> Support NSAccessibilityVisibleCharacterRangeAttribute for AXTextField and AXTextArea elements
424         <rdar://problem/4712111> Support NSAccessibilityInsertionPointLineNumberAttribute for AXTextArea elements
425         <rdar://problem/4712125> Support setting NSAccessibilitySelectedTextAttribute for AXTextField and AXTextArea elements
426
427         * bridge/AXObjectCache.h:
428         (WebCore::AXObjectCache::postNotificationToElement):
429         * bridge/mac/AXObjectCacheMac.mm:
430         (WebCore::AXObjectCache::postNotification):
431         (WebCore::AXObjectCache::postNotificationToElement):
432         Removed postNotificationToTopWebArea.
433         postNotification now posts to input element or top web area, as appropriate.
434         postNotificationToElement posts to the specified element itself.
435         
436         * bridge/mac/FrameMac.h:
437         * bridge/mac/FrameMac.mm:
438         (WebCore::FrameMac::respondToChangedContents):
439         Take a selection.  Pass the starting position's renderer to postNotification so that postNotification can post to the appropriate input element, if any.
440         
441         * bridge/mac/WebCoreAXObject.h:
442         * bridge/mac/WebCoreAXObject.mm:
443         (-[WebCoreAXObject isWebArea]):
444         (-[WebCoreAXObject isAnchor]):
445         (-[WebCoreAXObject isTextRange]):
446         New convenience methods.
447         
448         (-[WebCoreAXObject role]):
449         (-[WebCoreAXObject roleDescription])        
450         (-[WebCoreAXObject value]):
451         (-[WebCoreAXObject accessibilityDescription]):
452         Support AXTextField and AXTextArea.
453
454         (-[WebCoreAXObject accessibilityShouldUseUniqueId]):
455         Register AXTextField and AXTextArea elements so notifications to them can be observed.
456         
457         (-[WebCoreAXObject accessibilityIsIgnored]):
458         Use new convenience method isWebArea.
459
460         (-[WebCoreAXObject accessibilityAttributeNames]):
461         Simplify the array creation.
462         Add text range support.
463        
464         (-[WebCoreAXObject accessibilityAttributeValue:]):
465         Add text range support.
466        
467         (-[WebCoreAXObject canSetFocusAttribute]):
468         (-[WebCoreAXObject canSetValueAttribute]):
469         (-[WebCoreAXObject canSetTextRangeAttributes]):
470         New convenience methods.
471         
472         (-[WebCoreAXObject accessibilityIsAttributeSettable:]):
473         (-[WebCoreAXObject accessibilitySetValue:forAttribute:]):
474         Add text range support.
475
476         (-[WebCoreAXObject observableObject]):
477         New to locate text field or text area to notify.
478         
479         * dom/Document.cpp:
480         (WebCore::Document::updateSelection):
481         Post AXSelectedTextChanged notification with new selection's start node.
482         postNotification will send it to the input element, if there is one, or the top WebArea.
483         
484         (WebCore::Document::implicitClose):
485         Use postNotificationToElement now that it acts like the old postNotification.
486         
487         * page/Frame.h:
488         * page/Frame.cpp:
489         (WebCore::Frame::appliedEditing):
490         (WebCore::Frame::unappliedEditing):
491         (WebCore::Frame::reappliedEditing):
492         Pass the selection of interest to respondToChangedContents.
493         
494         * page/FrameView.cpp:
495         (WebCore::FrameView::layout):
496         Use postNotificationToElement now that it acts like the old postNotification.
497
498 2006-08-31  Adele Peterson  <adele@apple.com>
499
500         Reviewed by Darin.
501
502         WebCore part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10666
503         Password: Disallow Spelling, Font, Speech, and Writing Direction context menu
504
505         * bridge/mac/WebCoreFrameBridge.h:
506         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge isSelectionInPasswordField]): Added.
507         * page/Frame.cpp: (WebCore::Frame::isSelectionInPasswordField): Added.
508         * page/Frame.h:
509
510 2006-08-31  Anders Carlsson  <acarlsson@apple.com>
511
512         Reviewed by Tim O, Hyatt.
513
514         * WebCore.xcodeproj/project.pbxproj:
515         Add KURLCFNet.cpp
516         
517         * platform/KURL.h:
518         Get rid of include, add KURL constructor that takes a CFURLRef.
519         
520         * platform/PlatformString.h:
521         * platform/StringImpl.h:
522         Get rid of include.
523         
524         * platform/cf/KURLCFNet.cpp:
525         (WebCore::KURL::KURL):
526         Add constructor.
527         
528         * platform/cf/ResourceLoaderCFNet.cpp:
529         Fix includes.
530         
531         * platform/cf/StringCF.cpp:
532         (WebCore::String::createCFString):
533         Move this here from PlatformString.h
534         
535         * platform/cf/StringImplCF.cpp:
536         (WebCore::StringImpl::createCFString):
537         Fix cast.
538         
539         * platform/mac/KURLMac.mm:
540         Move createCFURL() to KURLCFNet.cpp
541
542 2006-08-31 Dave Hyatt <hyatt@apple.com>
543
544         Make ScrollBar.cpp suitable for compiling on Windows by removing the #import.
545
546         Reviewed by adam
547
548         * platform/ScrollBar.cpp:
549
550 2006-08-31  Brady Eidson  <beidson@apple.com>
551
552         Reviewed by John
553
554         Cleaned up my last patch after further considerations
555
556         * loader/icon/IconDatabase.cpp:
557         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Uses the new checkForDanglingPageURLs to check
558           for and fix danglers.  Does so in all builds (changed from debug only in my last patch)
559         (WebCore::IconDatabase::syncDatabase): Uses the new checkForDanglingPageURLs to check for danglers
560         (WebCore::IconDatabase::checkForDanglingPageURLs): This checks and, if asked via an arg, prunes the dangling pageURLs
561         * loader/icon/IconDatabase.h:
562
563 2006-08-31  Anders Carlsson  <acarlsson@apple.com>
564
565         Reviewed by Maciej.
566
567         Add CString. CString is a simple, null-terminated byte buffer that supports data
568         sharing. Its main use is to be a better const char*.
569         
570         Also add latin1 and utf8 methods to String which returns CStrings.
571         
572         * platform/CString.cpp: Added.
573         (WebCore::CString::CString):
574         (WebCore::CString::init):
575         (WebCore::CString::data):
576         (WebCore::CString::length):
577         (WebCore::CString::deprecatedCString):
578         * platform/CString.h: Added.
579         (WebCore::CStringBuffer::CStringBuffer):
580         (WebCore::CStringBuffer::data):
581         (WebCore::CStringBuffer::length):
582         (WebCore::CString::CString):
583         (WebCore::CString::operator const char*):
584         (WebCore::CString::isNull):
585         * platform/PlatformString.h:
586         * platform/String.cpp:
587         (WebCore::String::latin1):
588         (WebCore::String::utf8):
589
590 2006-08-31  Brady Eidson  <beidson@apple.com>
591
592         Reviewed by Hyatt
593
594         Previously mentioned ASSERT was hit right away by folks, as we first need to bring their old icon.db into consistency
595         Changed the ASSERT to a LOG_ERROR and added a method for debug builds to bring a DB back together.
596
597         * loader/icon/IconDatabase.cpp:
598         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Check for the danglers and prune them out
599         (WebCore::IconDatabase::syncDatabase): Check for the danglers and log the error
600         (WebCore::IconDatabase::pruneDanglingPageURLs): Prune the danglers
601         * loader/icon/IconDatabase.h:
602
603 2006-08-31  Brady Eidson  <beidson@apple.com>
604
605         Reviewed by Hyatt
606
607         Fixed an error where an Icon's IconID could change without the change being reflected in the PageURL table,
608         causing icons to be pruned before their time and pages to lose their icons.  This is because I misunderstood
609         how SQLite handles the "ON CONFLICT REPLACE" condition, which is to delete the row and re-insert instead of 
610         perform an update.  Also added an assertion to make sure this doesn't happen again.
611
612         * loader/icon/IconDataCache.cpp:
613         (WebCore::IconDataCache::writeToDatabase): Instead of one INSERT relying on SQLites conflict handling, broke
614           this into an UPDATE attempt followed by the initial INSERT
615         * loader/icon/IconDatabase.cpp:
616         (WebCore::IconDatabase::createDatabaseTables): Slight tweak to the database schema to prevent this from happening
617           in the future.  Note this change will not cause incompatibility with the current schema, therefore I didn't update
618           the official database version number
619         (WebCore::IconDatabase::syncDatabase): Added an ASSERT to look for this condition in the future
620         * loader/icon/SQLDatabase.cpp:
621         (WebCore::SQLDatabase::lastChanges): Added this SQLite accessor to see if an UPDATE command actually changed a row
622         * loader/icon/SQLDatabase.h: Ditto
623
624 2006-08-31  Sam Weinig  <sam.weinig@gmail.com>
625
626         Reviewed by Tim H.
627
628         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10653
629           Auto-generate another 20 Objective-C DOM HTML bindings
630
631           Auto-generates DOMHTMLBRElement, DOMHTMLButtonElement, DOMHTMLDListElement, 
632           DOMHTMLDirectoryElement, DOMHTMLDivElement, DOMHTMLFieldSetElement, 
633           DOMHTMLHeadingElement, DOMHTMLInputElement, DOMHTMLLIElement, DOMHTMLLabelElement,
634           DOMHTMLLegendElement, DOMHTMLMenuElement, DOMHTMLOListElement, DOMHTMLOptGroupElement,
635           DOMHTMLParagraphElement, DOMHTMLPreElement, DOMHTMLQuoteElement, DOMHTMLSelectElement,
636           DOMHTMLTextAreaElement, and DOMHTMLUListElement.
637
638         * DerivedSources.make:
639         * WebCore.xcodeproj/project.pbxproj:
640         * bindings/objc/DOM.mm:
641         * bindings/objc/DOMExtensions.h:
642         * bindings/objc/DOMHTML.h:
643         * bindings/objc/DOMHTML.mm:
644         (-[DOMHTMLInputElement altDisplayString]):
645         (-[DOMHTMLInputElement absoluteImageURL]):
646         (-[DOMHTMLInputElement WebCore::]):
647         (-[DOMHTMLInputElement _rectOnScreen]):
648         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]):
649         (-[DOMHTMLInputElement _selectedRange]):
650         (-[DOMHTMLInputElement _setAutofilled:]):
651         * bindings/objc/DOMHTMLInternal.h:
652         * bindings/objc/DOMPrivate.h:
653         * bindings/scripts/CodeGeneratorObjC.pm:
654
655 2006-08-31  Adele Peterson  <adele@apple.com>
656
657         Reviewed by John Sullivan.
658
659         Removing use of SPI in favor of Carbon API to enable and disable secure event input.
660
661         * WebCore.exp: Removed wkSecureEventInput and wkSetSecureEventInput.
662         * platform/mac/WebCoreSystemInterface.h: ditto.
663         * platform/mac/WebCoreSystemInterface.mm: ditto.
664
665         * bridge/mac/FrameMac.mm:
666         (WebCore::FrameMac::setSecureKeyboardEntry): Uses EnableSecureEventInput and DisableSecureEventInput.
667         (WebCore::FrameMac::secureKeyboardEntry): Uses IsSecureEventInputEnabled.
668
669 2006-08-30  Brady Eidson  <beidson@apple.com>
670
671         Reviewed by "common sense" (and Maciej)
672
673         Fixed two logging typos
674
675         * loader/icon/IconDatabase.cpp:
676         (WebCore::IconDatabase::syncDatabase):
677
678 2006-08-30  Adele Peterson  <adele@apple.com>
679
680         Adding missing nil check for focus node.
681
682         * page/Frame.cpp: (WebCore::Frame::setIsActive):
683
684 2006-08-30  Adele Peterson  <adele@apple.com>
685
686         Reviewed by Hyatt.
687
688         WebCore part of fix for  http://bugzilla.opendarwin.org/show_bug.cgi?id=10575
689         Enable secure input mode for new password fields
690
691         * WebCore.exp: Added wkSetSecureEventInput and wkSecureEventInput.
692         * platform/mac/WebCoreSystemInterface.h: ditto.
693         * platform/mac/WebCoreSystemInterface.mm: ditto.
694
695         * page/Frame.cpp: (WebCore::Frame::setIsActive): Enables and disables secure keyboard entry based on whether the frame becomes active.
696         * bridge/mac/FrameMac.h:
697         * bridge/mac/FrameMac.mm:
698         (WebCore::FrameMac::setSecureKeyboardEntry): Added. Calls wkSetSecureEventInput.
699         (WebCore::FrameMac::secureKeyboardEntry): Added. Calls wkSecureEventInput.
700         * html/HTMLInputElement.cpp:
701         (WebCore::HTMLInputElement::dispatchFocusEvent): For password fields, enable secure keyboard entry.
702         (WebCore::HTMLInputElement::dispatchBlurEvent): For password fields, disable secure keyboard entry.
703         * page/Frame.h:
704         (WebCore::Frame::setSecureKeyboardEntry):
705         (WebCore::Frame::secureKeyboardEntry):
706
707 2006-08-30  Darin Adler  <darin@apple.com>
708
709         Reviewed by Tim Hatcher.
710
711         - eliminated the need for UsesPassRefPtr in IDL files
712         - got rid of the category mechanism for ObjC generated DOM headers
713           (after discussions with Tim H where we decided it's not needed)
714         - simplified use of macro inside ObjC generated code
715
716         * ForwardingHeaders/wtf/GetPtr.h: Added.
717
718         * bindings/scripts/CodeGeneratorObjC.pm: Removed code to handle
719         categories. Eliminated use of DOM_cast since that's for the protection
720         of human programmers -- the script won't make mistakes that it needs
721         to catch. Changed macro to always be named IMPL instead of incorporating
722         the class name. Use WTF::getPtr to extract the pointer, and removed the
723         code that uses .get() to extract the pointer in the PassRefPtr case.
724
725         * dom/Attr.idl: Removed all uses of UsesPassRefPtr and ObjCCatagory.
726         * dom/DOMImplementation.idl: Ditto.
727         * dom/Document.idl: Ditto.
728         * dom/Element.idl: Ditto.
729         * dom/NamedNodeMap.idl: Ditto.
730         * html/HTMLDocument.idl: Ditto.
731         * html/HTMLElement.idl: Ditto.
732         * html/HTMLFormElement.idl: Ditto.
733         * html/HTMLMapElement.idl: Ditto.
734         * html/HTMLSelectElement.idl: Ditto.
735         * html/HTMLTableElement.idl: Ditto.
736         * html/HTMLTableRowElement.idl: Ditto.
737         * html/HTMLTableSectionElement.idl: Ditto.
738
739 2006-08-30  Brady Eidson  <beidson@apple.com>
740
741         Reviewed by John
742
743         <rdar://problem/4707718> - Instead of faking the user out with an in-memory icon database if their 
744         ~/Library/Safari/Icons is unwritable, we'll actually fail to open the icon database and the app will
745         run as if it was disabled via a preference.
746         Also took the opportunity to change some ASSERTS() to reasonable behavior
747
748         * bridge/mac/WebCoreIconDatabaseBridge.mm:
749         (-[WebCoreIconDatabaseBridge openSharedDatabaseWithPath:]): NSLog on failure so the user has a chance to figure 
750           out there's a problem.
751         (-[WebCoreIconDatabaseBridge closeSharedDatabase]):
752         (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]): From here on, just replaced ASSERTS() with reasonable behavior
753         (-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
754         (-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
755         (-[WebCoreIconDatabaseBridge retainIconForURL:]):
756         (-[WebCoreIconDatabaseBridge releaseIconForURL:]):
757         (-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
758         (-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
759         (-[WebCoreIconDatabaseBridge _setIconURL:forPageURL:]):
760         (-[WebCoreIconDatabaseBridge _hasEntryForIconURL:]):
761         * loader/icon/IconDatabase.cpp:
762         (WebCore::IconDatabase::open): If we fail to open, return false 
763         (WebCore::IconDatabase::~IconDatabase): cleanup better
764         * loader/icon/IconDatabase.h:
765
766 2006-08-30  David Harrison  <harrison@apple.com>
767
768         Reviewed by John Sullivan.
769
770         <rdar://problem/4708007> REGRESSION: text field inside a webpage no longer has settable AXValueAttribute
771         <rdar://problem/4707479> REGRESSION: controls inside a webpage no longer have settable AXFocusedAttribute
772
773         * bridge/mac/WebCoreAXObject.mm:
774         (-[WebCoreAXObject canSetFocusAttribute]):
775         (-[WebCoreAXObject canSetValueAttribute]):
776         New utility methods.  Text fields and buttons are focusable.
777         Text fields can have their value set. We need not make
778         popupbutton value settable because AppKit does not.
779         
780         (-[WebCoreAXObject accessibilityIsAttributeSettable:]):
781         Call new utility methods.
782         
783         (-[WebCoreAXObject accessibilitySetValue:forAttribute:]):
784         Set focus for text field or button.
785         Set value for text field.
786         
787 2006-08-30  David Hyatt  <hyatt@apple.com>
788
789         Fix for bugs 9000 and 10606.  Add code to suppress painting when
790         a FOUC situation would otherwise occur.  There will still typically be
791         a flash to white, but at least the wrong content won't show.
792
793         Reviewed by darin
794
795         * dom/Document.cpp:
796         (WebCore::Document::Document):
797         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
798         (WebCore::Document::preferredStylesheetSet):
799         (WebCore::Document::selectedStylesheetSet):
800         (WebCore::Document::setSelectedStylesheetSet):
801         (WebCore::Document::stylesheetLoaded):
802         (WebCore::Document::updateStyleSelector):
803         * dom/Document.h:
804         (WebCore::Document::haveStylesheetsLoaded):
805         * rendering/RenderBlock.cpp:
806         (WebCore::RenderBlock::paintChildren):
807         * rendering/RenderLayer.cpp:
808         (WebCore::RenderLayer::paintLayer):
809         (WebCore::isSubframe):
810         (WebCore::RenderLayer::hitTest):
811         * rendering/RenderView.cpp:
812         (WebCore::RenderView::repaintViewRectangle):
813
814 2006-08-31  Nikolas Zimmermann  <zimmermann@kde.org>
815  
816          Reviewed by Eric. Landed by rwlbuis.
817  
818          Apply Rob's fixes in RenderPathQt too -> unbreak build.
819  
820          * kcanvas/RenderPath.h: Some style cleanups.
821          * kcanvas/device/qt/RenderPathQt.cpp:
822          (WebCore::RenderPathQt::strokeContains):
823          * kcanvas/device/qt/RenderPathQt.h:
824
825 2006-08-30  Sam Weinig  <sam.weinig@gmail.com>
826         Reviewed by Tim H.
827
828         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10640
829           Auto-generate 10 more Objective-C DOM HTML bindings
830
831           Auto-generates DOMHTMLBaseElement, DOMHTMLBodyElement, DOMHTMLHeadElement,
832           DOMHTMLHtmlElement, DOMHTMLIsIndexElement, DOMHTMLLinkElement,
833           DOMHTMLMetaElement, DOMHTMLStyleElement and DOMHTMLTitleElement.
834
835           Splits DOMHTMLDocument into it's own files.
836
837         * DerivedSources.make:
838         * WebCore.xcodeproj/project.pbxproj:
839         * bindings/objc/DOM.mm:
840         * bindings/objc/DOMExtensions.h:
841         * bindings/objc/DOMHTML.h:
842         * bindings/objc/DOMHTML.mm:
843         * bindings/objc/DOMHTMLDocument.h: Added.
844         * bindings/objc/DOMHTMLDocument.mm: Added.
845         (-[DOMHTMLDocument WebCore::]):
846         (-[DOMHTMLDocument title]):
847         (-[DOMHTMLDocument setTitle:]):
848         (-[DOMHTMLDocument referrer]):
849         (-[DOMHTMLDocument domain]):
850         (-[DOMHTMLDocument URL]):
851         (-[DOMHTMLDocument body]):
852         (-[DOMHTMLDocument setBody:]):
853         (-[DOMHTMLDocument images]):
854         (-[DOMHTMLDocument applets]):
855         (-[DOMHTMLDocument links]):
856         (-[DOMHTMLDocument forms]):
857         (-[DOMHTMLDocument anchors]):
858         (-[DOMHTMLDocument cookie]):
859         (-[DOMHTMLDocument setCookie:]):
860         (-[DOMHTMLDocument open]):
861         (-[DOMHTMLDocument close]):
862         (-[DOMHTMLDocument write:]):
863         (-[DOMHTMLDocument writeln:]):
864         (-[DOMHTMLDocument getElementById:]):
865         (-[DOMHTMLDocument getElementsByName:]):
866         (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
867         (-[DOMHTMLDocument createDocumentFragmentWithText:]):
868         * bindings/objc/DOMHTMLInternal.h:
869         * bindings/scripts/CodeGeneratorObjC.pm:
870         * html/HTMLDocument.idl:
871
872 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
873
874         Reviewed by eseidel.
875
876         Use QColor <-> Color conversion operator, instead of faking it.
877
878         * platform/qt/FontQt.cpp:
879         (WebCore::Font::drawGlyphs):
880         * platform/qt/GraphicsContextQt.cpp:
881         (WebCore::GraphicsContext::fillRect):
882
883 2006-08-30  Rob Buis  <buis@kde.org>
884
885         Reviewed by Eric.
886
887         http://bugzilla.opendarwin.org/show_bug.cgi?id=10586
888         pointer-events has issues when things are not stroked/filled
889
890         Add a param to fillContains/strokeContains to indicate
891         whether we still want hit testing when there is no fill/stroke.
892
893         * kcanvas/RenderPath.cpp:
894         (WebCore::RenderPath::fillContains):
895         (WebCore::RenderPath::nodeAtPoint):
896         * kcanvas/RenderPath.h:
897         * kcanvas/device/quartz/KCanvasItemQuartz.h:
898         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
899         (WebCore::KCanvasItemQuartz::strokeContains):
900
901 2006-08-29  Justin Garcia  <justin.garcia@apple.com>
902
903         Reviewed by harrison
904         
905         <rdar://problem/4700297>
906         REGRESSION: After replacing a misspelled word in a sentence, the selection extends to end of current line
907
908         * editing/ReplaceSelectionCommand.cpp:
909         (WebCore::ReplaceSelectionCommand::doApply): Rebalance whitespace
910         around insertionPos before insertion because the content might 
911         cause a collapse, e.g. inserting <div>foo</div> at hello^ world.
912         * editing/htmlediting.cpp:
913         (WebCore::rebalanceWhitespaceInTextNode): Rebalance with all nbsps
914         for simplicity, we can produce sequences of regular spaces and
915         nbsps on serialization (10636).
916
917 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
918
919         Reviewed by eseidel.
920
921         The old solution was slow & does not work correctly.
922         Move the QString -> DeprecatedString conversion into
923         DeprectedString.cpp, to be able to access allocateHandle().
924
925         * platform/DeprecatedString.cpp:
926         (WebCore::DeprecatedString::DeprecatedString):
927         * platform/qt/StringQt.cpp:
928
929 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
930
931         Reviewed/landed by Adam.
932
933         Implement containsCharacters() / determinePitch() functions.
934
935         * platform/qt/FontDataQt.cpp:
936         (WebCore::FontData::containsCharacters):
937         (WebCore::FontData::determinePitch):
938
939 2006-08-30  Brady Eidson  <beidson@apple.com>
940
941         Reviewed by Darin's rubberstamp
942
943         We apparently have a fancy delateAllValues() helper for HashMap/Sets - I'll use that instead
944
945         * WebCore.xcodeproj/project.pbxproj:
946         * loader/icon/IconDatabase.cpp:
947         (WebCore::IconDatabase::removeAllIcons):
948
949 2006-08-29  waylonis  <waylonis@google.com>
950
951         Reviewed, tweaked by ggaren.
952         
953         - Changed to use ExecState on current context rather than global.
954           Part of the fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10114
955         * bindings/objc/WebScriptObject.mm:
956         (+[WebScriptObject throwException:]):
957         (-[WebScriptObject setException:]):
958
959 2006-08-30  Adele Peterson  <adele@apple.com>
960
961         Reviewed by Darin.
962
963         - WebCore part of fix for:
964         http://bugzilla.opendarwin.org/show_bug.cgi?id=10576
965         Disallow copy from new password fields
966
967         * page/Frame.cpp: (WebCore::Frame::mayCopy): Added. Checks to see if the selection is within a password field.
968         * page/Frame.h: Added mayCopy.
969
970         * bridge/mac/FrameMac.h:
971         * bridge/mac/FrameMac.mm:
972         (WebCore::FrameMac::handleMouseMoveEvent): Checks mayCopy before starting a drag.
973         (WebCore::FrameMac::mayDHTMLCut): Renamed to match the bridge method.  This also checks mayCopy now.
974         (WebCore::FrameMac::mayDHTMLCopy): ditto.
975         (WebCore::FrameMac::tryDHTMLCut): ditto.
976         (WebCore::FrameMac::tryDHTMLCopy): ditto.
977         (WebCore::FrameMac::mayDHTMLPaste): Renamed to match the bridge function.
978         (WebCore::FrameMac::tryDHTMLPaste): ditto.
979         * bridge/mac/WebCoreFrameBridge.h:
980         * bridge/mac/WebCoreFrameBridge.mm:
981         (-[WebCoreFrameBridge mayCopy]): Calls the renamed method on frame.
982         (-[WebCoreFrameBridge mayDHTMLCut]): ditto.
983         (-[WebCoreFrameBridge mayDHTMLCopy]): ditto.
984         (-[WebCoreFrameBridge mayDHTMLPaste]): ditto.
985         (-[WebCoreFrameBridge tryDHTMLCut]): ditto.
986         (-[WebCoreFrameBridge tryDHTMLCopy]): ditto.
987         (-[WebCoreFrameBridge tryDHTMLPaste]): ditto.
988
989         * css/html4.css: Added !important to the -webkit-text-security property for password fields.
990
991 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
992
993         Reviewed by Tim H.
994
995         Commit KDE related tweaks, to be able to
996         differentiate between a Qt-only or a KDE build.
997
998         * CMakeLists.txt: Move global variables up to trunk/CMakeLists.txt.
999                           Also rename USE_WEBKIT_SVG_SUPPORT to WEBKIT_USE_SVG_SUPPORT.
1000
1001 2006-08-30  Timothy Hatcher  <timothy@apple.com>
1002
1003         Rubber-stamped by Brady.
1004
1005         Fix for the generated headers to make the build work
1006         during "installhdrs" builds. Also export DOM headers
1007         using the #import <WebCore/DOM*.h> syntax.
1008
1009         * WebCore.xcodeproj/project.pbxproj:
1010         * bindings/scripts/CodeGeneratorObjC.pm:
1011
1012 2006-08-29  Brady Eidson  <beidson@apple.com>
1013
1014         Reviewed by Kevin Decker (Sarge)
1015
1016         <rdar://problem/4678414> - New IconDB needs to delete icons when asked
1017         <rdar://problem/4707718> - If user's Icon directory is unwritable, Safari will crash at startup
1018
1019         * bridge/mac/WebCoreIconDatabaseBridge.h:
1020         * bridge/mac/WebCoreIconDatabaseBridge.mm:
1021         (-[WebCoreIconDatabaseBridge removeAllIcons]):  Added
1022         * loader/icon/IconDatabase.cpp:
1023         (WebCore::IconDatabase::open): If DB file is not writeable, create an in-memory DB for this session
1024         (WebCore::IconDatabase::close): Use new deleteAllPreparedStatements()
1025         (WebCore::IconDatabase::removeAllIcons): Actually implemented
1026         (WebCore::IconDatabase::deleteAllPreparedStatements): Added for convinience/consistency
1027         (WebCore::IconDatabase::setPrivateBrowsingEnabled): Use new SQLDatabase::clearAllTables()
1028         * loader/icon/IconDatabase.h:
1029         * loader/icon/SQLDatabase.cpp:
1030         (WebCore::SQLDatabase::clearAllTables): Moved this from IconDatabase as it actually belongs here
1031         (WebCore::SQLDatabase::vacuum): Added
1032         * loader/icon/SQLDatabase.h:
1033         (WebCore::SQLDatabase::path): changed name from getPath()
1034
1035 2006-08-29  Brady Eidson  <beidson@apple.com>
1036
1037         Reviewed by Alice
1038
1039         Added a truth value to setIconURLForPageURL so WebKit can avoid sending a notification
1040         This is a win on the iBench
1041
1042         * bridge/mac/WebCoreIconDatabaseBridge.h:
1043         * bridge/mac/WebCoreIconDatabaseBridge.mm:
1044         (-[WebCoreIconDatabaseBridge _setIconURL:forPageURL:]):
1045         * loader/icon/IconDatabase.cpp:
1046         (WebCore::IconDatabase::setIconURLForPageURL):
1047         * loader/icon/IconDatabase.h:
1048
1049 2006-08-29  Alice Liu  <alice.liu@apple.com>
1050
1051         Reviewed by Brady.
1052
1053         Fixed <rdar://problem/4702021> REGRESSION: WebClip and Weather widgets shift downward vertically on screen after I drag them out from dashboard configure bar
1054
1055         * platform/mac/ScreenMac.mm:
1056         (WebCore::flipScreenRect):
1057         reverted the one line in this method back to what it was before r15765.  This changed caused window.screenY to be incorrect.  
1058
1059 2006-08-29  Darin Adler  <darin@apple.com>
1060
1061         Reviewed by Hyatt.
1062
1063         - fix <rdar://problem/4701494> REGRESSION: Scrollbar on EPSN widget doesn't scroll (also affects Widgets widget, web inspector)
1064
1065         The bug was that we would return "none" for computed style properties when they were
1066         exactly "-1px".
1067
1068         Test: fast/css/computed-style-negative-top.html
1069
1070         * css/CSSComputedStyleDeclaration.cpp:
1071         (WebCore::valueForLength): Moved special case for "undefined length" out of here.
1072         (WebCore::valueForMaxLength): Moved it into here.
1073         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Use valueForMaxLength
1074         only for max-height and max-width.
1075
1076 2006-08-29  Nikolas Zimmermann  <zimmermann@kde.org>
1077
1078         Reviewed by eseidel.
1079
1080         Add path-related SVG JavaScript bindings to generation.
1081
1082         * CMakeLists.txt:
1083
1084 2006-08-29  Eric Seidel  <eric@eseidel.com>
1085
1086         Reviewed by kevin.
1087
1088         Re-enable path-related SVG JavaScript bindings.
1089         http://bugzilla.opendarwin.org/show_bug.cgi?id=10623
1090         Split all SVGPathSeg*.idl files into Abs and Rel pieces.
1091         Move all SVGPath*.idl files into ksvg2/svg
1092
1093         * DerivedSources.make:
1094         * WebCore.xcodeproj/project.pbxproj:
1095         * bindings/scripts/CodeGeneratorJS.pm: Special case Abs and Rel header includes
1096         * ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl: Removed.
1097         * ksvg2/bindings/idl/svg/SVGPathElement.idl: Removed.
1098         * ksvg2/bindings/idl/svg/SVGPathSeg.idl: Removed.
1099         * ksvg2/bindings/idl/svg/SVGPathSegArc.idl: Removed.
1100         * ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl: Removed.
1101         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl: Removed.
1102         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl: Removed.
1103         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl: Removed.
1104         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl: Removed.
1105         * ksvg2/bindings/idl/svg/SVGPathSegLineto.idl: Removed.
1106         * ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl: Removed.
1107         * ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl: Removed.
1108         * ksvg2/bindings/idl/svg/SVGPathSegList.idl: Removed.
1109         * ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl: Removed.
1110         * ksvg2/ksvg.h: move SVGPathSegment enum
1111         * ksvg2/svg/SVGPathElement.cpp: move SVGPathSegment enum
1112         (WebCore::SVGPathElement::toPathData):
1113         * ksvg2/svg/SVGPathSeg.cpp:
1114         (WebCore::SVGPathSeg::SVGPathSeg):
1115         * ksvg2/svg/SVGPathSeg.h:
1116         (WebCore::SVGPathSeg::):
1117         * ksvg2/svg/SVGPathSegArcAbs.idl: Added.
1118         * ksvg2/svg/SVGPathSegArcRel.idl: Added.
1119         * ksvg2/svg/SVGPathSegCurvetoCubicAbs.idl: Added.
1120         * ksvg2/svg/SVGPathSegCurvetoCubicRel.idl: Added.
1121         * ksvg2/svg/SVGPathSegCurvetoCubicSmoothAbs.idl: Added.
1122         * ksvg2/svg/SVGPathSegCurvetoCubicSmoothRel.idl: Added.
1123         * ksvg2/svg/SVGPathSegCurvetoQuadraticAbs.idl: Added.
1124         * ksvg2/svg/SVGPathSegCurvetoQuadraticRel.idl: Added.
1125         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl: Added.
1126         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl: Added.
1127         * ksvg2/svg/SVGPathSegLinetoAbs.idl: Added.
1128         * ksvg2/svg/SVGPathSegLinetoHorizontalAbs.idl: Added.
1129         * ksvg2/svg/SVGPathSegLinetoHorizontalRel.idl: Added.
1130         * ksvg2/svg/SVGPathSegLinetoRel.idl: Added.
1131         * ksvg2/svg/SVGPathSegLinetoVerticalAbs.idl: Added.
1132         * ksvg2/svg/SVGPathSegLinetoVerticalRel.idl: Added.
1133         * ksvg2/svg/SVGPathSegMovetoAbs.idl: Added.
1134         * ksvg2/svg/SVGPathSegMovetoRel.idl: Added.
1135
1136 2006-08-28  Nikolas Zimmermann  <zimmermann@kde.org>
1137
1138         Reviewed by Eric, landed by Anders.
1139
1140         Fixes one chunk of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10604
1141
1142         Finish Unity merging. Remove libcurl usage, in favour of KIO.
1143         This makes the regression testing fly! IO processing is way faster now.
1144
1145         * CMakeLists.txt:
1146         * platform/ResourceLoaderInternal.h:
1147         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
1148         * platform/qt/FrameQt.cpp:
1149         (WebCore::FrameQt::openURL):
1150         (WebCore::FrameQt::submitForm):
1151         (WebCore::FrameQt::urlSelected):
1152         (WebCore::FrameQt::createEmptyDocument):
1153         (WebCore::FrameQt::receivedData):
1154         (WebCore::FrameQt::receivedAllData):
1155         * platform/qt/FrameQt.h:
1156         * platform/qt/ResourceLoaderCurl.cpp: Removed.
1157         * platform/qt/ResourceLoaderManager.cpp:
1158         (WebCore::ResourceLoaderManager::ResourceLoaderManager):
1159         (WebCore::ResourceLoaderManager::~ResourceLoaderManager):
1160         (WebCore::ResourceLoaderManager::self):
1161         (WebCore::ResourceLoaderManager::slotData):
1162         (WebCore::ResourceLoaderManager::slotMimetype):
1163         (WebCore::ResourceLoaderManager::slotResult):
1164         (WebCore::ResourceLoaderManager::remove):
1165         (WebCore::ResourceLoaderManager::add):
1166         * platform/qt/ResourceLoaderManager.h:
1167         * platform/qt/ResourceLoaderQt.cpp: Added.
1168         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
1169         (WebCore::ResourceLoader::~ResourceLoader):
1170         (WebCore::ResourceLoader::start):
1171         (WebCore::ResourceLoader::cancel):
1172         (WebCore::ResourceLoader::assembleResponseHeaders):
1173         (WebCore::ResourceLoader::retrieveCharset):
1174         (WebCore::ResourceLoader::receivedResponse):
1175
1176 2006-08-29  Timothy Hatcher  <timothy@apple.com>
1177
1178         Reviewed by Eric.
1179
1180         Bug 10632: Objective-C DOM should use the @property syntax for DOM attributes
1181         http://bugzilla.opendarwin.org/show_bug.cgi?id=10632
1182
1183         Generate @property when MACOSX_DEPLOYMENT_TARGET is >= 10.5.
1184         This is backwards compatible with the getter/setter methods.
1185         Generate setter arguments with a "new" prefix to avoid the property
1186         name conflict warning. Also removes some whitespace and the comments
1187         that we added to the headers. This makes the headers look like what we ship now.
1188
1189         * bindings/objc/DOMCSS.mm:
1190         (-[DOMDocument getComputedStyle::]): renamed a local variable to avoid the property name conflict.
1191         (-[DOMDocument getMatchedCSSRules::]): ditto.
1192         * bindings/scripts/CodeGeneratorObjC.pm: generate @property in the headers.
1193
1194 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
1195
1196         Reviewed and landed by Anders.
1197
1198         Fix time calculation, by using a correct calculation. Calling time()
1199         returns a number of seconds, aka. an integer. Fix it by using gettimeofday().
1200         Patch originally proposed by Ronan Meneu <rmeneu@origyn.fr>
1201
1202         * platform/qt/SystemTimeQt.cpp:
1203         (WebCore::currentTime):
1204
1205 2006-08-29  Sam Weinig  <sam.weinig@gmail.com>
1206
1207         Reviewed by Tim H.
1208
1209         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10628
1210           Auto-generate the remaining Objective-C DOM bindings
1211
1212           Auto-generates DOMHTMLCollection, DOMHTMLElement, DOMHTMLFormElement,
1213           and DOMHTMLOptionsCollection, and lays groundwork for the rest of the 
1214           HTML DOM bindings by adding/fixing the appropriate IDL's and updating
1215           the CodeGeneratorObjC.pm build script.
1216
1217         * DerivedSources.make:
1218         * WebCore.xcodeproj/project.pbxproj:
1219         * bindings/objc/DOM.mm:
1220         * bindings/objc/DOMExtensions.h:
1221         * bindings/objc/DOMHTML.h:
1222         * bindings/objc/DOMHTML.mm:
1223         * bindings/objc/DOMHTMLInternal.h:
1224         * bindings/scripts/CodeGeneratorObjC.pm:
1225         * html/HTMLAnchorElement.idl:
1226         * html/HTMLAreaElement.idl:
1227         * html/HTMLBaseFontElement.idl:
1228         * html/HTMLBodyElement.idl:
1229         * html/HTMLButtonElement.idl:
1230         * html/HTMLCollection.idl: Added.
1231         * html/HTMLDocument.idl:
1232         * html/HTMLElement.idl:
1233         * html/HTMLFormElement.idl:
1234         * html/HTMLFrameElement.idl: Added.
1235         * html/HTMLFrameSetElement.idl: Added.
1236         * html/HTMLIFrameElement.idl: Added.
1237         * html/HTMLImageElement.idl:
1238         * html/HTMLInputElement.idl:
1239         * html/HTMLLabelElement.idl:
1240         * html/HTMLLegendElement.idl:
1241         * html/HTMLLinkElement.idl:
1242         * html/HTMLMapElement.idl:
1243         * html/HTMLObjectElement.idl: Added.
1244         * html/HTMLOptionsCollection.idl:
1245         * html/HTMLPreElement.idl:
1246         * html/HTMLSelectElement.idl: Added.
1247         * html/HTMLStyleElement.idl:
1248         * html/HTMLTableCaptionElement.idl: Added.
1249         * html/HTMLTableCellElement.idl: Added.
1250         * html/HTMLTableColElement.idl: Added.
1251         * html/HTMLTableElement.idl: Added.
1252         * html/HTMLTableRowElement.idl: Added.
1253         * html/HTMLTableSectionElement.idl: Added.
1254         * html/HTMLTextAreaElement.idl:
1255
1256 2006-08-29  Nikolas Zimmermann  <zimmermann@kde.org>
1257
1258         Reviewed and landed by ap.
1259
1260         Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10629.
1261         Drawing convex polygons is broken in the Qt platform.
1262
1263         * platform/qt/GraphicsContextQt.cpp:
1264         (WebCore::GraphicsContext::drawConvexPolygon):
1265
1266 2006-08-29  Nikolas Zimmermann  <zimmermann@kde.org>
1267
1268         Reviewed by Eric.
1269
1270         Implementing font hashing properly, fixes weird crashes in HashMap.
1271
1272         * platform/qt/FontPlatformData.h:
1273         * platform/qt/FontPlatformDataQt.cpp:
1274         (WebCore::FontPlatformData::FontPlatformData):
1275         (WebCore::FontPlatformData::hash):
1276
1277 2006-08-29  Nikolas Zimmermann  <zimmermann@kde.org>
1278
1279         Reviewed by ggaren.
1280
1281         Fix scrollbars to reappear after the first layouting.
1282
1283         * platform/qt/ScrollViewQt.cpp:
1284         (WebCore::ScrollView::suppressScrollBars):
1285
1286 2006-08-29  Anders Carlsson  <acarlsson@apple.com>
1287
1288         Reviewed by Darin and Geoff.
1289
1290         Move the CF String functions to separate files in platform/cf.
1291         Also, move the files in platform/cfnet to platform/cf.
1292
1293         * WebCore.xcodeproj/project.pbxproj:
1294         * platform/PlatformString.h:
1295         * platform/StringImpl.h:
1296         * platform/cf/StringCF.cpp: Added.
1297         (WebCore::String::String):
1298         * platform/cf/StringImplCF.cpp: Added.
1299         (WebCore::StringImpl::createCFString):
1300         * platform/cfnet/KURLCFNet.cpp: Removed.
1301         * platform/cfnet/ResourceLoaderCFNet.cpp: Removed.
1302         * platform/mac/StringImplMac.mm:
1303         * platform/mac/StringMac.mm:
1304
1305 2006-08-29  Geoffrey Garen  <ggaren@apple.com>
1306
1307         Rolling out a change I included by accident in my last commit.
1308         
1309         * bridge/mac/FrameMac.mm:
1310         (WebCore::FrameMac::passMouseDownEventToWidget):
1311         * platform/mac/SharedTimerMac.cpp:
1312         (WebCore::setSharedTimerFireTime):
1313
1314 2006-08-28  Geoffrey Garen  <ggaren@apple.com>
1315
1316         Reviewed by Maciej.
1317         
1318         Added support for experimental CFNetwork-based loader (not turned on yet).
1319         
1320         While I was there, I did the following platform cleanup:
1321         - Windows now uses USE(WININET) instead of PLATFORM(WIN_OS), to match the
1322           USE(CFNETWORK) idiom.
1323         - Removed some #includes of windows.h in platform-independent headers.
1324         - Changed #ifdef __APPLE__ to PLATFORM(MAC)
1325         - Fixed some build bustage, including case-sensitive filesystem bustage.
1326
1327         * loader/loader.cpp:
1328         (WebCore::Loader::receivedAllData):
1329         * platform/Cursor.h:
1330         * platform/KURL.h:
1331         * platform/ResourceLoader.h:
1332         * platform/ResourceLoaderClient.h:
1333         * platform/ResourceLoaderInternal.h:
1334         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
1335         * platform/cfnet/KURLCFNet.cpp: Added.
1336         (WebCore::KURL::createCFURL):
1337         * platform/cfnet/ResourceLoaderCFNet.cpp: Added.
1338         (WebCore::willSendRequest):
1339         (WebCore::didReceiveChallenge):
1340         (WebCore::didCancelChallenge):
1341         (WebCore::didReceiveResponse):
1342         (WebCore::didReceiveData):
1343         (WebCore::didFinishLoading):
1344         (WebCore::didFail):
1345         (WebCore::willCacheResponse):
1346         (WebCore::addHeadersFromString):
1347         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
1348         (WebCore::ResourceLoader::~ResourceLoader):
1349         (WebCore::arrayFromFormData):
1350         (WebCore::emptyPerform):
1351         (WebCore::runLoaderThread):
1352         (WebCore::ResourceLoader::start):
1353         (WebCore::ResourceLoader::cancel):
1354         * platform/win/CursorWin.cpp:
1355
1356 2006-08-28  Justin Garcia  <justin.garcia@apple.com>
1357
1358         Reviewed by harrison
1359         
1360         <rdar://problem/4700341>
1361         REGRESSION: In new mail message, caret isn't placed at end of line after redoing typing
1362
1363         * editing/ReplaceSelectionCommand.cpp:
1364         (WebCore::ReplaceSelectionCommand::doApply): Added a FIXME.
1365         * page/Frame.cpp:
1366         (WebCore::Frame::reappliedEditing): Restore the endingSelection(), not the startingSelection().
1367
1368 2006-08-28  Tim Omernick  <timo@apple.com>
1369
1370         Reviewed by John Sullivan.
1371
1372         Part of <rdar://problem/4481553> NetscapeMoviePlugIn example code scripting doesn't work in Firefox (4319)
1373         <http://bugzilla.opendarwin.org/show_bug.cgi?id=4319>: NetscapeMoviePlugIn example code scripting doesn't work
1374         in Firefox
1375
1376         No test cases added, since this is essentially a leak fix.
1377
1378         A brief history of NPP_GetValue(), NPObjects, and reference counting.
1379
1380         Earlier versions of WebKit incorrectly interpreted the NPRuntime reference counting rules.  We failed to take
1381         into account the fact that plug-ins are required to retain NPObjects before returning them.  This creates several
1382         classes of interesting plug-ins:
1383
1384         1) Plug-ins tested in WebKit and other browsers.  These plug-ins may have WebKit-specific workarounds to not retain
1385            the returned NPObject, thus avoiding the memory leak in WebKit.
1386
1387         2) Plug-ins tested only in other browsers.  These plug-ins must already retain their NPObjects, since other browsers
1388            implemented the NPRuntime retain/release rules correctly.  These plug-ins likely work in WebKit, but probably leak
1389            NPObjects since WebKit adds its own retain in addition to the plug-in's retain.
1390
1391         3) Plug-ins tested only in WebKit, that fail to retain their NPObjects before returning them.
1392            Such plug-ins are guaranteed to crash in other browsers due to the missing expected retain.  These plug-ins
1393            work in older WebKits because WebKit did not expect the plug-in to retain the NPObject.  Now that our retain
1394            rules match other browsers, these plug-ins may crash due to the difference in retain/release behavior.  We could
1395            potentially detect that situation and correct it here, but I consider it a bug that the plug-in did not follow the
1396            documented NPRuntime reference counting rules.  Furthermore, it is extremely unlikely that someone would develop
1397            a Netscape plug-in and test it *only* in WebKit.  The entire purpose of creating a Netscape plugin is so that it
1398            works in all browsers!
1399
1400         4) Plug-ins tested only in WebKit, that properly retain their NPObjects before returning them.
1401            These plug-ins probably work in other browsers, and leak their NPObjects in older WebKits because of WebKit's
1402            extra retain.  A developer of this type of plug-in is probably unaware of the NPObject leak.  A more savvy developer
1403            would create a plug-in that fits into category #1.
1404         
1405         I am changing our NPP_GetValue() behavior to match Firefox and other browsers -- the plug-in is now expected to retain the
1406         returned NPObject, and the browser is expected to release it when done.  This means that plug-ins in category #3 need to be
1407         changed so that they don't crash in Safari.  However, such plug-ins already crash in every other browser, so I do not feel that
1408         this needs to be handled specifically by WebKit.
1409
1410         * bridge/mac/FrameMac.mm:
1411         Changed -pluginScriptableObject to -createPluginScriptableObject to make clearer the contract that the method must return a
1412         retained NPObject.  Also changed it to return an actual NPObject* instead of a void*.  There is only one caller of this method,
1413         and only one implementor.  Using void* here is a needless abstraction.  It's an NPObject*!  Admit it!
1414         (WebCore::getInstanceForView):
1415         Release the NPObject after creating the bindings instance.  This is the actual bug fix.
1416
1417 2006-08-28  Alice Liu  <alice.liu@apple.com>
1418
1419         Reviewed by Geoff.
1420
1421         Fixed <rdar://problem/4548537> Document.domain and other attributes are blank for an iframe created with document.write
1422
1423         * dom/Document.cpp:
1424         (WebCore::Document::open):
1425         set the document's url to the parent's url and re-located the code that does this to occur before calling the frame's didExplicitOpen()
1426         * page/Frame.cpp:
1427         (WebCore::Frame::didExplicitOpen):
1428         set the frame's url to the document's url
1429
1430 2006-08-28  Brady Eidson  <beidson@apple.com>
1431
1432         Reviewed by Adele and Adam
1433
1434         Added an optimization to return early if there's no replacements to be made
1435
1436         * platform/StringImpl.cpp:
1437         (WebCore::StringImpl::replace):
1438
1439 2006-08-28  Nikolas Zimmermann  <zimmermann@kde.org>
1440
1441         Reviewed and landed by ap.
1442
1443         Fixes one chunk of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10604
1444         Provide stub implementation of RenderPopupMenuQt.
1445
1446         * CMakeLists.txt:
1447         * platform/qt/RenderPopupMenuQt.cpp: Added.
1448         (WebCore::RenderPopupMenuQt::RenderPopupMenuQt):
1449         (WebCore::RenderPopupMenuQt::~RenderPopupMenuQt):
1450         (WebCore::RenderPopupMenuQt::clear):
1451         (WebCore::RenderPopupMenuQt::populate):
1452         (WebCore::RenderPopupMenuQt::showPopup):
1453         (WebCore::RenderPopupMenuQt::hidePopup):
1454         (WebCore::RenderPopupMenuQt::addSeparator):
1455         (WebCore::RenderPopupMenuQt::addGroupLabel):
1456         (WebCore::RenderPopupMenuQt::addOption):
1457         * platform/qt/RenderPopupMenuQt.h: Added.
1458         * platform/qt/RenderThemeQt.cpp:
1459         (WebCore::RenderThemeQt::systemFont):
1460         (WebCore::RenderThemeQt::createPopupMenu):
1461
1462 2006-08-28  Nikolas Zimmermann  <zimmermann@kde.org>
1463
1464         Reviewed and landed by ap.
1465
1466         Fixes one chunk of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10604
1467         Offer QString -> DeprecatedString conversion.
1468
1469         * platform/DeprecatedString.h:
1470         * platform/qt/StringQt.cpp:
1471         (WebCore::DeprecatedString::DeprecatedString):
1472
1473 2006-08-28  Nikolas Zimmermann  <zimmermann@kde.org>
1474
1475         Reviewed by Tim Hatcher.
1476         
1477         Fixes one chunk of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10604
1478
1479         * platform/qt/RenderThemeQt.cpp:
1480         (WebCore::RenderThemeQt::systemFont):
1481         Remove annoying notImplemented() usage in systemFont()
1482
1483 2006-08-28  David Harrison  <harrison@apple.com>
1484
1485         Reviewed by Darin.
1486
1487         <rdar://problem/3942647> Support AXStyleTextMarkerRangeForTextMarker parameterized attribute
1488
1489         * bridge/mac/WebCoreAXObject.mm:
1490         (-[WebCoreAXObject accessibilityParameterizedAttributeNames]):
1491         Add AXStyleTextMarkerRangeForTextMarker.
1492         
1493         (startOfStyleRange):
1494         (endOfStyleRange):
1495         Return first/last VisiblePosition in range having the same style has the specified VisiblePosition.
1496
1497         (-[WebCoreAXObject doAXStyleTextMarkerRangeForTextMarker:]):
1498         Return AXTextMarkerRange for startOfStyleRange/endOfStyleRange of the specified AXTextMarker.
1499         
1500         (-[WebCoreAXObject accessibilityAttributeValue:forParameter:]):
1501         Call doAXStyleTextMarkerRangeForTextMarker for AXStyleTextMarkerRangeForTextMarker.
1502
1503 2006-08-28  David Harrison  <harrison@apple.com>
1504
1505         Reviewed by Darin.
1506
1507         <rdar://problem/4517383> Hide all images used for spacing purpose in AX
1508
1509         * bridge/mac/WebCoreAXObject.mm:
1510         (-[WebCoreAXObject accessibilityIsIgnored]):
1511         Check for one-dimensional image
1512         Check whether rendered image was stretched from one-dimensional file image
1513
1514 2006-08-27  Brady Eidson  <beidson@apple.com>
1515
1516         Reviewed by Maciej
1517
1518         Rewrote StringImpl::replace(UChar, StringImpl*)
1519
1520         * platform/StringImpl.cpp:
1521         (WebCore::StringImpl::replace):
1522
1523 2006-08-27  Sam Weinig  <sam.weinig@gmail.com>
1524
1525         Reviewed by Tim H.
1526
1527         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=4624
1528           WebCore needs autogenerated Obj-C DOM bindings
1529
1530           First round of auto-generated Objective C DOM bindings, starting
1531           with the DOM Core.
1532
1533         * DerivedSources.make:
1534         * WebCore.xcodeproj/project.pbxproj:
1535         * bindings/objc/DOM.mm:
1536         (-[DOMNode description]):
1537         (-[DOMNode KJS::Bindings::]):
1538         (-[DOMNode dispatchEvent:]):
1539         (-[DOMNamedNodeMap _initWithNamedNodeMap:]):
1540         (+[DOMNamedNodeMap _namedNodeMapWith:]):
1541         (-[DOMNodeList _initWithNodeList:]):
1542         (+[DOMNodeList _nodeListWith:]):
1543         (-[DOMImplementation _initWithDOMImplementation:]):
1544         (+[DOMImplementation _DOMImplementationWith:]):
1545         (-[DOMImplementation _DOMImplementation]):
1546         (+[DOMDocumentFragment _documentFragmentWith:]):
1547         (-[DOMDocumentFragment _fragment]):
1548         (-[DOMDocument createCSSStyleDeclaration]):
1549         (+[DOMDocument _documentWith:]):
1550         (-[DOMDocument _document]):
1551         (-[DOMDocument _ownerElement]):
1552         (+[DOMAttr _attrWith:]):
1553         (-[DOMAttr _attr]):
1554         (+[DOMDocumentType _documentTypeWith:WebCore::]):
1555         (-[DOMDocumentType WebCore::]):
1556         (+[DOMText _textWith:WebCore::]):
1557         (+[DOMComment _commentWith:WebCore::]):
1558         (+[DOMCDATASection _CDATASectionWith:WebCore::]):
1559         (+[DOMProcessingInstruction _processingInstructionWith:WebCore::]):
1560         (+[DOMEntityReference _entityReferenceWith:WebCore::]):
1561         * bindings/objc/DOMCSS.h:
1562         * bindings/objc/DOMCSS.mm:
1563         * bindings/objc/DOMCore.h:
1564         * bindings/objc/DOMEvents.h:
1565         * bindings/objc/DOMEvents.mm:
1566         * bindings/objc/DOMExtensions.h:
1567         * bindings/objc/DOMHTML.mm:
1568         (+[DOMHTMLDocument _HTMLDocumentWith:WebCore::]):
1569         * bindings/objc/DOMHTMLInternal.h:
1570         * bindings/objc/DOMImplementationFront.h:
1571         * bindings/objc/DOMInternal.h:
1572         * bindings/objc/DOMNode.h: Added.
1573         * bindings/objc/DOMNode.mm: Added.
1574         (-[DOMNode dealloc]):
1575         (-[DOMNode finalize]):
1576         (-[DOMNode nodeName]):
1577         (-[DOMNode nodeValue]):
1578         (-[DOMNode setNodeValue:]):
1579         (-[DOMNode nodeType]):
1580         (-[DOMNode parentNode]):
1581         (-[DOMNode childNodes]):
1582         (-[DOMNode firstChild]):
1583         (-[DOMNode lastChild]):
1584         (-[DOMNode previousSibling]):
1585         (-[DOMNode nextSibling]):
1586         (-[DOMNode attributes]):
1587         (-[DOMNode ownerDocument]):
1588         (-[DOMNode insertBefore::]):
1589         (-[DOMNode replaceChild::]):
1590         (-[DOMNode removeChild:]):
1591         (-[DOMNode appendChild:]):
1592         (-[DOMNode hasChildNodes]):
1593         (-[DOMNode cloneNode:]):
1594         (-[DOMNode normalize]):
1595         (-[DOMNode isSupported::]):
1596         (-[DOMNode namespaceURI]):
1597         (-[DOMNode prefix]):
1598         (-[DOMNode setPrefix:]):
1599         (-[DOMNode localName]):
1600         (-[DOMNode hasAttributes]):
1601         (-[DOMNode isSameNode:]):
1602         (-[DOMNode isEqualNode:]):
1603         (-[DOMNode isDefaultNamespace:]):
1604         (-[DOMNode lookupPrefix:]):
1605         (-[DOMNode lookupNamespaceURI:]):
1606         (-[DOMNode textContent]):
1607         (-[DOMNode setTextContent:]):
1608         (-[DOMNode boundingBox]):
1609         (-[DOMNode lineBoxRects]):
1610         * bindings/objc/DOMObject.h: Added.
1611         * bindings/objc/DOMObject.mm: Added.
1612         (-[DOMObject init]):
1613         (-[DOMObject dealloc]):
1614         (-[DOMObject finalize]):
1615         (-[DOMObject copyWithZone:]):
1616         (-[DOMObject sheet]):
1617         * bindings/objc/DOMPrivate.h:
1618         * bindings/objc/DOMRange.h:
1619         * bindings/objc/DOMStylesheets.h:
1620         * bindings/objc/DOMTraversal.h:
1621         * bindings/objc/DOMViews.h:
1622         * bindings/objc/DOMViews.mm:
1623         * bindings/objc/DOMXPath.h:
1624         * bindings/objc/DOMXPath.mm:
1625         * bindings/scripts/CodeGenerator.pm:
1626         * bindings/scripts/CodeGeneratorJS.pm:
1627         * bindings/scripts/CodeGeneratorObjC.pm: Added.
1628         * dom/Attr.idl:
1629         * dom/CDATASection.idl: Added.
1630         * dom/Comment.idl: Added.
1631         * dom/DOMImplementation.idl:
1632         * dom/Document.idl:
1633         * dom/Element.idl:
1634         * dom/EntityReference.idl: Added.
1635         * dom/NamedNodeMap.idl: Added.
1636         * dom/NodeList.idl: Added.
1637         * dom/ProcessingInstruction.idl:
1638
1639 2006-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
1640
1641         Reviewed by Tim H.
1642
1643         Fix crash in LayoutTests/css1/font_properties/font.html,
1644         by implementing FontData::smallCapsFontData.
1645
1646         * platform/qt/FontDataQt.cpp:
1647         (WebCore::FontData::platformDestroy):
1648         (WebCore::FontData::smallCapsFontData):
1649
1650 2006-08-27  Brady Eidson  <beidson@apple.com>
1651
1652         Reviewed by Maciej
1653
1654         Plugged a leak in StringImpl::replace()
1655
1656         * platform/StringImpl.cpp:
1657         (WebCore::StringImpl::replace):
1658
1659 2006-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
1660
1661         Reviewed and landed by Anders.
1662
1663         Remove most annoying notImplemented() usages and
1664         implement some missing ScrollViewQt functions.
1665         Much nicer output when invoking run-webkit-tests.
1666
1667         * platform/qt/FrameQt.cpp:
1668         (WebCore::FrameQt::saveDocumentState):
1669         (WebCore::FrameQt::restoreDocumentState):
1670         (WebCore::FrameQt::clearUndoRedoOperations):
1671         (WebCore::FrameQt::partClearedInBegin):
1672         * platform/qt/ResourceLoaderManager.cpp:
1673         (WebCore::headerCallback):
1674         (WebCore::ResourceLoaderManager::downloadTimerCallback):
1675         * platform/qt/ScrollViewQt.cpp:
1676         (WebCore::ScrollView::updateContents):
1677         (WebCore::ScrollView::suppressScrollBars):
1678         (WebCore::ScrollView::setStaticBackground):
1679         (WebCore::ScrollView::addChild):
1680         (WebCore::ScrollView::removeChild):
1681         * platform/qt/TemporaryLinkStubs.cpp:
1682         (WebCore::historyContains):
1683         (WebCore::CheckCacheObjectStatus):
1684         (WebCore::CheckIfReloading):
1685         (loadResourceIntoArray):
1686         (WebCore::PlugInInfoStore::supportsMIMEType):
1687
1688 2006-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
1689
1690         Reviewed and landed by Anders.
1691
1692         Fix Qt build (add SVGMetaDataElement.cpp to build system)
1693
1694         * CMakeLists.txt:
1695
1696 2006-08-27  Eric Seidel  <eric@eseidel.com>
1697
1698         Reviewed by andersca.
1699
1700         No logic changes.  Just cleanup.
1701
1702         * ksvg2/svg/SVGAngle.cpp:
1703         (SVGAngle::SVGAngle):
1704         (SVGAngle::unitType):
1705         (SVGAngle::valueAsString):
1706         (SVGAngle::newValueSpecifiedUnits):
1707         (SVGAngle::convertToSpecifiedUnits):
1708         * ksvg2/svg/SVGAngle.h:
1709         * ksvg2/svg/SVGLength.cpp:
1710         (WebCore::SVGLength::unitType):
1711         (WebCore::SVGLength::newValueSpecifiedUnits):
1712         (WebCore::SVGLength::convertToSpecifiedUnits):
1713         (WebCore::SVGLength::updateValue):
1714         (WebCore::SVGLength::updateValueInSpecifiedUnits):
1715         * ksvg2/svg/SVGLength.h:
1716         * platform/BitmapImage.cpp: Removed.
1717         * platform/BitmapImage.h: Removed.
1718
1719 2006-08-27  Brady Eidson  <beidson@apple.com>
1720
1721         Reviewed by Anders
1722
1723         -Changed all of the commonly used queries to keep around pre-prepared statements and bind
1724         their arguments instead of constructing a new, messy, string appended statement each time
1725         -Changed some code in pruneUnretainedIconsOnStartup regarding transactions
1726
1727         * loader/icon/IconDatabase.cpp:
1728         (WebCore::IconDatabase::IconDatabase): Initializers
1729         (WebCore::IconDatabase::close): Wipe all the preprepared statements
1730         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Better handling of transactions
1731         (WebCore::readySQLStatement): Make sure a preprepared statement is ready to go for a fooQuery()
1732         (WebCore::IconDatabase::pageURLTableIsEmptyQuery): Added a comment
1733         (WebCore::IconDatabase::imageDataForIconURLQuery): Use preprepared statement + binding
1734         (WebCore::IconDatabase::timeStampForIconURLQuery): ditto
1735         (WebCore::IconDatabase::iconURLForPageURLQuery): ditto
1736         (WebCore::IconDatabase::forgetPageURLQuery): ditto
1737         (WebCore::IconDatabase::setIconIDForPageURLQuery): ditto
1738         (WebCore::IconDatabase::getIconIDForIconURLQuery): ditto
1739         (WebCore::IconDatabase::addIconForIconURLQuery): ditto
1740         (WebCore::IconDatabase::hasIconForIconURLQuery): ditto
1741         * loader/icon/IconDatabase.h: Added fooQuery() and *m_fooStatements
1742         * loader/icon/SQLStatement.h:
1743         (WebCore::SQLStatement::database): Added
1744
1745 2006-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
1746
1747         Reviewed by Eric.
1748
1749         Fix switch logic.
1750
1751         * platform/qt/ScrollViewQt.cpp:
1752         (WebCore::ScrollView::setHScrollBarMode):
1753         (WebCore::ScrollView::setVScrollBarMode):
1754
1755 2006-08-27  Rob Buis  <buis@kde.org>
1756
1757         Reviewed by Eric.
1758
1759         http://bugzilla.opendarwin.org/show_bug.cgi?id=10557
1760         KCanvasPath should be replace by platform/Path
1761
1762         Refactoring out the KCanvasPath class.
1763
1764         * CMakeLists.txt:
1765         * WebCore.xcodeproj/project.pbxproj:
1766         * kcanvas/KCanvasCreator.cpp:
1767         (WebCore::KCanvasCreator::createRoundedRectangle):
1768         (WebCore::KCanvasCreator::createRectangle):
1769         (WebCore::KCanvasCreator::createEllipse):
1770         (WebCore::KCanvasCreator::createCircle):
1771         (WebCore::KCanvasCreator::createLine):
1772         * kcanvas/KCanvasCreator.h:
1773         * kcanvas/KCanvasPath.cpp: Removed.
1774         * kcanvas/KCanvasPath.h: Removed.
1775         * kcanvas/KCanvasResources.cpp:
1776         (WebCore::operator<<):
1777         (WebCore::KCanvasResource::clients):
1778         (WebCore::KCanvasResource::invalidate):
1779         (WebCore::KCanvasClipper::addClipData):
1780         * kcanvas/KCanvasResources.h:
1781         (WebCore::KCClipData::windRule):
1782         (WebCore::KCClipDataList::KCClipDataList):
1783         (WebCore::KCClipDataList::addPath):
1784         * kcanvas/KCanvasTreeDebug.cpp:
1785         (WebCore::operator<<):
1786         * kcanvas/RenderPath.cpp:
1787         (WebCore::RenderPath::fillContains):
1788         (WebCore::RenderPath::relativeBBox):
1789         (WebCore::RenderPath::setPath):
1790         (WebCore::RenderPath::path):
1791         (WebCore::RenderPath::paint):
1792         (WebCore::RenderPath::nodeAtPoint):
1793         * kcanvas/RenderPath.h:
1794         * kcanvas/device/KRenderingDevice.h:
1795         * kcanvas/device/KRenderingFillPainter.cpp:
1796         (WebCore::KRenderingFillPainter::fillRule):
1797         (WebCore::KRenderingFillPainter::setFillRule):
1798         * kcanvas/device/KRenderingFillPainter.h:
1799         * kcanvas/device/qt/KCanvasClipperQt.cpp:
1800         (WebCore::KCanvasClipperQt::applyClip):
1801         * kcanvas/device/qt/KCanvasPathQt.cpp: Removed.
1802         * kcanvas/device/qt/KCanvasPathQt.h: Removed.
1803         * kcanvas/device/qt/KRenderingDeviceQt.cpp:
1804         (WebCore::KRenderingDeviceContextQt::addPath):
1805         (WebCore::KRenderingDeviceContextQt::setFillRule):
1806         (WebCore::KRenderingDeviceQt::createItem):
1807         * kcanvas/device/qt/KRenderingDeviceQt.h:
1808         * kcanvas/device/qt/RenderPathQt.cpp:
1809         (WebCore::RenderPathQt::drawMarkersIfNeeded):
1810         (WebCore::RenderPathQt::strokeContains):
1811         (WebCore::getPathStroke):
1812         (WebCore::RenderPathQt::strokeBBox):
1813         * kcanvas/device/qt/RenderPathQt.h:
1814         * kcanvas/device/quartz/KCanvasItemQuartz.h:
1815         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
1816         (WebCore::KCanvasItemQuartz::drawMarkersIfNeeded):
1817         (WebCore::KCanvasItemQuartz::strokeBBox):
1818         (WebCore::KCanvasItemQuartz::strokeContains):
1819         * kcanvas/device/quartz/KCanvasPathQuartz.h: Removed.
1820         * kcanvas/device/quartz/KCanvasPathQuartz.mm: Removed.
1821         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
1822         (WebCore::KCanvasClipperQuartz::applyClip):
1823         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
1824         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1825         (WebCore::KRenderingDeviceContextQuartz::addPath):
1826         (WebCore::KRenderingDeviceQuartz::createItem):
1827         * kcanvas/device/quartz/QuartzSupport.h:
1828         * kcanvas/device/quartz/QuartzSupport.mm:
1829         (WebCore::scratchContext):
1830         (WebCore::strokeBoundingBox):
1831         (WebCore::pathContainsPoint):
1832         * ksvg2/css/SVGCSSParser.cpp:
1833         (WebCore::CSSParser::parseSVGValue):
1834         * ksvg2/css/SVGCSSStyleSelector.cpp:
1835         (WebCore::CSSStyleSelector::applySVGProperty):
1836         * ksvg2/css/SVGRenderStyle.h:
1837         (WebCore::SVGRenderStyle::InheritedFlags::):
1838         * ksvg2/css/SVGRenderStyleDefs.h:
1839         * ksvg2/misc/KCanvasRenderingStyle.cpp:
1840         (WebCore::KSVGPainterFactory::fillPainter):
1841         * ksvg2/svg/SVGCircleElement.cpp:
1842         (SVGCircleElement::toPathData):
1843         * ksvg2/svg/SVGCircleElement.h:
1844         * ksvg2/svg/SVGClipPathElement.cpp:
1845         (SVGClipPathElement::canvasResource):
1846         * ksvg2/svg/SVGEllipseElement.cpp:
1847         (WebCore::SVGEllipseElement::toPathData):
1848         * ksvg2/svg/SVGEllipseElement.h:
1849         * ksvg2/svg/SVGGradientElement.cpp:
1850         (SVGGradientElement::notifyAttributeChange):
1851         * ksvg2/svg/SVGImageElement.cpp:
1852         * ksvg2/svg/SVGLineElement.cpp:
1853         (SVGLineElement::toPathData):
1854         * ksvg2/svg/SVGLineElement.h:
1855         * ksvg2/svg/SVGMaskElement.cpp:
1856         * ksvg2/svg/SVGPathElement.cpp:
1857         (WebCore::SVGPathElement::toPathData):
1858         * ksvg2/svg/SVGPathElement.h:
1859         * ksvg2/svg/SVGPatternElement.cpp:
1860         (WebCore::SVGPatternElement::notifyClientsToRepaint):
1861         * ksvg2/svg/SVGPolygonElement.cpp:
1862         (SVGPolygonElement::toPathData):
1863         * ksvg2/svg/SVGPolygonElement.h:
1864         * ksvg2/svg/SVGPolylineElement.cpp:
1865         (SVGPolylineElement::toPathData):
1866         * ksvg2/svg/SVGPolylineElement.h:
1867         * ksvg2/svg/SVGRectElement.cpp:
1868         (WebCore::SVGRectElement::toPathData):
1869         * ksvg2/svg/SVGRectElement.h:
1870         * ksvg2/svg/SVGStyledElement.cpp:
1871         (WebCore::SVGStyledElement::createRenderer):
1872         * ksvg2/svg/SVGStyledElement.h:
1873         (WebCore::SVGStyledElement::toPathData):
1874         * ksvg2/svg/SVGTextContentElement.cpp:
1875         * ksvg2/svg/SVGTextElement.cpp:
1876         * platform/Path.h:
1877         (WebCore::):
1878         (WebCore::Path::setWindingRule):
1879         (WebCore::Path::windingRule):
1880         * platform/cg/PathCG.cpp:
1881         (WebCore::Path::contains):
1882         (WebCore::Path::isEmpty):
1883         (WebCore::CGPathToCFStringApplierFunction):
1884         (WebCore::CFStringFromCGPath):
1885         (WebCore::Path::debugString):
1886         * platform/qt/FrameQt.cpp:
1887         (WebCore::FrameQt::openURL):
1888         * platform/qt/PathQt.cpp:
1889         (WebCore::Path::contains):
1890         (WebCore::Path::isEmpty):
1891         (WebCore::Path::debugString):
1892
1893 2006-08-26  Eric Seidel  <eric@eseidel.com>
1894
1895         Reviewed by hyatt.
1896
1897         pointer-events attribute does not work.
1898         http://bugzilla.opendarwin.org/show_bug.cgi?id=10415
1899
1900         * kcanvas/RenderPath.cpp:
1901         (WebCore::RenderPath::pointerEventsHitRules): new function to contain pointer-events hit logic
1902         (WebCore::RenderPath::nodeAtPoint): respect pointer-events property
1903         * kcanvas/RenderPath.h:
1904         (WebCore::RenderPath::PointerEventsHitRules::PointerEventsHitRules):
1905         * ksvg2/css/SVGCSSParser.cpp:
1906         (WebCore::CSSParser::parseSVGValue):
1907         * ksvg2/svg/SVGPaint.cpp: Fix this to use a real enum value
1908         (WebCore::SVGPaint::SVGPaint):
1909         (WebCore::SVGPaint::paintType):
1910         (WebCore::SVGPaint::uri):
1911         (WebCore::SVGPaint::setUri):
1912         (WebCore::SVGPaint::setPaint):
1913         * ksvg2/svg/SVGPaint.h:
1914
1915 2006-08-27  Rob Buis  <buis@kde.org>
1916
1917         Reviewed by Eric.
1918
1919         http://bugzilla.opendarwin.org/show_bug.cgi?id=10558
1920         SVG should have support for <metadata> element
1921
1922         Add support for metadata tag.
1923
1924         * DerivedSources.make:
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * ksvg2/bindings/js/JSSVGElementWrapperFactory.cpp:
1927         * ksvg2/svg/SVGMetadataElement.cpp: Added.
1928         (SVGMetadataElement::SVGMetadataElement):
1929         (SVGMetadataElement::~SVGMetadataElement):
1930         * ksvg2/svg/SVGMetadataElement.h: Added.
1931         * ksvg2/svg/SVGMetadataElement.idl: Added.
1932         * ksvg2/svg/svgtags.in:
1933
1934 2006-08-26  Nikolas Zimmermann  <zimmermann@kde.org>
1935
1936         Reviewed by Eric.
1937
1938         Daily Qt build fixes :-)
1939
1940         * platform/qt/GraphicsContextQt.cpp:
1941         (WebCore::GraphicsContext::drawConvexPolygon):
1942         * platform/qt/ImageQt.cpp:
1943         (WebCore::Image::initPlatformData):
1944         (WebCore::Image::invalidatePlatformData):
1945         (WebCore::Image::loadPlatformResource):
1946
1947 2006-08-26  David Hyatt  <hyatt@apple.com>
1948
1949         Fix the ifdef in Path.h to be CG.
1950
1951         * platform/Path.h:
1952
1953 2006-08-26  David Hyatt  <hyatt@apple.com>
1954
1955         Fix Mac build bustage (lots of float/int confusion).  I am not sure
1956         whether rounding was desired or not... this is just a band-aid to get
1957         the build working again.
1958
1959         * rendering/RenderThemeMac.mm:
1960         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
1961         (WebCore::RenderThemeMac::paintMenuListButton):
1962         (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
1963
1964 2006-08-25  David Hyatt  <hyatt@apple.com>
1965
1966         More refactoring of image to disentangle graphics (e.g., Cairo) from
1967         platform (e.g., Windows).
1968
1969         * WebCore.vcproj/WebCore/WebCore.vcproj:
1970         Add ImageWin to project.
1971
1972         * loader/Cache.cpp:
1973         (WebCore::Cache::init):
1974         * loader/icon/IconDataCache.cpp:
1975         (WebCore::IconDataCache::loadImageFromResource):
1976         Renamed loadResource to loadPlatformResource to try to make it more clear
1977         that this call is implemented on each OS (and not by graphics libraries).
1978
1979         * platform/Image.cpp:
1980         (WebCore::Image::Image):
1981         (WebCore::Image::~Image):
1982         (WebCore::Image::invalidateData):
1983         (WebCore::Image::size):
1984         (WebCore::Image::setData):
1985         (WebCore::Image::setNativeData):
1986         Fix up the PDF code to not be considered platform data any more, since
1987         PDF rendering is not for a specific OS.
1988
1989         Renamed the methods that set OS-specific data (like NSImage) to PlatformData
1990         instead of NativeData.
1991
1992         * platform/Image.h:
1993         Shifted the PDF members into CG defines.  Made CGImageRef a CG define.
1994         Renamed methods to reflect that they are OS-specific and not
1995         graphics-library-specific.
1996        
1997         * platform/cairo/ImageCairo.cpp:
1998         Removed the platform data methods.  Other platforms besides Windows that
1999         use Cairo will need to account for this change by adding these methods
2000         to their OS Image***.cpp file.
2001
2002         * platform/cg/ImageCG.cpp:
2003         (WebCore::Image::drawTiled):
2004         Add FIXMEs to the wkpattern stuff.
2005
2006         * platform/cg/PDFDocumentImage.cpp:
2007         Shouldn't have #imports in .cpp.
2008
2009         * platform/mac/ImageMac.mm:
2010         (WebCore::Image::initPlatformData):
2011         (WebCore::Image::invalidatePlatformData):
2012         (WebCore::Image::loadPlatformResource):
2013         (WebCore::Image::getTIFFRepresentation):
2014         Add the platform data initializers to the Mac Image file.   Move the
2015         TIFF representation there as well, since this is only used by Mac code.
2016
2017         * platform/win/ImageWin.cpp: Added.
2018         (WebCore::Image::initPlatformData):
2019         (WebCore::Image::invalidatePlatformData):
2020         (WebCore::Image::loadPlatformResource):
2021         (WebCore::Image::supportsType):
2022         Similar work for Windows.  Add stubs for possible future HBITMAP returns
2023         in the platform data methods.
2024
2025         * rendering/RenderLayer.cpp:
2026         (WebCore::RenderLayer::paintResizeControl):
2027         * rendering/RenderThemeMac.mm:
2028         (WebCore::RenderThemeMac::paintResizeControl):
2029         loadResource -> loadPlatformResource
2030
2031 2006-08-26  Adam Roben  <aroben@apple.com>
2032
2033         Rubber-stamped by Adele.
2034
2035         Fixed build.
2036
2037         * platform/cairo/GraphicsContextCairo.cpp:
2038         (WebCore::GraphicsContext::drawConvexPolygon):
2039
2040 2006-08-25  Adele Peterson  <adele@apple.com>
2041
2042         Patch by Francisco, Reviewed by me.
2043
2044         Preparation for switch to new text field implementation of password field.
2045
2046         Added -webkit-text-security property.
2047
2048         Tests: updated fast/css/computed-style-expected.txt
2049
2050         * css/CSSPropertyNames.in: Added -webkit-text-security.
2051         * css/CSSComputedStyleDeclaration.cpp:
2052         (WebCore::):
2053         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added cases for textSecurity.
2054         * css/cssparser.cpp: (WebCore::CSSParser::parseValue): ditto.
2055         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::applyProperty): ditto.
2056         * css/html4.css: Added style for password field to use -webkit-text-security.
2057
2058         * html/HTMLInputElement.cpp: Check appearance property to decide which renderer to use.
2059         (WebCore::HTMLInputElement::selectionStart):
2060         (WebCore::HTMLInputElement::selectionEnd):
2061         (WebCore::HTMLInputElement::setSelectionStart):
2062         (WebCore::HTMLInputElement::setSelectionEnd):
2063         (WebCore::HTMLInputElement::select):
2064         (WebCore::HTMLInputElement::setSelectionRange):
2065         (WebCore::HTMLInputElement::createRenderer):
2066         * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isNonWidgetTextField): Added check for password.
2067
2068         * platform/StringImpl.cpp: (WebCore::StringImpl::secure): Added. Converts a string to replace 
2069          characters with one character, like a bullet.
2070         * platform/StringImpl.h:
2071
2072         * rendering/RenderStyle.cpp:
2073         (WebCore::StyleCSS3InheritedData::StyleCSS3InheritedData): Initialize textSecurity.
2074         (WebCore::RenderStyle::diff): Added case for textSecurity.
2075         * rendering/RenderStyle.h:
2076         (WebCore::):
2077         (WebCore::RenderStyle::textSecurity): Added.
2078         (WebCore::RenderStyle::setTextSecurity): Added.
2079         (WebCore::RenderStyle::initialTextSecurity): Added.
2080         * rendering/RenderText.cpp:
2081         (WebCore::RenderText::setStyle): Added case for textSecurity.
2082         (WebCore::RenderText::setText): ditto.
2083
2084 2006-08-25  Adele Peterson  <adele@apple.com>
2085
2086         Reviewed by Hyatt.
2087
2088         Enable styling for popup menus. Also fixed baseline calculation for buttons and selects.
2089
2090         Tests:   fast/forms/select-baseline.html
2091                  fast/borders/borderRadiusInvalidColor.html
2092         updated: fast/forms/select-style-expected.txt and more...
2093
2094         * css/html4.css: Added style rules for styled select elements.
2095
2096         * platform/GraphicsContext.h: Added argument for antialiasing.
2097         * platform/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawConvexPolygon): ditto.
2098         * platform/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawConvexPolygon): ditto.
2099
2100         * rendering/RenderObject.cpp:
2101         (WebCore::RenderObject::drawBorderArc): Added textColor argument so this can be used when the border color is invalid.
2102         (WebCore::RenderObject::drawBorder): Removed invalidisInvert since its dead code 
2103          (any callers that set this to true were already ensuring that their color was valid).
2104          Updated drawConvexPolygon call to use FloatPoints instead of IntPoints.
2105         (WebCore::RenderObject::paintBorder): Updated to remove invalidisInvert argument from drawBorder call.
2106         (WebCore::RenderObject::paintOutline): ditto.
2107         * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintOutlineForLine): ditto.
2108         * rendering/RenderObject.h: Updated arguments for drawBorder and drawBorderArc.
2109
2110         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::getBaselineOfLastLineBox): Changed isRootLineBox argument to true when setting line height.
2111           Added case for when there's no children to check for hasLineIfEmpty.
2112         * rendering/RenderBlock.h:
2113         * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Changed isRootLineBox argument to true when setting line height.
2114         * rendering/RenderButton.h: (WebCore::RenderButton::hasLineIfEmpty): Added so buttons always get a line height.
2115         * rendering/RenderMenuList.h: (WebCore::RenderMenuList::hasLineIfEmpty): ditto.
2116         * rendering/RenderFlexibleBox.cpp:
2117         (WebCore::RenderFlexibleBox::layoutHorizontalBox): Added code to check hasLineIfEmpty to give flex boxes line height.
2118         (WebCore::RenderFlexibleBox::layoutVerticalBox): ditto.
2119
2120         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): Moved the appearance adjustment code into adjust style.
2121         * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Lets the theme paint "decorations", like the arrow control and gradients
2122          immediately after painting the background.
2123
2124         * rendering/RenderTheme.cpp:
2125         (WebCore::RenderTheme::adjustStyle): This now checks whether the control is styled, and adjusts the appearance property appropriately.
2126         For styled selects, instead of setting the appearance to none, which is what we do for other styled controls, we set the appearance
2127         to MenulistButtonAppearance, which indicates that we will draw the arrow controls and button appearance in the engine.
2128         (WebCore::RenderTheme::paintDecorations): Added. Paints MenulistButtonAppearance in a different function, 
2129          so the arrow control will draw at the right time (after the background).
2130         (WebCore::RenderTheme::paint): Added case for MenulistButtonAppearance.
2131         (WebCore::RenderTheme::paintBorderOnly): ditto.
2132         (WebCore::RenderTheme::isControlContainer): Removed cases for MenuListAppearance and MenulistButtonAppearance since the baseline is no longer provided by the theme.
2133         (WebCore::RenderTheme::adjustMenuListButtonStyle): Added.
2134         * rendering/RenderTheme.h: (WebCore::RenderTheme::paintMenuListButton): Added.
2135
2136         * rendering/RenderThemeMac.h:
2137         * rendering/RenderThemeMac.mm:
2138         (WebCore::RenderThemeMac::isControlStyled): Removed code that made selects unstyle-able.
2139         (WebCore::RenderThemeMac::baselinePosition): Removed cases for MenuListAppearance and MenulistButtonAppearance.
2140         (WebCore::RenderThemeMac::popupButtonPadding): Added top and bottom padding so empty popups have the right baseline.
2141         (WebCore::TopGradientInterpolate): Added.
2142         (WebCore::BottomGradientInterpolate): Added.
2143         (WebCore::MainGradientInterpolate): Added.
2144         (WebCore::RenderThemeMac::paintMenuListButtonGradients): Added.  Draws gradients for styled popup menu button appearance.
2145         (WebCore::RenderThemeMac::paintMenuListButton): Calls paintMenuListButtonGradients, and draws arrow control.
2146         (WebCore::RenderThemeMac::adjustMenuListButtonStyle): Added to set padding and border radius to account for the arrow control size and font size.
2147
2148 2006-08-25  Brady Eidson  <beidson@apple.com>
2149
2150         Reviewed by Adam
2151
2152         Changed some time()-related code to be more platform independent
2153
2154         * loader/icon/IconDatabase.cpp:
2155         (WebCore::IconDatabase::isIconExpiredForIconURL):
2156         (WebCore::IconDatabase::getOrCreateIconDataCache):
2157         (WebCore::IconDatabase::setIconDataForIconURL):
2158
2159 2006-08-25  David Harrison  <harrison@apple.com>
2160
2161         Reviewed by Geoff.
2162
2163         <rdar://problem/4416432> Radio buttons and Checkboxes in AXWebAreas don't fill in their AXTitle attribute
2164
2165         * bridge/mac/WebCoreAXObject.mm:
2166         (labelForElement):
2167         New. Returns the HTMLLabelElement, if any, for the specified Element.
2168         
2169         (-[WebCoreAXObject title]):
2170         For input elements, return the innerHTML() of the labelForElement().
2171
2172 2006-08-25  Brady Eidson  <beidson@apple.com>
2173
2174         Reviewed by Tim Hatcher
2175
2176         Changed some debugging-only code to be more platform independent
2177
2178         * WebCore.xcodeproj/project.pbxproj:
2179         * loader/icon/IconDatabase.cpp:
2180         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
2181         (WebCore::IconDatabase::syncDatabase):
2182
2183 2006-08-25  Nikolas Zimmermann  <zimmermann@kde.org>
2184
2185         Reviewed/landed by Adam.
2186
2187         Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10561
2188         Qt platform build fixes.
2189
2190         * platform/qt/FrameQt.h:
2191         * platform/qt/ScreenQt.cpp:
2192         (WebCore::qwidgetForPage):
2193         (WebCore::screenRect):
2194         (WebCore::screenDepth):
2195         (WebCore::usableScreenRect):
2196         * platform/qt/TemporaryLinkStubs.cpp:
2197         (WebCore::screenDepthPerComponent):
2198         (WebCore::screenIsMonochrome):
2199         * platform/qt/WidgetQt.cpp:
2200
2201 2006-08-25  Nikolas Zimmermann  <zimmermann@kde.org>
2202
2203         Reviewed/landed by Adam.
2204
2205         Finally fix font caching. WebKit+Qt now works
2206         out of the box without any further patches :-)
2207
2208         * platform/qt/FontDataQt.cpp:
2209         (WebCore::FontData::platformDestroy):
2210         * platform/qt/FontPlatformData.h:
2211         * platform/qt/FontPlatformDataQt.cpp:
2212         (WebCore::FontPlatformData::FontPlatformData):
2213         (WebCore::FontPlatformData::isFixedPitch):
2214         (WebCore::FontPlatformData::font):
2215         (WebCore::FontPlatformData::fontPtr):
2216         (WebCore::FontPlatformData::hash):
2217         (WebCore::FontPlatformData::operator==):
2218
2219 2006-08-25  Nikolas Zimmermann  <zimmermann@kde.org>
2220
2221         Reviewed/landed by Adam.
2222
2223         Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10559
2224         Confirm to WebKit style guide - last fixes :-)
2225
2226         * platform/ResourceLoaderClient.h:
2227         * platform/qt/ComboBoxQt.cpp:
2228         * platform/qt/FrameQt.cpp:
2229         (WebCore::doScroll):
2230         (WebCore::FrameQt::FrameQt):
2231         (WebCore::FrameQt::openURL):
2232         (WebCore::FrameQt::submitForm):
2233         (WebCore::FrameQt::setTitle):
2234         (WebCore::FrameQt::passSubframeEventToSubframe):
2235         (WebCore::FrameQt::registerCommandForUndo):
2236         (WebCore::FrameQt::registerCommandForRedo):
2237         (WebCore::FrameQt::keyEvent):
2238         (WebCore::FrameQt::setFrameGeometry):
2239         * platform/qt/GlyphMapQt.cpp:
2240         (WebCore::GlyphMap::fillPage):
2241         * platform/qt/GraphicsContextQt.cpp:
2242         (WebCore::toQtCompositionMode):
2243         (WebCore::toQtLineCap):
2244         (WebCore::toQtLineJoin):
2245         (WebCore::TextShadow::TextShadow):
2246         (WebCore::GraphicsContextPlatformPrivate::p):
2247         * platform/qt/ImageQt.cpp:
2248         (WebCore::FrameData::clear):
2249         (WebCore::Image::supportsType):
2250         * platform/qt/IntSizeQt.cpp:
2251         * platform/qt/LineEditQt.cpp:
2252         * platform/qt/ListBoxQt.cpp:
2253         * platform/qt/PageQt.cpp:
2254         (WebCore::Page::windowRect):
2255         * platform/qt/PathQt.cpp:
2256         (WebCore::Path::~Path):
2257         * platform/qt/ResourceLoaderCurl.cpp:
2258         (WebCore::ResourceLoader::assembleResponseHeaders):
2259         (WebCore::ResourceLoader::retrieveCharset):
2260         (WebCore::ResourceLoader::receivedResponse):
2261         * platform/qt/ResourceLoaderManager.cpp:
2262         (WebCore::headerCallback):
2263         (WebCore::ResourceLoaderManager::downloadTimerCallback):
2264         (WebCore::ResourceLoaderManager::add):
2265         * platform/qt/ScreenQt.cpp:
2266         (WebCore::screenRect):
2267         (WebCore::usableScreenRect):
2268         * platform/qt/ScrollViewQt.cpp:
2269         (WebCore::ScrollView::ScrollView):
2270         (WebCore::ScrollView::~ScrollView):
2271         (WebCore::ScrollView::setParentWidget):
2272         (WebCore::ScrollView::addChild):
2273         * platform/qt/SharedTimerQt.cpp:
2274         (WebCore::setSharedTimerFiredFunction):
2275         * platform/qt/SharedTimerQt.h:
2276         (WebCore::SharedTimerQt::SharedTimerQt):
2277         (WebCore::SharedTimerQt::fire):
2278         * platform/qt/SystemTimeQt.cpp:
2279         (WebCore::currentTime):
2280         * platform/qt/TextEditQt.cpp:
2281         (WebCore::PlatformTextEdit::setParentWidget):
2282         (WebCore::PlatformTextEdit::text):
2283         (WebCore::PlatformTextEdit::sizeWithColumnsAndRows):
2284
2285 2006-08-24  David Harrison  <harrison@apple.com>
2286
2287         Reviewed by Justin.
2288
2289         Follow up for...
2290         <rdar://problem/4471481> Represent misspellings in AXAttributedStringForTextMarkerRange
2291
2292         Fix bug I introduced in r15959.
2293         
2294         * bridge/mac/WebCoreAXObject.mm:
2295         (-[WebCoreAXObject accessibilityAttributeValue:]):
2296         Use topDocument in case we are in a subframe (we want the start/end of the overall page).
2297
2298 2006-08-24  Brady Eidson  <beidson@apple.com>
2299
2300         Reviewed by Alice
2301
2302         Fixed my previous checkin, which was pruning the users entire icon db on startup everytime
2303
2304         * loader/icon/IconDatabase.cpp:
2305         (WebCore::IconDatabase::retainIconForPageURL): Bind the PageURL to argument 1, as SQL bindings
2306           are indexed to 1, not 0
2307
2308 2006-08-24  Geoffrey Garen  <ggaren@apple.com>
2309
2310         Reviewed by Darin.
2311
2312         Frame refactoring: changed FrameView clients so they no longer assume that
2313         FrameViews are Widgets that can tell you things about the platform, in 
2314         preparation for divorcing FrameViews from heavy-weight Widgets altogether.
2315
2316         This patch makes Page, rather than Widget, responsible for answering
2317         questions about the screen (scale factor, color depth, etc.). Refactoring 
2318         aside, I think this makes more sense, since (a) the screen has nothing to do 
2319         with any particular widget and (b) Page was already half-responsible for
2320         answering those questions, anyway.
2321
2322         Plus some random Windows build fix goodness.
2323
2324         Layout tests still pass.
2325
2326 2006-08-24  Timothy Hatcher  <timothy@apple.com>
2327
2328         Reviewed by Hyatt.
2329
2330         Allow changing the background color WebCore draws under transparent page backgrounds.
2331         No automated way to test. All tests pass, no performance regression.
2332
2333         * bridge/mac/WebCoreFrameBridge.h:
2334         * bridge/mac/WebCoreFrameBridge.mm:
2335         (-[WebCoreFrameBridge setBaseBackgroundColor:]):
2336         * page/FrameView.cpp:
2337         (WebCore::FrameViewPrivate::FrameViewPrivate):
2338         (WebCore::FrameView::baseBackgroundColor):
2339         (WebCore::FrameView::setBaseBackgroundColor):
2340         * page/FrameView.h:
2341         * rendering/RenderBox.cpp:
2342         (WebCore::RenderBox::paintBackgroundExtended):
2343         * rendering/RenderView.cpp:
2344         (WebCore::RenderView::paintBoxDecorations):
2345
2346 2006-08-24  Darin Adler  <darin@apple.com>
2347
2348         Reviewed by Justin.
2349
2350         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10169
2351           REGRESSION: NativeTextArea: Text dragged from <input type=text> to textarea disappears
2352         - eliminate the EditCommandPtr class from editing; use PassRefPtr and RefPtr instead
2353         - other editing-related cleanup
2354
2355         Test: fast/forms/drag-into-textarea.html
2356
2357         * bridge/mac/FrameMac.h: Changed EditCommandPtr parameters to use PassRefPtr<EditCommand> instead.
2358         * bridge/win/FrameWin.h: Ditto.
2359         * bridge/mac/FrameMac.mm:
2360         (WebCore::FrameMac::registerCommandForUndoOrRedo): Ditto.
2361         (WebCore::FrameMac::registerCommandForUndo): Ditto.
2362         (WebCore::FrameMac::registerCommandForRedo): Ditto.
2363
2364         * bridge/mac/WebCoreFrameBridge.mm:
2365         (-[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
2366         Use applyCommand instead of EditCommandPtr. Also remove now-unneeded document parameter.
2367         (-[WebCoreFrameBridge moveSelectionToDragCaret:smartMove:]): Ditto.
2368         (-[WebCoreFrameBridge deleteSelectionWithSmartDelete:]): Ditto.
2369
2370         * editing/AppendNodeCommand.h: Removed document parameter from constructor. Changed new child
2371         parameter to be a PassRefPtr. Reversed order of child and parent parameters.
2372         * editing/AppendNodeCommand.cpp:
2373         (WebCore::AppendNodeCommand::AppendNodeCommand): Ditto.
2374         (WebCore::AppendNodeCommand::doApply): Ditto.
2375         (WebCore::AppendNodeCommand::doUnapply): Ditto.
2376
2377         * editing/ApplyStyleCommand.h: Removed document parameter from constructor.
2378         * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::ApplyStyleCommand): Ditto.
2379
2380         * editing/BreakBlockquoteCommand.h: Removed unneeded include of DeprecatedPtrList.h.
2381         * editing/BreakBlockquoteCommand.cpp: Moved the include of DeprecatedPtrList.h here.
2382         (WebCore::BreakBlockquoteCommand::doApply): Changed code to construct a Selection explicitly
2383         since setEndingSelection is no longer overloaded for Position.
2384
2385         * editing/CompositeEditCommand.h: Added isFirstCommand function. Changed m_cmds from
2386         a DeprecatedValueList<EditCommandPtr> to a Vector<RefPtr<EditCommand>> and renamed it
2387         m_commands and made both doUnapply and doReapply private.
2388         * editing/CompositeEditCommand.cpp:
2389         (WebCore::CompositeEditCommand::doUnapply): Rewrote to use m_commands.
2390         (WebCore::CompositeEditCommand::doReapply): Ditto.
2391         (WebCore::CompositeEditCommand::applyCommandToComposite): Removed code to explicitly set up
2392         starting and ending selection -- now done inside setParent. Rewrote to use m_commands.
2393         (WebCore::CompositeEditCommand::applyStyle): Changed to not use EditCommandPtr.
2394         (WebCore::CompositeEditCommand::applyStyledElement): Ditto.
2395         (WebCore::CompositeEditCommand::removeStyledElement): Ditto.
2396         (WebCore::CompositeEditCommand::insertParagraphSeparator): Ditto.
2397         (WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
2398         (WebCore::CompositeEditCommand::appendNode): Ditto.
2399         (WebCore::CompositeEditCommand::removeNode): Ditto.
2400         (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
2401         (WebCore::CompositeEditCommand::splitTextNode): Ditto.
2402         (WebCore::CompositeEditCommand::splitElement): Ditto.
2403         (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
2404         (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
2405         (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
2406         (WebCore::CompositeEditCommand::joinTextNodes): Ditto.
2407         (WebCore::CompositeEditCommand::inputText): Ditto.
2408         (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
2409         (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
2410         (WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
2411         (WebCore::CompositeEditCommand::deleteSelection): Ditto.
2412         (WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
2413         (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Also fixed a bug where the code
2414         would not remove an empty attribute -- will not come up in practice, but wrong in theory.
2415         (WebCore::CompositeEditCommand::setNodeAttribute): Changed to not use EditCommandPtr.
2416         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Ditto.
2417         (WebCore::CompositeEditCommand::deleteInsignificantText): Rewrote to use a for loop.
2418         (WebCore::CompositeEditCommand::moveParagraphs): Changed to not use EditCommandPtr.
2419         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Changed code to construct a
2420         Selection explicitly since setEndingSelection is no longer overloaded for Position.
2421         (WebCore::createBlockPlaceholderElement): Collapsed this code so that the
2422         block placeholder class string is no longer spread across multiple functions.
2423         Perhaps we can get rid of this altogether at some point.
2424
2425         * editing/DeleteFromTextNodeCommand.h: Removed unneeded document parameter from one constructor.
2426         Also removed unneeded destructor.
2427         * editing/DeleteFromTextNodeCommand.cpp:
2428         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Ditto.
2429
2430         * editing/DeleteSelectionCommand.h: Removed unneeded document parameter from one constructor.
2431         * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Ditto.
2432
2433         * editing/EditCommand.h: Removed ECommandState, isCompositeStep(), parent(), state(), setState(),
2434         and most overloads of setStartingSelection() and setEndingSelection(). Made document() protected
2435         and non-virtual. Made setStartingSelection() setEndingSelection(), and styleAtPosition() protected.
2436         Made doApply(), doUnapply(), and doReapply() private. Added startingRootEditableElement(),
2437         endingRootEditableElement(), m_startingRootEditableElement, and m_endingRootEditableElement, which
2438         are needed so we can determine which editable elements an editing operation affects. Changed setParent()
2439         and m_parent to use CompositeEditCommand instead of EditCommand. Removed EditCommandPtr. Added
2440         applyCommand() function that's convenient to use on a newly-created command.
2441         * editing/EditCommand.cpp:
2442         (WebCore::EditCommand::EditCommand): Removed initialization for m_state, and added it for starting
2443         and ending root editable elements.
2444         (WebCore::EditCommand::apply): Simplified check for top level by just checking m_parent. Removed
2445         code to assert and set m_start. Eliminated use of EditCommandPtr.
2446         (WebCore::EditCommand::unapply): Ditto.
2447         (WebCore::EditCommand::reapply): Ditto.
2448         (WebCore::EditCommand::setStartingSelection): Changed to set root editable element too. Also made this
2449         not change the starting selection of the parent unless this is the first command in the parent -- didn't
2450         make sense the way it was.
2451         (WebCore::EditCommand::setEndingSelection): Changed to set root editable element too.
2452         (WebCore::EditCommand::setParent): Added code to set the starting and ending selection on the child
2453         based on the ending selection of the parent, formerly done by callers.
2454         (WebCore::applyCommand): Added.
2455
2456         * editing/FormatBlockCommand.h: Tweaked formatting.
2457         * editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::FormatBlockCommand): Ditto.
2458         * editing/InsertLineBreakCommand.h: Ditto.
2459         * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
2460
2461         * editing/IndentOutdentCommand.cpp:
2462         (WebCore::IndentOutdentCommand::splitTreeToNode): Removed use of EditCommandPtr.
2463         (WebCore::IndentOutdentCommand::outdentParagraph): Updated for change to list type enum.
2464         (WebCore::IndentOutdentCommand::outdentRegion): Removed use of EditCommandPtr.
2465
2466         * editing/InsertIntoTextNodeCommand.h: Removed unneeded document parameter to constructor.
2467         * editing/InsertIntoTextNodeCommand.cpp:
2468         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Ditto.
2469
2470         * editing/InsertListCommand.h: Renamed EListType to EList, and took the "Type" suffix off
2471         the constants.
2472         * editing/InsertListCommand.cpp:
2473         (WebCore::InsertListCommand::InsertListCommand): Ditto.
2474         (WebCore::InsertListCommand::doApply): Ditto.
2475
2476         * editing/InsertNodeBeforeCommand.h: Removed unneeded document parameter from constructor
2477         and changed the parameter of the node to insert to a PassRefPtr.
2478         * editing/InsertNodeBeforeCommand.cpp:
2479         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Ditto.
2480
2481         * editing/InsertParagraphSeparatorCommand.cpp:
2482         (WebCore::InsertParagraphSeparatorCommand::doApply): Remvoed use of EditCommandPtr.
2483
2484         * editing/InsertTextCommand.h: Changed insertTab to take const Position&.
2485         * editing/InsertTextCommand.cpp:
2486         (WebCore::InsertTextCommand::input): Ditto.
2487         (WebCore::InsertTextCommand::insertTab): Ditto.
2488
2489         * editing/JSEditor.h: Tweaked formatting and names.
2490         * editing/JSEditor.cpp: Ditto. Also changed places that use EditCommandPtr.
2491
2492         * editing/JoinTextNodesCommand.h: Removed unneeeded document pointer
2493         * editing/JoinTextNodesCommand.cpp:
2494         (WebCore::JoinTextNodesCommand::JoinTextNodesCommand): Ditto.
2495         * editing/MergeIdenticalElementsCommand.h: Ditto.
2496         * editing/MergeIdenticalElementsCommand.cpp:
2497         (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Ditto.
2498
2499         * editing/ModifySelectionListLevel.h: Changed EListType to be named Type and be a member of
2500         IncreaseSelectionListLevelCommand. Also changed m_listElement to be a RefPtr<Node>.
2501         * editing/ModifySelectionListLevel.cpp:
2502         (WebCore::getStartEndListChildren): Changed parameters to be references instead of pointers.
2503         (WebCore::IncreaseSelectionListLevelCommand::IncreaseSelectionListLevelCommand):
2504         Changed to use Type instead of EListType.
2505         (WebCore::canIncreaseListLevel): Changed parameters to be references instead of pointers.
2506         (WebCore::IncreaseSelectionListLevelCommand::doApply): Updated for change to canIncreaseListLevel.
2507         (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel): Ditto.
2508         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelWithType):
2509         Changed to not use EditCommandPtr.
2510         (WebCore::canDecreaseListLevel): Changed parameters to be references instead of pointers.
2511         (WebCore::DecreaseSelectionListLevelCommand::doApply): Updated for change to canDecreaseListLevel.
2512         (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel): Ditto.
2513         (WebCore::DecreaseSelectionListLevelCommand::decreaseSelectionListLevel): Changed to not use
2514         EditCommandPtr.
2515
2516         * editing/MoveSelectionCommand.h: Removed unnecessary document parameter and changed the fragment
2517         parameter to be a PassRefPtr.
2518         * editing/MoveSelectionCommand.cpp:
2519         (WebCore::MoveSelectionCommand::MoveSelectionCommand): Ditto.
2520         (WebCore::MoveSelectionCommand::doApply): Got rid of use of EditCommandPtr.
2521
2522         * editing/RebalanceWhitespaceCommand.h: Removed unnecessary document parameter.
2523         * editing/RebalanceWhitespaceCommand.cpp:
2524         (WebCore::RebalanceWhitespaceCommand::RebalanceWhitespaceCommand): Ditto.
2525         (WebCore::RebalanceWhitespaceCommand::doApply): Got rid of use of EditCommandPtr.
2526
2527         * editing/RemoveCSSPropertyCommand.h: Tweaked formatting.
2528
2529         * editing/RemoveNodeAttributeCommand.h: Removed unnecessary document parameter.
2530         * editing/RemoveNodeAttributeCommand.cpp:
2531         (WebCore::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand): Ditto.
2532
2533         * editing/RemoveNodeCommand.h: Removed unnecessary document parameter.
2534         * editing/RemoveNodeCommand.cpp:
2535         (WebCore::RemoveNodeCommand::RemoveNodeCommand): Ditto.
2536
2537         * editing/RemoveNodePreservingChildrenCommand.h: Removed unnecessary document parameter.
2538         * editing/RemoveNodePreservingChildrenCommand.cpp:
2539         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand): Ditto.
2540
2541         * editing/ReplaceSelectionCommand.h: Change fragment parameter to a PassRefPtr.
2542         * editing/ReplaceSelectionCommand.cpp:
2543         (WebCore::ReplacementFragment::ReplacementFragment): Ditto.
2544         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Ditto.
2545         (WebCore::ReplaceSelectionCommand::doApply): Ditto.
2546         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
2547
2548         * editing/Selection.h: Changed SEL_DEFAULT_AFFINITY to be a constant rather than
2549         a macro. Added constructors that take visible positions. Changed setBase and
2550         setExtent to take const Position& for better efficiency.
2551         * editing/Selection.cpp:
2552         (WebCore::Selection::Selection): Removed unnecessary double initialization of m_state
2553         and m_baseIsFirst in existing constructors. Added VisiblePosition-based constructors.
2554
2555         * editing/SetNodeAttributeCommand.h: Removed unnneeded document parameter.
2556         * editing/SetNodeAttributeCommand.cpp:
2557         (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Ditto.
2558
2559         * editing/SplitElementCommand.h: Removed unnneeded document parameter.
2560         * editing/SplitElementCommand.cpp:
2561         (WebCore::SplitElementCommand::SplitElementCommand): Ditto.
2562
2563         * editing/SplitTextNodeCommand.h: Removed unnneeded document parameter.
2564         * editing/SplitTextNodeCommand.cpp:
2565         (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Ditto.
2566
2567         * editing/SplitTextNodeContainingElementCommand.h: Removed unnneeded document parameter.
2568         * editing/SplitTextNodeContainingElementCommand.cpp:
2569         (WebCore::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand): Ditto.
2570
2571         * editing/TypingCommand.h: Replaced uses of EditCommandPtr with EditCommand*.
2572         Renamed openForMoveTyping() with isOpenForMoreTyping().
2573         * editing/TypingCommand.cpp:
2574         (WebCore::TypingCommand::deleteKeyPressed): Updated to remove use of EditCommandPtr.
2575         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2576         (WebCore::TypingCommand::insertText): Ditto.
2577         (WebCore::TypingCommand::insertLineBreak): Ditto.
2578         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): Ditto.
2579         (WebCore::TypingCommand::insertParagraphSeparator): Ditto.
2580         (WebCore::TypingCommand::isOpenForMoreTypingCommand): Ditto.
2581         (WebCore::TypingCommand::closeTyping): Ditto.
2582         (WebCore::TypingCommand::typingAddedToOpenCommand): Ditto.
2583         (WebCore::TypingCommand::insertTextRunWithoutNewlines): Ditto.
2584
2585         * editing/WrapContentsInDummySpanCommand.h: Removed unnneeded document parameter.
2586         * editing/WrapContentsInDummySpanCommand.cpp:
2587         (WebCore::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand): Ditto.
2588
2589         * editing/htmlediting.h: Changed type of NON_BREAKING_SPACE to UChar instead of
2590         unsigned short.
2591
2592         * page/Frame.h: Changed lastEditCommand() to return an EditCommand* and changed
2593         appliedEditing(), unappliedEditing(), reappliedEditing(), registerCommandForUndo(),
2594         and registerCommandForRedo() to take PassRefPtr<EditCommand>.
2595         * page/FramePrivate.h: Changed m_lastEditCommand to be a RefPtr<EditCommand>.
2596         * page/Frame.cpp:
2597         (WebCore::Frame::didOpenURL): Fixed for change to m_lastEditCommand.
2598         (WebCore::Frame::setFocusNodeIfNeeded): Call the rootEditableElement function
2599         from Selection to simplify the code.
2600         (WebCore::Frame::selectAll): Ditto.
2601         (WebCore::Frame::lastEditCommand): Updated for change to m_lastEditCommand.
2602         (WebCore::dispatchEditableContentChangedEvents): Added. This sends an event to
2603         both of the root editable elements involved in a change -- the start selection
2604         might be in a different element than the end selection.
2605         (WebCore::Frame::appliedEditing): Changed to call dispatchEditableContentChangedEvents,
2606         and to do it before setting the ending selection. Also update to use PassRefPtr instead
2607         of EditCommandPtr and change the order of setting m_lastEditCommand since passing it
2608         to registerCommandForUndo will take ownership and set it to 0.
2609         (WebCore::Frame::unappliedEditing): Ditto.
2610         (WebCore::Frame::reappliedEditing): Ditto.
2611         (WebCore::Frame::computeAndSetTypingStyle): Updated for removal of EditCommandPtr.
2612         (WebCore::Frame::applyStyle): Ditto.
2613         (WebCore::Frame::applyParagraphStyle): Ditto.
2614
2615         * platform/gdk/FrameGdk.h: Updated for above changes.
2616         * platform/gdk/TemporaryLinkStubs.cpp: Updated for above changes.
2617         * platform/win/TemporaryLinkStubs.cpp: Updated for above changes.
2618
2619 2006-08-24  Brady Eidson  <beidson@apple.com>
2620
2621         Reviewed by Alice
2622
2623         <rdar://problem/4697973> - Unacceptable delay on startup
2624         <rdar://problem/4690949> - Need to correctly prune unretained pageurls and icons on startup
2625
2626         This patch was started by me and finished by Mark Rowe - we now special case all retains during
2627         startup into one huge sql transaction.  Also we track PageURL retains instead of IconURLs so pruning works right.
2628         Testing with reasonable sets of bookmarks/history (3000), startup time is neglibile.  Testing with a huge set of 
2629         bookmarks (40,000), startup has a noticable delay, but reasonable, and is inline with shipping safari which also 
2630         has a noticeable delay.
2631
2632         * loader/icon/IconDatabase.cpp:
2633         (WebCore::IconDatabase::IconDatabase):
2634         (WebCore::IconDatabase::open): adding an initialStartupTransaction and pageRetainStatement
2635         (WebCore::IconDatabase::close): do cleanup on the initialStartupSQL stuff
2636         (WebCore::IconDatabase::retainIconForPageURL): Track initial PageURL retains in the temporary table
2637         (WebCore::IconDatabase::releaseIconForPageURL): Ditto
2638         (WebCore::IconDatabase::retainIconURL): We no longer special case this on startup
2639         (WebCore::IconDatabase::releaseIconURL): We no longer special case this on startup
2640         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Handle the big transaction correctly and quickly
2641         (WebCore::IconDatabase::syncDatabase): Change the timing log message
2642         * loader/icon/IconDatabase.h:
2643         * loader/icon/SQLStatement.cpp:
2644         (WebCore::SQLStatement::bindText16): Added this - for reusing commonly used statements by just rebinding parameters.
2645         * loader/icon/SQLStatement.h:
2646
2647 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2648
2649         Reviewed/landed by Adam.
2650
2651         Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
2652         WebKit should have Qt platform support
2653
2654         * CMakeLists.txt:
2655             Remove KCanvasMatrix.cpp because it no longer exists
2656             Remove platform/qt/test
2657         * platform/FloatSize.h:
2658         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
2659         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2660         * platform/image-decoders/gif/GIFImageReader.cpp:
2661         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2662         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2663         * platform/image-decoders/png/PNGImageDecoder.cpp:
2664         * platform/image-decoders/xbm/XBMImageDecoder.cpp:
2665             Added PLATFORM(QT) hooks in the image-decoders/, as they also need
2666             to work for Qt, not only for Cairo.
2667         * platform/qt/qt-encodings.txt: Added (required for build).
2668
2669 2006-08-24  Adam Roben  <aroben@apple.com>
2670
2671         Fixing a typo from last patch.
2672
2673         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
2674         (WebCore::KRenderingPaintServerQt::setPenProperties):
2675
2676 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2677
2678         Reviewed/landed by Adam.
2679
2680         Final cleanup to conform to WebKit coding style!
2681
2682         * kcanvas/device/qt/KCanvasClipperQt.cpp:
2683         (WebCore::KCanvasClipperQt::applyClip):
2684         * kcanvas/device/qt/KCanvasClipperQt.h:
2685         * kcanvas/device/qt/KCanvasPathQt.cpp:
2686         * kcanvas/device/qt/KCanvasPathQt.h:
2687         * kcanvas/device/qt/KRenderingDeviceQt.cpp:
2688         * kcanvas/device/qt/KRenderingDeviceQt.h:
2689         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
2690         (WebCore::KRenderingPaintServerLinearGradientQt::KRenderingPaintServerLinearGradientQt):
2691         (WebCore::KRenderingPaintServerRadialGradientQt::KRenderingPaintServerRadialGradientQt):
2692         * kcanvas/device/qt/KRenderingPaintServerGradientQt.h:
2693         * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
2694         (WebCore::KRenderingPaintServerPatternQt::KRenderingPaintServerPatternQt):
2695         * kcanvas/device/qt/KRenderingPaintServerPatternQt.h:
2696         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
2697         (WebCore::KRenderingPaintServerQt::setPenProperties):
2698         * kcanvas/device/qt/KRenderingPaintServerQt.h:
2699         * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
2700         (WebCore::KRenderingPaintServerSolidQt::KRenderingPaintServerSolidQt):
2701         (WebCore::KRenderingPaintServerSolidQt::renderPath):
2702         * kcanvas/device/qt/KRenderingPaintServerSolidQt.h:
2703         * kcanvas/device/qt/RenderPathQt.cpp:
2704         * kcanvas/device/qt/RenderPathQt.h:
2705         * platform/qt/AffineTransformQt.cpp:
2706         * platform/qt/BrowserExtensionQt.cpp:
2707         * platform/qt/BrowserExtensionQt.h:
2708         * platform/qt/ColorQt.cpp:
2709         (WebCore::Color::Color):
2710         * platform/qt/ComboBoxQt.cpp:
2711         (WebCore::PlatformComboBox::PlatformComboBox):
2712         (WebCore::PlatformComboBox::~PlatformComboBox):
2713         (WebCore::PlatformComboBox::setParentWidget):
2714         (WebCore::PlatformComboBox::appendGroupLabel):
2715         * platform/qt/CookieJarQt.cpp:
2716         * platform/qt/CursorQt.cpp:
2717         (WebCore::Cursors::Cursors::self):
2718         * platform/qt/FloatPointQt.cpp:
2719         * platform/qt/FloatRectQt.cpp:
2720         * platform/qt/FontCacheQt.cpp:
2721         (WebCore::FontCache::getSimilarFontPlatformData):
2722         (WebCore::FontCache::createFontPlatformData):
2723         * platform/qt/FontDataQt.cpp:
2724         * platform/qt/FontPlatformData.h:
2725         * platform/qt/FontPlatformDataQt.cpp:
2726         * platform/qt/FontQt.cpp:
2727         (WebCore::Font::operator QFont):
2728         (WebCore::Font::drawComplexText):
2729         (WebCore::Font::floatWidthForComplexText):
2730         * platform/qt/FrameQt.cpp:
2731         (WebCore::FrameQt::openURL):
2732         (WebCore::FrameQt::submitForm):
2733         (WebCore::FrameQt::urlSelected):
2734         (WebCore::FrameQt::keyEvent):
2735         * platform/qt/FrameQt.h:
2736         * platform/qt/GlyphMapQt.cpp:
2737         * platform/qt/GraphicsContextQt.cpp:
2738         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2739         (WebCore::GraphicsContext::GraphicsContext):
2740         (WebCore::GraphicsContext::drawConvexPolygon):
2741         (WebCore::GraphicsContext::setFocusRingClip):
2742         (WebCore::GraphicsContext::clip):
2743         * platform/qt/ImageQt.cpp:
2744         (WebCore::Image::draw):
2745         (WebCore::Image::drawTiled):
2746         * platform/qt/ImageSourceQt.cpp:
2747         * platform/qt/IntPointQt.cpp:
2748         * platform/qt/IntRectQt.cpp:
2749         * platform/qt/IntSizeQt.cpp:
2750         * platform/qt/LineEditQt.cpp:
2751         (WebCore::PlatformLineEdit::PlatformLineEdit):
2752         (WebCore::PlatformLineEdit::~PlatformLineEdit):
2753         (WebCore::PlatformLineEdit::setParentWidget):
2754         (WebCore::PlatformLineEdit::addSearchResult):
2755         * platform/qt/ListBoxQt.cpp:
2756         (WebCore::ListBox::ListBox):
2757         (WebCore::ListBox::~ListBox):
2758         (WebCore::ListBox::setParentWidget):
2759         * platform/qt/PageQt.cpp:
2760         (WebCore::Page::windowRect):
2761         (WebCore::Page::setWindowRect):
2762         * platform/qt/PathQt.cpp:
2763         (WebCore::Path::addArc):
2764         * platform/qt/PlatformKeyboardEventQt.cpp:
2765         (WebCore::windowsKeyCodeForKeyEvent):
2766         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2767         * platform/qt/PlatformMouseEventQt.cpp:
2768         * platform/qt/RenderThemeQt.cpp:
2769         (WebCore::RenderThemeQt::getStylePainterAndWidgetFromPaintInfo):
2770         (WebCore::RenderThemeQt::applyTheme):
2771         (WebCore::RenderThemeQt::paintButton):
2772         (WebCore::RenderThemeQt::paintTextField):
2773         * platform/qt/ResourceLoaderCurl.cpp:
2774         (WebCore::ResourceLoader::assembleResponseHeaders):
2775         (WebCore::ResourceLoader::retrieveCharset):
2776         (WebCore::ResourceLoader::receivedResponse):
2777         * platform/qt/ResourceLoaderManager.cpp:
2778         (WebCore::ResourceLoaderManager::add):
2779         * platform/qt/ResourceLoaderManager.h:
2780         * platform/qt/ScreenQt.cpp:
2781         * platform/qt/ScrollViewCanvasQt.cpp:
2782         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
2783         * platform/qt/ScrollViewCanvasQt.h:
2784         * platform/qt/ScrollViewQt.cpp:
2785         * platform/qt/SharedTimerQt.cpp:
2786         * platform/qt/SharedTimerQt.h:
2787         (WebCore::SharedTimerQt::inst):
2788         * platform/qt/StringQt.cpp:
2789         * platform/qt/SystemTimeQt.cpp:
2790         * platform/qt/TemporaryLinkStubs.cpp:
2791         * platform/qt/TextEditQt.cpp:
2792         (WebCore::PlatformTextEdit::PlatformTextEdit):
2793         (WebCore::PlatformTextEdit::~PlatformTextEdit):
2794         (WebCore::PlatformTextEdit::setParentWidget):
2795         * platform/qt/WidgetQt.cpp:
2796         (WebCore::Widget::setQWidget):
2797
2798 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2799
2800         Reviewed and landed by Anders.
2801
2802         Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
2803         WebKit should have Qt platform support
2804
2805         * CMakeLists.txt:
2806         * platform/qt/FrameQt.cpp: Added.
2807         (WebCore::doScroll):
2808         (WebCore::FrameView::isFrameView):
2809         (WebCore::FrameQt::FrameQt):
2810         (WebCore::FrameQt::init):
2811         (WebCore::FrameQt::~FrameQt):
2812         (WebCore::FrameQt::openURL):
2813         (WebCore::FrameQt::submitForm):
2814         (WebCore::FrameQt::urlSelected):
2815         (WebCore::FrameQt::userAgent):
2816         (WebCore::FrameQt::runJavaScriptAlert):
2817         (WebCore::FrameQt::runJavaScriptConfirm):
2818         (WebCore::FrameQt::locationbarVisible):
2819         (WebCore::FrameQt::setTitle):
2820         (WebCore::FrameQt::createFrame):
2821         (WebCore::FrameQt::passWheelEventToChildWidget):
2822         (WebCore::FrameQt::passSubframeEventToSubframe):
2823         (WebCore::FrameQt::objectContentType):
2824         (WebCore::FrameQt::createPlugin):
2825         (WebCore::FrameQt::passMouseDownEventToWidget):
2826         (WebCore::FrameQt::menubarVisible):
2827         (WebCore::FrameQt::personalbarVisible):
2828         (WebCore::FrameQt::statusbarVisible):
2829         (WebCore::FrameQt::toolbarVisible):
2830         (WebCore::FrameQt::createEmptyDocument):
2831         (WebCore::FrameQt::markedTextRange):
2832         (WebCore::FrameQt::incomingReferrer):
2833         (WebCore::FrameQt::mimeTypeForFileName):
2834         (WebCore::FrameQt::markMisspellingsInAdjacentWords):
2835         (WebCore::FrameQt::markMisspellings):
2836         (WebCore::FrameQt::lastEventIsMouseUp):
2837         (WebCore::FrameQt::saveDocumentState):
2838         (WebCore::FrameQt::restoreDocumentState):
2839         (WebCore::FrameQt::openURLRequest):
2840         (WebCore::FrameQt::scheduleClose):
2841         (WebCore::FrameQt::unfocusWindow):
2842         (WebCore::FrameQt::focusWindow):
2843         (WebCore::FrameQt::overrideMediaType):
2844         (WebCore::FrameQt::addMessageToConsole):
2845         (WebCore::FrameQt::runJavaScriptPrompt):
2846         (WebCore::FrameQt::getEmbedInstanceForWidget):
2847         (WebCore::FrameQt::getObjectInstanceForWidget):
2848         (WebCore::FrameQt::getAppletInstanceForWidget):
2849         (WebCore::FrameQt::registerCommandForUndo):
2850         (WebCore::FrameQt::registerCommandForRedo):
2851         (WebCore::FrameQt::clearUndoRedoOperations):
2852         (WebCore::FrameQt::issueUndoCommand):
2853         (WebCore::FrameQt::issueRedoCommand):
2854         (WebCore::FrameQt::issueCutCommand):
2855         (WebCore::FrameQt::issueCopyCommand):
2856         (WebCore::FrameQt::issuePasteCommand):
2857         (WebCore::FrameQt::issuePasteAndMatchStyleCommand):
2858         (WebCore::FrameQt::issueTransposeCommand):
2859         (WebCore::FrameQt::respondToChangedSelection):
2860         (WebCore::FrameQt::respondToChangedContents):
2861         (WebCore::FrameQt::shouldChangeSelection):
2862         (WebCore::FrameQt::partClearedInBegin):
2863         (WebCore::FrameQt::canGoBackOrForward):
2864         (WebCore::FrameQt::handledOnloadEvents):
2865         (WebCore::FrameQt::canPaste):
2866         (WebCore::FrameQt::canRedo):
2867         (WebCore::FrameQt::canUndo):
2868         (WebCore::FrameQt::print):
2869         (WebCore::FrameQt::shouldInterruptJavaScript):
2870         (WebCore::FrameQt::keyEvent):
2871         (WebCore::FrameQt::receivedResponse):
2872         (WebCore::FrameQt::receivedData):
2873         (WebCore::FrameQt::receivedAllData):
2874         (WebCore::FrameQt::setFrameGeometry):
2875         * platform/qt/FrameQt.h: Added.
2876         * platform/qt/ScrollViewCanvasQt.cpp: Added.
2877         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
2878         (WebCore::ScrollViewCanvasQt::paintEvent):
2879         (WebCore::ScrollViewCanvasQt::sizeHint):
2880         (WebCore::ScrollViewCanvasQt::mouseMoveEvent):
2881         (WebCore::ScrollViewCanvasQt::mousePressEvent):
2882         (WebCore::ScrollViewCanvasQt::mouseReleaseEvent):
2883         (WebCore::ScrollViewCanvasQt::keyPressEvent):
2884         (WebCore::ScrollViewCanvasQt::keyReleaseEvent):
2885         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
2886         * platform/qt/ScrollViewCanvasQt.h: Added.
2887         * platform/qt/ScrollViewQt.cpp:
2888         (WebCore::ScrollView::setParentWidget):
2889
2890 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2891
2892         Reviewed by ap.
2893
2894         Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
2895         WebKit should have Qt platform support
2896
2897         * platform/qt/FontCacheQt.cpp: Added.
2898         (WebCore::FontCache::platformInit):
2899         (WebCore::FontCache::getFontDataForCharacters):
2900         (WebCore::FontCache::getSimilarFontPlatformData):
2901         (WebCore::FontCache::getLastResortFallbackFont):
2902         (WebCore::FontCache::createFontPlatformData):
2903         * platform/qt/FontDataQt.cpp: Added.
2904         (WebCore::FontData::platformInit):
2905         (WebCore::FontData::platformDestroy):
2906         (WebCore::FontData::smallCapsFontData):
2907         (WebCore::FontData::containsCharacters):
2908         (WebCore::FontData::determinePitch):
2909         (WebCore::FontData::platformWidthForGlyph):
2910         * platform/qt/FontPlatformData.h: Added.
2911         * platform/qt/FontPlatformDataQt.cpp: Added.
2912         (WebCore::FontPlatformData::FontPlatformData):
2913         (WebCore::FontPlatformData::operator=):
2914         (WebCore::FontPlatformData::~FontPlatformData):
2915         (WebCore::FontPlatformData::isFixedPitch):
2916         (WebCore::FontPlatformData::setFont):
2917         (WebCore::FontPlatformData::font):
2918         (WebCore::FontPlatformData::hash):
2919         (WebCore::FontPlatformData::operator==):
2920         * platform/qt/FontQt.cpp: Added.
2921         (WebCore::Font::operator QFont):
2922         (WebCore::Font::drawGlyphs):
2923         (WebCore::Font::drawComplexText):
2924         (WebCore::Font::floatWidthForComplexText):
2925         * platform/qt/GlyphMapQt.cpp: Added.
2926         (WebCore::GlyphMap::fillPage):
2927
2928 2006-08-24  David Harrison  <harrison@apple.com>
2929
2930         Reinstate r15966 because layout test changes are correct.
2931
2932         <rdar://problem/4522205> Represent controls in AXAttributedStringForTextMarkerRange
2933
2934         * editing/TextIterator.cpp:
2935         (WebCore::TextIterator::advance):
2936
2937 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2938
2939         Reviewed by ap.
2940
2941         http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
2942         WebKit should have Qt platform support (Part II)
2943
2944         Adapt the KCanvas Qt device to Rob's KCanvasMatrix removal.
2945         Use AffineTransform everywhere instead.
2946
2947         * kcanvas/device/qt/KRenderingDeviceQt.cpp:
2948         (WebCore::KRenderingDeviceContextQt::KRenderingDeviceContextQt):
2949         (WebCore::KRenderingDeviceContextQt::concatCTM):
2950         (WebCore::KRenderingDeviceContextQt::ctm):
2951         * kcanvas/device/qt/KRenderingDeviceQt.h:
2952         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
2953         (WebCore::KRenderingPaintServerLinearGradientQt::setup):
2954         (WebCore::KRenderingPaintServerRadialGradientQt::setup):
2955
2956 2006-08-24  Rob Buis  <buis@kde.org>
2957
2958         Reviewed by Darin.
2959
2960         http://bugzilla.opendarwin.org/show_bug.cgi?id=10524
2961         svg transform: comma delimiting breaks display
2962
2963         Properly parse transforms which use ',' as seperators.
2964
2965         * ksvg2/svg/SVGTransformable.cpp:
2966         (SVGTransformable::parseTransformAttribute):
2967
2968 2006-08-23  Darin Adler  <darin@apple.com>
2969
2970         Reviewed by Maciej.
2971
2972         - added an assert to make it slightly easier to debug the common case of
2973           calling document() on a node of 0
2974
2975         * dom/Node.h: (WebCore::Node::document): ASSERT(this).
2976
2977 2006-08-23  David Hyatt  <hyatt@apple.com>
2978
2979         Refactor Cairo and CoreGraphics to use platform ifdefs.  This patch
2980         separates the graphics engines from their respective platforms and replaces
2981         #ifdef PLATFORM(MAC) and PLATFORM(WIN) with PLATFORM(CG) and PLATFORM(CAIRO).
2982
2983         Reviewed by darin
2984
2985         * WebCore.xcodeproj/project.pbxproj:
2986         * platform/AffineTransform.h:
2987         * platform/Color.h:
2988         * platform/Cursor.h:
2989         * platform/FloatPoint.h:
2990         * platform/FloatRect.h:
2991         * platform/FloatSize.h:
2992         * platform/Font.h:
2993         * platform/FontData.h:
2994         * platform/GlyphBuffer.h:
2995         (WebCore::GlyphBuffer::glyphAt):
2996         (WebCore::GlyphBuffer::advanceAt):
2997         (WebCore::GlyphBuffer::add):
2998         * platform/GraphicsContext.h:
2999         * platform/Image.h:
3000         * platform/ImageSource.h:
3001         * platform/IntPoint.h:
3002         * platform/IntRect.h:
3003         * platform/IntSize.h:
3004         * platform/ResourceLoader.h:
3005         * platform/ResourceLoaderClient.h:
3006         * platform/Widget.h:
3007         * platform/cairo/GraphicsContextCairo.cpp:
3008         * platform/cairo/ImageCairo.cpp:
3009         * platform/cairo/ImageSourceCairo.cpp:
3010         * platform/cg/AffineTransformCG.cpp:
3011         * platform/cg/FloatPointCG.cpp: Added.
3012         * platform/cg/FloatRectCG.cpp: Added.
3013         * platform/cg/FloatSizeCG.cpp: Added.
3014         * platform/cg/GraphicsContextCG.cpp:
3015         (WebCore::GraphicsContext::GraphicsContext):
3016         (WebCore::GraphicsContext::~GraphicsContext):
3017         (WebCore::GraphicsContext::setFocusRingClip):
3018         (WebCore::GraphicsContext::clearFocusRingClip):
3019         (WebCore::GraphicsContext::platformContext):
3020         (WebCore::GraphicsContext::drawRect):
3021         (WebCore::GraphicsContext::drawLine):
3022         * platform/cg/GraphicsContextPlatformPrivate.h: Added.
3023         (WebCore::GraphicsContextPlatformPrivate:::m_cgContext):
3024         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
3025         * platform/cg/ImageCG.cpp: Added.
3026         (WebCore::Image::drawTiled):
3027         * platform/cg/ImageSourceCG.cpp: Added.
3028         * platform/cg/IntPointCG.cpp: Added.
3029         * platform/cg/IntRectCG.cpp: Added.
3030         * platform/cg/IntSizeCG.cpp: Added.
3031         * platform/cg/PDFDocumentImage.cpp: Added.
3032         (WebCore::PDFDocumentImage::adjustCTM):
3033         * platform/cg/PDFDocumentImage.h: Added.
3034         * platform/cg/PathCG.cpp:
3035         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
3036         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3037         * platform/image-decoders/gif/GIFImageReader.cpp:
3038         * platform/image-decoders/ico/ICOImageDecoder.cpp:
3039         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3040         * platform/image-decoders/png/PNGImageDecoder.cpp:
3041         * platform/image-decoders/xbm/XBMImageDecoder.cpp:
3042         * platform/mac/FloatPointMac.mm:
3043         * platform/mac/FloatRectMac.mm:
3044         * platform/mac/FloatSizeMac.mm:
3045         * platform/mac/GraphicsContextMac.mm:
3046         * platform/mac/ImageMac.mm:
3047         * platform/mac/ImageSourceMac.cpp: Removed.
3048         * platform/mac/IntPointMac.mm:
3049         * platform/mac/IntRectMac.mm:
3050         * platform/mac/IntSizeMac.mm:
3051         * platform/mac/PDFDocumentImage.h: Removed.
3052         * platform/mac/PDFDocumentImage.mm: Removed.
3053
3054 2006-08-23  David Hyatt  <hyatt@apple.com>
3055
3056         Remove the ifdef for platform scrollbars vs. engine scrollbars until
3057         engine scrollbars actually exist.
3058
3059         * platform/ScrollBar.h:
3060         (WebCore::ScrollBar::hasPlatformScrollBars):
3061
3062 2006-08-23  Justin Garcia  <justin.garcia@apple.com>
3063
3064         Reviewed by harrison
3065         
3066         Removed the poorly named next/previousVisiblePosition
3067         and use next/previousCandidate and next/previousVisuallyDistinctCandidate.
3068         Removed the unused VisiblePosition::maxOffset()
3069
3070         * editing/VisiblePosition.cpp:
3071         (WebCore::VisiblePosition::next):
3072         (WebCore::VisiblePosition::previous):
3073         (WebCore::VisiblePosition::canonicalPosition):
3074         * editing/VisiblePosition.h: 
3075
3076 2006-08-23  Nikolas Zimmermann  <zimmermann@kde.org>
3077
3078         Reviewed by Alexey. Landed by rwlbuis.
3079
3080         Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
3081         WebKit should have Qt platform support (Part II)
3082
3083         * platform/qt/GraphicsContextQt.cpp: Added.
3084         (WebCore::toQtCompositionMode):
3085         (WebCore::toQtLineCap):
3086         (WebCore::toQtLineJoin):
3087         (WebCore::TransparencyLayer::TransparencyLayer):
3088         (WebCore::TransparencyLayer::cleanup):
3089         (WebCore::TextShadow::TextShadow):
3090         (WebCore::TextShadow::isNull):
3091         (WebCore::GraphicsContextPlatformPrivate::p):
3092         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3093         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
3094         (WebCore::GraphicsContext::GraphicsContext):
3095         (WebCore::GraphicsContext::~GraphicsContext):
3096         (WebCore::GraphicsContext::platformContext):
3097         (WebCore::GraphicsContext::savePlatformState):
3098         (WebCore::GraphicsContext::restorePlatformState):
3099         (WebCore::GraphicsContext::drawRect):
3100         (WebCore::adjustLineToPixelBounderies):
3101         (WebCore::GraphicsContext::drawLine):
3102         (WebCore::GraphicsContext::drawEllipse):
3103         (WebCore::GraphicsContext::drawArc):
3104         (WebCore::GraphicsContext::drawConvexPolygon):
3105         (WebCore::GraphicsContext::fillRect):
3106         (WebCore::GraphicsContext::addClip):
3107         (WebCore::GraphicsContext::drawFocusRing):
3108         (WebCore::GraphicsContext::setFocusRingClip):
3109         (WebCore::GraphicsContext::clearFocusRingClip):
3110         (WebCore::GraphicsContext::drawLineForText):
3111         (WebCore::GraphicsContext::drawLineForMisspelling):
3112         (WebCore::GraphicsContext::roundToDevicePixels):
3113         (WebCore::GraphicsContext::setShadow):
3114         (WebCore::GraphicsContext::clearShadow):
3115         (WebCore::GraphicsContext::beginTransparencyLayer):
3116         (WebCore::GraphicsContext::endTransparencyLayer):
3117         (WebCore::GraphicsContext::clearRect):
3118         (WebCore::GraphicsContext::strokeRect):
3119         (WebCore::GraphicsContext::setLineWidth):
3120         (WebCore::GraphicsContext::setLineCap):
3121         (WebCore::GraphicsContext::setLineJoin):
3122         (WebCore::GraphicsContext::setMiterLimit):
3123         (WebCore::GraphicsContext::setAlpha):
3124         (WebCore::GraphicsContext::setCompositeOperation):
3125         (WebCore::GraphicsContext::clip):
3126         (WebCore::GraphicsContext::translate):
3127         (WebCore::GraphicsContext::rotate):
3128         (WebCore::GraphicsContext::scale):
3129         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3130         (WebCore::GraphicsContext::addRoundedRectClip):
3131         (WebCore::GraphicsContext::createRenderingDeviceContext):
3132         * platform/qt/ImageQt.cpp: Added.
3133         (WebCore::FrameData::clear):
3134         (WebCore::Image::initNativeData):
3135         (WebCore::Image::destroyNativeData):
3136         (WebCore::Image::invalidateNativeData):
3137         (WebCore::Image::loadResource):
3138         (WebCore::Image::supportsType):
3139         (WebCore::Image::draw):
3140         (WebCore::Image::drawTiled):
3141         (WebCore::Image::checkForSolidColor):
3142         * platform/qt/ImageSourceQt.cpp: Added.
3143         (WebCore::createDecoder):
3144         (WebCore::ImageSource::ImageSource):
3145         (WebCore::ImageSource::~ImageSource):
3146         (WebCore::ImageSource::initialized):
3147         (WebCore::ImageSource::setData):
3148         (WebCore::ImageSource::isSizeAvailable):
3149         (WebCore::ImageSource::size):
3150         (WebCore::ImageSource::repetitionCount):
3151         (WebCore::ImageSource::frameCount):
3152         (WebCore::ImageSource::createFrameAtIndex):
3153         (WebCore::ImageSource::frameDurationAtIndex):
3154         (WebCore::ImageSource::frameHasAlphaAtIndex):
3155
3156 2006-08-23  Brady Eidson  <beidson@apple.com>
3157
3158         Reviewed by Adele
3159
3160         Moved default URL icon from WebKit to WebCore
3161
3162         * Resources/urlIcon.tiff: Added.
3163         * WebCore.xcodeproj/project.pbxproj:
3164         * loader/icon/IconDataCache.cpp:
3165         (WebCore::IconDataCache::loadImageFromResource):
3166         * loader/icon/IconDataCache.h:
3167         * loader/icon/IconDatabase.cpp:
3168         (WebCore::IconDatabase::IconDatabase):
3169         (WebCore::IconDatabase::defaultIcon):
3170         * loader/icon/IconDatabase.h:
3171
3172 2006-08-23  Adam Roben  <aroben@apple.com>
3173
3174         Reviewed by Darin, Adele.
3175
3176         Some popup refactoring/cleanup.
3177
3178         * html/HTMLSelectElement.cpp:
3179         (WebCore::HTMLSelectElement::defaultEventHandler):
3180         * rendering/RenderMenuList.cpp:
3181         (WebCore::RenderMenuList::RenderMenuList):
3182         (WebCore::RenderMenuList::~RenderMenuList):
3183         (WebCore::RenderMenuList::showPopup):
3184         (WebCore::RenderMenuList::hidePopup):
3185         * rendering/RenderMenuList.h:
3186         (WebCore::RenderMenuList::popup):
3187         (WebCore::RenderMenuList::popupIsVisible):
3188         * rendering/RenderPopupMenu.h:
3189         * rendering/RenderPopupMenuMac.h:
3190         (WebCore::RenderPopupMenuMac::hidePopup):
3191
3192 2006-08-23  Nikolas Zimmermann  <zimmermann@kde.org>
3193
3194         Reviewed by Anders. Landed by rwlbuis.
3195
3196         Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
3197         WebKit should have Qt platform support
3198
3199         * platform/qt/ResourceLoaderCurl.cpp: Added.
3200         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
3201         (WebCore::ResourceLoader::~ResourceLoader):
3202         (WebCore::ResourceLoader::start):
3203         (WebCore::ResourceLoader::cancel):
3204         (WebCore::ResourceLoader::assembleResponseHeaders):
3205         (WebCore::ResourceLoader::retrieveCharset):
3206         (WebCore::ResourceLoader::receivedResponse):
3207         * platform/qt/ResourceLoaderManager.cpp: Added.
3208         (WebCore::ResourceLoaderManager::ResourceLoaderManager):
3209         (WebCore::ResourceLoaderManager::get):
3210         (WebCore::ResourceLoaderManager::useSimpleTransfer):
3211         (WebCore::writeCallback):
3212         (WebCore::headerCallback):
3213         (WebCore::ResourceLoaderManager::downloadTimerCallback):
3214         (WebCore::ResourceLoaderManager::remove):
3215         (WebCore::ResourceLoaderManager::add):
3216         (WebCore::ResourceLoaderManager::cancel):
3217         * platform/qt/ResourceLoaderManager.h: Added.
3218         * platform/qt/StringQt.cpp: Added.
3219         (WebCore::String::String):
3220         (WebCore::String::operator QString):
3221         (WebCore::DeprecatedString::operator QString):
3222
3223 2006-08-23  Brady Eidson  <beidson@apple.com>
3224
3225         Reviewed by Maciej
3226
3227         Added escapeSQLString() - a helper to escape strings to be used in textual SQL queries
3228
3229         * WebCore.xcodeproj/project.pbxproj: Reordered some files
3230         * loader/icon/IconDataCache.cpp: Use the new escapeSQLString()
3231         (WebCore::IconDataCache::writeToDatabase):
3232         * loader/icon/IconDatabase.cpp: Use the new escapeSQLString() throughout
3233         (WebCore::IconDatabase::retainIconURL):
3234         (WebCore::IconDatabase::releaseIconURL):
3235         (WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
3236         (WebCore::IconDatabase::establishIconIDForIconURL):
3237         (WebCore::imageDataForIconURLQuery):
3238         (WebCore::timeStampForIconURLQuery):
3239         (WebCore::iconURLForPageURLQuery):
3240         (WebCore::forgetPageURLQuery):
3241         (WebCore::setIconIDForPageURLQuery):
3242         (WebCore::getIconIDForIconURLQuery):
3243         (WebCore::addIconForIconURLQuery):
3244         (WebCore::hasIconForIconURLQuery):
3245         * loader/icon/SQLDatabase.h:
3246         (WebCore::escapeSQLString): Added
3247
3248 2006-08-22  Maciej Stachowiak  <mjs@apple.com>
3249
3250         Reviewed by Brady.
3251
3252         - assorted style cleanup of icon loader code:
3253         
3254         - wrapped all implementation files in namespace WebCore {} instead of "using namespace WebCore;" at top
3255         - split headers to be one per class, to match impl files
3256         - made files that are purely local in IconDatabase.cpp static
3257         - make each impl file include config.h as first header (and no config.h includes in other headers)
3258         - avoid multiple copies of Vector<unsigned char> for image data
3259
3260         * WebCore.xcodeproj/project.pbxproj:
3261         * loader/icon/IconDataCache.cpp:
3262         * loader/icon/IconDataCache.h: Added.
3263         (WebCore::):
3264         (WebCore::IconDataCache::getTimestamp):
3265         (WebCore::IconDataCache::setTimestamp):
3266         (WebCore::IconDataCache::getIconURL):
3267         * loader/icon/IconDatabase.cpp:
3268         (WebCore::IconDatabase::imageDataForIconURL):
3269         (WebCore::IconDatabase::iconForPageURL):
3270         (WebCore::pageURLTableIsEmptyQuery):
3271         (WebCore::imageDataForIconURLQuery):
3272         (WebCore::timeStampForIconURLQuery):
3273         (WebCore::iconURLForPageURLQuery):
3274         (WebCore::forgetPageURLQuery):
3275         (WebCore::setIconIDForPageURLQuery):
3276         (WebCore::getIconIDForIconURLQuery):
3277         (WebCore::addIconForIconURLQuery):
3278         (WebCore::hasIconForIconURLQuery):
3279         * loader/icon/IconDatabase.h:
3280         * loader/icon/SQLDatabase.cpp:
3281         * loader/icon/SQLDatabase.h:
3282         * loader/icon/SQLStatement.cpp:
3283         (WebCore::SQLStatement::getColumnBlobAsVector):
3284         * loader/icon/SQLStatement.h: Added.
3285         (WebCore::SQLStatement::isPrepared):
3286         (WebCore::SQLStatement::prepareAndStep):
3287         (WebCore::SQLStatement::lastError):
3288         (WebCore::SQLStatement::lastErrorMsg):
3289         * loader/icon/SQLTransaction.cpp:
3290         * loader/icon/SQLTransaction.h: Added.
3291
3292 2006-08-22  Brady Eidson  <beidson@apple.com>
3293
3294         Reviewed by Maciej
3295
3296         The role of the SiteIcon is now the original intention - to be a cache of data relating to an Icon
3297         As such, I'm renaming it to IconDataCache.
3298         Also, the IconDatabase has to manually set the image data on the IconDataCache and also sets the 
3299         TimeStamp when an icon is created or the data is changed.
3300         IconDataCache now has a method to write itself *to* a given database, instead of read itself from one.
3301         IconDatabase schema changes to have the timestamp set manually instead of via a trigger.
3302         The overall purpose of this change is to cache the timestamp, killing off a very common SQL query.
3303
3304         * WebCore.xcodeproj/project.pbxproj: Renamed a file
3305         * loader/icon/IconDataCache.cpp: Added.
3306         (IconDataCache::IconDataCache):
3307         (IconDataCache::getImage): Now either returns the stored image, or 0 - no attempt to grab data
3308         (IconDataCache::manuallySetImageData): Delete the old image and create the new one
3309         (IconDataCache::writeToDatabase): Write the current iconURL, data, and timestamp to the given DB
3310         (IconDataCache::imageDataStatus): Determine if an IconDataCache is new without data versus actually having null data
3311         * loader/icon/IconDatabase.cpp:
3312         (WebCore::IconDatabase::createDatabaseTables): Changed DB schema to version 5 (hopefully the final version)
3313         (WebCore::IconDatabase::iconForPageURL): 
3314         (WebCore::IconDatabase::isIconExpiredForIconURL): Uses the timestamp in the IconDataCache object instead of always querying
3315         (WebCore::IconDatabase::getOrCreateIconDataCache): Added, to handle creation of new IconDataCache when appropriate
3316         (WebCore::IconDatabase::setIconDataForIconURL): Puts data in SiteIcon then marks it for a future write
3317         (WebCore::IconDatabase::syncDatabase): Now syncs SiteIconsPendingUpdate
3318         * loader/icon/IconDatabase.h:
3319         (WebCore::IconDataCache::getTimestamp):
3320         (WebCore::IconDataCache::setTimestamp):
3321         * loader/icon/SiteIcon.cpp: Removed.
3322
3323
3324 2006-08-22  Justin Garcia  <justin.garcia@apple.com>
3325
3326         Reviewed by harrison
3327         
3328         <http://bugzilla.opendarwin.org/show_bug.cgi?id=10449>
3329         REGRESSION(r15918): drag-into-marker.html failing
3330
3331         * editing/ReplaceSelectionCommand.cpp:
3332         (WebCore::ReplaceSelectionCommand::doApply): Don't avoid nesting
3333         in a list item.
3334
3335 2006-08-22  Brady Eidson  <beidson@apple.com>
3336
3337         Reviewed by Kevin
3338
3339         Added a check in getTIFFRepresentation to not proceed if the frame count is zero
3340         This is an error condition that was handled gracefully before - in certain circumstances
3341         the call to CGImageDestinationCreateWithData will spam the Console if it is passed null/empty data
3342         or invalid data.  This small change bails out before that call if that call will definitely fail
3343
3344         * platform/mac/ImageMac.mm:
3345         (WebCore::Image::getTIFFRepresentation):
3346
3347 2006-08-22  David Harrison  <harrison@apple.com>
3348
3349         Backed out my last change (r15966) because it broke lots of layout tests.
3350
3351         * editing/TextIterator.cpp:
3352         (WebCore::TextIterator::advance):
3353
3354 2006-08-22  Maciej Stachowiak  <mjs@apple.com>
3355
3356         Reviewed by Anders.
3357
3358         - added some SPI indirections to support the following in WebKit/Loader:
3359             - pull more WebDataSource code into WebFrameLoader
3360             - make WebMainResourceLoader not depend on WebKit or on SPI
3361
3362         * WebCore.exp:
3363         * WebCore.xcodeproj/project.pbxproj:
3364         * platform/mac/WebCoreSystemInterface.h:
3365         * platform/mac/WebCoreSystemInterface.mm:
3366
3367 2006-08-22  Justin Garcia  <justin.garcia@apple.com>
3368
3369         Reviewed by harrison
3370
3371         <rdar://problem/4052343&4052343&4426622> Mail hung on paste text
3372         
3373         * editing/ReplaceSelectionCommand.cpp:
3374         (WebCore::isInterchangeNewlineNode):
3375         (WebCore::isInterchangeConvertedSpaceSpan):
3376         (WebCore::ReplacementFragment::ReplacementFragment):
3377         (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Compute the redundant inheritable styles and
3378         remove them and remove style nodes and style spans which were only contributing redundant styles.
3379         (WebCore::ReplaceSelectionCommand::doApply):
3380         * editing/ReplaceSelectionCommand.h:
3381
3382 2006-08-22  David Harrison  <harrison@apple.com>
3383
3384         Reviewed by Darin.
3385
3386         <rdar://problem/4077676> Inline hole line adheres to the Japanese characters in inline hole
3387
3388         This happens because the underline is always 2 pixels thick, and placed 3 pixels above the bottom of the text box.
3389
3390         Test case added:
3391         * manual-tests/inline-input-marking.html: Added.
3392         Check that underlining of the inline input hole does not obscure the glyphs.
3393         
3394         * rendering/InlineTextBox.cpp:
3395         (WebCore::InlineTextBox::paintMarkedTextUnderline):
3396         Position underline at bottom of text box.
3397         Height of underline is reduced to 1 px when font's descent is less than or equal to 2 px.
3398
3399 2006-08-22  Rob Buis  <buis@kde.org>
3400
3401         Reviewed by Eric.
3402
3403         http://bugzilla.opendarwin.org/show_bug.cgi?id=10402
3404         REPRO: SVG crashes inside gradient code
3405
3406         Make sure we do not try to update the canvas resource/gradient paintserver when it is not yet built.
3407
3408         * ksvg2/svg/SVGGradientElement.cpp:
3409         (SVGGradientElement::notifyAttributeChange):
3410         (SVGGradientElement::resourceNotification):
3411
3412 2006-08-22  David Harrison  <harrison@apple.com>
3413
3414         Reviewed by John.
3415
3416         <rdar://problem/4523606> Represent heading elements in AXAttributedStringForTextMarkerRange
3417
3418         * bridge/mac/WebCoreAXObject.mm:
3419         (headingLevel):
3420         (-[WebCoreAXObject headingLevel]):
3421         (-[WebCoreAXObject isHeading]):
3422         New. Heading level is per the tag (h1 == 1, h2 == 2, etc.)
3423         
3424         (-[WebCoreAXObject role]):
3425         (-[WebCoreAXObject roleDescription]):
3426         Add role and roleDescription for headings.
3427         
3428         (-[WebCoreAXObject value]):
3429         Value is the headingLevel.
3430         
3431         (AXAttributeStringSetHeadingLevel):
3432         (AXAttributedStringAppendText):
3433         Put text's heading level (if applicable) in the attributes.
3434         
3435 2006-08-22  David Harrison  <harrison@apple.com>
3436
3437         Reviewed by John.
3438
3439         <rdar://problem/4522205> Represent controls in AXAttributedStringForTextMarkerRange
3440
3441         Treat controls as replaced elements, so that AXAttributedStringForTextMarkerRange will, too.
3442         
3443         * editing/TextIterator.cpp:
3444         (WebCore::TextIterator::advance):
3445         Include controls.
3446
3447 2006-08-22  David Harrison  <harrison@apple.com>
3448
3449         Reviewed by Maciej.
3450
3451         <rdar://problem/4407336> Some non-text elements return AXTextMarkerRangeForUIElement with equal start and end marker
3452
3453         * bridge/mac/WebCoreAXObject.mm:
3454         (-[WebCoreAXObject textMarkerRange]):
3455         Use 0 and maxDeepOffset(), instead of caretMinOffset() and caretMaxRenderedOffset().
3456         Check for VisiblePositions being equal.  If so, adjust end one to its next().
3457         That happens with, e.g., buttons.
3458
3459 2006-08-22  Rob Buis  <buis@kde.org>
3460
3461         Reviewed by Eric.
3462
3463         http://bugzilla.opendarwin.org/show_bug.cgi?id=10491
3464         KCanvasMatrix removal
3465
3466         Remove KCanvasMatrix from project, using AffineTransform instead.
3467
3468         * WebCore.xcodeproj/project.pbxproj:
3469         * kcanvas/KCanvasMatrix.cpp: Removed.
3470         * kcanvas/KCanvasMatrix.h: Removed.
3471         * kcanvas/KCanvasResources.cpp:
3472         (WebCore::KCanvasMarker::draw):
3473         * kcanvas/KCanvasResources.h:
3474         * kcanvas/RenderForeignObject.cpp:
3475         * kcanvas/RenderPath.h:
3476         * kcanvas/RenderSVGContainer.cpp:
3477         (WebCore::RenderSVGContainer::viewportTransform):
3478         (WebCore::RenderSVGContainer::getAspectRatio):
3479         * kcanvas/RenderSVGContainer.h:
3480         * kcanvas/RenderSVGText.cpp:
3481         * kcanvas/device/KRenderingDevice.h:
3482         * kcanvas/device/KRenderingPaintServerGradient.cpp:
3483         (WebCore::KRenderingPaintServerGradient::gradientTransform):
3484         (WebCore::KRenderingPaintServerGradient::setGradientTransform):
3485         (WebCore::KRenderingPaintServerGradient::externalRepresentation):
3486         * kcanvas/device/KRenderingPaintServerGradient.h:
3487         * kcanvas/device/KRenderingPaintServerPattern.cpp:
3488         (WebCore::KRenderingPaintServerPattern::patternTransform):
3489         (WebCore::KRenderingPaintServerPattern::setPatternTransform):
3490         (WebCore::KRenderingPaintServerPattern::externalRepresentation):
3491         * kcanvas/device/KRenderingPaintServerPattern.h:
3492         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3493         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
3494         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
3495         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
3496         (WebCore::KRenderingDeviceContextQuartz::concatCTM):
3497         (WebCore::KRenderingDeviceContextQuartz::ctm):
3498         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3499         (WebCore::KRenderingPaintServerGradientQuartz::renderPath):
3500         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
3501         (WebCore::KRenderingPaintServerPatternQuartz::setup):
3502         * kcanvas/device/quartz/QuartzSupport.mm:
3503         * ksvg2/misc/KCanvasRenderingStyle.h:
3504         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3505         * ksvg2/svg/SVGAnimateTransformElement.h:
3506         * ksvg2/svg/SVGLinearGradientElement.cpp:
3507         (SVGLinearGradientElement::buildGradient):
3508         * ksvg2/svg/SVGPatternElement.cpp:
3509         (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
3510         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
3511         (WebCore::SVGPatternElement::notifyAttributeChange):
3512         * ksvg2/svg/SVGPatternElement.h:
3513         * ksvg2/svg/SVGRadialGradientElement.cpp:
3514         (WebCore::SVGRadialGradientElement::buildGradient):
3515
3516 2006-08-22  Rob Buis  <buis@kde.org>
3517
3518         Reviewed by Eric.
3519
3520         http://bugzilla.opendarwin.org/show_bug.cgi?id=10405
3521         REPRO: SVG M