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