LayoutTests:
[WebKit-https.git] / WebCore / ChangeLog
1 2007-02-09  Brady Eidson <beidson@apple.com>
2
3         Reviewed by Maciej
4
5         <rdar://problem/4965133> WebKit sends file:// url referrers
6
7         * loader/SubresourceLoader.cpp:
8         (WebCore::SubresourceLoader::create): In SubresourceLoader::create(), we make a copy of the original request
9         to use for the load.  We then call FrameLoader::canLoad() which tells us if we should hide the referer.  Before 
10         this fix if it said to hide the referrer, we would simply not apply a new referrer to our copy of the request.
11         But if the original request already had a referrer, so did our copy.  We simply have to clear the referrer from
12         the copied request.
13
14 2007-02-10  Maciej Stachowiak  <mjs@apple.com>
15
16         Reviewed by me, patch from Ian Eng (cleaned up by me some).
17
18         - fixed <rdar://problem/4988091> objects attached to Window not cleared (memory leak)
19         
20         Test case: fast/dom/Window/window-appendages-cleared.html
21
22         * bindings/js/kjs_window.cpp:
23         (KJS::Window::clearHelperObjectProperties):
24         (KJS::Window::clear):
25         * bindings/js/kjs_window.h:
26
27 2007-02-09  Brady Eidson  <beidson@apple.com>
28
29         Reviewed by Tim Hatcher
30
31         <rdar://problem/4985497> - Plugs a potential null DocumentLoader deref when 
32         transitioning out of the Bookmarks View
33
34         * loader/FrameLoader.cpp:
35         (WebCore::FrameLoader::recursiveGoToItem): add a null check
36
37 2007-02-09  Beth Dakin  <bdakin@apple.com>
38
39         Rubber-stamped by John . . . and Adam.
40
41         * page/ContextMenuController.cpp:
42         (WebCore::ContextMenuController::contextMenuItemSelected): Missing 
43         break.
44
45 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
46
47         Reviewed by darin
48
49         <rdar://problem/4975120>
50         REGRESSION: double-cursor after switching window away/back (11770)
51         <http://bugs.webkit.org/show_bug.cgi?id=11328>
52         Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
53
54         * page/mac/WebCoreFrameBridge.h: Removed two unused methods
55         left over from the old form control implementation.
56
57 2007-02-09  John Sullivan  <sullivan@apple.com>
58
59         * rendering/bidi.cpp:
60         (WebCore::bidiNext):
61         At Darin's suggestion, moved the "next = 0" line from my previous patch to the start of the loop body
62
63 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
64
65         Reviewed by john
66         
67         <rdar://problem/4960116>
68         REGRESSION: Nightly Safari crashes in WebCore::SelectionController::xPosForVerticalArrowNavigation (12416)
69
70         * editing/SelectionController.cpp:
71         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
72         Null check.  VisiblePosition creation can fail if a node that 
73         contains the selection was made invisible after the selection 
74         was made and before this function is called during a selection 
75         modification operation.
76
77 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
78
79         Reviewed by john
80         
81         <rdar://problem/4983858>
82         REGRESSION: In a new mail message, attempting to select a single word causes the selection to extend to the previous line
83
84         * editing/TextIterator.cpp:
85         (WebCore::SimplifiedBackwardsTextIterator::exitNode):
86         We recently split shouldEmitNewlineForNode into
87         shouldEmitNewline{Before, After}Node, so this function now
88         needs an implementation that is different from
89         SimplifiedBackwardsTextIterator::handleNonTextNode.  The
90         difference is that we must call shouldEmit*BeforeNode
91         instead of shouldEmit*AfterNode since we are a) exiting
92         nodes and b) moving backward.
93
94 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
95
96         Reviewed by john
97
98         <rdar://problem/4916541>
99         Some of the selection isn't preserved during an Indent opreration
100
101         * editing/IndentOutdentCommand.cpp:
102         (WebCore::indexForVisiblePosition): Added.
103         (WebCore::IndentOutdentCommand::indentRegion): Use rangeLength
104         and rangeFromLocationAndLength to restore the selection after
105         the repeated moveParagraph calls necessary to perform indent are
106         finished.
107
108 2007-02-09  John Sullivan  <sullivan@apple.com>
109
110         Reviewed by Kevin Decker
111         
112         - fixed <rdar://problem/4960095> REPRODUCIBLE HANG: WebKit freezes when printing as PDF
113           a certain kind of code (12449)
114  
115         No test case because I don't know how to make the bug occur without printing.
116
117         * rendering/bidi.cpp:
118         (WebCore::bidiNext):
119         reset loop's "next" variable after using it; we were setting "current" to the same value
120         of "next" each subsequent time through the loop, which is not helpful.
121
122 2007-02-09  Darin Adler  <darin@apple.com>
123
124         Reviewed by Adele.
125
126         - Add TextEvent to the DOM (based on the proposed DOM level 3)
127           to be used to fix some international input bugs soon.
128           At this point, we don't send any text events.
129
130         - Remove some obsolete files.
131
132         * CMakeLists.txt:
133         * WebCore.pro:
134         * WebCore.xcodeproj/project.pbxproj:
135         * WebCoreSources.bkl:
136         Add new files, remove obsolete files.
137
138         * DerivedSources.make: Add TextEvent to the Objective-C and JavaScript bindings lists.
139         * WebCore.exp: Export DOMTextEvent Objective-C wrapper.
140
141         * bindings/js/kjs_events.cpp: (KJS::toJS): Added TextEvent to the list of Event subclasses
142         so we make the right kind of JS wrapper.
143         * bindings/objc/DOMEvents.mm: (+[DOMEvent _eventWith:]): Same thing, for Objective-C.
144
145         * bindings/objc/DOMInternal.h: Added DOMTextEventInternal.h.
146
147         * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::hasFeature):
148         Added "TextEvents", "3.0" to the list of things we'll answer true for
149         (as specified in the DOM Level 3 documentation).
150         This isn't so great until we actually send textInput events, but that's coming soon.
151
152         * dom/Document.cpp: (WebCore::Document::createEvent): Add "TextEvent" as a way to make
153         a TextEvent (as specified in the DOM Level 3 documentation).
154
155         * dom/Event.h:
156         * dom/Event.cpp: (WebCore::Event::isTextEvent): Added virtual function to be used
157         for runtime type checking of Event objects (as for other event types).
158
159         * dom/TextEvent.cpp: Added.
160         * dom/TextEvent.h: Added.
161         * dom/TextEvent.idl: Added.
162
163         * platform/mac/WebCoreWidgetHolder.h: Removed.
164         * rendering/CounterListItem.h: Removed.
165         * rendering/CounterResetNode.cpp: Removed.
166         * rendering/CounterResetNode.h: Removed.
167
168 2007-02-09  Anders Carlsson  <acarlsson@apple.com>
169
170         Reviewed by Geoff.
171
172         <rdar://problem/4816376> 
173         REGRESSION: NetNewsWire 3.0 - Crashes in WebDocumentLoaderMac::attachToFrame() (12674)
174         
175         The bug was that the NNW policy delegate never calls back on the policy listener so we'll try to do a load
176         while there's a policy decision underway. The extra call to setPolicyDocumentLoader would cause a detached (and deallocated)
177         WebDataSource to be reattached and thus causing a crash.
178         
179         * loader/FrameLoader.cpp:
180         (WebCore::FrameLoader::load):
181         Remove extra call to setPolicyDocumentLoader.
182
183 2007-02-09  Beth Dakin  <bdakin@apple.com>
184
185         Reviewed by Darin.
186
187         Fix for <rdar://problem/4674537> REGRESSION: Adobe Acrobat 8 - Text 
188         blinks when mouse is moved, and is invisible otherwise
189
190         Acrobat 8 was relying on a WebKit bug that was fixed about a year 
191         ago with r12753. The bug was that we would not reload a page if the 
192         source of an iframe was set to the same value it already was. Now 
193         that we have fixed the bug, Acrobat constantly reloads their EULA, 
194         making it blinky and impossible to read. 
195
196         No layout test since the fix is to add an Acrobat-specific quirk.
197
198         * WebCore.exp:
199         * html/HTMLFrameElementBase.cpp:
200         (WebCore::HTMLFrameElementBase::setLocation): If the new url is the 
201         same as the old one and we are honoring the Acrobat quirk, don't do 
202         anything.
203         * page/Settings.cpp:
204         (WebCore::Settings::Settings):
205         (WebCore::Settings::setNeedsAcrobatFrameReloadingQuirk):
206         * page/Settings.h:
207         (WebCore::Settings::needsAcrobatFrameReloadingQuirk):
208
209 2007-02-09  Brady Eidson  <beidson@apple.com>
210
211         Rubberstamped by Dave Harrison
212
213         Disable the thread-check assertion in WebCore, as well as Webkit
214
215         * WebCore.xcodeproj/project.pbxproj:
216
217 2007-02-08  Anders Carlsson  <acarlsson@apple.com>
218
219         Reviewed by Geoff.
220
221         No need to pause timeout checks anymore.
222         
223         * bindings/js/kjs_window.cpp:
224         (KJS::WindowFunc::callAsFunction):
225
226 2007-02-09  John Sullivan  <sullivan@apple.com>
227
228         Reviewed by Beth
229         
230         - WebCore part of fix for radar 4939636, problems with context menu items and binaries linked
231           against WebKit 2.0.
232
233         * platform/ContextMenuItem.h:
234         (WebCore::):
235         Tweaked comment; bumped enum value for new SPI tags to avoid conflict with pre-3.0 SPI tag values.
236
237 2007-02-09  Nicholas Shanks  <webkit@nickshanks.com>
238
239         Reviewed by Dave Hyatt.
240
241         Removed broken recognition of :last-* and :only-* selectors
242
243         * css/CSSGrammar.y:
244         * css/CSSSelector.cpp:
245         (WebCore::CSSSelector::extractPseudoType):
246         * css/CSSSelector.h:
247         (WebCore::CSSSelector::):
248         * css/cssstyleselector.cpp:
249         (WebCore::CSSStyleSelector::checkOneSelector):
250
251 2007-02-09  Maciej Stachowiak  <mjs@apple.com>
252
253         Reviewed by Mark.
254
255         <rdar://problem/4980176>
256
257         * page/Frame.cpp:
258         (WebCore::Frame::pageDestroyed): Since this frame is getting
259         disconnected from its page, ensure it is not the focus node.
260
261 2007-02-09  Krzysztof  <kkowalczyk@gmail.com>
262
263         Reviewed by Maciej.
264
265         gdklauncher crashes when compiled with NDEBUG defined.
266
267         * Projects/gdk/webcore-gdk.bkl:
268
269 2007-02-09  Maciej Stachowiak  <mjs@apple.com>
270
271         Reviewed by Mitz.
272
273         <rdar://problem/4971224> REGRESSION: ASSERT in WebCore with Mail (12491)
274         http://bugs.webkit.org/show_bug.cgi?id=12491
275
276         No test case. Not testable since there is no way to do substitute
277         data loads from layout tests.
278         
279         * loader/MainResourceLoader.cpp:
280         (WebCore::MainResourceLoader::continueAfterContentPolicy): Don't dispatch data load
281         callback when loading empty data.
282
283 2007-02-09  Mark Rowe  <mrowe@apple.com>
284
285         Reviewed by Maciej.
286
287         http://bugs.webkit.org/show_bug.cgi?id=12705
288         REGRESSION: Crash with user stylesheet set
289
290         Allow the Frame::canLoad check to skipped so that user stylesheets can be loaded in remote documents.
291
292         * ChangeLog:
293         * loader/DocLoader.cpp:
294         (WebCore::DocLoader::requestCSSStyleSheet): Skip canLoad check if this is a user stylesheet.
295         (WebCore::DocLoader::requestUserCSSStyleSheet):
296         (WebCore::DocLoader::requestResource): Allow canLoad check to be skipped.
297         * loader/DocLoader.h:
298         * page/Frame.cpp:
299         (WebCore::UserStyleSheetLoader::UserStyleSheetLoader):
300
301 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
302
303         Reviewed by Darin.
304
305         Linux/gdk build fixes.
306
307         * Projects/gdk/webcore-gdk.bkl: Account for file renaming.
308         * platform/gdk/KeyEventGdk.cpp: Make gdk's tab key recognized as tab so that
309         keyboard link walking works on gdk.
310         (WebCore::keyIdentifierForGdkKeyCode):
311
312 2007-02-08  Adele Peterson  <adele@apple.com>
313
314         Reviewed by Brady.
315
316         Fix for http://bugs.webkit.org/show_bug.cgi?id=12599
317         <rdar://problem/4973507> REGRESSION: When replying in Gmail, the caret disappears when you start to type (12599)
318
319         When a frame's window was focused, the page didn't get updated about the new frame getting focus.
320         This was causing handleKeyPress to fail because it kept getting a selection for the wrong frame (which wasn't editable).
321
322         Test: fast/frames/iframe-window-focus.html
323
324         * page/Frame.cpp:
325         (WebCore::Frame::focusWindow):
326         (WebCore::Frame::unfocusWindow):
327         * page/Frame.h:
328         * page/mac/FrameMac.mm:
329         (WebCore::FrameMac::focusWindow):
330         (WebCore::FrameMac::unfocusWindow):
331
332 2007-02-08  Adele Peterson  <adele@apple.com>
333
334         Reviewed by Brady.
335
336         Fix for http://bugs.webkit.org/show_bug.cgi?id=12480
337         <rdar://problem/4971222> REGRESSION (NativeListBox): Deselecting option causes list to jump to top
338
339         Test: fast/forms/listbox-deselect-scroll.html
340
341         * html/HTMLSelectElement.cpp:
342         (WebCore::HTMLSelectElement::activeSelectionStartListIndex): Added.  Returns the index for the active selection.  If there is no active selection,
343          it returns the first selected index.
344         (WebCore::HTMLSelectElement::activeSelectionEndListIndex): Added.  If there is no active selection, it returns the last selected index.
345         * html/HTMLSelectElement.h:
346         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::scrollToRevealSelection): Instead of using the first and last selected indices,
347           use the active selection indices to determine which item to reveal.  This way, when you're selecting with the keyboard, or the mouse,
348           no unnecessary scrolling will occur if the end of your active selection is already visible.
349
350 2007-02-08  Adele Peterson  <adele@apple.com>
351
352         Reviewed by Hyatt.
353
354         Fix for <rdar://problem/4963411> Items of SELECT element are incorrectly highlighted when display:block is set
355
356         Test: fast/forms/select-block-background.html
357
358         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
359           Paint the item backgrounds during the PaintPhaseChildBlockBackground or PaintPhaseChildBlockBackgrounds phase.
360
361 2007-02-08  Mitz Pettel  <mitz@webkit.org>
362
363         Reviewed by Adele.
364
365         - fix http://bugs.webkit.org/show_bug.cgi?id=11047
366           REGRESSION: Empty options cause the entire select to collapse
367         
368         Test: fast/forms/select-empty-option-height.html
369
370         - fix http://bugs.webkit.org/show_bug.cgi?id=10783
371           REGRESSION (r16044): Clicking a popup changes layout around it
372
373         * rendering/RenderMenuList.cpp:
374         (WebCore::RenderMenuList::setText): If the option text is empty, use a RenderBR
375         as inner text, to ensure that the inner div has line height.
376
377 2007-02-08  Geoffrey Garen  <ggaren@apple.com>
378
379         Reviewed by Beth Dakin.
380
381         Added a hard counter for SubresourceLoaders because the leaks tool now
382         ignores them.
383         
384         * loader/SubresourceLoader.cpp:
385         (WebCore::):
386         (WebCore::SubresourceLoaderCounter::~SubresourceLoaderCounter):
387         (WebCore::SubresourceLoader::SubresourceLoader):
388         (WebCore::SubresourceLoader::~SubresourceLoader):
389         * page/Frame.cpp: Removed unnecessary #define
390
391 2007-02-08  Geoffrey Garen  <ggaren@apple.com>
392
393         Reviewed by Beth Dakin.
394
395         Fixed <rdar://problem/4982374> CSSComputedStyleDeclaration::getPropertyCSSValue 
396         leak reported by buildbot
397         
398         The leak was a typo: "new" instead of "return new". I also generously
399         deployed RefPtr in places that were holding ref-counted objects in
400         bare pointers.
401
402         * css/CSSComputedStyleDeclaration.cpp:
403         (WebCore::valueForShadow):
404         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
405
406 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
407
408         Reviewed by Adam Roben.
409
410         Linux/gdk build fixes.
411
412         * platform/gdk/EditorClientGdk.cpp: Added. Based on qt version.
413         (WebCore::EditorClientGdk::shouldDeleteRange):
414         (WebCore::EditorClientGdk::shouldShowDeleteInterface):
415         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
416         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
417         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
418         (WebCore::EditorClientGdk::shouldBeginEditing):
419         (WebCore::EditorClientGdk::shouldEndEditing):
420         (WebCore::EditorClientGdk::shouldInsertText):
421         (WebCore::EditorClientGdk::shouldApplyStyle):
422         (WebCore::EditorClientGdk::didBeginEditing):
423         (WebCore::EditorClientGdk::respondToChangedContents):
424         (WebCore::EditorClientGdk::didEndEditing):
425         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
426         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
427         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
428         (WebCore::EditorClientGdk::isEditable):
429         (WebCore::EditorClientGdk::registerCommandForUndo):
430         (WebCore::EditorClientGdk::registerCommandForRedo):
431         (WebCore::EditorClientGdk::clearUndoRedoOperations):
432         (WebCore::EditorClientGdk::canUndo):
433         (WebCore::EditorClientGdk::canRedo):
434         (WebCore::EditorClientGdk::undo):
435         (WebCore::EditorClientGdk::redo):
436         (WebCore::EditorClientGdk::shouldInsertNode):
437         (WebCore::EditorClientGdk::pageDestroyed):
438         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
439         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
440         (WebCore::EditorClientGdk::toggleGrammarChecking):
441         (WebCore::EditorClientGdk::handleKeyPress):
442         (WebCore::EditorClientGdk::EditorClientGdk):
443         (WebCore::EditorClientGdk::setPage):
444         * platform/gdk/EditorClientGdk.h: Added. Ditto.
445         * platform/gdk/FrameGdk.cpp: Add exitAfterLoading and dumpRenderTreeAfterLoading
446         as small debugging features. Remove FrameGdkClient as no other platform has Frame*Client
447         anymore. Adjust for new APIs.
448         (WebCore::FrameGdk::FrameGdk):
449         (WebCore::FrameGdk::onDidFinishLoad):
450         (WebCore::FrameGdk::dumpRenderTree):
451         (WebCore::FrameGdk::keyPress):
452         (WebCore::FrameGdk::handleGdkEvent):
453         (WebCore::FrameGdk::focusWindow):
454         (WebCore::FrameGdk::unfocusWindow):
455         (WebCore::FrameGdk::getObjectInstanceForWidget):
456         (WebCore::FrameGdk::getEmbedInstanceForWidget):
457         (WebCore::FrameGdk::bindingRootObject):
458         (WebCore::FrameGdk::print):
459         (WebCore::FrameGdk::getAppletInstanceForWidget):
460         (WebCore::FrameGdk::issueCutCommand):
461         (WebCore::FrameGdk::issueCopyCommand):
462         (WebCore::FrameGdk::issuePasteCommand):
463         (WebCore::FrameGdk::issueTransposeCommand):
464         (WebCore::FrameGdk::issuePasteAndMatchStyleCommand):
465         (WebCore::FrameGdk::markedTextRange):
466         (WebCore::FrameGdk::shouldChangeSelection):
467         (WebCore::FrameGdk::respondToChangedSelection):
468         (WebCore::FrameGdk::mimeTypeForFileName):
469         * platform/gdk/FrameGdk.h: Ditto.
470         (WebCore::FrameGdk::setExitAfterLoading):
471         (WebCore::FrameGdk::exitAfterLoading):
472         (WebCore::FrameGdk::setDumpRenderTreeAfterLoading):
473         (WebCore::FrameGdk::dumpRenderTreeAfterLoading):
474         (WebCore::GdkFrame):
475         * platform/gdk/TemporaryLinkStubs.cpp: Adjust to new APIs. Small cleanups.
476         (FrameView::updateBorder):
477         (Widget::setEnabled):
478         (Widget::isEnabled):
479         (Widget::enableFlushDrawing):
480         (Widget::removeFromParent):
481         (Widget::paint):
482         (Widget::setIsSelected):
483         (Widget::invalidate):
484         (Widget::invalidateRect):
485         (PlatformMouseEvent::PlatformMouseEvent):
486         (WebCore::findWordBoundary):
487         (ChromeClientGdk::chromeDestroyed):
488         (ChromeClientGdk::closeWindowSoon):
489         (ChromeClientGdk::canTakeFocus):
490         (ChromeClientGdk::takeFocus):
491         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
492         (ChromeClientGdk::addMessageToConsole):
493         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
494         (ChromeClientGdk::runJavaScriptAlert):
495         (ChromeClientGdk::runJavaScriptConfirm):
496         (ChromeClientGdk::runJavaScriptPrompt):
497         (ChromeClientGdk::setStatusbarText):
498         (ChromeClientGdk::shouldInterruptJavaScript):
499         (WebCore::inputElementAltText):
500         (WebCore::resetButtonDefaultLabel):
501         (WebCore::searchableIndexIntroduction):
502         (WebCore::fileButtonChooseFileLabel):
503         (WebCore::fileButtonNoFileSelectedLabel):
504         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
505         (WebCore::contextMenuItemTagDownloadLinkToDisk):
506         (WebCore::contextMenuItemTagCopyLinkToClipboard):
507         (WebCore::contextMenuItemTagOpenImageInNewWindow):
508         (WebCore::contextMenuItemTagDownloadImageToDisk):
509         (WebCore::contextMenuItemTagCopyImageToClipboard):
510         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
511         (WebCore::contextMenuItemTagCopy):
512         (WebCore::contextMenuItemTagGoBack):
513         (WebCore::contextMenuItemTagGoForward):
514         (WebCore::contextMenuItemTagStop):
515         (WebCore::contextMenuItemTagReload):
516         (WebCore::contextMenuItemTagCut):
517         (WebCore::contextMenuItemTagPaste):
518         (WebCore::contextMenuItemTagNoGuessesFound):
519         (WebCore::contextMenuItemTagIgnoreSpelling):
520         (WebCore::contextMenuItemTagLearnSpelling):
521         (WebCore::contextMenuItemTagSearchWeb):
522         (WebCore::contextMenuItemTagLookUpInDictionary):
523         (WebCore::contextMenuItemTagOpenLink):
524         (WebCore::contextMenuItemTagIgnoreGrammar):
525         (WebCore::contextMenuItemTagSpellingMenu):
526         (WebCore::contextMenuItemTagShowSpellingPanel):
527         (WebCore::contextMenuItemTagCheckSpelling):
528         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
529         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
530         (WebCore::contextMenuItemTagFontMenu):
531         (WebCore::contextMenuItemTagBold):
532         (WebCore::contextMenuItemTagItalic):
533         (WebCore::contextMenuItemTagUnderline):
534         (WebCore::contextMenuItemTagOutline):
535         (WebCore::contextMenuItemTagWritingDirectionMenu):
536         (WebCore::contextMenuItemTagDefaultDirection):
537         (WebCore::contextMenuItemTagLeftToRight):
538         (WebCore::contextMenuItemTagRightToLeft):
539         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
540         (PlugInInfoStore::pluginCount):
541         (WebCore::PlugInInfoStore::supportsMIMEType):
542         (WebCore::refreshPlugins):
543         (SearchPopupMenu::saveRecentSearches):
544         (SearchPopupMenu::loadRecentSearches):
545         (SearchPopupMenu::SearchPopupMenu):
546         (Path::apply):
547         (PlatformScrollbar::PlatformScrollbar):
548         (PlatformScrollbar::~PlatformScrollbar):
549         (PlatformScrollbar::width):
550         (PlatformScrollbar::height):
551         (PlatformScrollbar::setEnabled):
552         (PlatformScrollbar::paint):
553         (PlatformScrollbar::updateThumbPosition):
554         (PlatformScrollbar::updateThumbProportion):
555         (PlatformScrollbar::setRect):
556         (ResourceHandle::willLoadFromCache):
557         (ResourceHandle::loadsBlocked):
558         (ResourceHandle::loadResourceSynchronously):
559         (PageCache::close):
560         (Editor::ignoreSpelling):
561         (Editor::learnSpelling):
562         (Editor::isSelectionUngrammatical):
563         (Editor::isSelectionMisspelled):
564         (Editor::guessesForMisspelledSelection):
565         (Editor::guessesForUngrammaticalSelection):
566         (Editor::markMisspellingsAfterTypingToPosition):
567         (Editor::newGeneralClipboard):
568         (Pasteboard::generalPasteboard):
569         (Pasteboard::writeSelection):
570         (Pasteboard::writeURL):
571         (Pasteboard::clear):
572         (Pasteboard::canSmartReplace):
573         (Pasteboard::documentFragment):
574         (Pasteboard::plainText):
575         (Pasteboard::Pasteboard):
576         (Pasteboard::~Pasteboard):
577         (ContextMenu::ContextMenu):
578         (ContextMenu::~ContextMenu):
579         (ContextMenu::appendItem):
580         (ContextMenu::setPlatformDescription):
581         (ContextMenu::platformDescription):
582         (ContextMenuItem::ContextMenuItem):
583         (ContextMenuItem::~ContextMenuItem):
584         (ContextMenuItem::releasePlatformDescription):
585         (ContextMenuItem::type):
586         (ContextMenuItem::setType):
587         (ContextMenuItem::action):
588         (ContextMenuItem::setAction):
589         (ContextMenuItem::title):
590         (ContextMenuItem::setTitle):
591         (ContextMenuItem::platformSubMenu):
592         (ContextMenuItem::setSubMenu):
593         (ContextMenuItem::setChecked):
594         (ContextMenuItem::setEnabled):
595         (WebCore::systemBeep):
596         (WebCore::userIdleTime):
597
598 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
599
600         Reviewed by Adam Roben.
601
602         Linux/gdk build fixes.
603
604         * platform/GlyphPageTreeNode.h: Fix header guard name.
605         * platform/gdk/ChromeClientGdk.h:
606         * platform/gdk/CursorGdk.cpp:
607         (WebCore::verticalTextCursor):
608         (WebCore::cellCursor):
609         (WebCore::contextMenuCursor):
610         (WebCore::noDropCursor):
611         (WebCore::copyCursor):
612         (WebCore::progressCursor):
613         (WebCore::aliasCursor):
614         * platform/gdk/MouseEventGdk.cpp:
615         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
616         * platform/gdk/PageGdk.cpp: Removed. No longer used.
617         * platform/gdk/RenderThemeGdk.cpp:
618         (WebCore::RenderThemeGdk::getThemeData):
619         (WebCore::RenderThemeGdk::setCheckboxSize):
620         (WebCore::RenderThemeGdk::paintCheckbox):
621         (WebCore::RenderThemeGdk::setRadioSize):
622         (WebCore::RenderThemeGdk::paintRadio):
623         (WebCore::RenderThemeGdk::paintButton):
624         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
625         (WebCore::RenderThemeGdk::paintTextField):
626         (WebCore::RenderThemeGdk::paintTextArea):
627         (WebCore::RenderThemeGdk::systemFont):
628         * platform/gdk/RenderThemeGdk.h:
629         * platform/gdk/ScreenGdk.cpp:
630         (WebCore::screenDepth):
631         (WebCore::screenDepthPerComponent):
632         (WebCore::screenIsMonochrome):
633         (WebCore::screenRect):
634         (WebCore::screenAvailableRect):
635
636 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
637
638         Reviewed by Adam Roben.
639
640         Linux/gdk build fixes for cairo.
641
642         * platform/graphics/GraphicsContext.cpp:
643         * platform/graphics/cairo/GraphicsContextCairo.cpp:
644         (WebCore::GraphicsContext::GraphicsContext):
645         (WebCore::GraphicsContext::strokeArc):
646         (WebCore::GraphicsContext::drawFocusRing):
647         (WebCore::GraphicsContext::setFocusRingClip):
648         (WebCore::GraphicsContext::clearFocusRingClip):
649         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
650         (WebCore::GraphicsContext::origin):
651         (WebCore::GraphicsContext::setPlatformFillColor):
652         (WebCore::GraphicsContext::setPlatformStrokeColor):
653         (WebCore::GraphicsContext::setPlatformStrokeThickness):
654         (WebCore::GraphicsContext::setPlatformStrokeStyle):
655         (WebCore::GraphicsContext::setPlatformFont):
656         (WebCore::GraphicsContext::setURLForRect):
657         (WebCore::GraphicsContext::addRoundedRectClip):
658         (WebCore::GraphicsContext::addInnerRoundedRectClip):
659         (WebCore::GraphicsContext::setShadow):
660         (WebCore::GraphicsContext::clearShadow):
661         (WebCore::GraphicsContext::beginTransparencyLayer):
662         (WebCore::GraphicsContext::endTransparencyLayer):
663         (WebCore::GraphicsContext::clearRect):
664         (WebCore::GraphicsContext::strokeRect):
665         (WebCore::GraphicsContext::setLineCap):
666         (WebCore::GraphicsContext::setLineJoin):
667         (WebCore::GraphicsContext::setMiterLimit):
668         (WebCore::GraphicsContext::setAlpha):
669         (WebCore::toCairoOperator):
670         (WebCore::GraphicsContext::setCompositeOperation):
671         (WebCore::GraphicsContext::clip):
672         (WebCore::GraphicsContext::rotate):
673         (WebCore::GraphicsContext::scale):
674         (WebCore::GraphicsContext::clipOut):
675         (WebCore::GraphicsContext::clipOutEllipseInRect):
676         (WebCore::GraphicsContext::fillRoundedRect):
677
678 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
679
680         Reviewed by Adam Roben.
681
682         Linux/gdk build fixes.
683
684         * Projects/gdk/webcore-gdk.bkl:
685         * WebCoreSources.bkl:
686         * webcore-base.bkl:
687
688 2007-02-08  Brady Eidson  <beidson@apple.com>
689
690         Reviewed by Tim Hatcher
691
692         Tweaked the thread violation behavior to be disabled by default, and to provide
693         an easy breakpoint to set.  
694         The possibilities for the "WebCoreThreadCheck" user defaults key are -
695           - The value "None" disables thread checking
696           - The value "Log" causes an NSLog on a violation
697           - The value "Exception" causes exceptions to be raised on a violation
698
699         * platform/Logging.h:
700         * platform/mac/LoggingMac.mm:
701         (WebCore::_WebCoreThreadViolationCheck):
702         (WebCoreReportThreadViolation):  In the global namespace, making breakpoints cake!
703
704 2007-02-08  Brady Eidson  <beidson@apple.com>
705
706         Reviewed by Tim Hatcher
707
708         <rdar://problem/4983515> Need mechanism to protect against WebKit calls from secondary threads
709         This initial landing is a conservative move until we can be certain of performance impact.
710         By writing to the user defaults key @"WebCoreThreadCheck" for the WebKit app you're running -
711           - The value "None" disables thread checking
712           - The value "Exception" causes exceptions to be raised on a violation
713           - The default is to do the check, and NSLog each violation
714
715         * bindings/objc/ExceptionHandlers.h:  Add a "Is Main Thread" assert macro
716         * bindings/scripts/CodeGeneratorObjC.pm: Use new mechanism in allocs and deallocs for now
717
718         * platform/Logging.h: Added WebCoreThreadViolationCheck macro
719         * platform/mac/LoggingMac.mm:
720         (WebCore::_WebCoreThreadViolationCheck): Check for main-threadedness, and do some stuff
721
722 2007-02-08  Kevin McCullough  <KMcCullough@apple.com>
723
724         Reviewed by Maciej, Darin, and Mark.
725
726         rdar://problem/4922454
727         - Prevents remote sites from executing local scripts.
728
729         * bindings/objc/DOM.mm: - renamed a function that is now in the base class
730         (-[DOMElement image]):
731         (-[DOMElement _imageTIFFRepresentation]):
732         * dom/XMLTokenizer.cpp: - removed needless asserts
733         (WebCore::XMLTokenizer::notifyFinished):
734         * html/HTMLImageLoader.cpp: - renamed a function that is now in the base class
735         (WebCore::HTMLImageLoader::dispatchLoadEvent):
736         * html/HTMLTokenizer.cpp: - removed needless asserts
737         (WebCore::HTMLTokenizer::reset):
738         (WebCore::HTMLTokenizer::notifyFinished):
739         * ksvg2/misc/SVGImageLoader.cpp: - renamed a function that is now in the base class
740         (WebCore::SVGImageLoader::dispatchLoadEvent):
741         * loader/Cache.cpp: - return early if an error occured
742         (WebCore::Cache::requestResource):
743         (WebCore::Cache::remove):
744         * loader/CachedImage.h: - renamed a function that is now in the base class
745         (WebCore::CachedImage::canRender):
746         * loader/CachedResource.h: - renamed a function that is now in the base class
747         (WebCore::CachedResource::errorOccurred):
748         * loader/CachedScript.h: - renamed a function that is now in the base class 
749         (WebCore::CachedScript::schedule):
750         * loader/DocLoader.cpp: - The heart of the fix, prevents resources from being created or retrieved from the cache if a remote site is requesting the local resource.
751         (WebCore::DocLoader::requestResource):
752         (WebCore::DocLoader::setLoadInProgress):
753         * page/EventHandler.cpp: - renamed a function that is now in the base class
754         (WebCore::selectCursor):
755         * rendering/HitTestResult.cpp: - renamed a function that is now in the base class
756         (WebCore::HitTestResult::image):
757         * rendering/RenderImage.cpp: - renamed a function that is now in the base class
758         (WebCore::RenderImage::setCachedImage):
759         (WebCore::RenderImage::imageChanged):
760         (WebCore::RenderImage::paint):
761         (WebCore::RenderImage::layout):
762         (WebCore::RenderImage::calcAspectRatioWidth):
763         (WebCore::RenderImage::calcAspectRatioHeight):
764         * rendering/RenderImage.h: - renamed a function that is now in the base class
765         (WebCore::RenderImage::errorOccurred):
766         * rendering/RenderListItem.cpp: - renamed a function that is now in the base class
767         (WebCore::RenderListItem::setStyle):
768         * rendering/RenderListMarker.cpp: - renamed a function that is now in the base class
769         (WebCore::RenderListMarker::isImage):
770
771 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
772
773         Reviewed by Maciej.
774
775         Add updateGeometry() to gdk's ScrollView. Needed to fix resizing of the window
776         in gdk.
777
778         * platform/ScrollView.h:
779         * platform/gdk/ScrollViewGdk.cpp:
780         (WebCore::ScrollView::updateGeometry):
781         (WebCore::ScrollView::setDrawable):
782
783 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
784
785         Reviewed by Maciej.
786
787         Linux/gdk build fixes.
788
789         * platform/ContextMenuItem.h:
790         * platform/PlatformMenuDescription.h:
791         * platform/gdk/PopupMenuGdk.cpp: Added. Renamed from RenderPopupMenuGdk.cpp for
792         consistency with other platforms.
793         (WebCore::PopupMenu::PopupMenu):
794         (WebCore::PopupMenu::~PopupMenu):
795         * platform/gdk/RenderPopupMenuGdk.cpp: Removed.
796         * platform/gdk/RenderPopupMenuGdk.h: Removed.
797
798 2007-02-07  Mitz Pettel  <mitz@webkit.org>
799
800         Reviewed by Maciej.
801
802         - fix http://bugs.webkit.org/show_bug.cgi?id=12608
803           Incorrect min. width calculation of a series of floats with clear:both and white-space:nowrap
804
805         Test: fast/block/float/nowrap-clear-min-width.html
806
807         * rendering/RenderBlock.cpp:
808         (WebCore::RenderBlock::calcInlineMinMaxWidth):
809
810 2007-02-07  Mitz Pettel  <mitz@webkit.org>
811
812         Reviewed by Dave Hyatt.
813
814         - fix http://bugs.webkit.org/show_bug.cgi?id=10522
815           REGRESSION: Incomplete repaint after table relayout that decreases height
816
817         Test: fast/repaint/intermediate-layout-position.html
818
819         * rendering/RenderBlock.cpp:
820         (WebCore::RenderBlock::layoutBlock): Adjust the old bounds by the layout delta,
821         to get the block's absolute bounds as they were before its ancestors moved it
822         during layout.
823         (WebCore::RenderBlock::collapseMargins): Update the layout delta for the child
824         when moving it.
825         (WebCore::RenderBlock::clearFloatsIfNeeded): Ditto.
826         (WebCore::RenderBlock::determineHorizontalPosition): Ditto.
827         (WebCore::RenderBlock::layoutBlockChildren): Ditto.
828         * rendering/RenderFlexibleBox.cpp:
829         (WebCore::RenderFlexibleBox::layoutBlock): Adjust the old bounds by the current
830         layout delta.
831         * rendering/RenderHTMLCanvas.cpp:
832         (WebCore::RenderHTMLCanvas::layout): Ditto.
833         * rendering/RenderImage.cpp:
834         (WebCore::RenderImage::layout): Ditto.
835         * rendering/RenderTable.cpp:
836         (WebCore::RenderTable::layout): Ditto.
837         * rendering/RenderView.h:
838         (WebCore::RenderView::layoutDelta): Added. Keeps track of the offset between
839         the position of the object currently being laid out and its position at the
840         end of the last layout.
841         (WebCore::RenderView::addLayoutDelta): Added.
842
843 2007-02-07  Christopher Brichford  <chrisb@adobe.com>
844
845         Reviewed by Brady.
846
847         http://bugs.webkit.org/show_bug.cgi?id=6286
848         Very large (~500MB) images cause reproducible Safari crash
849
850         * loader/CachedImage.cpp: 
851         (WebCore::CachedImage::bufferData): Detect failure to create a
852         large Vector<> and call error() when that happens.
853
854 2007-02-07  Mitz Pettel  <mitz@webkit.org>
855
856         Reviewed by Dave Hyatt.
857
858         - fix http://bugs.webkit.org/show_bug.cgi?id=5399
859           no-repeat on negatively positioned background images are ignored
860
861         Test: fast/backgrounds/repeat/negative-offset-repeat.html
862
863         - fix http://bugs.webkit.org/show_bug.cgi?id=5821
864           Changing background of <col> doesn't repaint the column
865
866         Test: fast/repaint/table-col-background.html
867
868         - fix http://bugs.webkit.org/show_bug.cgi?id=11720
869           REGRESSION: large amounts of CPU consumed viewing this site
870
871         * rendering/RenderBox.cpp:
872         (WebCore::RenderBox::imageChanged): Added. Finds the border and/or background
873         layer(s) that use the image and invalidates only the rect in which the image
874         actually paints. There are two special cases in this function: 1) for the body
875         element, the background is propagated to the root; 2) inline flows do a full
876         repaint.
877         (WebCore::RenderBox::calculateBackgroundImageGeometry): Added. Factored out,
878         simplified and corrected the calculation of the rectangle into which the background
879         image paints, the tile size and the pattern phase.
880         (WebCore::RenderBox::paintBackgroundExtended):
881         * rendering/RenderBox.h:
882         * rendering/RenderObject.cpp:
883         * rendering/RenderObject.h:
884         (WebCore::RenderObject::imageChanged): Moved the implementation to RenderBox.
885         * rendering/RenderTableCol.cpp:
886         (WebCore::RenderTableCol::getAbsoluteRepaintRect): Overridden to return the
887         table's repaint rect.
888         (WebCore::RenderTableCol::imageChanged): Overridden to do a full repaint, which
889         currently repaints the entire table.
890         * rendering/RenderTableCol.h:
891         * rendering/RenderTableRow.cpp:
892         (WebCore::RenderTableRow::imageChanged): Overridden to do a full repaint
893         of the row, since the backgrounds are painted by the cells.
894         * rendering/RenderTableRow.h:
895         * rendering/RenderTableSection.cpp:
896         (WebCore::RenderTableSection::imageChanged): Overridden to do a full
897         repaint of the section, since the backgrounds are painted by the cells.
898         * rendering/RenderTableSection.h:
899
900 2007-02-07  Anders Carlsson  <acarlsson@apple.com>
901
902         Reviewed by Maciej.
903
904         Move shouldInterruptJavaScript to the Chrome.
905
906         * bindings/js/kjs_binding.cpp:
907         (KJS::ScriptInterpreter::shouldInterruptScript):
908         * page/Chrome.cpp:
909         (WebCore::Chrome::shouldInterruptJavaScript):
910         * page/Chrome.h:
911         * page/ChromeClient.h:
912         * page/Frame.h:
913         * page/mac/FrameMac.h:
914         * page/mac/FrameMac.mm:
915         * page/mac/WebCoreFrameBridge.h:
916         * platform/graphics/svg/SVGImageEmptyClients.h:
917         (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
918
919 2007-02-07  Darin Adler  <darin@apple.com>
920
921         Reviewed by Maciej.
922
923         - <rdar://problem/4826861> WebKit tests show memory leaks in NSHTMLReader, caused by method named "hash"
924
925         * bindings/scripts/CodeGeneratorObjC.pm: Added a list of method names we should never use, since they
926         are in base classes WebScriptObject and NSObject. Luckily, only "hash" is causing trouble. Added
927         "hash" to the existing special case for "id". Now "hash" is "hashName" just as "id" is "idName".
928
929 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
930
931         Reviewed by Adam Roben.
932
933         Linux/gdk build fixes for graphics-related stuff.
934
935         * platform/graphics/cairo/ImageCairo.cpp:
936         (WebCore::BitmapImage::checkForSolidColor):
937         * platform/graphics/cairo/ImageSourceCairo.cpp:
938         (WebCore::ImageSource::setData):
939         * platform/graphics/gdk/ImageGdk.cpp:
940         (WebCore::BitmapImage::initPlatformData):
941         (WebCore::BitmapImage::invalidatePlatformData):
942         (WebCore::Image::loadPlatformResource):
943         (WebCore::Image::drawPattern):
944
945 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
946
947         Reviewed by Maciej.
948
949         Linux/gdk build fixes related to networking.
950
951         * platform/network/ResourceHandleInternal.h: Add accessor for m_client.
952         (WebCore::ResourceHandleInternal::client):
953         * platform/network/gdk/ResourceHandleCurl.cpp: Add missing functions and
954         massage for changed APIs.
955         (WebCore::ResourceHandle::start):
956         (WebCore::ResourceHandle::cancel):
957         (WebCore::ResourceHandle::bufferedData):
958         (WebCore::ResourceHandle::supportsBufferedData):
959         (WebCore::ResourceHandle::setDefersLoading):
960         * platform/network/gdk/ResourceHandleManager.cpp: Rename get() to
961         sharedInstance(). Massaged for changed APIs.
962         (WebCore::ResourceHandleManager::sharedInstance):
963         (WebCore::writeCallback):
964         (WebCore::ResourceHandleManager::downloadTimerCallback):
965         (WebCore::ResourceHandleManager::remove):
966         * platform/network/gdk/ResourceHandleManager.h: Ditto.
967
968 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
969
970         Reviewed by Maciej.
971
972         Mismatched type of alloc/free function crashes gdk build.
973
974         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
975         (WebCore::JPEGImageReader::close):
976
977 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
978
979         Reviewed by Adam Roben.
980
981         Linux/gdk build fixes - add file based on qt implementation.
982
983         * platform/DragData.h:
984         * platform/gdk/DragDataGdk.cpp: Added.
985
986 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
987
988         Reviewed by Adam Roben.
989
990         Linux/gdk build fixes - add new files based on qt implementation.
991
992         * page/gdk/DragControllerGdk.cpp: Added.
993         (WebCore::DragController::dragOperation):
994         * page/gdk/EventHandlerGdk.cpp: Added.
995         (WebCore::EventHandler::focusDocumentView):
996         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
997         (WebCore::EventHandler::handleDrag):
998         (WebCore::EventHandler::eventActivatedView):
999
1000 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1001
1002         Reviewed by Adam Roben.
1003
1004         Linux/gdk build fixes - add new files based on Qt implementation.
1005
1006         * loader/gdk/DocumentLoaderGdk.cpp: Added.
1007         (WebCore::DocumentLoader::getResponseModifiedHeader):
1008         * loader/gdk/FrameLoaderClientGdk.cpp: Added.
1009         (WebCore::FrameLoaderClientGdk::FrameLoaderClientGdk):
1010         (WebCore::FrameLoaderClientGdk::frame):
1011         (WebCore::FrameLoaderClientGdk::userAgent):
1012         (WebCore::FrameLoaderClientGdk::createDocumentLoader):
1013         (WebCore::FrameLoaderClientGdk::dispatchWillSubmitForm):
1014         (WebCore::FrameLoaderClientGdk::committedLoad):
1015         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
1016         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
1017         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
1018         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
1019         (WebCore::FrameLoaderClientGdk::postProgressStartedNotification):
1020         (WebCore::FrameLoaderClientGdk::postProgressEstimateChangedNotification):
1021         (WebCore::FrameLoaderClientGdk::postProgressFinishedNotification):
1022         (WebCore::FrameLoaderClientGdk::frameLoaderDestroyed):
1023         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveResponse):
1024         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForMIMEType):
1025         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForNewWindowAction):
1026         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForNavigationAction):
1027         (WebCore::FrameLoaderClientGdk::createPlugin):
1028         (WebCore::FrameLoaderClientGdk::createFrame):
1029         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
1030         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
1031         (WebCore::FrameLoaderClientGdk::objectContentType):
1032         (WebCore::FrameLoaderClientGdk::overrideMediaType):
1033         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
1034         (WebCore::FrameLoaderClientGdk::setMainFrameDocumentReady):
1035         (WebCore::FrameLoaderClientGdk::hasWebView):
1036         (WebCore::FrameLoaderClientGdk::hasFrameView):
1037         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoad):
1038         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
1039         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
1040         (WebCore::FrameLoaderClientGdk::makeDocumentView):
1041         (WebCore::FrameLoaderClientGdk::makeRepresentation):
1042         (WebCore::FrameLoaderClientGdk::forceLayout):
1043         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
1044         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
1045         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
1046         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
1047         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
1048         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
1049         (WebCore::FrameLoaderClientGdk::loadedFromPageCache):
1050         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
1051         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
1052         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
1053         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
1054         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
1055         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
1056         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
1057         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
1058         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
1059         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
1060         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
1061         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
1062         (WebCore::FrameLoaderClientGdk::dispatchShow):
1063         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
1064         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
1065         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
1066         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
1067         (WebCore::FrameLoaderClientGdk::willChangeTitle):
1068         (WebCore::FrameLoaderClientGdk::didChangeTitle):
1069         (WebCore::FrameLoaderClientGdk::finishedLoading):
1070         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
1071         (WebCore::FrameLoaderClientGdk::setDefersLoading):
1072         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
1073         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
1074         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
1075         (WebCore::FrameLoaderClientGdk::canHandleRequest):
1076         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
1077         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
1078         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
1079         (WebCore::FrameLoaderClientGdk::restoreScrollPositionAndViewState):
1080         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
1081         (WebCore::FrameLoaderClientGdk::didFinishLoad):
1082         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
1083         (WebCore::FrameLoaderClientGdk::setTitle):
1084         (WebCore::FrameLoaderClientGdk::setDocumentViewFromPageCache):
1085         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
1086         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
1087         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
1088         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
1089         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
1090         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
1091         (WebCore::FrameLoaderClientGdk::download):
1092         (WebCore::FrameLoaderClientGdk::cancelledError):
1093         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
1094         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
1095         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
1096         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
1097         (WebCore::FrameLoaderClientGdk::shouldFallBack):
1098         (WebCore::FrameLoaderClientGdk::willUseArchive):
1099         (WebCore::FrameLoaderClientGdk::saveScrollPositionAndViewStateToItem):
1100         (WebCore::FrameLoaderClientGdk::saveDocumentViewToPageCache):
1101         (WebCore::FrameLoaderClientGdk::canCachePage):
1102         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
1103         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
1104         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
1105         (WebCore::FrameLoaderClientGdk::startDownload):
1106         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
1107         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
1108         (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem):
1109         * loader/gdk/FrameLoaderClientGdk.h: Added.
1110         (WebCore::FrameLoaderClientGdk::~FrameLoaderClientGdk):
1111         (WebCore::FrameLoaderClientGdk::setFrame):
1112
1113 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1114
1115         Reviewed by Maciej.
1116
1117         Linux/gdk fixes related to fonts.
1118
1119         * platform/gdk/FontDataGdk.cpp:
1120         (WebCore::FontData::platformInit): remove a work-around for older cairo versions
1121         since Ubuntu 6.10 ships with cairo that is new enough
1122         * platform/gdk/FontGdk.cpp:
1123         (WebCore::Font::drawGlyphs):
1124         * platform/gdk/FontPlatformDataGdk.cpp: Remove unused variables.
1125         (WebCore::FontPlatformData::FontPlatformData):
1126
1127 2007-02-07  Alexey Proskuryakov  <ap@webkit.org>
1128
1129         Reviewed by Darin.
1130
1131         http://bugs.webkit.org/show_bug.cgi?id=12582
1132         REGRESSION: Unclosed <title> makes the window display garbage or empty title
1133
1134         Automatic testing is not possible, and manual testing probably doesn't make sense.
1135
1136         * loader/DocumentLoader.cpp:
1137         (WebCore::canonicalizedTitle): Bail out early if the passed in string is all whitespace.
1138
1139 2007-02-06  Anders Carlsson  <acarlsson@apple.com>
1140
1141         Reviewed by John Sullivan.
1142
1143         <rdar://problem/4977952>
1144         REGRESSION: Yahoo Messenger IM is totally blank
1145         
1146         * loader/FrameLoader.cpp:
1147         (WebCore::FrameLoader::checkContentPolicy):
1148         Don't ask the policy delegate for content that has valid substitute data.
1149         
1150         (WebCore::FrameLoader::checkNavigationPolicy):
1151         If the loader has substitute data but doesn't have an unreachable URL, let the policy
1152         delegate decide what to do.
1153
1154 2007-02-07  Geoffrey Garen  <ggaren@apple.com>
1155
1156         Reviewed by Darin Adler.
1157
1158         Restoring some of the functionality I removed in r19445. It's insufficient for
1159         each page to cancel keepAlive only for its child frames, because a frame
1160         can be removed from the page before we get a chance to cancel its keepAlive.
1161         So, the page destructor has to cancel keepAlive for all frames. This is safe
1162         because we prohibit closing a WebView while JavaScript is executing.
1163
1164         * page/Frame.cpp:
1165         (WebCore::keepAliveSet):
1166         (WebCore::Frame::keepAlive):
1167         (WebCore::Frame::cancelAllKeepAlive):
1168         (WebCore::Frame::lifeSupportTimerFired):
1169         * page/Frame.h:
1170         * page/Page.cpp:
1171         (WebCore::Page::~Page):
1172
1173 2007-02-07  Alexey Proskuryakov  <ap@webkit.org>
1174
1175         Reviewed by Darin.
1176
1177         http://bugs.webkit.org/show_bug.cgi?id=12603
1178         A crash when trying to use XPath functions normalize-space(), string-length() and number()
1179
1180         Test: fast/xpath/implicit-node-args.html
1181
1182         * xml/XPathFunctions.cpp:
1183         (WebCore::XPath::FunNumber::doEvaluate): Implemented zero parameter case.
1184         (WebCore::XPath::FunctionMapping::): Corrected descriptions of these functions, as they
1185         do allow zero parameters.
1186         (WebCore::XPath::createFunction): Combined the two failure cases to ensure that this
1187         function never returns 0.
1188
1189 2007-02-07  Zack Rusin  <zrusin@trolltech.com>
1190
1191         Fix compilation
1192
1193         * page/qt/EventHandlerQt.cpp:
1194         (WebCore::EventHandler::eventActivatedView):
1195
1196 2007-02-06  Alice Liu  <alice.liu@apple.com>
1197
1198         Reviewed by Maciej.
1199
1200         Added editing command functions for scrolling by page and moving the caret
1201
1202         * editing/Editor.cpp:
1203         (WebCore::execMoveUpByPageAndModifyCaret):
1204         (WebCore::execMoveDownByPageAndModifyCaret):
1205         (WebCore::CommandEntry::):
1206
1207 2007-02-06  Justin Garcia  <justin.garcia@apple.com>
1208
1209         Reviewed by john
1210
1211         <rdar://problem/4922367>
1212         WebView selectLine: followed by deleteBackward: deletes TABLE element of following line
1213
1214         * editing/AppendNodeCommand.cpp:
1215         (WebCore::AppendNodeCommand::doApply): Don't ASSERT when manipulating
1216         non-editable content that is embedded in editable content.  We'll do 
1217         this kind of manipulation when removing redundant style spans after
1218         pasting content that has non-editable pieces.
1219         * editing/InsertNodeBeforeCommand.cpp:
1220         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
1221         * editing/htmlediting.cpp:
1222         (WebCore::isContentEditable): Added, wrapper for Node::isContentEditable
1223         (WebCore::rangeCompliantEquivalent): Although legal, 
1224         [{table, select, etc.}, {0, numChildren}] don't refer to children of the element, 
1225         but positions before and after the element.  So, rangeCompliantEquivalent is 
1226         really responsible for converting illegal positions *and* legal positions 
1227         that have a special meaning internally.
1228         * editing/htmlediting.h:
1229
1230 2007-02-06  Anders Carlsson  <acarlsson@apple.com>
1231
1232         Reviewed by Brady.
1233
1234         * platform/String.cpp:
1235         (WebCore::String::ascii):
1236         Fix dumping null Strings.
1237
1238 2007-02-06  Anders Carlsson  <acarlsson@apple.com>
1239
1240         Reviewed by Geoff.
1241
1242         Fix <rdar://problem/4979484>
1243         
1244         * css/CSSPrimitiveValue.cpp:
1245         (WebCore::isCSSTokenizerIdentifier):
1246         Do the range check before calling isalpha or isalnum.
1247
1248 2007-02-06  Geoffrey Garen  <ggaren@apple.com>
1249
1250         Reviewed by Darin Adler.
1251
1252         Fixed Frame/RenderObject/Node leak report seen while running SVG image tests.
1253         (We'll need this fix if we ever re-enable SVG image.)
1254         
1255         The extra reference belonged to the Frame keepAlive timer (so this was
1256         not a "real" leak, in the end). The Page destructor has code to cancel all 
1257         Frame keepAlive timers upon the destruction of the last Page, but an SVG 
1258         image puts a Page within a Page, making this condition impossible to meet.
1259         
1260         The fix here is to have each individual page cancel the keepAlive timers 
1261         belonging to its child frames.
1262         
1263         * page/Frame.cpp: Changed the FrameCounter to use WTF logging.
1264         (WebCore::): Nixed the lifeSupportSet, since it's no longer used.
1265         (WebCore::Frame::cancelKeepAlive): Renamed from "endLifeSupport" to match
1266         the name "keepAlive".
1267         * page/Page.cpp:
1268         (WebCore::Page::~Page): Made each page cancel its child keepAlive timers 
1269         and clear its mainFrame, since we may never reach the condition of having 0 Pages.
1270
1271 2007-02-06  Adam Roben  <aroben@apple.com>
1272
1273         Rubberstamped by Brady.
1274
1275         Revert the log channel constants to their old values for all you pretty
1276         people out there who were using the old ones. I also renamed
1277         LogResources to LogPlatformLeaks to be a bit more specific.
1278
1279         * platform/Logging.cpp:
1280         (WebCore::):
1281         * platform/Logging.h:
1282
1283 2007-02-05  Justin Garcia  <justin.garcia@apple.com>
1284
1285         Reviewed by john
1286
1287         <rdar://problem/4959067>
1288         Bullets get erased or moved down to another line
1289         <rdar://problem/4912529>
1290         Seed: Bulleted list in Note in Mail.app does not work with Japanese input mode
1291         
1292         Do not expand the selection to include fully selected 
1293         special elements when insering text over a selection.
1294
1295         * editing/CompositeEditCommand.cpp:
1296         (WebCore::CompositeEditCommand::deleteSelection): Pass
1297         expandForSpecialElements through to DeleteSelectionCommand's constructor.
1298         (WebCore::CompositeEditCommand::moveParagraphs): Use the 
1299         convenience function.
1300         * editing/CompositeEditCommand.h:
1301         * editing/DeleteSelectionCommand.h:
1302         * editing/InsertTextCommand.cpp:
1303         (WebCore::InsertTextCommand::input): Do not expand the selection
1304         to be deleted for special elements.
1305         * editing/ReplaceSelectionCommand.cpp:
1306         (WebCore::ReplaceSelectionCommand::doApply): Added a FIXME about 
1307         when we should expand the selection.
1308
1309 2007-02-06  Geoffrey Garen  <ggaren@apple.com>
1310
1311         Reviewed by Anders Carlsson.
1312         
1313         Disabled support for SVG image because it crashes all the time.
1314
1315         * loader/CachedImage.cpp:
1316         (WebCore::CachedImage::createImage):
1317
1318 2007-02-06  Mitz Pettel  <mitz@webkit.org>
1319
1320         Reviewed by Darin.
1321
1322         - fix http://bugs.webkit.org/show_bug.cgi?id=12518
1323           Betsson.com crashes browser
1324
1325         Test: fast/layers/generated-layer-scrollbar-crash.html
1326
1327         * rendering/RenderLayer.cpp:
1328         (WebCore::RenderLayer::createScrollbar): Changed element()->document() to
1329         document() to work with anonymous objects.
1330         (WebCore::RenderLayer::updateOverflowStatus): Ditto.
1331
1332 2007-02-06  Eric Seidel  <eric@webkit.org>
1333
1334         Reviewed by mitz.
1335
1336         WebKit ignores floating point values for stroke-miterlimit
1337         http://bugs.webkit.org/show_bug.cgi?id=12577
1338         
1339         Test: svg/W3C-SVG-1.1/painting-stroke-07-t.svg
1340
1341         * ksvg2/css/SVGCSSParser.cpp:
1342         (WebCore::CSSParser::parseSVGValue):
1343         * ksvg2/css/SVGCSSStyleSelector.cpp:
1344         (WebCore::CSSStyleSelector::applySVGProperty):
1345         * ksvg2/css/SVGRenderStyle.h:
1346         * ksvg2/css/SVGRenderStyleDefs.h:
1347         (WebCore::StyleStrokeData::operator!=):
1348
1349 2007-02-06  Adam Roben  <aroben@apple.com>
1350
1351         Reviewed by Ada and Oliver.
1352
1353         Adding a new LogResources channel for tracking platform resource usage.
1354
1355         * platform/Logging.cpp: Added new channel, cleaned up constants to be more readable.
1356         * platform/Logging.h: Declare new channel.
1357
1358 2007-02-06  Alexey Proskuryakov  <ap@webkit.org>
1359
1360         Reviewed by Geoff.
1361
1362         http://bugs.webkit.org/show_bug.cgi?id=12619
1363         Non-abbreviated XPaths don't work
1364
1365         Test: fast/xpath/ancestor-axis.html
1366
1367         * xml/XPathParser.cpp:
1368         (WebCore::XPath::Parser::lex): Fix axis name parsing to actually work.
1369         * xml/XPathStep.cpp:
1370         (WebCore::XPath::Step::nodeTestMatches): Fix "*" node test to actually work.
1371
1372 2007-02-06  Mark Rowe  <mrowe@apple.com>
1373
1374         Roll out incomplete support for font-stretch (r19350) at Dave Hyatt's request.
1375         See http://bugs.webkit.org/show_bug.cgi?id=12530#c9 for more info.
1376
1377         * css/CSSComputedStyleDeclaration.cpp:
1378         (WebCore::):
1379         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1380         * css/cssparser.cpp:
1381         (WebCore::CSSParser::parseValue):
1382         * css/cssstyleselector.cpp:
1383         (WebCore::CSSStyleSelector::applyDeclarations):
1384         (WebCore::CSSStyleSelector::applyProperty):
1385         * platform/FontCache.cpp:
1386         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1387         (WebCore::FontPlatformDataCacheKey::operator==):
1388         (WebCore::computeHash):
1389         (WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
1390         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
1391         (WebCore::FontCache::getCachedFontPlatformData):
1392         * platform/FontDescription.h:
1393         (WebCore::FontDescription::FontDescription):
1394         (WebCore::FontDescription::weight):
1395         (WebCore::FontDescription::setWeight):
1396         (WebCore::FontDescription::operator==):
1397         * platform/mac/FontCacheMac.mm:
1398         (WebCore::FontCache::createFontPlatformData):
1399         * platform/mac/WebFontCache.mm:
1400         (acceptableChoice):
1401         (betterChoice):
1402         (+[WebFontCache fontWithFamily:traits:size:]):
1403
1404 2007-02-05  Adele Peterson  <adele@apple.com>
1405
1406         Reviewed by Darin.
1407
1408         A few small updates to my bidi patch.
1409
1410         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): Moved the declaration of the CharacterBuffer outside the if statement since we use its data outside that scope.
1411         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): ditto.
1412         * rendering/bidi.cpp: (WebCore::RenderBlock::bidiReorderCharacters): Used a PassRefPtr for the BidiContext.
1413
1414 2007-02-05  Adele Peterson  <adele@apple.com>
1415
1416         Reviewed by Adam.
1417
1418         Fix for assertion failure in fast/events/objc-keyboard-event-creation.html
1419
1420         * html/HTMLInputElement.cpp:
1421         (WebCore::HTMLInputElement::selectionStart): Check that the selection offsets are not equal to -1 (which is means the selection has never been set) instead of checking for >= 0.
1422         (WebCore::HTMLInputElement::selectionEnd): ditto.
1423         (WebCore::HTMLInputElement::setValue): ditto.
1424         (WebCore::HTMLInputElement::selection): Return an empty selection if the input is not a text field or if no selection has ever been set in the text field.
1425         * html/HTMLTextAreaElement.cpp:
1426         (WebCore::HTMLTextAreaElement::selectionStart): Check that the selection offsets are not equal to -1.
1427         (WebCore::HTMLTextAreaElement::selectionEnd): ditto.
1428         (WebCore::HTMLTextAreaElement::setValue): ditto.
1429         (WebCore::HTMLTextAreaElement::selection): Return an empty selection if no selection has ever been set in the textarea.
1430
1431         * dom/Position.cpp: Added FIXMEs that we should catch the negative offset earlier.
1432         (WebCore::Position::previous):
1433         (WebCore::Position::next):
1434
1435 2007-02-05  Justin Garcia  <justin.garcia@apple.com>
1436
1437         Reviewed by harrison
1438
1439         <rdar://problem/4947387>
1440         REGRESSION Shift Command Left should only select to the beginning of the line
1441
1442         * editing/Editor.cpp:
1443         (WebCore::CommandEntry::): Never copy/paste code.
1444
1445 2007-02-05  Darin Adler  <darin@apple.com>
1446
1447         Reviewed by John Sullivan.
1448
1449         - fix http://bugs.webkit.org/show_bug.cgi?id=11535
1450           <rdar://problem/4946959> REGRESSION: onclick="this.select();" not working on new forms (11535)
1451
1452         Test: fast/forms/input-select-on-click.html
1453
1454         * page/EventHandler.h: Added m_mouseDownWasSingleClickInSelection boolean.
1455         Organized other booleans a bit more logically.
1456         * page/EventHandler.cpp:
1457         (WebCore::EventHandler::EventHandler): Rearrange order to match EventHandler.h, add
1458         m_mouseDownWasSingleClickInSelection initialization.
1459         (WebCore::EventHandler::handleMousePressEventSingleClick): Set m_mouseDownWasSingleClickInSelection
1460         to true in the appropriate special case.
1461         (WebCore::EventHandler::handleMousePressEvent): Set m_mouseDownWasSingleClickInSelection to false.
1462         (WebCore::EventHandler::handleMouseReleaseEvent): Change code to clear selection or set to caret to
1463         only fire if m_mouseDownWasSingleClickInSelection was true rather than firing for any
1464         m_mouseDownMayStartSelect case.
1465
1466 2007-02-05  George Staikos  <staikos@kde.org>
1467
1468         Reviewed by Maciej.
1469
1470         Send HTTP cookies.
1471
1472         * platform/network/qt/ResourceHandleManagerQt.cpp:
1473         (WebCore::RequestQt::RequestQt):
1474
1475 2007-02-05  Adele Peterson  <adele@apple.com>
1476
1477         Reviewed by Mitz and Anders.
1478
1479         Fix for http://bugs.webkit.org/show_bug.cgi?id=11811
1480         <rdar://problem/4947184> REGRESSION (r11783): Hebrew text in list boxes is reversed
1481
1482         http://bugs.webkit.org/show_bug.cgi?id=11812
1483         <rdar://problem/4960269> REGRESSION (Native file upload): Hebrew filenames are reversed
1484
1485         Tests: 
1486         fast/text/international/bidi-listbox.html
1487         fast/text/international/bidi-listbox-atsui.html
1488
1489         * rendering/RenderBlock.h: Added static bidiReorderCharacters that will run the bidi algorithm on a character buffer.
1490         * rendering/bidi.cpp:
1491         (WebCore::RenderBlock::bidiReorderCharacters): Added. Creates an anonymous RenderBlock and RenderText to feed into bidiReorderLines.
1492         (WebCore::RenderBlock::constructLine): Uses the new convenience methods on BidiRun.
1493         * rendering/bidi.h:
1494         (WebCore::BidiRun::reversed): Added convenience method.
1495         (WebCore::BidiRun::dirOverride): ditto.
1496
1497         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): Creates a buffer and calls bidiReorderCharacters
1498           to get a correctly ordered character buffer for drawText.
1499         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): ditto.
1500
1501 2007-02-05  Mitz Pettel  <mitz@webkit.org>
1502
1503         Reviewed by Darin.
1504
1505         - fix http://bugs.webkit.org/show_bug.cgi?id=12590
1506           REGRESSION: Text selection is weird in textareas in Trac wiki editing pages
1507
1508         Test: fast/repaint/selection-gap-overflow-scroll.html
1509
1510         * rendering/RenderBlock.cpp:
1511         (WebCore::RenderBlock::selectionGapRects): Adjust for overflow scroll.
1512
1513 2007-02-05  Mitz Pettel  <mitz@webkit.org>
1514
1515         Reviewed by Adele.
1516
1517         - fix http://bugs.webkit.org/show_bug.cgi?id=11916
1518           REGRESSION (SearchField): RTL search fields are mixed up
1519
1520         Test: fast/forms/search-rtl.html
1521
1522         * rendering/RenderTextControl.cpp:
1523         (WebCore::RenderTextControl::createInnerBlockStyle): Always make the inner
1524         block LTR so that the results button will be on the left and the cancel
1525         button will be on the right.
1526         (WebCore::RenderTextControl::createInnerTextStyle): Inherit the direction
1527         property directly from the control so that it won't be masked by the inner
1528         block's LTR override.
1529         (WebCore::RenderTextControl::nodeAtPoint): Removed code that swapped the
1530         results and cancel buttons for RTL.
1531         (WebCore::RenderTextControl::forwardEvent): Ditto.
1532         (WebCore::RenderTextControl::clientPaddingLeft): Ditto.
1533         (WebCore::RenderTextControl::clientPaddingRight): Ditto.
1534
1535 2007-02-05  Mitz Pettel  <mitz@webkit.org>
1536
1537         Reviewed by Adele.
1538
1539         - fix http://bugs.webkit.org/show_bug.cgi?id=12618
1540           REGRESSION (SearchField): Dragging across the text and releasing over the clear button clears the field
1541
1542         Test: fast/forms/search-cancel-button-mouseup.html
1543
1544         Made the cancel button capturing.
1545
1546         * html/HTMLTextFieldInnerElement.cpp:
1547         (WebCore::HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement):
1548         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
1549         * html/HTMLTextFieldInnerElement.h:
1550
1551 2007-02-05  Mitz Pettel  <mitz@webkit.org>
1552
1553         Reviewed by Darin.
1554
1555         - fix http://bugs.webkit.org/show_bug.cgi?id=6626
1556           Arabic & Farsi rendered with no shaping (all glyphs separate, unreadable!)
1557
1558         No test possible since Mac OS X only ships with fonts that contain shaping
1559         information.
1560
1561         * icu/unicode/ushape.h: Added from
1562         http://www.opensource.apple.com/darwinsource/10.4.8.ppc/ICU-6.2.9/icuSources/common/unicode/
1563         * platform/FontData.h:
1564         (WebCore::FontData::shapesArabic): Added. Returns whether the font contains
1565         shaping information for Arabic or not.
1566         * platform/mac/FontDataMac.mm:
1567         (WebCore::FontData::platformInit):
1568         (WebCore::FontData::checkShapesArabic): Added. Checks whether the font contains
1569         a glyph metamorphosis table. The heuristic is that if a font contains Arabic glyphs
1570         and a metamorphosis table, then it includes shaping information for Arabic.
1571         * platform/mac/FontMac.mm:
1572         (WebCore::overrideLayoutOperation): Changed to use the same character buffer passed
1573         to ATSUI instead of the original character buffer and to give zero-width spaces zero
1574         width.
1575         (WebCore::isArabicLamWithAlefLigature): Added. Checks if the character is one
1576         of the Arabic presentation forms of Lam with Alef.
1577         (WebCore::shapeArabic): Added. This is a wrapper around the ICU Arabic shaping routine
1578         that replaces each space following a Lam with Alef ligature resulting from shaping
1579         with a zero-width space.
1580         (WebCore::ATSULayoutParameters::initialize): Changed to allocate the auxiliary buffer
1581         lazily for mirroring and Arabic shaping. Added a call to shapeArabic() when required.
1582
1583 2007-02-05  Eric Seidel  <eric@webkit.org>
1584
1585         No review, build fix only.
1586
1587         * ksvg2/svg/SVGStyleElement.cpp: add forgotten header.
1588
1589 2007-02-05  Eric Seidel  <eric@webkit.org>
1590
1591         Reviewed by bdash.
1592
1593         Fix style name testcase which I broke in my last commit.
1594
1595         * ksvg2/svg/SVGStyleElement.cpp:
1596         (WebCore::SVGStyleElement::xmlspace):
1597         (WebCore::SVGStyleElement::title): override Element::title()
1598         (WebCore::SVGStyleElement::parseMappedAttribute):
1599         * ksvg2/svg/SVGStyleElement.h:
1600
1601 2007-02-04  Eric Seidel  <eric@webkit.org>
1602
1603         Reviewed by darin.
1604
1605         Fix hand cursor on link hover for SVG
1606         Fix status text on link hover for SVG
1607         Fix tooltips on link hover for SVG
1608         Fix link dragging for SVG
1609         http://bugs.webkit.org/show_bug.cgi?id=12575
1610         
1611         Test: added manual-tests/svg-links.svg
1612
1613         * dom/Document.cpp:
1614         (WebCore::Document::prepareMouseEvent):
1615         * dom/Element.cpp:
1616         (WebCore::Element::title):
1617         * dom/Element.h:
1618         * html/HTMLElement.cpp:
1619         (WebCore::HTMLElement::setId):
1620         (WebCore::HTMLElement::title):
1621         (WebCore::HTMLElement::setTitle):
1622         (WebCore::HTMLElement::setLang):
1623         * html/HTMLElement.h:
1624         * ksvg2/svg/SVGAElement.cpp:
1625         (WebCore::SVGAElement::title):
1626         (WebCore::SVGAElement::parseMappedAttribute):
1627         (WebCore::SVGAElement::defaultEventHandler):
1628         * ksvg2/svg/SVGAElement.h:
1629         * ksvg2/svg/SVGTitleElement.cpp:
1630         * ksvg2/svg/SVGTitleElement.h:
1631         * manual-tests/svg-links.svg: Added.
1632         * rendering/HitTestResult.cpp:
1633         (WebCore::HitTestResult::title):
1634         (WebCore::HitTestResult::absoluteImageURL):
1635         (WebCore::HitTestResult::absoluteLinkURL):
1636         (WebCore::HitTestResult::isLiveLink):
1637         (WebCore::HitTestResult::titleDisplayString):
1638
1639 2007-02-04  Alexey Proskuryakov  <ap@webkit.org>
1640
1641         Reviewed by Darin.
1642
1643         http://bugs.webkit.org/show_bug.cgi?id=12602
1644         XPath functions string(), normalize-space() and string-length() don't work
1645         without arguments
1646
1647         Test: fast/xpath/implicit-node-args.html
1648
1649         * xml/XPathFunctions.cpp:
1650         (WebCore::XPath::FunString::doEvaluate):
1651         (WebCore::XPath::FunStringLength::doEvaluate):
1652         (WebCore::XPath::FunNormalizeSpace::doEvaluate):
1653         Don't try to pass RefPtr<Node> to the Value ctor.
1654
1655 2007-02-04  Alexey Proskuryakov  <ap@webkit.org>
1656
1657         Reviewed by Darin.
1658
1659         http://bugs.webkit.org/show_bug.cgi?id=8791
1660         XPath should support custom node resolvers
1661
1662         * bindings/js/JSCustomXPathNSResolver.cpp: Added.
1663         (WebCore::JSCustomXPathNSResolver::create):
1664         (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
1665         (WebCore::JSCustomXPathNSResolver::~JSCustomXPathNSResolver):
1666         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1667         * bindings/js/JSCustomXPathNSResolver.h: Added.
1668         * bindings/objc/DOMCustomXPathNSResolver.h: Added.
1669         * bindings/objc/DOMCustomXPathNSResolver.mm: Added.
1670         (WebCore::DOMCustomXPathNSResolver::DOMCustomXPathNSResolver):
1671         (WebCore::DOMCustomXPathNSResolver::~DOMCustomXPathNSResolver):
1672         (WebCore::DOMCustomXPathNSResolver::lookupNamespaceURI):
1673         Wrappers for JS/ObjC objects that can be used as resolvers.
1674
1675         * bindings/scripts/CodeGeneratorJS.pm:
1676         * bindings/scripts/CodeGeneratorObjC.pm:
1677         Use the above wrappers to support custom resolvers.
1678
1679         * xml/XPathNSResolver.cpp:
1680         * xml/XPathNSResolver.h:
1681         Turned this class into an abstract one.
1682
1683         * xml/NativeXPathNSResolver.cpp: Added.
1684         (WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
1685         (WebCore::NativeXPathNSResolver::~NativeXPathNSResolver):
1686         (WebCore::NativeXPathNSResolver::lookupNamespaceURI):
1687         * xml/NativeXPathNSResolver.h: Added.
1688         A XPathNSResolver subclass, doing what XPathNSResolver used to do.
1689
1690         * xml/XPathEvaluator.cpp:
1691         (WebCore::XPathEvaluator::createNSResolver): Create a NativeXPathNSResolver.
1692
1693         * WebCore.xcodeproj/project.pbxproj: Added new files.
1694
1695 2007-02-04  Oliver Hunt  <oliver@apple.com>
1696
1697         Reviewed by Adam.
1698
1699         Tidying up EventHandler, and moving more of
1700         EventHandlerMac.mm to EventHandler.cpp
1701
1702         Also added EventHandler::eventLoopHandleMouse[Dragged,Up]
1703         these are basically helper functions to allow correct event
1704         handling on MacOS.        
1705
1706         * page/EventHandler.cpp:
1707         (WebCore::EventHandler::handleMouseUp):
1708         (WebCore::EventHandler::dragSourceMovedTo):
1709         (WebCore::EventHandler::dragSourceEndedAt):
1710         (WebCore::EventHandler::dispatchDragSrcEvent):
1711            Moved from EventHandlerMac to EventHandler
1712
1713         * page/EventHandler.h:
1714         (WebCore::EventHandler::eventLoopHandleMouseUp):
1715         (WebCore::EventHandler::eventLoopHandleMouseDragged):
1716           Null implementations of two Mac helper functions
1717         * page/mac/EventHandlerMac.mm:
1718         (WebCore::EventHandler::eventLoopHandleMouseDragged):           
1719         (WebCore::EventHandler::handleDrag):
1720           Much tidying, reduced nesting, made less dependent on NS types   
1721         (WebCore::EventHandler::eventLoopHandleMouseDragged):
1722         (WebCore::EventHandler::eventLoopHandleMouseUp):  
1723           Helper functions to let us process events properly on MacOS
1724
1725         * page/mac/WebCoreFrameBridge.mm:
1726         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
1727
1728 2007-02-04  George Staikos  <staikos@kde.org>
1729
1730         Reviewed by Zack.
1731
1732         Some Qt hacks and cleanups - makes rendering of forms much better on
1733         OS X
1734
1735         * platform/qt/PlatformKeyboardEventQt.cpp: Add Key_Return/Enter
1736         (WebCore::keyIdentifierForQtKeyCode):
1737         (WebCore::windowsKeyCodeForKeyEvent):
1738         * platform/qt/RenderThemeQt.cpp: Hacks and fix buttons
1739         (WebCore::RenderThemeQt::addIntrinsicMargins):
1740         (WebCore::RenderThemeQt::setCheckboxSize):
1741         (WebCore::RenderThemeQt::supportsFocus):
1742         (WebCore::RenderThemeQt::applyTheme):
1743
1744 2007-02-03  Maciej Stachowiak  <mjs@apple.com>
1745
1746         Rubber stamped by Adam.
1747
1748         - remove obsolete code that has an annoying space in the directory name
1749
1750         * WebCore.vcproj/Image Viewer/Image Viewer.cpp: Removed.
1751         * WebCore.vcproj/Image Viewer/Image Viewer.h: Removed.
1752         * WebCore.vcproj/Image Viewer/Image Viewer.rc: Removed.
1753         * WebCore.vcproj/Image Viewer/Image Viewer.reg: Removed.
1754         * WebCore.vcproj/Image Viewer/Image Viewer.vcproj: Removed.
1755         * WebCore.vcproj/Image Viewer/ImageDocument.cpp: Removed.
1756         * WebCore.vcproj/Image Viewer/ImageDocument.h: Removed.
1757         * WebCore.vcproj/Image Viewer/ImageMainFrame.cpp: Removed.
1758         * WebCore.vcproj/Image Viewer/ImageMainFrame.h: Removed.
1759         * WebCore.vcproj/Image Viewer/ImageView.cpp: Removed.
1760         * WebCore.vcproj/Image Viewer/ImageView.h: Removed.
1761         * WebCore.vcproj/Image Viewer/Resource.h: Removed.
1762         * WebCore.vcproj/Image Viewer/res/Image Viewer.ico: Removed.
1763         * WebCore.vcproj/Image Viewer/res/Image ViewerDoc.ico: Removed.
1764         * WebCore.vcproj/Image Viewer/res/ImageViewer.rc2: Removed.
1765         * WebCore.vcproj/Image Viewer/res/Toolbar.bmp: Removed.
1766         * WebCore.vcproj/Image Viewer/stdafx.cpp: Removed.
1767         * WebCore.vcproj/Image Viewer/stdafx.h: Removed.
1768
1769 2007-02-04  Mitz Pettel  <mitz@webkit.org>
1770
1771         Reviewed by Oliver.
1772
1773         - fix http://bugs.webkit.org/show_bug.cgi?id=12564
1774           REGRESSION: Uncaught AppKit exception when using the scrollwheel while Gmail is loading
1775
1776         * platform/mac/PlatformMouseEventMac.mm:
1777         (WebCore::eventNumberForEvent): Scroll wheel events don't have an event number.
1778
1779 2007-02-04  Nikolas Zimmermann  <zimmermann@kde.org>
1780
1781         Reviewed by Sam.
1782
1783         Add support for xml:space="preserve" for SVG text.
1784         It can be modeled by using white-space="pre" and replace \n by spaces.
1785
1786         Handle xml:space="default" correctly.
1787         Always remove tabs from SVG text - as demanded by spec.
1788
1789         Added test: svg/custom/text-whitespace-handling.svg
1790
1791         * css/svg.css:
1792         * ksvg2/svg/SVGTextContentElement.cpp:
1793         (WebCore::SVGTextContentElement::parseMappedAttribute):
1794         * rendering/RenderText.cpp:
1795         (WebCore::RenderText::setStyle):
1796         (WebCore::RenderText::setTextInternal):
1797         * rendering/bidi.cpp:
1798         (WebCore::shouldPreserveNewline):
1799         (WebCore::RenderBlock::skipWhitespace):
1800         (WebCore::RenderBlock::findNextLineBreak):
1801
1802 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
1803
1804         Reviewed by Darin.
1805
1806         http://bugs.webkit.org/show_bug.cgi?id=12560
1807         W3C XPath test Text_Nodes.svg fails
1808
1809         Covered by dom/svg/level3/xpath/Text_Nodes.svg
1810
1811         * xml/XPathStep.cpp:
1812         (WebCore::XPath::Step::nodeTestMatches): Only include the first text sibling in text() matches.
1813
1814 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
1815
1816         Reviewed by Darin.
1817
1818         http://bugs.webkit.org/show_bug.cgi?id=12485
1819         XPath id() function doesn't work as root in paths
1820
1821         Test: fast/xpath/id-path.html
1822
1823         * xml/XPathPath.cpp:
1824         (WebCore::XPath::Path::doEvaluate): Implemented.
1825         (WebCore::XPath::LocationPath::evaluate): A new overload that takes an initial NodeVector.
1826         (WebCore::XPath::LocationPath::doEvaluate): Moved most of the logic to the new evaluate().
1827
1828         * xml/XPathPath.h: Added a new evaluate() overload and a using declaration to keep the
1829         generic one visible.
1830
1831 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
1832
1833         Reviewed by Darin.
1834
1835         http://bugs.webkit.org/show_bug.cgi?id=12559
1836         REGRESSION: Crash in checkForHeadCharset() under GuardMalloc
1837
1838         No tests possible.
1839
1840         * loader/TextResourceDecoder.cpp:
1841         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix end of buffer checks; sprinkle a number 
1842         of new ones over the function.
1843
1844 2007-02-03  David Kilzer  <ddkilzer@webkit.org>
1845
1846         Reviewed by NOBODY (no-svg build fix).
1847
1848         * page/EventHandler.cpp: Include FloatPoint.h.
1849
1850 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
1851
1852         Reviewed by Mitz.
1853
1854         http://bugs.webkit.org/show_bug.cgi?id=12549
1855         Wrong character encoding at www.ravmilim.co.il
1856
1857         Test: fast/encoding/meta-charset.html
1858
1859         * loader/TextResourceDecoder.cpp:
1860         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix an off by one error.
1861
1862 2007-02-02  Maciej Stachowiak  <mjs@apple.com>
1863         
1864         Reviewed by Hyatt & Adele.
1865         
1866         - <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)
1867         
1868         Test case: fast/forms/disabled-select-change-index.html
1869         
1870         * html/HTMLOptionElement.cpp:
1871         (WebCore::HTMLOptionElement::setSelected): Allow changing selected state of a disabled
1872         option.
1873         
1874 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
1875
1876         Build fix, not reviewed.
1877
1878         Blind attempt to fix Qt build.
1879
1880         * WebCore.pro: Add RenderSVGGradientStop.cpp / RenderSVGHiddenContainer.cpp
1881
1882 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
1883
1884         Reviewed by Eric & Maciej.
1885
1886         Fix serveral <use> issues:
1887         - When events are dispatch to a referenced element, the actual event.target
1888           has to be set to the corresponding SVGElementInstance object
1889
1890         - Node::shadowAncestorNode() should _not_ return the shadowParentNode for SVG elements
1891           This is only needed for the HTML forms concept and breaks event dispatching for SVG shadow tree elements.
1892
1893         - Add SVGElementInstance as possible EventTarget in bindings/js/kjs_dom.cpp
1894           (Now event.target returns the actual SVGElementInstance object for a shadow tree element)
1895
1896         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12502 (Reproducible crash when browsing SVG map.)
1897         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12511 (<use> has event dispatching issues)
1898
1899         Added test: svg/custom/use-event-handler-on-use-element.svg
1900         Added test: svg/custom/use-event-handler-on-referenced-element.svg
1901         Added test: svg/custom/use-elementInstance-event-target.svg
1902         Added test: svg/custom/use-elementInstance-methods.svg
1903
1904         * bindings/js/kjs_dom.cpp:
1905         (KJS::toJS):
1906         * dom/EventTarget.cpp:
1907         (WebCore::EventTarget::toSVGElementInstance):
1908         * dom/EventTarget.h:
1909         * dom/EventTargetNode.cpp:
1910         (WebCore::EventTargetNode::handleLocalEvents):
1911         (WebCore::EventTargetNode::dispatchGenericEvent):
1912         (WebCore::EventTargetNode::dispatchEvent):
1913         * dom/EventTargetNode.h:
1914         * dom/Node.cpp:
1915         (WebCore::Node::shadowAncestorNode):
1916         * ksvg2/svg/SVGElement.cpp:
1917         (WebCore::shadowTreeParentElementForShadowTreeElement):
1918         (WebCore::SVGElement::dispatchEvent):
1919         * ksvg2/svg/SVGElement.h:
1920         * ksvg2/svg/SVGElementInstance.cpp:
1921         (WebCore::SVGElementInstance::toSVGElementInstance):
1922         * ksvg2/svg/SVGElementInstance.h:
1923         * ksvg2/svg/SVGUseElement.cpp:
1924         (WebCore::SVGUseElement::notifyAttributeChange):
1925         (WebCore::SVGUseElement::instanceForShadowTreeElement):
1926         * ksvg2/svg/SVGUseElement.h:
1927
1928 2007-02-02  Oliver Hunt  <oliver@apple.com>
1929
1930         Reviewed by Geoff.
1931
1932         Add guard around accessing [NSEvent eventNumber] to ensure
1933         we don't attempt to access it on on non-mouse related NSEvent.
1934
1935         * platform/mac/PlatformMouseEventMac.mm:
1936         (WebCore::eventNumberForEvent):
1937         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1938
1939 2007-02-02  Adam Roben  <aroben@apple.com>
1940
1941         Reviewed by Anders.
1942
1943         Try to be a little less selfish about DocumentLoader.
1944
1945         Spotted while working on <rdar://problem/4957747>.
1946
1947         * page/ContextMenuController.cpp:
1948         (WebCore::ContextMenuController::contextMenuItemSelected):
1949             Everyone can open frames in new windows.
1950
1951 2007-02-02  Nikolas Zimmermann  <zimmermann@kde.org>
1952
1953         Reviewed by Eric.
1954
1955         Move xml:space/xml:lang from svgattrs.in to xmlattrs.in where they actually belong.
1956         Now they are actually recognized by SVGLangSpace::parseMappedAttribute.
1957         Patch implementing xml:space="preserve" coming soon, which acts as test for this stuff.
1958
1959         Always build XMLNames.cpp (not only for SVG) and replace all occourences of
1960         "http://www.w3.org/XML/1998/namespace" by "XMLNames::xmlNamespaceURI".
1961
1962         * DerivedSources.make:
1963         * dom/DOMImplementation.cpp:
1964         (WebCore::DOMImplementation::createDocument):
1965         * ksvg2/svg/SVGLangSpace.cpp:
1966         (WebCore::SVGLangSpace::SVGLangSpace):
1967         (WebCore::SVGLangSpace::parseMappedAttribute):
1968         * ksvg2/svg/SVGLangSpace.h:
1969         * ksvg2/svg/svgattrs.in:
1970         * page/Frame.cpp:
1971         (WebCore::Frame::Frame):
1972         * xml/XPathNSResolver.cpp:
1973         (WebCore::XPathNSResolver::lookupNamespaceURI):
1974         * xml/xmlattrs.in:
1975
1976 2007-02-02  Beth Dakin  <bdakin@apple.com>
1977
1978         Reviewed by Maciej.
1979
1980         Working on a layout test.
1981
1982         Fix for <rdar://problem/4966100> REGRESSION: Reproducible ASSERT 
1983         hit at Walgreens.com
1984
1985         * page/Frame.cpp:
1986         (WebCore::Frame::setView): If we are setting the view to 0 and 
1987         detaching the document, call unscheduleRealyout() on the old view 
1988         before setting it to 0.
1989
1990 2007-02-01  Geoffrey Garen  <ggaren@apple.com>
1991
1992         Reviewed by Maciej Stachowiak.
1993         
1994         Added support for selectively ignoring WebCore::Node leaks during layout
1995         tests, so that we can ignore known leaks in other components.
1996
1997         * WebCore.exp:
1998         * dom/Node.cpp:
1999         (WebCore::Node::isSupported): Moved isSupported up with the rest of the static functions.
2000
2001         (WebCore::): Added an ignoreSet, which collects WebCore::Nodes whose lifetime
2002         we want to ignore. We need to track which nodes to ignore rather than, say,
2003         just suspending the count, because node destruction depends on lots of
2004         different variables, so it would be nearly impossible to know when exactly 
2005         to suspend the count and when exactly to resume it.
2006
2007         (WebCore::NodeCounter::~NodeCounter): Changed to use WTFLog instead of fprintf.
2008
2009         (WebCore::Node::startIgnoringLeaks): Do the ignoring.
2010         (WebCore::Node::stopIgnoringLeaks): ditto
2011         (WebCore::Node::Node): ditto
2012         (WebCore::Node::~Node): ditto
2013
2014         * dom/Node.h: Moved isSupported up with the rest of the static functions.
2015
2016         * platform/mac/LoggingMac.mm:
2017         (WebCore::initializeWithUserDefault): Renamed from "initializeLoggingChannel"
2018         because the real goal here is to honor a user default -- WTFLoggingChannels
2019         need no run-time initialization. Also replaced "off by default, on if a 
2020         user default says so" behavior with "only override existing setting if a
2021         user default says so" behavior. It seemed like a bug that you would specify 
2022         a channel's on/off state in its definition, but this function would unconditionally
2023         blow that state away.
2024         (WebCore::InitializeLoggingChannelsIfNecessary):
2025
2026 2007-02-02  Eric Seidel  <eric@webkit.org>
2027
2028         Reviewed by mitz.
2029
2030         Fix gradient stop style resolution to be less of a hack, fixing style invalidation:
2031         http://bugs.webkit.org/show_bug.cgi?id=12193
2032         and fix stop-color and stop-opacity not to inherit:
2033         http://bugs.webkit.org/show_bug.cgi?id=12193
2034         
2035         Tests:
2036         * svg/custom/gradient-stops-style-change.svg: added
2037         * svg/W3C-SVG-1.1/pservers-grad-18-b.svg: updated
2038
2039         * WebCore.xcodeproj/project.pbxproj:
2040         * ksvg2/css/SVGCSSStyleSelector.cpp:
2041         (WebCore::CSSStyleSelector::applySVGProperty):
2042         * ksvg2/css/SVGRenderStyle.cpp:
2043         (WebCore::SVGRenderStyle::inheritedNotEqual):
2044         (WebCore::SVGRenderStyle::inheritFrom):
2045         * ksvg2/css/SVGRenderStyle.h:
2046         * ksvg2/svg/SVGDefsElement.cpp:
2047         (WebCore::SVGDefsElement::createRenderer):
2048         * ksvg2/svg/SVGGradientElement.cpp:
2049         (WebCore::SVGGradientElement::createRenderer):
2050         (WebCore::SVGGradientElement::buildStops):
2051         * ksvg2/svg/SVGGradientElement.h:
2052         (WebCore::SVGGradientElement::rendererIsNeeded):
2053         * ksvg2/svg/SVGStopElement.cpp:
2054         (WebCore::SVGStopElement::createRenderer):
2055         * ksvg2/svg/SVGStopElement.h:
2056         (WebCore::SVGStopElement::rendererIsNeeded):
2057         * rendering/RenderSVGGradientStop.cpp: Added.
2058         * rendering/RenderSVGGradientStop.h: Added.
2059         * rendering/RenderSVGHiddenContainer.cpp: Added.
2060         * rendering/RenderSVGHiddenContainer.h: Added.
2061         * rendering/RenderSVGContainer.cpp:
2062         * rendering/RenderSVGContainer.h:
2063
2064 2007-02-02  Zack Rusin  <zrusin@trolltech.com>
2065
2066         Reviewed by Lars
2067
2068         Fix scrolling-on-selection bug by correctly
2069         scrolling to the offset instead of trying to 
2070         ensure visibility with margins.
2071
2072         * platform/qt/ScrollViewQt.cpp:
2073         (WebCore::ScrollView::scrollPointRecursively):
2074
2075 2007-02-02  Zack Rusin  <zrusin@trolltech.com>
2076
2077         Reviewed by Lars
2078
2079         Fix drawing of dashed and colored lines. Pen
2080         has to be inherited for stroke to stay consistent.
2081
2082         * platform/graphics/qt/GraphicsContextQt.cpp:
2083         (WebCore::GraphicsContext::setAlpha):
2084         (WebCore::GraphicsContext::setPlatformStrokeColor):
2085         (WebCore::GraphicsContext::setPlatformStrokeStyle):
2086
2087 2007-02-01  Nicholas Shanks  <webkit@nickshanks.com>
2088
2089         Reviewed by Mark.
2090
2091         Add support for CSS2 font-stretch property.
2092
2093         * css/CSSComputedStyleDeclaration.cpp:
2094         (WebCore::):
2095         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2096         * css/cssparser.cpp:
2097         (WebCore::CSSParser::parseValue):
2098         * css/cssstyleselector.cpp:
2099         (WebCore::CSSStyleSelector::applyDeclarations):
2100         (WebCore::CSSStyleSelector::applyProperty):
2101         * platform/FontCache.cpp:
2102         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2103         (WebCore::FontPlatformDataCacheKey::operator==):
2104         (WebCore::computeHash):
2105         (WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
2106         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
2107         (WebCore::FontCache::getCachedFontPlatformData):
2108         * platform/FontDescription.h:
2109         (WebCore::):
2110         (WebCore::FontDescription::FontDescription):
2111         (WebCore::FontDescription::stretch):
2112         (WebCore::FontDescription::narrowerStretch):
2113         (WebCore::FontDescription::widerStretch):
2114         (WebCore::FontDescription::setStretch):
2115         (WebCore::FontDescription::operator==):
2116         * platform/mac/FontCacheMac.mm:
2117         (WebCore::FontCache::createFontPlatformData):
2118         * platform/mac/WebFontCache.mm:
2119         (acceptableChoice):
2120         (betterChoice):
2121         (+[WebFontCache fontWithFamily:traits:size:]):
2122
2123 2007-02-01  Timothy Hatcher  <timothy@apple.com>
2124
2125         Reviewed by Mark Rowe.
2126
2127         <rdar://problem/4969201> REGRESSION: Safari applies the wrong font to BODY element at http://www.apple.com/downloads/dashboard/
2128
2129         * platform/mac/WebFontCache.mm:
2130         (+[WebFontCache fontWithFamily:traits:size:]): Don't call [NSFont fontWithName:] with the desiredFamily on Tiger.
2131
2132 2007-02-01  Alexey Proskuryakov  <ap@webkit.org>
2133
2134         Reviewed by Darin.
2135
2136         http://bugs.webkit.org/show_bug.cgi?id=12506
2137         REGRESSION: Safari doesn't display hebrew text on a web page,
2138         displayed correctly on Tiger
2139
2140         * loader/TextResourceDecoder.cpp:
2141         (WebCore::TextResourceDecoder::checkForHeadCharset): Advance the pointer when necessary.
2142
2143 2007-02-01  George Staikos  <staikos@kde.org>
2144
2145         Reviewed by Zack and Lars.
2146
2147         Add a cookie interface for the Qt build.
2148
2149         * WebCore.pro:
2150         * platform/qt/CookieJarQt.cpp:
2151         (WebCore::setCookies):
2152         (WebCore::cookies):
2153         (WebCore::cookiesEnabled):
2154
2155 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
2156
2157         Reviewed by Adele.
2158         
2159         - fixed <rdar://problem/4922764> ASSERTION: (!m_contentFunction) in PolicyCheck::call trying to visit feed URL (CNN, Apple, etc.)
2160
2161         * loader/FrameLoader.cpp:
2162         (WebCore::FrameLoader::stopPolicyCheck): Call new cancel method instead of call(false) on old check.
2163         (WebCore::PolicyCheck::cancel): call any callback function that is set with false or PolicyIgnore as
2164         appropriate.
2165         * loader/FrameLoader.h:
2166
2167 2007-02-01  Beth Dakin  <bdakin@apple.com>
2168
2169         Reviewed by Hyatt.
2170
2171         Fix for http://bugs.webkit.org/show_bug.cgi?id=10517 REGRESSION 
2172         (r12065-r12082): Navigation graphic wraps to the next line on 
2173         duart.com and <rdar://problem/4960505> REGRESSION: The Awesome 
2174         Windows Vista page has a layout error in the header table (10517)
2175
2176         The problem is that we never supported a quirk that other browsers 
2177         support where, under very specific circumstances, a table cell will 
2178         grow to fit an image inside of it. This is only a regression 
2179         because a bug was fixed were we were 1 pixel off in the calculation 
2180         of overflow in some cases.
2181
2182         * rendering/RenderBlock.cpp:
2183         (WebCore::shouldGrowTableCellForImage):
2184         (WebCore::RenderBlock::calcInlineMinMaxWidth):
2185
2186 2007-02-01  Zack Rusin  <zrusin@trolltech.com>
2187
2188         Reviewed by Lars
2189
2190         Implement native look for comboboxes
2191         and fix/implement popup menus.
2192
2193         * platform/PopupMenu.h:
2194         * platform/qt/PopupMenuQt.cpp:
2195         (WebCore::PopupMenu::PopupMenu):
2196         (WebCore::PopupMenu::~PopupMenu):
2197         (WebCore::PopupMenu::clear):
2198         (WebCore::PopupMenu::populate):
2199         (WebCore::PopupMenu::show):
2200         (WebCore::PopupMenu::hide):
2201         (WebCore::PopupMenu::updateFromElement):
2202         * platform/qt/RenderThemeQt.cpp:
2203         (WebCore::RenderThemeQt::adjustMenuListStyle):
2204         (WebCore::RenderThemeQt::paintButton):
2205         (WebCore::RenderThemeQt::paintTextField):
2206         (WebCore::RenderThemeQt::paintMenuList):
2207
2208 2007-02-01  Darin Adler  <darin@apple.com>
2209
2210         Reviewed by Maciej.
2211
2212         - fix <rdar://problem/4887428> REGRESSION: Implement slight delay for firing incremental onSearch event
2213
2214         * rendering/RenderTextControl.h:
2215         * rendering/RenderTextControl.cpp:
2216         (WebCore::RenderTextControl::RenderTextControl): Set up timer.
2217         (WebCore::RenderTextControl::subtreeHasChanged): Start timer here instead of immediately sending event.
2218         (WebCore::RenderTextControl::searchEventTimerFired): Added. Sends search event.
2219         (WebCore::RenderTextControl::stopSearchEventTimer): Added.
2220         (WebCore::RenderTextControl::startSearchEventTimer): Added. Sends search event right away if there is
2221         no text. If there is some text, sets the timer using the same delay rule as NSSearchField. If you keep
2222         typing, then the timer keeps getting reset 0.2 seconds into the future until you pause.
2223
2224         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::onSearch): Tell the renderer to
2225         stop the timer, since we're sending a search event. This helps when a caller other than
2226         the timer decides to send an explicit search event.
2227
2228 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
2229
2230         Fix by Darin, reviewed by Maciej.
2231
2232         - fix ~10% performance regression from encoding fix
2233
2234         * loader/TextResourceDecoder.cpp:
2235         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix a logic
2236         error which made huge strings accidentally.
2237
2238 2007-02-01  Lars Knoll <lars@trolltech.com>
2239
2240         Fix the Qt build
2241
2242         * page/qt/EventHandlerQt.cpp:
2243
2244 2007-01-31  Darin Adler  <darin@apple.com>
2245
2246         Reviewed by Adam and Geoff.
2247
2248         - fix <rdar://problem/4786767> REGRESSION: <select> controls are not resized when zooming text
2249
2250         Test: fast/forms/select-width-font-change.html
2251
2252         * rendering/RenderMenuList.h: Cleaned up formatting a bit. Removed unneeded include of PopupMenu.h.
2253         Made a lot more things private, including the PopupMenuClient base class, all of the virtual
2254         functions from PopupMenuClient, and the setTextFromOption function. Added updateOptionsWidth.
2255
2256         * rendering/RenderMenuList.cpp:
2257         (WebCore::RenderMenuList::setStyle): Added code to call updateOptionsWidth when the font changes.
2258         (WebCore::RenderMenuList::updateOptionsWidth): Added. Factored code out of updateFromElement.
2259         Changed to do nothing when m_optionsWidth is already correct.
2260         (WebCore::RenderMenuList::updateFromElement): Moved code to recomputed options width to the new
2261         updateOptionsWidth function.
2262         (WebCore::RenderMenuList::text): Made const.
2263
2264 2007-01-31  Oliver Hunt  <oliver@apple.com>
2265
2266         Reviewed by Adam.
2267
2268         Migrate more drag and drop logic to WebCore, start preparing
2269         to move EventHandler::handleDrag from EventHandlerMac to EventHandler 
2270
2271         * WebCore.exp:   
2272           updating methods
2273                     
2274         * dom/Clipboard.cpp:
2275         * dom/Clipboard.h:
2276         (WebCore::Clipboard::Clipboard):
2277         (WebCore::Clipboard::setDragHasStarted):
2278         (WebCore::Clipboard::dragStarted): 
2279           Moving from ClipboardMac to Clipboard 
2280
2281         * dom/EventTargetNode.cpp:
2282         (WebCore::EventTargetNode::dispatchMouseEvent):
2283           PlatformMouseEvent no longer lies about button state, however 
2284           DOM Events don't allow NoButton, so we need to convert NoButton 
2285           to LeftButton when we create a DOM Event from PlatformMouseEvent
2286
2287         * page/DragClient.h:
2288           Tidying comment 
2289
2290         * page/DragController.cpp:
2291         (WebCore::createMouseEvent):
2292           Updated for new PlatformMouseEvent constructors
2293         (WebCore::DragController::mayStartDragAtEventLocation):
2294           Migrated from WebKit
2295
2296         * page/DragController.h:
2297           Added above function declarations
2298
2299         * page/EventHandler.cpp:
2300         (WebCore::EventHandler::dragState): 
2301         (WebCore::EventHandler::dragHysteresisExceeded):
2302         (WebCore::EventHandler::freeClipboard):
2303         (WebCore::EventHandler::shouldDragAutoNode):
2304           Moved from EventHandlerMac
2305         (WebCore::EventHandler::handleMouseMoveEvent):
2306         (WebCore::EventHandler::eventMayStartDrag):
2307         (WebCore::EventHandler::handleMousePressEvent):
2308           Use DragController     
2309
2310         * page/EventHandler.h:
2311           Added DragState struct definition to EventHandler
2312
2313         * page/mac/EventHandlerMac.mm:
2314         (WebCore::EventHandler::eventActivatedView):
2315         (WebCore::EventHandler::handleDrag):
2316         (WebCore::EventHandler::handleMouseUp):
2317         (WebCore::EventHandler::mouseDown):
2318           Update to use DragController and PlatformMouseEvent
2319
2320         * page/mac/WebCoreFrameBridge.h:
2321         * page/mac/WebCoreFrameBridge.mm:
2322         (-[WebCoreFrameBridge dragSourceMovedTo:]):
2323         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
2324           Use DragController for state
2325
2326         * platform/PlatformMouseEvent.h:
2327         (WebCore::):
2328         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2329         (WebCore::PlatformMouseEvent::eventType):
2330         (WebCore::PlatformMouseEvent::timestamp):
2331         (WebCore::PlatformMouseEvent::eventNumber):
2332         (WebCore::PlatformMouseEvent::setClickCount):
2333           Exposing necessary data for Drag logic
2334
2335         * platform/mac/ClipboardMac.h:
2336         * platform/mac/ClipboardMac.mm:
2337         (WebCore::ClipboardMac::ClipboardMac):
2338         (WebCore::ClipboardMac::setDragImage):
2339           Have moved a number of fields from ClipboardMac to Clipboard
2340           so need to use accessors in a few places now
2341
2342         * platform/mac/PlatformMouseEventMac.mm:
2343         (WebCore::mouseButtonForEvent):
2344         (WebCore::mouseEventForNSEvent):
2345         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2346           Determine MouseEventType, and provide event time info
2347
2348 2007-01-31  Alexey Proskuryakov  <ap@webkit.org>
2349
2350         Reviewed by Darin.
2351
2352         http://bugs.webkit.org/show_bug.cgi?id=12506
2353         REGRESSION: Safari doesn't display hebrew text on a web page,
2354         displayed correctly on Tiger
2355
2356         * loader/TextResourceDecoder.cpp:
2357         (WebCore::TextResourceDecoder::checkForHeadCharset): Skip over 
2358         quoted attributes.
2359
2360 2007-01-31  David Carson  <dacarson@gmail.com>
2361
2362         Reviewed by Darin.
2363
2364         - fix http://bugs.webkit.org/show_bug.cgi?id=12510
2365         Initialize the variable m_totalLoops
2366         Is tested by LayoutTests/fast/css/MarqueeLayoutTest.html
2367
2368         * rendering/RenderLayer.cpp:
2369         (WebCore::Marquee::Marquee):
2370
2371 2007-01-31  Anders Carlsson  <acarlsson@apple.com>
2372
2373         Reviewed by Maciej.
2374
2375         <rdar://problem/4886776>
2376         REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file
2377
2378         * WebCore.exp:
2379         * loader/FrameLoader.cpp:
2380         (WebCore::FrameLoader::continueLoadWithData):
2381         * loader/FrameLoader.h:
2382         New function which continues a load but using a given buffer instead.
2383         
2384 2007-01-31  Adele Peterson  <adele@apple.com>
2385
2386         Reviewed by Adam.
2387
2388         Fix for http://bugs.webkit.org/show_bug.cgi?id=12516
2389         REGRESSION (r19313): All keyboard navigation has stopped working
2390
2391         For non-editable selections, handleKeyPress doesn't need to call _interceptEditingKeyEvent. 
2392
2393         * editing/Editor.cpp:
2394         (WebCore::selectionForEvent): Moved this to the top of the file.
2395         (WebCore::Editor::handleKeyPress): Do the equivalent of the _canEdit check that used to be in WebKit WebEditorClient::handleKeyPress.
2396
2397 2007-01-31  Geoffrey Garen  <ggaren@apple.com>
2398
2399         Reviewed by Darin Adler.
2400
2401         Added a Range counter to detect leaks. Tweaked the Node counter.
2402         
2403         Also fixed a TextIterator destructive modification bug that I noticed along the
2404         way. No test case for this bug because no clients have been bitten by it
2405         yet.
2406
2407         * dom/Node.cpp: Renamed NodeImplCounter to NodeCounter, changed counter
2408         to unsigned, fixed formatting to match style guidelines.
2409         (WebCore::NodeCounter::~NodeCounter):
2410         (WebCore::Node::Node):
2411         (WebCore::Node::~Node):
2412
2413         * dom/Range.cpp:
2414         (WebCore::RangeCounter::~RangeCounter): Added.
2415         (WebCore::Range::Range):
2416         (WebCore::Range::~Range):
2417         (WebCore::Range::ownerDocument): New accessor, used by TextIterator to avoid
2418         annoying NULL checks.
2419         * dom/Range.h:
2420
2421         * editing/TextIterator.cpp:
2422         (WebCore::TextIterator::subrange): 
2423         (1) Don't initialize result with entireRange --  doing so would create a 
2424         PassRefPtr that pointed to entireRange, so this function would destructively 
2425         modify the Range you passed it. Initialize it with a new Range instead.
2426         (2) Don't use a PassRefPtr as a local variable, because they have sneaky
2427         semantics. Use a RefPtr instead.
2428         (3) Don't call CharacterIterator::range() willy-nilly, since it does 
2429         non-trivial work. Use a local variable instead.
2430
2431 2007-01-31  Adele Peterson  <adele@apple.com>
2432
2433         Reviewed by Darin.
2434
2435         WebCore part of fix for <rdar://problem/4521461> REGRESSION: when keyPress event changes form focus, inserted key goes to wrong control
2436
2437         Test: fast/events/keypress-focus-change.html
2438
2439         * editing/Editor.cpp:
2440         (WebCore::selectionForEvent): Added.  This computes a selection that considers the case where an event handler 
2441          has moved the selection outside of a text control.  In that case, we use the target control's selection.
2442         (WebCore::Editor::insertText): This gets the selectionForEvent, checks that the selection is editable,
2443          and calls TypingCommand::insertText with the correct selection.
2444
2445         * editing/TypingCommand.h: Added a version of insertText that takes a selection.  The old version of insertText will call this, and pass
2446           in the frame's selection.
2447         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): Added. Uses the passed in selection to 
2448           set the starting and ending selections correctly so that the editing machinery will insert the text in the correct place.
2449
2450         * page/Page.h: Added convenience method to get selection from focused or main frame.
2451         * page/Page.cpp: (WebCore::Page::selection):
2452
2453         * html/HTMLInputElement.h: Added selection methods to get selection for text controls.
2454         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::selection):
2455         * html/HTMLTextAreaElement.h:
2456         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::selection):
2457         * rendering/RenderTextControl.h:
2458         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::selection):
2459
2460 2007-01-31  Darin Adler  <darin@apple.com>
2461
2462         - fix build
2463
2464         * ForwardingHeaders/wtf/ListHashSet.h: Added.
2465
2466 2007-01-31  Zack Rusin  <zrusin@trolltech.com>
2467
2468         Reviewed by Lars
2469
2470         Return the correct selection color.
2471
2472         * platform/qt/RenderThemeQt.cpp:
2473         (WebCore::RenderThemeQt::supportsFocusRing):
2474         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
2475         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
2476         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
2477         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
2478
2479 2007-01-31  Maciej Stachowiak  <mjs@apple.com>
2480
2481         Reviewed by Mark.
2482
2483         - fixed <rdar://problem/4751164> REGRESSION: Safari places text on incorrect button when returning to a page via back [10541]
2484         http://bugs.webkit.org/show_bug.cgi?id=10541
2485
2486         * dom/Document.cpp:
2487         (WebCore::Document::formElementsState):
2488         * dom/Document.h:
2489         
2490         I couldn't figure out the back/forward support in the tests enough
2491         to make an automated test, but this maual test reproduces the
2492         problem 100% without this patch:
2493         
2494         * manual-tests/back.html: Added.
2495         * manual-tests/form-control-madness.html: Added.
2496
2497 2007-01-31  David Kilzer  <ddkilzer@kilzer.net>
2498
2499         Reviewed by Mitz.
2500
2501         - fix http://bugs.webkit.org/show_bug.cgi?id=12490
2502           Clean up canPlaceOnLine logic in bidi.cpp
2503
2504         No test cases since there is no change in functionality.
2505
2506         * rendering/bidi.cpp:
2507         (WebCore::RenderBlock::findNextLineBreak): Simplify canFitOnLine expression.
2508
2509 2007-01-31  Zack Rusin  <zack@kde.org>
2510
2511         Adding comments explaining how the focus ring implementation
2512         works on the Qt platform and just move focus ring rendering
2513         related code to the same spot.
2514
2515         * platform/graphics/qt/GraphicsContextQt.cpp:
2516         (WebCore::setFocusRingColorChangeFunction):
2517         (WebCore::focusRingColor):
2518         (WebCore::GraphicsContext::drawFocusRing):
2519         * platform/qt/TemporaryLinkStubs.cpp:
2520
2521 2007-01-31  Zack Rusin  <zrusin@trolltech.com>
2522
2523         Reviewed by Lars
2524
2525         Properly propagate key events. 
2526
2527         * page/qt/FrameQt.cpp:
2528         * page/qt/FrameQt.h: Remove redundant method.
2529         * platform/qt/ScrollViewCanvasQt.cpp:
2530         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
2531
2532 2007-01-31  George Staikos  <staikos@kde.org>
2533
2534         Reviewed by Zack and Lars.
2535
2536         Fix double delete on cancel as well as assertion with proxy.
2537
2538         * platform/network/qt/ResourceHandleManagerQt.cpp:
2539         (WebCore::WebCoreHttp::getConnection):
2540         (WebCore::WebCoreHttp::onRequestFinished):
2541         (WebCore::WebCoreHttp::cancel):
2542
2543 2007-01-31  Mark Rowe  <mrowe@apple.com>
2544
2545         Reviewed by Oliver.
2546
2547         * dom/Document.h: Change #if XSLT_SUPPORT to #ifdef XSLT_SUPPORT.
2548
2549 2007-01-31  Lars Knoll <lars@trolltech.com>
2550
2551         Fix the Qt build.
2552
2553         * platform/network/qt/ResourceHandleQt.cpp:
2554         (WebCore::ResourceHandle::setDefersLoading):
2555
2556 2007-01-31  Zack Rusin  <zack@kde.org>
2557
2558         Reviewed by Eric.
2559
2560         Implement SVGImage on the Qt platform.
2561
2562         * WebCore.pro:
2563         * loader/CachedImage.cpp:
2564         (WebCore::CachedImage::createImage):
2565         * platform/graphics/ImageBuffer.h:
2566         * platform/graphics/qt/ImageBufferQt.cpp:
2567         (WebCore::ImageBuffer::create):
2568         (WebCore::ImageBuffer::ImageBuffer):
2569         (WebCore::ImageBuffer::~ImageBuffer):
2570         (WebCore::ImageBuffer::context):
2571         (WebCore::ImageBuffer::pixmap):
2572         * platform/graphics/svg/SVGImage.cpp:
2573         (WebCore::SVGImage::nativeImageForCurrentFrame):
2574         (WebCore::SVGImage::setData):
2575
2576 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
2577
2578         Reviewed by Brady.
2579
2580         - fixed <rdar://problem/4939366> REGRESSION: Assertion failure and crash when going back in history (12314)
2581
2582         * loader/FrameLoader.cpp:
2583         (WebCore::FrameLoader::createWindow): special case a frame name of "_blank"
2584         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): ditto
2585
2586 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
2587
2588         Reviewed by Anders.
2589
2590         - fixed <rdar://problem/4963871> REGRESSION: Crash occurs at WebCore::Frame::loader() when attempting to open a saved archive file
2591
2592         * loader/DocumentLoader.cpp:
2593         (WebCore::DocumentLoader::request): Removed obsolete FIXME.
2594         (WebCore::DocumentLoader::initialRequest): Ditto.
2595         * loader/MainResourceLoader.cpp:
2596         (WebCore::MainResourceLoader::MainResourceLoader): Handle data loads from a timer, otherwise bad things happen.
2597         (WebCore::MainResourceLoader::handleDataLoadNow):
2598         (WebCore::MainResourceLoader::handleDataLoadSoon):
2599         (WebCore::MainResourceLoader::loadNow):
2600         (WebCore::MainResourceLoader::didCancel): cancel data load timer
2601         * loader/MainResourceLoader.h:
2602
2603 2007-01-30  Timothy Hatcher  <timothy@apple.com>
2604
2605         Reviewed by Darin.
2606
2607         <rdar://problem/4961953> Stop using NSString deprecated methods like initWithCString:
2608
2609         * WebCore.xcodeproj/project.pbxproj:
2610         * platform/graphics/svg/filters/cg/WKArithmeticFilter.m:
2611         (-[WKArithmeticFilter init]):
2612         * platform/graphics/svg/filters/cg/WKComponentMergeFilter.m:
2613         (-[WKComponentMergeFilter init]):
2614         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.m:
2615         (-[WKDiffuseLightingFilter init]):
2616         * platform/graphics/svg/filters/cg/WKDiscreteTransferFilter.m:
2617         (-[WKDiscreteTransferFilter init]):
2618         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.m:
2619         (-[WKDisplacementMapFilter init]):
2620         * platform/graphics/svg/filters/cg/WKDistantLightFilter.m:
2621         (-[WKDistantLightFilter init]):
2622         * platform/graphics/svg/filters/cg/WKGammaTransferFilter.m:
2623         (-[WKGammaTransferFilter init]):
2624         * platform/graphics/svg/filters/cg/WKLinearTransferFilter.m:
2625         (-[WKLinearTransferFilter init]):
2626         * platform/graphics/svg/filters/cg/WKNormalMapFilter.m:
2627         (-[WKNormalMapFilter init]):
2628         * platform/graphics/svg/filters/cg/WKPointLightFilter.m:
2629         (-[WKPointLightFilter init]):
2630         * platform/graphics/svg/filters/cg/WKSpecularLightingFilter.m:
2631         (-[WKSpecularLightingFilter init]):
2632         * platform/graphics/svg/filters/cg/WKSpotLightFilter.m:
2633         (-[WKSpotLightFilter init]):
2634         * platform/graphics/svg/filters/cg/WKTableTransferFilter.m:
2635         (-[WKTableTransferFilter init]):
2636
2637 2007-01-30  David Hyatt  <hyatt@apple.com>
2638
2639         Fix for Radar bug #4679426, golden gate bridge Web site layout broken.
2640         
2641         This is a regression caused by the addition of :lang support.  This
2642         feature caused us to accept any pseudo-class/element with function
2643         arguments, even ones we couldn't handle.  The site used such a construct
2644         in conjunction with :not, which turned :not(something-crazy) into not(false).
2645         This ended up being "true", and so we started matching a rule we used to
2646         reject.
2647
2648         The fix is to now aggressively parse pseudo-elements and classes and to
2649         cause the rejection of an entire rule if any pseudoclass or element within
2650         any simple selector of that rule is unrecognized.
2651
2652         Reviewed by darin
2653
2654         fast/css/invalid-pseudo-classes.html
2655
2656         * css/CSSGrammar.y:
2657         * css/CSSSelector.cpp:
2658         (WebCore::CSSSelector::extractPseudoType):
2659         * css/CSSSelector.h:
2660         (WebCore::CSSSelector::):
2661         * css/cssstyleselector.cpp:
2662         (WebCore::CSSStyleSelector::checkOneSelector):
2663
2664 2007-01-30  Mitz Pettel  <mitz@webkit.org>
2665
2666         Reviewed by Darin.
2667
2668         - fix http://bugs.webkit.org/show_bug.cgi?id=12487
2669           REGRESSION: Repro crash when a second background image is animated
2670
2671         Test: fast/images/animated-background-image-crash.html
2672
2673         * rendering/RenderObject.cpp:
2674         (WebCore::RenderObject::arenaDelete): Deref() all background images and the
2675         border image.
2676
2677 2007-01-30  Darin Adler  <darin@apple.com>
2678
2679         Reviewed by Maciej.
2680
2681         * dom/EventTarget.h:
2682         * dom/EventTarget.cpp: (WebCore::EventTarget::toNode):
2683         Use EventTargetNode instead of Node. Removed unneeded includes.
2684         Make EventTarget's destructor protected to make it clear that you
2685         should never delete one.
2686
2687         * dom/EventTargetNode.h:
2688         (WebCore::EventTargetNode::toNode):
2689         Tweaked formatting. Updated for change to return value.
2690
2691         * platform/graphics/BitmapImage.h: Updated comment for clarity.
2692         Marked FrameData Noncopyable.
2693
2694         * platform/graphics/Image.h: Tweaked formatting.
2695
2696         * platform/graphics/ImageAnimationObserver.h:
2697         Make ImageAnimationObserver's destructor protected to make it clear that you
2698         should never delete one.
2699
2700 2007-01-30  Mitz Pettel  <mitz@webkit.org>
2701
2702         Reviewed by Darin (by way of Hyatt).
2703
2704         - fix http://bugs.webkit.org/show_bug.cgi?id=12373
2705           ASSERTION FAILURE: !child->needsLayout() on paypal.com
2706
2707         Test: fast/table/inline-form-assert.html
2708
2709         * rendering/RenderContainer.cpp:
2710         (WebCore::RenderContainer::layout): Changed the assertion to ignore inlines.
2711
2712 2007-01-30  Alexey Proskuryakov  <ap@webkit.org>
2713
2714         Reviewed by Darin.
2715
2716         http://bugs.webkit.org/show_bug.cgi?id=12486
2717         XPathNSResolver.lookupNamespaceURI should return null if no URI is found
2718
2719         * xml/XPathNSResolver.idl: added [ConvertNullStringTo=Null].
2720
2721 2007-01-30  Anders Carlsson  <acarlsson@apple.com>
2722
2723         Reviewed by Maciej.
2724
2725         Revert the parts of 19244 that removed deferring NSURLConnections, that was not a correct change.
2726         Remove ASSERTS from loader.cpp that aren't true anymore since the callbacks are invoked without a handle
2727         when loading a subresource from an archive.
2728
2729         * loader/MainResourceLoader.cpp:
2730         (WebCore::MainResourceLoader::loadNow):
2731         * loader/ResourceLoader.cpp:
2732         (WebCore::ResourceLoader::releaseResources):
2733         (WebCore::ResourceLoader::load):
2734         (WebCore::ResourceLoader::setDefersLoading):
2735         * loader/loader.cpp:
2736         (WebCore::Loader::didFail):
2737         (WebCore::Loader::didReceiveResponse):
2738         (WebCore::Loader::didReceiveData):
2739         * platform/network/ResourceHandle.cpp:
2740         (WebCore::ResourceHandle::ResourceHandle):
2741         (WebCore::ResourceHandle::create):
2742         * platform/network/ResourceHandle.h:
2743         * platform/network/ResourceHandleInternal.h:
2744         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2745         * platform/network/mac/ResourceHandleMac.mm:
2746         (WebCore::ResourceHandle::start):
2747         (WebCore::ResourceHandle::setDefersLoading):
2748
2749 2007-01-30  Darin Adler  <darin@apple.com>
2750
2751         Reviewed by John.
2752
2753         - fix for <rdar://problem/4911504> REGRESSION: With a image selected, ctrl-clicking
2754           on page displays the wrong contextual menu items "Search in Google", "Search in Spotlight"
2755           and "Look up in Dictionary"
2756
2757         * platform/ContextMenu.cpp:
2758         (WebCore::selectionContainsPossibleWord): Added. Returns true if there are some
2759         non-whitespace characters in the selection.
2760         (WebCore::ContextMenu::populate): Don't add SearchSpotlightItem, SearchWebItem,
2761         or LookInDictionaryItem if selectionContainsPossibleWord returns false.
2762
2763 2007-01-30  Nikolas Zimmermann  <zimmermann@kde.org>
2764
2765         Reviewed by Oliver.
2766
2767         Respect stroke-width in absolute repaint rect calculations for SVG text.
2768         Added test: svg/custom/text-repaint-including-stroke.svg
2769
2770         * rendering/RenderSVGText.cpp:
2771         (WebCore::RenderSVGText::relativeBBox):
2772
2773 2007-01-30  Steve Falkenburg  <sfalken@apple.com>
2774
2775         Reviewed by Oliver.
2776
2777         Add missing includes.
2778
2779         * ksvg2/svg/SVGElementInstance.cpp:
2780
2781 2007-01-30  Alexey Proskuryakov  <ap@webkit.org>
2782
2783         Reviewed by Darin.
2784
2785         http://bugs.webkit.org/show_bug.cgi?id=12452
2786         XPath id() function is not supported
2787
2788         * xml/XPathFunctions.cpp:
2789         (WebCore::XPath::isWhitespace): A helper to detect XML whitespace.
2790
2791         (WebCore::XPath::FunId::isConstant):
2792         (WebCore::XPath::FunId::doEvaluate):
2793         (WebCore::XPath::FunctionMapping::):
2794         Implemented id().
2795
2796 2007-01-30  Zack Rusin  <zrusin@trolltech.com>
2797
2798         Reviewed by Sam.
2799
2800         Make the gradients work on the Qt platform.
2801
2802         * platform/graphics/svg/SVGPaintServerGradient.h:
2803         * platform/graphics/svg/SVGPaintServerLinearGradient.h:
2804         * platform/graphics/svg/SVGPaintServerRadialGradient.h:
2805         * platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp:
2806         (WebCore::SVGPaintServerGradient::fillColorArray):
2807         (WebCore::SVGPaintServerGradient::setup):
2808         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
2809         (WebCore::SVGPaintServerLinearGradient::setupGradient):
2810         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
2811         (WebCore::SVGPaintServerRadialGradient::setupGradient):
2812
2813 2007-01-30  Nikolas Zimmermann  <zimmermann@kde.org>
2814
2815         Reviewed by Eric & Oliver. Leak related fixes reviewed by Mark.
2816
2817         Finally make the SVG <use> implementation use the proper "shadow tree" concept,
2818         which is also used by the HTML forms implementation. It's the first time in ksvg
2819         history that <use> is not implement as a crude hack, but proper & sane.
2820
2821         Implement deep expansion of use trees both for the instance & shadow tree.
2822         (<use> on a <symbol> containing a <g> containg a <use> element referencing a <rect>)
2823  
2824         The shadow tree is free of any symbol/use tags, but is properly expanded to the
2825         actual referenced content. The instance tree (SVGElementInstance objects) now exactly
2826         exposes the "expanded" shadow tree, as required by the specification. Previously
2827         we cloned referenced <use> elements, so our faked use shadow tree itself contained
2828         <use> elements. That lead to very nasty bugs - finally these dirty pieces are gone.
2829
2830         Checked twice that the updating logic works for all weird "deep expansions" cases. Example:
2831         <rect id="someRect"/> <g id="g"> <symbol> <use xlink:href="#someRect"/> </g> <use xlink:href="#g" id="use"/>
2832  
2833         If you walk through the instanceRoot using JavasScript, and explicitely modify some propertties of "someRect"
2834         -> all instances get updated correctly. For such simple cases it doesn't even involve recloning the shadow tree!
2835
2836         SVGElementInstance is now an EventTarget, as demanded by the specification - sending events to <use> instances
2837         will be implemented in a follow-up patch - as well as the "share event listeners with referenced target" logic.
2838
2839         Fixes all updating/stability issues with svg/carto.net/window.svg.
2840         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6000 (<use> does not handle recursion safely)
2841
2842         Added test: svg/custom/use-on-use.svg (deep use referencing)
2843         Added test: svg/custom/use-on-g-containing-use.svg (nested deep use referencing)
2844         Added test: svg/custom/use-modify-target-container.svg (instanceRoot scripting, modifying <g> target)
2845         Added test: svg/custom/use-modify-target-symbol.svg (instanceRoot scripting, modfiying <symbol> target)
2846         Added test: svg/custom/use-modify-container-in-target.svg (modify <g> within referenced use target -> needs to update instances)
2847         Added test: svg/custom/use-recursion-1.svg (referencing container, whose children reference itself)
2848         Added test: svg/custom/use-recursion-2.svg (<use> self referencing)
2849         Added test: svg/custom/use-recursion-3.svg (<use> self rerencing, within <use> target)
2850         Added test: svg/custom/use-recursion-4.svg (cyclic referencing, within <use> target)
2851
2852         * bindings/scripts/CodeGeneratorJS.pm:
2853         * css/cssstyleselector.cpp:
2854         (WebCore::CSSStyleSelector::initForStyleResolve):
2855         (WebCore::CSSStyleSelector::adjustRenderStyle):
2856         * ksvg2/misc/SVGDocumentExtensions.cpp:
2857         (WebCore::SVGDocumentExtensions::removeTimeContainer):
2858         * ksvg2/svg/SVGElement.cpp:
2859         (WebCore::SVGElement::SVGElement):
2860         (WebCore::SVGElement::viewportElement):
2861         * ksvg2/svg/SVGElement.h:
2862         (WebCore::SVGElement::isShadowNode):
2863         (WebCore::SVGElement::shadowParentNode):
2864         (WebCore::SVGElement::setShadowParentNode):
2865         * ksvg2/svg/SVGElementInstance.cpp:
2866         (WebCore::SVGElementInstance::SVGElementInstance):
2867         (WebCore::SVGElementInstance::correspondingUseElement):
2868         (WebCore::SVGElementInstance::shadowTreeElement):
2869         (WebCore::SVGElementInstance::setShadowTreeElement):
2870         (WebCore::containsUseChildNode):
2871         (WebCore::SVGElementInstance::updateInstance):
2872         (WebCore::SVGElementInstance::addEventListener):
2873         (WebCore::SVGElementInstance::removeEventListener):
2874         (WebCore::SVGElementInstance::dispatchEvent):
2875         * ksvg2/svg/SVGElementInstance.h:
2876         (WebCore::SVGElementInstance::refEventTarget):
2877         (WebCore::SVGElementInstance::derefEventTarget):
2878         (WebCore::SVGElementInstance::hasOneRef):
2879         (WebCore::SVGElementInstance::refCount):
2880         (WebCore::SVGElementInstance::setParent):
2881         (WebCore::SVGElementInstance::parent):
2882         * ksvg2/svg/SVGElementInstance.idl:
2883         * ksvg2/svg/SVGGElement.cpp:
2884         (WebCore::SVGGElement::localMatrix):
2885         * ksvg2/svg/SVGGElement.h:
2886         * ksvg2/svg/SVGHiddenElement.h: Removed.
2887         * ksvg2/svg/SVGSVGElement.cpp:
2888         (WebCore::SVGSVGElement::~SVGSVGElement):
2889         * ksvg2/svg/SVGStyledElement.cpp:
2890         (WebCore::SVGStyledElement::updateElementInstance):
2891         * ksvg2/svg/SVGUseElement.cpp:
2892         (WebCore::SVGUseElement::removedFromDocument):
2893         (WebCore::SVGUseElement::notifyAttributeChange):
2894         (WebCore::dumpInstanceTree):
2895         (WebCore::SVGUseElement::buildPendingResource):
2896         (WebCore::SVGUseElement::attach):
2897         (WebCore::SVGUseElement::buildInstanceTree):
2898         (WebCore::SVGUseElement::handleDeepUseReferencing):
2899         (WebCore::SVGUseElement::buildShadowTree):
2900         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2901         (WebCore::SVGUseElement::attachShadowTree):
2902         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2903         (WebCore::SVGUseElement::transferUseAttributesToReplacedElement):
2904         * ksvg2/svg/SVGUseElement.h:
2905
2906 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
2907
2908         Reviewed by Eric.
2909
2910         <rdar://problem/4928646> REGRESSION: manual-tests/remove-input-file-onchange.html crashes
2911         
2912         * platform/FileChooser.h:
2913         (WebCore::FileChooser::disconnected): New method, so the RenderFileControl can tell when it's
2914         gotten disconected.
2915         * rendering/RenderFileUploadControl.cpp:
2916         (WebCore::RenderFileUploadControl::valueChanged): Avoid calling repainted() when onChange()
2917         handler destroyed us.
2918
2919 2007-01-30  Simon Hausmann  <hausmann@kde.org>
2920
2921         Reviewed by Zack.
2922
2923         Combine libJavaScriptCore into libWebKitQt.
2924         Build with ELF visibility if possible.
2925
2926         * WebCore.pro:
2927
2928 2007-01-30  Zack Rusin  <zack@kde.org>
2929
2930         The method has been removed from the header
2931         (make it compile)
2932
2933         * platform/network/qt/ResourceHandleQt.cpp:
2934
2935 2007-01-30  Zack Rusin  <zrusin@trolltech.com>
2936
2937         Reviewed by aroben
2938
2939         Compile fix. 
2940
2941         * loader/ResourceLoader.cpp:
2942         (WebCore::ResourceLoader::releaseResources):
2943         (WebCore::ResourceLoader::setDefersLoading):
2944
2945 2007-01-29  Zack Rusin  <zack@kde.org>
2946
2947         Reviewed by Lars
2948
2949         Propagate the allows-scrolling property on the frames
2950         correctly. If the frame has been constructed as non-
2951         scrolling, respect that and don't show scrollbars.
2952
2953         * platform/ScrollView.h:
2954         * platform/qt/ScrollViewQt.cpp:
2955         (WebCore::ScrollView::ScrollView):
2956         (WebCore::ScrollView::setHScrollbarMode):
2957         (WebCore::ScrollView::setVScrollbarMode):
2958         (WebCore::ScrollView::setAllowsScrolling):
2959
2960 2007-01-29  Geoffrey Garen  <ggaren@apple.com>
2961
2962         I am the chosen one! I have seen the faces of the final five! I will
2963         save the WebKit build!
2964         
2965         * loader/ResourceLoader.cpp:
2966         (WebCore::ResourceLoader::load):
2967
2968 2007-01-30  Graham Dennis  <graham.dennis@gmail.com>
2969
2970         Reviewed by Maciej.
2971
2972         Part of fix for http://bugs.webkit.org/show_bug.cgi?id=10725
2973         Image data in from RTFD clipboard data thrown away
2974         
2975         ResourceHandles no longer need to be able to defer loading as that is
2976         now handled by the ResourceLoader.
2977
2978         * loader/MainResourceLoader.cpp:
2979         (WebCore::MainResourceLoader::loadNow): updated to remove defersLoading argument.
2980         * loader/ResourceLoader.cpp:
2981         (WebCore::ResourceLoader::releaseResources): release the deferred request.
2982         (WebCore::ResourceLoader::load): defer creating the ResourceHandle instead of
2983         asking the ResourceHandle to defer loading.
2984         (WebCore::ResourceLoader::setDefersLoading): create the ResourceHandle if we have deferred creating it.
2985         * loader/ResourceLoader.h:
2986         * platform/network/ResourceHandle.cpp: ResourceHandle's don't need to know about deferLoading.
2987         (WebCore::ResourceHandle::ResourceHandle):
2988         (WebCore::ResourceHandle::create):
2989         * platform/network/ResourceHandle.h: ditto.
2990         * platform/network/ResourceHandleInternal.h: ditto.
2991         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2992         * platform/network/mac/ResourceHandleMac.mm: ditto.
2993         (WebCore::ResourceHandle::start):
2994
2995 2007-01-29  Brady Eidson  <beidson@apple.com>
2996
2997         Reviewed by Alice
2998
2999         Lets use smart pointers, shall we?
3000
3001         * platform/network/ResourceHandleInternal.h:
3002
3003 2007-01-29  Justin Garcia  <justin.garcia@apple.com>
3004
3005         Reviewed by harrison
3006         
3007         <rdar://problem/4960137>
3008         ASSERTION FAILURE calling SelectionController::setBaseAndExtent (11833)
3009
3010         * editing/SelectionController.cpp:
3011         (WebCore::SelectionController::setSelection): Hand off the selection
3012         to the selectionController responsible for it, instead of asserting.
3013         A selection object can't be constructed with endpoints in different 
3014         documents, so this code is only necessary for one endpoint.
3015
3016 2007-01-29  Ada Chan  <adachan@apple.com>
3017
3018         Reviewed by Brady.
3019         
3020         Moved the update of the title of the current entry in the backforward list to WebCore.
3021
3022         * loader/FrameLoader.cpp:
3023         (WebCore::FrameLoader::didChangeTitle):
3024
3025 2007-01-29  Adele Peterson  <adele@apple.com>
3026
3027         Reviewed by Darin.
3028
3029         More preparation for event handling fixes.
3030
3031         * bridge/EditorClient.h: Removed EventTargetNode parameter from handleKeyPress since we can just get that from the event.
3032         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): ditto.
3033         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): ditto.
3034         * page/EventHandler.h: ditto.
3035         * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): ditto.
3036
3037         * editing/Editor.h:
3038         * editing/Editor.cpp:
3039         (WebCore::Editor::handleKeyPress): Removed EventTargetNode parameter.
3040         (WebCore::Editor::execCommand): Made commandMap use AtomicStringImpls instead of Strings.
3041         (WebCore::Editor::insertText): Moved from the bridge.
3042
3043         * page/mac/WebCoreFrameBridge.h: Moved insertText method to Editor.
3044         * page/mac/WebCoreFrameBridge.mm:
3045
3046         * WebCore.exp: Updated exports.
3047
3048 2007-01-29  Anders Carlsson  <acarlsson@apple.com>
3049
3050         Reviewed by Geoff.
3051
3052         <rdar://problem/4960097>
3053         http://bugs.webkit.org/show_bug.cgi?id=12444
3054         Assertion failure in -[WebCoreFrameBridge installInFrame:]
3055         
3056         The problem was that the XML tokenizer didn't create elements with 
3057         createdByParser set to true.
3058         
3059         * dom/Document.cpp:
3060         (WebCore::Document::createElement):
3061         New method which takes a QName. This is used by both the XML tokenizer and createElementNS.
3062         
3063         (WebCore::Document::createElementNS):
3064         Call new createElement method.
3065         
3066         * dom/XMLTokenizer.h:        
3067         * dom/XMLTokenizer.cpp:
3068         (WebCore::XMLTokenizer::XMLTokenizer):
3069         (WebCore::XMLTokenizer::~XMLTokenizer):
3070         Use an OwnPtr for the pending callbacks object. Also, use String instead of StringImpl in the hash map.
3071         
3072         (WebCore::toString):
3073         (WebCore::XMLTokenizer::startElementNs):
3074         Call createElement.
3075         
3076 2007-01-29  Brady Eidson  <beidson@apple.com>
3077
3078         Reviewed by Oliver
3079
3080         http://bugs.webkit.org/show_bug.cgi?id=12465
3081         Only set the iconURL port for non-zero ports
3082
3083         * loader/FrameLoader.cpp:
3084         (WebCore::FrameLoader::iconURL):
3085
3086 2007-01-29  John Sullivan  <sullivan@apple.com>
3087
3088         * platform/network/mac/ResourceRequestMac.mm:
3089         Build fix -- removed #import of no-longer-extant WebDataProtocol.h (and also one of the
3090         two #imports for WebCoreSystemInterface.h, while I was at it)
3091
3092 2007-01-29  Anders Carlsson  <acarlsson@apple.com>
3093
3094         Reviewed by Oliver.
3095
3096         * page/DragController.cpp:
3097         (WebCore::DragController::dragEnteredOrUpdated):
3098         Only try a drag operation if the drag client explicitly specified that it is OK
3099
3100 2007-01-29  Oliver Hunt  <oliver@apple.com>
3101
3102         Reviewed by Adam.
3103
3104         Migrated more drag logic and state to WebCore
3105                                               
3106         * page/DragClient.h:       
3107
3108         * page/DragController.cpp:
3109         (WebCore::DragController::delegateDragSourceAction):
3110           New forwarding method for the UI delegate
3111         * page/DragController.h:
3112         (WebCore::DragController::dragOffset):
3113           Now store the drag offset -- the offset of the cursor relative to the drag image)
3114           in DragController
3115         * page/EventHandler.cpp:
3116         (WebCore::EventHandler::allowDHTMLDrag):
3117           Moved from WebFrameBridge
3118         * page/EventHandler.h:
3119         * page/mac/EventHandlerMac.mm:
3120         (WebCore::EventHandler::eventMayStartDrag):
3121         (WebCore::EventHandler::handleDrag):                  
3122           EventHandlerMac now uses EventHandler::allowDHTMLDrag rather than the 
3123           implementation in WebFrameBridge
3124         * page/mac/WebCoreFrameBridge.h:
3125           removed definition of allowDHTMLDrag from WebFrameBridge
3126         * platform/graphics/svg/SVGImageEmptyClients.h:
3127         (WebCore::SVGEmptyDragClient::dragSourceActionMaskForPoint):
3128           Updated empty DragClient
3129
3130 2007-01-29  Alexey Proskuryakov  <ap@webkit.org>
3131
3132         Reviewed by Darin.
3133
3134         http://bugs.webkit.org/show_bug.cgi?id=12359
3135         XPathEvaluator may return some nodes more than once in a result set
3136
3137         Test: fast/xpath/nodeset-duplicates.html
3138
3139         * xml/XPathPath.cpp:
3140         (WebCore::XPath::LocationPath::doEvaluate): Ensure uniqueness of elements
3141         in the node-set.
3142
3143         * xml/XPathPredicate.cpp:
3144         (WebCore::XPath::Union::doEvaluate): Fixed a uniqueness algorithm that was
3145         already present here. Added a FIXME about incorrect result ordering.
3146
3147 2007-01-29  Alexey Proskuryakov  <ap@webkit.org>
3148
3149         Reviewed by Darin.
3150
3151         http://bugs.webkit.org/show_bug.cgi?id=12340
3152         XPathEvaluator behavior does not match Firefox - name() and attribute nodes
3153
3154         * xml/XPathFunctions.cpp:
3155         (WebCore::XPath::FunName::doEvaluate): Do not try to append a prefix if it doesn't exist.
3156
3157 2007-01-29  Alexey Proskuryakov  <ap@webkit.org>
3158
3159         Reviewed by Darin.
3160
3161         http://bugs.webkit.org/show_bug.cgi?id=11815
3162         XPathEvaluator behavior does not match Firefox - substring() and empty element
3163
3164         Test: fast/xpath/empty-string-substring.html
3165
3166         * xml/XPathValue.cpp:
3167         (WebCore::XPath::Value::Value):
3168         * xml/XPathValue.h:
3169         Added a constructor taking const char*, so that string literals and arrays don't 
3170         get converted to boolean values.
3171
3172 2007-01-29  Zack Rusin  <zrusin@trolltech.com>
3173
3174         Cosmetic fixes - don't resize the widget in the constructor
3175         (it was a hack from the initial port) and fix the paint
3176         signature.
3177
3178         * platform/qt/ScrollViewCanvasQt.cpp:
3179         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
3180         * platform/qt/WidgetQt.cpp:
3181         (WebCore::Widget::paint):
3182
3183 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
3184
3185         - change from struct to class to make picky compilers happy
3186
3187         * loader/SubstituteData.h:
3188
3189 2007-01-30  Mark Rowe  <mrowe@apple.com>
3190
3191         Reviewed by Maciej.
3192
3193         http://bugs.webkit.org/show_bug.cgi?id=12458
3194         Bug 12458: Crash in W3C-SVG-1.1/animate-elem-09-t.svg running layout tests under guard malloc
3195
3196         * ksvg2/svg/SVGAnimationElement.cpp: 
3197         (WebCore::parseValues): ptr either points to a ';' or off the end of the buffer.  We're
3198         interested in what comes before the ';', so start there instead.
3199
3200 2007-01-29  Zack Rusin  <zrusin@trolltech.com>
3201
3202         Reviewed by Lars.
3203
3204         Take the scrollbars into considation when computing
3205         the contents size of the main frame.
3206
3207         * platform/qt/PlatformScrollBarQt.cpp:
3208         (WebCore::PlatformScrollbar::paint):
3209         * platform/qt/ScrollViewQt.cpp:
3210         (WebCore::ScrollView::visibleWidth):
3211         (WebCore::ScrollView::visibleHeight):
3212         (WebCore::ScrollView::visibleContentRect):
3213         * platform/qt/WidgetQt.cpp:
3214         (WebCore::Widget::invalidate):
3215         (WebCore::Widget::invalidateRect):
3216
3217 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
3218
3219         - fix includes
3220
3221         * loader/SubstituteData.h:
3222
3223 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
3224
3225         - added new file that I forgot in the last commit
3226
3227         * loader/SubstituteData.h: Added.
3228         (WebCore::SubstituteData::SubstituteData):
3229         (WebCore::SubstituteData::isValid):
3230         (WebCore::SubstituteData::content):
3231         (WebCore::SubstituteData::mimeType):
3232         (WebCore::SubstituteData::textEncoding):
3233         (WebCore::SubstituteData::failingURL):
3234
3235 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
3236
3237         Reviewed by Mark.
3238
3239         - made data loading cross-platform
3240         - fixed <rdar://problem/4910106>
3241
3242         * WebCore.exp:
3243         * WebCore.xcodeproj/project.pbxproj:
3244         * loader/CachedResource.cpp:
3245         * loader/CachedResource.h:
3246         * loader/DocLoader.cpp:
3247         (WebCore::DocLoader::requestResource):
3248         * loader/DocumentLoader.cpp:
3249         (WebCore::DocumentLoader::DocumentLoader):
3250         (WebCore::DocumentLoader::setRequest):
3251         (WebCore::DocumentLoader::urlForHistory):
3252         (WebCore::DocumentLoader::unreachableURL):
3253         * loader/DocumentLoader.h:
3254         (WebCore::DocumentLoader::substituteData):
3255         * loader/FrameLoader.cpp:
3256         (WebCore::FrameLoader::load):
3257         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
3258         (WebCore::FrameLoader::reloadAllowingStaleData):
3259         (WebCore::FrameLoader::reload):
3260         (WebCore::FrameLoader::commitProvisionalLoad):
3261         (WebCore::FrameLoader::startLoadingMainResource):
3262         (WebCore::FrameLoader::startLoading):
3263         (WebCore::FrameLoader::checkNavigationPolicy):
3264         * loader/FrameLoader.h:
3265         * loader/FrameLoaderClient.h:
3266         * loader/MainResourceLoader.cpp:
3267         (WebCore::MainResourceLoader::willSendRequest):
3268         (WebCore::MainResourceLoader::continueAfterContentPolicy):
3269         (WebCore::MainResourceLoader::handleEmptyLoad):
3270         (WebCore::MainResourceLoader::handleDataLoad):
3271         (WebCore::MainResourceLoader::loadNow):
3272         (WebCore::MainResourceLoader::load):
3273         * loader/MainResourceLoader.h:
3274         * loader/mac/DocumentLoaderMac.mm:
3275         * loader/mac/WebDataProtocol.h: Removed.
3276         * loader/mac/WebDataProtocol.mm: Removed.
3277         * loader/qt/DocumentLoaderQt.cpp:
3278         * platform/graphics/svg/SVGImageEmptyClients.h:
3279         (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
3280
3281 2007-01-29  Zack Rusin  <zrusin@trolltech.com>
3282
3283         Order the build files alphabetically instead of
3284         the random mess we had before.
3285
3286         * WebCore.pro:
3287
3288 2007-01-29  Zack Rusin  <zack@kde.org>
3289
3290         Reviewed by Lars
3291
3292         Use the platform independent scrollbar code.
3293         Remove the redundant empty stubs and forward
3294         few missing platform scrollbar calls.
3295
3296         * WebCore.pro:
3297         * platform/qt/PlatformScrollBarQt.cpp:
3298         (WebCore::PlatformScrollbar::paint):
3299         (WebCore::PlatformScrollbar::setRect):
3300
3301 2007-01-29  Lars Knoll <lars@trolltech.com>
3302
3303         Reviewed by Zack
3304
3305         Fix the way we handle native widgets (QWidget) inside
3306         WebCore. Now WebCore::Widget owns the QWidget in all
3307         cases. This is the only way to get well defined semantics
3308         for all teh native widgets we have (currently ScrollView
3309         and ScrollBar, but plugins will follow).
3310
3311         This has the side effect that one cannot rely on a defined 
3312         lifetime of a QWebFrame when using the API. 
3313
3314         * platform/Widget.h:
3315         * platform/qt/PlatformScrollBarQt.cpp:
3316         (WebCore::PlatformScrollbar::PlatformScrollbar):
3317         * platform/qt/ScrollViewQt.cpp:
3318         (WebCore::ScrollView::addChild):
3319         (WebCore::ScrollView::removeChild):
3320         * platform/qt/WidgetQt.cpp:
3321         (WebCore::WidgetPrivate::WidgetPrivate):
3322         (WebCore::WidgetPrivate::~WidgetPrivate):
3323         (WebCore::Widget::qwidget):
3324
3325 2007-01-28  George Staikos  <staikos@kde.org>
3326
3327         Reviewed by Maciej.
3328
3329         Don't send data during a redirect -> causes assert failure.
3330
3331         * platform/network/qt/ResourceHandleManagerQt.cpp:
3332         (WebCore::ResourceHandleManager::receivedData):
3333
3334 2007-01-29  Mark Rowe  <mrowe@apple.com>
3335
3336         Reviewed by Brady.
3337
3338         http://bugs.webkit.org/show_bug.cgi?id=11085
3339         Bug 11085: REGRESSION: favicon.ico always looked for on port 80
3340
3341         * loader/FrameLoader.cpp:
3342         (WebCore::FrameLoader::iconURL): Copy the port over to the favicon URL.
3343
3344 2007-01-28  Adam Roben  <aroben@apple.com>
3345
3346         Reviewed by Adele.
3347
3348         Fix http://bugs.webkit.org/show_bug.cgi?id=12453
3349         REGRESSION(r19197): Tabbing into web page requires two key presses
3350
3351         All layout tests pass.
3352
3353         * page/FocusController.cpp:
3354         (WebCore::FocusController::advanceFocus): If there's no focused frame,
3355         actually go ahead and find a focusable node instead of just focusing
3356         the main frame and quitting. This behavior was a holdover from a
3357         previous desired tabbing behavior with respect to frames.
3358
3359 2007-01-28  David Kilzer  <ddkilzer@webkit.org>
3360
3361         Reviewed by Darin and David Hyatt.
3362
3363         - fix http://bugs.webkit.org/show_bug.cgi?id=12423
3364           Mixing white-space:pre text with non white-space:pre text does not wrap properly
3365
3366         Test: fast/block/basic/white-space-pre-wraps.html
3367
3368         * rendering/bidi.cpp:
3369         (WebCore::RenderBlock::findNextLineBreak): Wrap a non-wrapping text run if it
3370         appears on a line with previous text runs that do wrap.
3371
3372 2007-01-28  Mitz Pettel  <mitz@webkit.org>
3373
3374         Reviewed by Darin.
3375
3376         - fix http://bugs.webkit.org/show_bug.cgi?id=8360
3377           Repro crash when onscroll handler deletes the scrolled object
3378
3379         Test: fast/layers/removed-by-scroll-handler.html
3380
3381         * page/FrameView.cpp:
3382         (WebCore::FrameViewPrivate::FrameViewPrivate): Added a m_enqueueEvents count.
3383         (WebCore::FrameView::layout): Raise the enqueue count before starting layout and
3384         until after enqueued events are dispatched.
3385         (WebCore::FrameView::scheduleEvent): Made this function dispatch the event
3386         immediately unless the enqueue count is positive.
3387         * rendering/RenderLayer.cpp:
3388         (WebCore::RenderLayer::scrollToOffset): Schedule the scroll event through the
3389         FrameView.
3390         (WebCore::RenderLayer::scrollRectToVisible):
3391         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3392         (WebCore::Marquee::start):
3393
3394 2007-01-28  Charles Ying  <charles_ying@yahoo.com>
3395
3396         Reviewed by eseidel.  Landed by eseidel.
3397
3398         Fix http://bugs.webkit.org/show_bug.cgi?id=12429
3399             animateTransform rotate, with cx/cy is broken
3400             
3401         SVGTransform now contains a float point to store the rotation center, needed
3402             to track rotation center for interpolation by animateTransform.
3403             
3404         SVGTransform now has an additional constructor:
3405             SVGTransform(type) to make empty base value transforms that match their
3406             distanced values.
3407             
3408         Removed m_colorDistance and m_transformDistance from their respective classes
3409             as they are now computed at update time.
3410
3411         Fix a case where animateTransform did not parse transform values correctly
3412             according to BNF in W3C spec:
3413
3414         Test case in:
3415         * manual-tests/animation/animateTransform-toanimation.svg: Added.
3416
3417         Fix a case where animateTransform only specified a to animation only.
3418
3419         Test case in:
3420         * manual-tests/animation/animateTransform-parser.svg: Added.
3421
3422         * ksvg2/svg/SVGAnimateColorElement.cpp:
3423         (WebCore::SVGAnimateColorElement::updateAnimationBaseValueFromElement):
3424         (WebCore::SVGAnimateColorElement::updateAnimatedValue):
3425         (WebCore::SVGAnimateColorElement::calculateFromAndToValues):
3426         * ksvg2/svg/SVGAnimateColorElement.h:
3427         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3428         (WebCore::SVGAnimateTransformElement::updateAnimatedValue):
3429         (WebCore::SVGAnimateTransformElement::updateAnimationBaseValueFromElement):
3430         (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
3431         (WebCore::SVGAnimateTransformElement::parseTransformValue):
3432         * ksvg2/svg/SVGAnimateTransformElement.h:
3433         * ksvg2/svg/SVGTransform.cpp:
3434         (SVGTransform::SVGTransform):
3435         (SVGTransform::angle):
3436         (SVGTransform::rotationCenter):
3437         (SVGTransform::setTranslate):
3438         (SVGTransform::setScale):
3439         (SVGTransform::setRotate):
3440         (SVGTransform::setSkewX):
3441         (SVGTransform::setSkewY):
3442         * ksvg2/svg/SVGTransform.h:
3443         * ksvg2/svg/SVGTransformDistance.cpp:
3444         (WebCore::SVGTransformDistance::SVGTransformDistance):
3445         (WebCore::SVGTransformDistance::scaledDistance):
3446         (WebCore::SVGTransformDistance::addSVGTransforms):
3447         (WebCore::SVGTransformDistance::addSVGTransform):
3448         (WebCore::SVGTransformDistance::addToSVGTransform):
3449         (WebCore::SVGTransformDistance::distance):
3450         * ksvg2/svg/SVGTransformDistance.h:
3451         * manual-tests/animation/animateTransform-parser.svg: Added.
3452         * manual-tests/animation/animateTransform-toanimation.svg: Added.
3453
3454 2007-01-27  Adam Roben  <aroben@apple.com>
3455
3456         Reviewed by Ada.
3457
3458         Fix <rdar://problem/4957184> REGRESSION: After creating a new mail
3459         message, the caret is automatically in message body
3460
3461         -[WebHTMLView _updateActiveState] was calling
3462         FocusController::focusedOrMainFrame, which had the surprising
3463         side-effect of setting the focused frame if there was none. The fix
3464         was to remove this side-effect.
3465
3466         No tests possible, as this bug involves focus outside the WebView,
3467         which we have no support for in DRT.
3468
3469         Change inspired by Dave Harrison.
3470
3471         * page/FocusController.cpp:
3472         (WebCore::FocusController::focusedOrMainFrame): Removed this method's
3473         non-obvious side-effect of setting the focused frame.
3474         * WebCore.xcodeproj/project.pbxproj: Version wars.
3475
3476 2007-01-27  Don Gibson  <dgibson77@gmail.com>
3477
3478         Reviewed by Maciej.
3479
3480         http://bugs.webkit.org/show_bug.cgi?id=11880: Improve some egregious
3481         Windows form control drawing issues:
3482         Provide Classic mode fallbacks for the button/textfield drawing
3483         routines.
3484         Provide some basic drawing of menulists (still relatively broken).
3485         Some cleanup.
3486
3487         * platform/win/TemporaryLinkStubs.cpp:
3488         (WebCore::RenderThemeWin::systemFont):
3489         * rendering/RenderThemeWin.cpp:
3490         (WebCore::m_menuListTheme):
3491         (WebCore::RenderThemeWin::close):
3492         (WebCore::RenderThemeWin::determineClassicState):
3493         (WebCore::RenderThemeWin::getThemeData):
3494         (WebCore::RenderThemeWin::paintButton):
3495         (WebCore::RenderThemeWin::paintTextField):
3496         (WebCore::RenderThemeWin::paintMenuList):
3497         (WebCore::RenderThemeWin::paintMenuListButton):
3498         * rendering/RenderThemeWin.h:
3499         (WebCore::ThemeData::m_classicState):
3500         (WebCore::RenderThemeWin::setRadioSize):
3501         (WebCore::RenderThemeWin::paintTextArea):
3502
3503 2007-01-27  David Kilzer  <ddkilzer@webkit.org>
3504
3505         Reviewed by Adam.
3506
3507         - fix http://bugs.webkit.org/show_bug.cgi?id=12260
3508           Windows platform build is not maintained
3509
3510         * loader/win/FrameLoaderWin.cpp:
3511         * platform/network/win/ResourceHandleWin.cpp:
3512         * platform/win/TemporaryLinkStubs.cpp:
3513         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
3514         (WebCore::contextMenuItemTagDownloadLinkToDisk):
3515         (WebCore::contextMenuItemTagCopyLinkToClipboard):
3516         (WebCore::contextMenuItemTagOpenImageInNewWindow):
3517         (WebCore::contextMenuItemTagDownloadImageToDisk):
3518         (WebCore::contextMenuItemTagCopyImageToClipboard):
3519         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
3520         (WebCore::contextMenuItemTagCopy):
3521         (WebCore::contextMenuItemTagGoBack):
3522         (WebCore::contextMenuItemTagGoForward):
3523         (WebCore::contextMenuItemTagStop):
3524         (WebCore::contextMenuItemTagReload):
3525         (WebCore::contextMenuItemTagCut):
3526         (WebCore::contextMenuItemTagPaste):
3527         (WebCore::contextMenuItemTagNoGuessesFound):
3528         (WebCore::contextMenuItemTagIgnoreSpelling):
3529         (WebCore::contextMenuItemTagLearnSpelling):
3530         (WebCore::contextMenuItemTagSearchWeb):
3531         (WebCore::contextMenuItemTagLookUpInDictionary):
3532         (WebCore::contextMenuItemTagOpenLink):
3533         (WebCore::contextMenuItemTagIgnoreGrammar):
3534         (WebCore::contextMenuItemTagSpellingMenu):
3535         (WebCore::contextMenuItemTagShowSpellingPanel):
3536         (WebCore::contextMenuItemTagCheckSpelling):
3537         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
3538         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3539         (WebCore::contextMenuItemTagFontMenu):
3540         (WebCore::contextMenuItemTagBold):
3541         (WebCore::contextMenuItemTagItalic):
3542         (WebCore::contextMenuItemTagUnderline):
3543         (WebCore::contextMenuItemTagOutline):
3544         (WebCore::contextMenuItemTagWritingDirectionMenu):
3545         (WebCore::contextMenuItemTagDefaultDirection):
3546         (WebCore::contextMenuItemTagLeftToRight):
3547         (WebCore::contextMenuItemTagRightToLeft):
3548         (WebCore::DocumentLoader::unreachableURL):
3549         (WebCore::FrameLoader::redirectDataToPlugin):
3550         (WebCore::FrameLoader::partClearedInBegin):
3551         (WebCore::FrameLoader::createPlugin):
3552
3553 2007-01-27  Sam Weinig  <sam@webkit.org>
3554
3555         Reviewed by Mitz.
3556
3557         - Patch for http://bugs.webkit.org/show_bug.cgi?id=11957
3558           REGRESSION: Unordered List Bullets too big and changing from size
3559
3560         * rendering/RenderListMarker.cpp:
3561         (WebCore::RenderListMarker::paint): Explicitly set the stroke size to 1.0f.
3562
3563 2007-01-27  Lars Knoll <lars@trolltech.com>
3564
3565         Fix the Qt build and disable the usage
3566         of QScrollbars for PlatformScrollBar for 
3567         now as it causes crashes in the layout tests.
3568
3569         * WebCore.pro:
3570         * ksvg2/svg/SVGTransformDistance.cpp:
3571         * page/qt/FrameQt.cpp:
3572         (WebCore::FrameQt::FrameQt):
3573         (WebCore::FrameQt::bindingRootObject):
3574         (WebCore::FrameQt::createRootObject):
3575         * page/qt/FrameQt.h:
3576         * platform/qt/PlatformScrollBarQt.cpp:
3577         (WebCore::PlatformScrollbar::PlatformScrollbar):
3578         * platform/qt/ScrollViewQt.cpp:
3579         (WebCore::ScrollView::addChild):
3580
3581 2007-01-27  David Kilzer  <ddkilzer@kilzer.net>
3582
3583         Reviewed by NOBODY (buildbot build fix).
3584
3585         * ksvg2/svg/ColorDistance.cpp:
3586         (WebCore: