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