Use a faster and safer way of flattening the form data.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
2
3         Reviewed by Lars.
4
5         Use a faster and safer way of flattening the form data.
6
7         * platform/network/qt/QNetworkReplyHandler.cpp:
8         (WebCore::QNetworkReplyHandler::start):
9
10 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
11
12         Reviewed by Lars.
13
14         Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
15
16         * WebCore.pro:
17         * platform/network/ResourceHandleInternal.h:
18         * platform/network/qt/QNetworkReplyHandler.cpp: Added.
19         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
20         (WebCore::QNetworkReplyHandler::abort):
21         (WebCore::QNetworkReplyHandler::finish):
22         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
23         (WebCore::QNetworkReplyHandler::forwardData):
24         (WebCore::QNetworkReplyHandler::start):
25         * platform/network/qt/QNetworkReplyHandler.h: Added.
26         (WebCore::QNetworkReplyHandler::reply):
27         * platform/network/qt/ResourceHandleQt.cpp:
28         (WebCore::ResourceHandle::start):
29         (WebCore::ResourceHandle::cancel):
30         (WebCore::ResourceHandle::loadResourceSynchronously):
31         * platform/network/qt/ResourceRequest.h:
32         (WebCore::ResourceRequest::ResourceRequest):
33         * platform/network/qt/ResourceRequestQt.cpp: Added.
34         (WebCore::ResourceRequest::toNetworkRequest):
35         * platform/qt/MIMETypeRegistryQt.cpp:
36         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
37         * platform/qt/PlugInInfoStoreQt.cpp:
38         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
39         (WebCore::PlugInInfoStore::pluginCount):
40         (WebCore::PlugInInfoStore::pluginNameForMIMEType):
41
42 2008-01-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
43
44         Reviewed by Lars.
45
46         * Remove m_dirtyRegion as it is not used as we pass every dirty region
47         directly to the ChromeClient
48
49         * platform/qt/ScrollViewQt.cpp:
50         (WebCore::ScrollView::paint):
51
52 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
53
54         Reviewed by Oliver.
55
56         Small CG paint server cleanups - use more GraphicsContext method where possible.
57
58         * svg/graphics/cg/CgSupport.cpp:
59         (WebCore::applyStrokeStyleToContext):
60         (WebCore::strokeBoundingBox):
61         * svg/graphics/cg/CgSupport.h:
62         * svg/graphics/cg/RenderPathCg.cpp:
63         (WebCore::RenderPath::strokeContains):
64         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
65         (WebCore::SVGPaintServerGradient::setup):
66         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
67         (WebCore::SVGPaintServerPattern::setup):
68         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
69         (WebCore::SVGPaintServerSolid::setup):
70
71 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
72
73         Reviewed by Dan.
74
75         Use new helper function isArabicChar() - which also calls ublock_getCode() == UBLOCK_ARABIC on mac.
76
77         * platform/graphics/mac/FontMac.mm:
78         (WebCore::ATSULayoutParameters::initialize):
79
80 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
81
82         Reviewed by Darin.
83         
84         DOMRange doesn't correctly re-size when inserting items (Acid3)
85         http://bugs.webkit.org/show_bug.cgi?id=16764
86         
87         Update the offset for the range when inserting items into the range.
88
89         Test: fast/dom/Range/range-modifycontents.html
90
91         * dom/Range.cpp:
92         (WebCore::Range::insertNode):
93
94 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
95
96         Reviewed by Darin.
97
98         http://bugs.webkit.org/show_bug.cgi?id=16731
99         Incorrect node type for whitespace when setting innerHTML in an XHTML document
100
101         Test: fast/dom/xhtml-fragment-whitespace.xhtml
102
103         * dom/XMLTokenizer.cpp: (WebCore::parseXMLDocumentFragment):
104         Use balancedCharactersHandler for ignorable whitespace.
105
106 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
107
108         Reviewed by Darin.
109
110         http://bugs.webkit.org/show_bug.cgi?id=16701
111         <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
112         causes page load error
113
114         Test: http/tests/misc/location-with-space.php
115
116         * platform/network/cf/ResourceRequestCFNet.cpp:
117         (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
118
119 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
120
121         Reviewed by Darin.
122         
123         DOMRange.cloneContents does not work (Acid3 bug)
124         http://bugs.webkit.org/show_bug.cgi?id=16748
125         
126         When cloning an empty range, return an empty DocmentFragment instead of
127         null or undefined.
128
129         Test: fast/dom/Range/range-clone-empty.html
130
131         * dom/Range.cpp:
132         (WebCore::Range::processContents):
133
134 2008-01-06  Luca Bruno  <lethalman88@gmail.com>
135
136         Reviewed by Alp Toker.
137
138         Remove curl handles immediately if the timer is not running.
139
140         * platform/network/curl/ResourceHandleManager.cpp:
141         (WebCore::ResourceHandleManager::cancel):
142
143 2008-01-06  Alp Toker  <alp@atoker.com>
144
145         Reviewed by Eric.
146
147         Cairo canvas refcounting fix. Reference the surface in the constructor
148         to match its destruction in the destructor.
149
150         Fixes a crash triggered by leaving this page:
151           http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
152
153         * html/CanvasPattern.cpp:
154         (WebCore::CanvasPattern::CanvasPattern):
155
156 2008-01-06  Eric Seidel  <eric@webkit.org>
157
158         Reviewed by darin.
159
160         Make attr selectors case-insensitive for certain HTML attributes
161         http://bugs.webkit.org/show_bug.cgi?id=15470
162
163         Test: fast/css/html-attr-case-sensitivity.html
164
165         * css/CSSStyleSelector.cpp:
166         (WebCore::addLocalNameToSet):
167         (WebCore::createHtmlCaseInsensitiveAttributesSet):
168         (WebCore::htmlAttributeHasCaseInsensitiveValue):
169         (WebCore::CSSStyleSelector::checkOneSelector):
170
171 2008-01-06  Eric Seidel  <eric@webkit.org>
172
173         Reviewed by Sam.
174
175         Fix :checked matching type='text' and add test case
176         http://bugs.webkit.org/show_bug.cgi?id=16750
177
178         Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
179
180         * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
181
182 2008-01-05  Sam Weinig  <sam@webkit.org>
183
184         Reviewed by Eric Seidel.
185
186         Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
187         ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
188
189         - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
190
191         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
192
193         * dom/TreeWalker.cpp:
194         (WebCore::TreeWalker::parentNode):
195         (WebCore::TreeWalker::firstChild):
196         (WebCore::TreeWalker::lastChild):
197         (WebCore::TreeWalker::previousSibling):
198         (WebCore::TreeWalker::nextSibling):
199         (WebCore::TreeWalker::previousNode):
200         (WebCore::TreeWalker::nextNode):
201
202 2008-01-04  Oliver Hunt  <oliver@apple.com>
203
204         Reviewed by Beth Dakin.
205
206         Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
207         and other image repaint bugs.
208
209         We now cache the full local bounds for the <image> element, as otherwise certain
210         combinations of attribute changes could result in incorrect dirty rects.
211         Additionally we no longer use any of the integer bounds fields on RenderObject for
212         determining repaint bounds (this was the principle cause of bug #16015).
213
214         I also removed the outline painting code as it was both wrong, and not correctly
215         repainted.  I feel safe doing this as no other browser or viewer supports outline
216         properties on svg elements.
217
218         I was unable to make a testcase for this unfortunately, despite seemingly deterministic 
219         behaviour :(
220
221         * rendering/RenderSVGImage.cpp:
222         (WebCore::RenderSVGImage::layout):
223         (WebCore::RenderSVGImage::paint):
224         (WebCore::RenderSVGImage::nodeAtPoint):
225         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
226         * rendering/RenderSVGImage.h:
227
228 2008-01-04  Beth Dakin  <bdakin@apple.com>
229
230         Reviewed by Oliver.
231
232         Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with 
233         type="hidden" matches :enabled/:disabled (Acid3 bug)
234
235         Prevent :enabled and :disabled from applying to input type="hidden" 
236
237         * css/CSSStyleSelector.cpp:
238         (WebCore::CSSStyleSelector::checkOneSelector): Rather than 
239         allowing :enabled and :disabled to apply to all controls, only 
240         allow it to apply to non-"hidden" controls
241         * dom/Element.h:
242         (WebCore::Element::isInputTypeHidden): 
243         * html/HTMLInputElement.h:
244         (WebCore::HTMLInputElement::isInputTypeHidden):
245
246 2008-01-04  Sam Weinig  <sam@webkit.org>
247
248         Reviewed by Oliver Hunt.
249
250         - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
251           getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
252           if the type of the CSSPrimitiveValue is not the same as the type requested.
253         - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
254
255         Test: fast/css/CSSPrimitiveValue-exceptions.html
256
257         * css/CSSPrimitiveValue.cpp:
258         (WebCore::CSSPrimitiveValue::getDoubleValue):
259         (WebCore::CSSPrimitiveValue::getStringValue):
260         (WebCore::CSSPrimitiveValue::getCounterValue):
261         (WebCore::CSSPrimitiveValue::getRectValue):
262         (WebCore::CSSPrimitiveValue::getRGBColorValue):
263         (WebCore::CSSPrimitiveValue::getPairValue):
264         * css/CSSPrimitiveValue.h:
265         (WebCore::CSSPrimitiveValue::getFloatValue):
266         (WebCore::CSSPrimitiveValue::getIntValue):
267         (WebCore::CSSPrimitiveValue::getCounterValue):
268         (WebCore::CSSPrimitiveValue::getRectValue):
269         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
270         * css/CSSPrimitiveValue.idl:
271
272 2008-01-04  Antti Koivisto  <antti@apple.com>
273
274         Reviewed by Darin.
275         
276         Windows part of <rdar://problem/5647034>
277         Media tests crash if an old version of QuickTime is installed
278
279         Check QuickTime version on Windows too.
280
281         * platform/graphics/MediaPlayer.cpp:
282         (WebCore::MediaPlayer::isAvailable):
283         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
284         (WebCore::MediaPlayerPrivate::isAvailable):
285         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
286         (WebCore::MediaPlayerPrivate::isAvailable):
287         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
288         * platform/graphics/win/QTMovieWin.cpp:
289         (QTMovieWin::initializeQuickTime):
290
291 2008-01-04  Darin Adler  <darin@apple.com>
292
293         Reviewed by Maciej and Alice.
294
295         - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
296
297         Test: fast/images/border.html
298
299         * html/HTMLImageElement.cpp:
300         (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
301         where the border value is not a number to use the value "0" for the border width instead
302         of not setting the border width and style at all. This matches other browsers, and makes
303         more sense.
304
305 2008-01-04  Antti Koivisto  <antti@apple.com>
306
307         Try to fix 64-bit build
308
309         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
310         (WebCore::MediaPlayerPrivate::isAvailable):
311
312 2008-01-04  Stephanie  <slewis@apple.com>
313
314         Reviewed by Oliver.
315
316         WARNING: NO TEST CASES ADDED OR CHANGED
317
318         Fix another stringImpl leak.
319
320         * platform/text/StringImpl.cpp: remove an extra allocation
321         (WebCore::StringImpl::StringImpl):
322
323 2008-01-04  Alice Liu  <alice.liu@apple.com>
324
325         Reviewed by Mitz.
326
327         * platform/graphics/win/FontCacheWin.cpp:
328         fix loop condition that was causing crash
329
330 2008-01-04  Timothy Hatcher  <timothy@apple.com>
331
332         Reviewed by Adam Roben.
333
334         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
335
336         * page/inspector/inspector.css: Remove styles related to the toggle button
337           and make the area always visible. 
338         * page/inspector/inspector.html: Remove the toggle button.
339         * page/inspector/inspector.js: Remove code to toggle the status area.
340
341 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
342
343         Reviewed by Adam Roben.
344
345         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
346
347         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
348
349 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
350
351         Reviewed by Darin.
352
353         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
354
355         Enable the fix on Windows.
356
357         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
358         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
359
360         * xml/XSLTUnicodeSort.cpp:
361         (WebCore::xsltUnicodeSortFunction):
362         * xml/XSLTUnicodeSort.h:
363         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
364
365 2008-01-04  Antti Koivisto  <antti@apple.com>
366
367         Fix build.
368
369         * bindings/js/JSHTMLElementWrapperFactory.cpp:
370
371 2008-01-04  Antti Koivisto  <antti@apple.com>
372
373         Reviewed by Darin.
374         
375         Partial fix for <rdar://problem/5647034>
376         Media tests crash if an old version of QuickTime is installed
377
378         Disable media support if QuickTime is not current enough (>=7.3).
379         
380         Windows patch coming soon.
381
382         * bindings/js/JSHTMLElementWrapperFactory.cpp:
383         (WebCore::createJSHTMLWrapper):
384         * bindings/js/kjs_window.cpp:
385         (KJS::Window::getValueProperty):
386         * html/HTMLElementFactory.cpp:
387         (WebCore::audioConstructor):
388         (WebCore::videoConstructor):
389         (WebCore::sourceConstructor):
390         * platform/graphics/MediaPlayer.cpp:
391         (WebCore::MediaPlayer::isAvailable):
392         * platform/graphics/MediaPlayer.h:
393         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
394         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
395         (WebCore::MediaPlayerPrivate::isAvailable):
396
397 2008-01-04  Timothy Hatcher  <timothy@apple.com>
398
399         Reviewed by Darin Adler.
400
401         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
402
403         Check if the property is a getter before asking for the value.
404         If the property is a getter, we no longer show the value.
405
406         * page/inspector/PropertiesSidebarPane.js:
407         * page/inspector/inspector.css:
408
409 2008-01-04  Dan Bernstein  <mitz@apple.com>
410
411         Reviewed by Darin Adler.
412
413         - fix synthetic bold and italic on Windows
414
415         Covered by an existing test.
416
417         * platform/graphics/win/FontPlatformDataWin.cpp:
418         (WebCore::FontPlatformData::FontPlatformData):
419
420 2008-01-04  Alp Toker  <alp@atoker.com>
421
422         GTK+ autotools build fix. Terminate empty rules.
423
424         * GNUmakefile.am:
425
426 2008-01-04  Lars Knoll  <lars@trolltech.com>
427
428         Reviewed by Simon.
429
430         Remove most dependencies of Widget/ScrollView onto native QWidgets.
431
432         This also brings the code closer in line with the Windows code. Seems
433         to work nicely on first try :)
434
435         * page/qt/FrameQt.cpp:
436         (WebCore::Frame::createScriptInstanceForWidget):
437         * platform/Widget.h:
438         * platform/qt/PlatformScreenQt.cpp:
439         (WebCore::screenDepth):
440         (WebCore::screenDepthPerComponent):
441         (WebCore::screenIsMonochrome):
442         (WebCore::screenRect):
443         * platform/qt/PlatformScrollBarQt.cpp:
444         (WebCore::PlatformScrollbar::thumbPosition):
445         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
446         * platform/qt/ScrollViewQt.cpp:
447         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
448         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
449         (WebCore::ScrollView::updateContents):
450         (WebCore::ScrollView::update):
451         (WebCore::ScrollView::scrollRectIntoViewRecursively):
452         (WebCore::ScrollView::updateScrollbars):
453         (WebCore::ScrollView::addChild):
454         (WebCore::ScrollView::removeChild):
455         (WebCore::ScrollView::paint):
456         * platform/qt/WidgetQt.cpp:
457         (WebCore::WidgetPrivate::WidgetPrivate):
458         (WebCore::WidgetPrivate::~WidgetPrivate):
459         (WebCore::Widget::frameGeometry):
460         (WebCore::Widget::setFrameGeometry):
461         (WebCore::Widget::setCursor):
462         (WebCore::Widget::show):
463         (WebCore::Widget::hide):
464         (WebCore::Widget::nativeWidget):
465         (WebCore::Widget::setNativeWidget):
466         (WebCore::Widget::suppressInvalidation):
467         (WebCore::Widget::setSuppressInvalidation):
468         (WebCore::Widget::invalidateRect):
469         (WebCore::Widget::topLevel):
470         (WebCore::Widget::containingWindow):
471
472 2008-01-04  Lars Knoll  <lars@trolltech.com>
473
474         Reviewed by Simon.
475
476         make QWebPage a QObject and get things to compile.
477
478         Nothing works currently though.
479
480         * platform/qt/ScrollViewQt.cpp:
481         (WebCore::ScrollView::updateContents):
482         (WebCore::ScrollView::update):
483         * platform/qt/WidgetQt.cpp:
484         (WebCore::Widget::qwidget):
485         (WebCore::Widget::invalidateRect):
486
487 2008-01-04  Alp Toker  <alp@atoker.com>
488
489         Reviewed by Mark Rowe.
490
491         http://bugs.webkit.org/show_bug.cgi?id=16667
492         make -j is failing with the autotools based system
493
494         Support parallel code generation. Nearly every use of explicit
495         multiple targets was a potential concurrency bug, though in practice
496         the bison rules were the first to be noticed because they took longer
497         to complete and broke the build immediately.
498
499         * GNUmakefile.am:
500
501 2008-01-04  Alp Toker  <alp@atoker.com>
502
503         Reviewed by Mark Rowe.
504
505         Re-use a single static dummy surface rather than creating and
506         destroying a surface for each CairoPath.
507
508         * platform/graphics/cairo/CairoPath.h:
509         (WebCore::CairoPath::CairoPath):
510
511 2008-01-04  Mark Rowe  <mrowe@apple.com>
512
513         Tiger build fix.
514
515         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
516
517 2008-01-03  Mark Rowe  <mrowe@apple.com>
518
519         Reviewed by Maciej Stachowiak.
520
521         Use platform-provided atomic operations in place of inline assembly to
522         increase portability.
523
524         * platform/Threading.h:
525         (WebCore::atomicIncrement):
526         (WebCore::atomicDecrement):
527
528 2008-01-03  Oliver Hunt  <oliver@apple.com>
529
530         Reviewed by Maciej.
531
532         Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
533
534         We need to cache the absolute bounds of the <image>,
535         as there's no reliable way to recompute the old bounding
536         box one we have started layout.
537
538         * rendering/RenderSVGImage.cpp:
539         (WebCore::RenderSVGImage::layout):
540         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
541         * rendering/RenderSVGImage.h:
542
543 2008-01-03  Alp Toker  <alp@atoker.com>
544
545         Reviewed by Mark Rowe.
546
547         Support building in Scratchbox, which has a version of make that fails
548         on wildcard syntax. Use a vpath to match IDL files instead.
549
550         * GNUmakefile.am:
551
552 2008-01-03  Jon Honeycutt  <jhoneycutt@apple.com>
553
554         Reviewed by Darin.
555
556         <rdar://problem/5504775> PDF page will not load first time after Adobe
557         Reader install, unless browser is relaunched
558
559         Refresh and re-search the plugin database if the MIME type is not
560         registered.
561
562         * plugins/win/PluginDatabaseWin.cpp:
563         (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
564         * plugins/win/PluginDatabaseWin.h:
565
566 2008-01-03  Dan Bernstein  <mitz@apple.com>
567
568         Reviewed by Darin Adler.
569
570         - fix http://bugs.webkit.org/show_bug.cgi?id=16548
571           <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
572
573         * platform/graphics/win/FontCacheWin.cpp:
574         (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
575         a valid LOGFONT for a given family.
576         (WebCore::getLinkedFonts): Added. Returns a vector of font families
577         linked to the given font family by the Windows registry key
578         HKLM\Software\...\FontLink\SystemLink. The registry values typically
579         differ based on the installed language version of Windows.
580         (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
581         font mapping, which is Windows code page based, except for characters in
582         the range U+2000..U+200F. Instead, this function gets the font Uniscribe
583         would use for the character. However, that font might not actually
584         contain the character, in which case GDI font linking would substitute a
585         different font. Therefore, this function walks the linked font list
586         until it finds a font that actually contains the character.
587
588 2008-01-03  Darin Adler  <darin@apple.com>
589
590         Reviewed by Mitz.
591
592         - fix http://bugs.webkit.org/show_bug.cgi?id=16723
593           tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
594
595         Test: fast/table/border-changes.html
596
597         * html/HTMLTableElement.h:
598         * html/HTMLTableElement.cpp:
599         (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
600         parsing attributes, rather than doing this only for the rules attribute.
601         (WebCore::HTMLTableElement::cellBorders): Added.
602         (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
603         rule about what type of borders to use.
604
605 2008-01-02  Sam Weinig  <sam@webkit.org>
606
607         Reviewed by Darin.
608
609         Pass the prototype of WebCore JS objects up the constructor chain
610         rather than explicitly setting using setPrototype.  This removes many
611         redundant settings of the prototype on construction.  To avoid a CG 
612         hazard, the prototype must be constructed before calling the
613         constructor of the JS object.
614
615         - JS objects that inherit from DOMObject, which all bindings objects
616           (except Window) do, now can't implicitly have a jsNull prototype, but
617           must explicitly pass it up the construction chain.
618
619         * bindings/js/JSCSSRuleCustom.cpp:
620         (WebCore::toJS):
621         * bindings/js/JSCSSValueCustom.cpp:
622         (WebCore::toJS):
623         * bindings/js/JSDocumentCustom.cpp:
624         (WebCore::toJS):
625         * bindings/js/JSEventCustom.cpp:
626         (WebCore::toJS):
627         * bindings/js/JSEventTargetNode.cpp:
628         (WebCore::JSEventTargetNode::JSEventTargetNode):
629         * bindings/js/JSEventTargetNode.h:
630         * bindings/js/JSHTMLAllCollection.h:
631         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
632         * bindings/js/JSHTMLAudioElementConstructor.cpp:
633         (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
634         * bindings/js/JSHTMLCollectionCustom.cpp:
635         (WebCore::getNamedItems):
636         (WebCore::toJS):
637         * bindings/js/JSHTMLElementWrapperFactory.cpp:
638         (WebCore::createJSHTMLWrapper):
639         * bindings/js/JSHTMLFormElementCustom.cpp:
640         (WebCore::JSHTMLFormElement::nameGetter):
641         * bindings/js/JSHTMLInputElementBase.cpp:
642         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
643         * bindings/js/JSHTMLInputElementBase.h:
644         * bindings/js/JSHTMLOptionElementConstructor.cpp:
645         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
646         * bindings/js/JSLocation.cpp:
647         (WebCore::JSLocation::JSLocation):
648         * bindings/js/JSLocation.h:
649         * bindings/js/JSNamedNodesCollection.cpp:
650         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
651         * bindings/js/JSNamedNodesCollection.h:
652         * bindings/js/JSNodeCustom.cpp:
653         (WebCore::toJS):
654         * bindings/js/JSSVGElementWrapperFactory.cpp:
655         (WebCore::createJSSVGWrapper):
656         * bindings/js/JSSVGPathSegCustom.cpp:
657         (WebCore::toJS):
658         * bindings/js/JSStyleSheetCustom.cpp:
659         (WebCore::toJS):
660         * bindings/js/JSXMLHttpRequest.cpp:
661         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
662         (KJS::JSXMLHttpRequestConstructorImp::construct):
663         (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
664         * bindings/js/JSXMLHttpRequest.h:
665         * bindings/js/JSXSLTProcessor.cpp:
666         (KJS::JSXSLTProcessor::JSXSLTProcessor):
667         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
668         (KJS::XSLTProcessorConstructorImp::implementsConstruct):
669         (KJS::XSLTProcessorConstructorImp::construct):
670         * bindings/js/JSXSLTProcessor.h:
671         * bindings/js/kjs_binding.h:
672         (KJS::DOMObject::DOMObject):
673         (KJS::cacheDOMObject):
674         (KJS::cacheSVGDOMObject):
675         * bindings/js/kjs_css.cpp:
676         (WebCore::JSRGBColor::JSRGBColor):
677         (WebCore::getJSRGBColor):
678         * bindings/js/kjs_css.h:
679         * bindings/js/kjs_events.cpp:
680         (WebCore::JSClipboard::JSClipboard):
681         (WebCore::toJS):
682         * bindings/js/kjs_events.h:
683         * bindings/js/kjs_html.cpp:
684         (WebCore::ImageConstructorImp::ImageConstructorImp):
685         * bindings/js/kjs_navigator.cpp:
686         (KJS::Navigator::Navigator):
687         (KJS::PluginBase::PluginBase):
688         * bindings/js/kjs_navigator.h:
689         * bindings/js/kjs_window.cpp:
690         (KJS::Window::Window):
691         (KJS::Window::location):
692         (KJS::Window::getValueProperty):
693         * bindings/js/kjs_window.h:
694         * bindings/scripts/CodeGeneratorJS.pm:
695
696 2008-01-03  Holger Hans Peter Freyther  <zecke@selfish.org>
697
698         Reviewed by Alp.
699
700         -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
701
702         Change the Gtk ContextMenuItem code to generate the GtkMenuItem
703         or GtkCheckMenuItem on the fly. Currently we will create a
704         GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
705         to be done is to change WebCore to tell the platform code if an item
706         is checkable or not.
707
708         * platform/ContextMenuItem.h:
709         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
710         * platform/gtk/ContextMenuGtk.cpp:
711         (WebCore::ContextMenu::appendItem):
712         * platform/gtk/ContextMenuItemGtk.cpp:
713         (WebCore::ContextMenuItem::ContextMenuItem):
714         (WebCore::ContextMenuItem::~ContextMenuItem):
715         (WebCore::ContextMenuItem::createNativeMenuItem):
716         (WebCore::ContextMenuItem::releasePlatformDescription):
717         (WebCore::ContextMenuItem::type):
718         (WebCore::ContextMenuItem::setType):
719         (WebCore::ContextMenuItem::action):
720         (WebCore::ContextMenuItem::setAction):
721         (WebCore::ContextMenuItem::platformSubMenu):
722         (WebCore::ContextMenuItem::setSubMenu):
723         (WebCore::ContextMenuItem::setChecked):
724
725 2008-01-03  Dan Bernstein  <mitz@apple.com>
726
727         Rubber-stamped by Adam Roben.
728
729         - update the project hierarchy to match the on-disk organization of
730           the platform directory.
731
732         * WebCore.vcproj/WebCore.vcproj:
733
734 2008-01-03  Adam Roben  <aroben@apple.com>
735
736         Fix a buffer overrun and a leak introduced in r29098
737
738         Reviewed by Mark.
739
740         * platform/text/StringImpl.cpp:
741         (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
742         it be big enough to hold the string contents plus the null terminator.
743
744 2008-01-03  Simon Hausmann  <hausmann@webkit.org>
745
746         Reviewed by Lars.
747
748         Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
749
750         * WebCore.pro:
751
752 2008-01-03  Alp Toker  <alp@atoker.com>
753
754         Suggested by Mark Rowe.
755
756         Fix indentation and remove trailing whitespace.
757
758         * platform/network/curl/ResourceHandleManager.cpp:
759
760 2008-01-03  Luca Bruno  <lethalman88@gmail.com>
761
762         Reviewed by Alp Toker.
763
764         Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
765         that the two POST methods don't conflict.
766
767         * platform/network/curl/ResourceHandleManager.cpp:
768         (WebCore::ResourceHandleManager::setupPOST):
769
770 2008-01-02  Darin Adler  <darin@apple.com>
771
772         - touched some files to try to get the Windows buildbot building again
773
774 2008-01-02  Dan Bernstein  <mitz@apple.com>
775
776         Reviewed by Sam Weinig.
777
778         - fix small caps rendering
779
780         Covered by an existing test.
781
782         * platform/graphics/win/FontDataWin.cpp:
783         (WebCore::FontData::smallCapsFontData):
784
785 2008-01-02  Antti Koivisto  <antti@apple.com>
786
787         Reviewed by Oliver.
788
789         Calculate video position and size within the renderer box in WebCore. This
790         way the aspect ratio calculation is not needed in each MediaPlayer implementation.
791         
792         This fixes video aspect ratio on Windows.
793         
794         Covered by an existing pixel test.
795
796         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
797         (WebCore::MediaPlayerPrivate::createQTMovieView):
798         * rendering/RenderVideo.cpp:
799         (WebCore::RenderVideo::videoBox):
800         (WebCore::RenderVideo::paintReplaced):
801         (WebCore::RenderVideo::updatePlayer):
802         * rendering/RenderVideo.h:
803
804 2008-01-02  Ada Chan  <adachan@apple.com>
805
806         Fix windows build.
807
808         * WebCore.vcproj/WebCore.vcproj:
809
810 2008-01-02  John Sullivan  <sullivan@apple.com>
811
812         Reviewed by Dan Bernstein
813         
814         - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
815
816         * loader/DocumentLoader.cpp:
817         (WebCore::canonicalizedTitle):
818         in the code that replaces control characters with white space, also replace the unicode line separator
819         and paragraph separator characters
820
821 2008-01-02  Darin Adler  <darin@apple.com>
822
823         - fix buffer overruns seen on buildbot
824
825         * platform/text/StringImpl.cpp:
826         (WebCore::countCharacter): Added this.
827         (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
828         (WebCore::StringImpl::toLengthArray): Ditto.
829         (WebCore::StringImpl::replace): Added assertions.
830
831 2008-01-02  Darin Adler  <darin@apple.com>
832
833         Reviewed by Maciej.
834
835         - fix http://bugs.webkit.org/show_bug.cgi?id=16657
836           Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
837         - fix http://bugs.webkit.org/show_bug.cgi?id=16659
838           Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
839
840         Tests: dom/html/level2/html/HTMLCollection07.html
841                dom/html/level2/html/HTMLCollection08.html
842                dom/html/level2/xhtml/HTMLCollection07.xhtml
843                dom/html/level2/xhtml/HTMLCollection08.xhtml
844                fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
845                fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
846
847         * GNUmakefile.am: Added HTMLTableRowsCollection.
848         * WebCore.pro: Ditto.
849         * WebCore.vcproj/WebCore.vcproj: Ditto.
850         * WebCore.xcodeproj/project.pbxproj: Ditto.
851         * WebCoreSources.bkl: Ditto.
852
853         * dom/XMLTokenizer.cpp: Took out stray include.
854
855         * html/HTMLCollection.cpp:
856         (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
857         a separate class for that collection. Also got rid of the distinct types for custom collections
858         that don't need them (use Other for both).
859         * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
860
861         * html/HTMLFormCollection.cpp:
862         (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
863         for the HTMLCollection type.
864
865         * html/HTMLTableElement.cpp:
866         (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
867         (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
868         keeping a pointer to it.
869         (WebCore::HTMLTableElement::setCaption): Rewrote.
870         (WebCore::HTMLTableElement::tHead): Ditto.
871         (WebCore::HTMLTableElement::setTHead): Ditto.
872         (WebCore::HTMLTableElement::tFoot): Ditto.
873         (WebCore::HTMLTableElement::setTFoot): Ditto.
874         (WebCore::HTMLTableElement::createTHead): Ditto.
875         (WebCore::HTMLTableElement::deleteTHead): Ditto.
876         (WebCore::HTMLTableElement::createTFoot): Ditto.
877         (WebCore::HTMLTableElement::deleteTFoot): Ditto.
878         (WebCore::HTMLTableElement::createCaption): Ditto.
879         (WebCore::HTMLTableElement::deleteCaption): Ditto.
880         (WebCore::HTMLTableElement::lastBody): Added.
881         (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
882         This is different from the old code mainly in how it handles rows outside any section.
883         (WebCore::HTMLTableElement::deleteRow): Ditto.
884         (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
885         these was a possible source of serious bugs too, including crashes with stale pointers, although I
886         didn't write any test cases to prove those bugs existed.
887         (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
888         just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
889         visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
890         (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
891         * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
892         things like DOM mutation events take things ot of the tree before they are safely referenced by
893         JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
894         firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
895         Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
896         unneeded friend declaration for HTMLTableCellElement.
897         * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
898
899         * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
900         collection in which order.
901         * html/HTMLTableRowsCollection.h: Added.
902
903         * loader/FTPDirectoryDocument.cpp:
904         (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
905         coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
906         create a tbody element.
907
908 2008-01-02  Darin Adler  <darin@apple.com>
909
910         Reviewed by Alice and Tim.
911
912         - try to fix GTK and Qt builds
913
914         * platform/win/ScrollViewWin.cpp:
915         (WebCore::ScrollView::scroll): Improve logic slightly for the case of
916         vertical scrolling when there's no vertical scroll bar.
917
918         * platform/gtk/ScrollViewGtk.cpp:
919         (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
920         should be factored differently.
921         * platform/qt/ScrollViewQt.cpp:
922         (WebCore::ScrollView::scroll): Ditto.
923
924 2008-01-02  Darin Adler  <darin@apple.com>
925
926         Reviewed by Anders.
927
928         - http://bugs.webkit.org/show_bug.cgi?id=16712
929           change StringImpl to take and return PassRefPtr instead of raw pointers
930
931         Also eliminated use of const StringImpl. Since StringImpl is immutable there
932         is no distinction between a const and non-const one at the moment.
933
934         * WebCore.base.exp: Updated.
935
936         * css/CSSHelper.cpp:
937         (WebCore::parseURL): Make String directly, not by making a StringImpl.
938         * dom/Attr.cpp:
939         (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
940         not via StringImpl.
941         (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
942         to a function that takes a String.
943
944         * dom/CDATASection.cpp: Removed unused constructor.
945         (WebCore::CDATASection::cloneNode): Added a now-needed .get().
946         (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
947         * dom/CDATASection.h:
948
949         * dom/CharacterData.cpp:
950         (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
951         ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
952         (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
953         a RefPtr.
954         (WebCore::CharacterData::setData): More of that.
955         (WebCore::CharacterData::substringData): Ditto.
956         (WebCore::CharacterData::appendData): Ditto.
957         (WebCore::CharacterData::insertData): Ditto.
958         (WebCore::CharacterData::deleteData): Ditto.
959         (WebCore::CharacterData::replaceData): Ditto.
960         (WebCore::CharacterData::nodeValue): Ditto.
961         (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
962         (WebCore::CharacterData::dump): Ditto.
963         * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
964         instead, but since String adds extra branches to handle 0, I figured it was
965         more conservative to just use RefPtr. Later it would be good to figure out
966         which is preferred style and be more consistent. Maybe we'll phase out
967         StringImpl, or maybe we'll go the other way and use it more since it can be
968         more efficient.
969
970         * dom/DOMImplementation.cpp:
971         (WebCore::addString): Changed set to use String rather than StringImpl.
972         (WebCore::isSVG10Feature): Ditto.
973         (WebCore::isSVG11Feature): Ditto.
974         (WebCore::DOMImplementation::createDocument): Replaced custom code to
975         find a colon with a call to String::find.
976
977         * dom/Range.cpp:
978         (WebCore::Range::insertNode): Updated since the result of splitText is now
979         a PassRefPtr.
980
981         * dom/Text.cpp:
982         (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
983         result of this function be a PassRefPtr.
984         (WebCore::Text::createRenderer): Ditto.
985         (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
986         * dom/Text.h:
987
988         * html/HTMLElement.cpp:
989         (WebCore::HTMLElement::nodeName): Use String::upper.
990
991         * html/HTMLInputElement.cpp:
992         (WebCore::numGraphemeClusters): Remove now-unneeded const.
993         (WebCore::numCharactersInGraphemeClusters): Ditto.
994
995         * html/HTMLTokenizer.cpp:
996         (WebCore::HTMLTokenizer::processToken): Updated for function name change.
997
998         * platform/text/AtomicString.cpp:
999         (WebCore::CStringTranslator::translate): Updated since there is no longer
1000         a constructor that takes a string.
1001
1002         * platform/text/PlatformString.h: Added new constructors that take
1003         PassRefPtr and RefPtr. Removed misleading comment.
1004
1005         * platform/text/String.cpp:
1006         (WebCore::String::String): Changed to use StringImpl::create, which handles
1007         the empty string automatically.
1008         (WebCore::String::append): Ditto.
1009         (WebCore::String::charactersWithNullTermination): Similar.
1010         (WebCore::String::format): Ditto.
1011
1012         * platform/text/StringHash.h: Took out unneeded const.
1013
1014         * platform/text/StringImpl.cpp:
1015         (WebCore::deleteUCharVector): Changed to take a const pointer since the
1016         buffers are now const UChar buffers.
1017         (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
1018         separate init functions. The constructors are now private and used only in
1019         the create functions and one or two other places.
1020         (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
1021         (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
1022         PassRefPtr.
1023         (WebCore::StringImpl::characterStartingAt): Ditto.
1024         (WebCore::StringImpl::toLength): Ditto.
1025         (WebCore::StringImpl::toCoordsArray): Ditto.
1026         (WebCore::StringImpl::toLengthArray): Ditto.
1027         (WebCore::StringImpl::isLower): Ditto.
1028         (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
1029         don't have to use new directly here. Makes empty string handling more consistent.
1030         (WebCore::StringImpl::upper): Ditto.
1031         (WebCore::StringImpl::secure): Ditto.
1032         (WebCore::StringImpl::foldCase): Ditto.
1033         (WebCore::StringImpl::stripWhiteSpace): Ditto.
1034         (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
1035         (WebCore::StringImpl::capitalize): Ditto.
1036         (WebCore::StringImpl::toInt): Removed now-meaningless const.
1037         (WebCore::StringImpl::toInt64): Ditto.
1038         (WebCore::StringImpl::toUInt64): Ditto.
1039         (WebCore::StringImpl::toDouble): Ditto.
1040         (WebCore::StringImpl::toFloat): Ditto.
1041         (WebCore::StringImpl::find): Ditto.
1042         (WebCore::StringImpl::reverseFind): Ditto.
1043         (WebCore::StringImpl::endsWith): Ditto.
1044         (WebCore::StringImpl::replace): Ditto.
1045         (WebCore::equal): Ditto.
1046         (WebCore::equalIgnoringCase): Ditto.
1047         (WebCore::StringImpl::ascii): Ditto.
1048         (WebCore::StringImpl::defaultWritingDirection): Ditto.
1049         (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
1050         (WebCore::StringImpl::adopt): Added special case so this uses the shared
1051         empty string like other functions. Also optimized the common case where the
1052         vector happens to already have the right size so we don't do a fastRealloc
1053         at all in those cases.
1054         (WebCore::StringImpl::create): Added. These are now the public functions for
1055         creating new StringImpl objects. They all implement the shared empty string.
1056         (WebCore::StringImpl::createWithTerminatingNullCharacter):
1057         * platform/text/StringImpl.h:
1058
1059         * platform/text/cf/StringCF.cpp:
1060         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
1061         * platform/text/cf/StringImplCF.cpp:
1062         (WebCore::StringImpl::createCFString): Removed now-obsolete const.
1063         * platform/text/mac/StringImplMac.mm:
1064         (WebCore::StringImpl::operator NSString *): Ditto.
1065         * platform/text/mac/StringMac.mm:
1066         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
1067         * platform/text/qt/StringQt.cpp:
1068         (WebCore::String::String): Ditto.
1069         * platform/text/wx/StringWx.cpp:
1070         (WebCore::String::String): Ditto.
1071         * rendering/RenderBR.cpp:
1072         (WebCore::RenderBR::RenderBR): Ditto.
1073
1074         * rendering/RenderSVGInlineText.cpp:
1075         (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
1076         * rendering/RenderSVGInlineText.h:
1077
1078         * rendering/RenderText.cpp:
1079         (WebCore::charactersAreAllASCII): Removed now-unneeded const.
1080         * rendering/RenderTextFragment.cpp:
1081         (WebCore::RenderTextFragment::originalText): Use RefPtr.
1082
1083 2008-01-02  Timothy Hatcher  <timothy@apple.com>
1084
1085         Reviewed by Oliver Hunt.
1086
1087         <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
1088
1089         Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
1090         internal element lookup tables. The represented DOM node object still holds the identifier
1091         it was assigned, and a later call to findTreeElement will use that original identifier
1092         against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
1093
1094         * page/inspector/treeoutline.js:
1095         (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
1096         but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
1097         instead of an early return.
1098
1099 2008-01-02  Alice Liu  <alice.liu@apple.com>
1100
1101         Reviewed by Maciej.
1102
1103         Fixed <rdar://5283861> (problems scrolling in gmail message content area)
1104
1105         * platform/ScrollView.h:
1106         * platform/win/ScrollViewWin.cpp:
1107         (WebCore::ScrollView::scroll):
1108          Changed return value to bool to reflect success of scroll attempt
1109
1110 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1111
1112         Fixed a typo (pointed out in review, but I somehow missed it at first).
1113
1114         * editing/EditorCommand.cpp: (WebCore::executeDelete):
1115
1116 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1117
1118         Reviewed by Darin.
1119
1120         Resolved several FIXMEs in EditorCommand.
1121         Made recently added commands hidden from JS again.
1122         Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
1123
1124         Tests: editing/execCommand/delete-no-scroll.html
1125                editing/execCommand/forward-delete-no-scroll.html
1126                editing/execCommand/insert-line-break-no-scroll.html
1127
1128         * editing/EditorCommand.cpp:
1129         (WebCore::executeDelete):
1130         (WebCore::executeForwardDelete):
1131         (WebCore::executeInsertLineBreak):
1132         (WebCore::supportedFromMenuOrKeyBinding):
1133         (WebCore::CommandEntry::):
1134
1135 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1136
1137         Reviewed by Darin.
1138
1139         http://bugs.webkit.org/show_bug.cgi?id=14555
1140         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
1141
1142         http://bugs.webkit.org/show_bug.cgi?id=14774
1143         Submitted data only includes first input item
1144
1145         Reworked encoding of mailto URLs to match other browsers.
1146         Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
1147
1148         Tests: fast/forms/mailto/advanced-get.html
1149                fast/forms/mailto/advanced-put.html
1150                fast/forms/mailto/get-multiple-items-text-plain.html
1151                fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
1152                fast/forms/mailto/get-multiple-items.html
1153                fast/forms/mailto/get-non-ascii.html
1154                fast/forms/mailto/get-non-ascii-text-plain.html
1155                fast/forms/mailto/get-overwrite-query.html
1156                fast/forms/mailto/post-append-query.html
1157                fast/forms/mailto/post-multiple-items-multipart-form-data.html
1158                fast/forms/mailto/post-multiple-items-text-plain.html
1159                fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
1160                fast/forms/mailto/post-multiple-items.html
1161
1162         * html/HTMLFormElement.cpp:
1163         (WebCore::HTMLFormElement::submit):
1164         * loader/FrameLoader.cpp:
1165         (WebCore::FrameLoader::submitForm):
1166
1167 2008-01-02  Mark Rowe  <mrowe@apple.com>
1168
1169         Autotools build fix.
1170
1171         * GNUmakefile.am: Remove files before generating them, not after.
1172
1173 2008-01-02  Mark Rowe  <mrowe@apple.com>
1174
1175         Rubber-stamped by Alp Toker.
1176
1177         Add missing dependencies to some GNUmakefile.am rules.
1178
1179         * GNUmakefile.am:
1180
1181 2008-01-02  Mark Rowe  <mrowe@apple.com>
1182
1183         Reviewed by Alp Toker.
1184
1185         Autotools build fix.  Make can expand $@ to any of the targets for the rule,
1186         while we always want to use the name of the .cpp file as the output file.
1187
1188         * GNUmakefile.am:
1189
1190 2008-01-02  Luca Bruno  <lethalman88@gmail.com>
1191
1192         Reviewed by Alp Toker.
1193
1194         http://bugs.webkit.org/show_bug.cgi?id=16115
1195         [GTK] ContextMenu and ContextMenuItem lacks an implementation
1196
1197         Add context menu support.
1198
1199         Based on a patch by Holger Freyther.
1200
1201         * platform/gtk/ContextMenuGtk.cpp:
1202         (WebCore::menuItemActivated):
1203         (WebCore::ContextMenu::ContextMenu):
1204         (WebCore::ContextMenu::~ContextMenu):
1205         (WebCore::ContextMenu::appendItem):
1206         (WebCore::ContextMenu::setPlatformDescription):
1207         (WebCore::ContextMenu::releasePlatformDescription):
1208         * platform/gtk/ContextMenuItemGtk.cpp:
1209         (WebCore::ContextMenuItem::ContextMenuItem):
1210         (WebCore::ContextMenuItem::~ContextMenuItem):
1211         (WebCore::ContextMenuItem::releasePlatformDescription):
1212         (WebCore::ContextMenuItem::type):
1213         (WebCore::ContextMenuItem::action):
1214         (WebCore::ContextMenuItem::setAction):
1215         (WebCore::ContextMenuItem::platformSubMenu):
1216         (WebCore::ContextMenuItem::setSubMenu):
1217         (WebCore::ContextMenuItem::setChecked):
1218         (WebCore::ContextMenuItem::setEnabled):
1219
1220 2008-01-02  Alp Toker  <alp@atoker.com>
1221
1222         GTK+ autotools build fix. Track changes in r29073.
1223
1224         * GNUmakefile.am:
1225
1226 2008-01-01  Darin Adler  <darin@apple.com>
1227
1228         - fix release build
1229
1230         * bindings/js/kjs_binding.cpp:
1231         (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
1232         Removed default so we get a warning if there's a missing case.
1233
1234 2008-01-01  David D. Kilzer  <ddkilzer@webkit.org>
1235
1236         Scripting MIME Types application/ecmascript, application/javascript not viewable
1237         <http://bugs.webkit.org/show_bug.cgi?id=11063>
1238
1239         Reviewed by Darin.
1240
1241         This patch consolidates the list of acceptable MIME types for JavaScript
1242         source into the MIMETypeRegistry class, and replaces checks for these
1243         types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
1244
1245         No tests added since viewing JavaScript source is not testable.
1246
1247         * dom/DOMImplementation.cpp:
1248         (WebCore::DOMImplementation::isTextMIMEType): Use
1249         MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
1250         hard-coded MIME type, "application/x-javascript".
1251
1252         * html/HTMLScriptElement.cpp:
1253         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
1254         JavaScript MIME types from here to
1255         MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
1256
1257         * platform/MIMETypeRegistry.cpp:
1258         (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
1259         MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
1260         (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
1261         hard-coded MIME type, "application/x-javascript", from the list.
1262         (WebCore::initialiseMIMETypeRegistry): Initialise
1263         supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
1264         with values in supportedJavaScriptMIMETypes.
1265         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
1266
1267         * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
1268
1269 2008-01-01  Sam Weinig  <sam@webkit.org>
1270
1271         Reviewed by Darin.
1272
1273         Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
1274         Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
1275
1276         - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
1277         - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
1278         - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
1279
1280         Tests: fast/dom/DOMException/EventException.html
1281                fast/dom/DOMException/RangeException.html
1282                fast/dom/DOMException/XPathException.html
1283                http/tests/xmlhttprequest/XMLHttpRequestException.html
1284                svg/custom/SVGException.html
1285
1286         * DerivedSources.make:
1287         * WebCore.pro:
1288         * WebCore.vcproj/WebCore.vcproj:
1289         * WebCore.xcodeproj/project.pbxproj:
1290         * WebCoreSources.bkl:
1291         * bindings/js/JSSVGMatrixCustom.cpp:
1292         (WebCore::JSSVGMatrix::inverse):
1293         (WebCore::JSSVGMatrix::rotateFromVector):
1294         * bindings/js/kjs_binding.cpp:
1295         (KJS::setDOMException):
1296         * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
1297         in the IDL as the ObjC bindings do.
1298         * bindings/scripts/CodeGeneratorObjC.pm:
1299         * dom/DOMCoreException.cpp: Removed.
1300         * dom/DOMCoreException.h:
1301         (WebCore::DOMCoreException::DOMCoreException):
1302         * dom/DOMCoreException.idl:
1303         * dom/Event.h:
1304         * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
1305         (WebCore::EventException::EventException):
1306         (WebCore::EventException::):
1307         * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1308         * dom/EventTargetNode.cpp:
1309         (WebCore::EventTargetNode::dispatchEvent):
1310         * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
1311         (WebCore::ExceptionBase::ExceptionBase):
1312         (WebCore::ExceptionBase::toString):
1313         * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
1314         (WebCore::ExceptionBase::code):
1315         * dom/ExceptionCode.cpp:
1316         (WebCore::getExceptionCodeDescription):
1317         * dom/ExceptionCode.h:
1318         (WebCore::):
1319         * dom/Range.cpp:
1320         (WebCore::Range::insertNode):
1321         (WebCore::Range::checkNodeWOffset):
1322         (WebCore::Range::checkNodeBA):
1323         (WebCore::Range::selectNode):
1324         (WebCore::Range::selectNodeContents):
1325         (WebCore::Range::surroundContents):
1326         * dom/RangeException.h:
1327         (WebCore::RangeException::RangeException):
1328         (WebCore::RangeException::):
1329         * dom/RangeException.idl:
1330         * page/DOMWindow.idl:
1331         * svg/SVGColor.cpp:
1332         (WebCore::SVGColor::setRGBColor):
1333         * svg/SVGException.h:
1334         (WebCore::SVGException::SVGException):
1335         (WebCore::SVGException::):
1336         * svg/SVGException.idl:
1337         * svg/SVGLocatable.cpp:
1338         (WebCore::SVGLocatable::getTransformToElement):
1339         * xml/XMLHttpRequest.cpp:
1340         (WebCore::XMLHttpRequest::dispatchEvent):
1341         (WebCore::XMLHttpRequest::open):
1342         (WebCore::XMLHttpRequest::send):
1343         * xml/XMLHttpRequest.h:
1344         * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
1345         (WebCore::XMLHttpRequestException::XMLHttpRequestException):
1346         (WebCore::XMLHttpRequestException::):
1347         * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1348         * xml/XPathEvaluator.h:
1349         * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
1350         (WebCore::XPathException::XPathException):
1351         (WebCore::XPathException::):
1352         * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1353         * xml/XPathParser.cpp:
1354         (WebCore::XPath::Parser::parseStatement):
1355         * xml/XPathResult.cpp:
1356         (WebCore::XPathResult::convertTo):
1357         (WebCore::XPathResult::numberValue):
1358         (WebCore::XPathResult::stringValue):
1359         (WebCore::XPathResult::booleanValue):
1360         (WebCore::XPathResult::singleNodeValue):
1361         (WebCore::XPathResult::snapshotLength):
1362         (WebCore::XPathResult::iterateNext):
1363         (WebCore::XPathResult::snapshotItem):
1364
1365 2008-01-01  Sam Weinig  <sam@webkit.org>
1366
1367         Remove JSDomExceptionConstructor.lut.h from clean step
1368         as it no longer exists.
1369
1370         * GNUmakefile.am:
1371
1372 2008-01-01  Dan Bernstein  <mitz@apple.com>
1373
1374         - Windows build fix
1375
1376         * WebCore.vcproj/WebCore.vcproj:
1377
1378 2008-01-01  Sam Weinig  <sam@webkit.org>
1379
1380         Try again to fix the builds
1381
1382         * DerivedSources.make:
1383
1384 2008-01-01  Sam Weinig  <sam@webkit.org>
1385
1386         Fix non-mac builds.
1387
1388         * WebCore.pro:
1389         * WebCore.vcproj/WebCore.vcproj:
1390         * WebCoreSources.bkl:
1391
1392 2008-01-01  Eric Seidel  <eric@webkit.org>
1393
1394         Reviewed by Alexey.
1395
1396         Don't replace \ with / in data: urls
1397         http://bugs.webkit.org/show_bug.cgi?id=16692
1398
1399         Test: fast/loader/url-data-replace-backslash.html
1400
1401         * platform/KURL.cpp:
1402         (WebCore::KURL::init):
1403
1404 2008-01-01  Alp Toker  <alp@atoker.com>
1405
1406         GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
1407         correct parameter to AM_INIT_AUTOMAKE.
1408
1409         * GNUmakefile.am:
1410
1411 2007-12-31  Sam Weinig  <sam@webkit.org>
1412
1413         Reviewed by Darin.
1414
1415         Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
1416         Acid3 expects ExeceptionCode constants to be defined on DOMException objects
1417
1418         - Make DOMException a real JS object.
1419
1420         Test: fast/dom/DOMException/prototype-object.html
1421
1422         * DerivedSources.make:
1423         * WebCore.xcodeproj/project.pbxproj:
1424
1425         This is no longer needed as the autogenerated classes now includes the
1426         constructor.
1427         * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
1428         * bindings/js/JSDOMExceptionConstructor.h: Removed.
1429
1430         Create on demand and use the new class for DOMExceptions.
1431         * bindings/js/kjs_binding.cpp:
1432         (KJS::setDOMException):
1433
1434         Remove no longer needed custom constructor getter.
1435         * bindings/js/kjs_window.cpp:
1436         (KJS::Window::getValueProperty):
1437
1438         Don't expose DOMCoreException as the name of class by special casing
1439         the user visible class name to be DOMException.
1440         * bindings/scripts/CodeGeneratorJS.pm:
1441
1442         The DOMException class/file needs to be named DOMCoreException because there is
1443         name conflict with one of the Objective-C bindings classes.  It should be renamed
1444         to DOMException when the Objective-C bindings are moved into WebKit.
1445         * dom/DOMCoreException.cpp: Added.
1446         (WebCore::DOMCoreException::DOMCoreException):
1447         (WebCore::DOMCoreException::toString):
1448         * dom/DOMCoreException.h: Added.
1449         (WebCore::DOMCoreException::):
1450         (WebCore::DOMCoreException::code):
1451         (WebCore::DOMCoreException::name):
1452         (WebCore::DOMCoreException::message):
1453         * dom/DOMCoreException.idl: Added.
1454         * page/DOMWindow.idl:
1455
1456 2007-12-31  Sam Weinig  <sam@webkit.org>
1457
1458         Re-enable querySelector and querySelectorAll and touch the necessary files to not
1459         kill the windows build.
1460
1461         * WebCore.vcproj/build-generated-files.sh:
1462         * bindings/scripts/CodeGeneratorCOM.pm:
1463         * dom/Document.idl:
1464         * dom/Element.idl:
1465
1466 2007-12-31  Darin Adler  <darin@apple.com>
1467
1468         - fix Windows build
1469
1470         * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
1471         up as pure virtual functions. Sam can fix this later.
1472         * dom/Element.idl: Ditto.
1473
1474 2007-12-31  Dan Bernstein  <mitz@apple.com>
1475
1476         Reviewed by Darin Adler.
1477
1478         - fix http://bugs.webkit.org/show_bug.cgi?id=14134
1479           <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
1480
1481         Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
1482
1483         * dom/Node.cpp:
1484         (WebCore::Node::attach): Added code to check if this node's renderer
1485         has become the "previous renderer" of any sibling text node, and if so,
1486         ensure that that node gets a renderer if it now needs one.
1487         (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
1488         node is not attached.
1489
1490 2007-12-31  Darin Adler  <darin@apple.com>
1491
1492         Reviewed by Mitz.
1493
1494         - fix http://bugs.webkit.org/show_bug.cgi?id=16641
1495           Acid3 reveals HTMLFormElement.elements fails to update when element name changes
1496
1497         Test: fast/dom/HTMLFormElement/elements-not-in-document.html
1498
1499         This was a bug specific to forms that are not in the document tree.
1500         The fix was to change the code to increment the document version number to match
1501         up with other document change tracking. Maybe at some point we can clean these up
1502         so we don't have so many competing change notification systems.
1503
1504         * dom/ContainerNode.cpp:
1505         (WebCore::ContainerNode::replaceChild): Removed bogus comment.
1506         (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
1507         call here, since this code path bypasses the subtree-modified event code.
1508
1509         * dom/Element.cpp:
1510         (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
1511         collections are for things in the document.
1512         (WebCore::Element::setAttributeMap): Ditto.
1513
1514         * dom/EventTargetNode.cpp:
1515         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
1516         incDOMTreeVersion here; covers most cases of tree structure changes.
1517
1518         * dom/Node.cpp:
1519         (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
1520         has nothing to do with changes to the DOM tree!
1521         (WebCore::Node::detach): Ditto.
1522
1523         * html/HTMLFormElement.cpp:
1524         (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
1525         This is handled at a lower level and doesn't need to be here.
1526         (WebCore::HTMLFormElement::removeFormElement): Ditto.
1527
1528 2007-12-31  Henry Mason  <hmason@mac.com>
1529
1530         Reviewed by Darin.
1531
1532         Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
1533         Support for MessageEvent and cross-domain messaging
1534
1535         Test: http/tests/messaging/cross-domain-message-send.html
1536
1537         * DerivedSources.make:
1538         * WebCore.pro:
1539         * WebCore.vcproj/WebCore.vcproj:
1540         * WebCore.xcodeproj/project.pbxproj:
1541         * WebCoreSources.bkl:
1542         * bindings/js/JSDOMWindowCustom.cpp:
1543         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
1544         postMessage function.
1545         (WebCore::JSDOMWindow::postMessage):
1546         * bindings/js/JSEventCustom.cpp:
1547         (WebCore::toJS):
1548         * dom/Event.cpp:
1549         (WebCore::Event::isMessageEvent):
1550         * dom/Event.h:
1551         * dom/EventNames.h: New event name
1552         * dom/MessageEvent.cpp: Added.
1553         * dom/MessageEvent.h: Added.
1554         * dom/MessageEvent.idl: Added.
1555         * page/DOMWindow.cpp:
1556         (WebCore::DOMWindow::postMessage): Added.
1557         * page/DOMWindow.h:
1558         * page/DOMWindow.idl:
1559
1560 2007-12-31  Darin Adler  <darin@apple.com>
1561
1562         Suggested by Antti.
1563
1564         - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
1565
1566         * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
1567         * WebCore.vcproj/build-generated-files.sh: Ditto.
1568
1569 2007-12-30  Alp Toker  <alp@atoker.com>
1570
1571         Reviewed by Dan Bernstein.
1572
1573         Silence warning.
1574
1575         * dom/NodeList.h:
1576
1577 2007-12-30  Sam Weinig  <sam@webkit.org>
1578
1579         Reviewed by Oliver Hunt.
1580
1581         Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
1582         Variable names can be enumerated across domains
1583         <rdar://problem/5640454>
1584
1585         Test: http/tests/security/cross-frame-access-enumeration.html
1586
1587         * bindings/js/kjs_window.cpp:
1588         (KJS::Window::getPropertyNames): Override method to test same-origin policy.
1589         * bindings/js/kjs_window.h:
1590
1591 2007-12-30  Sam Weinig  <sam@webkit.org>
1592
1593         Reviewed by Oliver Hunt.
1594
1595         Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
1596         event instanceof MouseEvent throws exception
1597
1598         Add JS constructors for all the Event types.
1599
1600         Test: fast/events/event-instanceof.html
1601
1602         * WebCore.xcodeproj/project.pbxproj:
1603         * dom/KeyboardEvent.idl:
1604         * dom/MouseEvent.idl:
1605         * dom/MutationEvent.idl:
1606         * dom/OverflowEvent.idl:
1607         * dom/ProgressEvent.idl:
1608         * dom/TextEvent.idl:
1609         * dom/UIEvent.idl:
1610         * dom/WheelEvent.idl:
1611         * page/DOMWindow.idl:
1612
1613 2007-12-30  David Kilzer  <ddkilzer@webkit.org>
1614
1615         Reviewed by Darin.
1616
1617         - fix http://bugs.webkit.org/show_bug.cgi?id=15359
1618           JPEG image not shown when height is specified as percentage inside a table
1619
1620         The problem occurs when a replaced element (image, canvas, etc.) with
1621         a percent-height attribute is contained by a table cell with an auto-
1622         or percent-height attribute.  If there are no other conditions to cause
1623         the table cell's height to expand, an available height of zero will
1624         always be returned.  In these cases, the intrinsic height of the
1625         replaced element should be used if it is greater than the available
1626         height of the table cell.
1627
1628         Tests: fast/replaced/table-percent-height.html
1629                tables/mozilla/bugs/bug137388-1.html
1630                tables/mozilla/bugs/bug137388-2.html
1631
1632         * rendering/RenderBox.cpp:
1633         (WebCore::RenderBox::calcReplacedHeightUsing):
1634
1635 2007-12-30  Luca Bruno  <lethalman88@gmail.com>
1636
1637         Reviewed by Alp Toker.
1638
1639         http://bugs.webkit.org/show_bug.cgi?id=16099
1640         Crash in CURL for empty POST
1641
1642         We have to set POST even when the data is empty, otherwise cURL will
1643         hang while waiting for a response.
1644
1645         * platform/network/curl/ResourceHandleManager.cpp
1646         (ResourceHandleManager::setupPOST): allow empty POST
1647
1648 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1649
1650         Reviewed by Alp Toker.
1651
1652         Move all SVG related stuff inside SVG block. Don't include
1653         SVGNames, SVGElementFactory, and XLinkNames when SVG is not
1654         enabled
1655
1656         * GNUmakefile.am:
1657
1658 2007-12-29  Alexey Proskuryakov  <ap@webkit.org>
1659
1660         Reviewed by Darin.
1661
1662         http://bugs.webkit.org/show_bug.cgi?id=14428
1663         FCKEditor: Images disappear on drag/drop and copy/paste
1664
1665         Test: editing/pasteboard/drag-image-in-about-blank-frame.html
1666
1667         * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
1668         base URL, just like we don't use an empty one.
1669
1670 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1671
1672         Reviewed by Alp Toker.
1673
1674         http://bugs.webkit.org/show_bug.cgi?id=16669
1675         autotools update and fixes
1676
1677         Autotools update and database/icon database inclusion guard fixes
1678
1679         * GNUmakefile.am:
1680           - Update autotools config as per -r29012 changes
1681           - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
1682         * dom/Document.cpp:
1683         * loader/icon/IconDatabase.h:
1684         * page/DOMWindow.cpp:
1685         * page/InspectorController.cpp:
1686         * page/Settings.cpp:
1687         * storage/Database.h:
1688           - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
1689
1690 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1691
1692         Reviewed by Alexey.
1693
1694         Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
1695         (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
1696
1697         * svg/SVGFont.cpp:
1698         (WebCore::Font::drawGlyphsWithSVGFont):
1699
1700 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1701
1702         Reviewed by Oliver.
1703
1704         Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
1705         SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
1706
1707         * platform/graphics/FontData.cpp:
1708         (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
1709         (WebCore::FontData::ascent):
1710         (WebCore::FontData::descent):
1711         * platform/graphics/FontData.h:
1712         * svg/SVGFont.cpp:
1713         (WebCore::isVerticalWritingMode): Add helper function.
1714         (WebCore::Font::drawGlyphsWithSVGFont):
1715         * svg/SVGFontElement.cpp:
1716         (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
1717         * svg/SVGGlyphElement.cpp:
1718         (WebCore::parseArabicForm): Helper function.
1719         (WebCore::parseOrientation): Ditto.
1720         (WebCore::parsePathData): Ditto.
1721         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1722         * svg/SVGGlyphElement.h:
1723         (WebCore::SVGGlyphElement::rendererIsNeeded):
1724
1725 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1726
1727         Reviewed by Oliver.
1728
1729         Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
1730         SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
1731
1732         * svg/SVGAnimationElement.cpp:
1733         (WebCore::SVGAnimationElement::parseMappedAttribute):
1734         * svg/SVGParserUtilities.cpp:
1735         (WebCore::parseDelimitedString):
1736         * svg/SVGParserUtilities.h:
1737
1738 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1739
1740         Reviewed by Maciej.
1741
1742         Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
1743         Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
1744
1745         To optimize for the common case ('FontData' used for HTML rendering) it feels
1746         better to hold one OwnPtr in FontData, than several floats.
1747
1748         Parse all <font> attributes in SVGFontFaceElement::createFontData.
1749
1750         * platform/graphics/FontData.cpp:
1751         (WebCore::SVGFontData::SVGFontData):
1752         (WebCore::FontData::FontData):
1753         (WebCore::FontData::ascent):
1754         (WebCore::FontData::descent):
1755         * platform/graphics/FontData.h:
1756         (WebCore::FontData::isSVGFont):
1757         (WebCore::FontData::svgFontData):
1758         * svg/SVGFont.cpp:
1759         (WebCore::Font::drawGlyphsWithSVGFont):
1760         * svg/SVGFontElement.cpp:
1761         * svg/SVGFontElement.h:
1762         (WebCore::SVGFontElement::rendererIsNeeded):
1763         * svg/SVGFontFaceElement.cpp:
1764         (WebCore::SVGFontFaceElement::unitsPerEm):
1765         (WebCore::SVGFontFaceElement::createFontData):
1766
1767 2007-12-28  Darin Adler  <darin@apple.com>
1768
1769         - try to fix Windows and WX builds (broken by SVG Fonts check-in)
1770
1771         * platform/graphics/win/FontWin.cpp:
1772         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
1773         I can't see how it can be right to require the font size for ascent and descent,
1774         but not for other metrics functions in FontData.
1775
1776         * platform/graphics/wx/FontWx.cpp:
1777         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
1778
1779 2007-12-28  Dan Bernstein  <mitz@apple.com>
1780
1781         Reviewed by Mark Rowe.
1782
1783         - fix http://bugs.webkit.org/show_bug.cgi?id=16650
1784           <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
1785
1786         Covered by existing pixel tests.
1787
1788         * platform/graphics/mac/FontMac.mm:
1789         (WebCore::Font::drawComplexText): Corrected to maintain the style
1790         information in the adjusted text run when passing it to
1791         ATSUILayoutParameters. Prior to r28298 the style was passed separately.
1792
1793 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1794
1795         Build fix, not reviewed.
1796
1797         Add wtf/OwnPtr.h include, to fix --svg-fonts build.
1798
1799         * css/SVGCSSFontFace.h:
1800
1801 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1802
1803         Reviewed by Eric.
1804
1805         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
1806
1807         Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
1808         Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
1809         are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
1810
1811         Limited to single char <-> glyph mapping, no ligatures supported yet.
1812         (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
1813
1814         Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
1815
1816         No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
1817         attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
1818
1819         * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
1820         * WebCore.pro: Updated build system.
1821         * WebCore.vcproj/WebCore.vcproj: Ditto.
1822         * WebCore.xcodeproj/project.pbxproj: Ditto.
1823         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
1824         * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
1825         (WebCore::createElementClassMap):
1826         * bindings/objc/DOMInternal.h: Ditto.
1827         * bindings/objc/DOMSVG.h: Ditto.
1828         * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
1829         * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
1830         (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
1831         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
1832         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
1833         * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
1834         (WebCore::CSSFontSelector::addFontFaceRule):
1835         * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
1836         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
1837         (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
1838         (WebCore::SVGCSSFontFace::isValid):
1839         (WebCore::SVGCSSFontFace::addSource):
1840         (WebCore::SVGCSSFontFace::getFontData):
1841         * css/SVGCSSFontFace.h: Added.
1842         * platform/graphics/cg/PathCG.cpp:
1843         (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
1844         * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
1845         (WebCore::Font::ascent): Pass font size to FontData::ascent() call
1846         (WebCore::Font::descent): Pass font size to FontData::descent() call
1847         (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
1848         (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
1849         * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
1850         (WebCore::TextRun::TextRun):
1851         (WebCore::TextRun::referencingRenderObject):
1852         (WebCore::TextRun::setReferencingRenderObject):
1853         * platform/graphics/FontData.cpp:
1854         (WebCore::FontData::FontData):
1855         (WebCore::FontData::ascent):
1856         (WebCore::FontData::descent):
1857         * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
1858         (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
1859         (WebCore::FontData::svgFontFace):
1860         * rendering/SVGInlineTextBox.cpp:
1861         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
1862         * rendering/SVGRootInlineBox.cpp:
1863         (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
1864         * svg/SVGFont.cpp: Added.
1865         (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
1866         * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
1867         (WebCore::SVGFontElement::SVGFontElement):
1868         (WebCore::SVGFontElement::~SVGFontElement):
1869         (WebCore::SVGFontElement::parseMappedAttribute):
1870         (WebCore::SVGFontElement::collectGlyphs):
1871         (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
1872         * svg/SVGFontElement.h: Added.
1873         (WebCore::GlyphHash::hash):
1874         (WebCore::GlyphHash::equal):
1875         (WebCore::GlyphHashTraits::deletedValue):
1876         (WebCore::SVGFontElement::rendererIsNeeded):
1877         (WebCore::SVGFontElement::contextElement):
1878         * svg/SVGFontElement.idl: Added.
1879         * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
1880         (WebCore::SVGFontFaceElement::unitsPerEm):
1881         (WebCore::SVGFontFaceElement::fontFamily):
1882         (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
1883         (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
1884         (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
1885         (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
1886         * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
1887         * svg/SVGFontFaceElement.idl: Ditto.
1888         * svg/SVGFontFaceFormatElement.cpp: Ditto.
1889         * svg/SVGFontFaceFormatElement.h: Ditto.
1890         * svg/SVGFontFaceFormatElement.idl: Ditto.
1891         * svg/SVGFontFaceNameElement.cpp: Ditto.
1892         * svg/SVGFontFaceNameElement.h: Ditto.
1893         * svg/SVGFontFaceNameElement.idl: Ditto.
1894         * svg/SVGFontFaceSrcElement.cpp: Ditto.
1895         * svg/SVGFontFaceSrcElement.h: Ditto.
1896         * svg/SVGFontFaceSrcElement.idl: Ditto.
1897         * svg/SVGFontFaceUriElement.cpp: Ditto.
1898         * svg/SVGFontFaceUriElement.h: Ditto.
1899         * svg/SVGFontFaceUriElement.idl: Ditto.
1900         * svg/SVGDefinitionSrcElement.cpp: Ditto.
1901         * svg/SVGDefinitionSrcElement.h: Ditto.
1902         * svg/SVGDefinitionSrcElement.idl: Ditto.
1903         * svg/SVGGlyphElement.cpp: Added.
1904         (WebCore::SVGGlyphElement::SVGGlyphElement):
1905         (WebCore::SVGGlyphElement::parseMappedAttribute):
1906         (WebCore::SVGGlyphElement::childrenChanged):
1907         * svg/SVGGlyphElement.h: Added.
1908         (WebCore::SVGGlyphElement::rendererIsNeeded):
1909         (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
1910         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
1911         * svg/SVGGlyphElement.idl: Added.
1912         * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
1913         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
1914         (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
1915         (WebCore::SVGMissingGlyphElement::childrenChanged):
1916         * svg/SVGMissingGlyphElement.h: Added.
1917         (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
1918         * svg/SVGMissingGlyphElement.idl: Added.
1919         * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!).
1920
1921 2007-12-27  Dan Bernstein  <mitz@apple.com>
1922
1923         Reviewed by Alexey Proskuryakov.
1924
1925         - fix http://bugs.webkit.org/show_bug.cgi?id=16628
1926           ASSERTION FAILED: m_resizeLayer (running layout tests)
1927
1928         * rendering/RenderLayer.cpp:
1929         (WebCore::RenderLayer::~RenderLayer): Avoid calling
1930         EventHandler::resizeLayerDestroyed() if the document is being destroyed.
1931
1932 2007-12-27  Dan Bernstein  <mitz@apple.com>
1933
1934         Reviewed by Oliver Hunt.
1935
1936         - fix http://bugs.webkit.org/show_bug.cgi?id=16603
1937           <rdar://problem/5664199> Crash when resizing text field
1938
1939         Test: fast/layers/resize-layer-deletion-crash.html
1940
1941         The event handler has only a weak reference to the layer that is
1942         currently in resize mode, so it is the layer's responsibility to let
1943         the event handler know if it has been destroyed while in that mode.
1944
1945         * page/EventHandler.cpp:
1946         (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
1947         m_resizeLayer to 0.
1948         * page/EventHandler.h:
1949         * rendering/RenderLayer.cpp:
1950         (WebCore::RenderLayer::~RenderLayer): Added a call to
1951         EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
1952
1953 2007-12-27  Collin Jackson  <webkit@collinjackson.com>
1954
1955         Reviewed by Sam Weinig.
1956
1957         http://bugs.webkit.org/show_bug.cgi?id=16539
1958         <rdar://problem/5659269>
1959
1960         The same-origin check was missing in the implementation of 
1961         setTimeout, setInterval, addEventListener, and removeEventListener.
1962
1963         Suppose <http://www.badguy.com/> contains an iframe to 
1964         <http://www.goodguy.com/>. Now www.badguy.com can steal
1965         www.goodguy.com cookies by running this code:
1966
1967         setTimeout.call(frames[0], "alert(document.cookie)", 1000);
1968
1969         This patch changes the behavior so that setTimeout to does 
1970         nothing and returns an undefined value if the caller is not
1971         permitted to script the window whose setTimeout method is being
1972         called. The same applies to setInterval, addEventListener, and 
1973         removeEventListener.
1974
1975         Tests: http/tests/security/cross-frame-access-call.html
1976
1977         * bindings/js/kjs_window.cpp:
1978         (KJS::WindowProtoFuncSetTimeout::callAsFunction)
1979         (KJS::WindowProtoFuncSetInterval::callAsFunction)
1980         (KJS::WindowProtoFuncAddEventListener::callAsFunction)
1981         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
1982
1983 2007-12-27  Dan Bernstein  <mitz@apple.com>
1984
1985         Reviewed by Dave Hyatt and Sam Weinig.
1986
1987         - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
1988
1989         Test: fast/layers/add-layer-with-nested-stacking.html
1990         Test: fast/layers/remove-layer-with-nested-stacking.html
1991
1992         * rendering/RenderLayer.cpp:
1993         (WebCore::RenderLayer::addChild): If the new child is overflow-only
1994         but has children of its own, dirty the stacking context's z-order lists
1995         since the grandchildren might need to be in them.
1996         (WebCore::RenderLayer::removeChild): Similarly for the old child.
1997
1998 2007-12-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1999
2000         Reviewed by Alp Toker.
2001
2002         http://bugs.webkit.org/show_bug.cgi?id=16353
2003         [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
2004
2005         Added the flags mentioned in the bug only when doing 'debug'
2006         builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
2007
2008         * GNUmakefile.am:
2009         * WebCore.pro:
2010
2011 2007-12-27  Dan Bernstein  <mitz@apple.com>
2012
2013         Reviewed by Eric Seidel.
2014
2015         - fix http://bugs.webkit.org/show_bug.cgi?id=16490
2016           ASSERT in ~FrameView while viewing/reloading WICD test case
2017
2018         Test: fast/dynamic/paused-event-dispatch.html
2019
2020         * page/FrameView.cpp:
2021         (WebCore::FrameView::~FrameView):
2022         (WebCore::FrameView::layout): Changed to always pause event dispatch and
2023         always resume event dispatch, regardless of whether the post-layout
2024         task timer is active. However, if it is active, assert that event
2025         dispatch is still paused.
2026
2027 2007-12-27  Alexey Proskuryakov  <ap@webkit.org>
2028
2029         Reviewed by Maciej.
2030
2031         http://bugs.webkit.org/show_bug.cgi?id=14500
2032         need to be more generous about charset declaration with meta tag
2033         
2034         http://bugs.webkit.org/show_bug.cgi?id=12526
2035         <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
2036
2037         <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
2038
2039         <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
2040
2041         Tests: fast/encoding/ahram-org-eg.html
2042                fast/encoding/bandai-co-jp-releases.html
2043                fast/encoding/floraexpress-ru.html
2044                fast/encoding/hanarei-blog32-fc2-com.html
2045                fast/encoding/yahoo-mail.html
2046
2047         * loader/TextResourceDecoder.cpp:
2048         (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
2049         seen at least 512 bytes of input.
2050
2051 2007-12-26  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2052
2053         Reviewed by Alp Toker.
2054
2055         http://bugs.webkit.org/show_bug.cgi?id=16390
2056         Use autotools or GNU make as the build system for the GTK port
2057
2058         * GNUmakefile.am: Added.
2059
2060 2007-12-26  Alexey Proskuryakov  <ap@webkit.org>
2061
2062         Reviewed by Sam Weinig.
2063
2064         http://bugs.webkit.org/show_bug.cgi?id=16609
2065         Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
2066
2067         * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
2068
2069 2007-12-26  Mark Rowe  <mrowe@apple.com>
2070
2071         Windows build fix.
2072
2073         * platform/Threading.h:
2074
2075 2007-12-25  Rob Buis  <buis@kde.org>
2076
2077         Reviewed by Eric.
2078
2079         http://bugs.webkit.org/show_bug.cgi?id=15514
2080         <clipPath> with <use> not respected
2081         http://bugs.webkit.org/show_bug.cgi?id=16557
2082         SVG circle elements have been clipped away completely, instead of partially.
2083
2084         Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
2085
2086         * svg/SVGClipPathElement.cpp:
2087         (WebCore::SVGClipPathElement::canvasResource):
2088         * svg/SVGStyledTransformableElement.h:
2089         (WebCore::SVGStyledTransformableElement::toClipPath):
2090         * svg/SVGUseElement.cpp:
2091         (WebCore::isDirectReference):
2092         (WebCore::SVGUseElement::toClipPath):
2093         * svg/SVGUseElement.h:
2094
2095 2007-12-25  Sam Weinig  <sam@webkit.org>
2096
2097         Reviewed by Eric Seidel.
2098
2099         Clean up the files relating to NodeLists.
2100
2101         * dom/ChildNodeList.cpp:
2102         (WebCore::ChildNodeList::ChildNodeList):
2103         (WebCore::ChildNodeList::length):
2104         (WebCore::ChildNodeList::item):
2105         (WebCore::ChildNodeList::nodeMatches):
2106         * dom/ChildNodeList.h:
2107         * dom/DynamicNodeList.cpp:
2108         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
2109         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
2110         (WebCore::DynamicNodeList::itemWithName):
2111         * dom/DynamicNodeList.h:
2112         (WebCore::DynamicNodeList::needsNotifications):
2113         * dom/NameNodeList.cpp:
2114         (WebCore::NameNodeList::NameNodeList):
2115         (WebCore::NameNodeList::rootNodeAttributeChanged):
2116         (WebCore::NameNodeList::nodeMatches):
2117         * dom/NameNodeList.h:
2118         * dom/NodeList.h:
2119         * dom/SelectorNodeList.h:
2120
2121 2007-12-25  Sam Weinig  <sam@webkit.org>
2122
2123         Fix non-mac builds.
2124
2125         * WebCore.pro:
2126         * WebCore.vcproj/WebCore.vcproj:
2127         * WebCoreSources.bkl:
2128
2129 2007-12-25  Sam Weinig  <sam@webkit.org>
2130
2131         Rubber stamped by Eric Seidel.
2132
2133         Move TagNodeList into its own file.
2134
2135         * WebCore.xcodeproj/project.pbxproj:
2136         * dom/Node.cpp:
2137         * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
2138         (WebCore::TagNodeList::TagNodeList):
2139         * dom/TagNodeList.h: Copied from dom/Node.cpp.
2140
2141 2007-12-25  Sam Weinig  <sam@webkit.org>
2142
2143         Reviewed by Eric Seidel.
2144
2145         Simplify the NodeList architecture.
2146         - Rename recursiveItem() to item(), since it is not recursive.
2147         - Make recursiveLength() iterative and rename to length().
2148         - Remove now unneeded overrides of item() and length() that used 
2149           to call the recursive variants.
2150
2151         * dom/ClassNodeList.cpp:
2152         * dom/ClassNodeList.h:
2153         * dom/DynamicNodeList.cpp:
2154         (WebCore::DynamicNodeList::length):
2155         (WebCore::DynamicNodeList::item):
2156         (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation 
2157         into the .cpp file since virtual methods can't be inlined.
2158         * dom/DynamicNodeList.h:
2159         * dom/NameNodeList.cpp:
2160         * dom/NameNodeList.h:
2161         * dom/Node.cpp:
2162
2163 2007-12-25  Alp Toker  <alp@atoker.com>
2164
2165         More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
2166         r28981.
2167
2168         * WebCore.pro:
2169         * WebCore.vcproj/WebCore.vcproj:
2170         * WebCoreSources.bkl:
2171
2172 2007-12-25  Alp Toker  <alp@atoker.com>
2173
2174         Win build fix for breakage introduced in r28981.
2175
2176         * WebCore.vcproj/WebCore.vcproj:
2177
2178 2007-12-25  Alp Toker  <alp@atoker.com>
2179
2180         Wx build fix for breakage introduced in r28981.
2181
2182         * WebCoreSources.bkl:
2183
2184 2007-12-25  Alp Toker  <alp@atoker.com>
2185
2186         GTK+/Qt build fix for breakage introduced in r28981.
2187
2188         * WebCore.pro:
2189
2190 2007-12-25  David Smith  <catfish.man@gmail.com> and Sam Weinig  <sam@webkit.org>
2191
2192         Reviewed by Oliver.
2193         
2194         - http://bugs.webkit.org/show_bug.cgi?id=16587
2195         Implement the most useful part of the W3C Selectors API.
2196
2197         * WebCore.xcodeproj/project.pbxproj:
2198         * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
2199         * dom/ChildNodeList.cpp:
2200         (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
2201         * dom/ChildNodeList.h:
2202         * dom/ClassNodeList.cpp:
2203         (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
2204         * dom/ClassNodeList.h:
2205         * dom/Document.idl: Add the new functions
2206         * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
2207         (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
2208         (WebCore::DynamicNodeList::~DynamicNodeList):
2209         (WebCore::DynamicNodeList::recursiveLength):
2210         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
2211         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
2212         (WebCore::DynamicNodeList::recursiveItem):
2213         (WebCore::DynamicNodeList::itemWithName):
2214         (WebCore::DynamicNodeList::rootNodeChildrenChanged):
2215         (WebCore::DynamicNodeList::Caches::Caches):
2216         (WebCore::DynamicNodeList::Caches::reset):
2217         * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
2218         (WebCore::DynamicNodeList::rootNodeAttributeChanged):
2219         * dom/Element.idl: Add the new functions
2220         * dom/NameNodeList.cpp: Change to being a DynamicNodeList
2221         (WebCore::NameNodeList::NameNodeList):
2222         * dom/NameNodeList.h:
2223         (WebCore::NameNodeList::rootNodeAttributeChanged):
2224         * dom/Node.cpp:
2225         (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
2226         (WebCore::Node::registerDynamicNodeList):
2227         (WebCore::Node::unregisterDynamicNodeList):
2228         (WebCore::Node::getElementsByName):
2229         (WebCore::Node::getElementsByClassName):
2230         (WebCore::Node::querySelector): new
2231         (WebCore::Node::querySelectorAll): new
2232         * dom/Node.h:
2233         * dom/NodeList.cpp: Removed.
2234         * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
2235         (WebCore::NodeList::NodeList):
2236         (WebCore::NodeList::~NodeList):
2237         * dom/SelectorNodeList.cpp: Added.
2238         (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
2239         * dom/SelectorNodeList.h: Added.
2240         * dom/StaticNodeList.cpp: Added.
2241         (WebCore::StaticNodeList::length):
2242         (WebCore::StaticNodeList::item):
2243         (WebCore::StaticNodeList::itemWithName):
2244         * dom/StaticNodeList.h: Added.
2245         (WebCore::StaticNodeList::StaticNodeList):
2246         (WebCore::StaticNodeList::~StaticNodeList):
2247
2248 2007-12-25  Mark Rowe  <mrowe@apple.com>
2249
2250         Reviewed by Sam Weinig.
2251
2252         Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
2253         http://bugs.webkit.org/show_bug.cgi?id=16596
2254
2255         This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
2256         of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
2257         access to a single ThreadSafeShared object.
2258
2259         The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
2260
2261         * platform/Threading.h:
2262         (WebCore::atomicIncrement):
2263         (WebCore::atomicDecrement):
2264         (WebCore::ThreadSafeShared::ThreadSafeShared):
2265         (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
2266         (WebCore::ThreadSafeShared::deref): Ditto.
2267         (WebCore::ThreadSafeShared::hasOneRef):
2268         (WebCore::ThreadSafeShared::refCount):
2269         (WebCore::ThreadSafeShared::isThreadSafe):
2270
2271 2007-12-24  Darin Adler  <darin@apple.com>
2272
2273         * platform/text/PlatformString.h: Removed now-incorrect comment.
2274         Added a comment about copy().
2275         * platform/text/StringImpl.h: Added a comment about copy().
2276
2277 2007-12-24  Darin Adler  <darin@apple.com>
2278
2279         Reviewed by Maciej.
2280
2281         - http://bugs.webkit.org/show_bug.cgi?id=16550
2282           make StringImpl immutable
2283
2284         I tried to keep the changes to a minimum. In some cases there is
2285         room for optimization -- I didn't try to add in the "single ref count"
2286         optimizations and there might be a tiny bit more string copying than
2287         we had before.
2288
2289         * WebCore.base.exp: Updated.
2290
2291         * dom/CharacterData.cpp:
2292         (WebCore::CharacterData::appendData): Changed to use String since
2293         StringImpl doesn't have mutating functions any more.
2294         (WebCore::CharacterData::insertData): Ditto.
2295         (WebCore::CharacterData::deleteData): Ditto.
2296         (WebCore::CharacterData::replaceData): Ditto.
2297         * dom/Text.cpp:
2298         (WebCore::Text::splitText): Changed to use substring instead of
2299         remove since StringImpl does't have mutating functions any more.
2300         * editing/CompositeEditCommand.cpp:
2301         (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
2302         to use String instead of StringImpl so we can use remove.
2303
2304         * platform/text/PlatformString.h: Removed newUninitialized.
2305         Added append that takes a character pointer and length.
2306
2307         * platform/text/String.cpp:
2308         (WebCore::String::insert): Added an implementation that does not
2309         rely on an underlying StringImpl function.
2310         (WebCore::String::append): Ditto.
2311         (WebCore::String::truncate): Ditto.
2312         (WebCore::String::remove): Ditto.
2313         (WebCore::String::charactersWithNullTermination): Added an
2314         implementation that uses the new StringImpl null termination feature,
2315         which does not require modifying a string.
2316
2317         * platform/text/StringImpl.cpp:
2318         (WebCore::isSpace): Fix comment.
2319         (WebCore::StringImpl::StringImpl): Added a new constructor that makes
2320         a string with a trailing null character.
2321         (WebCore::StringImpl::substring): Marked const.
2322         (WebCore::StringImpl::replace): Marked const; had to add quite a few
2323         const_cast. Also rewrote one of these to work without modifying the
2324         existing string.
2325
2326         * platform/text/StringImpl.h: Fixed a mistake where the empty string had
2327         m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
2328         for creating strings that have a trailing null character. Added a
2329         hasTerminatingNullCharacter function. Removed newUninitialized,
2330         charactersWithNullTermination, append, insert, truncate, and remove.
2331         Marked lots of other functions const.
2332
2333         * platform/text/TextCodecLatin1.cpp:
2334         (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
2335         newUninitialized.
2336         * platform/text/TextCodecUTF16.cpp:
2337         (WebCore::TextCodecUTF16::decode): Ditto.
2338         * platform/text/TextCodecUserDefined.cpp:
2339         (WebCore::TextCodecUserDefined::decode): Ditto.
2340
2341         * rendering/RenderStyle.cpp:
2342         (WebCore::RenderStyle::setContent): Changed to use String since
2343         StringImpl doesn't have mutating functions any more.
2344
2345 2007-12-24  Alexey Proskuryakov  <ap@webkit.org>
2346
2347         Reviewed by Oliver.
2348
2349         Fix fast/events/arrow-keys-on-body.html, failing on Windows.
2350
2351         * platform/win/KeyEventWin.cpp:
2352         (WebCore::isKeypadEvent):
2353         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2354         Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
2355
2356 2007-12-23  Alexey Proskuryakov  <ap@webkit.org>
2357
2358         Fix Debug and Release QTMovieWin bulds.
2359
2360         * WebCore.vcproj/QTMovieWin.vcproj:
2361         * WebCore.vcproj/debug.vsprops:
2362         * WebCore.vcproj/debug_internal.vsprops:
2363         * WebCore.vcproj/release.vsprops:
2364         Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
2365         Build release import lib into \lib, not \bin.
2366
2367 2007-12-23  Alp Toker  <alp@atoker.com>
2368
2369         Reviewed by Holger Freyther.
2370
2371         http://bugs.webkit.org/show_bug.cgi?id=15382
2372         [CAIRO] Canvas pattern support
2373
2374         http://bugs.webkit.org/show_bug.cgi?id=16577
2375         Merge Cairo enhancements from Apollo project
2376
2377         Add support for canvas patterns.
2378
2379         Make Image::nativeImageForCurrentFrame() public.
2380
2381         Fix some typos along the way.
2382
2383         The globalAlpha canvas fixes are not included in this patch as
2384         they're slightly more intrusive and may conflict conceptually with
2385         GraphicsContext::setAlpha().
2386
2387         * html/CanvasPattern.cpp:
2388         (WebCore::CanvasPattern::CanvasPattern):
2389         (WebCore::CanvasPattern::~CanvasPattern):
2390         (WebCore::CanvasPattern::createPattern):
2391         * html/CanvasPattern.h:
2392         (WebCore::CanvasPattern::platformImage):
2393         * html/CanvasRenderingContext2D.cpp:
2394         (WebCore::CanvasRenderingContext2D::setShadow):
2395         (WebCore::CanvasRenderingContext2D::applyShadow):
2396         (WebCore::CanvasRenderingContext2D::drawImage):
2397         (WebCore::CanvasRenderingContext2D::createPattern):
2398         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
2399         (WebCore::CanvasRenderingContext2D::applyFillPattern):
2400         * platform/graphics/Image.h:
2401         (WebCore::Image::nativeImageForCurrentFrame):
2402
2403 2007-12-23  Kevin Ollivier  <kevino@theolliviers.com>
2404
2405         Reviewed by Eric Seidel.
2406
2407         Remove getWxBitmap as we have nativeImageForCurrentFrame now,
2408         and don't draw a border in fillRect.
2409
2410         * platform/graphics/BitmapImage.h:
2411         * platform/graphics/wx/GraphicsContextWx.cpp:
2412         (WebCore::GraphicsContext::fillRect):
2413         * platform/graphics/wx/ImageWx.cpp:
2414
2415 2007-12-23  Alp Toker  <alp@atoker.com>
2416
2417         Reviewed by Holger Freyther.
2418
2419         http://bugs.webkit.org/show_bug.cgi?id=16577
2420         Merge Cairo enhancements from Apollo project
2421
2422         This patch is based on initial merging work by Brent Fulgham. Adobe's
2423         code has been modified in a few places to better suit the existing
2424         coding style.
2425
2426         Implement more clipping and drawing functions.
2427
2428         Save and restore the fill rule manually when clipping.
2429
2430         Avoid image surface creation when the image buffer has height zero.
2431
2432         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2433         (WebCore::GraphicsContext::clip):
2434         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2435         (WebCore::GraphicsContext::addPath):
2436         (WebCore::GraphicsContext::clipOut):
2437         (WebCore::GraphicsContext::clipOutEllipseInRect):
2438         (WebCore::GraphicsContext::fillRoundedRect):
2439         * platform/graphics/cairo/ImageSourceCairo.cpp:
2440         (WebCore::ImageSource::createFrameAtIndex):
2441
2442 2007-12-23  Nikolas Zimmermann  <zimmermann@kde.org>
2443
2444         Reviewed by Mark.
2445
2446         Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
2447
2448         * bindings/objc/DOM.mm:
2449         (WebCore::createElementClassMap):
2450
2451 2007-12-22  Alp Toker  <alp@atoker.com>
2452
2453         GTK+ build fix
2454
2455         GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
2456         empty target flags for now.
2457
2458         Check GTK+, not GLib versions, since they are different.
2459
2460         * platform/gtk/PasteboardGtk.cpp:
2461         (WebCore::Pasteboard::documentFragment):
2462
2463 2007-12-22  Luca Bruno  <lethalman88@gmail.com>
2464
2465         Reviewed by Alp Toker.
2466
2467         http://bugs.webkit.org/show_bug.cgi?id=16311
2468         [Gtk] Copy rich text to clipboard as text/plain and text/html.
2469
2470         Hook into the WebView to get the correct clipboard object on the
2471         appropriate display. This is necessary because GTK+ does not have
2472         global clipboards.
2473
2474         * WebCore.pro:
2475         * platform/Pasteboard.h:
2476         (WebCore::Pasteboard::setHelper): added for GTK
2477         (WebCore::Pasteboard::m_helper): private added for GTK
2478         * platform/gtk/PasteboardGtk.cpp:
2479         (WebCore::PasteboardSelectionData): added to support GTK selection data callback
2480         (WebCore::clipboard_get_contents_cb): added
2481         (WebCore::clipboard_clear_contents_cb): added
2482         (WebCore::Pasteboard::~Pasteboard):
2483         (WebCore::Pasteboard::setHelper):
2484         (WebCore::Pasteboard::writeSelection): copy rich text
2485         (WebCore::Pasteboard::documentFragment): 
2486         (WebCore::Pasteboard::plainText): 
2487         * platform/gtk/PasteboardHelper.h: Added.
2488
2489 2007-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
2490
2491         Reviewed by Oliver.
2492
2493         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
2494
2495         Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
2496         SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
2497         for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
2498         in Web Inspector.
2499
2500         * rendering/InlineBox.h:
2501         (WebCore::InlineBox::isSVGRootInlineBox):
2502         * rendering/SVGInlineTextBox.cpp:
2503         (WebCore::SVGInlineTextBox::svgRootInlineBox):
2504         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2505         (WebCore::SVGInlineTextBox::selectionRect):
2506         * rendering/SVGRenderTreeAsText.cpp:
2507         (WebCore::writeSVGInlineTextBox):
2508         * rendering/SVGRootInlineBox.h:
2509         (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
2510
2511 2007-12-22  Alp Toker  <alp@atoker.com>
2512
2513         LOW_BANDWIDTH_DISPLAY build fix
2514
2515         Track recent KURL DeprecatedString changes.
2516
2517         * loader/FrameLoader.cpp:
2518         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2519
2520 2007-12-22  Dan Bernstein  <mitz@apple.com>
2521
2522         - Windows build fix
2523
2524         * WebCore.vcproj/WebCore.vcproj:
2525
2526 2007-12-22  Xan Lopez  <xan@gnome.org>
2527
2528         Reviewed by Alp Toker.
2529
2530         Add missing return 0 to fix a compile warning.
2531
2532         * page/gtk/FrameGtk.cpp:
2533         (WebCore::Frame::createScriptInstanceForWidget):
2534
2535 2007-12-21  Antti Koivisto  <antti@apple.com>
2536
2537         Reviewed by Darin, Adam and Steve.
2538
2539         Add media playback support for Windows.
2540         
2541         The implementation uses low level QuickTime API. DLL is
2542         needed to work around CF use in both WebKit and QuickTime.
2543         
2544         This makes Windows build depend on the QuickTime SDK 
2545         
2546         http://developer.apple.com/quicktime/download/
2547         
2548         but not QuickTime itself.
2549         
2550         QTMovieWinTimer contains some copy code from SharedTimerWin. It
2551         is used in the QuickTime access DLL which can't use WebCore
2552         SharedTimer due to dependency problems.
2553
2554         * WebCore.vcproj/QTMovieWin.vcproj: Added.
2555         * WebCore.vcproj/WebCore.vcproj:
2556         * WebCore.vcproj/build-generated-files.sh:
2557         * html/HTMLMediaElement.cpp:
2558         (WebCore::HTMLMediaElement::setSrc):
2559         * platform/graphics/MediaPlayer.cpp:
2560         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
2561         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2562         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2563         (WebCore::MediaPlayerPrivate::load):
2564         (WebCore::MediaPlayerPrivate::play):
2565         (WebCore::MediaPlayerPrivate::pause):
2566         (WebCore::MediaPlayerPrivate::duration):
2567         (WebCore::MediaPlayerPrivate::currentTime):
2568         (WebCore::MediaPlayerPrivate::seek):
2569         (WebCore::MediaPlayerPrivate::doSeek):
2570         (WebCore::MediaPlayerPrivate::cancelSeek):
2571         (WebCore::MediaPlayerPrivate::seekTimerFired):
2572         (WebCore::MediaPlayerPrivate::setEndTime):
2573         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
2574         (WebCore::MediaPlayerPrivate::endPointTimerFired):
2575         (WebCore::MediaPlayerPrivate::paused):
2576         (WebCore::MediaPlayerPrivate::seeking):
2577         (WebCore::MediaPlayerPrivate::naturalSize):
2578         (WebCore::MediaPlayerPrivate::hasVideo):
2579         (WebCore::MediaPlayerPrivate::setVolume):
2580         (WebCore::MediaPlayerPrivate::setMuted):
2581         (WebCore::MediaPlayerPrivate::setRate):
2582         (WebCore::MediaPlayerPrivate::dataRate):
2583         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2584         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2585         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2586         (WebCore::MediaPlayerPrivate::bytesLoaded):
2587         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2588         (WebCore::MediaPlayerPrivate::totalBytes):
2589         (WebCore::MediaPlayerPrivate::cancelLoad):
2590         (WebCore::MediaPlayerPrivate::updateStates):
2591         (WebCore::MediaPlayerPrivate::didEnd):
2592         (WebCore::MediaPlayerPrivate::setRect):
2593         (WebCore::MediaPlayerPrivate::setVisible):
2594         (WebCore::MediaPlayerPrivate::paint):
2595         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2596         (WebCore::MediaPlayerPrivate::movieEnded):
2597         (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
2598         (WebCore::MediaPlayerPrivate::movieTimeChanged):
2599         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
2600         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
2601         (WebCore::MediaPlayerPrivate::networkState):
2602         (WebCore::MediaPlayerPrivate::readyState):
2603         * platform/graphics/win/QTMovieWin.cpp: Added.
2604         (updateTaskTimer):
2605         (QTMovieWinPrivate::QTMovieWinPrivate):
2606         (QTMovieWinPrivate::~QTMovieWinPrivate):
2607         (taskTimerFired):
2608         (QTMovieWinPrivate::startTask):
2609         (QTMovieWinPrivate::endTask):
2610         (QTMovieWinPrivate::task):
2611         (QTMovieWinPrivate::registerDrawingCallback):
2612         (QTMovieWinPrivate::drawingComplete):
2613         (QTMovieWinPrivate::createGWorld):
2614         (QTMovieWinPrivate::setSize):
2615         (QTMovieWinPrivate::deleteGWorld):
2616         (QTMovieWin::QTMovieWin):
2617         (QTMovieWin::~QTMovieWin):
2618         (QTMovieWin::play):
2619         (QTMovieWin::pause):
2620         (QTMovieWin::rate):
2621         (QTMovieWin::setRate):
2622         (QTMovieWin::duration):
2623         (QTMovieWin::currentTime):
2624         (QTMovieWin::setCurrentTime):
2625         (QTMovieWin::setVolume):
2626         (QTMovieWin::setMuted):
2627         (QTMovieWin::dataSize):
2628         (QTMovieWin::maxTimeLoaded):
2629         (QTMovieWin::loadState):
2630         (QTMovieWin::getNaturalSize):
2631         (QTMovieWin::setSize):
2632         (QTMovieWin::setVisible):
2633         (QTMovieWin::paint):
2634         (QTMovieWin::load):
2635         (movieDrawingCompleteProc):
2636         (initializeSupportedTypes):
2637         (QTMovieWin::countSupportedTypes):
2638         (QTMovieWin::getSupportedType):
2639         (QTMovieWin::initializeQuickTime):
2640         (DllMain):
2641         * platform/graphics/win/QTMovieWin.h: Added.
2642         * platform/graphics/win/QTMovieWinTimer.cpp: Added.
2643         (TimerWindowWndProc):
2644         (initializeOffScreenTimerWindow):
2645         (setSharedTimerFiredFunction):
2646         (timerFired):
2647         (setSharedTimerFireDelay):
2648         (stopSharedTimer):
2649         (setSharedTimerInstanceHandle):
2650         (systemTime):
2651         * platform/graphics/win/QTMovieWinTimer.h: Added.
2652         * rendering/RenderMedia.cpp:
2653         (WebCore::MediaControlPlayButtonElement::update):
2654
2655 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
2656
2657         Reviewed by Alp Toker.
2658
2659         http://bugs.webkit.org/show_bug.cgi?id=16558
2660         Cairo WebCore Rendering Fails on arc drawing
2661
2662         Fix for bug reported (and patched) by Apollo team in which
2663         arcs were draw in reverse (resulting in inverted images).
2664         Review of the source found that the 'clockwise' term was
2665         actually meant to mean 'anticlockwise' so the IDL and
2666         supporting classes have been changed to match this. 
2667
2668         * html/CanvasRenderingContext2D.cpp:
2669         (WebCore::CanvasRenderingContext2D::arc):
2670         * html/CanvasRenderingContext2D.idl:
2671         * platform/graphics/cairo/PathCairo.cpp:
2672         (WebCore::Path::addArc):
2673         (WebCore::Path::addEllipse):
2674         * platform/graphics/Path.h:
2675
2676 2007-12-21  Alexey Proskuryakov  <ap@webkit.org>
2677
2678         Reviewed by Oliver.
2679
2680         <rdar://problem/5629995> Incorrect display of Danish characters on web site.
2681
2682         Test: http/tests/xmlhttprequest/response-encoding.html
2683
2684         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
2685         Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
2686         rules for main content and XHR responses, but this matches both IE and Firefox.
2687
2688 2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
2689
2690         Reviewed by Kevin Decker.
2691
2692         <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
2693         shockwave plugin on freshly installed OS
2694
2695         Look for Director plugin in its native directory.
2696
2697         * plugins/win/PluginDatabaseWin.cpp:
2698         (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
2699         doesn't start with "np," so special case its filename.
2700         (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
2701         directories to the plugin paths.
2702         (WebCore::PluginDatabaseWin::defaultPluginPaths):
2703
2704 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
2705
2706         Reviewed by Alp Toker.
2707
2708         http://bugs.webkit.org/show_bug.cgi?id=16508
2709         Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
2710         decoded transparent areas.
2711
2712         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2713         (WebCore::GIFImageDecoder::haveDecodedRow):
2714         * platform/image-decoders/gif/GIFImageDecoder.h:
2715         * platform/image-decoders/gif/GIFImageReader.cpp:
2716         (GIFImageReader::output_row):
2717
2718 2007-12-20  Justin Garcia  <justin.garcia@apple.com>
2719
2720         Reviewed by Oliver Hunt.
2721
2722         <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
2723         
2724         Still need to fix similar issues with the other operations that iterate 
2725         over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
2726
2727         * editing/IndentOutdentCommand.cpp:
2728         (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
2729         * editing/IndentOutdentCommand.h: Removed an unused function.
2730         * editing/InsertListCommand.cpp:
2731         (WebCore::InsertListCommand::modifyRange): 
2732         Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
2733         Call the new selectionForParagraphIteration, which a) prevents operations like this
2734         one from being performed on a table that isn't fully selected (where the selection
2735         starts just before the table and ends inside it), and b) helps prevent paragraph
2736         iteration from going past the end of the selection.
2737         Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
2738         since when v is in the last paragraph of the last cell of a table, that expression 
2739         will return the position after the table, not the start of the next paragraph.
2740         * editing/htmlediting.cpp:
2741         (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
2742         take effect inside the table cell where they are performed.
2743         (WebCore::selectionForParagraphIteration): Added, see above.
2744         (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
2745         * editing/htmlediting.h:
2746         * editing/visible_units.cpp:
2747         (WebCore::startOfNextParagraph): Added, see above.
2748         * editing/visible_units.h:
2749         * editing/TextIterator.h:
2750         (WebCore::TextIterator::exitNode): Added a FIXME.
2751
2752 2007-12-20  Alp Toker  <alp@atoker.com>
2753
2754         Rubber-stamped by Maciej.
2755
2756         http://bugs.webkit.org/show_bug.cgi?id=16542
2757         [GTK] Text is missing with old Pango version
2758
2759         Back out commits r28880, r28876, r28865, r28864 which added Pango font
2760         selection support. These changes caused a regression where no text was
2761         displayed with older Pango versions.
2762
2763         * platform/graphics/gtk/FontCacheGtk.cpp:
2764         (WebCore::FontCache::fontExists):
2765         * platform/graphics/gtk/FontDataGtk.cpp:
2766         (WebCore::FontData::platformDestroy):
2767         (WebCore::FontData::containsCharacters):
2768         * platform/graphics/gtk/FontPlatformData.h:
2769         (WebCore::FontPlatformData::FontPlatformData):
2770         (WebCore::FontPlatformData::hash):
2771         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2772         (WebCore::FontPlatformData::FontPlatformData):
2773         (WebCore::FontPlatformData::init):
2774         (WebCore::FontPlatformData::~FontPlatformData):
2775         (WebCore::FontPlatformData::isFixedPitch):
2776         (WebCore::FontPlatformData::operator==):
2777         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2778         (WebCore::GlyphPage::fill):
2779
2780 2007-12-20  Timothy Hatcher  <timothy@apple.com>
2781
2782         Reviewed by Sam Weinig.
2783
2784         <rdar://problem/5604897> Double-clicking on JavaScript console error
2785         won't show the line where it occurred
2786
2787         Make the URLs clickable in the console, since double clicking is used for
2788         word text selection. Makes the word "line" localizable. Messages that don't
2789         have a URL will no longer print "undefined". Messages that have a line number
2790         less than or equal to 0 will no longer be printed.
2791
2792         * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
2793         * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
2794           and change the click handler to look for a link with the
2795           "console-message-url" class name.
2796         * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
2797           line row is needed. 
2798         * page/inspector/inspector.css: Update the look of the URL in the console.
2799
2800 2007-12-20  Adam Barth  <hk9565@gmail.com>
2801
2802         Reviewed and landed by Sam Weinig.
2803
2804         http://bugs.webkit.org/show_bug.cgi?id=15313
2805         <rdar://problem/5514516>
2806
2807         The same-origin check was incorrect in two cases (both fixed in this
2808         patch):
2809
2810         A) If both the source and the target have set their document.domain
2811            to the same value, the protocol must also match in order for
2812            access to be allowed.  Without this requirement, the browser is
2813            vulnerable to the following attack:
2814
2815            1) Suppose there is an HTTPS site (www.example.com) that sets
2816               document.domain = "example.com".
2817            2) A network attacker redirects the browser to http://www.example.com/
2818               a) injects script to set document.domain = "example.com", and
2819               b) opens a window to https://www.example.com/
2820            3) Now the network attacker can inject script into the HTTPS page,
2821               stealing cookies and issuing banking transactions.
2822
2823         B) If only one of the source and target has set document.domain, then
2824            access should be denied.  With this behavior, the browser is
2825            vulnerable to the following attack:
2826
2827            1) Suppose http://foo.example.com/ opens an iframe to
2828               http://foo.example.com/frame.html that
2829               a) sets document.domain = "example.com", and
2830               b) opens an iframe to http://bar.example.com/
2831               This is a common usage of document.domain for cross-domain
2832               communication, see for example:
2833                 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
2834            2) The inner-most iframe, which is from bar.example.com, sets
2835               document.domain = "example.com".
2836            3) Now the inner-most iframe can inject script into the middle
2837               iframe (say via document.write).  This bar.example.com script
2838               now has access to the outer-most frame (from foo.example.com).
2839
2840         Both these changes cause WebKit to match the behavior of Firefox 2 and
2841         IE6 in these cases.  This patch includes regression tests for both
2842         issues.
2843
2844         Internet Explorer 7 and Opera 9 are more strict in that they require
2845         the port numbers to match when both pages have document.domain set.
2846         Opera 9 allows access when only one page has set document.domain, but
2847         this is a security vulnerability.
2848
2849         Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
2850                http/tests/security/cross-frame-access-parent-explicit-domain.html
2851
2852         * bindings/js/kjs_window.cpp:
2853         (KJS::createWindow):
2854         (KJS::Window::allowsAccessFrom):
2855         * dom/Document.cpp:
2856         (WebCore::Document::domain):
2857         (WebCore::Document::setDomain):
2858         (WebCore::Document::initSecurityOrigin):
2859         * dom/Document.h:
2860         (WebCore::Document::securityOrigin):
2861         * loader/FrameLoader.cpp:
2862         (WebCore::FrameLoader::begin):
2863         (WebCore::FrameLoader::checkCallImplicitClose):
2864         (WebCore::FrameLoader::shouldAllowNavigation):
2865         * platform/SecurityOrigin.cpp:
2866         (WebCore::SecurityOrigin::setForURL):
2867         (WebCore::SecurityOrigin::createForFrame):
2868         (WebCore::SecurityOrigin::canAccess):
2869         * platform/SecurityOrigin.h:
2870         (WebCore::SecurityOrigin::domain):
2871         * storage/Database.cpp:
2872         (WebCore::Database::openDatabase):
2873         (WebCore::Database::Database):
2874         (WebCore::Database::securityOriginData):
2875         * storage/Database.h:
2876         (WebCore::Database::databaseDebugName):
2877         * storage/DatabaseTracker.cpp:
2878         (WebCore::DatabaseTracker::canEstablishDatabase):
2879         * storage/SQLTransaction.cpp:
2880         (WebCore::SQLTransaction::postflightAndCommit):
2881         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
2882
2883 2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>
2884
2885         Reviewed by Darin Adler.
2886
2887         Define XP_UNIX when building with plugins on X11.
2888         Use new npruntime_internal.h instead of npruntime.h.
2889         http://bugs.webkit.org/show_bug.cgi?id=15669
2890
2891         * ForwardingHeaders/bindings/npruntime_internal.h
2892         * WebCore.pro:
2893         * html/HTMLPlugInElement.h:
2894
2895 2007-12-19  johnnyding.webkit  <johnnyding.webkit@gmail.com>
2896
2897         Reviewed by Alexey. Landed by Stephanie.
2898
2899         - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
2900           Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
2901           Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing 
2902           the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
2903
2904
2905         * html/HTMLTokenizer.cpp:
2906         (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
2907         (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
2908         * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
2909
2910 2007-12-20  Eric Seidel  <eric@webkit.org>
2911
2912         Reviewed by Nikolas Zimmermann.
2913
2914         WebKit claims to support SVG feature strings it shouldn't
2915         http://bugs.webkit.org/show_bug.cgi?id=15480
2916
2917         * dom/DOMImplementation.cpp:
2918         (WebCore::isSVG10Feature):
2919         (WebCore::isSVG11Feature):
2920
2921 2007-12-20  John Sullivan  <sullivan@apple.com>
2922
2923         Reviewed by Oliver and Geoff
2924         
2925         - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter 
2926           than white "hole" behind it
2927
2928         * rendering/RenderText.cpp:
2929         (WebCore::RenderText::addLineBoxRects):
2930         respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
2931
2932 2007-12-20  Dan Bernstein  <mitz@apple.com>
2933
2934         Reviewed by Darin Adler.
2935
2936         - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
2937
2938         * platform/win/ScrollViewWin.cpp:
2939         (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
2940         scroll offsets even if scrolling is not allowed, because navigation and
2941         scrollTo should still work.
2942         (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
2943         not allowed.
2944
2945 2007-12-17  Tony Chang  <idealisms@gmail.com>
2946
2947         Reviewed by Darin.
2948
2949         - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
2950           text selection does not always begin at mouse down point
2951           Reset the m_dragSrc object on mouse down on all platforms.
2952
2953         Test: fast/text/reset-drag-on-mouse-down.html
2954
2955         * page/EventHandler.cpp:
2956         (WebCore::EventHandler::handleMousePressEvent):
2957         * page/mac/EventHandlerMac.mm:
2958         (WebCore::EventHandler::mouseDown):
2959
2960 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
2961
2962         Reviewed by Oliver Hunt.
2963
2964         Build support:
2965         * ForwardingHeaders/kjs/SymbolTable.h: Added.
2966         * ForwardingHeaders/wtf/VectorTraits.h: Added.
2967
2968         * bindings/js/JSDOMWindowCustom.cpp:
2969         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
2970         getDirectLocation with getOwnPropertySlot. getDirectLocation is no
2971         longer valid, since global declarations are not stored in the property
2972         map.
2973
2974         (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
2975         JSGlobalObject::put. JSObject::put is no longer valid, since global
2976         declarations are not stored in the property map.
2977
2978         * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
2979         calls, since JSObject is not our base class. This was always a bug, but
2980         the bug is even more apparent after some of my changes.
2981
2982         (KJS::Window::clear): Removed call to clearProperties because
2983         JSGlobalObject::reset takes care of that now.
2984
2985         * history/CachedPage.cpp:
2986         * history/CachedPage.h: Added support for saving a symbol table and
2987         localStorage to the page cache, and restoring it.
2988
2989 2007-12-19  Dan Bernstein  <mitz@apple.com>
2990
2991         Reviewed by Darin Adler and Dave Hyatt.
2992
2993         - Substitute the user's preferred standard font for an unknown primary
2994           font before falling back on the platform's last resort font
2995
2996         Cannot be tested in DumpRenderTree because it sets the standard font to
2997         Times, which is also the hard-coded last resort font on Mac.
2998
2999         * css/CSSFontSelector.cpp:
3000         (WebCore::CSSFontSelector::getFontData): Changed the early bail out
3001         condition to allow getting generic font families from settings even if
3002         there are not @font-face rules. Fixed a typo that mapped fantasy to
3003         cursive. Added a mapping from -webkit-standard to the standard family.
3004         * css/CSSStyleSelector.cpp:
3005         (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
3006         a font selector.
3007         (WebCore::CSSRuleSet::addRulesFromSheet):
3008         (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
3009         font selector.
3010         * css/CSSStyleSelector.h:
3011         (WebCore::CSSStyleSelector::fontSelector):
3012         * platform/graphics/FontCache.cpp:
3013         (WebCore::FontCache::getFontData): Try the user's preferred standard
3014         font before the platform's last resort font.
3015
3016 2007-12-19  Sven Herzberg  <sven@imendio.com>
3017
3018         Reviewed by Alp Toker.
3019
3020         Scaled font destruction takes place in FontData::platformDestroy(). No
3021         need to do it in FontPlatformData::~FontPlatformData().
3022
3023         Destroying platform data in platformDestroy() is a convention we
3024         borrow from the Mac and Win ports.
3025
3026         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3027
3028 2007-12-19  Alice Liu  <alice.liu@apple.com>
3029
3030         build fix (Windows)
3031
3032         Changed uint to unsigned int.  uint caused Windows build breakage
3033
3034         * page/Page.cpp:
3035         (WebCore::Page::markAllMatchesForText):
3036         * page/Page.h:
3037
3038 2007-12-19  Christian Dywan  <christian@twotoasts.de> 
3039
3040         Reviewed by Alp Toker.
3041
3042         http://bugs.webkit.org/show_bug.cgi?id=16222
3043         [GTK] Implement inline search and highlighting of matching strings.
3044
3045         Implement search and highlighting logic directly in WebCore.
3046
3047         * page/Page.cpp:
3048         (WebCore::incrementFrame):
3049         (WebCore::Page::findString):
3050         (WebCore::Page::markAllMatchesForText):
3051         (WebCore::Page::unmarkAllTextMatches):
3052         * page/Page.h:
3053
3054 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
3055
3056         Reviewed by Sam Weinig, Dan Bernstein.
3057
3058         Tiger build fix: restored some graphics code still needed on Tiger.
3059
3060         * platform/graphics/GraphicsTypes.h:
3061         * platform/graphics/cg/GraphicsContextCG.cpp:
3062         * platform/graphics/mac/GraphicsContextMac.mm:
3063         (WebCore::GraphicsContext::setCompositeOperation):
3064
3065 2007-12-19  Alp Toker  <alp@atoker.com>
3066
3067         Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
3068         the Pango backend API in these cases.
3069
3070         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3071         (WebCore::FontPlatformData::FontPlatformData):
3072         (WebCore::FontPlatformData::~FontPlatformData):
3073
3074 2007-12-19  Alice Liu  <alice.liu@apple.com>
3075
3076         Reviewed by Darin.
3077
3078         Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
3079         on Geico.com WebCore::Document::inPageCache()
3080
3081         Calling Node::willRemove on the focusedNode would immediately tell the document to remove
3082         the focused node, and trigger JS events.  This means that the document is mutated while
3083         the engine is trying to tell all child nodes that it's about to removed.  To avoid
3084         crashing, we need to hold off on mutating the document until node traversal is finished.
3085
3086         * dom/ContainerNode.cpp:
3087         (WebCore::ContainerNode::removeChild):
3088         (WebCore::ContainerNode::removeChildren):
3089         * dom/Node.cpp:
3090         * dom/Node.h:
3091         (WebCore::Node::willRemove):
3092         * loader/FrameLoader.cpp:
3093         (WebCore::FrameLoader::clear):
3094
3095 2007-12-19  Andre Boule  <aboule@apple.com>
3096
3097         Reviewed by Dan Bernstein.
3098
3099         Test: fast/canvas/canvas-composite.html
3100
3101         Fix for:
3102         <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
3103
3104         This fix makes setCompositeOperation consistent across all platforms that use CG.
3105
3106         The following compositing modes don't pass however that is covered by another bug:
3107         source-in
3108         source-out
3109         destination-in
3110         destination-atop
3111         copy
3112         <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
3113
3114         * platform/graphics/GraphicsTypes.h:
3115         * platform/graphics/cg/GraphicsContextCG.cpp:
3116         (WebCore::GraphicsContext::setCompositeOperation):
3117         * platform/graphics/mac/GraphicsContextMac.mm:
3118         * platform/win/GraphicsContextWin.cpp:
3119
3120 2007-12-19  Dan Bernstein  <mitz@apple.com>
3121
3122         Reviewed by Dave Hyatt.
3123
3124         - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
3125
3126         Test: fast/dynamic/subtree-boundary-percent-height.html
3127
3128         * rendering/RenderObject.cpp:
3129         (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
3130         percent heights because sometimes they compute to 'auto'.
3131
3132 2007-12-19  Sam Weinig  <sam@webkit.org>
3133
3134         Reviewed by Maciej.
3135
3136         http://bugs.webkit.org/show_bug.cgi?id=16511
3137         Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
3138         - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
3139
3140         * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
3141         (WebCore::ChildNodeList::ChildNodeList):
3142         * dom/ClassNodeList.cpp:
3143         (WebCore::ClassNodeList::ClassNodeList):
3144         * dom/ClassNodeList.h:
3145
3146         Move getElementsByName and getElementsByClassName to Node so they
3147         can use easily employ the caching already used by ChildNodeLists.  In the case of 
3148         getElementsByClassName, this reduces code duplication in Element as well
3149         * dom/Document.cpp:
3150         * dom/Document.h:
3151
3152         Move getElementsByClassName to Node.
3153         * dom/Element.cpp:
3154         * dom/Element.h:
3155
3156         * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
3157         (WebCore::NameNodeList::NameNodeList):
3158         (WebCore::NameNodeList::item):
3159         * dom/NameNodeList.h:
3160
3161         Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
3162         * dom/Node.cpp:
3163         (WebCore::TagNodeList::TagNodeList):
3164         (WebCore::Node::Node):
3165         (WebCore::Node::~Node):
3166         (WebCore::Node::childNodes):
3167         (WebCore::Node::registerNodeList):
3168         (WebCore::Node::getElementsByName):
3169         (WebCore::Node::getElementsByClassName):
3170         * dom/Node.h: Make m_nodeLists an OwnPtr.  Moved getElementsByName and getElementsByClassName here
3171
3172         Allow subclasses to choose whether they want to receive the notifications using a new bit.
3173         * dom/NodeList.cpp:
3174         (WebCore::NodeList::NodeList):
3175         * dom/NodeList.h:
3176         (WebCore::NodeList::needsNotifications):
3177
3178 2007-12-19  Dave Hyatt  <hyatt@apple.com>
3179
3180         Add support for GDI text rendering to WebKit.
3181       
3182         Reviewed by mitz
3183         
3184         * css/CSSStyleSelector.cpp:
3185         (WebCore::CSSStyleSelector::applyProperty):
3186         * dom/Document.cpp:
3187         (WebCore::Document::recalcStyle):
3188         * page/Settings.cpp:
3189         (WebCore::Settings::setFontRenderingMode):
3190         (WebCore::Settings::fontRenderingMode):
3191         * page/Settings.h:
3192         * platform/graphics/Font.h:
3193         (WebCore::Font::renderingMode):
3194         * platform/graphics/FontCache.cpp:
3195         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3196         (WebCore::FontPlatformDataCacheKey::operator==):
3197         (WebCore::computeHash):
3198         (WebCore::FontCache::getCachedFontPlatformData):
3199         * platform/graphics/FontDescription.h:
3200         (WebCore::):
3201         (WebCore::FontDescription::FontDescription):
3202         (WebCore::FontDescription::renderingMode):
3203         (WebCore::FontDescription::setRenderingMode):
3204         (WebCore::FontDescription::operator==):
3205         * platform/graphics/GraphicsContext.h:
3206         * platform/graphics/win/FontCacheWin.cpp:
3207         (WebCore::FontCache::fontExists):
3208         (WebCore::FontCache::createFontPlatformData):
3209         * platform/graphics/win/FontDataWin.cpp:
3210         (WebCore::FontData::platformInit):
3211         (WebCore::FontData::smallCapsFontData):
3212         (WebCore::FontData::containsCharacters):
3213         (WebCore::FontData::determinePitch):
3214         (WebCore::FontData::platformWidthForGlyph):
3215         * platform/graphics/win/FontPlatformData.h:
3216         (WebCore::FontPlatformData::FontPlatformData):
3217         (WebCore::FontPlatformData::useGDI):
3218         (WebCore::FontPlatformData::operator==):
3219         * platform/graphics/win/FontPlatformDataWin.cpp:
3220         (WebCore::FontPlatformData::FontPlatformData):
3221         * platform/graphics/win/FontWin.cpp:
3222         (WebCore::Font::drawGlyphs):
3223         * platform/graphics/win/IconWin.cpp:
3224         (WebCore::Icon::paint):
3225         * platform/win/GraphicsContextWin.cpp:
3226         (WebCore::GraphicsContext::getWindowsContext):
3227         (WebCore::GraphicsContext::releaseWindowsContext):
3228         * platform/win/UniscribeController.cpp:
3229         (WebCore::UniscribeController::shapeAndPlaceItem):
3230         * platform/win/UniscribeController.h:
3231         * plugins/win/PluginViewWin.cpp:
3232         (WebCore::PluginViewWin::paint):
3233
3234 2007-12-19  Sven Herzberg  <sven@imendio.com>
3235
3236         Reviewed by Alp Toker.
3237
3238         Replace the fontconfig/freetype based font management with a pango
3239         based one. Fixes:
3240         http://bugs.webkit.org/show_bug.cgi?id=15229
3241
3242         * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
3243         the platform specific destroy code
3244         (FontData::containsCharacters()): implemented font coverage with pango
3245         * platform/gtk/FontPlatformData.h: replaced fontconfig specific
3246         members with pango-specific ones
3247         * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
3248         FontPlatformData class
3249         (FontPlatformData::FontPlatformData()): implemented the font-matching
3250         with a PangoFontDescription instead of an FcPattern; initialize the
3251         scaled font by using the API for PangoCairoFont
3252         (FontPlatformData::init()): initialize the PangoFontMap and set up a
3253         hash table to translate the font family name into a font family
3254         (FontPlatformData::isFixedPitch()): implemented by querying the
3255         PangoFontFamily
3256         (FontPlatformData::operator==): compare the FontPlatformData by
3257         comparing the font pointers or the described fonts
3258         * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
3259         added a function to query a glyph from a PangoFont
3260         (GlyphPage::fill()): implemented the fill function with Pango instead
3261         of fontconfig/freetype
3262
3263 2007-12-19  Alp Toker  <alp@atoker.com>
3264
3265         Reviewed by Holger Freyther.
3266
3267         Improve graphics operator approximations
3268         
3269         These changes match Cairo's own CG approximations.
3270
3271         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3272         (WebCore::toCairoOperator):
3273
3274 2007-12-19  Alp Toker  <alp@atoker.com>
3275
3276         Reviewed by Holger Freyther.
3277
3278         Check the bounding box before doing a full hit test
3279
3280         * platform/graphics/cairo/PathCairo.cpp:
3281         (WebCore::Path::contains):
3282
3283 2007-12-18  Sam Weinig  <sam@webkit.org>
3284
3285         Reviewed by Geoff.
3286
3287         Fix for <rdar://problem/5646478>
3288         REGRESSION: fast/events/event-view-toString fails on Leopard
3289
3290         This fixes an issue where we were incorrectly setting the lastInPrototypeChain
3291         for the JSDOMWindow (the global object) before a call to setPrototype overwrote
3292         it. This fixes it by passing the prototype up the constructor chain so that it
3293         is set before any calls can be made.
3294
3295         * bindings/js/kjs_window.cpp:
3296         (KJS::Window::Window):
3297         * bindings/js/kjs_window.h:
3298         * bindings/scripts/CodeGeneratorJS.pm:
3299
3300 2007-12-18  Beth Dakin  <bdakin@apple.com>
3301
3302         Reviewed by Oliver.
3303
3304         Fix for <rdar://problem/5616982> SVGs with width and height 100% 
3305         fail to render when used as <img> or CSS image (16167)
3306
3307         This final part of the work fixes the <img> tag.
3308
3309         This is the real fix. 
3310         * rendering/RenderImage.cpp:
3311         (WebCore::RenderImage::calcReplacedWidth): Set the container size 
3312         on the image. Setting the container size only actually sticks if 
3313         the values are non-zero, so if the container size really was set, 
3314         use the imageSize that is calculated using the container size. If 
3315         it did not stick but the image does have relative width (meaning 
3316         that the container size is 0), set the width to 0 by hand. We want 
3317         to avoid setting the width before we have a container size or we 
3318         will end up incorrectly using the default size of 300x150.
3319         (WebCore::RenderImage::calcReplacedHeight): Same as above, but for 
3320         height.
3321
3322         A few more pieces of information have to be exposed through cached 
3323         image to make this happen.
3324         * loader/CachedImage.cpp:
3325         (WebCore::CachedImage::usesImageContainerSize): As mentioned above, 
3326         when setContainerSize() is called, the container size is only 
3327         actually set if the values are non-zero. This call tells you if it 
3328         was set.
3329         (WebCore::CachedImage::imageHasRelativeWidth):
3330         (WebCore::CachedImage::imageHasRelativeHeight):
3331         * loader/CachedImage.h:
3332         * platform/graphics/Image.h:
3333         (WebCore::Image::usesContainerSize):
3334         * svg/graphics/SVGImage.cpp:
3335         (WebCore::SVGImage::usesContainerSize):
3336         * svg/graphics/SVGImage.h:
3337
3338 2007-12-18  Mark Rowe  <mrowe@apple.com>
3339
3340         Rubber-stamped by Maciej Stachowiak.
3341
3342         Remove outdated and non-functioning project files for the Apollo port.
3343
3344         * WebCore.apolloproj: Removed.
3345
3346 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
3347
3348         <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
3349         
3350         Need to translate the char back into a key code for posting our WM_KEYDOWN.
3351         
3352         Reviewed by Ada.
3353
3354         * platform/win/PopupMenuWin.cpp:
3355         (WebCore::PopupWndProc):
3356
3357 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
3358
3359         <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
3360         
3361         Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
3362         Only create a font with the last one.
3363         
3364         Reviewed by Mitz, Darin.
3365
3366         * platform/graphics/win/FontCacheWin.cpp:
3367         (WebCore::metaFileEnumProc):
3368         (WebCore::FontCache::getFontDataForCharacters):
3369
3370 2007-12-17  Brent Fulgham  <bfulgham@gmail.com>
3371
3372         Reviewed by Darin.
3373
3374         http://bugs.webkit.org/show_bug.cgi?id=16464
3375         Modify WebCore to use win32 thread primitives
3376
3377         Updates to support native windows threading primitives
3378         rather than pthreads emulation library.
3379
3380         * WebCore.vcproj/WebCore.vcproj:
3381         * config.h:
3382         * platform/Threading.h:
3383         * platform/win/MutexWin.cpp: Added.
3384         (WebCore::Mutex::Mutex):
3385         (WebCore::Mutex::~Mutex):
3386         (WebCore::Mutex::lock):
3387         (WebCore::Mutex::tryLock):
3388         (WebCore::Mutex::unlock):
3389         * platform/win/ThreadConditionWin.cpp: Added.
3390         (WebCore::ThreadCondition::ThreadCondition):
3391         (WebCore::ThreadCondition::~ThreadCondition):
3392         (WebCore::ThreadCondition::wait):
3393         (WebCore::ThreadCondition::signal):
3394         (WebCore::ThreadCondition::broadcast):
3395         * platform/win/ThreadingWin.cpp:
3396         (WebCore::threadMapMutex):
3397         (WebCore::threadMap):
3398         (WebCore::storeThreadHandleByIdentifier):
3399         (WebCore::identifierByThreadHandle):
3400         (WebCore::threadHandleForIdentifier):
3401         (WebCore::clearThreadHandleForIdentifier):
3402         (WebCore::createThread):
3403         (WebCore::waitForThreadCompletion):
3404         (WebCore::detachThread):
3405         (WebCore::currentThread):
3406
3407 2007-12-18  Rodney Dawes  <dobey@wayofthemonkey.com>
3408
3409         Reviewed by Darin Adler.
3410
3411         Handle EINTR when set by select() and try the select() again
3412         http://bugs.webkit.org/show_bug.cgi?id=16071
3413
3414         * platform/network/curl/ResourceHandleManager.cpp:
3415         (ResourceHandleManager::downloadTimerCallback):
3416
3417 2007-12-18  Dan Bernstein  <mitz@apple.com>
3418
3419         Reviewed by Dave Hyatt.
3420
3421         - avoid the simplified Chinese font linking code for characters that are
3422           not in any Windows code page
3423
3424         * platform/graphics/win/FontCacheWin.cpp:
3425         (WebCore::FontCache::getFontDataForCharacters):
3426
3427 2007-12-18  Brady Eidson <beidson@apple.com>
3428
3429         Reviewed by Adele
3430
3431         <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
3432
3433         Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
3434         protected by authentication.  Occasionally one can view the main page of a site but the favicon
3435         is behind the iron curtain - in these cases, we should *not* prompt for a username and password
3436         solely for the favicon.
3437
3438         * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
3439
3440         * loader/SubresourceLoader.cpp:
3441         (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
3442           is virtual from ResourceLoader, SubresourceLoader can override.  First call to the 
3443           SubresourceLoaderClient.  If they cancel the resource load, return early. Otherwise, let
3444           ResourceLoader work its magic (resulting in the auth sheet coming down)
3445         * loader/SubresourceLoader.h:
3446
3447         * loader/SubresourceLoaderClient.h:
3448         (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
3449
3450         * loader/icon/IconLoader.cpp:
3451         (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
3452           never prompt the user for credentials just for a favicon.
3453         * loader/icon/IconLoader.h:
3454
3455 2007-12-18  John Sullivan  <sullivan@apple.com>
3456
3457         Reviewed by Brady
3458         
3459         - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
3460
3461         * storage/DatabaseTracker.cpp:
3462         (WebCore::DatabaseTracker::canEstablishDatabase):
3463         pass "name" instead of "displayName" if there's no displayName
3464
3465 2007-12-17  Dan Bernstein  <mitz@apple.com>
3466
3467         Reviewed by Maciej Stachowiak.
3468
3469         - restore ButtonFace and ThreeDFace to their previous values for non-Mac
3470           platforms. The Mac port also uses the same values for now instead
3471           of NSColor-based ones.
3472
3473         * rendering/RenderTheme.cpp:
3474         (WebCore::RenderTheme::systemColor):
3475
3476 2007-12-17  Rodney Dawes  <dobey@wayofthemonkey.com>
3477
3478         Reviewed by Maciej Stachowiak.
3479
3480         Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
3481         Add required Frame::createScriptInstanceForWidget to FrameGtk
3482
3483         * config.h:
3484         * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
3485
3486 2007-12-17  Alice Liu  <alice.liu@apple.com>
3487
3488         Reviewed by Adam.
3489
3490         Fixed <rdar://5566435> window with no scrollbars can be scrolled
3491
3492         * platform/win/ScrollViewWin.cpp:
3493         (WebCore::ScrollView::maximumScroll):
3494         corrected maximumScroll() to account for scrolling not allowed.
3495         (WebCore::ScrollView::wheelEvent):
3496
3497 2007-12-14  Juan A. Suarez Romero  <jasuarez@igalia.com>
3498
3499         Reviewed by Alp Toker.
3500
3501         http://bugs.webkit.org/show_bug.cgi?id=16042
3502         [GTK] Eliminate webkit_init()
3503
3504         Move webkit initialization to WebView class init.
3505
3506         * WebCore.pro:
3507
3508 2007-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
3509
3510         Reviewed by Darin.
3511
3512         <rdar://problem/5651291> REGRESSION: Flash content doesn't display
3513         (www.adobe.com)
3514
3515         We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
3516
3517         * plugins/win/PluginViewWin.cpp:
3518         (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
3519         NPEvent*
3520         (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
3521         (WebCore::PluginViewWin::handleKeyboardEvent): same
3522         (WebCore::PluginViewWin::handleMouseEvent): same
3523         * plugins/win/PluginViewWin.h:
3524
3525 2007-12-17  Alexey Proskuryakov  <ap@webkit.org>
3526
3527         Reviewed by Darin.
3528
3529         Live to the promise of never making AppKit special character codes visible via DOM.
3530
3531         Test: fast/events/arrow-keys-on-body.html
3532
3533         * page/EventHandler.cpp:
3534         (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
3535         to let quirks-aware code strip special charactrers.
3536         * platform/mac/KeyEventMac.mm:
3537         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
3538         mode, remove the text if it's a special character.
3539
3540 2007-12-17  Mark Rowe  <mrowe@apple.com>
3541
3542         Reviewed by Darin Adler.
3543
3544         Fix incorrect array size and incorrect array index in convertNSColorToColor.
3545
3546         * rendering/RenderThemeMac.mm:
3547         (WebCore::convertNSColorToColor):
3548
3549 2007-12-17  Darin Adler  <darin@apple.com>
3550
3551         Reviewed by Mark Rowe.
3552
3553         - fix http://bugs.webkit.org/show_bug.cgi?id=16468
3554           REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
3555
3556         * storage/DatabaseThread.cpp:
3557         (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
3558         because there's no guarantee it won't lose its last reference otherwise.
3559
3560 2007-12-17  Dan Bernstein  <mitz@apple.com>
3561
3562         Reviewed by Maciej Stachowiak.
3563
3564         - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
3565           and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
3566
3567         * platform/graphics/win/FontCacheWin.cpp:
3568         (WebCore::FontCache::getFontDataForCharacters): To ensure that font
3569         linking gives consistent results for characters that are exclusive to
3570         the simplified Chinese code page and characters that belong to that
3571         code page and other code pages, always ask to map to simplified Chinese
3572         alone first.
3573
3574 2007-12-17  Christian Dywan  <christian@twotoasts.de>
3575
3576         Reviewed by Alp Toker.
3577
3578         http://bugs.webkit.org/show_bug.cgi?id=16378
3579         Implement Icon for Gtk
3580
3581         Icon provides a GdkPixbuf containing a themed icon.
3582         The icon theme is probed for an icon name according to the
3583         Icon Naming Specification or conventional Gnome icon names respectively.
3584
3585         See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
3586
3587         * platform/graphics/Icon.h: