- another attempt to fix the Windows build
[WebKit-https.git] / WebCore / ChangeLog
1 2006-05-09  Darin Adler  <darin@apple.com>
2
3         - another attempt to fix the Windows build
4
5         * bindings/js/kjs_window.cpp: (KJS::isSeparator): Take a UChar, not a KJS::UChar.
6         * bridge/win/FrameWin.cpp:
7         (WebCore::FrameWin::runJavaScriptAlert): Use UChar instead of QChar.
8         (WebCore::FrameWin::runJavaScriptConfirm): Ditto.
9         * editing/TextIterator.h: Include DeprecatedString.h.
10
11 2006-05-09  Darin Adler  <darin@apple.com>
12
13         Reviewed by Hyatt.
14
15         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8781
16           REGRESSION: image maps with "poly" areas, including one at lisp.geek.nz, don't work
17
18         * html/html_imageimpl.cpp: (WebCore::HTMLAreaElement::getRegion): Remove extra Path
19         definition that was shadowing the real one.
20
21 2006-05-09  Darin Adler  <darin@apple.com>
22
23         - fix build
24
25         * rendering/render_style.cpp: (WebCore::RenderStyle::getPseudoStyle):
26         Fix a typo.
27
28         - attempt to fix Windows build
29
30         * css/maketokenizer: Use UChar instead of unsigned short.
31         * platform/win/FontWin.cpp:
32         (WebCore::getFontData): Removed cast to QChar.
33         (WebCore::hackishExtentForString): Use UChar.
34         (WebCore::Font::floatWidth): Use UChar.
35         (WebCore::Font::drawText): Use UChar.
36         (WebCore::Font::drawHighlightForText): Use UChar.
37         (WebCore::Font::selectionRectForText): Use UChar.
38         (WebCore::Font::checkSelectionPoint): Use UChar.
39         * platform/win/KeyEventWin.cpp:
40         (WebCore::singleCharacterString): Added.
41         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Use above function.
42         * platform/win/TemporaryLinkStubs.cpp:
43         (WebCore::findNextSentenceFromIndex): Use UChar.
44         (WebCore::findSentenceBoundary): Use UChar.
45         (WebCore::findNextWordFromIndex): Use UChar.
46         (WebCore::findWordBoundary): Use UChar.
47         * platform/win/TransferJobWin.cpp:
48         (WebCore::TransferJob::start): Use a different String constructor.
49         * rendering/RenderTable.h: Added an include of DeprecatedArray.h.
50         * rendering/RenderText.cpp: Added an include of DeprecatedString.h.
51         * rendering/render_list.h: Ditto.
52
53 2006-05-09  Darin Adler  <darin@apple.com>
54
55         Rubber stamped by Hyatt.
56
57         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8782
58           use ICU and UChar more, QChar less
59
60         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6310
61           text-transform: uppercase/lowercase don't handle cases one character becomes two
62
63         Test: fast/css/case-transform.html
64
65         By using ICU more, this fixes some bugs in a few places.
66
67         * bindings/js/JSXMLSerializer.cpp:
68         * css/css_valueimpl.h:
69         * kwq/KWQTextStream.cpp:
70         * loader/CachedObject.h:
71         * platform/Color.cpp:
72         Add includes of DeprecatedString.h as needed, now that StringImpl.h no longer
73         includes it.
74
75         * bindings/js/kjs_css.cpp: (KJS::cssPropertyName):
76         Eliminate use of QChar::latin1() in a case where it's not helpful.
77
78         * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate):
79         Use characters() function instead of the old unicode() function.
80
81         * bindings/js/kjs_window.cpp: (KJS::isSeparator):
82         Use UChar instead of QChar.
83
84         * bindings/objc/DOMInternal.mm:
85         (StringImpl::operator NSString*): Remove typecast that's no longer needed.
86         (String::String): Ditto. Also use Vector for local buffer to make code read simpler.
87
88         * bridge/mac/FrameMac.mm:
89         (WebCore::selectorForKeyEvent): Remove call to unicode() function, no longer needed.
90         (WebCore::FrameMac::setTitle): Remove QChar cast, no longer needed.
91         (WebCore::FrameMac::setStatusBarText): Ditto.
92         (WebCore::FrameMac::advanceToNextMisspelling): Use UChar instead of QChar.
93         (WebCore::FrameMac::runJavaScriptAlert): Remove QChar cast, no longer needed.
94         (WebCore::FrameMac::runJavaScriptConfirm): Ditto.
95         (WebCore::FrameMac::runJavaScriptPrompt): Ditto.
96         (WebCore::FrameMac::attributedString): Replaces calls of QChar::direction() with
97         calls to u_charDirection and use ICU constants instead of QChar ones.
98         (WebCore::FrameMac::markMisspellings): Remove QChar cast, no longer needed. Added a
99         QChar cast so we can call isSpace -- slated to be removed later.
100         (WebCore::FrameMac::shouldClose): Remove QChar cast, no longer needed.
101
102         * bridge/mac/WebCoreFrameBridge.mm:
103         (-[WebCoreFrameBridge selectedString]): Remove QChar cast, no longer needed.
104         (-[WebCoreFrameBridge stringForRange:]): Ditto.
105
106         * css/CSSGrammar.y: Update for field name change from string to characters.
107         Use UChar instead of unsigned short. 
108
109         * css/css_valueimpl.cpp:
110         (WebCore::propertyID): Use UChar instead of unsigned short and get rid of call to
111         unicode() function, no longer needed.
112         (WebCore::quoteStringIfNeeded): Use strings when building up a resulting string,
113         instead of depending on the feature where you can append characters to a string.
114
115         * css/csshelper.cpp: (WebCore::parseURL): Remove calls to unicode() function and
116         rewrite to obviate the need to call lower() just to check for a few constant
117         character values. Also remove a now-unneeded type cast.
118
119         * css/cssparser.h: Changed ParseString field to use UChar and to be named characters
120         instead of string. Changed many other fields to be UChar instead of unsigned short.
121         (WebCore::domString): Update for that.
122         (WebCore::atomicString): Ditto.
123         * css/cssparser.cpp:
124         (WebCore::ParseString::lower): Use u_tolower instead of QChar::lower(). Also change
125         name to characters from string.
126         (WebCore::CSSParser::setupParser): Use UChar instead of unsigned short.
127         (WebCore::CSSParser::lex): Ditto. Also update for characters name change.
128         (WebCore::CSSParser::text): Use UChar instead of unsigned short. Also tweak some
129         of the code a little bit to handle a couple of overflow cases better and reduce
130         type casting.
131         (WebCore::deprecatedString): Moved here so we don't have to include DeprecatedString.h
132         in the header file.
133
134         * css/cssstyleselector.cpp: (WebCore::checkPseudoState): Added a type cast since this
135         code now bridges the world between modern code and QChar/DeprecatedString.
136
137         * dom/CharacterData.cpp: (WebCore::CharacterData::CharacterData): Changed QChar to UChar.
138
139         * dom/Document.h:
140         * dom/Document.cpp:
141         (WebCore::Document::isValidName): Updated for name change from unicode to characters.
142         (WebCore::Document::parseQualifiedName): Ditto.
143         (WebCore::Document::backslashAsCurrencySymbol): Changed return type to UChar.
144
145         * dom/NamedMappedAttrMap.cpp:
146         (WebCore::isClassWhitespace): Changed parameter to UChar from QChar.
147         (WebCore::NamedMappedAttrMap::parseClassAttribute): Changed from UChar to QChar and
148         from unicode to characters.
149
150         * dom/Position.cpp:
151         (WebCore::Position::leadingWhitespacePosition): Changed from QChar to UChar.
152         (WebCore::Position::trailingWhitespacePosition): Ditto.
153
154         * dom/StyledElement.cpp:
155         (WebCore::isClassWhitespace): Changed from QChar to UChar.
156         (WebCore::StyledElement::addCSSLength): Changed from QChar to UChar, and remove one
157         case where latin1() was used and was not helpful.
158         (WebCore::StyledElement::addCSSColor): Removed unicode() function call, no longer needed.
159
160         * dom/dom2_eventsimpl.cpp: (WebCore::KeyboardEvent::charCode):
161         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::constrainValue):
162         Removed unicode() function call, no longer needed.
163
164         * dom/xml_tokenizer.h: Removed default parameter for xmlDocPtrForString so we don't have
165         to include the DeprecatedString.h header in this file (and since no one uses it).
166
167         * editing/HTMLInterchange.cpp: (convertHTMLTextToInterchangeFormat): Added a couple calls
168         to the unicode() function to bridge the gap from QChar/DeprecatedString back to modern
169         code.
170
171         * editing/InsertTextCommand.cpp: Removed unused function.
172
173         * editing/TextIterator.h: Changed from QChar to UChar.
174         * editing/TextIterator.cpp:
175         (WebCore::TextIterator::TextIterator): Initialize m_lastCharacter since it's now a UChar
176         (which is just a typedef) rather than a QChar (which was a class with a default value of 0).
177         (WebCore::TextIterator::handleTextNode): Updated to use characters() instead of unicode().
178         (WebCore::TextIterator::handleTextBox): Removed unicode() call since it's now a UChar instead
179         of a QChar.
180         (WebCore::TextIterator::emitCharacter): More of the same.
181         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Ditto.
182         (WebCore::SimplifiedBackwardsTextIterator::emitCharacter): Ditto.
183         (WebCore::CharacterIterator::string): Ditto.
184         (WebCore::WordAwareIterator::advance): Ditto.
185         (WebCore::WordAwareIterator::length): Ditto.
186         (WebCore::WordAwareIterator::characters): Ditto.
187         (WebCore::CircularSearchBuffer::CircularSearchBuffer): Changed to use UChar
188         instead of QChar, but also to use foldCase() instead of lower(), because
189         we want case folding here, not lowercasing.
190         (WebCore::CircularSearchBuffer::append): Ditto, with u_foldCase.
191         (WebCore::CircularSearchBuffer::isMatch): Ditto.
192         (WebCore::plainText): Added type cast since this bridges the gap from the modern stuff
193         to QChar/DeprecatedString.
194
195         * editing/VisiblePosition.h: Changed from QChar to UChar.
196         * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): Ditto.
197
198         * editing/markup.cpp: (WebCore::escapeTextForMarkup): Changed code that used latin1()
199         for no good reason to use unicode() instead.
200  
201         * html/HTMLTokenizer.h: Changed from QChar to UChar.
202         * html/HTMLTokenizer.cpp: Changed from QChar to UChar, including removing the
203         KHTML_ALLOC_QCHAR_VEC and KHTML_DELETE_QCHAR_VEC macros, which weren't being
204         used consistently anyway.
205         (WebCore::fixUpChar): More of the same.
206         (WebCore::tagMatch): Ditto.
207         (WebCore::HTMLTokenizer::reset): Ditto.
208         (WebCore::HTMLTokenizer::begin): Ditto. Also corrected anomaly where buffer
209         size was not the same as the size value -- this was only true in the initial
210         allocation, so I believe there was no value in it.
211         (WebCore::HTMLTokenizer::parseSpecial): Ditto. Also removed a use of latin1()
212         that was unnnecessary extra work.
213         (WebCore::HTMLTokenizer::scriptHandler): More of the same.
214         (WebCore::HTMLTokenizer::parseComment): Ditto.
215         (WebCore::HTMLTokenizer::parseServer): Ditto.
216         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto. Another unnecessary
217         use of latin1() removed.
218         (WebCore::HTMLTokenizer::parseText): Ditto.
219         (WebCore::HTMLTokenizer::parseEntity): Ditto. Changed hex-parsing code to handle
220         uppercase hex a more-efficient way than calling QChar::lower() on each character.
221         Also changed surrogate code logic to fix a couple things -- reject character codes
222         > 0x10FFFF as it should and use U16_LEAD and U16_TRAIL instead of writing our
223         own versions of these.
224         (WebCore::HTMLTokenizer::parseTag): Ditto.
225         (WebCore::HTMLTokenizer::write): Ditto.
226         (WebCore::HTMLTokenizer::end): Ditto.
227         (WebCore::HTMLTokenizer::finish): Ditto.
228         (WebCore::HTMLTokenizer::enlargeBuffer): Ditto.
229         (WebCore::HTMLTokenizer::enlargeScriptBuffer): Ditto.
230         (WebCore::HTMLTokenizer::notifyFinished):
231         (WebCore::decodeNamedEntity): Ditto.
232
233         * html/html_inlineimpl.cpp: (WebCore::parseFontSizeNumber): Changed from QChar
234         to UChar, including using u_isdigit and u_charDigitValue instead of QChar::isNumber
235         and QChar::digitValue. Also removed unneeded range checking that's already done
236         by WebCore::String.
237
238         * kwq/KWQLoader.mm: (KWQIsResponseURLEqualToURL): Rewrote to use Vector and UChar,
239         removing all the type casts and making the whole function much shorter.
240
241         * kwq/WebCoreAXObject.mm:
242         (AXAttributedStringAppendText): Use UChar instead of QChar.
243         (-[WebCoreAXObject doAXAttributedStringForTextMarkerRange:]): More of the same.
244
245         * loader/Cache.h: Remove unnecessary default parameters, preventing the need to
246         include the DeprecatedString.h header in this header. Cleaned up the header
247         structure a bit, removing some obsolete and redundant comments and fixing typos.
248         * loader/Cache.cpp: Removed unused preload functions.
249
250         * page/Frame.h:
251         * page/Frame.cpp:
252         (WebCore::UserStyleSheetLoader::UserStyleSheetLoader): Added explicit arguments.
253         This was the only caller anywhere that took advantage of the default parameter
254         values in one of the Cache class request functions.
255         (WebCore::Frame::backslashAsCurrencySymbol): Changed QChar to UChar.
256
257         * platform/AtomicString.h: Changed QChar to UChar. Removed constructor that makes
258         an AtomicString from a single character. Renamed unicode() function to characters().
259         Renamed KHTML_ATOMICSTRING_HIDE_GLOBALS to ATOMICSTRING_HIDE_GLOBALS.
260         * platform/AtomicString.cpp:
261         (WebCore::CStringTranslator::equal): Changed QChar to UChar.
262         (WebCore::operator==): Changed unicode() to characters().
263         (WebCore::UCharBufferTranslator::hash): More of the same.
264         (WebCore::UCharBufferTranslator::equal): Ditto.
265         (WebCore::UCharBufferTranslator::translate): Ditto.
266         (WebCore::AtomicString::add): Ditto.
267         (WebCore::AtomicString::operator Identifier): Ditto.
268         (WebCore::AtomicString::operator UString): Ditto.
269         (WebCore::AtomicString::AtomicString): Moved here so we don't need DeprecatedString.h
270         in the header.
271         (WebCore::AtomicString::deprecatedString): Ditto.
272
273         * platform/DeprecatedString.h: Removed QChar::Direction enum and all the DirXXX values,
274         isDigit, isLetter, isNumber, isLetterOrNumber, isPunct, digitValue, and direction functions.
275         (QChar::isSpace): Changed to use u_charDirection instead of QChar::direction.
276
277         * platform/Font.h: (WebCore::Font::width): Changed QChar to UChar.
278         * platform/Font.cpp: (WebCore::Font::width): Ditto.
279
280         * platform/GraphicsContext.h:
281         * platform/GraphicsContext.cpp:
282         (WebCore::GraphicsContext::drawText): Changed QChar to UChar. Removed horizontalAlignment
283         parameter from simplified string drawing entry point, since it's not used.
284         (WebCore::GraphicsContext::drawHighlightForText): Changed QChar to UChar.
285
286         * platform/PlatformString.h: Changed QChar to UChar. Removed constructor that makes
287         a String from a single character. Renamed unicode() function to characters(). Added
288         an append function and changed += operator to just call that. Added a foldCase() function.
289         Removed the concatenation operators that add individual strings before or after.
290         * platform/String.cpp:
291         (WebCore::String::String): Changed QChar to UChar.
292         (WebCore::String::append): Renamed from operator+= and removed the return value.
293         (WebCore::String::operator[]): Changed QChar to UChar.
294         (WebCore::String::foldCase): Added.
295         (WebCore::String::percentage): More of the same.
296         (WebCore::String::characters): Renamed from unicode().
297         (WebCore::String::deprecatedString): More of the same.
298         (WebCore::String::sprintf): Fixed mistakes in the comments.
299         (WebCore::String::isEmpty): Tweaked a bit.
300         (WebCore::operator==): More of the same.
301         (WebCore::String::operator Identifier): Ditto.
302         (WebCore::String::operator UString): Ditto.
303
304         * platform/SegmentedString.h: Changed from QChar to UChar. Had to initialize
305         data members that are now UChar.
306         * platform/SegmentedString.cpp:
307         (WebCore::SegmentedString::length): Updated for change from QChar to UChar.
308         (WebCore::SegmentedString::append): Ditto.
309         (WebCore::SegmentedString::prepend): Ditto.
310         (WebCore::SegmentedString::toString): Ditto.
311
312         * platform/StringHash.h: Updated to use UChar instead of QChar and for name changes.
313         Also changed to use case folding intead of lowercasing for case insensitive hashing.
314
315         * platform/StringImpl.h:
316         * platform/StringImpl.cpp:
317         (WebCore::newUCharVector): Changed to UChar from QChar.
318         (WebCore::deleteUCharVector): Ditto.
319         (WebCore::StringImpl::StringImpl): Ditto.
320         (WebCore::StringImpl::init): Ditto. Also renamed from initWithChar and initWithQChar.
321         (WebCore::StringImpl::~StringImpl): Ditto.
322         (WebCore::StringImpl::append): Ditto.
323         (WebCore::StringImpl::insert): Ditto.
324         (WebCore::StringImpl::truncate): Ditto.
325         (WebCore::StringImpl::remove): Ditto.
326         (WebCore::StringImpl::split): Ditto.
327         (WebCore::StringImpl::containsOnlyWhitespace): Ditto. Also added comment because this
328         function seems a little broken.
329         (WebCore::parseLength): More of the same.
330         (WebCore::StringImpl::toCoordsArray): Ditto.
331         (WebCore::StringImpl::toLengthArray): Ditto.
332         (WebCore::StringImpl::isLower): Ditto.
333         (WebCore::StringImpl::lower): Rewrote to use u_strToLower.
334         (WebCore::StringImpl::upper): Rewrote to use u_strToUpper.
335         (WebCore::StringImpl::foldCase): Added. Uses u_strFoldCase.
336         (WebCore::getWordBreakIterator): Changed to use U_FAILURE instead of accepting only
337         U_ZERO_ERROR as a success code.
338         (WebCore::StringImpl::capitalize): More QChar to UChar changes.
339         (WebCore::StringImpl::toInt): Ditto.
340         (WebCore::equal): Changed from QChar to UChar and was careful to preserve the old
341         semantics where "high ASCII" is treated as U+0080-U+00FF even though I don't know
342         if this feature is important.
343         (WebCore::equalIgnoringCase): Ditto, but used case folding instead of lowercasing
344         by using the u_foldCase and u_memcasecmp functions. Also renamed from
345         equalCaseInsensitive for more-consistent naming.
346         (WebCore::StringImpl::find): Ditto. Use case folding for the case insensitive branch.
347         (WebCore::StringImpl::replace): More of the same.
348         (WebCore::StringImpl::computeHash): Ditto.
349         (WebCore::StringImpl::ascii): Ditto.
350
351         * platform/TextBoundaries.h: Changed from QChar to UChar.
352         * platform/mac/TextBoundaries.mm:
353         (WebCore::findWordBoundary): Made the change to UChar and removed some type casts.
354         (WebCore::findNextWordFromIndex): Ditto.
355         (WebCore::findSentenceBoundary): Ditto.
356         (WebCore::findNextSentenceFromIndex): Ditto.
357
358         * platform/TextEncoding.h:
359         * platform/TextEncoding.cpp:
360         (WebCore::TextEncoding::backslashAsCurrencySymbol): Changed from QChar to UChar.
361         (WebCore::TextEncoding::fromUnicode): More of the same.
362         * platform/mac/TextEncodingMac.cpp: (WebCore::TextEncoding::fromUnicode): More
363         of the same.
364
365         * platform/mac/FontFamilyMac.mm: (WebCore::FontFamily::getNSFamily): Removed a
366         now-unneeded type cast.
367
368         * platform/mac/FontMac.mm:
369         (WebCore::Font::selectionRectForText):
370         (WebCore::Font::drawText):
371         (WebCore::Font::drawHighlightForText):
372         (WebCore::Font::floatWidth):
373         (WebCore::Font::checkSelectionPoint):
374         Changed QChar to UChar and removed some now-unneeded type casts.
375
376         * editing/RebalanceWhitespaceCommand.cpp: (WebCore::isWhitespace):
377         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
378         * editing/visible_units.cpp:
379         (WebCore::previousBoundary):
380         (WebCore::nextBoundary):
381         (WebCore::startWordBoundary):
382         (WebCore::endWordBoundary):
383         (WebCore::previousWordPositionBoundary):
384         (WebCore::nextWordPositionBoundary):
385         (WebCore::startSentenceBoundary):
386         (WebCore::endSentenceBoundary):
387         (WebCore::previousSentencePositionBoundary):
388         (WebCore::nextSentencePositionBoundary):
389         (WebCore::startOfParagraph):
390         (WebCore::endOfParagraph):
391         * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError):
392         * rendering/InlineTextBox.cpp:
393         (WebCore::InlineTextBox::selectionRect):
394         (WebCore::InlineTextBox::paint):
395         (WebCore::InlineTextBox::paintSelection):
396         (WebCore::InlineTextBox::paintMarkedTextBackground):
397         (WebCore::InlineTextBox::paintTextMatchMarker):
398         (WebCore::InlineTextBox::offsetForPosition):
399         (WebCore::InlineTextBox::positionForOffset):
400         * rendering/RenderBlock.cpp:
401         (WebCore::stripTrailingSpace):
402         (WebCore::RenderBlock::updateFirstLetter):
403         * rendering/RenderFlexibleBox.cpp:
404         (WebCore::RenderFlexibleBox::layoutVerticalBox):
405         * rendering/RenderObject.h:
406         * rendering/RenderObject.cpp:
407         (WebCore::RenderObject::backslashAsCurrencySymbol):
408         * rendering/RenderTreeAsText.cpp: (quoteAndEscapeNonPrintables):
409         * rendering/break_lines.cpp: (WebCore::nextBreakablePosition):
410         * rendering/break_lines.h: (WebCore::isBreakable):
411         * rendering/render_style.h: (WebCore::RenderStyle::isCollapsibleWhiteSpace):
412         * xml/XSLStyleSheet.cpp: (WebCore::XSLStyleSheet::parseString):
413         * xml/xmlhttprequest.cpp:
414         (WebCore::getMIMEType):
415         (WebCore::getCharset):
416         Changed QChar to UChar.
417
418         * rendering/RenderImage.cpp:
419         (WebCore::RenderImage::imageChanged): Changed QChar to UChar.
420         (WebCore::RenderImage::paint): Changed callers of drawText to no-longer pass 0
421         for the horizontal alignment, since I removed that parameters.
422
423         * rendering/RenderText.h: Changed QChar to UChar.
424         * rendering/RenderText.cpp:
425         (WebCore::characterBreakIterator): Update for name change.
426         (WebCore::RenderText::RenderText): Ditto.
427         (WebCore::RenderText::allAscii): Remove uneeded unicode() and allow the value
428         U+007F to count as ASCII.
429         (WebCore::RenderText::cacheWidths): Changed QChar to UChar.
430         (WebCore::RenderText::widthFromCache): Changed code that deals with direction to
431         use the ICU direction calls.
432         (WebCore::RenderText::trimmedMinMaxWidth): Changed QChar to UChar.
433         (WebCore::RenderText::calcMinMaxWidth): Ditto.
434         (WebCore::RenderText::containsOnlyWhitespace): Ditto.
435         (WebCore::RenderText::setText): Ditto.
436         (WebCore::RenderText::width): Ditto.
437
438         * rendering/RenderTextField.cpp:
439         (WebCore::RenderTextField::updateFromElement): Removed unneeded QChar cast.
440         (WebCore::RenderTextField::calcMinMaxWidth): Changed from QChar to UChar.
441
442         * rendering/bidi.h:
443         * rendering/bidi.cpp:
444         (WebCore::BidiIterator::BidiIterator):
445         (WebCore::BidiState::BidiState):
446         (WebCore::BidiContext::BidiContext):
447         (WebCore::bidiNext):
448         (WebCore::bidiFirst):
449         (WebCore::BidiIterator::current):
450         (WebCore::BidiIterator::direction):
451         (WebCore::addRun):
452         (WebCore::checkMidpoints):
453         (WebCore::appendRun):
454         (WebCore::embed):
455         (WebCore::RenderBlock::tabWidth):
456         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
457         (WebCore::RenderBlock::bidiReorderLine):
458         (WebCore::RenderBlock::layoutInlineChildren):
459         (WebCore::skipNonBreakingSpace):
460         (WebCore::RenderBlock::skipWhitespace):
461         (WebCore::RenderBlock::findNextLineBreak):
462         (WebCore::RenderBlock::checkLinesForTextOverflow):
463         Changed from QChar to UChar and all direction from QChar constants to the
464         ones from ICU.
465
466         * rendering/render_form.cpp:
467         (WebCore::RenderLineEdit::updateFromElement):
468         (WebCore::RenderSelect::updateFromElement):
469         (WebCore::RenderTextArea::updateFromElement):
470         (WebCore::RenderTextArea::text):
471         (WebCore::RenderTextArea::textWithHardLineBreaks):
472         Got rid of now-unneeded QChar type casts.
473
474         * rendering/render_line.cpp:
475         (WebCore::InlineFlowBox::placeBoxesHorizontally): Updated for change from QChar
476         to UChar.
477         (WebCore::EllipsisBox::paint): Updated for unicode() -> characters() name change.
478
479         * rendering/render_list.cpp:
480         (WebCore::toRoman): Updated from QChar to UChar.
481         (WebCore::toLetterString): Ditto.
482         (WebCore::toHebrew): More of the same, also cleaned up the logic a bit.
483         (WebCore::RenderListMarker::paint): Removed the alignment parameters from the
484         various functions. Also removed all reliance on the width-measuring functions
485         that take a string.
486         (WebCore::RenderListMarker::calcMinMaxWidth): More of the same.
487         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
488
489 2006-05-09  Tim Omernick  <timo@apple.com>
490
491         Reviewed by/co-written by Darin.
492
493         Performance improvement when drawing large numbers of animated images.
494
495         Instead of removing the "first" object from a set on each next(),
496         copy the clients into a vector once and keep track of the current index.
497
498         * loader/CachedObjectClientWalker.h:
499         * loader/CachedObjectClientWalker.cpp:
500         (WebCore::CachedObjectClientWalker::CachedObjectClientWalker):
501         (WebCore::CachedObjectClientWalker::next):
502
503 2006-05-09  Steve Falkenburg  <sfalken@apple.com>
504
505         Fix Windows build.  Added TextDocument.cpp to vcproj.
506         
507         Reviewed by adele.
508
509         * WebCore.vcproj/WebCore/WebCore.vcproj:
510
511 2006-05-09  Steve Falkenburg  <sfalken@apple.com>
512
513         Fix Windows build.
514         Add host calback so caller can determine success/failure of a page load.
515         
516         Reviewed by kevin.
517
518         * WebCore.vcproj/WebCore/WebCore.vcproj: Fix paths, add missing files
519         * loader/CachedResource.h: Fix include path.
520         * loader/CachedResourceClientWalker.h: Fix include path.
521         * platform/FontPlatformData.h: Fix include path.
522         * platform/TransferJobClient.h: Make PlatformData, PlatformResponse an opaque struct.
523         * platform/image-decoders/ImageDecoder.h: Fix include path.
524         * platform/win/SharedTimerWin.cpp: Fix include path.
525         * platform/win/TransferJobWin.cpp: 
526         (WebCore::TransferJobWndProc): Add host callback for success/failure of load.
527         * platform/win/TransferJobWin.h: Added. Windows version of PlatformData/PlatformResponse.
528         * xpath/impl/XPathFunctions.cpp: Work around missing math functions in MSVC.
529         (round): Work around missing math functions in MSVC.
530         * xpath/impl/XPathPredicate.cpp: Work around missing math functions in MSVC.
531         * xpath/impl/XPathValue.cpp: Work around missing math functions in MSVC.
532
533 2006-05-09  David Hyatt  <hyatt@apple.com>
534
535         Revert styleForElement, pseudoStyleForElement, styleForRenderer back to
536         their old names, since the term "create" is not accurate.
537
538         * css/cssstyleselector.cpp:
539         (WebCore::CSSStyleSelector::styleForElement):
540         (WebCore::CSSStyleSelector::pseudoStyleForElement):
541         * css/cssstyleselector.h:
542         * dom/Element.cpp:
543         (WebCore::Element::styleForRenderer):
544         (WebCore::Element::recalcStyle):
545         * dom/Element.h:
546         * dom/Node.cpp:
547         (WebCore::Node::createRendererIfNeeded):
548         (WebCore::Node::styleForRenderer):
549         * dom/Node.h:
550         * ksvg2/svg/SVGClipPathElement.cpp:
551         (SVGClipPathElement::canvasResource):
552         * ksvg2/svg/SVGFEFloodElement.cpp:
553         (SVGFEFloodElement::filterEffect):
554         * ksvg2/svg/SVGGradientElement.cpp:
555         (SVGGradientElement::rebuildStops):
556
557 2006-05-09  Anders Carlsson  <acarlsson@apple.com>
558
559         Reviewed by Darin.
560
561         * loader/TextDocument.cpp:
562         (WebCore::TextTokenizer::write):
563         Use the correct variable to prevent crashes.
564
565 2006-05-09  Anders Carlsson  <acarlsson@apple.com>
566
567         Reviewed by Darin.
568
569         http://bugzilla.opendarwin.org/show_bug.cgi?id=8808
570         WebCore should handle text files
571         
572         * WebCore.xcodeproj/project.pbxproj:
573         Add TextDocument.cpp and TextDocument.h
574         
575         * bridge/mac/WebCoreFrameBridge.mm:
576         (+[WebCoreFrameBridge supportedMIMETypes]):
577         Add text types here.
578         
579         * dom/DOMImplementation.cpp:
580         (WebCore::DOMImplementation::createTextDocument):
581         (WebCore::DOMImplementation::isTextMIMEType):
582         * dom/DOMImplementation.h:
583         New functions for creating a TextDocument and determining if a 
584         mime type is a text MIME type.
585         
586         * loader/TextDocument.cpp: Added.
587         (WebCore::TextTokenizer::TextTokenizer):
588         (WebCore::TextTokenizer::write):
589         (WebCore::TextTokenizer::finish):
590         (WebCore::TextTokenizer::isWaitingForScripts):
591         Special tokenizer which will put text inside a <pre> tag
592         in a document.
593         
594         (WebCore::TextDocument::TextDocument):        
595         (WebCore::TextDocument::createTokenizer):
596         Create a TextTokenizer.
597         
598         * loader/TextDocument.h: Added.
599         
600         * page/Frame.cpp:
601         (WebCore::Frame::begin):
602         Create a TextDocument if the MIME type is of type text.
603
604 2006-05-09  Maciej Stachowiak  <mjs@apple.com>
605
606         Rubber stamped by Anders.
607         
608         - renamed kxmlcore to wtf
609         
610         kxmlcore --> wtf
611         KXMLCore --> WTF
612         KXC --> WTF
613
614         * ForwardingHeaders/kxmlcore: Removed.
615         * ForwardingHeaders/kxmlcore/AlwaysInline.h: Removed.
616         * ForwardingHeaders/kxmlcore/Assertions.h: Removed.
617         * ForwardingHeaders/kxmlcore/FastMalloc.h: Removed.
618         * ForwardingHeaders/kxmlcore/Forward.h: Removed.
619         * ForwardingHeaders/kxmlcore/HashCountedSet.h: Removed.
620         * ForwardingHeaders/kxmlcore/HashMap.h: Removed.
621         * ForwardingHeaders/kxmlcore/HashSet.h: Removed.
622         * ForwardingHeaders/kxmlcore/HashTraits.h: Removed.
623         * ForwardingHeaders/kxmlcore/Noncopyable.h: Removed.
624         * ForwardingHeaders/kxmlcore/OwnArrayPtr.h: Removed.
625         * ForwardingHeaders/kxmlcore/OwnPtr.h: Removed.
626         * ForwardingHeaders/kxmlcore/PassRefPtr.h: Removed.
627         * ForwardingHeaders/kxmlcore/Platform.h: Removed.
628         * ForwardingHeaders/kxmlcore/RefPtr.h: Removed.
629         * ForwardingHeaders/kxmlcore/Vector.h: Removed.
630         * ForwardingHeaders/wtf: Added.
631         * bindings/js/JSHTMLElementWrapperFactory.h:
632         * bindings/js/kjs_binding.cpp:
633         * bindings/js/kjs_window.h:
634         * bindings/objc/DOMImplementationFront.h:
635         * bridge/JavaAppletWidget.h:
636         * bridge/mac/WebCoreFrameNamespaces.mm:
637         * bridge/mac/WebCorePageBridge.mm:
638         (initializeLogChannel):
639         * bridge/mac/WebCoreStringTruncator.mm:
640         * bridge/mac/WebCoreViewFactory.m:
641         * config.h:
642         * css/css_base.h:
643         * css/css_valueimpl.h:
644         * css/csshelper.cpp:
645         * css/cssparser.h:
646         * dom/DOMImplementation.h:
647         * dom/Document.h:
648         * dom/NamedNodeMap.h:
649         * dom/Node.h:
650         * dom/NodeList.h:
651         * dom/QualifiedName.cpp:
652         * dom/Range.h:
653         * dom/StyledElement.cpp:
654         * dom/dom2_traversalimpl.h:
655         * dom/xml_tokenizer.h:
656         * editing/RebalanceWhitespaceCommand.cpp:
657         * editing/RemoveCSSPropertyCommand.cpp:
658         * editing/RemoveNodeAttributeCommand.cpp:
659         * editing/RemoveNodeCommand.cpp:
660         * editing/RemoveNodePreservingChildrenCommand.cpp:
661         * editing/ReplaceSelectionCommand.h:
662         * editing/Selection.cpp:
663         * editing/SetNodeAttributeCommand.cpp:
664         * editing/SplitElementCommand.cpp:
665         * editing/SplitTextNodeCommand.cpp:
666         * editing/SplitTextNodeContainingElementCommand.cpp:
667         * editing/TextIterator.h:
668         * editing/htmlediting.h:
669         * editing/markup.h:
670         * html/CanvasGradient.h:
671         * html/CanvasRenderingContext2D.h:
672         * html/CanvasStyle.cpp:
673         * html/HTMLCollection.h:
674         * html/HTMLElementFactory.h:
675         * kcanvas/KCanvasFilters.cpp:
676         * kcanvas/KCanvasPath.h:
677         * kcanvas/RenderPath.cpp:
678         * kcanvas/RenderSVGImage.cpp:
679         * kcanvas/RenderSVGText.cpp:
680         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
681         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
682         * kcanvas/device/quartz/QuartzSupport.mm:
683         * ksvg2/misc/KSVGTimeScheduler.h:
684         * ksvg2/misc/SVGDocumentExtensions.h:
685         * ksvg2/scripts/make_names.pl:
686         * ksvg2/svg/SVGDOMImplementation.cpp:
687         * ksvg2/svg/SVGExternalResourcesRequired.h:
688         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
689         * ksvg2/svg/SVGForeignObjectElement.cpp:
690         * ksvg2/svg/SVGImageElement.cpp:
691         * ksvg2/svg/SVGMaskElement.cpp:
692         * ksvg2/svg/SVGStyledElement.cpp:
693         * ksvg2/svg/SVGTests.h:
694         * ksvg2/svg/SVGTransform.h:
695         * ksvg2/svg/SVGTransformable.cpp:
696         * kwq/AccessibilityObjectCache.h:
697         * kwq/KWQCString.cpp:
698         * kwq/KWQFormData.mm:
699         * kwq/KWQListBox.mm:
700         * kwq/KWQResourceLoader.mm:
701         * kwq/KWQTextEdit.mm:
702         * loader/Cache.h:
703         * loader/CachedObject.h:
704         * loader/CachedObjectClientWalker.h:
705         * loader/Decoder.h:
706         * loader/DocLoader.h:
707         * loader/loader.cpp:
708         * loader/loader.h:
709         * page/DOMWindow.h:
710         * page/Frame.h:
711         * page/FramePrivate.h:
712         * page/FrameTree.cpp:
713         * page/Page.cpp:
714         * page/Page.h:
715         * page/Plugin.h:
716         * platform/Arena.cpp:
717         * platform/ArrayImpl.h:
718         * platform/AtomicString.cpp:
719         * platform/CharsetNames.cpp:
720         * platform/Color.cpp:
721         * platform/DeprecatedPtrListImpl.cpp:
722         * platform/DeprecatedValueListImpl.h:
723         * platform/FontFallbackList.h:
724         * platform/GraphicsContext.h:
725         * platform/GraphicsTypes.cpp:
726         * platform/Image.h:
727         * platform/KURL.cpp:
728         * platform/Logging.cpp:
729         * platform/Logging.h:
730         * platform/PlatformString.h:
731         * platform/PlugInInfoStore.h:
732         * platform/StreamingTextDecoder.cpp:
733         * platform/StreamingTextDecoder.h:
734         * platform/String.cpp:
735         * platform/StringHash.h:
736         * platform/StringImpl.cpp:
737         * platform/StringImpl.h:
738         * platform/TextEncoding.cpp:
739         * platform/Timer.cpp:
740         * platform/Timer.h:
741         * platform/TransferJob.h:
742         * platform/TransferJobInternal.h:
743         * platform/mac/BlockExceptions.mm:
744         * platform/mac/ColorMac.mm:
745         * platform/mac/FontData.mm:
746         * platform/mac/KURLMac.mm:
747         * platform/mac/QStringMac.mm:
748         * platform/mac/SharedTimerMac.cpp:
749         * platform/mac/TextEncodingMac.cpp:
750         * platform/mac/WebCoreImageRendererFactory.m:
751         * platform/mac/WebCoreKeyGenerator.m:
752         * platform/mac/WebCoreTextArea.mm:
753         * platform/mac/WebCoreTextField.mm:
754         * platform/mac/WebTextRendererFactory.h:
755         * platform/mac/WebTextRendererFactory.mm:
756         * platform/win/TemporaryLinkStubs.cpp:
757         (JavaAppletWidget::JavaAppletWidget):
758         * rendering/InlineTextBox.cpp:
759         * rendering/RenderText.cpp:
760         * rendering/RenderTreeAsText.cpp:
761         * rendering/bidi.cpp:
762         * xml/XSLTProcessor.h:
763         * xpath/impl/XPathExpressionNode.h:
764         * xpath/impl/XPathParser.h:
765         * xpath/impl/XPathPath.h:
766         * xpath/impl/XPathUtil.h:
767
768 2006-05-09  Anders Carlsson  <acarlsson@apple.com>
769
770         Reviewed by Maciej.
771
772         http://bugzilla.opendarwin.org/show_bug.cgi?id=8803
773         XPath query for empty attributes crashes in XPath::StringExpression::StringExpression
774         
775         * xpath/impl/XPathParser.cpp:
776         (WebCore::XPath::Parser::lexString):
777         Make sure an empty string is returned instead of a null string.
778         
779         (WebCore::XPath::Parser::lex):
780         Only assign the string if it isn't null.
781
782 2006-05-09  Alexey Proskuryakov  <ap@nypop.com>
783
784         Reviewed by Darin.
785
786         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8769
787           TextEncoding::fromUnicode() - support non-BMP characters and convert to NFC
788
789         Fix the ICU code path, too (currently unused on the Mac).
790
791         * platform/TextEncoding.cpp:
792         (WebCore::TextEncoding::fromUnicode): Normalize the string.
793
794 2006-05-08  Maciej Stachowiak  <mjs@apple.com>
795
796         Reviewed by Tim Hatcher.
797         
798         - refactor things so that WebKit doesn't save a WebResource for every loaded URL,
799         but rather retrieves the data from the WebCore cache as needed.
800         http://bugzilla.opendarwin.org/show_bug.cgi?id=8802
801
802         * bridge/mac/WebCoreFrameBridge.h:
803         * bridge/mac/WebCoreFrameBridge.mm:
804         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
805         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
806         * loader/Cache.cpp:
807         (WebCore::Cache::updateCacheStatus):
808         (WebCore::Cache::requestImage):
809         (WebCore::Cache::requestStyleSheet):
810         (WebCore::Cache::requestScript):
811         (WebCore::Cache::requestXSLStyleSheet):
812         (WebCore::Cache::requestXBLDocument):
813         * loader/Cache.h:
814         * loader/CachedResource.cpp: Added.
815         * loader/CachedResource.h: Added.
816         * loader/CachedResourceClient.h: Added.
817         * loader/CachedResourceClientWalker.cpp: Added.
818         * loader/CachedResourceClientWalker.h: Added.
819         * loader/DocLoader.cpp:
820         (WebCore::DocLoader::setAutoloadImages):
821         (WebCore::DocLoader::removeCachedObject):
822         * loader/DocLoader.h:
823         (WebCore::DocLoader::cachedObject):
824         (WebCore::DocLoader::allCachedObjects):
825
826 2006-05-08  Levi Weintraub  <lweintraub@apple.com>
827
828         Reviewed by justin.
829
830         * editing/TextIterator.cpp:
831         (WebCore::shouldEmitSpaceBeforeAndAfterNode):
832         Returns true when the node should have a leading and trailing space. Currently only
833         used for inline tables. The function shouldEmitNewlinesBeforeAndAfterNode has a
834         fallback for nodes with no RenderObject, but the inline property doesn't really
835         have a meaning without one.
836         (WebCore::TextIterator::handleNonTextNode):
837         Checks shouldEmitSpaceBeforeAndAfterNode and inserts a space if necessary.
838         (WebCore::TextIterator::exitNode):
839         Checks shouldEmitSpaceBeforeAndAfterNode and inserts a space if necessary.
840
841 2006-05-08  Anders Carlsson  <acarlsson@apple.com>
842
843         Try fixing the Win32 build
844         
845         * WebCore.vcproj/WebCore/WebCore.vcproj:
846         Add XPath files to project.
847
848 2006-05-08  Anders Carlsson  <acarlsson@apple.com>
849
850         Reviewed by Darin, Eric and Maciej.
851
852         http://bugzilla.opendarwin.org/show_bug.cgi?id=6638
853         Support Mozilla's XPathEvaluator object.
854         
855         * DerivedSources.make:
856         Generate XPath grammar, and JavaScript wrappers.
857         
858         * WebCore.xcodeproj/project.pbxproj:
859         Add new files to project
860         
861         * bindings/js/kjs_binding.cpp:
862         (KJS::):
863         (KJS::setDOMException):
864         Handle setting XPath exceptions.
865         
866         * bindings/objc/DOM.mm:
867         Just return nil for now when trying to create a wrapper for 
868         XPath namespace nodes.
869
870         * bindings/scripts/CodeGeneratorJS.pm:
871         Add XPath types. Also add a "CanBeConstructed" extended attribute
872         for interfaces that can be constructed directly.
873         
874         * bridge/mac/WebCorePageBridge.mm:
875         (initializeLoggingChannelsIfNecessary):
876         Initialize LogXPath channel.
877         
878         * dom/DOMImplementation.cpp:
879         (WebCore::DOMImplementation::hasFeature):
880         Support "xpath" version "3.0".
881         
882         * dom/Document.cpp:
883         (WebCore::Document::Document):
884         
885         (WebCore::Document::importNode):
886         Ignore XPath namespace nodes.
887         
888         (WebCore::Document::createExpression):
889         (WebCore::Document::createNSResolver):
890         (WebCore::Document::evaluate):
891         New functions which call down to a lazily created XPathEvaluator.
892
893         * dom/Document.h:
894         Add function declarations.
895         
896         * dom/Document.idl:
897         Add XPath methods.
898         
899         * dom/Node.h:
900         (WebCore::Node::):
901         Add XPATH_NAMESPACE_NODE type.
902         
903         * editing/markup.cpp:
904         (WebCore::startMarkup):
905         Ignore XPath namespace nodes.
906         
907         * page/DOMWindow.idl:
908         Add constructors for XPathEvaluator and XPathResult.
909         
910         * platform/Logging.cpp:
911         * platform/Logging.h:
912         Add XPath log channel
913
914         * xpath: Added.
915         * xpath/XPathEvaluator.cpp: Added.
916         (WebCore::XPathEvaluator::createExpression):
917         (WebCore::XPathEvaluator::createNSResolver):
918         (WebCore::XPathEvaluator::evaluate):
919         * xpath/XPathEvaluator.h: Added.
920         (WebCore::):
921         * xpath/XPathEvaluator.idl: Added.
922         * xpath/XPathExpression.cpp: Added.
923         (WebCore::XPathExpression::createExpression):
924         (WebCore::XPathExpression::~XPathExpression):
925         (WebCore::XPathExpression::evaluate):
926         * xpath/XPathExpression.h: Added.
927         * xpath/XPathExpression.idl: Added.
928         * xpath/XPathNSResolver.cpp: Added.
929         (WebCore::XPathNSResolver::XPathNSResolver):
930         (WebCore::XPathNSResolver::lookupNamespaceURI):
931         * xpath/XPathNSResolver.h: Added.
932         * xpath/XPathNSResolver.idl: Added.
933         * xpath/XPathNamespace.cpp: Added.
934         (WebCore::XPathNamespace::XPathNamespace):
935         (WebCore::XPathNamespace::~XPathNamespace):
936         (WebCore::XPathNamespace::ownerDocument):
937         (WebCore::XPathNamespace::ownerElement):
938         (WebCore::XPathNamespace::prefix):
939         (WebCore::XPathNamespace::nodeName):
940         (WebCore::XPathNamespace::nodeValue):
941         (WebCore::XPathNamespace::namespaceURI):
942         (WebCore::XPathNamespace::nodeType):
943         * xpath/XPathNamespace.h: Added.
944         * xpath/XPathResult.cpp: Added.
945         (WebCore::InvalidatingEventListener::InvalidatingEventListener):
946         (WebCore::InvalidatingEventListener::handleEvent):
947         (WebCore::XPathResult::XPathResult):
948         (WebCore::XPathResult::~XPathResult):
949         (WebCore::XPathResult::convertTo):
950         (WebCore::XPathResult::resultType):
951         (WebCore::XPathResult::numberValue):
952         (WebCore::XPathResult::stringValue):
953         (WebCore::XPathResult::booleanValue):
954         (WebCore::XPathResult::singleNodeValue):
955         (WebCore::XPathResult::invalidateIteratorState):
956         (WebCore::XPathResult::invalidIteratorState):
957         (WebCore::XPathResult::snapshotLength):
958         (WebCore::XPathResult::iterateNext):
959         (WebCore::XPathResult::snapshotItem):
960         * xpath/XPathResult.h: Added.
961         (WebCore::XPathResult::):
962         * xpath/XPathResult.idl: Added.
963         * xpath/impl: Added.
964         * xpath/impl/XPathExpressionNode.cpp: Added.
965         (WebCore::XPath::Expression::evaluationContext):
966         (WebCore::XPath::Expression::Expression):
967         (WebCore::XPath::Expression::~Expression):
968         (WebCore::XPath::Expression::evaluate):
969         (WebCore::XPath::Expression::addSubExpression):
970         (WebCore::XPath::Expression::optimize):
971         (WebCore::XPath::Expression::subExprCount):
972         (WebCore::XPath::Expression::subExpr):
973         (WebCore::XPath::Expression::isConstant):
974         * xpath/impl/XPathExpressionNode.h: Added.
975         (WebCore::XPath::EvaluationContext::EvaluationContext):
976         * xpath/impl/XPathFunctions.cpp: Added.
977         (WebCore::XPath::Interval::Interval):
978         (WebCore::XPath::Interval::contains):
979         (WebCore::XPath::Interval::asString):
980         (WebCore::XPath::Function::setArguments):
981         (WebCore::XPath::Function::setName):
982         (WebCore::XPath::Function::arg):
983         (WebCore::XPath::Function::argCount):
984         (WebCore::XPath::Function::name):
985         (WebCore::XPath::FunLast::doEvaluate):
986         (WebCore::XPath::FunLast::isConstant):
987         (WebCore::XPath::FunPosition::doEvaluate):
988         (WebCore::XPath::FunPosition::isConstant):
989         (WebCore::XPath::FunLocalName::isConstant):
990         (WebCore::XPath::FunLocalName::doEvaluate):
991         (WebCore::XPath::FunNamespaceURI::isConstant):
992         (WebCore::XPath::FunNamespaceURI::doEvaluate):
993         (WebCore::XPath::FunName::isConstant):
994         (WebCore::XPath::FunName::doEvaluate):
995         (WebCore::XPath::FunCount::doEvaluate):
996         (WebCore::XPath::FunCount::isConstant):
997         (WebCore::XPath::FunString::doEvaluate):
998         (WebCore::XPath::FunConcat::doEvaluate):
999         (WebCore::XPath::FunStartsWith::doEvaluate):
1000         (WebCore::XPath::FunContains::doEvaluate):
1001         (WebCore::XPath::FunSubstringBefore::doEvaluate):
1002         (WebCore::XPath::FunSubstringAfter::doEvaluate):
1003         (WebCore::XPath::FunSubstring::doEvaluate):
1004         (WebCore::XPath::FunStringLength::doEvaluate):
1005         (WebCore::XPath::FunNormalizeSpace::doEvaluate):
1006         (WebCore::XPath::FunTranslate::doEvaluate):
1007         (WebCore::XPath::FunBoolean::doEvaluate):
1008         (WebCore::XPath::FunNot::doEvaluate):
1009         (WebCore::XPath::FunTrue::doEvaluate):
1010         (WebCore::XPath::FunTrue::isConstant):
1011         (WebCore::XPath::FunLang::doEvaluate):
1012         (WebCore::XPath::FunLang::isConstant):
1013         (WebCore::XPath::FunFalse::doEvaluate):
1014         (WebCore::XPath::FunFalse::isConstant):
1015         (WebCore::XPath::FunNumber::doEvaluate):
1016         (WebCore::XPath::FunSum::doEvaluate):
1017         (WebCore::XPath::FunFloor::doEvaluate):
1018         (WebCore::XPath::FunCeiling::doEvaluate):
1019         (WebCore::XPath::FunRound::doEvaluate):
1020         (WebCore::XPath::FunctionLibrary::self):
1021         (WebCore::XPath::FunctionLibrary::FunctionLibrary):
1022         (WebCore::XPath::FunctionLibrary::createFunction):
1023         * xpath/impl/XPathFunctions.h: Added.
1024         * xpath/impl/XPathGrammar.y: Added.
1025         * xpath/impl/XPathParser.cpp: Added.
1026         (WebCore::XPath::):
1027         (WebCore::XPath::Parser::charCat):
1028         (WebCore::XPath::Parser::isAxisName):
1029         (WebCore::XPath::Parser::isNodeTypeName):
1030         (WebCore::XPath::Parser::isOperatorContext):
1031         (WebCore::XPath::Parser::skipWS):
1032         (WebCore::XPath::Parser::makeTokenAndAdvance):
1033         (WebCore::XPath::Parser::makeIntTokenAndAdvance):
1034         (WebCore::XPath::Parser::peekAheadHelper):
1035         (WebCore::XPath::Parser::peekCurHelper):
1036         (WebCore::XPath::Parser::lexString):
1037         (WebCore::XPath::Parser::lexNumber):
1038         (WebCore::XPath::Parser::lexNCName):
1039         (WebCore::XPath::Parser::lexQName):
1040         (WebCore::XPath::Parser::nextTokenInternal):
1041         (WebCore::XPath::Parser::nextToken):
1042         (WebCore::XPath::Parser::Parser):
1043         (WebCore::XPath::Parser::reset):
1044         (WebCore::XPath::Parser::lex):
1045         (WebCore::XPath::Parser::parseStatement):
1046         (WebCore::XPath::Parser::registerParseNode):
1047         (WebCore::XPath::Parser::unregisterParseNode):
1048         (WebCore::XPath::Parser::registerPredicateVector):
1049         (WebCore::XPath::Parser::unregisterPredicateVector):
1050         (WebCore::XPath::Parser::registerExpressionVector):
1051         (WebCore::XPath::Parser::unregisterExpressionVector):
1052         (WebCore::XPath::Parser::registerString):
1053         (WebCore::XPath::Parser::unregisterString):
1054         * xpath/impl/XPathParser.h: Added.
1055         (WebCore::XPath::Token::Token):
1056         (WebCore::XPath::Parser::):
1057         (WebCore::XPath::Parser::current):
1058         * xpath/impl/XPathPath.cpp: Added.
1059         (WebCore::XPath::Filter::Filter):
1060         (WebCore::XPath::Filter::~Filter):
1061         (WebCore::XPath::Filter::doEvaluate):
1062         (WebCore::XPath::LocationPath::LocationPath):
1063         (WebCore::XPath::LocationPath::~LocationPath):
1064         (WebCore::XPath::LocationPath::optimize):
1065         (WebCore::XPath::LocationPath::doEvaluate):
1066         (WebCore::XPath::Path::Path):
1067         (WebCore::XPath::Path::~Path):
1068         (WebCore::XPath::Path::doEvaluate):
1069         * xpath/impl/XPathPath.h: Added.
1070         * xpath/impl/XPathPredicate.cpp: Added.
1071         (WebCore::XPath::Number::Number):
1072         (WebCore::XPath::Number::isConstant):
1073         (WebCore::XPath::Number::doEvaluate):
1074         (WebCore::XPath::StringExpression::StringExpression):
1075         (WebCore::XPath::StringExpression::isConstant):
1076         (WebCore::XPath::StringExpression::doEvaluate):
1077         (WebCore::XPath::Negative::doEvaluate):
1078         (WebCore::XPath::NumericOp::NumericOp):
1079         (WebCore::XPath::NumericOp::doEvaluate):
1080         (WebCore::XPath::EqTestOp::EqTestOp):
1081         (WebCore::XPath::EqTestOp::doEvaluate):
1082         (WebCore::XPath::LogicalOp::LogicalOp):
1083         (WebCore::XPath::LogicalOp::shortCircuitOn):
1084         (WebCore::XPath::LogicalOp::isConstant):
1085         (WebCore::XPath::LogicalOp::doEvaluate):
1086         (WebCore::XPath::Union::doEvaluate):
1087         (WebCore::XPath::Predicate::Predicate):
1088         (WebCore::XPath::Predicate::~Predicate):
1089         (WebCore::XPath::Predicate::evaluate):
1090         (WebCore::XPath::Predicate::optimize):
1091         * xpath/impl/XPathPredicate.h: Added.
1092         (WebCore::XPath::NumericOp::):
1093         (WebCore::XPath::EqTestOp::):
1094         (WebCore::XPath::LogicalOp::):
1095         * xpath/impl/XPathStep.cpp: Added.
1096         (WebCore::XPath::Step::axisAsString):
1097         (WebCore::XPath::Step::Step):
1098         (WebCore::XPath::Step::~Step):
1099         (WebCore::XPath::Step::evaluate):
1100         (WebCore::XPath::Step::nodesInAxis):
1101         (WebCore::XPath::Step::nodeTestMatches):
1102         (WebCore::XPath::Step::optimize):
1103         (WebCore::XPath::Step::namespaceFromNodetest):
1104         (WebCore::XPath::Step::primaryNodeType):
1105         * xpath/impl/XPathStep.h: Added.
1106         (WebCore::XPath::Step::):
1107         * xpath/impl/XPathUtil.cpp: Added.
1108         (WebCore::XPath::isRootDomNode):
1109         (WebCore::XPath::stringValue):
1110         (WebCore::XPath::isValidContextNode):
1111         * xpath/impl/XPathUtil.h: Added.
1112         * xpath/impl/XPathValue.cpp: Added.
1113         (WebCore::XPath::Value::Value):
1114         (WebCore::XPath::Value::type):
1115         (WebCore::XPath::Value::isNodeVector):
1116         (WebCore::XPath::Value::isBoolean):
1117         (WebCore::XPath::Value::isNumber):
1118         (WebCore::XPath::Value::isString):
1119         (WebCore::XPath::Value::toNodeVector):
1120         (WebCore::XPath::Value::toBoolean):
1121         (WebCore::XPath::Value::toNumber):
1122         (WebCore::XPath::Value::toString):
1123         * xpath/impl/XPathValue.h: Added.
1124         (WebCore::XPath::Value::):
1125         * xpath/impl/XPathVariableReference.cpp: Added.
1126         (WebCore::XPath::VariableReference::VariableReference):
1127         (WebCore::XPath::VariableReference::isConstant):
1128         (WebCore::XPath::VariableReference::doEvaluate):
1129         * xpath/impl/XPathVariableReference.h: Added.
1130
1131 2006-05-08  David Hyatt  <hyatt@apple.com>
1132
1133         Comprehensive box-sizing fix.  This patch changes all form controls to
1134         have the right box-sizing values (text fields and text areas actually only
1135         use border-box in quirks mode now, and image buttons never use border-box).
1136
1137         Tables are supposed to use border-box box-sizing as well, but that's a scary
1138         enough change that I'm saving it for a separate patch.
1139
1140         Reviewed by mjs
1141
1142         * css/html4.css:
1143         * css/quirks.css:
1144
1145 2006-05-07  Darin Adler  <darin@apple.com>
1146         
1147         Suggested by Mitz. Reviewed and landed by Maciej.
1148         
1149         * dom/Document.cpp: (WebCore::Document::formElementsState): Fixed mistake where the
1150         vector has an initial size and instead should have an initial capacity. Harmless in
1151         a way, but hurts performance.
1152         
1153 2006-05-07  David Hyatt  <hyatt@apple.com>
1154
1155         Fix for bugzilla bug 8060.
1156
1157         Fixed width table cells weren't having their border widths
1158         included in the effective width of the column (and thus could end up being
1159         too small).
1160
1161         Reviewed by darin
1162
1163         Added fast/tables/fixed-cell-growth.html
1164
1165         * rendering/table_layout.cpp:
1166         (WebCore::AutoTableLayout::recalcColumn):
1167
1168 2006-05-07  Alexey Proskuryakov  <ap@nypop.com>
1169
1170         Reviewed by Darin.
1171
1172         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8769
1173           TextEncoding::fromUnicode() - support non-BMP characters and convert to NFC
1174
1175         Tests: 
1176         * fast/forms/form-data-encoding.html
1177         * fast/forms/form-data-encoding-2.html
1178
1179         * platform/mac/TextEncodingMac.cpp:
1180         (WebCore::TextEncoding::fromUnicode): Normalize the string; handle surrogate pairs.
1181
1182 2006-05-06  David Hyatt  <hyatt@apple.com>
1183
1184         Rename WebCoreFont to FontPlatformData and WebTextRenderer to FontData.  Merge them into the
1185         headers (uncleanly with ifdefs at the moment, so I can see what I'm working towards).
1186
1187         Reviewed by mjs
1188
1189         * ChangeLog:
1190         * WebCore.vcproj/WebCore/WebCore.vcproj:
1191         * WebCore.xcodeproj/project.pbxproj:
1192         * bridge/mac/WebCoreStringTruncator.mm:
1193         (stringWidth):
1194         (truncateString):
1195         (+[WebCoreStringTruncator widthOfString:font:]):
1196         * kwq/KWQComboBox.mm:
1197         (QComboBox::sizeHint):
1198         * kwq/KWQLineEdit.mm:
1199         (QLineEdit::sizeForCharacterWidth):
1200         * kwq/KWQListBox.mm:
1201         (itemTextRenderer):
1202         (groupLabelTextRenderer):
1203         (QListBox::sizeForNumberOfLines):
1204         (-[KWQTableView drawRow:clipRect:]):
1205         * platform/Font.cpp:
1206         (WebCore::m_wordSpacing):
1207         (WebCore::Font::Font):
1208         (WebCore::Font::operator=):
1209         (WebCore::Font::update):
1210         (WebCore::Font::ascent):
1211         (WebCore::Font::descent):
1212         (WebCore::Font::lineSpacing):
1213         (WebCore::Font::xHeight):
1214         (WebCore::Font::isFixedPitch):
1215         * platform/Font.h:
1216         (WebCore::Font::getNSFont):
1217         * platform/FontData.h:
1218         (WebCore::FontData::ascent):
1219         (WebCore::FontData::descent):
1220         (WebCore::FontData::lineSpacing):
1221         (WebCore::FontData::lineGap):
1222         (WebCore::FontData::misspellingLineThickness):
1223         (WebCore::FontData::misspellingLinePatternWidth):
1224         (WebCore::FontData::misspellingLinePatternGapWidth):
1225         * platform/FontDataSet.h: Removed.
1226         * platform/FontFallbackList.h: Added.
1227         * platform/FontPlatformData.h:
1228         * platform/mac/FontData.mm: Added.
1229         (WebCore::WebCoreInitializeFont):
1230         (WebCore::WebCoreInitializeEmptyTextGeometry):
1231         (WebCore::widthForGlyph):
1232         (WebCore::overrideLayoutOperation):
1233         (WebCore::FontData::~FontData):
1234         (WebCore::FontData::xHeight):
1235         (WebCore::FontData::drawRun):
1236         (WebCore::FontData::floatWidthForRun):
1237         (WebCore::FontData::drawLineForCharacters):
1238         (WebCore::FontData::selectionRectForRun):
1239         (WebCore::FontData::drawHighlightForRun):
1240         (WebCore::FontData::drawLineForMisspelling):
1241         (WebCore::FontData::pointToOffset):
1242         (WebCore::FontData::setAlwaysUseATSU):
1243         (WebCore::getSmallCapsRenderer):
1244         (WebCore::findSubstituteFont):
1245         (WebCore::rendererForAlternateFont):
1246         (WebCore::findSubstituteRenderer):
1247         (WebCore::computeWidthForSpace):
1248         (WebCore::setUpFont):
1249         (WebCore::CG_drawHighlight):
1250         (WebCore::CG_selectionRect):
1251         (WebCore::CG_draw):
1252         (WebCore::CG_floatWidthForRun):
1253         (WebCore::updateGlyphMapEntry):
1254         (WebCore::extendGlyphMap):
1255         (WebCore::extendWidthMap):
1256         (WebCore::initializeATSUStyle):
1257         (WebCore::createATSULayoutParameters):
1258         (WebCore::getTextBounds):
1259         (WebCore::ATSU_floatWidthForRun):
1260         (WebCore::ATSU_drawHighlight):
1261         (WebCore::ATSU_selectionRect):
1262         (WebCore::ATSU_draw):
1263         (WebCore::ATSU_pointToOffset):
1264         (WebCore::advanceWidthIteratorOneCharacter):
1265         (WebCore::CG_pointToOffset):
1266         (WebCore::glyphForCharacter):
1267         (WebCore::initializeWidthIterator):
1268         (WebCore::advanceWidthIterator):
1269         * platform/mac/FontMac.mm:
1270         (WebCore::m_font):
1271         (WebCore::FontFallbackList::~FontFallbackList):
1272         (WebCore::FontFallbackList::platformFont):
1273         (WebCore::FontFallbackList::primaryFont):
1274         (WebCore::FontFallbackList::determinePitch):
1275         (WebCore::FontFallbackList::invalidate):
1276         (WebCore::Font::platformFont):
1277         (WebCore::Font::selectionRectForText):
1278         (WebCore::Font::drawText):
1279         (WebCore::Font::drawHighlightForText):
1280         (WebCore::Font::drawLineForText):
1281         (WebCore::Font::drawLineForMisspelling):
1282         (WebCore::Font::misspellingLineThickness):
1283         (WebCore::Font::floatWidth):
1284         (WebCore::Font::checkSelectionPoint):
1285         * platform/mac/WebCoreTextRenderer.mm:
1286         (WebCoreDrawTextAtPoint):
1287         (WebCoreTextFloatWidth):
1288         (WebCoreSetAlwaysUseATSU):
1289         * platform/mac/WebTextRenderer.h: Removed.
1290         * platform/mac/WebTextRenderer.mm: Removed.
1291         * platform/mac/WebTextRendererFactory.h:
1292         * platform/mac/WebTextRendererFactory.mm:
1293         (-[WebTextRendererFactory isFontFixedPitch:]):
1294         (-[WebTextRendererFactory init]):
1295         (-[WebTextRendererFactory rendererWithFont:]):
1296         (-[WebTextRendererFactory fontWithFamilies:traits:size:]):
1297         * platform/win/FontWin.cpp:
1298         (WebCore::FontFallbackList::~FontFallbackList):
1299         (WebCore::FontFallbackList::determinePitch):
1300         (WebCore::FontFallbackList::invalidate):
1301         (WebCore::FontFallbackList::primaryFont):
1302         (WebCore::Font::floatWidth):
1303         (WebCore::Font::drawText):
1304         (WebCore::Font::drawHighlightForText):
1305         (WebCore::Font::selectionRectForText):
1306         (WebCore::Font::checkSelectionPoint):
1307
1308 2006-05-05  Darin Adler  <darin@apple.com>
1309
1310         - fix the Windows build
1311
1312         * platform/win/FontWin.cpp: (WebCore::getFontData):
1313
1314 2006-05-05  Darin Adler  <darin@apple.com>
1315
1316         * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Oops!
1317         Removed an extra ! that was causing everything to fail.
1318
1319 2006-05-05  Darin Adler  <darin@apple.com>
1320
1321         Reviewed by Tim Hatcher.
1322
1323         - remove a few of the stranger features of QChar on the road to
1324           eventually replacing it with an integer type (probably ICU's UChar)
1325
1326         * platform/DeprecatedString.h: Remove SpecialCharacter, byteOrderMark, null,
1327         cell, row, isNull, mirrored, mirroredChar, operator char, >, >=, <, and <=
1328         from QChar. Also removed the many unneeded friend declarations. Remove findArg
1329         and arg from DeprecatedString.
1330
1331         * dom/Document.cpp: (WebCore::Document::parseQualifiedName): Cast the type of the
1332         buffer before invoking the U16_NEXT function. Turns out this was converting each
1333         QChar to a char and back to a UChar, which means it caused a bug with characters
1334         that are U+0100 or greater.
1335
1336         * css/csshelper.cpp: (WebCore::parseURL):
1337         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::constrainValue):
1338         * platform/StringImpl.cpp: (WebCore::StringImpl::toCoordsArray):
1339         * xml/xmlhttprequest.cpp: (WebCore::getCharset):
1340         Add some calls to unicode() since we don't have comparison operators any more.
1341
1342         * dom/StyledElement.cpp:
1343         (WebCore::toHex): Rewrote to just take a UChar parameter.
1344         (WebCore::StyledElement::addCSSColor): Call toHex on the character code.
1345
1346         * bridge/mac/WebCoreFrameBridge.mm:
1347         (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
1348         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
1349         * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextBox):
1350         * platform/SegmentedString.h:
1351         (WebCore::SegmentedString::push):
1352         (WebCore::SegmentedString::advance):
1353         (WebCore::SegmentedString::escaped):
1354         * platform/SegmentedString.cpp:
1355         (WebCore::SegmentedString::length):
1356         (WebCore::SegmentedString::append):
1357         (WebCore::SegmentedString::prepend):
1358         (WebCore::SegmentedString::toString):
1359         Changed calls to isNull() to instead just use unicode() and check for 0.
1360
1361         * html/HTMLTokenizer.cpp:
1362         (WebCore::HTMLTokenizer::parseEntity): Change callers that used cell and row to
1363         just use unicode() instead.
1364         (WebCore::HTMLTokenizer::parseTag): Ditto.
1365
1366         * loader/Decoder.cpp: (Decoder::decode): Changed code that did a type cast to
1367         unsigned char to instead call unicode().
1368
1369         * platform/DeprecatedString.cpp:
1370         (KWQStringData::makeAscii): Call latin1() instead of relying on the conversion operator.
1371         (DeprecatedString::DeprecatedString): Call unicode() instead of relying on the conversion
1372         operator (the character has been tested and is known to be ASCII).
1373         (DeprecatedString::at): Use 0 instead of QChar::null.
1374         (DeprecatedString::compare): Use unicode() so we can do comparison since we don't have
1375         comparison operators any more.
1376         (DeprecatedString::find): Call unicode() instead of relying on the conversion
1377         operator (the character has been tested and is known to be ASCII).
1378         (DeprecatedString::findRev): Ditto.
1379         (DeprecatedString::copyLatin1): Call latin1() instead of relying on the conversion operator.
1380         (DeprecatedString::lower): Call unicode() instead of relying on the conversion
1381         operator (the character has been tested and is known to be ASCII).
1382         (DeprecatedString::insert): Ditto.
1383         (DeprecatedString::replace): Ditto.
1384         (DeprecatedString::fill): Ditto.
1385         (DeprecatedString::append): Ditto.
1386
1387         * html/html_inlineimpl.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
1388         Eliminate the one use of DeprecatedString::arg.
1389
1390         - other cleanup
1391
1392         * kwq/KWQCString.cpp: Remove unneeded "using" directive.
1393
1394         * html/HTMLElementFactory.cpp:
1395         (WebCore::htmlConstructor):
1396         (WebCore::headConstructor):
1397         (WebCore::bodyConstructor):
1398         (WebCore::baseConstructor):
1399         (WebCore::linkConstructor):
1400         (WebCore::metaConstructor):
1401         (WebCore::styleConstructor):
1402         (WebCore::titleConstructor):
1403         (WebCore::frameConstructor):
1404         (WebCore::framesetConstructor):
1405         (WebCore::iframeConstructor):
1406         (WebCore::formConstructor):
1407         (WebCore::buttonConstructor):
1408         (WebCore::inputConstructor):
1409         (WebCore::isindexConstructor):
1410         (WebCore::fieldsetConstructor):
1411         (WebCore::labelConstructor):
1412         (WebCore::legendConstructor):
1413         (WebCore::optgroupConstructor):
1414         (WebCore::optionConstructor):
1415         (WebCore::selectConstructor):
1416         (WebCore::textareaConstructor):
1417         (WebCore::dlConstructor):
1418         (WebCore::ulConstructor):
1419         (WebCore::olConstructor):
1420         (WebCore::dirConstructor):
1421         (WebCore::menuConstructor):
1422         (WebCore::liConstructor):
1423         (WebCore::blockquoteConstructor):
1424         (WebCore::divConstructor):
1425         (WebCore::headingConstructor):
1426         (WebCore::hrConstructor):
1427         (WebCore::paragraphConstructor):
1428         (WebCore::preConstructor):
1429         (WebCore::basefontConstructor):
1430         (WebCore::fontConstructor):
1431         (WebCore::modConstructor):
1432         (WebCore::anchorConstructor):
1433         (WebCore::imageConstructor):
1434         (WebCore::mapConstructor):
1435         (WebCore::areaConstructor):
1436         (WebCore::canvasConstructor):
1437         (WebCore::appletConstructor):
1438         (WebCore::embedConstructor):
1439         (WebCore::objectConstructor):
1440         (WebCore::paramConstructor):
1441         (WebCore::scriptConstructor):
1442         (WebCore::tableConstructor):
1443         (WebCore::tableCaptionConstructor):
1444         (WebCore::tableColConstructor):
1445         (WebCore::tableRowConstructor):
1446         (WebCore::tableCellConstructor):
1447         (WebCore::tableSectionConstructor):
1448         (WebCore::brConstructor):
1449         (WebCore::quoteConstructor):
1450         (WebCore::marqueeConstructor):
1451         Mark functions static, remove unused parameters, change from docPtr to doc.
1452
1453 2006-05-05  Alexey Proskuryakov  <ap@nypop.com>
1454
1455         Reviewed by Maciej.
1456
1457         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8626
1458           Strict mode erroneously triggered by a broken comment
1459
1460         Test: fast/parser/broken-comments-vs-parsing-mode.html
1461
1462         * page/Frame.cpp:
1463         (WebCore::Frame::endIfNotLoading): Call determineParseMode() if needed.
1464
1465 2006-05-05  Darin Adler  <darin@apple.com>
1466
1467         - fix the Windows build (this time for sure)
1468
1469         * platform/win/TemporaryLinkStubs.cpp:
1470         (GraphicsContext::translate): Added.
1471         (GraphicsContext::rotate): Ditto.
1472         (GraphicsContext::scale): Ditto.
1473
1474 2006-05-05  Darin Adler  <darin@apple.com>
1475
1476         - fix the Windows build
1477
1478         * bridge/win/FrameWin.h: Add Element* parameter to createPlugin.
1479         * platform/win/TemporaryLinkStubs.cpp: (FrameWin::createPlugin): Ditto.
1480
1481 2006-05-05  Darin Adler  <darin@apple.com>
1482
1483         - get the Windows build a little closer to building again
1484
1485         * platform/cairo/GraphicsContextCairo.cpp:
1486         (WebCore::GraphicsContext::drawRect): Call alpha to check if the color is transparent.
1487         Call setColor directly instead of setColorFromPen.
1488         (WebCore::GraphicsContext::drawLine): Ditto.
1489         (WebCore::GraphicsContext::drawEllipse): Ditto.
1490         (WebCore::GraphicsContext::drawArc): Ditto.
1491         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
1492         * platform/win/TemporaryLinkStubs.cpp: (JavaAppletWidget::JavaAppletWidget): Updated parameter types.
1493
1494 2006-05-05  Darin Adler  <darin@apple.com>
1495
1496         Reviewed by Adele.
1497
1498         - fixed data structure used to save/restore form element state to remove the
1499           O(n^2) algorithm and remove anomalies in how it works
1500         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8683
1501           REGRESSION: imdb search button has "Submit" overload after going back
1502
1503         * manual-tests/form-value-restore.html: Added.
1504
1505         * bridge/mac/WebCoreFrameBridge.mm:
1506         (-[WebCoreFrameBridge saveDocumentState]): Rewrote to call the new formElementsState
1507         function on the document and also to convert null strings to NSNull instead of empty
1508         NSString objects.
1509         (-[WebCoreFrameBridge restoreDocumentState]): Ditto, with the setStateForNewFormElements
1510         function.
1511
1512         * dom/Document.h: Added FormElementKey, FormElementKeyHash, and FormElementKeyHashTraits
1513         for use in the hash map. Made readyState, inputEncoding, defaultCharset, charset,
1514         characterSet, getElementByAccessKey, haveStylesheetsLoaded, usesDescendantRules,
1515         usesSiblingRules, inCompatMode, inAlmostStrictMode, inStrictMode, preferredStylesheetSet,
1516         selectedStylesheetSet, and getCSSTarget all const member functions. Removed the unused
1517         nextState function. Renamed registerMaintainsState and deregisterMaintainsState to
1518         registerFormElementWithState and HTMLGenericFormElement and changed them to use form
1519         elements rather than arbitrary DOM nodes. Replaced docState with formElementsState and
1520         setRestoreState and restoreState with setStateForNewFormElements, hasStateForNewFormElements,
1521         and takeStateForFormElement. Replaced m_maintainsState with m_formElementsWithState,
1522         m_state with m_stateForNewFormElements. Made m_elementsByAccessKey and m_accessKeyMapValid
1523         mutable. Removed unused m_elementNames, m_elementNameAlloc, m_elementNameCount, m_attrNames,
1524         m_attrNameAlloc, m_attrNameCount, m_namespaceURIs, m_namespaceURIAlloc, m_namespaceURICount.
1525
1526         * dom/Document.cpp:
1527         (WebCore::Document::Document): Remove initialization of long-obsolete m_elementNames and
1528         m_attrNames.
1529         (WebCore::Document::~Document): Remove destruction of same.
1530         (WebCore::Document::readyState): Made const.
1531         (WebCore::Document::inputEncoding): Ditto.
1532         (WebCore::Document::defaultCharset): Ditto.
1533         (WebCore::Document::getElementByAccessKey): Ditto.
1534         (WebCore::Document::preferredStylesheetSet): Ditto.
1535         (WebCore::Document::selectedStylesheetSet): Ditto.
1536         (WebCore::Document::getCSSTarget): Ditto.
1537         (WebCore::Document::formElementsState): Added. Replaces the old docState function.
1538         Builds a vector of strings, with 3 strings for each form element containing the
1539         name, type, and state value.
1540         (WebCore::Document::setStateForNewFormElements): Added. Converts the state vector
1541         into a hash map, considering the scheme with 3 strings for form element used above.
1542         (WebCore::Document::hasStateForNewFormElements): Added.
1543         (WebCore::Document::takeStateForFormElement): Added. Given a name and type, looks
1544         up the values in the hash map and "peels off" the last one.
1545         (WebCore::FormElementKey::FormElementKey): Added.
1546         (WebCore::FormElementKey::~FormElementKey): Added.
1547         (WebCore::FormElementKey::operator=): Added.
1548         (WebCore::FormElementKey::ref): Added.
1549         (WebCore::FormElementKey::deref): Added.
1550         (WebCore::FormElementKeyHash::hash): Added.
1551         (WebCore::FormElementKeyHashTraits::deletedValue): Added.
1552
1553         * dom/Element.h: Removed state function.
1554         * dom/Node.h: Removed maintainsState, state, and restoreState functions.
1555         * dom/Node.cpp: Ditto.
1556
1557         * dom/QualifiedName.cpp: Reformatted.
1558         (WebCore::hashComponents): Removed code to handle buffers that are not multiples
1559         of 4 bytes, since a QualifiedName is guaranteed to be; also asserted that fact.
1560
1561         * html/HTMLParser.cpp:
1562         (WebCore::HTMLParser::insertNode): Remove code to restore state; that's now handled
1563         by closeRenderer.
1564         (WebCore::HTMLParser::popOneBlock): Ditto.
1565
1566         * html/HTMLFormElement.cpp: Added include of HTMLInputElement.h.
1567
1568         * html/HTMLGenericFormElement.h: Changed form to be a const member function.
1569         Changed type function to return a const AtomicString& instead of a String.
1570         Added an override of closeRenderer. Removed state and findMatchingState functions.
1571         Added stateValue and restoreState functions. Made m_form, m_disabled, and m_readOnly
1572         be private instead of protected. Removed m_inited. Changed booleans to not use bit
1573         fields since there are only two of them.
1574         * html/HTMLGenericFormElement.cpp: Removed encodedElementName, state, and
1575         findMatchingState functions.
1576         (WebCore::HTMLGenericFormElement::stateValue): Added. No implementation. This will only be
1577         called for subclasses that call registerFormElementWithState, and those will override and
1578         implement it.
1579         (WebCore::HTMLGenericFormElement::restoreState): Ditto.
1580         (WebCore::HTMLGenericFormElement::closeRenderer): Added. Replaces code that was in the
1581         HTML parser. Calls takeStateForFormElement, passing in the name and type, and if a
1582         state is found, calls restoreState.
1583
1584         * html/HTMLButtonElement.h: Changed type to return a const AtomicString& instead
1585         of a String.
1586         * html/HTMLButtonElement.cpp:
1587         (WebCore::HTMLButtonElement::type): Return a const AtomicString& instead of a
1588         String.
1589         (WebCore::HTMLButtonElement::defaultEventHandler): Use form() instead of m_form.
1590         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton): Use disabled() instead of
1591         m_disabled.
1592
1593         * html/HTMLInputElement.h: Changed type to return a const AtomicString& instead
1594         of a String. Removed maintainsState, state, and restoreState functions, and added
1595         new stateValue and restoreState functions. Added m_inited (moved here from the generic
1596         form element base class).
1597         * html/HTMLInputElement.cpp:
1598         (WebCore::HTMLInputElement::init): Call registerFormElementWithState. This was
1599         formerly done by the HTML parser.
1600         (WebCore::HTMLInputElement::~HTMLInputElement): Call deregisterFormElementWithState
1601         by its new name.
1602         (WebCore::HTMLInputElement::isKeyboardFocusable): Use form() instead of m_form.
1603         (WebCore::HTMLInputElement::setType): Ditto.
1604         (WebCore::HTMLInputElement::setInputType): Ditto. Also call inputType() != PASSWORD
1605         instead of maintainsState(), since this is the only function that needs to know
1606         the rule and it's no longer a function in the base class. Also call register and
1607         deregister functions by their new names.
1608         (WebCore::HTMLInputElement::type): Changed to return const AtomicString& instead
1609         of String.
1610         (WebCore::HTMLInputElement::stateValue): Renamed from state and changed to no
1611         longer include the name and type, formerly obtained by calling the base class's
1612         HTMLGenericFormElement::state, and to no longer modify the value() string by
1613         adding a ".", which gets in the way of distinguishing null and empty values
1614         and is slower and unnecessary.
1615         (WebCore::HTMLInputElement::restoreState):  Changed because it takes a single
1616         state and doesn't need to call findMatchingState, and also to no longer remove the last
1617         character from the value when restoring state.
1618         (WebCore::HTMLInputElement::parseMappedAttribute): Use form() instead of m_form.
1619         (WebCore::HTMLInputElement::isSuccessfulSubmitButton): Use disabled() instead of
1620         m_disabled.
1621         (WebCore::HTMLInputElement::setChecked): Use form() instead of m_form.
1622         (WebCore::HTMLInputElement::preDispatchEventHandler): Ditto.
1623         (WebCore::HTMLInputElement::defaultEventHandler): Ditto.
1624
1625         * html/HTMLSelectElement.h: Changed type to return a const AtomicString& instead
1626         of a String.
1627         * html/HTMLSelectElement.cpp:
1628         (WebCore::HTMLSelectElement::HTMLSelectElement): Call registerFormElementWithState.
1629         This was formerly done by the HTML parser.
1630         (WebCore::HTMLSelectElement::~HTMLSelectElement): Call deregisterFormElementWithState
1631         by its new name.
1632         (WebCore::HTMLSelectElement::type): Changed to return const AtomicString& instead
1633         of String.
1634         (WebCore::HTMLSelectElement::stateValue): Renamed from state and changed to no
1635         longer include the name and type, formerly obtained by calling the base class's
1636         HTMLGenericFormElement::state, and to build the string in a Vector<char> instead of
1637         appending characters one at a time to a string.
1638         (WebCore::HTMLSelectElement::restoreState):  Changed because it takes a single
1639         state and doesn't need to call findMatchingState.
1640         (WebCore::HTMLSelectElement::defaultEventHandler): Use form() instead of m_form.
1641
1642         * html/HTMLTextAreaElement.h: Changed type to return a const AtomicString& instead
1643         of a String. Removed maintainsState, state, and restoreState functions, and added
1644         new stateValue and restoreState functions.
1645         * html/HTMLTextAreaElement.cpp:
1646         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Call registerFormElementWithState.
1647         This was formerly done by the HTML parser. Also use member initialization instead of
1648         assignment.
1649         (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Call deregisterFormElementWithState
1650         by its new name.
1651         (WebCore::HTMLTextAreaElement::type): Changed to return const AtomicString& instead
1652         of String.
1653         (WebCore::HTMLTextAreaElement::stateValue): Renamed from state and changed to no
1654         longer include the name and type, formerly obtained by calling the base class's
1655         HTMLGenericFormElement::state, and to no longer modify the value() string by
1656         adding a ".", which is unnecessary.
1657         (WebCore::HTMLTextAreaElement::restoreState): Changed because it takes a single
1658         state and doesn't need to call findMatchingState, and also to no longer remove the last
1659         character from the value when restoring state.
1660         (WebCore::HTMLTextAreaElement::updateValue): Changed to const.
1661         (WebCore::HTMLTextAreaElement::value): Ditto.
1662         (WebCore::HTMLTextAreaElement::defaultValue): Ditto.
1663
1664         * html/HTMLFieldSetElement.h: Changed type to return a const AtomicString& instead
1665         of a String.
1666         * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::type): Ditto.
1667         * html/HTMLKeygenElement.h: Ditto.
1668         * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::type): Ditto.
1669         * html/HTMLLegendElement.h: Ditto.
1670         * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::type):
1671         * html/HTMLOptGroupElement.h: Ditto.
1672         * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::type): Ditto.
1673         * html/HTMLOptionElement.h: Ditto.
1674         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::type): Ditto.
1675
1676         * ksvg2/svg/SVGAnimationElement.cpp: (SVGAnimationElement::closeRenderer):
1677         Added missing call to base class.
1678
1679         * rendering/render_form.h: Removed element() functions that cast to the
1680         appropriate derived element class. They do make some bits of code slightly
1681         more readable, but they also require including too many headers. Removed
1682         the includes of HTMLInputElement.h, HTMLSelectElement.h, HTMLTextAreaElement.h,
1683         and KWQLineEdit.h, and added an include of GraphicsTypes.h.
1684         * rendering/render_form.cpp:
1685         (WebCore::RenderFormElement::updateFromElement): Changed use of element()
1686         to instead use node() and cast.
1687         (WebCore::RenderFormElement::clicked): Ditto.
1688         (WebCore::RenderLineEdit::selectionChanged): Ditto.
1689         (WebCore::RenderLineEdit::returnPressed): Ditto.
1690         (WebCore::RenderLineEdit::performSearch): Ditto.
1691         (WebCore::RenderLineEdit::addSearchResult): Ditto.
1692         (WebCore::RenderLineEdit::calcMinMaxWidth): Ditto.
1693         (WebCore::RenderLineEdit::setStyle): Ditto.
1694         (WebCore::RenderLineEdit::updateFromElement): Ditto.
1695         (WebCore::RenderLineEdit::valueChanged): Ditto.
1696         (WebCore::RenderFileButton::calcMinMaxWidth): Ditto.
1697         (WebCore::RenderFileButton::updateFromElement): Ditto.
1698         (WebCore::RenderFileButton::returnPressed): Ditto.
1699         (WebCore::RenderFileButton::valueChanged): Ditto.
1700         (WebCore::RenderSelect::updateFromElement): Ditto.
1701         (WebCore::RenderSelect::layout): Ditto.
1702         (WebCore::RenderSelect::valueChanged): Ditto.
1703         (WebCore::RenderSelect::selectionChanged): Ditto.
1704         (WebCore::RenderSelect::updateSelection): Ditto.
1705         (WebCore::RenderTextArea::destroy): Ditto.
1706         (WebCore::RenderTextArea::calcMinMaxWidth): Ditto.
1707         (WebCore::RenderTextArea::setStyle): Ditto.
1708         (WebCore::RenderTextArea::updateFromElement): Ditto.
1709         (WebCore::RenderTextArea::valueChanged): Ditto.
1710         (WebCore::RenderTextArea::selectionChanged): Ditto.
1711         (WebCore::RenderSlider::updateFromElement): Ditto.
1712         (WebCore::RenderSlider::valueChanged): Ditto.
1713
1714 2006-05-05  Matt Gough  <matt@softchaos.com>
1715
1716         Reviewed by Darin.
1717
1718         http://bugzilla.opendarwin.org/show_bug.cgi?id=8563
1719
1720         Test: fast/doctypes/005-case-preserving.html
1721
1722         The doctype object in the DOM is now usable by client code
1723         as opposed to always being exposed as nil. Now also ensures that
1724         the 'name' of the component preserves the case of the original html source.
1725         (i.e HtMl -> HtMl not HTML)
1726
1727         * dom/Document.h:
1728         Changes comment by docType() to say it may return 0 for html
1729         * html/HTMLDocument.cpp:
1730         (WebCore::parseDocTypeDeclaration):
1731         (WebCore::HTMLDocument::determineParseMode):
1732         Preserves the case of the name component
1733         (WebCore::HTMLDocument::doctype):removed
1734         * html/HTMLDocument.h:
1735         (WebCore::HTMLDocument::doctype):removed
1736
1737 2006-05-05  Rob Buis  <buis@kde.org>
1738
1739         Reviewed by Darin.
1740
1741         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8651:
1742         [DOMHTMLSelectElement multiple] returns no when the select element is multiple
1743
1744         Correct the logic errors, which are clearly indicated by the changeset given
1745         in the bug report.
1746
1747         * bindings/objc/DOMHTML.mm:
1748         (-[DOMHTMLLinkElement disabled]):
1749         (-[DOMHTMLSelectElement disabled]):
1750         (-[DOMHTMLSelectElement multiple]):
1751         (-[DOMHTMLOptGroupElement disabled]):
1752         (-[DOMHTMLOptionElement defaultSelected]):
1753         (-[DOMHTMLOptionElement disabled]):
1754
1755 2006-05-04  Darin Adler  <darin@apple.com>
1756
1757         Reviewed by Tim Omernick.
1758
1759         - fix storage leak I introduced yesterday
1760
1761         * platform/cg/GraphicsContextCG.cpp:
1762         (WebCore::setCGFillColor): Added.
1763         (WebCore::setCGStrokeColor): Added.
1764         (WebCore::GraphicsContext::drawRect): Use setCGFillColor to avoid allocating
1765         a CGColorRef object.
1766         (WebCore::GraphicsContext::drawLine): Use setCGStrokeColor and setCGFillColor
1767         to avoid allocating a CGColorRef object.
1768         (WebCore::GraphicsContext::drawEllipse): Ditto.
1769         (WebCore::GraphicsContext::drawArc): Ditto.
1770         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
1771         (WebCore::GraphicsContext::fillRect): Ditto.
1772
1773 2006-05-04  Justin Garcia  <justin.garcia@apple.com>
1774
1775         Reviewed by harrison
1776
1777         * dom/Node.cpp:
1778         (WebCore::Node::rootEditableElement):
1779         Restored code to stop at the body tag.  Editing shouldn't be allowed to 
1780         happen outside the body, so it needs to be the editable root even if the 
1781         html element is contentEditable.
1782         * editing/ReplaceSelectionCommand.cpp:
1783         (WebCore::ReplaceSelectionCommand::shouldMergeEnd):
1784         Now takes in more information so it can be "the decider".
1785         (WebCore::ReplaceSelectionCommand::doApply):
1786         Merging two paragraphs will destroy the moved one's block styles. Perform 
1787         the end merge backward (from content already in the document to just inserted
1788         content) if moving forward would move the paragraph that contained the start of 
1789         the selection being pasted into, since we always want to preserve that paragraph's 
1790         block style.
1791         Moving backward in this case is also helpful because otherwise it would be
1792         difficult to remember the position where inserted content began (since merging
1793         would remove m_firstNodeInserted).  That position is needed in order to select 
1794         the replacement and to add smart replace whitespace.
1795         (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded):
1796         If [br, 0] is at the end of a block, the br is not necessarily collapsed
1797         in quirks mode.  [br, 0] needs to also not be at the start of a block.
1798          
1799         * editing/ReplaceSelectionCommand.h:
1800
1801 2006-05-04  Tim Omernick  <timo@apple.com>
1802
1803         Reviewed by Darin.
1804
1805         <rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element
1806
1807         * bridge/mac/WebCoreFrameBridge.h:
1808         Added DOMElement parameter to -viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:.
1809
1810         * bridge/JavaAppletWidget.h:
1811         Constructor now takes the applet's element instead of its containing frame.
1812
1813         * bridge/mac/JavaAppletWidget.mm:
1814         (JavaAppletWidget::JavaAppletWidget):
1815         Pass the applet's element to viewForJavaAppletWithFrame:.
1816
1817         * rendering/RenderApplet.cpp:
1818         (WebCore::RenderApplet::createWidgetIfNecessary):
1819         Pass the element along to JavaAppletWidget.
1820
1821 2006-05-04  Tim Omernick  <timo@apple.com>
1822
1823         Reviewed by John Sullivan.
1824
1825         <rdar://problem/4480186> Give WebKit plugins access to their own DOM element
1826
1827         * bridge/mac/WebCoreFrameBridge.h:
1828         Added DOMElement: parameter to -viewForPluginWithURL:attributeNames:attributueValues:MIMEType:
1829
1830         * bridge/mac/FrameMac.h:
1831         * bridge/mac/FrameMac.mm:
1832         (WebCore::FrameMac::createPlugin):
1833         Added "element" parameter; wrap element in DOMElement and pass up to the bridge.
1834
1835         * page/Frame.h:
1836         Added "element" parameter to createPlugin().
1837         * page/Frame.cpp:
1838         (WebCore::Frame::loadPlugin):
1839         Get the plugin's DOM element and pass to createPlugin().
1840
1841 2006-05-04  Eric Seidel  <eseidel@apple.com>
1842
1843         Reviewed by timo.
1844
1845         Add drag & drop support to <input type="file">
1846         http://bugzilla.opendarwin.org/show_bug.cgi?id=8733
1847
1848         Test: manual/input-type-file-drag-drop.html
1849
1850         * kwq/KWQFileButton.mm:
1851         (-[WebFileChooserButton initWithWidget::]):
1852         (-[WebCoreFileButton initWithWidget:]):
1853         (-[WebCoreFileButton drawRect:]):
1854         (-[WebCoreFileButton updateLabel]):
1855         (-[WebCoreFileButton setFilename:]):
1856         (-[WebCoreFileButton changeFilename:]):
1857         (-[WebCoreFileButton chooseFilename:]):
1858         (validFilenameFromPasteboard):
1859         (-[WebCoreFileButton draggingEntered:]):
1860         (-[WebCoreFileButton draggingExited:]):
1861         (-[WebCoreFileButton performDragOperation:]):
1862
1863 2006-05-04  Beth Dakin  <bdakin@apple.com>
1864
1865         Reviewed by Hyatt.
1866
1867         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8732 
1868         Backgrounds with background-size and background-origin do not 
1869         always lay out correctly
1870
1871         * platform/cairo/ImageCairo.cpp:
1872         (WebCore::Image::drawTiled): We no longer need to scale the source 
1873         point since it will now come in with the scale already taken into 
1874         account.
1875         * platform/mac/ImageMac.mm:
1876         (WebCore::Image::drawTiled): Same as above.
1877         * rendering/RenderBox.cpp:
1878         (WebCore::cacluateBackgroundSize): Now calculate the background 
1879         size in a helper method.
1880         (WebCore::RenderBox::paintBackgroundExtended): Calculate the 
1881         background size before calculating cx, cy, cw, ch, sx, and sy so 
1882         that they can all be calculated with the scaled image size taken 
1883         into account.
1884
1885 2006-05-04  David Hyatt  <hyatt@apple.com>
1886
1887         Fix for 8693, crash when reloading PDF. Make sure to clear the truncator's
1888         cached renderer.
1889
1890         Reviewed by beth
1891
1892         * bridge/mac/WebCoreStringTruncator.h:
1893         * bridge/mac/WebCoreStringTruncator.mm:
1894         (+[WebCoreStringTruncator clear]):
1895         * platform/mac/WebTextRendererFactory.mm:
1896         (-[WebTextRendererFactory clearCaches]):
1897
1898 2006-05-03  Darin Adler  <darin@apple.com>
1899
1900         Reviewed by Eric.
1901
1902         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8696
1903           another round of GraphicsContext improvements
1904
1905         * WebCore.xcodeproj/project.pbxproj: Added GraphicsContextCG.cpp.
1906         * html/CanvasRenderingContext2D.cpp:
1907         (WebCore::CanvasRenderingContext2D::scale): Use new GraphicsContext function.
1908         (WebCore::CanvasRenderingContext2D::rotate): Ditto.
1909         (WebCore::CanvasRenderingContext2D::translate): Ditto.
1910         * kwq/KWQComboBox.mm: Added include (not sure if this is needed for this patch,
1911         but it's needed for one of my upcoming ones).
1912
1913         * platform/GraphicsContext.h: Changed fillColor and setFillColor to use Color
1914         instead of RGBA32. Removed setColorFromFillColor and setColorFromPen. Added
1915         scale, rotate, and translate functions.
1916         * platform/GraphicsContext.cpp:
1917         (WebCore::GraphicsContext::setFillColor): Changed to use Color instead of RGBA32.
1918         (WebCore::GraphicsContext::fillColor): Ditto.
1919
1920         * platform/GraphicsTypes.h: Moved HorizontalAlignment here.
1921         * platform/Widget.h: Removed HorizontalAlignment from here.
1922
1923         * platform/cg/GraphicsContextCG.cpp: Added. Started as a copy of GraphicsContextMac.mm.
1924         (WebCore::GraphicsContext::drawRect): Rewrote to not rely on [NSGraphicsContext currentContext].
1925         (WebCore::GraphicsContext::drawLine): Ditto.
1926         (WebCore::GraphicsContext::drawEllipse): Ditto.
1927         (WebCore::GraphicsContext::drawArc): Ditto.
1928         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
1929         (WebCore::GraphicsContext::fillRect): Ditto.
1930         (WebCore::GraphicsContext::setLineWidth):  Added check of paintingDisabled(). 
1931         (WebCore::GraphicsContext::setMiterLimit): Ditto.
1932         (WebCore::GraphicsContext::setAlpha): Ditto.
1933         (WebCore::GraphicsContext::clearRect): Ditto.
1934         (WebCore::GraphicsContext::strokeRect): Ditto.
1935         (WebCore::GraphicsContext::setLineCap): Ditto.
1936         (WebCore::GraphicsContext::setLineJoin): Ditto.
1937         (WebCore::GraphicsContext::clip): Ditto.
1938         (WebCore::GraphicsContext::scale): Added.
1939         (WebCore::GraphicsContext::rotate): Added.
1940         (WebCore::GraphicsContext::translate): Added.
1941
1942         * platform/mac/GraphicsContextMac.mm: Moved most of this file into GraphicsContextCG.cpp.
1943         (WebCore::GraphicsContext::setCompositeOperation): Added check of paintingDisabled().
1944
1945         * platform/mac/WebCoreSystemInterface.h: Added declarations so this header
1946         stands alone.
1947
1948 2006-05-03  Darin Adler  <darin@apple.com>
1949
1950         Reviewed by Justin.
1951
1952         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8159
1953           REGRESSION: Clicking outside new text field focuses the field
1954
1955         This bug has always been present for "content editable" HTML, but
1956         now affects <input type=text> as well. The problem is with the editing
1957         concept of a "deep equivalent". When computing the deep equivalent,
1958         the code can move from outside an editable area to inside. To fix this,
1959         I removed all use of the "deep equivalent" concept.
1960
1961         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
1962         Changed argument names from _x and _y to just x and y. When the element
1963         is the editable root, changed things so that clicks that are not within
1964         the element at all return positions before or after the element, rather than
1965         always choosing the closest point within the element. This gets us off on
1966         the right foot, by not choosing a position inside an editable root when you
1967         click outside that editable root. This code handles shadowParentNode as well,
1968         and also calls positionForCoordinates on children rather than calling
1969         positionForRenderer (which I believe is now a function that can be removed).
1970
1971         * editing/VisiblePosition.h: Removed the deepEquivalent function.
1972         * editing/VisiblePosition.cpp:
1973         (WebCore::VisiblePosition::previousVisiblePosition): Removed use of the
1974         deepEquivalent function. Also, to make this function easier to understand
1975         I separated out the case where the start point is "in rendered content"
1976         and the case where it's not into two separate loops.
1977         (WebCore::VisiblePosition::nextVisiblePosition): Ditto.
1978         (WebCore::VisiblePosition::initDeepPosition): Removed use of the deepEquivalent
1979         function. Also added code to make sure that this work never turns a position
1980         outside an editable element into a position inside that editable element, or
1981         vice versa. Reorganized the code a bit.
1982
1983         * dom/Position.cpp:
1984         (WebCore::Position::upstream): Removed use of the deepEquivalent function.
1985         (WebCore::Position::downstream): Ditto.
1986
1987         * editing/htmlediting.cpp:
1988         (WebCore::editingIgnoresContent): Changed to use isReplaced instead of isWidget
1989         and isImage to determine if editing should ignore content.
1990         (WebCore::firstInSpecialElement): Rewrote isFirstVisiblePositionInSpecialElement
1991         to have code to share with positionBeforeContainingSpecialElement. And changed
1992         to allow both the position just before a table and the position just inside a
1993         table to qualify. While this is slightly sloppy, the old code worked because
1994         of the "deep equivalent" technique. This change is needed to get the desired
1995         results even without that technique.
1996         (WebCore::lastInSpecialElement): Ditto.
1997         (WebCore::isFirstVisiblePositionInSpecialElement): Changed to use the new function.
1998         (WebCore::positionBeforeContainingSpecialElement): Ditto.
1999         (WebCore::isLastVisiblePositionInSpecialElement): Ditto.
2000         (WebCore::positionAfterContainingSpecialElement): Ditto.
2001
2002         * dom/Node.cpp: (WebCore::Node::rootEditableElement): Rewrote to remove
2003         special case for body tag.
2004
2005         - other changes
2006
2007         * html/HTMLElement.cpp:
2008         (WebCore::HTMLElement::setOuterHTML): Added a FIXME about the fact
2009         that this won't merge neighboring text nodes the way setOuterText does.
2010         (WebCore::HTMLElement::setInnerText): Added a FIXME about the fact that
2011         this creates a text node even when setting to empty text.
2012         (WebCore::HTMLElement::setOuterText): Ditto.
2013
2014         * editing/DeleteSelectionCommand.cpp: Removed some #if 1 and #if 0.
2015         * editing/ReplaceSelectionCommand.cpp: A little reformatting.
2016         * rendering/render_button.h: Tiny formatting tweak.
2017
2018 2006-05-02  Adele Peterson  <adele@apple.com>
2019
2020         Reviewed by Beth.
2021
2022         Fix for <rdar://problem/4523671> 
2023         REGRESSION (NativeTextField): Auto-complete popup list doesn't appear at the correct location after scrolling page.
2024
2025         * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement _rectOnScreen]):
2026         Use the documentView to compute the correct rect for the element when the view is scrolled.
2027
2028 2006-05-02  Justin Garcia  <justin.garcia@apple.com>
2029
2030         Reviewed by harrison
2031         
2032         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8704>
2033         Fix a few end merge bugs
2034         <rdar://problem/4424044>
2035         REGRESSION: Extra line appears when typing
2036
2037         * bridge/mac/WebCoreFrameBridge.mm:
2038         (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]): 
2039         Use renamed characterAfter.
2040         * editing/InsertParagraphSeparatorCommand.cpp:
2041         (WebCore::InsertParagraphSeparatorCommand::doApply):
2042         Regenerate a VisiblePosition that became stale during a text node split.
2043         Don't rebalance whitespace after the operation, 1) it has a bug that turns preserved
2044         newlines into nbsps, 2) I think it should only be done during serialization, not after 
2045         every command (since editable regions now always have -webkit-nbsp-mode:space on them).
2046         Use a regular br for the placeholder as I think we can move away from -webkit-block-placeholders.
2047         
2048         * editing/RebalanceWhitespaceCommand.cpp: Added FIXMEs.
2049         * editing/ReplaceSelectionCommand.cpp:
2050         (WebCore::ReplaceSelectionCommand::shouldMergeStart): Removed FIXME.
2051         (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Can now use rendering information.
2052         (WebCore::ReplaceSelectionCommand::doApply):
2053         Call shouldMergeEnd after the insertion so that it can use rendering information.
2054         Don't use positionAfterNode of the last node inserted to mark the position at the end 
2055         of inserted content because canonicalization can send it into content that was already
2056         in the document.
2057         
2058         * editing/ReplaceSelectionCommand.h:
2059         * editing/VisiblePosition.cpp:
2060         (WebCore::VisiblePosition::characterAfter): 
2061         Renamed.  When two candidates are visually equivalent, the rightmost candidate will be 
2062         the one inside the text node where the character will be.
2063         
2064         * editing/VisiblePosition.h:
2065         * editing/htmlediting.cpp:
2066         (WebCore::enclosingTableCell): Added.
2067         (WebCore::enclosingList):
2068         * editing/htmlediting.h:
2069
2070 2006-05-02  David Hyatt  <hyatt@apple.com>
2071
2072         Partial fix for the crash in bugzilla bug 8088.  There's a third crash
2073         even after fixing this though.
2074
2075         Reviewed by darin
2076
2077         * platform/mac/WebTextRenderer.mm:
2078         (WebCore::WidthMap::widths):
2079         (WebCore::extendWidthMap):
2080         * platform/mac/WebTextRendererFactory.mm:
2081         (-[WebTextRendererFactory clearCaches]):
2082
2083 2006-05-02  Steve Falkenburg  <sfalken@apple.com>
2084
2085         Reviewed by eric.
2086
2087         * WebCore.vcproj/WebCore/WebCore.vcproj: defined NDEBUG in release build
2088         * bridge/win/FrameWin.cpp:
2089         (WebCore::FrameWin::FrameWin): turned on javascript.
2090         * kwq/KWQKHTMLSettings.h: 
2091         (KHTMLSettings::KHTMLSettings): initialized settings to 0
2092
2093 2006-05-02  David Hyatt  <hyatt@apple.com>
2094
2095         Make sure to updateLayout on all scrolling functions (in particular when
2096         setting scrollLeft/Top).
2097
2098         Reviewed by eric
2099
2100         fast/overflow/008,html added as a test case.
2101
2102         * dom/Element.cpp:
2103         (WebCore::Element::scrollIntoView):
2104         (WebCore::Element::scrollIntoViewIfNeeded):
2105         (WebCore::Element::setScrollLeft):
2106         (WebCore::Element::setScrollTop):
2107
2108 2006-05-02  Anders Carlsson  <andersca@mac.com>
2109
2110         Reviewed by Dave Hyatt.
2111         
2112         http://bugzilla.opendarwin.org/show_bug.cgi?id=8688
2113         file URLs aren't being serialized correctly when using window.location
2114         
2115         * platform/KURL.cpp:
2116         (KURL::prettyURL):
2117         Append "//" for file URLs.
2118         
2119 2006-05-01  David Hyatt  <hyatt@apple.com>
2120
2121         Convert WebTextRenderer to be a C++ class.  Change the factory so
2122         that it uses pointer-based hashmaps instead of NSMutableDictionaries.
2123         Convert uses of malloc/free to new/delete so that they start using
2124         the fastMalloc/fastFree code.
2125
2126         Reviewed by darin
2127
2128         * bridge/mac/WebCoreStringTruncator.mm:
2129         (stringWidth):
2130         (truncateString):
2131         * kwq/KWQComboBox.mm:
2132         (QComboBox::sizeHint):
2133         * kwq/KWQLineEdit.mm:
2134         (QLineEdit::sizeForCharacterWidth):
2135         * kwq/KWQListBox.mm:
2136         (itemTextRenderer):
2137         (groupLabelTextRenderer):
2138         (QListBox::sizeForNumberOfLines):
2139         (QListBox::clearCachedTextRenderers):
2140         (-[KWQTableView drawRow:clipRect:]):
2141         * platform/FontDataSet.h:
2142         * platform/mac/FontMac.mm:
2143         (WebCore::FontDataSet::~FontDataSet):
2144         (WebCore::FontDataSet::getRenderer):
2145         (WebCore::FontDataSet::invalidate):
2146         (WebCore::Font::ascent):
2147         (WebCore::Font::descent):
2148         (WebCore::Font::lineSpacing):
2149         (WebCore::Font::xHeight):
2150         (WebCore::Font::selectionRectForText):
2151         (WebCore::Font::drawText):
2152         (WebCore::Font::drawHighlightForText):
2153         (WebCore::Font::drawLineForText):
2154         (WebCore::Font::drawLineForMisspelling):
2155         (WebCore::Font::misspellingLineThickness):
2156         (WebCore::Font::floatWidth):
2157         (WebCore::Font::checkSelectionPoint):
2158         * platform/mac/WebCoreTextRenderer.mm:
2159         (WebCoreDrawTextAtPoint):
2160         (WebCoreTextFloatWidth):
2161         (WebCoreSetAlwaysUseATSU):
2162         * platform/mac/WebTextRenderer.h:
2163         (WebCore::WebTextRenderer::ascent):
2164         (WebCore::WebTextRenderer::descent):
2165         (WebCore::WebTextRenderer::lineSpacing):
2166         (WebCore::WebTextRenderer::lineGap):
2167         (WebCore::WebTextRenderer::misspellingLineThickness):
2168         (WebCore::WebTextRenderer::misspellingLinePatternWidth):
2169         (WebCore::WebTextRenderer::misspellingLinePatternGapWidth):
2170         * platform/mac/WebTextRenderer.mm:
2171         (WebCore::WebCoreInitializeFont):
2172         (WebCore::WebCoreInitializeTextRun):
2173         (WebCore::WebCoreInitializeEmptyTextStyle):
2174         (WebCore::WebCoreInitializeEmptyTextGeometry):
2175         (WebCore::widthForGlyph):
2176         (WebCore::overrideLayoutOperation):
2177         (WebCore::m_ATSUMirrors):
2178         (WebCore::WebTextRenderer::~WebTextRenderer):
2179         (WebCore::WebTextRenderer::xHeight):
2180         (WebCore::WebTextRenderer::drawRun):
2181         (WebCore::WebTextRenderer::floatWidthForRun):
2182         (WebCore::WebTextRenderer::drawLineForCharacters):
2183         (WebCore::WebTextRenderer::selectionRectForRun):
2184         (WebCore::WebTextRenderer::drawHighlightForRun):
2185         (WebCore::WebTextRenderer::drawLineForMisspelling):
2186         (WebCore::WebTextRenderer::pointToOffset):
2187         (WebCore::WebTextRenderer::setAlwaysUseATSU):
2188         (WebCore::getSmallCapsRenderer):
2189         (WebCore::findSubstituteFont):
2190         (WebCore::rendererForAlternateFont):
2191         (WebCore::computeWidthForSpace):
2192         (WebCore::setUpFont):
2193         (WebCore::CG_selectionRect):
2194         (WebCore::CG_draw):
2195         (WebCore::updateGlyphMapEntry):
2196         (WebCore::extendGlyphMap):
2197         (WebCore::extendWidthMap):
2198         (WebCore::initializeATSUStyle):
2199         (WebCore::createATSULayoutParameters):
2200         (WebCore::disposeATSULayoutParameters):
2201         (WebCore::addDirectionalOverride):
2202         (WebCore::ATSU_selectionRect):
2203         (WebCore::ATSU_draw):
2204         (WebCore::ATSU_pointToOffset):
2205         (WebCore::freeWidthMap):
2206         (WebCore::freeGlyphMap):
2207         (WebCore::glyphForCharacter):
2208         (WebCore::advanceWidthIterator):
2209         * platform/mac/WebTextRendererFactory.h:
2210         * platform/mac/WebTextRendererFactory.mm:
2211         (-[WebTextRendererFactory clearCaches]):
2212         (-[WebTextRendererFactory init]):
2213         (-[WebTextRendererFactory dealloc]):
2214         (-[WebTextRendererFactory rendererWithFont:]):
2215
2216 2006-05-01  Justin Garcia  <justin.garcia@apple.com>
2217
2218         Reviewed by darin
2219         
2220         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8653>
2221         Remove a use of hasMoreThanOneBlock, which uses info from the test rendering.
2222
2223         * editing/DeleteSelectionCommand.cpp:
2224         (WebCore::DeleteSelectionCommand::initializePositionData):
2225         Removed code that stopped the merge if the end of the selection to delete
2226         was in a fully selected line, which was nonsense.
2227         
2228         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2229         Deletion does a bad job of updating the endpoints of the selection as it removes 
2230         content.  If the endpoints have been flip flipped, bail.
2231         If deletion has removed everything from the block that contained the
2232         start of the selection to delete, we can't create a visible position inside 
2233         that block to serve as a destination for the merge.  So, we insert a placeholder 
2234         at that position to prop the block open to let content in.
2235         
2236         * editing/ReplaceSelectionCommand.cpp:
2237         (WebCore::ReplaceSelectionCommand::doApply):
2238         Added an assert and two early returns for cases where we'll crash.
2239         Removed a use of !fragment.hasMoreThanOneBlock, which uses test rendering info 
2240         and which was wrong.
2241         If we've already inserted content during the start merge, insertionPos will be 
2242         the position just after that content, so inserting new content before insertionPos 
2243         will reverse its order.
2244
2245 2006-05-01  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2246
2247         Reviewed by Darin.
2248
2249         - manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8658
2250           Assertion failure in -[WebPluginContainerCheck _isForbiddenFileLoad]
2251           (bridge is null) when clicking QuickTime object with href
2252
2253         * manual-tests/plugin-controller-datasource.html: Added.
2254         * manual-tests/resources/orange.mov: Added.
2255
2256 2006-04-30  Rob Buis  <buis@kde.org>
2257
2258         Reviewed by eseidel.  Landed by eseidel.
2259
2260         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8651:
2261         CGContextSetLineDash: invalid dash array: emmited during WebKit tests
2262
2263         Properly discard invalid stroke-dasharray properties like in
2264         invalid-css.svg.  (Tests updated.)
2265
2266         * ksvg2/css/SVGCSSParser.cpp:
2267         (WebCore::CSSParser::parseSVGStrokeDasharray):
2268
2269 2006-04-28  David Hyatt  <hyatt@apple.com>
2270
2271         Make image buffer sizes in the loader more accurate, since we know we store
2272         buffers with 4 bytes per pixel.  Double sizes to account for this.  Also
2273         deal better with animated GIFs that may have thousands of frames by adding
2274         in a heuristic that will use the data size instead of a single frame RGBA32
2275         buffer size if it's larger.
2276
2277         Reviewed by darin
2278
2279         * loader/Cache.cpp:
2280         * loader/CachedImage.cpp:
2281         (WebCore::CachedImage::data):
2282
2283 2006-04-28  Steve Falkenburg  <sfalken@apple.com>
2284
2285         Reviewed by eric.
2286
2287         No test necessary - fixing Win32 build, turned off C++ exceptions, turned off RTTI
2288
2289         * WebCore.vcproj/WebCore/WebCore.vcproj:
2290         * bridge/win/FrameWin.cpp:
2291         (WebCore::FrameWin::~FrameWin):
2292         * bridge/win/PageWin.cpp:
2293         (WebCore::Page::Page):
2294         * page/Page.h:
2295         * platform/win/TemporaryLinkStubs.cpp:
2296         (FrameWin::saveDocumentState):
2297         (Path::contains):
2298         (Path::boundingRect):
2299
2300 2006-04-28  David Hyatt  <hyatt@apple.com>
2301
2302         Merge WebCoreTextRenderer into WebTextRenderer.  Merge WebCoreTextRendererFactory
2303         into WebTextRendererFactory.  Change all callers to refer to the concrete classes
2304         now.  Change WebCoreTextRenderer.h to be the public API that WebKit uses when
2305         it calls in to WebCore.  Clean up the exports to remove things WebKit no longer
2306         needs.
2307
2308         Reviewed by darin
2309
2310         * WebCore.exp:
2311         * WebCore.xcodeproj/project.pbxproj:
2312         * bridge/mac/WebCoreStringTruncator.mm:
2313         (stringWidth):
2314         (truncateString):
2315         (+[WebCoreStringTruncator widthOfString:font:]):
2316         * kwq/KWQComboBox.mm:
2317         (QComboBox::sizeHint):
2318         * kwq/KWQLineEdit.mm:
2319         (QLineEdit::sizeForCharacterWidth):
2320         * kwq/KWQListBox.mm:
2321         (itemTextRenderer):
2322         (groupLabelTextRenderer):
2323         (QListBox::sizeForNumberOfLines):
2324         (-[KWQTableView drawRow:clipRect:]):
2325         * platform/Font.h:
2326         * platform/FontDataSet.h:
2327         * platform/mac/FontMac.mm:
2328         (WebCore::FontDataSet::getWebCoreFont):
2329         (WebCore::FontDataSet::getRenderer):
2330         (WebCore::FontDataSet::determinePitch):
2331         * platform/mac/WebCoreTextRenderer.h:
2332         * platform/mac/WebCoreTextRendererFactory.mm:
2333         (-[WebCoreTextRendererFactory init]):
2334         * platform/mac/WebTextRenderer.h:
2335         * platform/mac/WebTextRenderer.mm:
2336         * platform/mac/WebTextRendererFactory.h:
2337         * platform/mac/WebTextRendererFactory.mm:
2338         (WebCoreInitializeFont):
2339         (WebCoreInitializeTextRun):
2340         (WebCoreInitializeEmptyTextStyle):
2341         (WebCoreInitializeEmptyTextGeometry):
2342         (-[WebTextRendererFactory clearCaches]):
2343         (+[WebTextRendererFactory createSharedFactory]):
2344         (+[WebTextRendererFactory sharedFactory]):
2345         (-[WebTextRendererFactory init]):
2346
2347 2006-04-28  David Hyatt  <hyatt@apple.com>
2348
2349         Fix for 8586, move WebTextRenderer into WebCore.
2350
2351         Reviewed by darin
2352
2353         * WebCore.exp:
2354         * WebCore.xcodeproj/project.pbxproj:
2355         * bridge/mac/WebCoreStringTruncator.mm:
2356         * platform/mac/WebCoreSystemInterface.h:
2357         * platform/mac/WebCoreSystemInterface.mm:
2358         * platform/mac/WebCoreTextRenderer.h:
2359         * platform/mac/WebCoreTextRendererFactory.mm:
2360         (+[WebCoreTextRendererFactory sharedFactory]):
2361         * platform/mac/WebTextRenderer.h: Added.
2362         * platform/mac/WebTextRenderer.mm: Added.
2363         (widthForGlyph):
2364         (-[WebTextRenderer initWithFont:]):
2365         (destroy):
2366         (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
2367         (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
2368         (findSubstituteFont):
2369         (setUpFont):
2370         (pathFromFont):
2371         (drawGlyphs):
2372         (CG_draw):
2373         (extendGlyphMap):
2374         (extendWidthMap):
2375         (initializeATSUStyle):
2376         (createATSULayoutParameters):
2377         (getTextBounds):
2378         (addDirectionalOverride):
2379         (ATSU_draw):
2380         (normalizeVoicingMarks):
2381         (advanceWidthIterator):
2382         (fillStyleWithAttributes):
2383         * platform/mac/WebTextRendererFactory.h: Added.
2384         * platform/mac/WebTextRendererFactory.mm: Added.
2385         (getAppDefaultValue):
2386         (getUserDefaultValue):
2387         (getLCDScaleParameters):
2388         (fontsChanged):
2389         (+[WebTextRendererFactory createSharedFactory]):
2390         (-[WebTextRendererFactory isFontFixedPitch:]):
2391         (-[WebTextRendererFactory fontWithFamily:traits:size:]):
2392         (FontCacheKeyCopy):
2393         (-[WebTextRendererFactory cachedFontFromFamily:traits:size:]):
2394
2395 2006-04-28  Eric Seidel  <eseidel@apple.com>
2396
2397         Fix by beth.  Reviewed by darin.  Landed by eseidel.
2398
2399         Make hackish fix to avoid crash in Xcode and Filemaker.
2400         <rdar://problem/4059059> Crash in RenderFlow::detach (XCode Documentation Window)
2401
2402         * bridge/mac/WebCoreFrameBridge.mm:
2403         (-[WebCoreFrameBridge didNotOpenURL:pageCache:]):
2404
2405 2006-04-28  Alexey Proskuryakov  <ap@nypop.com>
2406
2407         Reviewed by hyatt.
2408
2409         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5855
2410           REGRESSION: revert SGML comment parsing fix (comment parsing causes most of usbank.com page to be missing)
2411
2412         * html/HTMLTokenizer.cpp:
2413         (WebCore::HTMLTokenizer::parseComment): Revert one change made for acid2, 
2414         <http://weblogs.mozillazine.org/hyatt/acid6.txt>.
2415
2416 2006-04-28  Darin Adler  <darin@apple.com>
2417
2418         Reviewed by Eric.
2419
2420         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8608
2421           make GraphicsContext more suitable for cross-platform use, step 2
2422
2423         - Changed GraphicsContext to use NSGraphicsContext as little as possible.
2424         - Removed the printing flag from GraphicsContext.
2425         - Changed GraphicsContext to assume the NSGraphicsContext is always flipped,
2426           and got rid of parameters to pass the flipped boolean around.
2427
2428         * WebCore.vcproj/WebCore/WebCore.vcproj: Add GraphicsTypes.h/cpp and remove
2429         CompositeOperator.h/cpp.
2430         * WebCore.xcodeproj/project.pbxproj: Ditto.
2431
2432         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::setDisplaysWithFocusAttributes):
2433         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge drawRect:]):
2434         * html/CanvasPattern.cpp: (WebCore::patternCallback):
2435         * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createDrawingContext):
2436         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2437         (WebCore::KRenderingDeviceContextQuartz::createGraphicsContext):
2438         * platform/mac/WidgetMac.mm: (WebCore::Widget::lockDrawingFocus):
2439         Update for changes to GraphicsContext constructor (no flipped or printing boolean).
2440
2441         * html/CanvasRenderingContext2D.h: Added a Path to the context state. Changed the
2442         LineCap and LineJoin types to use the new ones in GraphicsTypes.h instead of defining
2443         types here in this class. Changed m_platformContextStrokeStyleIsPattern and
2444         m_platformContextFillStyleIsPattern to be named m_appliedStrokePattern and
2445         m_appliedFillPattern and moved them outside the __APPLE__ ifdefs. Removed the
2446         platformContext() function. Moved applyStrokePattern and applyFillPattern out of
2447         the __APPLE__ ifdef.
2448
2449         * html/CanvasRenderingContext2D.cpp:
2450         (WebCore::CanvasRenderingContext2D::State::State): Moved the stroke pattern
2451         booleans out of Mac-specific ifdef.
2452         (WebCore::CanvasRenderingContext2D::save): Changed to use GraphicsContext instead
2453         of using CGContext directly.
2454         (WebCore::CanvasRenderingContext2D::restore): Ditto.
2455         (WebCore::CanvasRenderingContext2D::setStrokeStyle): Ditto.
2456         (WebCore::CanvasRenderingContext2D::setFillStyle): Ditto.
2457         (WebCore::CanvasRenderingContext2D::setLineWidth): Ditto.
2458         (WebCore::CanvasRenderingContext2D::lineCap): Ditto.
2459         (WebCore::CanvasRenderingContext2D::setLineCap): Ditto.
2460         (WebCore::CanvasRenderingContext2D::lineJoin): Ditto.
2461         (WebCore::CanvasRenderingContext2D::setLineJoin): Ditto.
2462         (WebCore::CanvasRenderingContext2D::setMiterLimit): Ditto.
2463         (WebCore::CanvasRenderingContext2D::shadowColor): Ditto.
2464         (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Ditto.
2465         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Ditto.
2466         (WebCore::CanvasRenderingContext2D::scale): Update since platformContext() function
2467         no longer exists.
2468         (WebCore::CanvasRenderingContext2D::rotate): Ditto.
2469         (WebCore::CanvasRenderingContext2D::translate): Ditto.
2470         (WebCore::CanvasRenderingContext2D::beginPath): Changed to use GraphicsContext instead
2471         of using CGContext directly.
2472         (WebCore::CanvasRenderingContext2D::closePath): Ditto.
2473         (WebCore::CanvasRenderingContext2D::moveTo): Ditto.
2474         (WebCore::CanvasRenderingContext2D::lineTo): Ditto.
2475         (WebCore::CanvasRenderingContext2D::quadraticCurveTo): Ditto.
2476         (WebCore::CanvasRenderingContext2D::bezierCurveTo): Ditto.
2477         (WebCore::CanvasRenderingContext2D::arcTo): Ditto.
2478         (WebCore::CanvasRenderingContext2D::arc): Ditto.
2479         (WebCore::CanvasRenderingContext2D::rect): Ditto.
2480         (WebCore::CanvasRenderingContext2D::fill): Changed to use the current path from this class
2481         instead of relying on the CGContext's current path.
2482         (WebCore::CanvasRenderingContext2D::stroke): Ditto.
2483         (WebCore::CanvasRenderingContext2D::clip): Changed to use the current path and use the
2484         GraphicsContext instead of using CGContext directly.
2485         (WebCore::CanvasRenderingContext2D::clearRect): Changed to use GraphicsContext instead
2486         of using CGContext directly.
2487         (WebCore::CanvasRenderingContext2D::fillRect): Update since platformContext() function
2488         no longer exists.
2489         (WebCore::CanvasRenderingContext2D::strokeRect): Ditto.
2490         (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
2491         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
2492         (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
2493         (WebCore::CanvasRenderingContext2D::drawImageFromRect): Ditto.
2494         (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
2495         (WebCore::CanvasRenderingContext2D::applyStrokePattern): Made a tiny bit of this function
2496         cross-platform. The bulk is still Mac-specific.
2497         (WebCore::CanvasRenderingContext2D::applyFillPattern): Ditto.
2498
2499         * html/CanvasStyle.h: Changed to use GraphicsContext instead of CGContext. Now the
2500         platform-specific stuff is in the implementation, not the header.
2501         * html/CanvasStyle.cpp:
2502         (WebCore::CanvasStyle::applyStrokeColor): Moved the ifdefs inside the function, getting
2503         us one step closer to platform independence.
2504         (WebCore::CanvasStyle::applyFillColor): Ditto.
2505
2506         * html/html_imageimpl.cpp:
2507         (WebCore::HTMLAreaElement::getRect): Update for changes to the Path class.
2508         (WebCore::HTMLAreaElement::getRegion): Ditto.
2509
2510         * page/Frame.cpp:
2511         (WebCore::Frame::paint): Change to check printing flag on the document, rather than on
2512         the GraphicsContext, since there is no printing flag for GraphicsContext any more.
2513         (WebCore::Frame::adjustPageHeight): Update for change to GraphicsContext constructor.
2514
2515         * platform/GraphicsContext.h: Define a type called PlatformGraphicsContext so the
2516         platform-specific getter and constructor don't have to be ifdef'd. Added clearRect,
2517         strokeRect, setLineWidth, setLineCap, setLineJoin, setMiterLimit, setAlpha, setCompositeOperation,
2518         and clip functions. Removed the isForPrinting parameter from createGraphicsContextPrivate.
2519         * platform/GraphicsContext.cpp:
2520         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate): Removed isForPrinting.
2521         (WebCore::GraphicsContext::createGraphicsContextPrivate): Ditto.
2522         * platform/mac/GraphicsContextMac.mm:
2523         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2524         Removed NSGraphicsContext.
2525         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2526         Ditto.
2527         (WebCore::GraphicsContext::GraphicsContext): Removed constructor that
2528         takes an NSGraphicsContext. Removed the flipText and forPrinting parameters
2529         to the other constructor.
2530         (WebCore::GraphicsContext::savePlatformState): Removed NSGraphicsContext code.
2531         (WebCore::GraphicsContext::restorePlatformState): Ditto.
2532         (WebCore::GraphicsContext::drawRect): Updated assertion to more-precisely
2533         reflect the limitation of the current version of this function.
2534         (WebCore::GraphicsContext::setColorFromFillColor): Ditto.
2535         (WebCore::GraphicsContext::setColorFromPen): Ditto.
2536         (WebCore::GraphicsContext::drawLine): Updated assertion to more-precisely
2537         reflect the limitation of the current version of this function.
2538         (WebCore::setCompositeOperation):
2539         (WebCore::GraphicsContext::fillRect): Ditto.
2540         (WebCore::GraphicsContext::setLineWidth): Added.
2541         (WebCore::GraphicsContext::setMiterLimit): Added.
2542         (WebCore::GraphicsContext::setAlpha): Added.
2543         (WebCore::GraphicsContext::setCompositeOperation): Added.
2544         (WebCore::GraphicsContext::clearRect): Added.
2545         (WebCore::GraphicsContext::strokeRect): Added.
2546         (WebCore::GraphicsContext::setLineCap): Added.
2547         (WebCore::GraphicsContext::setLineJoin): Added.
2548         (WebCore::GraphicsContext::clip): Added.
2549
2550         * platform/CompositeOperator.cpp: Removed.
2551         * platform/CompositeOperator.h: Removed.
2552         * platform/GraphicsTypes.cpp: Added. Includes CompositeOperator, LineCap, and LineJoin.
2553         * platform/GraphicsTypes.h: Added.
2554
2555         * platform/Image.h: Changed include to GraphicsTypes.h from CompositeOperator.h.
2556
2557         * platform/Path.h: Removed constructors that take a Rect and an array of points. Made
2558         the Path mutable. Changed the types for contains and boundingRect to be float-based
2559         instead of int-based. Changed translate to take a FloatSize instead of two integers.
2560         Added clear, moveTo, addLineTo, addQuadCurveTo, addBezierCurveTo, addArcTo, closeSubpath,
2561         addArc, addRect, addEllipse, and platformPath functions. Defined a PlatformPath type
2562         so we don't have to ifdef the header so much.
2563         * platform/cg/PathCG.cpp:
2564         (WebCore::Path::Path): Changed class to always have a mutable path.
2565         (WebCore::Path::operator=): Changed to make a mutable copy.
2566         (WebCore::Path::contains): Changed to take a FloatPoint instead of IntPoint.
2567         (WebCore::Path::translate): Changed to use a FloatSize instead of two ints.
2568         (WebCore::Path::boundingRect): Changed to return a FloatRect.
2569         (WebCore::Path::moveTo): Added.
2570         (WebCore::Path::addLineTo): Added.
2571         (WebCore::Path::addQuadCurveTo): Added.
2572         (WebCore::Path::addBezierCurveTo): Added.
2573         (WebCore::Path::addArcTo): Added.
2574         (WebCore::Path::closeSubpath): Added.
2575         (WebCore::Path::addArc): Added.
2576         (WebCore::Path::addRect): Added.
2577         (WebCore::Path::addEllipse): Added.
2578         (WebCore::Path::clear): Added.
2579
2580         * platform/mac/ImageMac.mm:
2581         (WebCore::fillSolidColorInRect): Changed to take a GraphicsContext instead of
2582         a CGContext.
2583         (WebCore::Image::checkForSolidColor): Changed to use the new setCompositeOperation
2584         in GraphicsContex.
2585         (WebCore::Image::draw): Changed to use the new PDF image and fillSolidColorInRect
2586         function that take GraphicsContext instead of CGContext.
2587         (WebCore::Image::drawTiled): Ditto.
2588
2589         * platform/mac/PDFDocumentImage.h: Made most functions private. Changed to
2590         use GraphicsContext and FloatRect instead of CGContext and NSRect. Also
2591         removed the unused alpha and flipped booleans.
2592         * platform/mac/PDFDocumentImage.mm:
2593         (WebCore::PDFDocumentImage::bounds): Update for change in types.
2594         (WebCore::PDFDocumentImage::adjustCTM): Ditto.
2595         (WebCore::PDFDocumentImage::setCurrentPage): Ditto.
2596         (WebCore::PDFDocumentImage::draw): Ditto.
2597
2598         * platform/win/TemporaryLinkStubs.cpp: Added lots of new stubs.
2599
2600         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Changed to get
2601         printing boolean from document instead graphics context.
2602         * rendering/RenderBlock.cpp:
2603         (WebCore::RenderBlock::paintChildren): Ditto.
2604         (WebCore::RenderBlock::paintObject): Ditto.
2605         * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintLines): Ditto.
2606         * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paint): Ditto.
2607         * rendering/RenderImage.cpp: (WebCore::RenderImage::paint): Ditto.
2608         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintButton): Ditto.
2609         * rendering/render_list.cpp: (WebCore::RenderListMarker::paint): Ditto.
2610         * rendering/render_replaced.cpp: (WebCore::RenderWidget::paint): Ditto.
2611
2612 2006-04-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2613
2614         Reviewed by hyatt, landed by ap.
2615
2616         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6769
2617           REGRESSION: Incomplete repaint when a cell's extra bottom margin grows
2618
2619         Test: fast/repaint/table-extra-bottom-grow.html
2620
2621         * rendering/RenderBlock.cpp:
2622         (WebCore::RenderBlock::overflowRect): Changed to not add the top/left overflow twice and
2623         allow the normal overflow height to overlap with the bottom extra height.
2624         * rendering/RenderTableRow.cpp:
2625         (WebCore::RenderTableRow::layout): Removed the code that resets the extra heights.
2626         * rendering/RenderTableSection.cpp:
2627         (WebCore::RenderTableSection::layoutRows): If the top extra height changed or the
2628         bottom extra height increased, just repaint the entire cell.
2629
2630 2006-04-28  Eric Seidel  <eseidel@apple.com>
2631
2632         Reviewed by andersca.
2633
2634         Remove KCanvasContainerQuartz, pushing all logic into KCanvasContainer.
2635         
2636         No tests affected.
2637
2638         * kcanvas/KCanvasContainer.cpp:
2639         (WebCore::KCanvasContainer::canHaveChildren):
2640         (WebCore::KCanvasContainer::requiresLayer):
2641         (WebCore::KCanvasContainer::lineHeight):
2642         (WebCore::KCanvasContainer::baselinePosition):
2643         (WebCore::KCanvasContainer::calcMinMaxWidth):
2644         (WebCore::KCanvasContainer::layout):
2645         (WebCore::KCanvasContainer::paint):
2646         (WebCore::KCanvasContainer::setViewport):
2647         (WebCore::KCanvasContainer::viewport):
2648         (WebCore::KCanvasContainer::setViewBox):
2649         (WebCore::KCanvasContainer::viewBox):
2650         (WebCore::KCanvasContainer::setAlign):
2651         (WebCore::KCanvasContainer::align):
2652         (WebCore::KCanvasContainer::viewportTransform):
2653         (WebCore::KCanvasContainer::getAbsoluteRepaintRect):
2654         (WebCore::KCanvasContainer::absoluteTransform):
2655         (WebCore::KCanvasContainer::getAspectRatio):
2656         * kcanvas/KCanvasContainer.h:
2657         (WebCore::KCanvasContainer::renderName):
2658         * kcanvas/device/KRenderingDevice.h:
2659         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
2660         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
2661         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
2662         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2663         (WebCore::KRenderingDeviceQuartz::createPaintServer):
2664         * ksvg2/svg/SVGAElement.cpp:
2665         (WebCore::SVGAElement::createRenderer):
2666         * ksvg2/svg/SVGGElement.cpp:
2667         (SVGGElement::createRenderer):
2668         * ksvg2/svg/SVGMarkerElement.cpp:
2669         (WebCore::SVGMarkerElement::createRenderer):
2670         * ksvg2/svg/SVGMaskElement.cpp:
2671         (WebCore::SVGMaskElement::createRenderer):
2672         * ksvg2/svg/SVGPatternElement.cpp:
2673         (WebCore::SVGPatternElement::createRenderer):
2674         * ksvg2/svg/SVGSVGElement.cpp:
2675         (WebCore::SVGSVGElement::createRenderer):
2676         * ksvg2/svg/SVGSwitchElement.cpp:
2677         (WebCore::SVGSwitchElement::createRenderer):
2678         * ksvg2/svg/SVGUseElement.cpp:
2679         (SVGUseElement::createRenderer):
2680
2681 2006-04-27  Eric Seidel  <eseidel@apple.com>
2682
2683         Reviewed by andersca.
2684
2685         Make WebCore accept any */*+xml type as XML.
2686         http://bugzilla.opendarwin.org/show_bug.cgi?id=5998
2687         <rdar://problem/4031511> XmlHttpRequest doesn't allow responses with Content-Type: application/soap+xml
2688
2689         Test: http/tests/xmlhttprequest/supported-xml-content-types.html
2690
2691         * dom/DOMImplementation.cpp:
2692         (WebCore::DOMImplementation::isXMLMIMEType):
2693
2694 2006-04-27  Eric Seidel  <eseidel@apple.com>
2695
2696         * WebCore.vcproj/WebCore/WebCore.vcproj: Fix break from last checkin.
2697
2698 2006-04-27  Geoffrey Garen  <ggaren@apple.com>
2699
2700         Reviewed by Maciej.
2701
2702         - Added global constructor autogeneration for the following,
2703         many of which are required by *.live.com: Node, Element, Range,
2704         CSSRule, CSSValue, CSSPrimitiveValue, CSSStyleDeclaration, Event,
2705         MutationEvent, NodeFilter
2706
2707         It works like so:
2708         
2709         - The autogenerator knows about the "Constructor" data type, which
2710         gets special treatment because it exists purely in the
2711         bindings. It also knows about the "GenerateConstructor" interface
2712         attribute, which does just that.
2713
2714         - The window interface has many Constructor attributes
2715
2716         - The hash table generator swizzles empty tables to tables with one
2717         empty bucket, to prevent crashes in Lookup::findEntry. (The old
2718         generator used to work this way, too.)
2719
2720         - Window object property lookup gets special treatment to allow
2721         shadowing of its built-in global constructor properties. We'll
2722         need to expand this mechanism in the future and make it more
2723         flexible, but it works for now.
2724         
2725         * DerivedSources.make:
2726         * WebCore.vcproj/WebCore/WebCore.vcproj:
2727         * WebCore.xcodeproj/project.pbxproj:
2728         * bindings/js/kjs_css.cpp:
2729         (KJS::toJS):
2730         * bindings/js/kjs_css.h:
2731         * bindings/js/kjs_window.cpp: Removed 'namedFrameGetter' and its use
2732         because they were bogus; added FIXME describing what they were
2733         attempting to do.
2734         (KJS::Window::getValueProperty):
2735         (KJS::Window::getOverridePropertySlot):
2736         (KJS::Window::getOwnPropertySlot):
2737         * bindings/js/kjs_window.h:
2738         (KJS::Window::):
2739         * bindings/scripts/CodeGeneratorJS.pm:
2740         * css/CSSPrimitiveValue.idl:
2741         * css/CSSRule.idl:
2742         * css/CSSStyleDeclaration.idl: Added.
2743         * css/CSSValue.idl:
2744         * dom/Document.idl:
2745         * dom/Element.idl:
2746         * dom/Event.idl:
2747         * dom/MutationEvent.idl:
2748         * dom/Node.idl:
2749         * dom/NodeFilter.idl:
2750         * dom/Range.idl:
2751         * page/DOMWindow.idl:
2752
2753 2006-04-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2754
2755         Reviewed by darin
2756         
2757         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8607>
2758         Automate repaint tests
2759
2760         * manual-tests/backgroundSizeRepaint.html: Removed.
2761         * manual-tests/border-repaint-glitch.html: Removed.
2762         * manual-tests/bugzilla-3509.html: Removed.
2763         * manual-tests/bugzilla-5699.html: Removed.
2764         * manual-tests/bugzilla-6278.html: Removed.
2765         * manual-tests/bugzilla-6388.html: Removed.
2766         * manual-tests/bugzilla-6473.html: Removed.
2767         * manual-tests/bugzilla-7235.html: Removed.
2768         * manual-tests/inline-outline-repaint.html: Removed.
2769         * manual-tests/outline-repaint-glitch.html: Removed.
2770         * manual-tests/repaint-resized-overflow.html: Removed.
2771         * manual-tests/table-cell-move.html: Removed.
2772
2773 2006-04-27  Justin Garcia  <justin.garcia@apple.com>
2774
2775         Reviewed by darin
2776         
2777         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8624>
2778         Placeholders aren't always removed during paste
2779         <rdar://problem/4059807>
2780         Seed: Mail: pasting quoted content sometimes adds a phantom newline
2781
2782         * editing/CompositeEditCommand.cpp: Added a FIXME.
2783         * editing/ReplaceSelectionCommand.cpp:
2784         (WebCore::ReplaceSelectionCommand::doApply):
2785         Removed two no-op setEndingSelection calls.
2786         Store away a br at the position where we'll start inserting content in case the 
2787         br a) is made unnecessary by the insertion (it's collapsed away) b) was acting 
2788         as a placeholder and should therefore be displaced by inserted content or c) was
2789         acting as a line break and, as a result of the insertion, is now acting as a 
2790         placeholder.  
2791         Don't only store away brs that have the webkit-block-placeholder class on them.
2792         Any br that does any of the three things just mentioned should be removed.
2793         The linePlaceholder removal was run after the code that makes sure to interpret 
2794         incoming brs strictly, and was negating that work in certain cases.
2795         
2796         (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded): Described above.
2797         * editing/ReplaceSelectionCommand.h:
2798         * editing/VisiblePosition.cpp:
2799         (WebCore::isEqualIgnoringAffinity): 
2800         Added a workaround for 8622.  We want this function to return true even if one of 
2801         the two visible positions has been incorrectly canonicalized.
2802
2803 2006-04-26  Tim Omernick  <timo@apple.com>
2804
2805         Reviewed by Hyatt.
2806
2807         <rdar://problem/4068375> Flash inserted via innerHTML Fails to Show when CSS Display
2808         Style is Toggled via Javascript
2809
2810         * html/html_objectimpl.cpp:
2811         (WebCore::HTMLObjectElement::setComplete):
2812         Set needWidgetUpdate when finished parsing, even if the object element is not in
2813         a document.  That way, when the element attaches to a document, it will update its
2814         widget (creating the plug-in view if necessary).  This is important when the object
2815         is being inserted via setInnerHTML, since the parsed nodes are not added to the
2816         document until the whole HTML string is parsed.
2817
2818 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
2819
2820         Reviewed by Hyatt.
2821
2822         - Fixed http://bugzilla.opendarwin.org/post_bug.cgi
2823         REGRESSION (r14048): Google calendar not parsing
2824         
2825         * html/HTMLParser.cpp:
2826         (WebCore::HTMLParser::handleError): Rolling out grandparent NULL check
2827         because it caused this regression and there's no test case
2828         justifying it.
2829         
2830 2006-04-26  Justin Garcia  <justin.garcia@apple.com>
2831
2832         Reviewed by hyatt
2833         
2834         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8459>
2835         REGRESSION: Content lost during a delete/merge of whitespace:pre text
2836
2837         * editing/CompositeEditCommand.cpp:
2838         (WebCore::CompositeEditCommand::prune): 
2839         The function would prune a rendered leaf because it assumed that the 
2840         first node passed to it would be a container.
2841         The old code ascended using the DOM tree, and would remove the <b> when
2842         pruning the <div> in <b><div></div>foo</b>.  Now ascends using the render tree.
2843
2844 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
2845
2846         This time for sure. Fixed Windows build too.
2847         
2848         * WebCore.vcproj/WebCore/WebCore.vcproj:
2849         * WebCore.xcodeproj/project.pbxproj:
2850
2851 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
2852
2853         Reviewed by TimO.
2854
2855         Build fix.
2856
2857         * bindings/js/kjs_dom.cpp:
2858         * bindings/js/kjs_domnode.h:
2859
2860 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
2861
2862         Reviewed by OMG DETHBAKIN.
2863
2864         - Start autogenerating Node. This fixes many missing attributes in our
2865         DOM by making prototypes hold their relevant constants as properties.
2866
2867         * DerivedSources.make:
2868         * WebCore.xcodeproj/project.pbxproj:
2869         * bindings/js/kjs_dom.cpp:
2870         (KJS::DOMEventTargetNode::DOMEventTargetNode):
2871         (KJS::toJS):
2872         * bindings/js/kjs_dom.h:
2873         (KJS::DOMEventTargetNode::):
2874         * bindings/js/kjs_domnode.h: Had to break DOMNode into a separate
2875         header to avoid circular dependency in header includes. Gave it an
2876         old-school file name to keep distinguishing beteween old school and
2877         news school files easy.
2878         (KJS::DOMNode::impl):
2879         (KJS::DOMNode::classInfo):
2880         (KJS::DOMNode::):
2881         * bindings/js/kjs_window.cpp:
2882         (KJS::Window::getValueProperty):
2883         * bindings/scripts/CodeGeneratorJS.pm:
2884         * dom/DocumentType.idl:
2885         * dom/Entity.idl:
2886         * dom/Node.idl: Added.
2887         * dom/Notation.idl:
2888         * dom/ProcessingInstruction.idl:
2889
2890 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
2891
2892         Reviewed by Darin.
2893
2894         Committing the project file change jhaygood suggesed in
2895         http://bugzilla.opendarwin.org/show_bug.cgi?id=8044
2896         WebKit Visual Studio 2005 project shouldn't use the SolutionDir
2897         
2898         Instead of his patch, I used the following commands:
2899
2900         sed -e 's/$(SolutionDir)/$(ProjectDir)\\../g' Image\ Viewer/Image\
2901         Viewer.vcproj > Image\ Viewer/Image\ Viewer.vcproj_ && mv Image\
2902         Viewer/Image\ Viewer.vcproj_ Image\ Viewer/Image\ Viewer.vcproj
2903
2904         sed -e 's/$(SolutionDir)/$(ProjectDir)\\../g'
2905         WebCore/WebCore.vcproj > WebCore/WebCore.vcproj_ && mv
2906         WebCore/WebCore.vcproj_ WebCore/WebCore.vcproj
2907
2908         * Viewer.vcproj:
2909         * WebCore.vcproj/WebCore/WebCore.vcproj:
2910
2911 2006-04-25  Justin Garcia  <justin.garcia@apple.com>
2912
2913         Reviewed by harrison
2914
2915         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8583>
2916         Moving paste code around and some small fixes
2917         
2918         Moved code to make it easier to do the start merge after the fact, 
2919         with moveParagraph, instead of in the middle of the paste operation.
2920
2921         * editing/CompositeEditCommand.cpp:
2922         (WebCore::CompositeEditCommand::moveParagraph):
2923         * editing/ReplaceSelectionCommand.cpp:
2924         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2925         (WebCore::ReplaceSelectionCommand::shouldMergeStart):
2926         Moved code to make this decision to its own function.  Moved special case
2927         checks to the top.  Added m_forceMergeStart to override the special cases 
2928         because moveParagraph uses ReplaceSelectionCommand and expects a merge.
2929         
2930         (WebCore::ReplaceSelectionCommand::shouldMergeEnd): 
2931         No functional changes, just moved code here.
2932         (WebCore::ReplaceSelectionCommand::doApply):
2933         Do the end merge in the opposite direction.  Merging two paragraphs destroys
2934         the moved one's block level styles, and we prefer to use the styles of the 
2935         one that was in the document, not the one that's being pasted.
2936         
2937         * editing/ReplaceSelectionCommand.h:
2938         * editing/Selection.h:
2939         (WebCore::Selection::visibleStart): Added.
2940         (WebCore::Selection::visibleEnd): Added.
2941         * editing/htmlediting.cpp:
2942         (WebCore::enclosingList): Added.
2943         (WebCore::isMailBlockquote): 
2944         Don't require a renderer so that this can be used on nodes in fragments.
2945         
2946         * editing/htmlediting.h:
2947
2948 2006-04-25  Geoffrey Garen  <ggaren@apple.com>
2949
2950         Reviewed by Maciej.
2951
2952         - Removed special handling of attributes in the DOM. To match
2953         WinIE, we used to make all attributes available as properties of
2954         their elements in the DOM, but that has caused us more
2955         compatibility woes than it has solved, so, after talking with Darin
2956         and Maciej, I'm taking it out. (Firefox does not support it.)
2957
2958         A layout test regression caused by this change led me to do the
2959         following as well:
2960         
2961         - Implemented DOM properties missing on EMBED elements: align, height,
2962         name, width, src, type. Since align, height, name, and width are
2963         common to all plugin elements, I factored them and some other common
2964         functionality out into a new abstract base class, HTMLPlugInElement.
2965
2966         - Removed extraneous attribute-to-style mappings on EMBED elements:
2967         valign, border. Why they were there in the first place is a question
2968         for the ages. Neither FF nor IE supports them.
2969
2970         * bindings/js/kjs_dom.cpp:
2971         (KJS::getRuntimeObject):
2972         * bindings/js/kjs_html.cpp:
2973         (KJS::):
2974         (KJS::JSHTMLElement::classInfo):
2975         (KJS::JSHTMLElement::accessors):
2976         (KJS::JSHTMLElement::embedGetter):
2977         (KJS::JSHTMLElement::embedSetter):
2978         * bindings/js/kjs_html.h:
2979         (KJS::JSHTMLElement::):
2980         * bindings/scripts/CodeGeneratorJS.pm:
2981         * dom/Element.idl:
2982         * html/html_objectimpl.cpp:
2983         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2984         (WebCore::HTMLPlugInElement::align):
2985         (WebCore::HTMLPlugInElement::setAlign):
2986         (WebCore::HTMLPlugInElement::height):
2987         (WebCore::HTMLPlugInElement::setHeight):
2988         (WebCore::HTMLPlugInElement::name):
2989         (WebCore::HTMLPlugInElement::setName):
2990         (WebCore::HTMLPlugInElement::width):
2991         (WebCore::HTMLPlugInElement::setWidth):
2992         (WebCore::HTMLPlugInElement::mapToEntry):
2993         (WebCore::HTMLPlugInElement::parseMappedAttribute):
2994         (WebCore::HTMLPlugInElement::checkDTD):
2995         (WebCore::HTMLAppletElement::HTMLAppletElement):
2996         (WebCore::HTMLAppletElement::~HTMLAppletElement):
2997         (WebCore::HTMLAppletElement::parseMappedAttribute):
2998         (WebCore::HTMLAppletElement::insertedIntoDocument):
2999         (WebCore::HTMLAppletElement::removedFromDocument):
3000         (WebCore::HTMLAppletElement::getInstance):
3001         (WebCore::HTMLAppletElement::closeRenderer):
3002         (WebCore::HTMLAppletElement::detach):
3003         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
3004         (WebCore::HTMLEmbedElement::~HTMLEmbedElement):
3005         (WebCore::HTMLEmbedElement::getInstance):
3006         (WebCore::HTMLEmbedElement::mapToEntry):
3007         (WebCore::HTMLEmbedElement::parseMappedAttribute):
3008         (WebCore::HTMLEmbedElement::attach):
3009         (WebCore::HTMLEmbedElement::detach):
3010         (WebCore::HTMLEmbedElement::insertedIntoDocument):
3011         (WebCore::HTMLEmbedElement::removedFromDocument):
3012         (WebCore::HTMLEmbedElement::src):
3013         (WebCore::HTMLEmbedElement::setSrc):
3014         (WebCore::HTMLEmbedElement::type):
3015         (WebCore::HTMLEmbedElement::setType):
3016         (WebCore::HTMLObjectElement::HTMLObjectElement):
3017         (WebCore::HTMLObjectElement::~HTMLObjectElement):
3018         (WebCore::HTMLObjectElement::getInstance):
3019         (WebCore::HTMLObjectElement::parseMappedAttribute):
3020         (WebCore::HTMLObjectElement::rendererIsNeeded):
3021         (WebCore::HTMLObjectElement::attach):
3022         (WebCore::HTMLObjectElement::closeRenderer):
3023         (WebCore::HTMLObjectElement::detach):
3024         (WebCore::HTMLObjectElement::insertedIntoDocument):
3025         (WebCore::HTMLObjectElement::removedFromDocument):
3026         (WebCore::HTMLObjectElement::recalcStyle):
3027         * html/html_objectimpl.h:
3028         (WebCore::HTMLPlugInElement::endTagRequirement):
3029         (WebCore::HTMLAppletElement::tagPriority):
3030         (WebCore::HTMLEmbedElement::tagPriority):
3031         (WebCore::HTMLObjectElement::tagPriority):
3032
3033 2006-04-25  Beth Dakin  <bdakin@apple.com>
3034
3035         Reviewed by Maciej.
3036
3037         Fix for <rdar://problem/4518632> getComputedStyle returns 'auto' 
3038         for dimensions like 'margin-left'
3039
3040         * css/CSSComputedStyleDeclaration.cpp:
3041         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): For 
3042         margin and padding, to match Firefox we now go to the renderer to 
3043         get the property value instead of calling valueForLength() on the 
3044         style attribute. valueForLength() will return the string 'auto' if 
3045         that was what was specified in the CSS, or a percentage if it was 
3046         specified as a percent. But to match Firefox, we always want to 
3047         return a pixel value for margin and padding.
3048
3049 2006-04-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3050
3051         Reviewed by darin.  Landed by eseidel.
3052
3053         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8452
3054           mangleme(0x58c22e11): Random crashes
3055
3056         Test: fast/frames/empty-cols-attribute.html
3057
3058         * platform/StringImpl.cpp:
3059         (WebCore::StringImpl::toLengthArray): If the string is empty, return 0
3060         but set len to 1. This gives the same behavior you get if you don't specify
3061         the attribute at all, matching WinIE and Firefox. Previously, the empty
3062         string resulted in len being set to 0 (and a memory smasher in
3063         RenderFrameSet::layout()).
3064         * rendering/render_frames.cpp:
3065         (WebCore::RenderFrameSet::layout): Added an assert.
3066
3067 2006-04-26  Oliver Hunt  <ojh16@student.canterbury.ac.nz>
3068
3069         Reviewed by eseidel.  Landed by eseidel.
3070
3071         * WebCore.xcodeproj/project.pbxproj:
3072         * kcanvas/KCanvasFilters.cpp:
3073         (WebCore::operator<<):
3074         * kcanvas/KCanvasFilters.h:
3075         (WebCore::KCComponentTransferFunction::KCComponentTransferFunction):
3076         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
3077         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3078         (WebCore::getVectorForChannel):
3079         (WebCore::genImageFromTable):
3080         (WebCore::filterForComponentFunc):
3081         (WebCore::setParametersForComponentFunc):
3082         (WebCore::getFilterForFunc):
3083         (WebCore::KCanvasFEComponentTransferQuartz::getFunctionFilter):
3084         (WebCore::KCanvasFEComponentTransferQuartz::getCIFilter):
3085         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
3086         (WebCore::KRenderingDeviceQuartz::createFilterEffect):
3087         * kcanvas/device/quartz/filters/WKComponentMergeFilter.cikernel: Added.
3088         * kcanvas/device/quartz/filters/WKComponentMergeFilter.h: Added.
3089         * kcanvas/device/quartz/filters/WKComponentMergeFilter.m: Added.
3090         (+[WKComponentMergeFilter initialize]):
3091         (+[WKComponentMergeFilter filterWithName:]):
3092         (-[WKComponentMergeFilter init]):
3093         (-[WKComponentMergeFilter outputImage]):
3094         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.cikernel: Added.
3095         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.h: Added.
3096         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.m: Added.
3097         (+[WKDiscreteTransferFilter initialize]):
3098         (+[WKDiscreteTransferFilter filterWithName:]):
3099         (-[WKDiscreteTransferFilter init]):
3100         (-[WKDiscreteTransferFilter outputImage]):
3101         * kcanvas/device/quartz/filters/WKGammaTransferFilter.cikernel: Added.
3102         * kcanvas/device/quartz/filters/WKGammaTransferFilter.h: Added.
3103         * kcanvas/device/quartz/filters/WKGammaTransferFilter.m: Added.
3104         (+[WKGammaTransferFilter initialize]):
3105         (+[WKGammaTransferFilter filterWithName:]):
3106         (-[WKGammaTransferFilter init]):
3107         (-[WKGammaTransferFilter outputImage]):
3108         * kcanvas/device/quartz/filters/WKIdentityTransferFilter.h: Added.
3109         * kcanvas/device/quartz/filters/WKIdentityTransferFilter.m: Added.
3110         (+[WKIdentityTransferFilter initialize]):
3111         (+[WKIdentityTransferFilter filterWithName:]):
3112         (-[WKIdentityTransferFilter init]):
3113         (-[WKIdentityTransferFilter outputImage]):
3114         * kcanvas/device/quartz/filters/WKLinearTransferFilter.cikernel: Added.
3115         * kcanvas/device/quartz/filters/WKLinearTransferFilter.h: Added.
3116         * kcanvas/device/quartz/filters/WKLinearTransferFilter.m: Added.
3117         (+[WKLinearTransferFilter initialize]):
3118         (+[WKLinearTransferFilter filterWithName:]):
3119         (-[WKLinearTransferFilter init]):
3120         (-[WKLinearTransferFilter outputImage]):
3121         * kcanvas/device/quartz/filters/WKTableTransferFilter.cikernel: Added.
3122         * kcanvas/device/quartz/filters/WKTableTransferFilter.h: Added.
3123         * kcanvas/device/quartz/filters/WKTableTransferFilter.m: Added.
3124         (+[WKTableTransferFilter initialize]):
3125         (+[WKTableTransferFilter filterWithName:]):
3126         (-[WKTableTransferFilter init]):
3127         (-[WKTableTransferFilter outputImage]):
3128         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
3129         (SVGComponentTransferFunctionElement::parseMappedAttribute):
3130         (SVGComponentTransferFunctionElement::transferFunction):
3131
3132 2006-04-25  Eric Seidel  <eseidel@apple.com>
3133
3134         Reviewed by ggaren.
3135
3136         Make trunk match the branch.  Now nodes are fully removed
3137         from the tree before calling detach.  There is (thankfully) no
3138         good way to test this, as no one should depend on this behavior.
3139         This change was made are part of fixing:
3140         <rdar://problem/4427024> repro crash on www.formassembly.com in khtml::RenderBlock::addChildToFlow
3141         <rdar://problem/4233435> CrashTracer: 2698 crashes in Safari at com.apple.WebCore: khtml::RenderBlock::addChildToFlow + 156
3142         on the branch.
3143
3144         * dom/ContainerNode.cpp:
3145         (WebCore::ContainerNode::removeChildren):
3146
3147 2006-04-25  Maciej Stachowiak  <mjs@apple.com>
3148
3149         Reviewed by Adele.
3150
3151         - don't have a fini method, since trying to call it will actually call the subclass method
3152         and mess up the bridge count.
3153
3154         * bridge/mac/WebCoreFrameBridge.mm:
3155         (-[WebCoreFrameBridge dealloc]):
3156         (-[WebCoreFrameBridge finalize]):
3157
3158 2006-04-25  Steve Falkenburg  <sfalkenburg@apple.com>
3159
3160         Reviewed by eseidel.
3161
3162         No test case needed
3163
3164         * platform/win/TemporaryLinkStubs.cpp:
3165         (KWQFileButton::setFrameGeometry):
3166
3167 2006-04-25  Eric Seidel  <eseidel@apple.com>
3168
3169         Reviewed by mjs.
3170
3171         Fix reproducible crash in html parser code.
3172         http://bugzilla.opendarwin.org/show_bug.cgi?id=7137
3173
3174         Test: fast/parser/remove-current-node-parent.html
3175
3176         * html/HTMLParser.cpp:
3177         (WebCore::HTMLParser::handleError):
3178
3179 2006-04-25  Maciej Stachowiak  <mjs@apple.com>
3180
3181         Reviewed by Eric.
3182
3183         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8575
3184         New KWQFileButton leaks reported by buildbot
3185
3186         * kwq/KWQFileButton.mm:
3187         (KWQFileButton::KWQFileButton): Add a missing release
3188
3189 2006-04-24  David Hyatt  <hyatt@apple.com>
3190
3191         Fix for 8336, focus ring redrawing on top of itself.  Make sure
3192         not to include empty rects when doing the focus ring drawing, since
3193         that results in a draw with no clip set.
3194
3195         Reviewed by adele
3196
3197         * platform/mac/GraphicsContextMac.mm:
3198         (WebCore::GraphicsContext::drawFocusRing):
3199
3200 2006-04-24  Eric Seidel  <eseidel@apple.com>
3201
3202         Reviewed by ggaren.
3203
3204         Fix for 5th worst unresolved crasher:
3205         <rdar://problem/4129744> [REGRESSION]CrashTracer: ..400 crashes at com.apple.WebCore: DOM::NodeImpl::createRendererIfNeeded + 44
3206
3207         Test: fast/dom/remove-style-element.html
3208
3209         * dom/ContainerNode.cpp:
3210         (WebCore::ContainerNode::removeChildren):
3211
3212 2006-04-24  Eric Seidel  <eseidel@apple.com>
3213
3214         Reviewed by mjs.
3215
3216         Speculative fix for our 7th worst crasher.
3217         Also added ASSERTs to help us better understand the issue.
3218         <rdar://problem/4153404> CrashTracer: 2412 crashes in Safari at com.apple.WebCore: khtml::RenderStyle::RenderStyle[unified] + 44
3219
3220         * dom/Document.cpp:
3221         (WebCore::Document::recalcStyle):
3222         (WebCore::Document::setInPageCache):
3223         * dom/Document.h:
3224         * dom/Element.cpp:
3225         (WebCore::Element::recalcStyle):
3226
3227 2006-04-24  Adele Peterson  <adele@apple.com>
3228
3229         Reviewed by Hyatt.
3230
3231         Fix for <rdar://problem/4503438> REGRESSION (NativeTextField): Can't insert caret when 
3232         selection is active in field (Business/Unit)
3233
3234         * css/html4.css: Added -webkit-user-select:text for input elements.
3235
3236 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
3237
3238         Build fix:
3239         
3240         - move some prematurely moved code back
3241
3242         * bridge/mac/WebCoreFrameBridge.h:
3243         * bridge/mac/WebCoreFrameBridge.mm:
3244         (-[WebCoreFrameBridge fini]):
3245
3246 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
3247
3248         Reviewed by Darin.
3249
3250         - move more code from WebFrameBridge to WebCoreFrameBridge
3251
3252         * bridge/mac/WebCoreFrameBridge.h:
3253         * bridge/mac/WebCoreFrameBridge.mm:
3254         (-[WebCoreFrameBridge domain]):
3255         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
3256         (-[WebCoreFrameBridge fini]):
3257         (-[WebCoreFrameBridge dealloc]):
3258         (-[WebCoreFrameBridge finalize]):
3259         (_getPreSmartSet):
3260         (_getPostSmartSet):
3261         (-[WebCoreFrameBridge isCharacterSmartReplaceExempt:isPreviousCharacter:]):
3262         (-[WebCoreFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
3263         (-[WebCoreFrameBridge keyboardUIMode]):
3264
3265 2006-04-24  Adele Peterson  <adele@apple.com>
3266
3267         Reviewed by Tim O.
3268
3269         Fix to send textFieldDidBeginEditing on the first editing change instead of on focus.
3270         This matches our old behavior.
3271
3272         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::dispatchFocusEvent):
3273         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::subtreeHasChanged):
3274
3275 2006-04-24  Beth Dakin  <bdakin@apple.com>
3276
3277         Reviewed by Eric.
3278
3279         Fix for <rdar://problem/4513383> REGRESSION: Crash in 
3280         WebCore::shouldEmitTabBeforeNode() when iterating through document 
3281         text
3282
3283         * editing/TextIterator.cpp:
3284         (WebCore::shouldEmitTabBeforeNode): Need to nil-check the renderer.
3285
3286 2006-04-23  Geoffrey Garen  <ggaren@apple.com>
3287
3288         Reviewed by Maciej.
3289
3290         * bindings/scripts/CodeGeneratorJS.pm: Removed confusing 'JS' prefix
3291         from string descriptions of DOM prototypes, so the prototype for, e.g.,
3292         Document serializes as 'Document,' not 'JSDocument.'
3293
3294 2006-04-23  Geoffrey Garen  <ggaren@apple.com>
3295
3296         Reviewed by Darin.
3297
3298         - Took the larger snippets of C++ in the code generator and broke
3299         them into HERE documents in the hopes of improving readability.
3300         
3301         * bindings/scripts/CodeGeneratorJS.pm: I indented variable names
3302         level with their corresponding HERE documents to clearly
3303         "sandwich" the HERE documents between opening and closing EOF
3304         statements.
3305
3306 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
3307
3308         Reviewed by Darin.
3309         
3310         - push WebFileButton and WebStringTruncator code down to WebCore
3311         http://bugzilla.opendarwin.org/show_bug.cgi?id=8552
3312
3313         * WebCore.exp:
3314         * WebCore.xcodeproj/project.pbxproj:
3315         * bridge/mac/WebCoreFrameBridge.h:
3316         * bridge/mac/WebCoreStringTruncator.h: Added.
3317         * bridge/mac/WebCoreStringTruncator.mm: Added.
3318         (stringWidth):
3319         (truncateString):
3320         (+[WebCoreStringTruncator widthOfString:font:]):
3321         * bridge/mac/WebCoreViewFactory.h:
3322         * kwq/KWQFileButton.h:
3323         * kwq/KWQFileButton.mm:
3324         (-[WebFileChooserButton initWithWidget::]):
3325         (-[WebCoreFileButton positionButton]):
3326         (-[WebCoreFileButton initWithWidget:]):
3327         (-[WebCoreFileButton initWithFrame:]):
3328         (-[WebCoreFileButton dealloc]):
3329         (-[WebCoreFileButton isFlipped]):
3330         (-[WebCoreFileButton drawRect:]):
3331         (-[WebCoreFileButton updateLabel]):
3332         (-[WebCoreFileButton setFilename:]):
3333         (-[WebCoreFileButton filename]):
3334         (-[WebCoreFileButton setFrameSize:]):
3335         (-[WebCoreFileButton bestVisualFrameSizeForCharacterCount:]):
3336         (-[WebCoreFileButton visualFrame]):
3337         (-[WebCoreFileButton setVisualFrame:]):
3338         (-[WebCoreFileButton baseline]):
3339         (-[WebCoreFileButton beginSheet]):
3340         (-[WebCoreFileButton chooseFilename:]):
3341         (-[WebCoreFileButton cancel]):
3342         (-[WebCoreFileButton chooseButtonPressed:]):
3343         (-[WebCoreFileButton mouseDown:]):
3344         (-[WebCoreFileButton acceptsFirstResponder]):
3345         (-[WebCoreFileButton becomeFirstResponder]):
3346         (-[WebCoreFileButton nextKeyView]):
3347         (-[WebCoreFileButton previousKeyView]):
3348         (-[WebCoreFileButton nextValidKeyView]):
3349         (-[WebCoreFileButton previousValidKeyView]):
3350         (-[WebCoreFileButton performClick]):
3351         (-[WebFileChooserButton initWithWidget:]):
3352         (-[WebFileChooserButton nextValidKeyView]):
3353         (-[WebFileChooserButton previousValidKeyView]):
3354         (-[WebFileChooserButton resignFirstResponder]):
3355         (KWQFileButton::KWQFileButton):
3356         (KWQFileButton::setFilename):
3357         (KWQFileButton::click):
3358         (KWQFileButton::sizeForCharacterWidth):
3359         (KWQFileButton::frameGeometry):
3360         (KWQFileButton::setFrameGeometry):
3361         (KWQFileButton::baselinePosition):
3362         (KWQFileButton::filenameChanged):
3363
3364 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
3365
3366         Reviewed by Eric.
3367
3368         - remove WebCoreCookieAdapter, instead make mac implementation of
3369         CookieJar use Foundation directly.
3370
3371         * WebCore.exp:
3372         * WebCore.xcodeproj/project.pbxproj:
3373         * platform/mac/CookieJar.mm:
3374         (WebCore::cookies):
3375         (WebCore::setCookies):
3376         (WebCore::cookiesEnabled):
3377         * platform/mac/WebCoreCookieAdapter.h: Removed.
3378         * platform/mac/WebCoreCookieAdapter.m: Removed.
3379
3380 2006-04-21  Rob Buis  <buis@kde.org>
3381
3382         Reviewed by hyatt.  Landed by eseidel.
3383
3384         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8170:
3385         SVG CSS property values with extra items do not get treated
3386         as invalid (they should)
3387
3388         Fixes the handling of invalid svg css properties similar
3389         to how invalid html css properties are handled, ie. discard
3390         the property if there are more values in the value list than
3391         expected.
3392
3393         Test: svg/custom/invalid-css.svg
3394
3395         * ksvg2/css/SVGCSSParser.cpp:
3396         (WebCore::CSSParser::parseSVGValue):
3397
3398 2006-04-23  Michael Emmel  <mike.emmel@gmail.com>
3399
3400         Reviewed by mjs.  Landed by eseidel.
3401
3402         http://bugzilla.opendarwin.org/show_bug.cgi?id=8517
3403         No test necessary, no functional change.
3404
3405         * DerivedSources.make: use VPATH more consistently.
3406
3407 2006-04-23  Jon Shier  <jshier@iastate.edu>
3408         
3409         Reviewed by ggaren.  Landed by eseidel.
3410         
3411         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8511
3412         onerror JS property does not register listener properly
3413
3414         Test: fast/dom/onerror-img.html       
3415  
3416         * bindings/js/kjs_dom.cpp:  
3417         (KJS::DOMEventTargetNode::getValueProperty): changed khtmlErrorEvent to errorEvent.
3418         (KJS::DOMEventTargetNode::putValueProperty): ditto.
3419         * bindings/js/kjs_window.cpp:
3420         (KJS::Window::getValueProperty): ditto.
3421         (KJS::Window::put):
3422         * dom/EventNames.h: Removed khtmlError macro.
3423         
3424 2006-04-23  Eric Seidel  <eseidel@apple.com>
3425
3426         Reviewed by hyatt.
3427
3428         Reproducible crasher with <li value=1234567890 type=A>
3429         http://bugzilla.opendarwin.org/show_bug.cgi?id=8542
3430
3431         Fixed our alphabetical list generation to match WinIE (not FireFox)
3432         Previously our alphabetical lists were completely wrong past 26 items.
3433
3434         Tests:
3435         * fast/lists/alpha-list-wrap.html
3436         * fast/lists/li-style-alpha-huge-value-crash.html
3437
3438         * rendering/render_list.cpp:
3439         (WebCore::toLetterString):
3440         (WebCore::toHebrew):
3441         (WebCore::RenderListMarker::calcMinMaxWidth):
3442
3443 2006-04-22  Geoffrey Garen  <ggaren@apple.com>
3444
3445         Reviewed by Darin.
3446
3447         - Finished autogeneration of Element
3448
3449         * bindings/js/kjs_dom.cpp: Removed DOMElement class
3450         * bindings/js/kjs_dom.h: ditto
3451         * bindings/scripts/CodeGeneratorJS.pm: added support for special
3452         attribute lookup that elements do
3453         * dom/Element.idl: added new attribute, 
3454         "IncludeAttributesInPropertyLookup," which tells the code generator 
3455         to include HTML element attributes in property lookup
3456
3457 2006-04-22  Michael Emmel  <mike.emmel@gmail.com>
3458
3459         Reviewed by Maciej.
3460
3461         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8529
3462           Extra Qaulification in header
3463         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8530
3464           Missing assert.h include
3465
3466         * rendering/RenderObject.h: Removed erroneous RenderObject::
3467         prefix from a member function name.
3468         * rendering/RenderText.h: Removed erroneous RenderText::
3469         prefix from a member function name.
3470
3471         * platform/Arena.cpp: Added <assert.h> to list of includes.
3472         * platform/KURL.cpp: Ditto.
3473         * platform/StringImpl.cpp: Ditto.
3474         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
3475         * platform/image-decoders/png/PNGImageDecoder.cpp: Ditto.
3476
3477 2006-04-22  Darin Adler  <darin@apple.com>
3478
3479         * doc: Added.
3480
3481 2006-04-22  Maciej Stachowiak  <mjs@apple.com>
3482
3483         Reviewed by Eric.
3484
3485         - push down a bunch of WebCoreFrameBridge code to C++ (plus some reformatting)
3486
3487         * bridge/mac/WebCoreFrameBridge.mm:
3488         (-[WebCoreFrameBridge isDescendantOfFrame:]):
34