Reviewed by rwlbuis.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2
3         Reviewed by rwlbuis.
4
5         Coverity fix. Coverity says:
6         "Event var_deref_model: Variable "page" tracked as NULL was passed to a function that dereferences it."
7
8         * platform/Font.cpp:
9         (WebCore::Font::glyphDataForCharacter):
10
11 2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
12
13         Reviewed by darin.
14
15         Coverity fix. Coverity says:
16         "Event var_deref_model: Variable "unicode" tracked as NULL was passed to a 
17         function that dereferences it."
18
19         * platform/DeprecatedString.cpp:
20         (WebCore::DeprecatedString::DeprecatedString):
21
22 2007-04-05  Adele Peterson  <adele@apple.com>
23
24         Reviewed by Hyatt.
25
26         Fix for <rdar://problem/5113593> REGRESSION: Search fields in RSS pages don't show ibeam cursor
27
28         * css/html4.css: Set the cursor values explicitly for input, textarea (to auto), & select (to default).
29
30 2007-04-05  David Hyatt  <hyatt@apple.com>
31
32         Fix for <rdar://problem/5078866> tables should only reset text-align
33         in quirks mode.
34
35         Reviewed by beth
36
37         * css/html4.css:
38         * css/quirks.css:
39
40 2007-04-05  Adele Peterson  <adele@apple.com>
41
42         Fixing typo that's crashing.
43
44         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
45           Use evt instead of null variable k.
46
47 2007-04-05  Adele Peterson  <adele@apple.com>
48
49         Reviewed by Hyatt.
50
51         Fix for <rdar://problem/5021500> Cursor should stay as pointer when slider is being dragged
52
53         Don't set the selection ibeam cursor when there's a node that's capturing mouse events.
54
55         * page/EventHandler.cpp:
56         (WebCore::selectCursor):
57         (WebCore::EventHandler::handleMouseMoveEvent):
58
59 2007-04-05  Geoffrey Garen  <ggaren@apple.com>
60
61         Reviewed by Beth Dakin.
62
63         More clean-up while fixing <rdar://problem/5112273> REGRESSION(TOT): 
64         Reproducible crash loading an old version of amazon.com as a web archive
65         
66         Layout tests pass.
67         
68         Removed more superfluous document NULL checks. (Node::document() never 
69         returns NULL, and it asserts as much.)
70         
71         Merged some duplicate editing code into a static inline function.
72         
73         * page/mac/WebCoreFrameBridge.mm:
74         (updateRenderingForBindings): Removed superfluous static_cast.
75
76 2007-04-05  Adele Peterson  <adele@apple.com>
77
78         Reviewed by Darin.
79
80         A little cleanup from my last checkin.  Always check if an Event is really a MouseEvent or a KeyboardEvent
81         before casting it.
82
83         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
84         * html/HTMLSelectElement.cpp:
85         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
86         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
87         * html/HTMLTextFieldInnerElement.cpp:
88         (WebCore::HTMLSearchFieldResultsButtonElement::defaultEventHandler):
89         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
90         * ksvg2/svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler):
91         * page/ContextMenuController.cpp: (WebCore::ContextMenuController::handleContextMenuEvent):
92         * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
93         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
94
95 2007-04-05  Geoffrey Garen  <ggaren@apple.com>
96
97         Reviewed by Beth Dakin.
98         
99         Some clean-up while fixing <rdar://problem/5112273> REGRESSION(TOT): 
100         Reproducible crash loading an old version of amazon.com as a web archive
101         
102         Removed superfluous document NULL checks. (Node::document() never returns
103         NULL, and it asserts as much.)
104         
105         Removed duplicate implementation of displayString.
106         
107         Layout tests pass.
108
109         * bindings/objc/DOMInternal.h:
110         * bindings/objc/DOMInternal.mm:
111         * html/HTMLGenericFormElement.cpp:
112         (WebCore::HTMLGenericFormElement::supportsFocus):
113         * html/HTMLPlugInElement.cpp:
114         (WebCore::HTMLPlugInElement::createNPObject):
115         * platform/ContextMenu.cpp:
116         (WebCore::ContextMenu::checkOrEnableIfNeeded):
117         * rendering/HitTestResult.cpp:
118         (WebCore::displayString):
119         * rendering/HitTestResult.h:
120         * rendering/RenderLayer.cpp:
121         (WebCore::RenderLayer::updateHoverActiveState):
122
123 2007-04-05  Oliver Hunt  <oliver@apple.com>
124
125         Reviewed by Adam.
126
127         Fix rdar://problem/5030934 -- landscape PDFs embedded as an image are cut off
128         also fixes scaling of pdf images
129
130         PDFDocumentImage was not accounting for page rotation in a number of places
131
132         * platform/graphics/cg/PDFDocumentImage.cpp:
133         (WebCore::PDFDocumentImage::size):
134           we need to account for rotation of the pdf image effecting our bounds
135         (WebCore::PDFDocumentImage::draw):
136           When compensating for flipped coords we need to use the correct rect for the 
137           coordinate space.  We can't pass size() to CGContextDrawPDFDocument as it
138           returns the rotated bounds now -- this is also save the old 
139           FloatSize -> IntSize -> FloatSize conversions.
140           
141
142 2007-04-04  Alexey Proskuryakov  <ap@webkit.org>
143
144         Reviewed by Darin.
145
146         http://bugs.webkit.org/show_bug.cgi?id=13278
147         REGRESSION: cannot change SELECT option
148
149         Test: fast/forms/option-change-single-selected.html
150
151         * html/HTMLSelectElement.cpp:
152         (WebCore::HTMLSelectElement::setSelectedIndex): If multiple selection is not allowed, 
153         be sure to deselect the previous option.
154
155 2007-04-04  Adele Peterson  <adele@apple.com>
156
157         Reviewed by Oliver.
158
159         Fix for <rdar://5105009> Prepare for fix to send mousedown and mouseup (but not click) events when right-clicking
160
161         * page/EventHandler.cpp: Don't ever send click events for right-clicks.
162         (WebCore::EventHandler::handleMouseDoubleClickEvent):
163         (WebCore::EventHandler::handleMouseReleaseEvent):
164         
165         Check that the mousedown and mouseup are not with the right button before performing default behavior.
166         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
167         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
168         * html/HTMLSelectElement.cpp:
169         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
170         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
171         * html/HTMLTextFieldInnerElement.cpp:
172         (WebCore::HTMLSearchFieldResultsButtonElement::defaultEventHandler):
173         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
174         * ksvg2/svg/SVGAElement.cpp:(WebCore::SVGAElement::defaultEventHandler):
175         * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
176         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
177
178 2007-04-03  Justin Garcia  <justin.garcia@apple.com>
179
180         Reviewed by darin
181         
182         <rdar://problem/5026848> Can cut/delete ToDo subunits
183         
184         We were removing non-editable content during a delete.
185
186         * editing/DeleteSelectionCommand.cpp: 
187         (WebCore::DeleteSelectionCommand::initializePositionData): 
188         Set m_startRoot and m_endRoot.
189         (WebCore::DeleteSelectionCommand::removeNode): If a node
190         is not inside both the start and end roots, remove it only
191         if it is in editable content.
192         * editing/DeleteSelectionCommand.h: Added m_startRoot and 
193         m_endRoot, the editable roots that contain the start and end
194         of the selection, respectively.  We consult these every
195         time we remove a node, and don't want to recompute them 
196         on every call to removeNode().
197
198 2007-04-03  David Hyatt  <hyatt@apple.com>
199
200         Fix for <rdar://problem/5108896>, make sure the assert for setEncodedSize
201         deals with the error case.
202
203         Reviewed by andersca
204
205         * loader/CachedResource.cpp:
206         (WebCore::CachedResource::setEncodedSize):
207
208 2007-04-03  Anders Carlsson  <andersca@apple.com>
209
210         Reviewed by Dave Hyatt.
211
212         * loader/ImageDocument.cpp:
213         Don't call error() in stopParsing.
214
215 2007-04-03  Justin Garcia  <justin.garcia@apple.com>
216
217         Reviewed by darin
218         
219         <rdar://problem/5107422> 
220         TOT REGRESSION: Delete key fails to delete text, and cursor disappears in Mail.app
221         <rdar://problem/5107413> 
222         TOT REGRESSION: Crash deleting text in email (infinite recursion in shouldInsertNode)
223
224         * editing/CompositeEditCommand.cpp:
225         (WebCore::CompositeEditCommand::moveParagraphs):
226         Back out the call to shouldInsert until we
227         add WebViewInsertActionMoved, because Mail returns
228         NO from shouldInsert for WebViewInsertActionPasted
229         to override our Paste operation.
230
231 2007-04-03  Anders Carlsson  <andersca@apple.com>
232
233         Reviewed by Mitz.
234
235         Make window.innerWidth/innerHeight include the size of any present scrollbar to match Firefox.
236         
237         Make document.body.clientWidth/clientHeight return the width/height of the visible content when in
238         quirks mode to match WinIE.
239         
240         * bindings/js/kjs_window.cpp:
241         (KJS::Window::getValueProperty):
242         Return the width and height of the scroll view, not the visible width and height.
243         
244         * dom/Element.cpp:
245         (WebCore::Element::clientWidth):        
246         (WebCore::Element::clientHeight):
247         Return the visible size if the element is the body element and we're in quirks mode.
248
249 2007-04-03  Adele Peterson  <adele@apple.com>
250
251         Reviewed by Darin.
252
253         Updated fix for <rdar://problem/5107095> REGRESSION: disabled text color calculations are slowing down launchtime measurements
254
255         * platform/graphics/Color.cpp: Moved optimization for lightening black and darkening white into the Color class.
256         (WebCore::Color::light):
257         (WebCore::Color::dark):
258         * rendering/RenderTextControl.cpp: (WebCore::disabledTextColor): Skip the difference calculation for black text, which will always be lightened.
259
260 2007-04-03  Anders Carlsson  <andersca@apple.com>
261
262         Reviewed by Tim.
263
264         <rdar://problem/4649516> 
265         Turn off slow script dialog or crank up time that makes it come up
266         
267         * bindings/js/kjs_binding.cpp:
268         (KJS::ScriptInterpreter::ScriptInterpreter):
269         Increase the timeout to 10 seconds to match Firefox.
270
271 2007-04-03  Mitz Pettel  <mitz@webkit.org>
272
273         Reviewed by Darin.
274
275         - fix http://bugs.webkit.org/show_bug.cgi?id=13251
276           editing/style/fontsize-1.html fails intermittently when run multiple times on Intel, generates incorrect DOM
277
278         Covered by existing editing tests.
279
280         * css/CSSPrimitiveValue.cpp:
281         (WebCore::CSSPrimitiveValue::getFloatValue): Added ASSERTs that the requested conversion
282         is from a scalar type to a scalar type. The intermittent failures in the test were
283         the result of trying to convert an identifier type to a scalar type.
284         * editing/ApplyStyleCommand.cpp:
285         (WebCore::StyleChange::checkForLegacyHTMLStyleChange): Added a check that the
286         font-size property value is an absolute length. If it is not (such as in the case
287         of relative units or keywords like "x-large"), then no corresponding 'size' attribute
288         will be generated for legacy HTML.
289
290 2007-04-03  Mitz Pettel  <mitz@webkit.org>
291
292         Reviewed by Darin.
293
294         - fix http://bugs.webkit.org/show_bug.cgi?id=13218
295           <rdar://problem/5095977>
296           Reproducible crash after call to window.close()
297
298         * manual-tests/stale-currentEvent.html: Added.
299         * page/EventHandler.cpp:
300         (WebCore::EventHandler::hoverTimerFired): Instead of faking a mouse event,
301         just hit-test the last mouse event coordinates and update for hover state
302         changes. This eliminates the use of currentEvent, which can be a non-mouse
303         event or even a stale event.
304
305 2007-04-02  Adele Peterson  <adele@apple.com>
306
307         Reviewed by Maciej.
308
309         Fix for <rdar://problem/5107095> REGRESSION: disabled text color calculations are slowing down launchtime measurements
310
311         Hardcode disabled text colors for the most common cases- black and white.
312
313         * rendering/RenderTextControl.cpp: (WebCore::disabledTextColor):
314
315 2007-04-02  David Hyatt  <hyatt@apple.com>
316
317         Fix for <rdar://problem/5105784>, assertion failure in cache.  Encoded sizes were being set to
318         garbage by accident because of a mismatch between derived class and base class constructors.  This
319         patch cleans all of this up and gets rid of expiration date as a concept separate from the response.
320
321         Reviewed by anders
322
323         * dom/Document.cpp:
324         (WebCore::Document::processHttpEquiv):
325         * html/HTMLImageLoader.cpp:
326         (WebCore::HTMLImageLoader::updateFromElement):
327         * loader/Cache.cpp:
328         (WebCore::createResource):
329         (WebCore::Cache::requestResource):
330         * loader/Cache.h:
331         * loader/CachedCSSStyleSheet.cpp:
332         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
333         * loader/CachedCSSStyleSheet.h:
334         * loader/CachedImage.cpp:
335         (WebCore::CachedImage::CachedImage):
336         * loader/CachedImage.h:
337         * loader/CachedResource.cpp:
338         (WebCore::CachedResource::CachedResource):
339         (WebCore::CachedResource::finish):
340         * loader/CachedResource.h:
341         * loader/CachedScript.cpp:
342         (WebCore::CachedScript::CachedScript):
343         * loader/CachedScript.h:
344         * loader/CachedXBLDocument.cpp:
345         (WebCore::CachedXBLDocument::CachedXBLDocument):
346         * loader/CachedXBLDocument.h:
347         * loader/CachedXSLStyleSheet.cpp:
348         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
349         * loader/CachedXSLStyleSheet.h:
350         * loader/DocLoader.cpp:
351         (WebCore::DocLoader::DocLoader):
352         (WebCore::DocLoader::requestResource):
353         * loader/DocLoader.h:
354
355 2007-04-03  Antti Koivisto  <antti@apple.com>
356
357         Reviewed by Hyatt.
358
359         Render tree memory savings, part 3
360         
361         These changes shrink all RenderBlocks by additional 28 bytes. Together with parts 1 and 2
362         RenderBlock goes from 172 bytes to 128 bytes, a saving of 26%.
363         
364         - Pack bitfields together in RenderFlow
365         - Move top/bottom min/max margin values to a struct that is only allocated in case these
366           variables have non default values. Usually this is <5% of all blocks. 
367         - Move rarely used column variables to hash
368
369         * rendering/RenderBlock.cpp:
370         (WebCore::ColumnInfo::ColumnInfo):
371         (WebCore::RenderBlock::RenderBlock):
372         (WebCore::RenderBlock::~RenderBlock):
373         (WebCore::RenderBlock::layoutBlock):
374         (WebCore::RenderBlock::collapseMargins):
375         (WebCore::RenderBlock::clearFloatsIfNeeded):
376         (WebCore::RenderBlock::setCollapsedBottomMargin):
377         (WebCore::RenderBlock::layoutBlockChildren):
378         (WebCore::RenderBlock::paintColumns):
379         (WebCore::RenderBlock::paintObject):
380         (WebCore::RenderBlock::fillSelectionGaps):
381         (WebCore::RenderBlock::lowestPosition):
382         (WebCore::RenderBlock::rightmostPosition):
383         (WebCore::RenderBlock::leftmostPosition):
384         (WebCore::RenderBlock::nodeAtPoint):
385         (WebCore::RenderBlock::hitTestColumns):
386         (WebCore::RenderBlock::positionForCoordinates):
387         (WebCore::RenderBlock::availableWidth):
388         (WebCore::RenderBlock::calcColumnWidth):
389         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
390         (WebCore::RenderBlock::desiredColumnWidth):
391         (WebCore::RenderBlock::desiredColumnCount):
392         (WebCore::RenderBlock::columnRects):
393         (WebCore::RenderBlock::layoutColumns):
394         (WebCore::RenderBlock::adjustPointToColumnContents):
395         (WebCore::RenderBlock::adjustRectForColumns):
396         (WebCore::RenderBlock::setMaxTopMargins):
397         (WebCore::RenderBlock::setMaxBottomMargins):
398         * rendering/RenderBlock.h:
399         (WebCore::RenderBlock::maxTopMargin):
400         (WebCore::RenderBlock::maxBottomMargin):
401         (WebCore::RenderBlock::maxTopPosMargin):
402         (WebCore::RenderBlock::maxTopNegMargin):
403         (WebCore::RenderBlock::maxBottomPosMargin):
404         (WebCore::RenderBlock::maxBottomNegMargin):
405         (WebCore::RenderBlock::initMaxMarginValues):
406         (WebCore::RenderBlock::MaxMargin::MaxMargin):
407         (WebCore::RenderBlock::MaxMargin::topPosDefault):
408         (WebCore::RenderBlock::MaxMargin::topNegDefault):
409         (WebCore::RenderBlock::MaxMargin::bottomPosDefault):
410         (WebCore::RenderBlock::MaxMargin::bottomNegDefault):
411         * rendering/RenderFlexibleBox.cpp:
412         (WebCore::RenderFlexibleBox::layoutBlock):
413         * rendering/RenderFlow.h:
414         (WebCore::RenderFlow::RenderFlow):
415         (WebCore::RenderFlow::hasColumns):
416         * rendering/RenderInline.cpp:
417         (WebCore::RenderInline::RenderInline):
418         * rendering/RenderInline.h:
419
420 2007-04-03  Antti Koivisto  <antti@apple.com>
421
422         Reviewed by Hyatt.
423
424         Fix asserts, these may also be called for rel positioned elements
425
426         * rendering/RenderBox.cpp:
427         (WebCore::RenderBox::setStaticX):
428         (WebCore::RenderBox::setStaticY):
429
430 2007-04-02  David Hyatt  <hyatt@apple.com>
431
432         Throw in an assert to try to track down a problem where an image is being set to a smaller encoded
433         size.
434
435         * loader/CachedResource.cpp:
436         (WebCore::CachedResource::setEncodedSize):
437
438 2007-04-02  Ada Chan  <adachan@apple.com>
439
440         Reviewed by Adele.
441
442         <rdar://5105331> Missing null check in Editor::execCommand
443         Added null check.
444
445         * editing/Editor.cpp:
446         (WebCore::Editor::execCommand):
447
448 2007-04-02  Justin Garcia  <justin.garcia@apple.com>
449
450         Reviewed by darin
451
452         <rdar://problem/5058163> 
453         Hitting return inserts a new line between two To Dos, but caret is position after second ToDo
454
455         * editing/InsertParagraphSeparatorCommand.cpp:
456         (WebCore::InsertParagraphSeparatorCommand::doApply):
457         Removed refPos, it was unused.
458         Don't assume that upstream() moves to a different
459         node.  This assumption caused the line break to
460         be inserted *after* the caret and a bad position
461         to be set (added a testcase).
462         Use isStartOfParagraph instead of checking
463         for the existence of a br because the line might 
464         be broken by a newline character in text that 
465         preserves newlines.  Paragraphs that are created 
466         in other ways, like with blocks, are handled 
467         above (added a testcase).
468
469  2007-04-02  David Harrison  <harrison@apple.com>
470
471         Reviewed by Darin.
472
473         <rdar://problem/4906488> text attributes are not working for frame based web page
474
475         Attribute handling now treats each WebArea as its own world, rather than sometimes
476         referring back up to the top WebArea. e.g. getting/setting the selection now
477         operates on the WebArea containing the WebCoreAXObject that is being messaged (self).
478         The methods that sit above this and are able to go into arbitrary WebAreas
479         are accessibilityFocusedUIElement and doAXTextMarkerForPosition, allowing VoiceOver
480         to navigate between frames.
481         
482         * bridge/mac/WebCoreAXObject.mm:
483         (-[WebCoreAXObject topRenderer]):
484         (-[WebCoreAXObject frameView]):
485         (-[WebCoreAXObject topFrameView]):
486         Removed topDocument, renamed topView to topFrameView, added frameView.
487         
488         (-[WebCoreAXObject accessibilityAttributeValue:]):
489         AXSelectedTextMarkerRange, AXStartTextMarker, and AXEndTextMarker now use
490         self's WebArea, rather than the top WebArea.
491         
492         (-[WebCoreAXObject doAXTextMarkerRangeForLine:]):
493         Use self's WebArea, rather than the top WebArea.
494
495         (-[WebCoreAXObject doAXTextMarkerForPosition:]):
496         Use renamed methods for accessing top WebArea.
497          
498         (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
499         Use renamed methods for accessing self's WebArea.
500
501         (AXAttributeStringSetColor):
502         (AXAttributeStringSetNumber):
503         (AXAttributeStringSetFont):
504         (AXAttributeStringSetStyle):
505         (AXAttributeStringSetElement):
506         (-[WebCoreAXObject rendererForView:]):
507         Clean up uses of nil and NULL.
508         
509         (-[WebCoreAXObject accessibilityFocusedUIElement]):
510         Find the focused node on the whole page. If there is no focused node,
511         return the WebArea for the focused document.
512         
513         (-[WebCoreAXObject doSetAXSelectedTextMarkerRange:]):
514         Use self's WebArea, rather than the top WebArea.
515
516 2007-04-02  Antti Koivisto  <antti@apple.com>
517
518         Fix build. This one was not supposed to be checked in.
519
520         * rendering/RenderFlexibleBox.cpp:
521         (WebCore::RenderFlexibleBox::layoutBlock):
522
523 2007-03-30  Antti Koivisto  <antti@apple.com>
524
525         Reviewed by Hyatt.
526
527         Render tree memory savings, part 2
528         
529         - Move staticX and staticY variables to RenderLayer since they are only
530           applicable to positioned objects
531         - Move very rarely used overrideSize variable to hash
532         
533         These changes shrink all box types by 12 bytes
534
535         * rendering/RenderBox.cpp:
536         (WebCore::RenderBox::RenderBox):
537         (WebCore::RenderBox::destroy):
538         (WebCore::RenderBox::overrideSize):
539         (WebCore::RenderBox::setOverrideSize):
540         (WebCore::RenderBox::overrideWidth):
541         (WebCore::RenderBox::overrideHeight):
542         (WebCore::RenderBox::position):
543         (WebCore::RenderBox::calcWidth):
544         (WebCore::RenderBox::calcHeight):
545         (WebCore::RenderBox::staticX):
546         (WebCore::RenderBox::staticY):
547         (WebCore::RenderBox::setStaticX):
548         (WebCore::RenderBox::setStaticY):
549         (WebCore::RenderBox::calcAbsoluteHorizontal):
550         (WebCore::RenderBox::calcAbsoluteVertical):
551         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
552         (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
553         * rendering/RenderBox.h:
554         * rendering/RenderLayer.cpp:
555         (WebCore::RenderLayer::RenderLayer):
556         * rendering/RenderLayer.h:
557         (WebCore::RenderLayer::staticX):
558         (WebCore::RenderLayer::staticY):
559         (WebCore::RenderLayer::setStaticX):
560         (WebCore::RenderLayer::setStaticY):
561         * rendering/RenderObject.cpp:
562         (WebCore::RenderObject::RenderObject):
563         * rendering/RenderObject.h:
564         (WebCore::):
565         (WebCore::RenderObject::hasOverrideSize):
566         (WebCore::RenderObject::setHasOverrideSize):
567         * rendering/RenderWidget.cpp:
568         (WebCore::RenderWidget::destroy):
569
570 2007-03-31  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
571
572         Not reviewed - gdk build fix.
573
574         * platform/gdk/TemporaryLinkStubs.cpp:
575         (Font::selectionRectForComplexText):
576         (Font::drawComplexText):
577
578 2007-03-31  Alexey Proskuryakov  <ap@webkit.org>
579
580         Reviewed by Darin.
581
582         http://bugs.webkit.org/show_bug.cgi?id=12778
583         REGRESSION: Nightly won't load Curl plugin for full page use
584
585         * dom/DOMImplementation.cpp:
586         (WebCore::DOMImplementation::createDocument): Re-order cases to give more priority to plugins.
587         This also fixes Adobe SVG Viewer and any plugins that register XML MIME types.
588         Added a case for XHTML to avoid enumerating plugins.
589
590 2007-03-31  David Hyatt  <hyatt@apple.com>
591
592         Fix for bug 13234, layout of selected justified text is broken.  Rework TextRuns to avoid having
593         from/to members.  Let those be passed in only by the functions that need them (drawing and selection rect).
594
595         Reviewed by mitz
596
597         fast/text/justified-selection-at-edge.html
598
599         * platform/Font.cpp:
600         (WebCore::WidthIterator::WidthIterator):
601         (WebCore::WidthIterator::advance):
602         (WebCore::Font::canUseGlyphCache):
603         (WebCore::Font::drawSimpleText):
604         (WebCore::Font::drawText):
605         (WebCore::Font::floatWidth):
606         (WebCore::Font::floatWidthForSimpleText):
607         (WebCore::Font::selectionRectForText):
608         (WebCore::Font::selectionRectForSimpleText):
609         (WebCore::Font::offsetForPositionForSimpleText):
610         * platform/Font.h:
611         (WebCore::TextRun::m_len):
612         * platform/graphics/GraphicsContext.cpp:
613         (WebCore::GraphicsContext::drawText):
614         (WebCore::GraphicsContext::drawHighlightForText):
615         * platform/graphics/GraphicsContext.h:
616         * platform/mac/FontMac.mm:
617         (WebCore::addDirectionalOverride):
618         (WebCore::overrideLayoutOperation):
619         (WebCore::ATSULayoutParameters::initialize):
620         (WebCore::Font::selectionRectForComplexText):
621         (WebCore::Font::drawComplexText):
622         (WebCore::Font::floatWidthForComplexText):
623         (WebCore::Font::offsetForPositionForComplexText):
624         * platform/qt/FontQt.cpp:
625         (WebCore::Font::drawComplexText):
626         (WebCore::Font::floatWidthForComplexText):
627         * platform/qt/TemporaryLinkStubs.cpp:
628         (Font::selectionRectForComplexText):
629         * rendering/EllipsisBox.cpp:
630         (WebCore::EllipsisBox::paint):
631         * rendering/InlineTextBox.cpp:
632         (WebCore::InlineTextBox::selectionRect):
633         (WebCore::InlineTextBox::paint):
634         (WebCore::InlineTextBox::paintSelection):
635         (WebCore::InlineTextBox::paintMarkedTextBackground):
636         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
637         (WebCore::InlineTextBox::paintTextMatchMarker):
638         (WebCore::InlineTextBox::offsetForPosition):
639         (WebCore::InlineTextBox::positionForOffset):
640         * rendering/RenderListMarker.cpp:
641         (WebCore::RenderListMarker::paint):
642         (WebCore::RenderListMarker::calcMinMaxWidth):
643         (WebCore::RenderListMarker::getRelativeMarkerRect):
644         * rendering/RenderMenuList.cpp:
645         (WebCore::RenderMenuList::updateOptionsWidth):
646         * rendering/RenderText.cpp:
647         (WebCore::RenderText::widthFromCache):
648         (WebCore::RenderText::width):
649
650 2007-03-31  Mitz Pettel  <mitz@webkit.org>
651
652         Reviewed by Darin.
653
654         - fix http://bugs.webkit.org/show_bug.cgi?id=13243
655               <rdar://problem/5103226>
656           REGRESSION (r20506): Repro crash/assert when using scroll wheel on a list box taller than its contents
657
658         * platform/ScrollBar.cpp:
659         (WebCore::Scrollbar::setValue): Cleaned up a little.
660         (WebCore::Scrollbar::scroll): Changed to apply the minimum and maximum constraints
661         in the right order, and cleaned up a little.
662
663 2007-03-31  Mitz Pettel  <mitz@webkit.org>
664
665         Reviewed by Darin.
666
667         - fix http://bugs.webkit.org/show_bug.cgi?id=13242
668           REGRESSION: Repro crash when specifying the content property for an image
669
670         Test: fast/images/text-content-crash.html
671
672         * html/HTMLImageElement.cpp:
673         (WebCore::HTMLImageElement::parseMappedAttribute): Added a check that the
674         renderer is an image.
675         (WebCore::HTMLImageElement::attach): Ditto.
676
677 2007-03-31  Mark Rowe  <mrowe@apple.com>
678
679         Reviewed by Darin.
680
681         A more correct fix for http://bugs.webkit.org/show_bug.cgi?id=13129
682         Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup
683
684         The previous attempt at a fix in r20343 attempted to conditionally expose the 'count'
685         method.  It did not work which resulted in 'count' always being hidden.  This change
686         disables -[WebScriptObject count] completely until it can be determined whether it is
687         needed and how to support it without breaking third-party applications.
688
689         * bindings/objc/WebScriptObject.mm:
690         (-[WebScriptObject count]):
691         * bindings/objc/WebScriptObjectPrivate.h:
692
693 2007-03-31  Nicholas Shanks  <webkit@nickshanks.com>
694
695         Reviewed by Adele.
696
697         http://bugs.webkit.org/show_bug.cgi?id=13184
698         HTMLImageElement longdesc should be complete resolved URL
699
700         Test: fast/dom/HTMLImageElement/image-longdesc-absolute-url.html
701
702         * html/HTMLImageElement.cpp:
703         (WebCore::HTMLImageElement::longDesc): Return absolute URL.
704         Behaviour now matches Firefox and Opera.
705
706 2007-03-31  Mitz Pettel  <mitz@webkit.org>
707
708         Reviewed by Hyatt.
709
710         - fix http://bugs.webkit.org/show_bug.cgi?id=13209
711           REGRESSION (r18756-18765): Incomplete list marker repaint when resizing list item
712
713         Test: fast/repaint/list-marker-2.html
714
715         A list marker can increase the horizontal overflow after layoutInlineChildren(),
716         so made that function return only the vertical bounds of the repaint rect. As the
717         horizontal bounds, made layoutBlock() just use the overflow bounds after layout.
718
719         * rendering/RenderBlock.cpp:
720         (WebCore::RenderBlock::layoutBlock):
721         * rendering/RenderBlock.h:
722         * rendering/bidi.cpp:
723         (WebCore::RenderBlock::layoutInlineChildren):
724
725 2007-03-31  Mitz Pettel  <mitz@webkit.org>
726
727         Reviewed by Hyatt.
728
729         - http://bugs.webkit.org/show_bug.cgi?id=13178
730           Helvetica zero-width space has non-zero width
731
732         Test: fast/text/wide-zero-width-space.html
733
734         * platform/FontData.cpp:
735         (WebCore::FontData::FontData): Force the ZERO WIDTH SPACE glyph to have width
736         0, unless the SPACE character maps to the same glyph.
737
738 2007-03-31  Mitz Pettel  <mitz@webkit.org>
739
740         Reviewed by Darin.
741
742         - fix http://bugs.webkit.org/show_bug.cgi?id=8016
743           REPRO: Safari hangs loading 18 MB page (deeply nested DOM tree)
744
745         Test: fast/tokenizer/lessthan-terminates-tags-and-attrs.html
746
747         * html/HTMLTokenizer.cpp:
748         (WebCore::HTMLTokenizer::parseTag): Made "<" terminate tag and attribute
749         names. This matches Firefox.
750
751 2007-03-31  Alexey Proskuryakov  <ap@webkit.org>
752
753         Debug build fix.
754
755         * xml/XPathValue.cpp:
756         (WebCore::XPath::): Define Value::adopt.
757
758 2007-03-30  Alexey Proskuryakov  <ap@webkit.org>
759
760         Reviewed by Darin.
761
762         http://bugs.webkit.org/show_bug.cgi?id=13021
763         XPath can be very slow
764
765         This patch finally makes us faster than Firefox 2.0 on this test case.
766
767         * xml/XPathFunctions.cpp:
768         (WebCore::XPath::FunConcat::evaluate): Use a Vector buffer for faster appending.
769         (WebCore::XPath::FunId::evaluate): Move the result NodeSet into Value instead of copying it.
770         (WebCore::XPath::FunLocalName::evaluate): Cosmetic changes.
771         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
772         (WebCore::XPath::FunName::evaluate): Ditto.
773         (WebCore::XPath::FunNormalizeSpace::evaluate): Ditto.
774
775         * xml/XPathValue.cpp:
776         (WebCore::XPath::Value::toNodeSet):
777         (WebCore::XPath::Value::modifiableNodeSet):
778         (WebCore::XPath::Value::toBoolean):
779         (WebCore::XPath::Value::toNumber):
780         (WebCore::XPath::Value::toString):
781         * xml/XPathValue.h:
782         (WebCore::XPath::ValueData::ValueData):
783         (WebCore::XPath::Value::Value):
784         Made Value copying faster by putting large data members into a separate refcounted ValueData class.
785         Added provisions for moving a NodeSet in and out of Value without copying.
786         Made construction safer by moving bool version to a template constructor.
787         Removed an (almost) unused default constructor.
788
789         * xml/XPathPredicate.h: Store a Value for literal string and number expressions to avoid 
790         constructing one each time.
791
792         * xml/XPathPath.cpp:
793         (WebCore::XPath::Filter::evaluate):
794         (WebCore::XPath::LocationPath::evaluate):
795         (WebCore::XPath::Path::evaluate):
796         * xml/XPathPath.h:
797         * xml/XPathPredicate.cpp:
798         (WebCore::XPath::NumericOp::evaluate):
799         (WebCore::XPath::Union::evaluate):
800         * xml/XPathResult.cpp:
801         (WebCore::XPathResult::snapshotItem):
802         * xml/XPathStep.cpp:
803         (WebCore::XPath::Step::evaluate):
804         (WebCore::XPath::Step::nodesInAxis):
805         * xml/XPathStep.h:
806         Got rid of unnecessary NodeSet copying in many cases.
807
808 2007-03-30  Justin Garcia  <justin.garcia@apple.com>
809
810         Reviewed by john
811
812         <rdar://problem/5076323> Only one To Do can be created by a selection in a message
813
814         When Mail's ToDoify operation called moveToEndOfDocument: 
815         with a selection that started just before a ToDo, we'd 
816         move them to the end of the document, not to the end
817         of the editable root, because we incorrectly checked
818         for the editability of positions before ToDos.  Then Mail
819         would refuse to create a ToDo because the selection was 
820         outside of the region where they allowed editing.
821
822         * editing/SelectionController.cpp:
823         (WebCore::SelectionController::modifyExtendingRightForward):
824         Check the position for editability, not the position's node,
825         since there are editable positions of the form [node, offset]
826         where node is contenteditable=false.
827         Re-use pos.  Nothing that happens after it's created can invalidate
828         it or the position and affinity used to create it.
829         (WebCore::SelectionController::modifyMovingRightForward): Ditto.
830         (WebCore::SelectionController::modifyExtendingLeftBackward): Ditto.
831         (WebCore::SelectionController::modifyMovingLeftBackward): Ditto.
832         * rendering/RenderBlock.cpp:
833         (WebCore::RenderBlock::paintCaret): Ditto.
834
835 2007-03-30  Adele Peterson  <adele@apple.com>
836
837         Reviewed by Darin.
838
839         Added DeleteWordBackward and DeleteWordForward to execCommand.
840
841         * editing/Editor.cpp:
842         (WebCore::execDeleteWordBackward):
843         (WebCore::execDeleteWordForward):
844         (WebCore::CommandEntry::):
845
846 2007-03-30  Simon Hausmann  <hausmann@kde.org>
847
848         Reviewed by Zack
849
850         * WebCore.pro: Fix release Qt builds.
851
852 2007-03-30  Antti Koivisto  <antti@apple.com>
853
854         Reviewed by bdash.
855
856         Spotted an int that should be float in previous patch.
857
858         * platform/Font.cpp:
859         (WebCore::WidthIterator::advance):
860
861 2007-03-30  Antti Koivisto  <antti@apple.com>
862
863         Reviewed by Hyatt.
864
865         Render tree memory savings, part 1
866         
867         - Eliminate caching of monospace char width from RenderText. This optimization is not needed
868           anymore since Font already caches space width (RenderText -4 bytes)
869         - Eliminate caching of tab width from RenderBlock. Similary this optimization has become
870           obsolete (RenderBlock -4 bytes)
871
872         * platform/Font.cpp:
873         (WebCore::WidthIterator::advance):
874         (WebCore::Font::spaceWidth):
875         * platform/Font.h:
876         (WebCore::Font::tabWidth):
877         * platform/TextStyle.h:
878         (WebCore::TextStyle::TextStyle):
879         (WebCore::TextStyle::allowTabs):
880         * rendering/InlineTextBox.cpp:
881         (WebCore::InlineTextBox::selectionRect):
882         (WebCore::InlineTextBox::paint):
883         (WebCore::InlineTextBox::paintSelection):
884         (WebCore::InlineTextBox::paintMarkedTextBackground):
885         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
886         (WebCore::InlineTextBox::paintTextMatchMarker):
887         (WebCore::InlineTextBox::offsetForPosition):
888         (WebCore::InlineTextBox::positionForOffset):
889         * rendering/RenderBlock.cpp:
890         (WebCore:::RenderFlow):
891         (WebCore::RenderBlock::setStyle):
892         * rendering/RenderBlock.h:
893         * rendering/RenderObject.cpp:
894         * rendering/RenderObject.h:
895         * rendering/RenderText.cpp:
896         (WebCore::RenderText::RenderText):
897         (WebCore::RenderText::setStyle):
898         (WebCore::RenderText::widthFromCache):
899         (WebCore::RenderText::trimmedMinMaxWidth):
900         (WebCore::RenderText::calcMinMaxWidthInternal):
901         (WebCore::RenderText::setTextInternal):
902         (WebCore::RenderText::width):
903         * rendering/RenderText.h:
904         (WebCore::RenderText::allowTabs):
905         * rendering/bidi.cpp:
906
907 2007-03-30  David Hyatt  <hyatt@apple.com>
908
909         Fix (take 2) for bug 4334, flickering when floating elements gain/lose transparency.
910
911         Reviewed by mitz
912
913         * rendering/RenderBlock.cpp:
914         * rendering/RenderBlock.h:
915         * rendering/RenderBox.cpp:
916         (WebCore::RenderBox::setStyle):
917
918 2007-03-29  Mitz Pettel  <mitz@webkit.org>
919
920         Reviewed by Darin.
921
922         - fix http://bugs.webkit.org/show_bug.cgi?id=13166
923           REGRESSION (2005-10-16 - 2005-10-19): Ampersands showing up in the last column of the Gmail contacts table
924
925         Test: fast/tokenizer/write-partial-entity.html
926
927         * html/HTMLTokenizer.cpp:
928         (WebCore::HTMLTokenizer::parseTag): Reordered to avoid resetting the buffer position
929         after script execution which can write to the buffer.
930
931 2007-03-29  Justin Garcia  <justin.garcia@apple.com>
932
933         Reviewed by john
934
935         <rdar://problem/5099303> Deleting after a ToDo puts the caret in the wrong position
936         
937         We were failing to create the correct selection 
938         for DeleteSelectionCommand because the selection extension 
939         operations don't skip over non-editable content for editable 
940         selections.
941
942         * editing/SelectionController.cpp:
943         (WebCore::SelectionController::modifyExtendingRightForward):
944         When extending an editable selection, don't extend into
945         non-editable content.
946         (WebCore::SelectionController::modifyExtendingLeftBackward):
947         Ditto.
948
949 2007-03-29  Patti Hoa  <patti@apple.com>
950
951         Reviewed by harrison.
952
953         <rdar://problem/4918397> Exception raise inspecting note contents in the background
954         * WebCore.xcodeproj/project.pbxproj:
955         * bridge/mac/WebCoreAXObject.mm:
956         (-[WebCoreAXObject subrole]):
957         (-[WebCoreAXObject title]):
958         Check that attachment supports the attribute before requesting it.
959
960 2007-03-29  Justin Garcia  <justin.garcia@apple.com>
961
962         Reviewed by john
963
964         <rdar://problem/5032066> Delete should work between ToDos
965         
966         Stop selecting the table when the user attempts to delete
967         the line break just after it, instead, extend the selection
968         into the last table cell.
969         Let deletion merge content into table cells (as long as 
970         its not from another table cell).  
971         Start calling shouldInsertNode:replacingDOMRange:givenAction: 
972         when moving content with moveParagraphs, so that Mail can 
973         modify content before it is moved into a ToDo during a delete.
974
975         * editing/CompositeEditCommand.cpp:
976         (WebCore::CompositeEditCommand::moveParagraphs): Ask the
977         delegate before performing the move.  This will let Mail
978         prevent styles from entering a ToDo.
979         Added a FIXME about adding a new WebViewInsertAction
980         * editing/DeleteSelectionCommand.cpp:
981         (WebCore::DeleteSelectionCommand::initializePositionData):
982         Allow merging into table cells from content not in a table.
983         * editing/SelectionController.cpp:
984         (WebCore::SelectionController::modifyExtendingRightForward):
985         Don't select the table when extending by character/word from
986         just before it.  This code was here to make it easier to select
987         tables in order to delete them, but the deletion UI makes it 
988         largely unnecessary.
989         (WebCore::SelectionController::modifyExtendingLeftBackward):
990         Ditto.
991         * editing/TypingCommand.cpp:
992         (WebCore::isFirstPositionAfterTable): Added.
993         (WebCore::isLastPositionBeforeTable): Ditto.
994         (WebCore::TypingCommand::deleteKeyPressed): When pressing
995         the delete key with a caret at the beginning of a paragraph
996         just after a table, move the paragraph into the last table
997         cell.
998         Do not do this if it would mean moving a block table.
999         Removed some old irrelevant comments.
1000         * editing/htmlediting.cpp: Removed unused functions.
1001         * editing/htmlediting.h:
1002
1003 2007-03-29  Adam Treat  <adam@staikos.net>
1004
1005         Reviewed and committed by George Staikos.
1006
1007         Remove redundant line.
1008
1009         * platform/qt/FontDataQt.cpp:
1010         (WebCore::FontData::platformInit):
1011
1012 2007-03-29  Adam Treat  <adam@staikos.net>
1013
1014         Reviewed by David Hyatt, committed by George Staikos.
1015
1016         Test: fast/text/justified-selection.html
1017
1018         Take into account the entire run length to get a proper selection.
1019
1020         * platform/Font.cpp:
1021         (WebCore::WidthIterator::WidthIterator):
1022
1023 2007-03-29  David Hyatt  <hyatt@apple.com>
1024
1025         Fix for <rdar://problem/4545060>, technorati and arstechnica fail because of getComputedStyle not
1026         reporting display:none properly when it is set.  This is bugzilla bug 13103.
1027
1028         Reviewed by mitz
1029
1030         * css/CSSComputedStyleDeclaration.cpp:
1031         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1032
1033 2007-03-28  Oliver Hunt  <oliver@apple.com>
1034
1035         Reviewed by Hyatt.
1036
1037         Rename DocLoader::setPasteInProgress, etc to more generic 
1038         setAllowStaleResources, etc
1039
1040         * editing/Editor.cpp:
1041         (WebCore::Editor::paste):
1042         * loader/DocLoader.cpp:
1043         (WebCore::DocLoader::DocLoader):
1044         (WebCore::DocLoader::checkForReload):
1045         * loader/DocLoader.h:
1046         (WebCore::DocLoader::setAllowStaleResources):
1047         * page/DragController.cpp:
1048         (WebCore::DragController::concludeDrag):
1049
1050 2007-03-28  Oliver Hunt  <oliver@apple.com>
1051
1052         Reviewed by Anders and Steve.
1053
1054         Add a flag to DocLoader to prevent it from reloading 
1055         when performing a paste or drop operation.
1056         
1057         Remove m_cachePolicy from CachedResource as it is never used
1058         
1059         Fixes rdar://problem/5044366 : REGRESSION: Repro ASSERT failures 
1060         dragging image into GMail message in _web_writeImage and 
1061         documentFragmentFromDragData
1062
1063         * editing/Editor.cpp:
1064         (WebCore::Editor::paste):
1065           prevent the docloader from reloading resources on paste
1066         * html/HTMLImageLoader.cpp:
1067         (WebCore::HTMLImageLoader::updateFromElement):
1068         * loader/Cache.cpp:
1069         (WebCore::createResource):
1070         * loader/CachedCSSStyleSheet.cpp:
1071         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1072         * loader/CachedCSSStyleSheet.h:
1073         * loader/CachedImage.cpp:
1074         (WebCore::CachedImage::CachedImage):
1075         * loader/CachedImage.h:
1076         * loader/CachedResource.cpp:
1077         (WebCore::CachedResource::CachedResource):
1078         * loader/CachedResource.h:
1079         * loader/CachedScript.cpp:
1080         (WebCore::CachedScript::CachedScript):
1081         * loader/CachedScript.h:
1082         * loader/CachedXBLDocument.cpp:
1083         (WebCore::CachedXBLDocument::CachedXBLDocument):
1084         * loader/CachedXBLDocument.h:
1085         * loader/CachedXSLStyleSheet.cpp:
1086         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1087         * loader/CachedXSLStyleSheet.h:
1088         * loader/DocLoader.cpp:
1089         (WebCore::DocLoader::DocLoader):
1090            Tidy up constructor initialise new field
1091         (WebCore::DocLoader::checkForReload):
1092            Prevent reload when pasting
1093         * loader/DocLoader.h:
1094         (WebCore::DocLoader::setPasteInProgress):
1095           new field and setter
1096         * page/DragController.cpp:
1097         (WebCore::DragController::concludeDrag):
1098           prevent the docloader from reloading resources on drop
1099
1100 2007-03-27  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1101
1102         Not reviewed - fix typo in gdk build.
1103
1104         * platform/gdk/ScrollViewGdk.cpp:
1105         (WebCore::ScrollView::contentsToWindow):
1106
1107 2007-03-28  Maciej Stachowiak  <mjs@apple.com>
1108         
1109         Reviewed by Darin.
1110         
1111         - fixed <rdar://problem/4820817> Autoscroll is broken in Mail.app (message jumps around when trying to select text)
1112                 
1113         Handle scrolling external scrollviews around the webview during
1114         autoscroll or when scrolling into view.
1115         
1116         This should also restore performance on BenchJS test 6 lost due to Tim's partial fix.
1117
1118         * page/FrameView.cpp:
1119         (WebCore::FrameView::scrollRectIntoViewRecursively):
1120         * page/FrameView.h:
1121         * platform/ScrollView.h:
1122         * platform/gdk/ScrollViewGdk.cpp:
1123         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1124         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1125         * platform/mac/ScrollViewMac.mm:
1126         (WebCore::ScrollView::visibleContentRect):
1127         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1128         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1129         (WebCore::ScrollView::updateContents):
1130         * platform/qt/ScrollViewQt.cpp:
1131         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1132         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1133         * platform/win/ScrollViewWin.cpp:
1134         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1135         * platform/win/TemporaryLinkStubs.cpp:
1136         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1137         * rendering/RenderLayer.cpp:
1138         (WebCore::RenderLayer::scrollRectToVisible):
1139        
1140 2007-03-28  Jungshik Shin  <jungshik.shin@gmail.com>
1141
1142         Reviewed  and landed by Darin
1143
1144         Get rid of some misuses of |islower| and |tolower| for non-ASCII characters.
1145         http://bugs.webkit.org/show_bug.cgi?id=13138
1146
1147         * platform/StringImpl.cpp:
1148         (WebCore::StringImpl::isLower):
1149         (WebCore::StringImpl::lower):
1150         (WebCore::StringImpl::equalIgnoringCase):
1151
1152 2007-03-28  Antti Koivisto  <antti@apple.com>
1153
1154         Reviewed by Hyatt.
1155
1156         Fix <rdar://problem/5092653>
1157         REGRESSION: Image decoding making scrolling slow
1158         
1159         If decoder gave back a null frame (which I think happens regularly if you don't have full frame 
1160         data yet for image that does not decode incrementally) m_decodedSize was incremented anyway. This
1161         led to massive growth in calculated image size and eventually made cache prune constantly. 
1162         
1163         No test, I don't know how to make one for this.
1164
1165         * platform/graphics/BitmapImage.cpp:
1166         (WebCore::BitmapImage::cacheFrame):
1167
1168 2007-03-28  Adele Peterson  <adele@apple.com>
1169
1170         Reviewed by Kevin M.
1171
1172         WebCore part of fix for <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
1173
1174         * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1175         Convert return value to a string.  This matches the behavior in Safari 2.0.
1176
1177 2007-03-28  Alexey Proskuryakov  <ap@webkit.org>
1178
1179         Reviewed by Darin.
1180
1181         http://bugs.webkit.org/show_bug.cgi?id=13190
1182         XPath incorrectly handles namespaces on attributes
1183
1184         * xml/XPathStep.cpp:
1185         (WebCore::XPath::Step::nodesInAxis): Added a special case for faster attribute lookup; gives a slight but 
1186         measurable performance improvement for bug 13021.
1187         (WebCore::XPath::Step::nodeMatches): Fixed NameTest for attribute nodes.
1188
1189         * xml/XPathStep.h:
1190         (WebCore::XPath::Step::NodeTest::NodeTest):
1191         (WebCore::XPath::Step::NodeTest::namespaceURI):
1192         (WebCore::XPath::Step::nodeTest):
1193         (WebCore::XPath::Step::setNodeTest):
1194         Move m_namespaceURI to NodeTest, where it belongs. Removed unused m_nodeTestData (oops!).
1195
1196         * xml/XPathGrammar.y:
1197         * xml/XPathPath.cpp:
1198         (WebCore::XPath::LocationPath::optimizeStepPair):
1199         Accounted for the above change.
1200
1201 2007-03-28  Oliver Hunt  <oliver@apple.com>
1202
1203         rs=Hyatt.
1204
1205         Rollout local changes :-/
1206
1207         * loader/Cache.cpp:
1208         (WebCore::Cache::pruneAllResources):
1209         (WebCore::Cache::remove):
1210
1211 2007-03-28  Oliver Hunt  <oliver@apple.com>
1212
1213         Reviewed by Hyatt.
1214
1215         Roll out r20511 due to incredible badness
1216
1217         * loader/Cache.cpp:
1218         (WebCore::Cache::pruneAllResources):
1219         (WebCore::Cache::remove):
1220
1221 2007-03-27  Oliver Hunt  <oliver@apple.com>
1222
1223         Reviewed by Adam.
1224
1225         Don't enforce text-selection drag delay when we are
1226         going to drag an image anyway.
1227
1228         Fixes rdar://problem/4668935
1229
1230         * page/EventHandler.cpp:
1231         (WebCore::EventHandler::handleDrag):
1232
1233 2007-03-27  Justin Garcia  <justin.garcia@apple.com>
1234
1235         Build fix
1236         
1237         * editing/markup.cpp:
1238         (WebCore::startMarkup):
1239
1240 2007-03-27  Justin Garcia  <justin.garcia@apple.com>
1241
1242         Reviewed by darin
1243         
1244         <rdar://problem/5091898> REGRESSION: GMail Editor: A line of underlined text copied with Select All pastes with wrong font family
1245         
1246         createMarkup skipped elements if they were blocks
1247         when called from moveParagraphs (because that function 
1248         must receive only inline content).  This patch adds 
1249         code to inline these blocks instead of skipping them 
1250         so that we don't lose any of the style that they 
1251         contribute to the copied markup.
1252
1253         * editing/markup.cpp:
1254         (WebCore::startMarkup): Add an inlineBlocks option.
1255         Make sure to overwrite display:block coming from
1256         a style sheet or the inline style declaration.
1257         (WebCore::createMarkup): Don't refuse to include a 
1258         specialCommonAncestor that's a block if we were asked 
1259         to include only inline content, since we can now inline 
1260         block elements in startMarkup.
1261
1262 2007-03-27  Adele Peterson  <adele@apple.com>
1263
1264         Reviewed by Hyatt.
1265
1266         Fix for <rdar://problem/5026141> REGRESSION: Aperture Viewer Flashes when switching from Index Page to Detail page in Web Gallery
1267
1268         This disables the paint that occurs after WebCore finishes loading the document.  We should reenable this when we
1269         move the dispatchDidFinishLoad delegate callback to happen around the same time as the JS onload call.  See <rdar://problem/5092361>.
1270
1271         * dom/Document.cpp: (WebCore::Document::implicitClose):
1272
1273 2007-03-26  Justin Garcia  <justin.garcia@apple.com>
1274
1275         Reviewed by darin
1276         
1277         <rdar://problem/5065910> REGRESSION: In Mail and GMail, Can't apply color to pasted line of text
1278         <rdar://problem/5084241> After deleting a paragraph of colored text, can't change text color
1279         <rdar://problem/5065605> REGRESSION: Text copied with Select All + Copy loses color on Paste
1280         <rdar://problem/4916887> GMAIL: Can't apply color to text once it becomes indented
1281
1282         * css/CSSComputedStyleDeclaration.cpp:
1283         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
1284         If a node's text fill color is invalid, then its children use 
1285         their font-color as their text fill color (they don't inherit 
1286         it).  Likewise for stroke color.
1287
1288 2007-03-27  Anders Carlsson  <acarlsson@apple.com>
1289
1290         * platform/ScrollBar.h:
1291         Use wtf/MathExtras.h instead of math.h
1292
1293 2007-03-27  Zack Rusin  <zrusin@trolltech.com>
1294
1295         Fix the compile - when using math.h functions
1296         actually include the header with them.
1297
1298         * platform/ScrollBar.h:
1299
1300 2007-03-27  Oliver Hunt  <oliver@apple.com>
1301
1302         Reviewed by Maciej.
1303
1304         The WebArchiver needs all the subresources of a document to be accessible
1305         through the DocLoader, so we can't remove a CachedResource simultaneously
1306         from the global Cache and all DocLoaders, just because it needs to be 
1307         reloaded in one.
1308
1309         Fixes rdar://problem/5044366
1310
1311         * loader/Cache.cpp:
1312         (WebCore::Cache::remove):
1313            Don't evict the resource from all DocLoaders
1314         * manual-tests/test-iframes-loading-the-same-resource.html: Added.
1315            Alas it wasn't possible to make a nice layout test, even this manual test
1316            is not entirely deterministic
1317
1318 2007-03-27  Mark Rowe  <mrowe@apple.com>
1319
1320         Build fix.
1321
1322         * platform/GlyphBuffer.h:
1323         (WebCore::GlyphBuffer::clear):
1324
1325 2007-03-27  Dave Hyatt  <hyatt@apple.com>
1326
1327         Add support for glyph offsets to the GlyphBuffer.
1328        
1329         Reviewed by olliej
1330
1331         * platform/Font.cpp:
1332         (WebCore::Font::drawGlyphBuffer):
1333         * platform/GlyphBuffer.h:
1334         (WebCore::GlyphBuffer::clear):
1335         (WebCore::GlyphBuffer::swap):
1336         (WebCore::GlyphBuffer::offsetAt):
1337         (WebCore::GlyphBuffer::add):
1338
1339 2007-03-27  Antti Koivisto  <antti@apple.com>
1340
1341         Keep buildbot happy.
1342
1343         * platform/mac/PlatformScrollBarMac.mm:
1344         (WebCore::PlatformScrollbar::scrollbarHit):
1345
1346 2007-03-26  Antti Koivisto  <antti@apple.com>
1347
1348         Reviewed by Darin.
1349         
1350         On Mac, support fine grained wheel events generated by trackpad and Mighty Mouse.
1351         http://bugs.webkit.org/show_bug.cgi?id=13134
1352         <rdar://problem/5076249?
1353
1354         * WebCore.exp:
1355             Export _wkGetWheelEventDeltas
1356         * page/EventHandler.cpp:
1357         (WebCore::EventHandler::handleWheelEvent):
1358             Remove (0, 0) scroll event hack, it is not needed anymore.
1359             Do per-pixel scrolling for fine grained events.
1360         * platform/PlatformWheelEvent.h:
1361         (WebCore::PlatformWheelEvent::isContinuous):
1362             Add new m_isContinuous boolean to indicate fine grained wheel events.
1363         * platform/ScrollBar.cpp:
1364         (WebCore::Scrollbar::Scrollbar):
1365         (WebCore::Scrollbar::setValue):
1366         (WebCore::Scrollbar::setSteps):
1367         (WebCore::Scrollbar::scroll):
1368         * platform/ScrollBar.h:
1369         (WebCore::Scrollbar::value):
1370             Use float to represent current position to support finer grained scrolling.
1371             Add ScrollByPixel, remove ScrollByWheel (which was same as ScrollByLine anyway)
1372         * platform/ScrollTypes.h:
1373         (WebCore::):
1374         * platform/gdk/WheelEventGdk.cpp:
1375         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1376             Initalize m_isContinuous
1377         * platform/mac/WebCoreSystemInterface.h:
1378         * platform/mac/WebCoreSystemInterface.mm:
1379             Add wkGetWheelEventDeltas for getting fine grained wheel events
1380         * platform/mac/WheelEventMac.mm:
1381         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1382             Get the wheel deltas using new wkGetWheelEventDeltas interface
1383         * platform/qt/WheelEventQt.cpp:
1384         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1385             Initalize m_isContinuous
1386         * rendering/RenderListBox.cpp:
1387         (WebCore::RenderListBox::calcHeight):
1388             Pass item height to scrollbar
1389
1390 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
1391
1392         Reviewed by Darin Adler.
1393
1394         Fixed <rdar://problem/5088234> REGRESSION: Crash occurs at WebCore::Node::
1395         createRendererIfNeeded() when changing map views with MS Virtual Earth 
1396         (http://www.ziprealty.com/)
1397         
1398         The cause of the crash was the insertion of a <script> element whose
1399         script removed it from the document. The <script> element would then be 
1400         garbage when the insertion routine went on to attach() it.
1401         
1402         The solution here is to check that an element is still your child before
1403         trying to attach() it. This matches the style of checks we do elsewhere
1404         in the node insertion and removal code.
1405
1406         * dom/ContainerNode.cpp:
1407         (WebCore::ContainerNode::insertBefore):
1408         (WebCore::ContainerNode::replaceChild):
1409         (WebCore::ContainerNode::appendChild):
1410
1411 2007-03-26  David Carson  <dacarson@gmail.com>
1412
1413         Reviewed by Darin, landed by Anders.
1414
1415         Manual test case for: REGRESSION (r19559): Java applet crash
1416         http://bugs.webkit.org/show_bug.cgi?id=13142
1417         <rdar://problem/5080340>
1418
1419         * manual-tests/liveconnect-applet-get-boolean.html: Added.
1420         * manual-tests/resources/CheckerApplet.class: Added.
1421         * manual-tests/resources/CheckerApplet.java: Added.
1422
1423 2007-03-26  Mitz Pettel  <mitz@webkit.org>
1424
1425         Reviewed and landed by Darin.
1426
1427         - fix http://bugs.webkit.org/show_bug.cgi?id=13194
1428           <rdar://problem/5087738>
1429           REGRESSION: Selection rects are wrong for images in search results from images.google.com
1430
1431         Test: fast/replaced/selection-rect-in-table-cell.html
1432
1433         * rendering/RenderReplaced.cpp:
1434         (WebCore::RenderReplaced::selectionRect):
1435
1436 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
1437
1438         Removed now-stale #includes of <assert.h>.
1439         
1440         * WebCorePrefix.h:
1441         * config.h:
1442         * css/CSSGrammar.y:
1443         * platform/Arena.cpp:
1444         * platform/KURL.cpp:
1445         * platform/SegmentedString.h:
1446         * rendering/DataRef.h:
1447         * rendering/RenderArena.cpp:
1448
1449 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
1450
1451         Reviewed by Kevin McCulough.
1452
1453         Global replace of "assert(" with "ASSERT(" to assist debugging. Removed
1454         one instance of commented-out code containing "assert(" instead of replacing it.
1455
1456 2007-03-25  Antti Koivisto  <antti@apple.com>
1457
1458         Reviewed by Adam.
1459
1460         Fix <rdar://problem/5049842>
1461         Gmail Editor: Dragging message text in the message body results in a crash at WebCore::Frame::eventHandler()
1462
1463         Null check frame in m_dragTarget, it might be gone already.
1464
1465         * page/EventHandler.cpp:
1466         (WebCore::EventHandler::updateDragAndDrop):
1467         (WebCore::EventHandler::cancelDragAndDrop):
1468         (WebCore::EventHandler::performDragAndDrop):
1469
1470 2007-03-25  Alexey Proskuryakov  <ap@webkit.org>
1471
1472         Reviewed by Darin.
1473
1474         A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
1475         XPath can be very slow
1476
1477         * xml/XPathExpression.cpp:
1478         (WebCore::XPathExpression::evaluate): Reset a reference to the context node, as this may prevent the whole document
1479         from being destroyed in time.
1480
1481         * dom/Attr.cpp:
1482         (WebCore::Attr::createTextChild): Instead of calling appendChild(), just do the few operations it really needs to perform.
1483         * dom/ContainerNode.h:
1484         (WebCore::ContainerNode::fastSetFirstChild):
1485         (WebCore::ContainerNode::fastSetLastChild):
1486         Added operations that let Attr hack internal ContainerNode data (evil, but fast!).
1487
1488         * xml/XPathStep.cpp:
1489         (WebCore::XPath::Step::evaluate):
1490         (WebCore::XPath::Step::nodesInAxis):
1491         (WebCore::XPath::Step::nodeMatches):
1492         * xml/XPathStep.h:
1493         Merged node testing into axis enumeration. This saves a lot of Vector resizing and passing, and is necessary for future 
1494         optimizations (sometimes, we can just pick the single result node instead of enumerating and filtering the whole axis).
1495
1496 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1497
1498         Reviewed by Darin.
1499
1500         - fix http://bugs.webkit.org/show_bug.cgi?id=13156
1501           REGRESSION (r19621): Pasting breakable content where wrapped line is too long to fit in a textarea fails to draw a horizontal scrollbar
1502
1503         Test: fast/text/midword-break-after-breakable-char.html
1504
1505         Breaking in the middle of the word
1506         is allowed only if no breaking opportunity between words has occurred yet. The
1507         first position on the line should not be considered "between words" even if
1508         it is a breaking opportunity.
1509         
1510         * rendering/bidi.cpp:
1511         (WebCore::RenderBlock::findNextLineBreak): Changed according to the above. Also
1512         cleaned up a couple of lines.
1513
1514 2007-03-24  David Hyatt  <hyatt@apple.com>
1515
1516         Fix for bugzilla bug 13187, place a hard limit on the amount of decoded data that WebCore will keep
1517         around even on live pages (pages being displayed in tabs/windows or in the back/forward cache).
1518         Images will decode to paint and once the decoded data exceeds the cache size, the decoded data will be
1519         tossed.
1520
1521         Refine the flushing algorithm to apply the two-pass decode/evict model to each LRU-SP queue individually, rather
1522         than to all the lists at once.  This allows the cache to evict large encoded resources before flushing small
1523         or frequently accessed decoded onces.
1524
1525         Added information on live/decoded data to the cache statistics.
1526
1527         Reviewed by darin
1528
1529         * loader/Cache.cpp:
1530         (WebCore::Cache::Cache):
1531         (WebCore::Cache::pruneLiveResources):
1532         (WebCore::Cache::pruneAllResources):
1533         (WebCore::Cache::setMaximumSize):
1534         (WebCore::Cache::remove):
1535         (WebCore::Cache::lruListFor):
1536         (WebCore::Cache::removeFromLRUList):
1537         (WebCore::Cache::insertInLRUList):
1538         (WebCore::Cache::liveLRUListFor):
1539         (WebCore::Cache::removeFromLiveResourcesList):
1540         (WebCore::Cache::insertInLiveResourcesList):
1541         (WebCore::Cache::addToLiveResourcesSize):
1542         (WebCore::Cache::removeFromLiveResourcesSize):
1543         (WebCore::Cache::adjustSize):
1544         (WebCore::Cache::getStatistics):
1545         * loader/Cache.h:
1546         (WebCore::Cache::TypeStatistic::TypeStatistic):
1547         * loader/CachedImage.cpp:
1548         (WebCore::CachedImage::decodedSizeWillChange):
1549         (WebCore::CachedImage::decodedSizeChanged):
1550         * loader/CachedImage.h:
1551         * loader/CachedResource.cpp:
1552         (WebCore::CachedResource::CachedResource):
1553         (WebCore::CachedResource::ref):
1554         (WebCore::CachedResource::deref):
1555         (WebCore::CachedResource::setEncodedSize):
1556         (WebCore::CachedResource::liveResourceAccessed):
1557         * loader/CachedResource.h:
1558         (WebCore::CachedResource::liveAccessCount):
1559         (WebCore::CachedResource::resetLiveAccessCount):
1560         (WebCore::CachedResource::increaseLiveAccessCount):
1561         * platform/graphics/BitmapImage.cpp:
1562         (WebCore::BitmapImage::destroyDecodedData):
1563         (WebCore::BitmapImage::cacheFrame):
1564         * platform/graphics/ImageObserver.h:
1565         * rendering/RenderBox.cpp:
1566         (WebCore::RenderBox::paintBackgroundExtended):
1567         * rendering/RenderImage.cpp:
1568         (WebCore::RenderImage::paint):
1569         * rendering/RenderListMarker.cpp:
1570         (WebCore::RenderListMarker::paint):
1571         * rendering/RenderObject.cpp:
1572         (WebCore::RenderObject::paintBorderImage):
1573
1574 2007-03-24  Darin Adler  <darin@apple.com>
1575
1576         Reviewed by Mitz.
1577
1578         - fix http://bugs.webkit.org/show_bug.cgi?id=13123
1579           CSS selectors that use :lang, :not, and namespaces do not serialize correctly
1580
1581         Test: fast/css/css-selector-text.html
1582
1583         * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): Add the namespace
1584         prefix for tag or attribute names, the sub-selector for :not, and the argument
1585         for :lang.
1586
1587 2007-03-24  Brady Eidson  <beidson@apple.com>
1588
1589         Reviewed by Adam
1590
1591         <rdar://problem/5086210> - Move RetainPtr to WTF
1592
1593         * ForwardingHeaders/wtf/RetainPtr.h: Added.
1594         * WebCore.xcodeproj/project.pbxproj: Removed WebCore/RetainPtr.h
1595         
1596         * history/HistoryItem.h: Changed #include to <wtf/RetainPtr.h>
1597         * history/PageCache.h: Ditto
1598         * page/mac/WebCoreFrameBridge.mm: Ditto
1599         * platform/ContextMenu.h: Ditto
1600         * platform/ContextMenuItem.h: Ditto
1601         * platform/DragImage.h: Ditto
1602         * platform/FileChooser.h: Ditto
1603         * platform/PlatformKeyboardEvent.h: Ditto
1604         * platform/PopupMenu.h: Ditto
1605         * platform/SharedBuffer.h: Ditto
1606         * platform/cf/RetainPtr.h: Removed.
1607         * platform/graphics/Icon.h: Changed #include
1608         * platform/mac/ClipboardMac.h: Ditto
1609         * platform/mac/PasteboardMac.mm: Ditto
1610         * platform/mac/WidgetMac.mm: Ditto
1611         * platform/network/AuthenticationChallenge.h: Ditto
1612         * platform/network/ResourceError.h: Ditto
1613         * platform/network/ResourceHandle.h: Ditto
1614         * platform/network/ResourceRequest.h: Ditto
1615         * platform/network/ResourceResponse.h: Ditto
1616         * rendering/RenderThemeMac.mm: Ditto
1617
1618 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1619
1620         Fix for <rdar://problem/5086797>, layoutPending is now reporting incorrect results, which will lead
1621         to all sorts of layout issues.  This is in bugzilla as 13179.
1622
1623         Reviewed by hyatt
1624
1625         - fix http://bugs.webkit.org/show_bug.cgi?id=13179
1626           REGRESSION (r20410): In debug builds, loading a certain page is suspended until redisplay is forced
1627
1628         Moved the root->needsLayout() check from layoutPending() to needsLayout()
1629         to restore the behavior before r20324.
1630
1631         * page/FrameView.cpp:
1632         (WebCore::FrameView::layoutPending):
1633         (WebCore::FrameView::needsLayout):
1634
1635 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1636
1637         Reviewed by Adele.
1638
1639         - fix http://bugs.webkit.org/show_bug.cgi?id=13180
1640               <rdar://problem/5084478>
1641           Another debug build crash from ASSERTION FAILED: !needsLayout()
1642
1643         No test possible because updateRendering() is always called after script
1644         execution.
1645
1646         * page/FrameView.cpp:
1647         (WebCore::FrameView::layout): Get the layout root after calling recalcStyle()
1648         since a style recalc may result in needing to do start layout at the root.
1649
1650 2007-03-24  Nikolas Zimmermann  <zimmermann@kde.org>
1651
1652         Not reviewed. Build fix.
1653
1654         Fix FloatRect vs. IntRect confusion.
1655
1656         * rendering/RenderSVGImage.cpp:
1657         (WebCore::RenderSVGImage::nodeAtPoint):
1658
1659 2007-03-25  Mark Rowe  <mrowe@apple.com>
1660
1661         Fix incorrect radar number.
1662
1663         * platform/network/mac/ResourceHandleMac.mm:
1664         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
1665
1666 2007-03-23  Nikolas Zimmermann  <zimmermann@kde.org>
1667
1668         Reviewed by Oliver.
1669
1670         Fix all known RenderSVGImage problems.
1671
1672         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12126 (RenderSVGImage seems to suffer from integer overflow)
1673         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12442 (raster images disappearing during script execution (SVG))
1674         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12572 (WebKit does not properly invalidate image region after image load)
1675
1676         Added test: svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
1677
1678         In RenderSVGImage::paint, do not call shouldPaint() as this will never work properly for SVG renderers, as shouldPaint
1679         doesn't take into account any special SVG transformation (localTransform/absoluteTransform). Just remove the call.
1680
1681         Fix hit detection on RenderSVGImage - it didn't work properly at all. No idea why I didn't notice before.
1682         Thanks Andreas Neumann once again for writing excellent bug reports and pointing me to them :-)
1683
1684         The carto.net navigation tools work as expected now, and also the "dock like" image effect example.
1685
1686         * rendering/RenderSVGImage.cpp:
1687         (WebCore::RenderSVGImage::paint):
1688         (WebCore::RenderSVGImage::nodeAtPoint):
1689
1690 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1691
1692         Reviewed by Dave Hyatt.
1693
1694         - http://bugs.webkit.org/show_bug.cgi?id=13177
1695           Suppress control characters in the ATSUI code path
1696
1697         * platform/mac/FontMac.mm:
1698         (WebCore::overrideLayoutOperation):
1699         (WebCore::ATSULayoutParameters::initialize):
1700
1701 2007-03-24  David Hyatt  <hyatt@apple.com>
1702
1703         Fix for <rdar://problem/5086400>, images scrolled offscreen continue to animate.  Safari 2 would
1704         halt animations when images were no longer visible.
1705
1706         Reviewed by mjs, olliej
1707
1708         * platform/graphics/BitmapImage.cpp:
1709         (WebCore::BitmapImage::advanceAnimation):
1710
1711 2007-03-24  David Hyatt  <hyatt@apple.com>
1712
1713         Fix for <rdar://problem/508328>, sluggish text entry in search field.  Make sure
1714         our size actually changed before we decide to do a full repaint because of background/border
1715         complexities.
1716
1717         Reviewed by aroben
1718
1719         * rendering/RenderObject.cpp:
1720         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1721
1722 2007-03-23  Dave Hyatt  <hyatt@apple.com>
1723
1724         Fix for <rdar://problem/5048219>, spurious glyphs in gmail.   This is bugzilla bug 13136, which
1725         will remain open to cover patching the complex text path.
1726         
1727         Reviewed by aroben
1728
1729         * platform/Font.cpp:
1730         (WebCore::Font::glyphDataForCharacter):
1731         * platform/Font.h:
1732         (WebCore::Font::treatAsZeroWidthSpace):
1733         * platform/GlyphPageTreeNode.cpp:
1734         (WebCore::GlyphPageTreeNode::initializePage):
1735
1736 2007-03-23  Mitz Pettel  <mitz@webkit.org>
1737
1738         Reviewed by Adele.
1739
1740         - fix http://bugs.webkit.org/show_bug.cgi?id=13153
1741           REGRESSION: Visual highlighting of pre-populated blank line in textarea is broken
1742
1743         - fix a bug where selecting across a soft line break did not highlight to
1744           the end of the first line if it contained skipped whitespace
1745
1746         Test: fast/text/selection-hard-linebreak.html
1747
1748         * rendering/InlineTextBox.cpp:
1749         (WebCore::InlineTextBox::selectionState): Changed to treat a selection that ends on the
1750         end of a hard line break as if it ends after the line break. Fixed the case of a selection
1751         that starts and ends in the same text object as the box but does not intersect it
1752         to return SelectionNone instead of selectionBoth.
1753
1754 2007-03-23  Mitz Pettel  <mitz@webkit.org>
1755
1756         Reviewed by Adele.
1757
1758         - fix http://bugs.webkit.org/show_bug.cgi?id=13124
1759           REGRESSION: Reproducible crash in Widget::getView
1760
1761         Test: fast/frames/hover-timer-crash.html
1762
1763         * page/Frame.cpp:
1764         (WebCore::Frame::setView): Added a call to EventHandler::clear().
1765
1766 2007-03-23  Justin Garcia  <justin.garcia@apple.com>
1767
1768         Reviewed by adele
1769
1770         <rdar://problem/5078739> 
1771         Crash in in ReplaceSelectionCommand if the fragment contains only a style span
1772
1773         * editing/ReplaceSelectionCommand.cpp:
1774         (WebCore::ReplaceSelectionCommand::doApply): Check 
1775         for an empty fragment after removing a redundant
1776         style span instead of before.
1777
1778 2007-03-23  David Hyatt  <hyatt@apple.com>
1779
1780         <rdar://problem/5085063>
1781
1782         Fix non-looping animation on cuteoverload.com. Just always flush
1783         decoded data for large animated images to avoid our cache getting
1784         out of sync with the image source.
1785
1786         Reviewed by ggaren
1787
1788         * platform/graphics/BitmapImage.cpp:
1789         (WebCore::BitmapImage::advanceAnimation):
1790
1791 2007-03-23  Adele Peterson  <adele@apple.com>
1792
1793         Reviewed by Darin.
1794
1795         Fix for <rdar://problem/5061024> REGRESSION: Returning false from onkeypress event on Input is ignored when key is Tab
1796         http://bugs.webkit.org/show_bug.cgi?id= 13020
1797
1798         No known way to add a layout test for this.  We would need a way to know exactly how the event was consumed.
1799
1800         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler):
1801           If the keypress event has its default behavior prevented, then we should consider the keydown event handled.
1802
1803 2007-03-23  Justin Garcia  <justin.garcia@apple.com>
1804
1805         Reviewed by darin
1806
1807         <rdar://problem/5080333> 
1808         REGRESSION: Selection changes when changing the alignment of an image
1809         
1810         Regression occurred when we started using moveParagraphs
1811         to move content in applyBlockStyle.  moveParagraphs 
1812         moves by copying, deleting and reinserting content, and
1813         so must be accompanied by selection preservation code.
1814         That code uses rangeFromLocationAndLength and rangeLength,
1815         which use TextIterators, which don't emit anything for images 
1816         and other replaced elements, causing this bug.
1817
1818         * editing/ApplyStyleCommand.cpp:
1819         (WebCore::ApplyStyleCommand::applyBlockStyle): Ask rangeLength 
1820         and rangeFromLocationAndLength to request that their
1821         TextIterators emit spaces for replaced elements.
1822         Use rangeCompliantEquivalent()s when creating a Range from
1823         VisiblePositions, since some VisiblePositions have illegal
1824         deepEquivalent()s.
1825         * editing/CompositeEditCommand.cpp:
1826         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
1827         * editing/TextIterator.cpp:
1828         (WebCore::TextIterator::TextIterator):
1829         (WebCore::TextIterator::handleReplacedElement): Emit
1830         a space if requested.
1831         (WebCore::TextIterator::representNodeOffsetZero): Emit
1832         ranges before m_node, not around m_lastTextNode.  These
1833         ranges should represent the part of the document associated
1834         with the emitted character. 
1835         (WebCore::TextIterator::rangeLength): Take in the new bool.
1836         (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
1837         Also, don't loop an extra time after finding the end of the
1838         range when we're looking for zero length ranges.  This appeared
1839         to be a workaround for the bugs fixed in representNodeOffsetZero
1840         in this patch.
1841         * editing/TextIterator.h:
1842
1843 2007-03-24  Mark Rowe  <mrowe@apple.com>
1844
1845         Rubber-stamped by Darin.
1846
1847         * Configurations/WebCore.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS.
1848
1849 2007-03-23  Darin Adler  <darin@apple.com>
1850
1851         * html/HTMLBodyElement.cpp: Fix comment typo.
1852
1853 2007-03-23  Adam Treat  <adam@staikos.net>
1854
1855         Reviewed and committed by George.
1856
1857         Patch from Adam Treat to make the Qt build work without SVG and XSLT.
1858         XMLNames is required in any case.
1859
1860         * WebCore.pro:
1861
1862 2007-03-23  Darin Adler  <darin@apple.com>
1863
1864         Reviewed by Hyatt.
1865
1866         - <rdar://problem/5074439> handle margins on frame and iframe elements
1867           without involving FrameView, FrameLoader, etc.
1868
1869         * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::insertedIntoDocument):
1870         Grab the margin from the frame directly here. There was no real benefit
1871         to doing this via FrameView. Later we can delete quite a bit of unneeded code
1872         here and in WebKit that exists only to set up the margin values in FrameView,
1873         which are now unused.
1874
1875 2007-03-23  Adele Peterson  <adele@apple.com>
1876
1877         Reviewed by Darin.
1878
1879         Fix for <rdar://problem/5080428> REGRESSION: getting value for hidden input element fails after the fix for Bug 11866
1880         http://bugs.webkit.org/show_bug.cgi?id=13121
1881
1882         Rolled out the change for 11866 that made hidden input elements store the value separately from the value attribute.
1883         Added an m_originalValue field that gets set when the element is done being parsed (in closeRenderer).  In reset,
1884         use the m_originalValue for hidden input elements.
1885
1886         * html/HTMLInputElement.cpp:
1887         (WebCore::HTMLInputElement::closeRenderer):
1888         (WebCore::HTMLInputElement::reset):
1889         (WebCore::HTMLInputElement::setValue):
1890         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
1891         * html/HTMLInputElement.h:
1892
1893 2007-03-23  Mitz Pettel  <mitz@webkit.org>
1894
1895         Reviewed by Dave Hyatt.
1896
1897         - fix http://bugs.webkit.org/show_bug.cgi?id=13157
1898               <rdar://problem/5083995>
1899           List markers positioned incorrectly and don't repaint properly on Oxford homepage
1900
1901         Test: fast/lists/marker-image-error.html
1902
1903         * rendering/RenderListMarker.cpp:
1904         (WebCore::RenderListMarker::imageChanged): Mark ourselves for relayout if
1905         the image failed to load, since that means we will use a bullet instead.
1906
1907 2007-03-23  Zack Rusin  <zrusin@trolltech.com>
1908
1909         Fix the compile.
1910
1911         * platform/graphics/qt/ImageSourceQt.cpp:
1912
1913 2007-03-22  Dave Hyatt  <hyatt@apple.com>
1914
1915         Fix for <rdar://problem/5083072>.
1916
1917         * page/Frame.cpp:
1918         (WebCore::Frame::setPrinting):
1919         (WebCore::Frame::forceLayoutWithPageWidthRange):
1920         * page/Frame.h:
1921         * page/mac/WebCoreFrameBridge.mm:
1922         (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1923
1924 2007-03-22  Anders Carlsson  <acarlsson@apple.com>
1925
1926         Reviewed by Ada.
1927
1928         <rdar://problem/5074974>
1929         CrashTracer: [USER] repro crash in Safari at com.apple.WebCore: WebCore::FrameLoader::activeDocumentLoader const + 6
1930         
1931         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1932         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
1933         Don't use ResourceResponse:isHTTP here since that only looks at the protocol instead of if the response came from a 
1934         HTTP server (and not a web archive).
1935
1936 2007-03-22  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1937
1938         Not reviewed - gdk build fix.
1939
1940         * platform/graphics/cairo/ImageSourceCairo.cpp:
1941
1942 2007-03-22  Dave Hyatt  <hyatt@apple.com>
1943
1944         Fix for <rdar://problem/5083473>.  Make sure wheeling still forwards to the frame view even
1945         when no node is hit.  Technically not ever hitting a node is a regression from the RenderView
1946         size changes (making it be the size of the initial containing block according to CSS2.1), but
1947         we should still handle this case gracefully in case it comes up again.
1948        
1949         Reviewed by olliej
1950
1951         * page/EventHandler.cpp:
1952         (WebCore::EventHandler::handleWheelEvent):
1953
1954 2007-03-22  Justin Garcia  <justin.garcia@apple.com>
1955
1956         Reviewed by kevin
1957
1958         <rdar://problem/5081257> 
1959         REGRESSION: New Mail signatures start out empty
1960
1961         * editing/VisiblePosition.cpp:
1962         (WebCore::VisiblePosition::canonicalPosition): Allow
1963         descent from positions inside the document into an 
1964         editable body.
1965
1966 2007-03-22  Brady Eidson  <beidson@apple.com>
1967
1968         Reviewed by Adele and John
1969
1970         <rdar://5043528> - Prepare for new API
1971         
1972         * platform/network/ResourceHandle.cpp:
1973         (WebCore::ResourceHandle::clearAuthentication): Clear CF type
1974
1975 2007-03-22  Beth Dakin  <bdakin@apple.com>
1976
1977         Patch by Hyatt, reviewed and committed by me.
1978
1979         Does not reproduce consistently, so a layout test does not seem 
1980         possible.
1981
1982         Fix for <rdar://problem/5082421> Constantly hitting ASSERT(!
1983         needsLayout()) in RenderView::paint()
1984
1985         * page/FrameView.cpp:
1986         (WebCore::FrameView::layoutPending): It is not enough to ask if the 
1987         layout timer is active. There may be times that we don't have a 
1988         body yet so we cannot schedule layout yet, but the root still needs 
1989         layout.  
1990
1991 2007-03-22  John Sullivan  <sullivan@apple.com>
1992
1993         Reviewed by Darin
1994         
1995         Followup for recent fix to 5079700, found by assertion added to Safari.
1996
1997         * page/mac/FrameMac.mm:
1998         (WebCore::Frame::searchForLabelsBeforeElement):
1999         Fixed another place in this method where an empty NSString was being returned instead of nil.
2000         Cleaned up the style a little too.
2001
2002 2007-03-22  David Hyatt  <hyatt@apple.com>
2003
2004         Remove unnecessary destroyFrameAtIndex call.  Now that we throw away
2005         the image source, it is no longer needed.
2006
2007         Reviewed by beth
2008
2009         * platform/graphics/BitmapImage.cpp:
2010         (WebCore::BitmapImage::destroyDecodedData):
2011
2012 2007-03-22  David Harrison  <harrison@apple.com>
2013
2014         Reviewed by Geoff, Darin.
2015
2016         <rdar://problem/5077892> In RapidWeaver 3.5.1, a crash occurs when attempting to load Safari Bookmarks in iMedia Browser
2017         
2018         * platform/mac/ThreadCheck.mm:
2019         (WebCore::_WebCoreThreadViolationCheck):
2020         Change default on Tiger to NSLog rather than raise an exception.
2021
2022 2007-03-22  Darin Adler  <darin@apple.com>
2023
2024         Reviewed by Brady.
2025
2026         - use binary_search instead of hash table; slightly better performance and
2027           less memory use
2028
2029         * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
2030         Use binary_search.
2031
2032 2007-03-22  Darin Adler  <darin@apple.com>
2033
2034         Reviewed by Adele.
2035
2036         - fix <rdar://problem/5074630> detachChildren call should move from WebKit to WebCore
2037
2038         * loader/FrameLoader.cpp: (WebCore::FrameLoader::setDocumentLoader):
2039         Add a call to detachChildren() after the call to prepareForDataSourceReplacement().
2040         There was no reason for this crucial loading step to be left to the client.
2041
2042 2007-03-22  David Hyatt  <hyatt@apple.com>
2043
2044         Minor refactoring and cleanup of the bridge calls that want to control layout settings on the RenderView.
2045         Have the bridge talk through the FrameView instead of just asking for the RenderView directly.
2046
2047         Add an assert to help catch situations where the RenderView needs layout at paint time, since this is a known
2048         catastrophic scenario that will (much of the time) result in a crash in RenderTableSection::paint.
2049
2050         Reviewed by aroben
2051
2052         * page/FrameView.cpp:
2053         (WebCore::FrameView::adjustViewSize):
2054         (WebCore::FrameView::needsLayout):
2055         (WebCore::FrameView::setNeedsLayout):
2056         * page/FrameView.h:
2057         * page/mac/WebCoreFrameBridge.mm:
2058         (-[WebCoreFrameBridge needsLayout]):
2059         (-[WebCoreFrameBridge setNeedsLayout]):
2060         * rendering/RenderView.cpp:
2061         (WebCore::RenderView::paint):
2062
2063 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2064
2065         Reviewed by Beth Dakin.
2066         
2067         Re-worked the fix in r20375. 'M' and 'm' are not the only commands that
2068         accept "extra" coordinates -- virtually all commands accept them.
2069
2070         * ksvg2/svg/SVGParserUtilities.cpp:
2071         (WebCore::SVGPathParser::parseSVG):
2072
2073 2007-03-21  David Harrison  <harrison@apple.com>
2074
2075         Reviewed by hyatt.
2076
2077         <rdar://problem/5072460> CrashTracer: [USER] 1 crashes in Xcode at com.apple.ImageIO.framework: getBandProcPNG + 168
2078
2079         An NSData object was being alloc/init'd, then returned callers who cast the pointer as a
2080         CFDataRef, including calling CFRelease on it. The problem is that under garbage collection, the NS
2081         retain count is ignored (it's always 0), but the CFRetain and CFRelease are not ignored. This
2082         caused the object to be over-released. The solution that works in both GC and non-GC is to "transfer"
2083         the initial NS retain count to the CF retain count, using HardRetainWithNSRelease.
2084         
2085         The creator of the NSData was SharedBuffer::createNSData. The callers were PDFDocumentImage::dataChanged()
2086         and ImageSource::setData(). This particular crash involved the ImageSource::setData() case.
2087
2088         * platform/SharedBuffer.h:
2089         Declare createCFData().
2090         
2091         * platform/graphics/cg/ImageSourceCG.cpp:
2092         (WebCore::ImageSource::setData):
2093         Call createCFData instead of createNSData.
2094         
2095         * platform/graphics/cg/PDFDocumentImage.cpp:
2096         (WebCore::PDFDocumentImage::dataChanged):
2097         Call createCFData instead of createNSData.
2098         
2099        * platform/mac/SharedBufferMac.mm:
2100         (WebCore::SharedBuffer::createCFData):
2101         Implement createCFData(). Use HardRetainWithNSRelease for gc safety.
2102         
2103 2007-03-21  Mitz Pettel  <mitz@webkit.org>
2104
2105         Reviewed by Darin.
2106
2107         - fix http://bugs.webkit.org/show_bug.cgi?id=13145
2108           Regression: Scrollbar not resizing after display none
2109
2110         Test: fast/dynamic/view-overflow.html
2111
2112         * rendering/RenderView.cpp:
2113         (WebCore::RenderView::layout): Reset overflowHeight() and overflowWidth()
2114         before calling docHeight() and docWidth(), since the former act as a lower
2115         bound for the latter.
2116
2117 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2118
2119         Reviewed by Beth Dakin.
2120         
2121         A little cleanup based work I've been doing on the SVG parsers.
2122
2123         * ksvg2/svg/SVGParserUtilities.h:
2124         (WebCore::skipString):
2125         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Moved checkString into
2126         SVGParserUtilities.h, so it could be with all its friends. Renamed 
2127         "checkString" to "skipString" to match the rest of the code and to be 
2128         clear about which functions move the buffer pointer.
2129         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
2130         * ksvg2/svg/SVGTransformable.cpp:
2131         (WebCore::SVGTransformable::parseTransformAttribute): Changed gotos into 
2132         returns. Removed unnecessary magic number.
2133
2134 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2135
2136         Reviewed by Beth Dakin.
2137         
2138         Fixed <rdar://problem/5078471> SVG rgb color parser runs past end of 
2139         buffer when running fuzzing test
2140
2141         * ksvg2/svg/SVGColor.cpp:
2142         (WebCore::parseNumberOrPercent): Check for past the end condition.
2143         (WebCore::SVGColor::colorFromRGBColorString): Reversed "read past end
2144         of buffer, then check if you're past the end" logic.
2145
2146 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2147
2148         Reviewed by Beth Dakin.
2149         
2150         Fixed <rdar://problem/5079410> SVG path parser hangs, exhausts memory when 
2151         running fuzzer test
2152
2153         * ksvg2/svg/SVGParserUtilities.cpp:
2154         (WebCore::SVGPathParser::parseSVG): Don't assume that extra digits are
2155         always preceded by an 'M' or an 'm'.
2156
2157 2007-03-21  John Sullivan  <sullivan@apple.com>
2158
2159         Reviewed by Adam
2160         
2161         - fixed <rdar://problem/5079700> REGRESSION (r19702): Name/password aren't autofilled 
2162           or saved for .Mac homepage login
2163
2164         * page/mac/FrameMac.mm:
2165         (WebCore::Frame::searchForLabelsBeforeElement):
2166         don't count empty strings as valid results
2167
2168 2007-03-21  Justin Garcia  <justin.garcia@apple.com>
2169
2170         Reviewed by darin
2171
2172         * editing/markup.cpp:
2173         (WebCore::styleFromMatchedRulesAndInlineDecl): 
2174         Release the RefPtr to avoid increasing/decreasing
2175         the refcount unnecessarily.
2176         (WebCore::propertyMissingOrEqualToNone): Added and used
2177         instead of converting values to strings.
2178         (WebCore::elementHasTextDecorationProperty): 
2179         (WebCore::createMarkup):
2180
2181 2007-03-21  Justin Garcia  <justin.garcia@apple.com>
2182
2183         Reviewed by oliver
2184
2185         <rdar://problem/5075944> 
2186         REGRESSION: Partially selected underlined content pastes as plain text
2187         
2188         We stopped adding markup for all the ancestors
2189         of lastClosed up to the commonAncestorBlock
2190         because it was adding a lot of unnecessary markup.
2191         This caused us to lose underlining when copying a 
2192         partially selected underlined element (even though 
2193         we put all styles that the copied markup inherits 
2194         into a style span, because the text-decoration 
2195         isn't inheritable).
2196
2197         * editing/markup.cpp:
2198         (WebCore::styleFromMatchedRulesAndInlineDecl): Moved
2199         code here.
2200         (WebCore::elementHasTextDecorationProperty): Added.
2201         (WebCore::createMarkup): If the copied markup has a
2202         text-decoration because some common ancestor has
2203         a text-decoration property set, include that ancestor
2204         and all its descendants in the copied markup.
2205
2206 2007-03-21  Oliver Hunt  <oliver@apple.com>
2207
2208         Reviewed by Antti.
2209
2210         Update a few SVG attribute parsers to be more defensive against
2211         reading beyond the end of input. 
2212
2213         Fixes rdar://problem/5077218 -- SVG transform parser runs past
2214         end of buffer when running fuzzing test
2215
2216         * ksvg2/svg/SVGParserUtilities.cpp:
2217         (WebCore::SVGPathParser::parseSVG):
2218         * ksvg2/svg/SVGParserUtilities.h:
2219         (WebCore::skipOptionalSpacesOrDelimiter):
2220         * ksvg2/svg/SVGTransformable.cpp:
2221         (WebCore::parseTransformParamList):
2222         (WebCore::SVGTransformable::parseTransformAttribute):
2223
2224 2007-03-21  Alexey Proskuryakov  <ap@webkit.org>
2225
2226         Reviewed by Mitz.
2227
2228         http://bugs.webkit.org/show_bug.cgi?id=13140
2229         Crash after loading SVG fragment with XMLHttpRequest (Yosemite Map Geology Layer)
2230
2231         Test: svg/carto.net/frameless-svg-parse-error.html
2232
2233         * ksvg2/misc/SVGDocumentExtensions.cpp:
2234         (WebCore::SVGDocumentExtensions::reportError): Added a null check.
2235         (WebCore::SVGDocumentExtensions::reportWarning): Ditto.
2236
2237 2007-03-21  Beth Dakin  <bdakin@apple.com>
2238
2239         Reviewed by Geoff.
2240
2241         Fix for <rdar://problem/5072678> Crash in
2242         RenderLayer::scrollRectToVisible with MallocScribble enabled
2243
2244         I tried to fix this earlier today but my fix caused a regression
2245         scrolling through RSS pages. It turns out that sometimes scroll
2246         events need to propagate immediately, and sometimes they must be
2247         delayed or they risk deleting objects that are expected to be
2248         around after the event has propagated. Mitz's original fix made
2249         sheduleEvent() only delay events that happen during layout. This
2250         fix marks two other places in addition to layout where events also
2251         need to be delayed. These two places are places that were marked
2252         with FIXMEs that Mitz removed in his original patch. (There was a
2253         third FIXME in RenderLayer::updateScrollInfoAfterLayout() but that
2254         case is only called through layout and is covered by Mitz's
2255         original patch.)
2256
2257         * page/FrameView.cpp:
2258         (WebCore::FrameView::~FrameView): Added assertion.
2259         (WebCore::FrameView::layout): Call new functions to increment and 
2260         decrement the queued events count.
2261         (WebCore::FrameView::pauseScheduledEvents):
2262         (WebCore::FrameView::resumeScheduledEvents): Decrement queued 
2263         events count and dispatch events if the count has zeroed.
2264         * page/FrameView.h:
2265         * rendering/RenderLayer.cpp:
2266         (WebCore::RenderLayer::scrollRectToVisible):
2267         (WebCore::Marquee::start):
2268
2269 2007-03-21  Mitz Pettel  <mitz@webkit.org>
2270
2271         Reviewed by John Sullivan.
2272
2273         - fix http://bugs.webkit.org/show_bug.cgi?id=13130
2274           REGRESSION: Sometimes a frame resizer keeps following the mouse after mouseup
2275
2276         * rendering/RenderFrameSet.cpp:
2277         (WebCore::RenderFrameSet::userResize): Reordered the code to allow resizing
2278         to be terminated by a mouseup event regardless of whether the frameset needs
2279         layout.
2280
2281 2007-03-20  Anders Carlsson  <acarlsson@apple.com>
2282
2283         Reviewed by Oliver.
2284
2285         <rdar://problem/5077252> 
2286         In NetNewsWire 2.1.1 and 3.0d62, a crash occurs after triple-clicking a link on the page
2287         
2288         * loader/FrameLoader.cpp:
2289         (WebCore::FrameLoader::load):
2290         Move the m_inStopAllLoaders check to the load function that's common for loading a request or substitute data.
2291
2292 2007-03-20  Brady Eidson  <beidson@apple.com>
2293
2294         Reviewed by Anders.
2295
2296         <rdar://problem/5073391> and http://bugs.webkit.org/show_bug.cgi?id=13137
2297
2298         Crash in IconDatabase when private browsing is enabled.
2299
2300         The problem was caused by http://trac.webkit.org/projects/webkit/changeset/20182 
2301         which changed many uses of char[] and Vector<char> to SharedBuffer.  The patch
2302         tended to literally replace a Vector<char> with RefPtr<SharedBuffers> but forgot
2303         to enforce the concept that Vector<char>'s always exist, whereas RefPtr<SharedBuffers>
2304         can be null.  This led to derefs.
2305
2306         I took the opportunity to rework the iconDB functions to live in a SharedBuffer 
2307         world, as that didn't exist when they were originally written - now they just return
2308         SharedBuffers instead of taking a Vector<char>& as a parameter
2309
2310         * loader/icon/IconDatabase.cpp:
2311         (WebCore::IconDatabase::imageDataForIconURL): Return a SharedBuffer
2312         (WebCore::IconDatabase::iconForPageURL): Null check the SharedBuffer before asking
2313           it if it's empty
2314         (WebCore::IconDatabase::imageDataForIconURLQuery): Return a new SharedBuffer
2315
2316         * loader/icon/IconDatabase.h: Return SharedBuffer's instead of taking Vector<char>&'s
2317
2318 2007-03-20  Adam Roben  <aroben@apple.com>
2319
2320         Rubberstamped by Adele.
2321
2322         Roll out r20348 because it was causing crashes.
2323
2324         * page/FrameView.cpp:
2325         (WebCore::FrameViewPrivate::FrameViewPrivate):
2326         (WebCore::FrameView::layout):
2327         (WebCore::FrameView::scheduleEvent):
2328
2329 2007-03-20  Timothy Hatcher  <timothy@apple.com>
2330
2331         Reviewed by Kevin Decker.
2332
2333         Rolling out part of r19828 that caused a scrolling regression in Mail.
2334
2335         <rdar://problem/4820817> Message jumps around when trying to select text
2336
2337         * platform/mac/ScrollViewMac.mm:
2338         (WebCore::ScrollView::visibleContentRect):
2339         (WebCore::ScrollView::updateContents):
2340
2341 2007-03-20  Brady Eidson  <beidson@apple.com>
2342
2343         Reviewed by John
2344
2345         <rdar://5071341> - Crash in IconLoader::finishLoading()
2346         
2347         Though the reproducibility of the crash is still elusive, there's been a crasher likely uncovered 
2348         Hyatt's recent caching changings to the IconLoader.  This crash tends to hit on sites without favicons,
2349         that serve up complex 404 pages, often when the load is cancelled or redirected.  Occasionally, it *seems*
2350         the IconLoader is getting failed/cancelled twice.
2351         
2352         This patch adds some assertions and a "fail gracefully in a release build" check that will have to
2353         serve us until we know more about the cause.
2354
2355         * loader/icon/IconLoader.cpp:
2356         (WebCore::IconLoader::didFail): Add an assertion to catch this case
2357         (WebCore::IconLoader::finishLoading): Add an assertion to catch the case, and fail
2358           gracefully in debug builds.  Also add an efficiency check to not commit to the DB if there is no
2359           IconURL
2360
2361 2007-03-20  Antti Koivisto  <antti@apple.com>
2362
2363         Reviewed by Darin.
2364
2365         - fix http://bugs.webkit.org/show_bug.cgi?id=10747
2366         REGRESSION: Using two fingers on a trackpad to scroll inside a text area makes the whole page move
2367         <rdar://problem/5045710>
2368         
2369         Eat smooth scroll events in WebCore if pointer is over scrollable area. Not
2370         really a good fix, smooth scrolling should be supported properly. It should do for now.
2371
2372         * page/EventHandler.cpp:
2373         (WebCore::EventHandler::handleWheelEvent):
2374         * rendering/RenderListBox.cpp:
2375         (WebCore::RenderListBox::isScrollable):
2376         * rendering/RenderListBox.h:
2377         * rendering/RenderObject.cpp:
2378         (WebCore::RenderObject::isScrollable):
2379         * rendering/RenderObject.h:
2380         * rendering/RenderTextControl.cpp:
2381         (WebCore::RenderTextControl::isScrollable):
2382         * rendering/RenderTextControl.h:
2383
2384 2007-03-20  Beth Dakin  <bdakin@apple.com>
2385
2386         Reviewed by Geoff.
2387
2388         Covered by existing test case.
2389
2390         Fix for <rdar://problem/5072678> Crash in 
2391         RenderLayer::scrollRectToVisible with MallocScribble enabled
2392
2393         This removes some code that was added with http://bugs.webkit.org/
2394         show_bug.cgi?id=8360. This code was not needed to fix that bug, but 
2395         the idea behind it was that there are times when it is safe for 
2396         scheduleEvent() to propagate the event immediately. The 
2397         MallocScribble crash revealed that this assumption was a bit too 
2398         broad; the cause of the crash was that we were propagating events 
2399         immediately when it was not safe. Mitz and I discussed this online 
2400         and we agree that the safest solution is to revert to the old 
2401         behavior here, and always delay the propagation of the event. 
2402
2403         * page/FrameView.cpp:
2404         (WebCore::FrameViewPrivate::FrameViewPrivate):
2405         (WebCore::FrameView::layout):
2406         (WebCore::FrameView::scheduleEvent):
2407
2408 2007-03-20  Brady Eidson  <beidson@apple.com>
2409
2410         Reviewed by John Sullivan
2411
2412         Add some very helpful logging to the IconLoader's SubresourceLoaderClient impl.
2413
2414         * loader/icon/IconLoader.cpp:
2415         (WebCore::IconLoader::didReceiveResponse):
2416         (WebCore::IconLoader::didReceiveData):
2417         (WebCore::IconLoader::didFail):
2418         (WebCore::IconLoader::didFinishLoading):
2419
2420 2007-03-20  Justin Garcia  <justin.garcia@apple.com>
2421
2422         Reviewed by darin
2423
2424         <rdar://problem/5071074> 
2425         REGRESSION: Links are pasted as plain text at certain positions
2426         
2427         moveParagraphs calls createMarkup without annotation, which leaves
2428         out anchor elements that aren't fully selected.
2429
2430         * editing/CompositeEditCommand.cpp:
2431         (WebCore::CompositeEditCommand::moveParagraphs): We don't want 
2432         createMarkup to do full annotation here.  Doing so could include 
2433         special ancestor blocks, which would prevent the copied content 
2434         from appearing in the destination paragraph when it's re-inserted.  
2435         Annotation would also inline styles from style sheets,  which is 
2436         unnecessary because the content is being moved to the same 
2437         document it's being moved from.
2438         Added a new bool to createMarkup that when true allows markup for 
2439         special ancestors as long as they are inline when annotation is off.
2440         * editing/markup.cpp:
2441         (WebCore::createMarkup): Don't set specialCommonAncestor if annotation
2442         is off, unless it's inline and we've been told it's ok to include such
2443         elements.
2444         * editing/markup.h:
2445
2446 2007-03-20  Alexey Proskuryakov  <ap@webkit.org>
2447
2448         Reviewed by Darin.
2449
2450         http://bugs.webkit.org/show_bug.cgi?id=12497
2451         Implement XPath result ordering.
2452
2453         XPath::NodeVector typedef is replaced with a real XPath::NodeSet class that knows how 
2454         to sort itself, and can remember whether it has been already sorted.
2455
2456         * CMakeLists.txt:
2457         * WebCore.pro:
2458         * WebCore.xcodeproj/project.pbxproj:
2459         * WebCoreSources.bkl:
2460         Added XPathNodeSet files.
2461
2462         * xml/XPathExpression.cpp: Fixed includes.
2463
2464         * xml/XPathFunctions.cpp:
2465         (WebCore::XPath::FunId::evaluate): Mark the resulting node-set as unsorted.
2466         (WebCore::XPath::FunLocalName::evaluate): Replacing NodeVector with NodeSet.
2467         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
2468         (WebCore::XPath::FunName::evaluate): Ditto.
2469         (WebCore::XPath::FunCount::evaluate): Ditto.
2470         (WebCore::XPath::FunSum::evaluate): Ditto.
2471
2472         * xml/XPathNodeSet.cpp: Added.
2473         (WebCore::XPath::parentWithDepth):
2474         (WebCore::XPath::sortBlock):
2475         (WebCore::XPath::NodeSet::sort): Sort the node-set in document order.
2476         (WebCore::XPath::NodeSet::reverse): Reverse the order (useful for making axes such as 
2477         parent or ancestor sorted).
2478         (WebCore::XPath::NodeSet::firstNode): Returns the first node in document order; currently
2479         implemented via fully sorting the node-set, but this can obviously be optimized.
2480         (WebCore::XPath::NodeSet::anyNode): Added for symmetry with firstNode().
2481         
2482         * xml/XPathNodeSet.h: Added.
2483         (WebCore::XPath::NodeSet::NodeSet):
2484         (WebCore::XPath::NodeSet::operator=):
2485         (WebCore::XPath::NodeSet::size):
2486         (WebCore::XPath::NodeSet::isEmpty):
2487         (WebCore::XPath::NodeSet::operator[]):
2488         (WebCore::XPath::NodeSet::reserveCapacity):
2489         (WebCore::XPath::NodeSet::clear):
2490         (WebCore::XPath::NodeSet::swap):
2491         (WebCore::XPath::NodeSet::append):
2492         (WebCore::XPath::NodeSet::markSorted):
2493         (WebCore::XPath::NodeSet::isSorted):
2494         Most of these methods just call Vector counterparts. 
2495
2496         * xml/XPathParser.cpp: Updated the copyright notice.
2497
2498         * xml/XPathPath.cpp:
2499         (WebCore::XPath::Filter::evaluate): Replacing NodeVector with NodeSet.
2500         (WebCore::XPath::Path::evaluate): Ditto.
2501         (WebCore::XPath::LocationPath::evaluate): Replacing NodeVector with NodeSet. This function
2502         always marks the result as unsorted, because it is hard to tell whether a step breaks node order.
2503         Identifying and implementing special cases when it is not necessary to do so is an important
2504         future optimization.
2505
2506         * xml/XPathPath.h: Replacing NodeVector with NodeSet.
2507         * xml/XPathPredicate.cpp:
2508         (WebCore::XPath::EqTestOp::compare): Replacing NodeVector with NodeSet.
2509         (WebCore::XPath::Union::evaluate): Replacing NodeVector with NodeSet. Currently, Union just
2510         marks the result as unordered; we can consider using merge sort to avoid this.
2511
2512         * xml/XPathResult.cpp:
2513         (WebCore::XPathResult::XPathResult): Replacing NodeVector with NodeSet.
2514         (WebCore::XPathResult::singleNodeValue): Ditto.
2515         (WebCore::XPathResult::snapshotLength): Ditto.
2516         (WebCore::XPathResult::iterateNext): Ditto.
2517         (WebCore::XPathResult::snapshotItem): Ditto.
2518         (WebCore::XPathResult::convertTo): Ditto. Sort the result when requested to.
2519
2520         * xml/XPathResult.h: Replacing NodeVector with NodeSet.
2521
2522         * xml/XPathStep.cpp:
2523         (WebCore::XPath::Step::evaluate): If the input is not sorted, mark the output as such, too.
2524         (WebCore::XPath::Step::nodesInAxis): Fixed a number of bugs when enumerating with an
2525         attribute context node.
2526         (WebCore::XPath::Step::nodeTestMatches): Replacing NodeVector with NodeSet.
2527         * xml/XPathStep.h: Ditto.
2528
2529         * xml/XPathUtil.cpp:
2530         (WebCore::XPath::isValidContextNode): XPath data model doesn't put attribute data into child
2531         nodes, so passing such node as a context could cause problems.
2532
2533         * xml/XPathUtil.h: Removed NodeVector typedef.
2534
2535         * xml/XPathValue.cpp:
2536         (WebCore::XPath::Value::Value):
2537         (WebCore::XPath::Value::toNodeSet):
2538         (WebCore::XPath::Value::toBoolean):
2539         (WebCore::XPath::Value::toNumber):
2540         (WebCore::XPath::Value::toString):
2541         * xml/XPathValue.h:
2542         (WebCore::XPath::Value::):
2543         (WebCore::XPath::Value::isNodeSet):
2544         Replacing NodeVector with NodeSet.
2545
2546 2007-03-21  Mark Rowe  <mrowe@apple.com>
2547
2548         Build fix.
2549
2550         * bindings/objc/WebScriptObject.mm:
2551         (-[WebScriptObject methodForSelector:]):
2552         (-[WebScriptObject respondsToSelector:]):
2553
2554 2007-03-21  Mark Rowe  <mrowe@apple.com>
2555
2556         Reviewed by Tim Hatcher.
2557
2558         Fix for http://bugs.webkit.org/show_bug.cgi?id=13129.
2559         Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup.
2560
2561         Some cross-language scripting bridges use the presence of -(int)count to determine
2562         whether to treat objects as sequence-like.  All WebScriptObject's exposed this method
2563         which lead to non-collection WebScriptObject's being mishandled by PyObjC.  We now
2564         expose -count only when the object we wrap looks like a collection from a JavaScript
2565         point of view (eg, it has a length property).
2566
2567         * bindings/objc/WebScriptObject.mm:
2568         (-[WebScriptObject _shouldRespondToCount]):
2569         (-[WebScriptObject methodForSelector:]):
2570         (-[WebScriptObject respondsToSelector:]):
2571         (-[WebScriptObject _count]):
2572         * bindings/objc/WebScriptObjectPrivate.h:
2573
2574 2007-03-20  Darin Adler  <darin@apple.com>
2575
2576         * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent):
2577         Fix obvious typo in the change from last night -- forgot to assign to the variable.
2578
2579 2007-03-20  Dave Hyatt  <hyatt@apple.com>
2580
2581         Refactor fonts a bit for portability.
2582        
2583         Reviewed by aroben
2584
2585         * platform/Font.cpp:
2586         (WebCore::Font::drawSimpleText):
2587         (WebCore::Font::drawGlyphBuffer):
2588         (WebCore::Font::floatWidthForSimpleText):
2589         * platform/Font.h:
2590         * platform/FontData.h:
2591         (WebCore::FontData::isSystemFont):
2592         (WebCore::FontData::scriptCache):
2593         * platform/GlyphBuffer.h:
2594         (WebCore::GlyphBuffer::add):
2595
2596 2007-03-20  Anders Carlsson  <acarlsson@apple.com>
2597
2598         Reviewed by Adam.
2599
2600         Stub out a couple of CFNetwork backend functions.
2601         
2602         * platform/network/ResourceHandle.h:
2603
2604 2007-03-19  Oliver Hunt  <oliver@apple.com>
2605
2606         Reviewed by Ada.
2607
2608         Protect against possibility of JS detaching a frame (and losing its view)
2609         midway through a mouse move.
2610
2611         * page/EventHandler.cpp:
2612         (WebCore::EventHandler::handleMouseMoveEvent):
2613
2614 2007-03-19  Alexey Proskuryakov  <ap@webkit.org>
2615
2616         Reviewed by Darin.
2617
2618         http://bugs.webkit.org/show_bug.cgi?id=13107
2619         XPath should raise an exception when trying to parse an unknown function
2620
2621         Test: fast/xpath/invalid-functions.html
2622
2623         * xml/XPathFunctions.cpp:
2624         (WebCore::XPath::createFunction): Return 0 if the function couldn't be created.
2625         * xml/XPathGrammar.y: Handle nulls returned from createFunction().
2626
2627 2007-03-19  Adele Peterson  <adele@apple.com>
2628
2629         Reviewed by Beth.
2630
2631         Fix for http://bugs.webkit.org/show_bug.cgi?id=13087
2632         <rdar://problem/5064316> REGRESSION: Allow setting the checked attribute in js and in markup for unnamed radio buttons (dominos.com)
2633
2634         Test: fast/forms/radio_checked_name.html
2635
2636         We were matching a WinIE quirk that does not allow a user to check and uncheck an unnamed radio button.  But they still
2637         allow the checked attribute to be set in html, and changed in javascript.  So this change matches that behavior.
2638
2639         * html/HTMLInputElement.cpp:
2640         (WebCore::HTMLInputElement::parseMappedAttribute): We no longer need a special call to setChecked when parsing the name
2641          attribute, since we setChecked will now work with unnamed radio buttons.
2642         (WebCore::HTMLInputElement::preDispatchEventHandler): Added comment.
2643         (WebCore::HTMLInputElement::setChecked): Don't check for the unnamed radio button case here.
2644         (WebCore::HTMLInputElement::postDispatchEventHandler): Don't call setChecked for unnamed radio buttons.
2645         (WebCore::HTMLInputElement::defaultEventHandler): ditto.
2646
2647 2007-03-19  Adam Roben  <aroben@apple.com>
2648
2649         Rubberstamped by Oliver.
2650
2651         * bridge/JavaScriptStatistics.cpp: Added missing header for
2652         correctness.
2653
2654 2007-03-19  Andrew Wellington  <proton@wiretapped.net>
2655
2656         Reviewed by Maciej.
2657
2658         Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
2659
2660         * WebCore.xcodeproj/project.pbxproj:
2661
2662 2007-03-19  Justin Garcia  <justin.garcia@apple.com>
2663
2664         Reviewed by darin
2665         
2666         <rdar://problem/5071074> 
2667         REGRESSION: Links that aren't fully selected copy and paste as only text
2668         
2669         We stopped adding markup for all commonAncestorBlocks
2670         and the ancestors of lastClosed up to them because it 
2671         was adding a lot of unnecessary markup.
2672
2673         * editing/markup.cpp:
2674         (WebCore::createMarkup): Also include markup for nodes
2675         up to an enclosing anchor.  Cleaned up the code for
2676         including special common ancestors a bit.
2677
2678 2007-03-19  Nikolas Zimmermann  <zimmermann@kde.org>
2679
2680         Reviewed by Lars Knoll.
2681
2682         Fix crash when opening a SVG document which contains SVG elements, but no <svg> root element.
2683         Moving the mouse was crashing WebKit. Fixes svg/hixie/dynamic/006.xml.
2684
2685         * rendering/RenderObject.cpp:
2686         (WebCore::RenderObject::updateHitTestResult):
2687
2688 2007-03-19  Mitz Pettel  <mitz@webkit.org>
2689
2690         Reviewed by Hyatt.
2691
2692         - fix http://bugs.webkit.org/show_bug.cgi?id=13117
2693         REGRESSION (r14658): Flickering text fields when updating via javascript
2694
2695         * page/Frame.cpp:
2696         (WebCore::Frame::forceLayout): Added a flag to allow partial relayout.
2697         * page/Frame.h:
2698         * page/mac/WebCoreFrameBridge.mm:
2699         (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]): Allow partial relayout
2700         if not adjusting view size.
2701         (-[WebCoreFrameBridge needsLayout]): Changed to check for pending subtree
2702         layout instead of just whether the root needs layout.
2703
2704 2007-03-18  Nikolas Zimmermann  <zimmermann@kde.org>
2705
2706         Reviewed by Maciej.
2707
2708         Make JS function calls on POD-types (ie. SVGLength) take effect.
2709         Calling ie. newValueInSpecifiedUnits on SVGLength works as expected.
2710
2711         This worked fine before we switched to SVGLength POD type, so this
2712         can be considered as P1 regression fix.
2713
2714         Partly fix svg/hixie/dynamic/005-broken.svg. We match Opera now though
2715         it's not yet completly fixed. Setting baseVal attribute on SVGAnimatedString
2716         doesn't work as expected - needs a seperated fix.
2717
2718         * bindings/scripts/CodeGeneratorJS.pm:
2719
2720 2007-03-19  Adele Peterson  <adele@apple.com>
2721
2722         Reviewed by Adam.
2723
2724         Adding comments and a little cleanup from my last checkin.
2725
2726         * html/HTMLSelectElement.cpp:
2727         (WebCore::HTMLSelectElement::setSelectedIndex): Removed commented out assert.  Added comment about how we use onChange.
2728         (WebCore::HTMLSelectElement::selectAll): Added comment about how we use saveLastSelection and onChange.
2729         (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto.
2730         (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto.
2731         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto.
2732         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto.
2733         (WebCore::HTMLSelectElement::menuListOnChange): Added assert that usesMenuList() is true.
2734         (WebCore::HTMLSelectElement::listBoxOnChange): Added assert that usesMenuList() is false.
2735         (WebCore::HTMLSelectElement::saveLastSelection): Added early return for menu lists.
2736
2737 2007-03-19  Mitz Pettel  <mitz@webkit.org>
2738
2739         Reviewed by Tim Hatcher.
2740
2741         - fix http://bugs.webkit.org/show_bug.cgi?id=13091
2742           REGRESSION (r20075): Wrong text style and pixel break in Apple Store Locator HUD
2743
2744         Test: fast/innerHTML/additional-inline-style.html
2745
2746         * editing/markup.cpp:
2747         (WebCore::startMarkup): Changed to add inline style based on CSS rules only
2748         in AnnotateForInterchange mode.
2749
2750 2007-03-19  Zack Rusin  <zrusin@trolltech.com>
2751
2752         Compile fix.
2753
2754         * platform/qt/ScrollViewQt.cpp:
2755         (WebCore::ScrollView::update):
2756
2757 2007-03-19  Adam Roben  <aroben@apple.com>
2758
2759         Reviewed by Hyatt and Maciej.
2760
2761         Renamed WebCoreJavaScript to JavaScriptStatistics and made it C++ as
2762         part of <rdar://problem/5071653>.
2763
2764         All layout tests pass.
2765
2766         * WebCore.exp: Updated.
2767         * WebCore.xcodeproj/project.pbxproj: Updated.
2768         * bridge/JavaScriptStatistics.cpp: Moved from
2769         bridge/mac/WebCoreJavaScript.mm, and converted to C++.
2770         (WebCore::collect):
2771         (WebCore::JavaScriptStatistics::objectCount):
2772         (WebCore::JavaScriptStatistics::interpreterCount):
2773         (WebCore::JavaScriptStatistics::protectedObjectCount):
2774         (WebCore::JavaScriptStatistics::rootObjectTypeCounts):
2775         (WebCore::JavaScriptStatistics::garbageCollect):
2776         (WebCore::JavaScriptStatistics::garbageCollectOnAlternateThread):
2777         (WebCore::JavaScriptStatistics::shouldPrintExceptions):
2778         (WebCore::JavaScriptStatistics::setShouldPrintExceptions):
2779         * bridge/JavaScriptStatistics.h: Added.
2780         * bridge/mac/WebCoreJavaScript.h: Removed.
2781         * bridge/mac/WebCoreJavaScript.mm: Removed.
2782
2783 2007-03-18  Maciej Stachowiak  <mjs@apple.com>
2784
2785         Reviewed by Mark.
2786
2787         - avoid static construction (and global variable access) in a smarter, more portable way,
2788         to later enable MUTLI_THREAD mode to work on other platforms and compilers.
2789         
2790         * bindings/js/JSCustomXPathNSResolver.cpp:
2791         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2792         * bindings/js/JSHTMLInputElementBase.cpp:
2793         (WebCore::JSHTMLInputElementBaseFunction::JSHTMLInputElementBaseFunction):
2794         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2795         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
2796         * bindings/js/JSXMLHttpRequest.cpp:
2797         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
2798         * bindings/js/JSXSLTProcessor.cpp:
2799         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
2800         * bindings/js/kjs_dom.cpp:
2801         (KJS::DOMNamedNodeMap::getOwnPropertySlot):
2802         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
2803         * bindings/js/kjs_events.cpp:
2804         (KJS::JSAbstractEventListener::handleEvent):
2805         * bindings/js/kjs_html.cpp:
2806         (KJS::HTMLElementFunction::HTMLElementFunction):
2807         (KJS::JSHTMLCollection::getOwnPropertySlot):
2808         * bindings/js/kjs_window.cpp:
2809         (KJS::ScheduledAction::execute):
2810         * bindings/objc/WebScriptObject.mm:
2811         * bindings/scripts/CodeGeneratorJS.pm:
2812
2813 2007-03-18  Andrew Wellington  <proton@wiretapped.net>
2814
2815         Reviewed by Mark Rowe
2816
2817         Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
2818
2819         * WebCore.xcodeproj/project.pbxproj:
2820
2821 2007-03-18  David Hyatt  <hyatt@apple.com>
2822
2823         Fix for REGRESSION bug 13108, frame borders being painted when they shouldn't be.  Rework both frame borders
2824         and resizing to be more like other browsers.
2825
2826         Reviewed by ggaren
2827
2828         fast/frames/no-frame-borders.html
2829
2830         * html/HTMLFrameElement.cpp:
2831         (WebCore::HTMLFrameElement::HTMLFrameElement):
2832         (WebCore::HTMLFrameElement::attach):
2833         (WebCore::HTMLFrameElement::parseMappedAttribute):
2834         * html/HTMLFrameElement.h:
2835         (WebCore::HTMLFrameElement::hasFrameBorder):
2836         * html/HTMLFrameElementBase.cpp:
2837         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2838         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
2839         * html/HTMLFrameElementBase.h:
2840         * html/HTMLFrameSetElement.cpp:
2841         (WebCore::HTMLFrameSetElement::attach):
2842         * html/HTMLFrameSetElement.h:
2843         (WebCore::HTMLFrameSetElement::hasFrameBorder):
2844         * html/HTMLIFrameElement.cpp:
2845         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2846         * rendering/RenderFrame.cpp:
2847         (WebCore::RenderFrame::edgeInfo):
2848         * rendering/RenderFrame.h:
2849         * rendering/RenderFrameSet.cpp:
2850         (WebCore::RenderFrameSet::paint):
2851         (WebCore::RenderFrameSet::GridAxis::resize):
2852         (WebCore::RenderFrameSet::fillFromEdgeInfo):
2853         (WebCore::RenderFrameSet::computeEdgeInfo):
2854         (WebCore::RenderFrameSet::edgeInfo):
2855         (WebCore::RenderFrameSet::layout):
2856         (WebCore::RenderFrameSet::startResizing):
2857         (WebCore::RenderFrameSet::continueResizing):
2858         (WebCore::RenderFrameSet::canResizeRow):
2859         (WebCore::RenderFrameSet::canResizeColumn):
2860         (WebCore::RenderFrameSet::splitPosition):
2861         (WebCore::RenderFrameSet::hitTestSplit):
2862         (WebCore::RenderFrameSet::dump):
2863         * rendering/RenderFrameSet.h:
2864         (WebCore::):
2865         (WebCore::FrameEdgeInfo::FrameEdgeInfo):
2866         (WebCore::FrameEdgeInfo::preventResize):
2867         (WebCore::FrameEdgeInfo::allowBorder):
2868         (WebCore::FrameEdgeInfo::setPreventResize):
2869         (WebCore::FrameEdgeInfo::setAllowBorder):
2870
2871 2007-03-19  Mark Rowe  <mrowe@apple.com>
2872
2873         Rubber-stamped by Brady.
2874
2875         Update references to bugzilla.opendarwin.org with bugs.webkit.org.
2876
2877         * ChangeLog:
2878         * WebCore.vcproj/WebCore/build-generated-files.sh:
2879         * manual-tests/ATSU-bad-layout.html:
2880         * manual-tests/accidental-strict-mode.html:
2881         * manual-tests/applet-param-no-name.html:
2882         * manual-tests/bidi-parens.html:
2883         * manual-tests/bugzilla-3855.html:
2884         * manual-tests/bugzilla-4840.html:
2885         * manual-tests/bugzilla-6821.html:
2886         * manual-tests/containing-block-position-chage.html:
2887         * manual-tests/contenteditable-link.html:
2888         * manual-tests/css3-cursor-fallback-quirks.html:
2889         * manual-tests/css3-cursor-fallback-strict.html:
2890         * manual-tests/custom-cursors.html:
2891         * manual-tests/dictionary-scrolled-iframe.html:
2892         * manual-tests/dom-manipulation-on-resize.html:
2893         * manual-tests/drag-image-to-address-bar.html:
2894         * manual-tests/empty-link-target.html:
2895         * manual-tests/empty-title-popup.html:
2896         * manual-tests/first-line-style-crash.html:
2897         * manual-tests/invalid-mouse-event.html:
2898         * manual-tests/left-overflow-repaint.html:
2899         * manual-tests/linkjump-3.html:
2900         * manual-tests/log-keypress-events.html:
2901         * manual-tests/named-window-blank-target.html:
2902         * manual-tests/plain-text-paste.html:
2903         * manual-tests/plugin-controller-datasource.html:
2904         * manual-tests/pre-tab-selection-rect.html:
2905         * manual-tests/redirection-target.html:
2906         * manual-tests/redraw-page-cache-visited-links.html:
2907         * manual-tests/reset-initiatedDrag.html:
2908         * manual-tests/resources/named-window-blank-target-step2.html:
2909         * manual-tests/resources/named-window-blank-target-step3.html:
2910         * manual-tests/resources/named-window-blank-target-step4.html:
2911         * manual-tests/resources/redraw-page-cache-visited-links-2.html:
2912         * manual-tests/scrollbar-hittest.html:
2913         * manual-tests/scrollbar-hittest2.html:
2914         * manual-tests/subview-click-assertion.html:
2915         * manual-tests/tabbing-input-google.html:
2916         * manual-tests/text-field-autoscroll.html:
2917         * manual-tests/textarea-after-stylesheet-link.html:
2918         * manual-tests/textarea-focus.html:
2919         * manual-tests/whitespace-pre-affinity.html:
2920
2921 2007-03-18  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2922
2923         Not reviewed - gdk build fix.
2924
2925         * platform/gdk/ScrollViewGdk.cpp:
2926         (WebCore::ScrollView::update): add a stub
2927
2928 2007-03-18  Brady Eidson  <beidson@apple.com>
2929
2930         Reviewed by Hyatt
2931
2932         http://bugs.webkit.org/show_bug.cgi?id=13111
2933         When stopped a load before it completes, partial images become the 
2934         broken image icon
2935
2936         * loader/loader.cpp:
2937         (WebCore::Loader::didFail): Split off into a method that knows the 
2938           difference between failed and cancelled.  If a load is cancelled,
2939           don't call error() on the object - only remove it from the cache
2940         (WebCore::Loader::cancelRequests): Call didFail(loader, true)
2941         * loader/loader.h: Added didFail(SubresourceLoader*, bool cancelled)
2942
2943 2007-03-18  Mitz Pettel  <mitz@webkit.org>
2944
2945         Reviewed by Adele.
2946
2947         - fix http://bugs.webkit.org/show_bug.cgi?id=13101
2948           REGRESSION (NativeTextField): Specifying word-wrap:break-word makes text field wrap
2949
2950         Test: fast/forms/input-text-word-wrap.html
2951
2952         * rendering/RenderTextControl.cpp:
2953         (WebCore::RenderTextControl::createInnerTextStyle): Force the inner block to
2954         'word-wrap:normal'.
2955
2956 2007-03-18  Dan Waylonis  <waylonis@mac.com>
2957
2958         Reviewed by Tim Hatcher.
2959
2960         Fix http://bugs.webkit.org/show_bug.cgi?id=13005
2961         Bug 13005: WebScriptObject +throwException needs NULL check.
2962
2963         Add checking for NULL interpreter before throwing exception.
2964
2965         * bindings/objc/WebScriptObject.mm:
2966         (+[WebScriptObject throwException:]):
2967
2968 2007-03-18  Geoffrey Garen  <ggaren@apple.com>
2969
2970         Reviewed by Oliver Hunt.
2971         
2972         Fixed http://bugs.webkit.org/show_bug.cgi?id=13106
2973         REGRESSION: Incomplete document.all implementation breaks abtelectronics.com 
2974         (Style Change Through JavaScript Blanks Content)
2975         
2976         When indexing into collections, treat the empty string as an invalid argument,
2977         instead of the number 0.
2978
2979         * bindings/js/kjs_html.cpp:
2980         (KJS::JSHTMLCollection::getOwnPropertySlot):
2981         (KJS::JSHTMLCollection::callAsFunction):
2982         (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
2983
2984 2007-03-18  David Hyatt  <hyatt@apple.com>
2985
2986         Use fillRect instead of drawLine, since drawLine has some odd behavior (it's only used for borders).
2987
2988         Reviewed by aroben
2989
2990         * platform/graphics/IntRect.h:
2991         * rendering/RenderFrameSet.cpp:
2992         (WebCore::RenderFrameSet::paintColumnBorder):
2993         (WebCore::RenderFrameSet::paintRowBorder):
2994
2995 2007-03-18  David Hyatt  <hyatt@apple.com>
2996
2997         Change the frameborder color to be light gray for framesets.
2998
2999         Reviewed by aroben
3000
3001         * rendering/RenderFrameSet.cpp:
3002         (WebCore::borderFillColor):
3003         (WebCore::RenderFrameSet::paintColumnBorder):
3004         (WebCore::RenderFrameSet::paintRowBorder):
3005
3006 2007-03-18  David Hyatt  <hyatt@apple.com>
3007
3008         Make iframes work properly with frameborder="0".
3009
3010         Reviewed by aroben
3011
3012         * html/HTMLIFrameElement.cpp:
3013         (WebCore::HTMLIFrameElement::mapToEntry):
3014         (WebCore::HTMLIFrameElement::parseMappedAttribute):
3015
3016 2007-03-18  David Hyatt  <hyatt@apple.com>
3017
3018         Add a 2px border by default to <iframe>s for compatibility with other browsers.
3019
3020         Reviewed by aroben
3021
3022         * css/html4.css:
3023
3024 2007-03-18  David Hyatt  <hyatt@apple.com>
3025
3026         Move frame borders out of WebKit and into WebCore.
3027
3028         Reviewed by aroben, olliej
3029
3030         * bridge/mac/FrameViewMac.mm:
3031         * css/html4.css:
3032         * html/HTMLFrameSetElement.cpp:
3033         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3034         (WebCore::HTMLFrameSetElement::mapToEntry):
3035         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
3036         (WebCore::HTMLFrameSetElement::attach):
3037         * html/HTMLFrameSetElement.h:
3038         (WebCore::HTMLFrameSetElement::hasBorderColor):
3039         * page/FrameView.cpp:
3040         (WebCore::FrameViewPrivate::FrameViewPrivate):
3041         * page/FrameView.h:
3042         * page/mac/WebCoreFrameBridge.h:
3043         * platform/graphics/IntRect.h:
3044         (WebCore::IntRect::topLeft):
3045         (WebCore::IntRect::topRight):
3046         (WebCore::IntRect::bottomLeft):
3047         (WebCore::IntRect::bottomRight):
3048         * rendering/RenderFrame.cpp:
3049         (WebCore::RenderFrame::viewCleared):
3050         * rendering/RenderFrameSet.cpp:
3051         (WebCore::borderStartEdgeColor):
3052         (WebCore::borderEndEdgeColor):
3053         (WebCore::RenderFrameSet::paintColumnBorder):
3054         (WebCore::RenderFrameSet::paintRowBorder):
3055         (WebCore::RenderFrameSet::paint):
3056         * rendering/RenderFrameSet.h:
3057         * rendering/RenderPartObject.cpp:
3058         (WebCore::RenderPartObject::viewCleared):
3059         * rendering/RenderView.cpp:
3060         (WebCore::RenderView::repaintViewRectangle):
3061
3062 2007-03-17  David Hyatt  <hyatt@apple.com>
3063
3064         Make onload do an explicit paint when a top-level document is ready (to ensure that a first paint always
3065         happens before any timers set by the onload can fire).
3066
3067         Reviewed by aroben
3068
3069         * dom/Document.cpp:
3070         (WebCore::Document::implicitClose):
3071         * platform/ScrollView.h:
3072         * platform/mac/ScrollViewMac.mm:
3073         (WebCore::ScrollView::update):
3074
3075 2007-03-17  Dave Hyatt  <hyatt@apple.com>
3076
3077         Prevent starvation of user input and painting when processing timers.
3078         If we are already in the processing of a custom timer message, don't allow that
3079         processing to do another PostMessage.  Force SetTimer to be used instead.
3080       
3081         Reviewed by ggaren
3082
3083        * platform/win/SharedTimerWin.cpp:
3084         (WebCore::TimerWindowWndProc):
3085         (WebCore::setSharedTimerFireTime):
3086
3087 2007-03-17  Geoffrey Garen  <ggaren@apple.com>
3088
3089         Reviewed by Beth Dakin.
3090
3091         Fixed <rdar://problem/5070967> REGRESSION (r20211): Repro crash when 
3092         closing View Source window
3093         
3094         I award myself 0 points, and may God have mercy on my soul.
3095
3096         * bindings/js/kjs_proxy.cpp:
3097         (WebCore::KJSProxy::~KJSProxy):
3098
3099 2007-03-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3100
3101         Not reviewed - gdk build fix.
3102
3103         * platform/gdk/TemporaryLinkStubs.cpp:
3104         (Pasteboard::writeURL):
3105
3106 2007-03-17  David Hyatt  <hyatt@apple.com>
3107
3108         Fix tiny PLT regression.  Don't examine the border/background data for RenderImage when images change
3109         unless we actually have a border/background.
3110
3111         Reviewed by Brady
3112
3113         * rendering/RenderImage.cpp:
3114         (WebCore::RenderImage::imageChanged):
3115
3116 2007-03-17  Nikolas Zimmermann  <zimmermann@kde.org>
3117
3118         Reviewed by Sam Weinig.
3119
3120         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13046 (CSS styles on hover and focus are broken for <use>)
3121         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> CSS styles broken)
3122         Added test: svg/custom/use-css-events.svg
3123
3124         In general this fixes the peepo.co.uk website.
3125
3126         Forgot to pass the actual StyleChange to the recalcStyle() function,
3127         when calling it on the shadow tree root element.
3128
3129         * ksvg2/svg/SVGUseElement.cpp:
3130         (WebCore::SVGUseElement::recalcStyle):
3131
3132 2007-03-17  Timothy Hatcher  <timothy@apple.com>
3133
3134         Reviewed by Mark Rowe.
3135
3136         Made Version.xcconfig smarter when building for different configurations.
3137         Now uses the 522+ OpenSource version for Debug and Release, while using the
3138         full 522.4 version for Production builds. The system prefix is also computed
3139         based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.
3140
3141         * Configurations/Version.xcconfig:
3142         * Configurations/WebCore.xcconfig:
3143
3144 2007-03-17  Antti Koivisto  <antti@apple.com>
3145
3146         Reviewed by Adele.
3147
3148         Fix http://bugs.webkit.org/show_bug.cgi?id=12595
3149         REGRESSION: Can't add item to cart at lnt.com (JS type error)
3150         <rdar://problem/4722863>
3151         
3152         Emulate Firefox behavior where form elements accessed by a name
3153         can be accessed with that name later even if the name changes or
3154         even if element is removed from the document.
3155         
3156         This is loosely based on Darin's earlier patch for the same problem but
3157         is much less expansive. It takes somewhat different approach to more closely
3158         mimic Firefox behavior. Includes expanded test case.
3159
3160         * bindings/js/JSHTMLFormElementCustom.cpp:
3161         (WebCore::JSHTMLFormElement::canGetItemsForName):
3162             Use new the HTMLFormElement::getNamedElements() method
3163         (WebCore::JSHTMLFormElement::nameGetter):
3164             Use new the HTMLFormElement::getNamedElements() method
3165         * html/HTMLFormElement.cpp:
3166         (WebCore::HTMLFormElement::HTMLFormElement):
3167         (WebCore::HTMLFormElement::~HTMLFormElement):
3168         (WebCore::HTMLFormElement::elementForAlias):
3169         (WebCore::HTMLFormElement::addElementAlias):
3170             Maintain a map of known element aliases
3171         (WebCore::HTMLFormElement::getNamedElements):
3172             Get a list of elements matching the name, based both their
3173             current names and known aliases (earlier names).
3174             Keep the alias list in sync.
3175         * html/HTMLFormElement.h:
3176
3177 2007-03-17  Adele Peterson  <adele@apple.com>
3178
3179         Reviewed by Hyatt.
3180
3181         Fix for <rdar://problem/4990050> REGRESSION: onchange gets fired when clicking on a programmatically selected element in a listbox
3182         http://bugs.webkit.org/show_bug.cgi?id=12725
3183
3184         Test: updated fast/forms/listbox-onchange.html
3185
3186         Added HTMLSelectElement::saveLastSelection that is called before changing a selection that could result
3187         in onChange being called.  m_lastOnChangeIndex and m_lastOnChangeSelection no longer have to be up-to date all the time, 
3188         they just have to be up-to-date before we execute an action that may trigger onChange.
3189
3190         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setSelectedState): Added.
3191           The HTMLSelectElement will only set an option's selected state with this method.  This ensures
3192           that notifyOptionSelected won't get called when the call originates from the select element.
3193         * html/HTMLOptionElement.h:
3194
3195         * html/HTMLSelectElement.cpp:
3196         (WebCore::HTMLSelectElement::deselectItems): Calls setSelectedState.
3197         (WebCore::HTMLSelectElement::setSelectedIndex): ditto. Don't update the last selection variables here.  Scroll to the new selection.
3198          The scrolling call used to only be in notifyOptionSelected.  There's no reason we shouldn't scroll when the selection is set through
3199          the HTMLSelectElement.
3200         (WebCore::HTMLSelectElement::setValue): Call setSelectedIndex to update all options selected state.
3201         (WebCore::HTMLSelectElement::restoreState): Call setSelectedState.
3202         (WebCore::HTMLSelectElement::selectAll): Call saveLastSelection before making the selection, and calling onChange.
3203         (WebCore::HTMLSelectElement::recalcListItems): Call setSelectedState.  Don't need to save selection here anymore, 
3204          since it will get saved before we call onChange.
3205         (WebCore::HTMLSelectElement::reset): ditto.
3206         (WebCore::HTMLSelectElement::dispatchFocusEvent): Added. Call saveLastSelection for menu lists, since onChange can be fired
3207          on blur.
3208         (WebCore::HTMLSelectElement::dispatchBlurEvent): Call menuListOnChange.
3209         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Call saveLastSelection before showing the popup window.
3210         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):  Call saveLastSelection during mousedown (to prepare for an 
3211          onchange during mouseup, or after autoscroll).
3212         (WebCore::HTMLSelectElement::updateListBoxSelection): Call setSelectedState.
3213
3214         (WebCore::HTMLSelectElement::menuListOnChange): Added. Compares the m_lastOnChangeIndex to the selectedIndex().
3215         (WebCore::HTMLSelectElement::listBoxOnChange): Move the m_lastOnChangeSelection creation to saveLastSelection.
3216         (WebCore::HTMLSelectElement::saveLastSelection): Added. Sets m_lastOnChangeIndex or m_lastOnChangeSelection.
3217         * html/HTMLSelectElement.h:
3218         * platform/PopupMenu.h:
3219
3220 2007-03-16  Oliver Hunt  <oliver@apple.com>
3221
3222         Reviewed by Hyatt.
3223
3224         The old canSaveAsWebArchive call was necessary as stand alone
3225         images used to be rendered by ImageDocument.
3226
3227         Fixes rdar://problem/5061252
3228
3229         * dom/Clipboard.cpp:
3230         * dom/Clipboard.h:
3231         (WebCore::Clipboard::setDragHasStarted):
3232         * page/DragClient.h:
3233         (WebCore::DragClient::declareAndWriteDragImage):
3234         * platform/mac/ClipboardMac.mm:
3235         (WebCore::ClipboardMac::declareAndWriteDragImage):
3236
3237 2007-03-16  Anders Carlsson  <acarlsson@apple.com>
3238
3239         Reviewed by Maciej.
3240
3241         <rdar://problem/4869095>
3242         default content type changed for XMLHttpRequest POSTs changed (breaks Flickrator 0.1 widget)
3243         
3244         * xml/xmlhttprequest.cpp:
3245         (WebCore::XMLHttpRequest::send):
3246
3247 2007-03-16  Brady Eidson  <beidson@apple.com>
3248
3249         Rubberstamped by Tim Hatcher
3250
3251         Update the hash table header for Window object properties
3252
3253         * bindings/js/kjs_window.cpp:
3254
3255 2007-03-16  Brady Eidson  <beidson@apple.com>
3256
3257         Reviewed by Anders
3258
3259         <rdar://problem/5061826> and
3260         http://bugs.webkit.org/show_bug.cgi?id=12863
3261         Implement window.stop()
3262
3263         * bindings/js/kjs_window.cpp:
3264         (KJS::WindowFunc::callAsFunction): Add case Window::Stop
3265         * bindings/js/kjs_window.h:
3266         (KJS::Window::): Add "Stop"
3267
3268 2007-03-16  Geoffrey Garen  <ggaren@apple.com>
3269
3270         Reviewed by Brady Eidson.
3271
3272         Fixed dir creation to account for already existing dirs and missing leading
3273         dirs in path.
3274         
3275         * loader/icon/IconDatabase.cpp:
3276         (WebCore::makeAllDirectories):
3277
3278 2007-03-16  David Hyatt  <hyatt@apple.com>
3279
3280         Fix for 13084, assertion failure in the Cache.  Convert the client list
3281         to a HashCountedSet so that multiple refs and derefs are allowed.
3282
3283         Fix RenderImage so that if it has the same image used as a background/border
3284         and as the foreground that it will repaint properly (can be tested using
3285         border-image and a foreground image).
3286
3287         Optimize list marker so that it doesn't waste time in the base class method,
3288         since list markers don't support background or border images.
3289
3290         Reviewed by andersca
3291
3292         * ChangeLog:
3293         * loader/CachedResource.cpp:
3294         (WebCore::CachedResource::ref):
3295         * loader/CachedResource.h:
3296         * loader/CachedResourceClientWalker.cpp:
3297         (WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
3298         * loader/CachedResourceClientWalker.h:
3299         * rendering/RenderImage.cpp:
3300         (WebCore::RenderImage::imageChanged):
3301         * rendering/RenderListMarker.cpp:
3302         (WebCore::RenderListMarker::imageChanged):
3303
3304 2007-03-16  Geoffrey Garen  <ggaren@apple.com>
3305
3306         Reviewed by Anders Carlsson.
3307         
3308         Fixed <rdar://problem/5065399> REGRESSION: leaks in Frame::bindingRootObject 
3309         seen on buildbot
3310
3311         The problem was that we were initializing the same WebScriptObject twice.
3312         This caused it to leak its original set of ivars.
3313         
3314         I think some refactoring could prevent this situation from arising in the
3315         first place, but I'm just adding a check at the call site for now, to do 
3316         the simplest thing.
3317
3318         * bindings/objc/WebScriptObject.mm:
3319         (-[WebScriptObject _setImp:originRootObject:rootObject:]): Added ASSERTs
3320         against multiple calls.
3321
3322         * bindings/objc/WebScriptObjectPrivate.h: Renamed _initializeWithObjectImp
3323         to setImp because "init" vs "initialize" was a too subtle indication that
3324         one was a Cocoa initializer and one was not.
3325
3326 2007-03-16  Lars Knoll <lars@trolltech.com>
3327
3328         don't use #import in .cpp files.
3329
3330         * editing/qt/EditorQt.cpp:
3331
3332 2007-03-16  Lars Knoll <lars@trolltech.com>
3333
3334         Fix the Qt build once again.
3335
3336         * platform/qt/PasteboardQt.cpp:
3337         (WebCore::Pasteboard::Pasteboard):
3338         (WebCore::Pasteboard::writeSelection):
3339         (WebCore::Pasteboard::plainText):
3340         (WebCore::Pasteboard::documentFragment):
3341         (WebCore::Pasteboard::writeURL):
3342         (WebCore::Pasteboard::writeImage):
3343         (WebCore::Pasteboard::clear):
3344
3345 2007-03-15  Shrikant Gangoda  <shrikant.gangoda@celunite.com>
3346
3347         Gdk build fix.
3348
3349         * loader/gdk/FrameLoaderClientGdk.cpp:
3350         (WebCore::FrameLoaderClientGdk::blockedError):
3351         * loader/gdk/FrameLoaderClientGdk.h:
3352
3353 2007-03-15  Beth Dakin  <bdakin@apple.com>
3354
3355         Reviewed by Geoff.
3356
3357         Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
3358         (r19761-19779): Copy image no longer includes image address 
3359         (rdar://5067927)
3360
3361         writeURL() does not need an isImage parameter. Now that it accepts 
3362         the types as a parameter, we can just declare the appropriate image 
3363         types within writeImage and send them to writeURL(). Also, 
3364         declaring the types twice is what broke this.
3365
3366         * platform/Pasteboard.h:
3367         * platform/mac/PasteboardMac.mm:
3368         (WebCore::Pasteboard::writeURL):
3369         (WebCore::Pasteboard::writeImage):
3370
3371 2007-03-15  Adele Peterson  <adele@apple.com>
3372
3373         Reviewed by Kevin Decker.
3374
3375         Fix for <rdar://problem/4926179> Text in menulist control should never update if menu is open
3376
3377         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
3378           Only setTextFromOption if the menu isn't visible.
3379
3380 2007-03-15  Brady Eidson  <beidson@apple.com>
3381
3382         Reviewed by Oliver
3383
3384         A few platform specific tweaks
3385
3386         * platform/cf/RetainPtr.h:
3387         (WebCore::RetainPtr::releaseRef): Fixed releaseRef to work with CF
3388         
3389         * platform/network/ResourceHandle.h: Added a "releaseRef" style call
3390
3391 2007-03-15  Maciej Stachowiak  <mjs@apple.com>
3392
3393         Reviewed by Geoff and Steve.
3394
3395         * config.h: Remove unneeded hack.
3396
3397 2007-03-15  Justin Garcia  <justin.garcia@apple.com>
3398
3399         Reviewed by john
3400         
3401         <rdar://problem/5062376> 
3402         REGRESSION: In Mail and Gmail, can't change alignment to text after it has been applied
3403         
3404         Bring back the remove step in applyBlockStyle.  It's 
3405         necessary because addBlockStyleIfNeeded assumes that 
3406         the properties it adds aren't already on the block that 
3407         it adds them to.
3408
3409         * editing/ApplyStyleCommand.cpp:
3410         (WebCore::ApplyStyleCommand::applyBlockStyle): 
3411         Bring back the remove step (added a testcase).
3412         Don't do the add step if m_removeOnly is true (no testcase
3413         because there aren't any clients using removeOnly functionality
3414         to remove styles yet, only styled elemets).
3415         Moved the code for creating new blocks up one level
3416         to this function so that we can pass blocks to removeCSSStyle.
3417         When converting VisiblePositions to indices and vice versa,
3418         use the highest node in the shadow tree if we're in one as
3419         the scope (working on a testcase).
3420         (WebCore::ApplyStyleCommand::addBlockStyle): Moved code to
3421         applyBlockStyle.
3422         * editing/ApplyStyleCommand.h: 
3423
3424 2007-03-15  Brady Eidson  <beidson@apple.com>
3425
3426         Reviewed by Maciej
3427
3428         <rdar://problem/4429701>
3429         Implements a port blocking black list that matches Firefox's
3430
3431         * loader/FrameLoader.cpp:
3432         (WebCore::FrameLoader::blockedError): Call through to the client for blockedError 
3433         * loader/FrameLoader.h:
3434
3435         * loader/FrameLoaderClient.h: Get the "port blocked" error for the current platform
3436
3437         * loader/ResourceLoader.cpp:
3438         (WebCore::ResourceLoader::wasBlocked): ResourceHandleClient method to pass on the didFail(error)
3439         (WebCore::ResourceLoader::blockedError): Following the pattern of "CancelledError()", get the 
3440           error to fail with for the didFail() call
3441         * loader/ResourceLoader.h:
3442
3443         * platform/graphics/svg/SVGImageEmptyClients.h:
3444         (WebCore::SVGEmptyFrameLoaderClient::blockedError): Added stub
3445
3446         * platform/network/ResourceHandle.cpp:
3447         (WebCore::ResourceHandle::create): If the port is blocked, create the handle but schedule it for
3448           deferred failure on a timer
3449         (WebCore::ResourceHandle::scheduleBlockedFailure): Do the timer scheduling
3450         (WebCore::ResourceHandle::fireBlockedFailure): Fire the timer here
3451         (WebCore::ResourceHandle::portAllowed): Implements checking of Mozilla's
3452         * platform/network/ResourceHandle.h:
3453         * platform/network/ResourceHandleClient.h:
3454         (WebCore::ResourceHandleClient::wasBlocked): Virtual for clients to get the "blocked" message
3455
3456 2007-03-15  Beth Dakin  <bdakin@apple.com>
3457
3458         Reviewed by Hyatt.
3459
3460         Fix for <rdar://problem/5065396> REGRESSION: leaks in 
3461         RenderBlock::layoutInlineChildren seen on buildbot
3462
3463         This leak appeared after http://trac.webkit.org/projects/webkit/
3464         changeset/20188. This change shifted line boxes around in 
3465         removeChild(). But since removeChild() calls 
3466         setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be 
3467         removed once we actually lay out anyway. So this patch fixes the 
3468         leak by deleting the line boxes instead of shifting them around. 
3469
3470         * editing/IndentOutdentCommand.cpp:
3471         (WebCore::IndentOutdentCommand::outdentParagraph): Call into 
3472         updateLayout(). This fixes an assertion I got in editing/
3473         execCommand/4976800.html This is very similar to the line box fix I 
3474         made recently (http://trac.webkit.org/projects/webkit/changeset/
3475         20177). We need to update layout before relying on VisiblePositions 
3476         after removing a node.
3477         * rendering/RenderBlock.cpp:
3478         (WebCore::RenderBlock::deleteLinesForBlock): New helper function 
3479         since this functionality is needed in three places now.
3480         (WebCore::RenderBlock::makeChildrenNonInline): Call into new 
3481         deleteLinesForBlock().
3482         (WebCore::RenderBlock::removeChild): Same.
3483         * rendering/RenderBlock.h:
3484
3485 2007-03-15  Timothy Hatcher  <timothy@apple.com>
3486
3487         Reviewed by John.
3488
3489         * Factored out most of our common build settings into .xcconfig files. Anything that was common in
3490           each build configuration was factored out into the shared .xcconfig file.
3491         * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
3492         * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
3493         * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).
3494
3495         * Configurations/Base.xcconfig: Added.
3496         * Configurations/DebugRelease.xcconfig: Added.
3497         * Configurations/Version.xcconfig: Added.
3498         * Configurations/WebCore.xcconfig: Added.
3499         * Info.plist:
3500         * WebCore.xcodeproj/project.pbxproj:
3501
3502 2007-03-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3503
3504         Not reviewed - gdk build fixes.
3505
3506         * platform/gdk/EditorClientGdk.cpp:
3507         (WebCore::EditorClientGdk::handleKeypress):
3508         * platform/graphics/cairo/ImageSourceCairo.cpp:
3509         (WebCore::ImageSource::setData):
3510         * platform/graphics/gdk/ImageGdk.cpp:
3511         (WebCore::Image::loadPlatformResource):
3512
3513 2007-03-14  Justin Garcia  <justin.garcia@apple.com>
3514
3515         Reviewed by john
3516         
3517         ~2x speed up of 5k rich text paste:
3518         http://shakespeare.mit.edu/hamlet/full.html        
3519
3520         * editing/ReplaceSelectionCommand.cpp:
3521         (WebCore::ReplaceSelectionCommand::doApply): Remove the top 
3522         level style span if it's unnecessary before inserting
3523         into the document, it's faster than doing it after.
3524         * editing/ReplaceSelectionCommand.h: Exposed 
3525         ReplacementFragment::removeNodePreservingChildren so that
3526         the style span can be removed using non-undoable removes,
3527         like the rest of the removes done on the ReplacementFragment.
3528         * editing/markup.cpp:
3529         (WebCore::createMarkup): Make the style span the top level
3530         element, otherwise it's useless.  This also facilitates the
3531         optimization mentioned above.
3532         When including markup for a fully selected root, include markup
3533         for all the nodes beneath that fully selected root, to preserve 
3534         the structure and appearance of the copied markup.  Did this
3535         by merging with the code for adding markup for descendants of
3536         special commonAncestorBlocks.
3537
3538 2007-03-15  Beth Dakin  <bdakin@apple.com>
3539
3540         Rubber-stamped by Adele.
3541
3542         Rolling out http://trac.webkit.org/projects/webkit/changeset/20148 
3543         (which is a fix for http://bugs.webkit.org/show_bug.cgi?id=12595 
3544         and rdar://4722863) because it causes a horrible memory-trasher. 
3545
3546         * bindings/js/JSHTMLFormElementCustom.cpp:
3547         (WebCore::JSHTMLFormElement::canGetItemsForName):
3548         (WebCore::JSHTMLFormElement::nameGetter):
3549         * bindings/js/kjs_dom.cpp:
3550         (KJS::):
3551         (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
3552         (KJS::DOMNamedNodesCollection::lengthGetter):
3553         (KJS::DOMNamedNodesCollection::indexGetter):
3554         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
3555         * bindings/js/kjs_dom.h:
3556         (KJS::DOMNamedNodesCollection::classInfo):
3557         * bindings/js/kjs_html.cpp:
3558         (KJS::JSHTMLCollection::getNamedItems):
3559         * dom/ChildNodeList.cpp:
3560         (WebCore::ChildNodeList::ChildNodeList):
3561         (WebCore::ChildNodeList::length):
3562         (WebCore::ChildNodeList::item):
3563         (WebCore::ChildNodeList::nodeMatches):
3564         * dom/ChildNodeList.h:
3565         * dom/NameNodeList.cpp:
3566         (WebCore::NameNodeList::NameNodeList):
3567         (WebCore::NameNodeList::item):
3568         (WebCore::NameNodeList::nodeMatches):
3569         * dom/NameNodeList.h:
3570         (WebCore::NameNodeList::rootNodeAttributeChanged):
3571         * dom/Node.cpp:
3572         (WebCore::TagNodeList::TagNodeList):
3573         (WebCore::TagNodeList::nodeMatches):
3574         (WebCore::Node::registerNodeList):
3575         (WebCore::Node::unregisterNodeList):
3576         * dom/Node.h:
3577         * dom/NodeList.cpp:
3578         (WebCore::NodeList::NodeList):
3579         (WebCore::NodeList::~NodeList):
3580         (WebCore::NodeList::recursiveLength):
3581         (WebCore::NodeList::itemForwardsFromCurrent):
3582         (WebCore::NodeList::itemBackwardsFromCurrent):
3583         (WebCore::NodeList::recursiveItem):
3584         (WebCore::NodeList::itemWithName):